2010/12/29 Albert Y. C. Lai <[email protected]>

> On 10-12-29 12:50 PM, michael rice wrote:
>
>> I think of (r -> m a) as a type signature and Int or Bool by themselves
>> as types. So, all type signatures are themselves types?
>>
>
> http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-620004
>
> In particular
>
> gendecl → vars :: [context =>] type    (type signature)
>
> Therefore I think of
>
> n :: Int
> f :: r -> m a
>
> as type signatures, and their right-hand sides alone,
>
> Int
> r -> m a
>
> as types.
>

I used to think about types as mathematical sets, and type signatures in
this case are just sequences of characters denoting these types. They of
course must have some formal grammar as it was quoted above.

I'd like to note that one type can be denoted by many type signatures. For
example, String and [Char]. And as another case, a -> b and c -> d. One may
come up with more advanced examples involving type families.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to