Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

haskell-stack command with GHC option

I'm using stack command to compile a Haskell code. I'd like to compile with GHC options like -O2. I would like you tell how do I do this.

The following command is not OK. I'd like to do like the below code.

stack ghc -O2 hello.hs
like image 928
ryo Avatar asked Dec 19 '22 16:12

ryo


1 Answers

All of GHC specific options should be placed after --

ex.

stack ghc -- -O2 hello.hs
like image 74
objectx Avatar answered Jan 28 '23 01:01

objectx