X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=hs-rrdtool.git;a=blobdiff_plain;f=Database%2FRRDtool%2FExpression.hs;h=19a241fe053b69a1d9ebddaf7c04e4a33c5904b0;hp=077f40fa38c177f8477a75c7a8860626216b0426;hb=256aad40f96ce034bc1aebd3302ecd8a86419163;hpb=c788edcf6744a51cb38795e4f1959d22d10ad071 diff --git a/Database/RRDtool/Expression.hs b/Database/RRDtool/Expression.hs index 077f40f..19a241f 100644 --- a/Database/RRDtool/Expression.hs +++ b/Database/RRDtool/Expression.hs @@ -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