clafer-0.3.7: clafer compiles Clafer models to other formats, such as Alloy, XML, HTML, Dot.

Safe HaskellNone

Language.Clafer.Intermediate.ResolverName

Synopsis

Documentation

data SEnv Source

this environment is created for each clafer

Constructors

SEnv 

Fields

clafers :: [IClafer]
 
context :: Maybe IClafer
 
subClafers :: [(IClafer, [IClafer])]
 
ancClafers :: [(IClafer, [IClafer])]
 
bindings :: [([String], [IClafer])]
 
resPath :: [IClafer]
 
genv :: GEnv
 
aClafers :: [(IClafer, [IClafer])]
 
cClafers :: [(IClafer, [IClafer])]
 

Instances

Show SEnv 

data HowResolved Source

How a given name was resolved

Constructors

Special

this, parent, children

TypeSpecial

primitive type: integer, string

Binding

local variable (in constraints)

Subclafers

clafer's descendant

Reference

resolved by a reference

Ancestor

clafer's ancestor

AbsClafer

abstract clafer

TopClafer

non-abstract top-level clafer

Instances

checkForJust :: [Maybe (String, Span)] -> Maybe (String, Span)Source

checkListDuplicates :: [(String, Span)] -> Maybe (String, Span)Source

checkListDuplicates' :: [(String, Span)] -> Maybe (String, Span)Source

liftError :: Monad m => Either e a -> ErrorT e m aSource

resolveNav :: Span -> SEnv -> IExp -> Bool -> Resolve (IExp, [IClafer])Source

mkPath :: SEnv -> (HowResolved, String, [IClafer]) -> (IExp, [IClafer])Source

toNav' :: [String] -> IExpSource

adjustAncestor :: [String] -> [String] -> [String]Source

mkPath' :: String -> (HowResolved, String, [IClafer]) -> (IExp, [IClafer])Source

resolveName :: Span -> SEnv -> String -> Resolve (HowResolved, String, [IClafer])Source

resolveImmName :: Span -> SEnv -> String -> Resolve (HowResolved, String, [IClafer])Source

resolve :: (Monad f, Functor f) => SEnv -> String -> [SEnv -> String -> f (Maybe b)] -> f bSource

resolveNone :: Span -> SEnv -> String -> Resolve tSource

resolveSpecial :: SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

resolveBind :: SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

resolveDescendants :: SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

resolveChildren :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

resolveReference :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

resolveChildren' :: Span -> SEnv -> String -> (SEnv -> [IClafer]) -> HowResolved -> Either ClaferSErr (Maybe (HowResolved, String, [IClafer]))Source

liftMaybe :: Maybe a -> MaybeT (Either ClaferSErr) aSource

resolveAncestor :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

resolveTopLevel :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))Source

selectChildren :: (IClafer -> String) -> SEnv -> [IClafer]Source

findUnique :: Span -> String -> [(IClafer, [IClafer])] -> Resolve (Maybe (String, [IClafer]))Source

findFirst :: String -> [(IClafer, [IClafer])] -> Maybe (String, [IClafer])Source

showPath :: [String] -> StringSource

isNamespaceConflict :: [[String]] -> BoolSource

filterPaths :: String -> [(IClafer, [IClafer])] -> [(IClafer, [IClafer])]Source