Closed wclr closed 2 years ago
Does the compiler suppress the declaration type warning in this case?
Does the compiler suppress the declaration type warning in this case?
Yeah, at this point in type checking
x :: Int
x = 42
Has been desugared into
x = 42 :: Int
So there's no difference to the compiler.
Thanks @natefaubion, I didn't realise that. In fact I've never come across any code formatted like this either.
In which case I fully agree, we shouldn't show a lens in this situation.
In fact I've never come across any code formatted like this either.
I mostly see it in modules that define proxies or constants, like
_foo = Proxy :: Proxy "foo"
I believe we don't need signature lenses for such a case: