isovector / haskell-language-server

Integration point for ghcide and haskell-ide-engine. One IDE to rule them all.
Apache License 2.0
0 stars 2 forks source link

Don't try to destruct type families #4

Closed isovector closed 4 years ago

isovector commented 4 years ago
type family Blah
type instance Blah = Int

blah :: Blah -> Int
blah b = _

produces a hole of

case b of

instead we should look through their tyfams

isovector commented 4 years ago

Okay; fixed this so that type families now work. The fix is to fail if there are no data cons for the current type constructor; for which there are none for tyfams. Datafams have their data cons stored somewhere else, so this fix doesn't work for them, unfortunately.

Also, this will prevent Void from getting a case match, but that's uhh, probably ok.

cc5fcbd39b5e4732f4d521a8e53d77e69f99083a