Not quite. (Λβ. x) has type ∀β.α, where β is any symbol you like, of course. It has to be "applied" to a type. Normally in lambda-2 you write this kind of application differently (as a subscript) but I think this is silly, because some nested expressions get smaller and smaller, and you can usually tell whether it's a type or value application easily enough. Coo, I remember more than I thought.
No reason. I'm one of the few people who's ever been a commercial ML programmer, and old habits die hard. You're right that it's nicer to just call this "list" and have it take a type.
I hope compilerbitch doesn't mind us filling up her journal with this nonsense.
no subject
no subject
no subject
nil int : int list, where
nil int = Λβ . λb:β . λf:β→int→β . b
int list = ∀β.β→(β→int→β)→β
But it looks correct now.
no subject
list ::= Λα.∀β.β→(β→α→β)→β
...?
no subject
No reason. I'm one of the few people who's ever been a commercial ML programmer, and old habits die hard. You're right that it's nicer to just call this "list" and have it take a type.
I hope
compilerbitch doesn't mind us filling up her journal with this nonsense.
no subject
:-)
I was paid to write Haskell for two whole weeks once...