]> gitweb @ CieloNegro.org - hs-rrdtool.git/blobdiff - Database/RRDtool/Expression.hs
working on graph...
[hs-rrdtool.git] / Database / RRDtool / Expression.hs
index 077f40fa38c177f8477a75c7a8860626216b0426..19a241fe053b69a1d9ebddaf7c04e4a33c5904b0 100644 (file)
@@ -84,7 +84,9 @@ class ( (HLengthOf str :<=: D19) ~ True
     => IsVarName str
 -}
 type family   IsVarName str
-type instance IsVarName str = ( (HLength str :<=: D19)
+type instance IsVarName str = ( (HLength str :>: D0)
+                                :&&:
+                                (HLength str :<=: D19)
                                 :&&:
                                 (HAll IsGoodLetterForVarNameA str)
                               )
@@ -92,7 +94,7 @@ type instance IsVarName str = ( (HLength str :<=: D19)
 type family   IsGoodLetterForVarName c
 type instance IsGoodLetterForVarName c = ( ((c :>=: D65) :&&: (c :<=:  D90)) -- A-Z
                                            :||:
-                                           ((c :>=: D99) :&&: (c :<=: D122)) -- a-z
+                                           ((c :>=: D97) :&&: (c :<=: D122)) -- a-z
                                            :||:
                                            (c :==: D45) -- '-'
                                            :||:
@@ -104,9 +106,8 @@ instance ApplyT IsGoodLetterForVarNameA c where
     type Apply IsGoodLetterForVarNameA c = IsGoodLetterForVarName c
 
 -- Variable
-data Variable vn
-    = Variable !vn
-    deriving (Show, Eq, Ord)
+data Variable vn = Var !vn
+                   deriving (Show, Eq, Ord)
 
 type instance IsExpr          (Variable vn) = True
 type instance IsCommonExpr    (Variable vn) = True