
23 Jul
2009
23 Jul
'09
11:21 p.m.
David Menendez wrote:
instance Data Double where toConstr = mkFloatConstr floatType -- that should probably be "doubleType" gunfold _ z c = case constrRep c of (FloatConstr x) -> z x _ -> error "gunfold" dataTypeOf _ = doubleType
I could do something like this for Fixed, but deriving Fixed automatically does essentially the same thing.
Alternatively, you could make Fixed non-representable like Ptr,
Why? Fixed morally is data. -- Ashley Yakeley