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

compiler options in the prelude #56

Open
gelisam opened this issue Aug 20, 2013 · 2 comments
Open

compiler options in the prelude #56

gelisam opened this issue Aug 20, 2013 · 2 comments
Assignees

Comments

@gelisam
Copy link
Collaborator

gelisam commented Aug 20, 2013

options like OverloadedStrings, NoExplicitPrelude, etc.

@melrief
Copy link
Collaborator

melrief commented Aug 20, 2013

My strategy for this is similar to what we do for modules:

  • extract extensions from prelude.hs
  • put the list of them in a cache file $HOME/.hawk/cache/extensions
  • every time Hawk is executed, load from that file and set them using hint

Currently, the function initInterpreter of System/Console/Hawk.hs loads some default extensions, this should be changed by removing them and loading the cached extensions in $HOME/.hawk/cache/extensions.

@melrief
Copy link
Collaborator

melrief commented Aug 21, 2013

I found a solution: the package haskell-src-exts has a function called getTopPragmas that extract the pragmas. I'm starting the implementation of the cache file and then we can easily load that file.

@ghost ghost assigned melrief Aug 21, 2013
melrief added a commit that referenced this issue Aug 21, 2013
- the pragma ExtendedDefaultRules is added to the default Prelude.hs
- only LANGUAGE extensions are loaded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants