
2 Jun
2011
2 Jun
'11
11:03 p.m.
I'm trying to understand the Haskell type system, because it is portrayed as a rather powerful tool when properly harnessed. There are a few things, however, I could use some clarification on. For starters, I'm a bit confused about the "data" declarations: I understand (correctly, I hope) that the purpose of a "data" declaration is to create a new type. So this makes sense: data KeyValuePair = KeyValuePair String String However, this also compiles: data KeyValuePair a b = KeyValuePair String String As well as does this: data KeyValuePair a b = KeyValuePair String And this: data KeyValuePair a b = KeyValuePair So you can see how I'm getting a bit confused? -- frigidcode.com theologia.indicium.us