Hacker News new | ask | show | jobs
by sli 2514 days ago
Generics are to types what HKT are to type signatures. In functions, they usually map to arity. That is, an arity mismatch is are a higher-kinded type mismatch. An easy (if not totally accurate) way to view them is like doubly-generic types.

If you have some type A, it has the kind * . If you have some function from A -> B, it has the kind * -> * .

1 comments

I've decided that it's the same as having a simply-typed lambda calculus with one type (*) and function types living inside of your type system. Is this correct at all?