[Haskell-beginners] type question

ARJANEN Loïc Jean-David arjanen.loic at gmail.com
Wed Jun 29 17:10:44 CEST 2011


If I understand correctly, ¬ is the logical not. It's a function from
booleans to booleans (denoted by it's type: Bool -> Bool) because it
takes as its argument a boolean to negate and returns the negation of
its parameter.

Hoping to have helped you,
Loic

> On Wed, 29 Jun 2011 14:55:50 +0000, Roelof Wobben wrote:
> Hello,
>
> I'm now following the book Programming in Haskel by Hutton.
> IM now reading the chapter about types.
>
> But I don't understand this :
>
> False :: Bool
> True :: Bool
> ¬  :: Bool  ---> Bool
>
> So False  and True has the type Bool.
> That's clear.
>
> I find out that ¬ makes the opposite of True and False.
> But why is it also the type Bool --> Bool



More information about the Beginners mailing list