hawk icon indicating copy to clipboard operation
hawk copied to clipboard

compiler options in the prelude

Open gelisam opened this issue 11 years ago • 2 comments

options like OverloadedStrings, NoExplicitPrelude, etc.

gelisam avatar Aug 20 '13 19:08 gelisam

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 avatar Aug 20 '13 20:08 melrief

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.

melrief avatar Aug 21 '13 10:08 melrief