hawk
hawk copied to clipboard
compiler options in the prelude
options like OverloadedStrings, NoExplicitPrelude, etc.
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 usinghint
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
.
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.