X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=hs-rrdtool.git;a=blobdiff_plain;f=Database%2FRRDtool%2FExpression.hs;h=5c44213e47fb2fa4649b82c489e5d543cc3af79d;hp=f2d2574f93b8a23d70ed0c0e0b05004ffbacd1c5;hb=f34eed5749bdaf7ff7b33230557b30115ae343f3;hpb=16e0b5c01dc848105b3673a72ee6e04f8baae9d9 diff --git a/Database/RRDtool/Expression.hs b/Database/RRDtool/Expression.hs index f2d2574..5c44213 100644 --- a/Database/RRDtool/Expression.hs +++ b/Database/RRDtool/Expression.hs @@ -2,6 +2,7 @@ EmptyDataDecls, FlexibleInstances, TypeFamilies, + TypeOperators, MultiParamTypeClasses, UndecidableInstances #-} @@ -14,6 +15,7 @@ module Database.RRDtool.Expression , IsIterativeExpr , IsVarName + , hString , Constant(..) , Variable(..) @@ -32,6 +34,7 @@ module Database.RRDtool.Expression where import Data.HList +import Data.HList.String import Types.Data.Bool import Types.Data.Num hiding ((:*:)) import Types.Data.Ord @@ -75,13 +78,13 @@ type instance IsIterativeExpr Constant = True type instance MentionedVars Constant = HNil {- This is what we want to do but GHC can't handle this for now. -class ( (HLengthOf str :<=: D255) ~ True +class ( (HLengthOf str :<=: D19) ~ True , HString str ) => IsVarName str -} type family IsVarName str -type instance IsVarName str = ( (HLength str :<=: D255) +type instance IsVarName str = ( (HLength str :<=: D19) :&&: (HAll IsGoodLetterForVarNameA str) )