Update of /cvsroot/hoc/hoc/HOC/HOC
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv944/HOC/HOC
Modified Files:
CEnum.hs
Log Message:
Use overloaded (Num a =>) type for anonymous enum constants
Index: CEnum.hs
===================================================================
RCS file: /cvsroot/hoc/hoc/HOC/HOC/CEnum.hs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CEnum.hs 30 Jul 2005 02:41:54 -0000 1.1
+++ CEnum.hs 5 Feb 2007 16:07:10 -0000 1.2
@@ -49,8 +49,11 @@
values = map snd assocs
declareAnonymousCEnum assocs
- = sequence [
- valD (varP constant) (normalB $ litE $ integerL value) []
+ = sequence $ concat [
+ [
+ sigD constant [t| forall a. Num a => a |],
+ valD (varP constant) (normalB $ litE $ integerL value) []
+ ]
| (constant, value) <- zip constants values
]
where
|