[Haskell-cafe] automatic instance derivation
garious at gmail.com
Fri Aug 18 19:42:45 EDT 2006
How do you automatically derive an instance for a data type defined in an
-- automatic instance derivation directly after type declaration
data Val1 = V1 Int deriving Show
-- manual instance derivation can be in separate file
data Val2 = V2 Int
instance Show Val2 where
show (V2 i) = show i
-- Is something like this possible?
data Val1 = V1 Int
derive Show Val2
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe