Module

Perspectives.Parsing.Arc.PhaseTwo

#PhaseTwoState

type PhaseTwoState = { bot :: Boolean, dfr :: DomeinFileRecord, namespaces :: Object String, variableBindings :: Environment QueryFunctionDescription }

#PhaseTwo'

type PhaseTwo' a m = ExceptT PerspectivesError (StateT PhaseTwoState m) a

A Monad with state that indicates whether the Subject of an Action is a Bot, and allows exceptions. It allows for a variable bottom of the monadic stack.

#runPhaseTwo'

runPhaseTwo' :: forall a m. PhaseTwo' a m -> m (Tuple (Either PerspectivesError a) PhaseTwoState)

Run a computation in PhaseTwo, returning Errors or a Tuple holding both the state and the result of the computation.

#evalPhaseTwo'

evalPhaseTwo' :: forall a m. Monad m => PhaseTwo' a m -> m (Either PerspectivesError a)

Run a computation in PhaseTwo, returning Errors or the result of the computation.

#evalPhaseTwo_'

#PhaseTwo

#PhaseThree

type PhaseThree a = PhaseTwo' a MonadPerspectives

A Monad based on MonadPerspectives, with state that indicates whether the Subject of an Action is a Bot, and allows exceptions.

#lift2

lift2 :: forall a. MonadPerspectives a -> PhaseThree a

#subjectIsBot

#subjectIsNotABot

#getVariableBindings

#addBinding

#lookupVariableBinding

#withFrame

withFrame :: forall a m. Monad m => PhaseTwo' a m -> PhaseTwo' a m

#withNamespaces

withNamespaces :: forall a. Partial => List ContextPart -> PhaseTwo a -> PhaseTwo a

withNamespaces only handles the PREFIX element of the ContextPart Sum.

#expandNamespace

expandNamespace :: String -> PhaseTwo String

Replace sys:User by model:Systeem$User if sys = model:Systeem Useful for expanding local names used in bindings, property- and view references.

#traverseContextE

traverseContextE :: ContextE -> Namespace -> PhaseTwo Context

Traverse the members of the ContextE AST type to construct a new Context type and insert it into a DomeinFileRecord.

#traverseRoleE

traverseRoleE :: RoleE -> Namespace -> PhaseTwo Role

Traverse the members of the RoleE AST type to construct a new Role type and insert it into a DomeinFileRecord.

#traverseEnumeratedRoleE

traverseEnumeratedRoleE :: RoleE -> Namespace -> PhaseTwo Role

Traverse a RoleE that results in an EnumeratedRole.

#traverseCalculatedRoleE

traverseCalculatedRoleE :: RoleE -> Namespace -> PhaseTwo Role

Traverse a RoleE that results in an CalculatedRole.

#traverseComputedRoleE

traverseComputedRoleE :: RoleE -> Namespace -> PhaseTwo Role

Traverse a RoleE that results in an CalculatedRole with a Calculation that depends on a Computed function.

#traversePropertyE

traversePropertyE :: PropertyE -> Namespace -> PhaseTwo Property

Traverse the members of the PropertyE AST type to construct a new Property type and insert it into a DomeinFileRecord.

#traverseCalculatedPropertyE

traverseCalculatedPropertyE :: PropertyE -> Namespace -> PhaseTwo Property

Traverse a PropertyE that results in an CalculatedProperty.

#traversePerspectiveE

traversePerspectiveE :: PerspectiveE -> Namespace -> PhaseTwo (Tuple String (Array ActionType))

Traverse a PerspectiveE. Add each Action seperately to the DomeinFile. Returns the fully qualified string that identifies the Object of the Action and the qualified identifiers of the Actions (we need not know what kind of Role that Object is, to be able to store the Perspective in the Role itself).

#traverseActionE

traverseActionE :: Partial => String -> Maybe ViewType -> Namespace -> (Array ActionType) -> PerspectivePart -> PhaseTwo (Array ActionType)

Constructs an Action, using the provided Object and maybe the View on that Object, from the ActionE. Returns the fully qualified name of the Action in the ActionType. Adds each Action to the DomeinFileRecord.

Modules