-fno-monomorphism-restriction
Christian Maeder
maeder at tzi.de
Mon Nov 29 11:45:34 EST 2004
Christian Maeder wrote:
> I've found a much shorter example (without imports) that does not
> compile.
and shorter:
{-# OPTIONS -fno-monomorphism-restriction #-}
module NoMonoRestr where
data ATermTable = ATermTable
data Annotation = Annotation
data Annoted a = Annoted a [Annotation]
toPair ::
ATermConvertibleSML a => ATermTable -> (a,[Annotation])
toPair = undefined
class ATermConvertibleSML t where
from_sml_ShATerm :: ATermTable -> t
instance (ATermConvertibleSML a) => ATermConvertibleSML (Annoted a) where
from_sml_ShATerm att =
let (bi,las) = toPair att
in Annoted bi las
More information about the Glasgow-haskell-users
mailing list