Hets - the Heterogeneous Tool Set

Copyright(c) Ewaryst.Schulz, DFKI 2010
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerEwaryst.Schulz@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred

CSL.Fold

Description

folding functions for CSL terms and commands

Synopsis

Documentation

data Record a b

Constructors

Record 

Fields

foldAss :: CMD -> OpDecl -> b -> a
 
foldCmd :: CMD -> String -> [b] -> a
 
foldSequence :: CMD -> [a] -> a
 
foldCond :: CMD -> [(b, [a])] -> a
 
foldRepeat :: CMD -> b -> [a] -> a
 
foldVar :: EXPRESSION -> Token -> b
 
foldOp :: EXPRESSION -> OPID -> [EXTPARAM] -> [b] -> Range -> b
 
foldList :: EXPRESSION -> [b] -> Range -> b
 
foldInterval :: EXPRESSION -> Double -> Double -> Range -> b
 
foldInt :: EXPRESSION -> APInt -> Range -> b
 
foldRat :: EXPRESSION -> APFloat -> Range -> b
 

emptyRecord :: String -> Record a b

Produces an error with given message on all entries. Use this if you overwrite only the EXPRESSION part and you do not use the CMD part anyway , e.g., if you use the record in foldTerm

idRecord :: Record CMD EXPRESSION

The identity transformation

passRecord :: Record CMD EXPRESSION

Passes the transformation through the CMD part and is the identity on the EXPRESSION part

passAllRecord :: Record CMD EXPRESSION

Passes the transformation through both, the CMD and the EXPRESSION part

listCMDRecord :: Record [a] EXPRESSION

Passes the transformation through the CMD part by concatenating the processed list from left to right and identity on expression part

constRecord :: a -> b -> Record a b

Returns the first constant on the CMD part and the second on the EXPRESSION part

foldCMD :: Record a b -> CMD -> a

foldTerm :: Record a b -> EXPRESSION -> b