
25 Nov
2003
25 Nov
'03
4 a.m.
| class C a where ... | data MkC = forall a . C a => MkC a | | foo :: MkC -> ... | | and I want to specialize foo for when the 'a' in the MkC is, say, Int. Is | this possible? Not directly. But you can say foo (MkC x) = foo' x foo' :: forall a. C a => a -> ... foo' x = ... {-# SPECIALISE foo' :: Int -> ... #-} There's no built-in mechanism I'm afraid. Simon