0

When I am developing I like to have -fdefer-type-errors and -XPartialTypeSignatures enabled. Currently I just add

{-# LANGUAGE PartialTypeSignatures #-}
{-# OPTIONS_GHC -fdefer-type-errors #-}

to the top of the file I am working with. However this is not ideal as I often forget to remove these lines once I am done. Is there an option to pass these to intero in emacs?

Julia Path
  • 2,356
  • 15
  • 21

2 Answers2

0

Updating your cabal file to specify the relevant extensions and ghc-options should work, i.e.:

...
lib
  hs-source-dirs:      src
  ghc-options:         -fdefer-type-errors
  extensions:          PartialTypeSignatures
Matt
  • 657
  • 6
  • 12
  • This is not an option, I want those options only in intero when I am developing. When I normally compile the project I do not want these to be enabled. Also I do not want to have them appear in any files that are actually tracked in the repo. – Julia Path Dec 06 '17 at 09:36
  • Ah, I misunderstood. I don't know of a way to accomplish that. – Matt Dec 06 '17 at 13:54
0

This can now be archived by setting intero-extra-ghc-options and intero-extra-ghci-options.

Julia Path
  • 2,356
  • 15
  • 21