Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data VType
- = VString
- | VNumber
- | VStringOrNumber
- | VBool
- | VAny
- findAllVariables :: [Expr] -> [(JsonVarPath, VType)]
- findVariables :: StateT VType [] JsonVarPath -> Expr -> StateT VType [] JsonVarPath
- makeAggregate :: Expr -> VarIndex -> [Expr] -> [Expr]
- aggregateElem :: Expr -> VarIndex -> Expr -> Expr
- updateFs :: Expr -> [Expr] -> [Expr]
Documentation
Allowed types
findAllVariables :: [Expr] -> [(JsonVarPath, VType)] Source #
Map findAllVariables across terms from parsed template and concatenate variable with inferred type
findVariables :: StateT VType [] JsonVarPath -> Expr -> StateT VType [] JsonVarPath Source #
Find all the variables in a node's children, with a type scope
:: Expr | Aggregate sample filter to add |
-> VarIndex | Prefix to filter on - do not aggregate this prefix |
-> [Expr] | Parsed template to make |
-> [Expr] |
Find all context variables and add a sample filter. Designed to simulate required templates for aggregate contexts - see JsonTools