-- GeNeRaTeD fOr: ../../CBS/Funcons/Computations/Control flow/Normal/Sequencing/sequential.aterm {-# LANGUAGE OverloadedStrings #-} module Funcons.Core.Computations.ControlFlow.Normal.Sequencing.Sequential where import Funcons.EDSL entities = [] types = typeEnvFromList [] funcons = libFromList [("sequential",NonStrictFuncon stepSequential)] -- | -- /sequential(X1,...,Xn)/ executes /X1/ ,...,/Xn/ from left to right, -- computing a tuple of results. -- Any result values that are the empty tuple /()/ are discarded, -- so the resultant tuple may be smaller. sequential_ fargs = FApp "sequential" (FTuple fargs) stepSequential fargs = evalRules [rewrite1] [] where rewrite1 = do let env = emptyEnv env <- fsMatch fargs [PSeqVar "X*" StarOp] env rewriteTermTo (TApp "discard-empty-tuples" (TTuple [TApp "left-to-right" (TTuple [TVar "X*"])])) env