-- GeNeRaTeD fOr: ../../CBS/Funcons/Computations/Data flow/Storing/General variables/allocate-map.aterm {-# LANGUAGE OverloadedStrings #-} module Funcons.Core.Computations.DataFlow.Storing.GeneralVariables.AllocateMap where import Funcons.EDSL entities = [] types = typeEnvFromList [] funcons = libFromList [("allocate-map",StrictFuncon stepAllocate_map)] -- | -- /allocate-map(M)/ computes a map where the entries are -- uninitialised /variables/ of types given by /M/ . allocate_map_ fargs = FApp "allocate-map" (FTuple fargs) stepAllocate_map fargs = evalRules [rewrite1] [] where rewrite1 = do let env = emptyEnv env <- vsMatch fargs [VPAnnotated (VPMetaVar "M") (TName "values")] env rewriteTermTo (TApp "map-map" (TTuple [TApp "allocate-variable" (TTuple [TName "given2"]),TVar "M"])) env