Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing -ddump-splices to Stack script interpreter

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 ?

like image 646
Sibi Avatar asked Jun 28 '26 01:06

Sibi


1 Answers

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

like image 137
Sibi Avatar answered Jun 30 '26 16:06

Sibi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!