Polymorphic types in RHS of type instances
5 Feb
2011
5 Feb
'11
11:25 a.m.
Hi list, I was wondering why GHC doesn't allow usage of polymorphic types in the right-hand side of type instance declarations for type families. The GHC user guide states: "The right-hand side of a type instance must be a monotype (i.e., it may not include foralls) [...]", but it doesn't state the reason. I stumbled upon this limitation when I was trying to generically calculate Johann's and Ghani's interpreter (transformers) for nested data types from their "Initial Algebra Semantics is Enough!" paper. Cheers, Steven
5683
Age (days ago)
5683
Last active (days ago)
0 comments
1 participants
participants (1)
-
Steven Keuchel