atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Insert Type not correct #154

Closed BillyBadBoy closed 8 years ago

BillyBadBoy commented 8 years ago

I've noticed that when I define this function: mySum x y = x + y and then select 'Insert Type', it produces:

mySum :: a -> a -> a
mySum x y = x + y

instead of the expected:

mySum :: Num a => a -> a -> a
mySum x y = x + y

Is this a bug ?

lierdakil commented 8 years ago

Constrained types will be supported with next ghc-mod version (5.6.0.0). It's no magic though, so some mistakes can be expected.

In this case type is technically correct, but not constrained. 28 мая 2016 г. 1:26 PM пользователь "BillyBadBoy" notifications@github.com написал:

I've noticed that when I define this function: mySum x y = x + y and then select 'Insert Type', it produces:

mySum :: a -> a -> a mySum x y = x + y

instead of the expected:

mySum :: Num a => a -> a -> a mySum x y = x + y

Is this a bug ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/154, or mute the thread https://github.com/notifications/unsubscribe/AG8EZuN1W3eywgK-gtkL1C2e4hnIWZOWks5qGBhvgaJpZM4IpC66 .

BillyBadBoy commented 8 years ago

thanks for the clarification!