Hello michael,

Tuesday, August 31, 2010, 9:27:17 PM, you wrote:

f :: Int -> Int

i.e. it's used when you define function types

> So it's a type constructor, not a type? Could you please provide a simple 
> example of its usage?

> Michael

> --- On Tue, 8/31/10, Vo Minh Thu <not...@gmail.com> wrote:

> From: Vo Minh Thu <not...@gmail.com>
> Subject: Re: [Haskell-cafe] On to applicative
> To: "michael rice" <nowg...@yahoo.com>
> Cc: haskell-cafe@haskell.org
> Date: Tuesday, August 31, 2010, 1:17 PM

> 2010/8/31 michael rice <nowg...@yahoo.com>
>>
>> "Learn You a Haskell ..."  says that (->) is a type just like Either. Where 
>> can I find its type definition?

> You can't define it *in* Haskell as user code. It is a  built-in infix
> type constructor (Either or Maybe are type constructors too, not just
> types). In fact, if you want to implement a simple, typed functional
> language, you'll find it is the only built-in type constructor you
> have to implement (as the implementor of the language).

> Also,
>   Show a => a
> is a type too, but you won't find a definition for 'a' or for '=>'.
> All those things are defined by the language.

> Cheers,
> Thu


>   


-- 
Best regards,
 Bulat                            mailto:bulat.zigans...@gmail.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to