
29 Dec
2010
29 Dec
'10
3:27 p.m.
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 also include the "context =>" part in my types, for example m :: Num a => a I take the type to be Num a => a The grammar splits out the "context =>" part just for the sake of reuse in other places such as topdecl → ... | data [context =>] simpletype [= constrs] [deriving]