Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Language.Haskell.Exts.Location #149

Open
gelisam opened this issue Jul 5, 2015 · 0 comments
Open

Derive Language.Haskell.Exts.Location #149

gelisam opened this issue Jul 5, 2015 · 0 comments

Comments

@gelisam
Copy link
Owner

gelisam commented Jul 5, 2015

haskell-src-exts keeps adding constructors and arguments to its core datatypes. This constantly causes Hawk's Language.Haskell.Exts.Location module to break, as we list each constructor in order to extract location information. Worse: each time we update the code to be compatible with the latest version of haskell-src-exts, we lose compatibility with the older versions, which might have unintended compatibility issues with older versions of other packages.

I just noticed that haskell-src-exts has Generic and Typeable instances for all of its datatypes, which means we should be able to generically extract the fields which happen to have type SrcLoc. This way, Hawk's code would be independent of the details of the constructors in haskell-src-exts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant