[Haskell-beginners] Fwd: Re: Multiple letters between -> ->

Francesco Ariis fa-ml at ariis.it
Sat Nov 25 16:39:54 UTC 2017


On Sat, Nov 25, 2017 at 04:19:04PM +0100, Marcus Manning wrote:
> But why I can call g with Just:
> 
> 
> let g :: h a b -> h a b; g a = a
> 
> g Just
> 
> but Just is a->Maybe a

Because (->) is a type constructor itself, just with
convenient infix syntax:

    λ> :k (->)
    (->) :: TYPE q -> TYPE r -> *



More information about the Beginners mailing list