
5 Feb
2016
5 Feb
'16
7:06 p.m.
On Fri, Feb 5, 2016 at 6:22 PM, Artyom
Why not just make GHCi output a comment whenever the type involves levity?
:t ($)
-- Note: the actual type is more generic: -- -- ($) :: forall (w :: GHC.Types.Levity) a (b :: TYPE w). (a -> b) -> a -> b -- -- For the absolute majority of purposes the simpler type is correct. -- See GHC Guide chapter X point Y to learn more about this.
($) :: (a -> b) -> a -> b
Wouldn't this look like a scary error to some users? Though, users can get accustomed to this and this solution seems to be the best of both worlds. -- Mihai Maruseac (MM) "If you can't solve a problem, then there's an easier problem you can solve: find it." -- George Polya