
22 Mar
2012
22 Mar
'12
7:16 p.m.
I support a form of this in jhc by allowing specialization of values, not just types. It is actually the same mechanism as type specialization since that is just value specialization where the value being specialized on is the type parameter. foo :: Bool -> Int {-# SPECIALIZE foo True :: Int #-} (I think this is the current syntax, I changed it a couple times in jhc's history) will create a foo_True :: Int foo_True = inline foo True and a {-# RULE foo True = foo_True #-} John