-- GeNeRaTeD fOr: ../../CBS/Funcons/Computations/Control flow/Abnormal/Continuations/abort.aterm {-# LANGUAGE OverloadedStrings #-} module Funcons.Core.Computations.ControlFlow.Abnormal.Continuations.Abort where import Funcons.EDSL entities = [] types = typeEnvFromList [] funcons = libFromList [("abort",StrictFuncon stepAbort)] -- | -- /abort(V)/ emits a /control-signal/ that, when handled by an enclosing -- /prompt/ , aborts the current computation up to that enclosing /prompt/ , -- returning the value /V/ . abort_ fargs = FApp "abort" (FTuple fargs) stepAbort fargs = evalRules [] [step1] where step1 = do let env = emptyEnv env <- lifted_vsMatch fargs [VPAnnotated (VPMetaVar "V") (TName "values")] env stepTermTo (TApp "control" (TTuple [TApp "lambda" (TTuple [TVar "V"])])) env