X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=include%2FCTypes.h;h=f74d9f0f13fd1cac8c1e34085290778384248ef5;hb=9049e3999806a851fa898beac447ba1a00507511;hp=25b9ad8c5a715fa7f275c6472069226bcfdb1b7f;hpb=af4cc4743c0c26d43bed44cfbd72e2d18673c613;p=ghc-base.git diff --git a/include/CTypes.h b/include/CTypes.h index 25b9ad8..f74d9f0 100644 --- a/include/CTypes.h +++ b/include/CTypes.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: CTypes.h,v 1.5 2002/09/04 16:05:29 simonmar Exp $ + * $Id: CTypes.h,v 1.7 2003/07/24 12:05:42 panne Exp $ * * Dirty CPP hackery for CTypes/CTypesISO * @@ -18,10 +18,10 @@ #define NUMERIC_TYPE(T,C,S,B) \ newtype T = T B deriving (Eq, Ord) ; \ INSTANCE_NUM(T) ; \ -INSTANCE_READ(T) ; \ -INSTANCE_SHOW(T) ; \ +INSTANCE_READ(T,B) ; \ +INSTANCE_SHOW(T,B) ; \ INSTANCE_ENUM(T) ; \ -INSTANCE_STORABLE(T) : \ +INSTANCE_STORABLE(T) ; \ INSTANCE_TYPEABLE0(T,C,S) ; #define INTEGRAL_TYPE(T,C,S,B) \ @@ -43,11 +43,11 @@ INSTANCE_REALFLOAT(T) #define fakeMap map #endif -#define INSTANCE_READ(T) \ +#define INSTANCE_READ(T,B) \ instance Read T where { \ readsPrec p s = fakeMap (\(x, t) -> (T x, t)) (readsPrec p s) } -#define INSTANCE_SHOW(T) \ +#define INSTANCE_SHOW(T,B) \ instance Show T where { \ showsPrec p (T x) = showsPrec p x }