I thought it would be nice to configure my global GHCI configuration so that my commonly used import happens automatically when there are packages that provide them.
I tried to add this to ~/.ghc/ghci.conf:
:set -XCPP
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
But apparently this does not work.
> stack repl
Configuring GHCi with the following packages:
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
<interactive>:24:1: error: parse error on input ‘
<interactive>:29:1: error: parse error on input ‘
Is there a way to get the CPP macros to work, or in some other way to accomplish what I'm trying to do?
source
share