[Haskell-cafe] New type of ($) operator in GHC 8.0 is problematic
mihai.maruseac at gmail.com
Sat Feb 6 00:06:25 UTC 2016
On Fri, Feb 5, 2016 at 6:22 PM, Artyom <yom at artyom.me> wrote:
> 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
Mihai Maruseac (MM)
"If you can't solve a problem, then there's an easier problem you can
solve: find it." -- George Polya
More information about the Haskell-Cafe