DanielG / ghc-mod

Happy Haskell Hacking for editors. DEPRECATED
Other
677 stars 175 forks source link

Not in scope exception while refining. #679

Open Tritlo opened 8 years ago

Tritlo commented 8 years ago

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
DanielG commented 8 years ago

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.