ghc-mod
ghc-mod copied to clipboard
Not in scope exception while refining.
Hey, I'm trying to figure out how ghc-mod works, and I get an error for a case which I believe should work.
I have a file named "test.hs" with
module Test where
data Color = Black | Red deriving Show
data Suit = Hearts | Spades | Diamonds | Clubs deriving Show
color :: Suit -> Color
color Hearts = Red
color Spades = Black
color Diamonds = Red
color Clubs = _color
but when I run
$ ghc-mod refine test.hs 11 15 Black
I get
EXCEPTION: refining: Not in scope: data constructor ‘Black’
I have:
ghc-mod version 5.4.0.0 compiled by GHC 7.10.2
Sorry but refining and related features are in limbo until we either integrate mote instead or find someone to maintain them. I could never get them to work properly either and they're broken with the latest GHC AFAIK.