Reputation: 48654
I'm using Stack interpreter feature and having a code like this:
#!/usr/bin/env stack
{- stack
--resolver lts-9.0
--install-ghc
runghc
--package yesod
--package yesod-core
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
-- and the code goes on
I want to pass the ddump-splices
option to the stack interpreter to it. Is it possible ?
Upvotes: 3
Views: 195
Reputation: 48654
Yes, you have to use --
before passing the actual ghc option. i.e:
#!/usr/bin/env stack
{- stack
--resolver lts-9.0
--install-ghc
runghc
--package yesod
--package yesod-core
-- -ddump-splices
-}
You can use ghc --show-options
to see the kind of options you can pass. For more information, see here: https://github.com/commercialhaskell/stack/issues/650#issuecomment-123470879
Upvotes: 4