
5 Mar
2012
5 Mar
'12
3:36 a.m.
As I mentioned further up in the email, I think this needs to be done at compile time. However, I'm not sure type classes are the right mechanism, as they don't guarantee that the polymorphism is resolved at compile time. Perhaps type families, in some form, is the right solution.
There is problem with type families. Currently GHC is unable to unpack them[1]. [1] http://hackage.haskell.org/trac/ghc/ticket/3990