cvs commit: fptools/libraries/base/Data Typeable.hs
Ralf Laemmel
ralf at cwi.nl
Wed Feb 25 20:27:47 EST 2004
Sorry Sven, you are right.
a) I guess I should conditionalise these additions using preprocessing?
It is currently only used in Data.Generics, which is GHC-only business
anyway. Or is Hugs using Data.Generics as well?
b) Or I could separate out the related part of Typeable to constitute a
new module? Again, this module would be imported from Data.Generics.
This is maybe a cleaner solution than preprocessing although the new
code is not really worth a new module. It really fits into Typeable.
It is almost Haskell 98 BTW.
c) Or is there an easy to way to make the new constraints H98 compliant?
class Typeable (t () ()) => Typeable2 t where ...
Any comments?
Sorry to bother.
Ralf
Sven Panne wrote:
> ralf at glass.cse.ogi.edu wrote:
>
>> ralf 2004/02/24 11:49:59 PST
>>
>> Modified files:
>> libraries/base/Data Typeable.hs Log:
>> Proliferation of unsafeCoerce in Data.Typeable stopped. (There is now
>> just one cast0 which generalises on all previous forms: cast, castss,
>> castarr.) Started classes Typeable1/2 for unary/binary type
>> constructors.
>> Added instances for lists, products, sums, functions, maybies.
>
>
>
> I'm not sure if this commit is a good thing, because the module is now
> not
> Haskell98 anymore (although the Haddock header stills claims it). This
> breaks e.g. the Hugs build:
>
> env HUGSDIR='../hugsdir' HUGSFLAGS='' ./ffihugs +G
> +L'../hugsdir/libraries/Hugs/Storable_aux.c' Hugs.Storable
> runhugs: Error occurred
> ERROR "../hugsdir/libraries/Data/Typeable.hs":392 - Illegal Haskell
> 98 class constraint in class declaration
> *** Constraint : Typeable (a () ())
>
> Although this would be easy to fix in Hugs' Makefile, I wanted to
> point this out.
> Comments/opions from other people?
>
> Cheers,
> S.
>
> _______________________________________________
> Cvs-libraries mailing list
> Cvs-libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-libraries
More information about the Cvs-libraries
mailing list