Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data SEnv = SEnv {}
- data HowResolved
- type Resolve = Either ClaferSErr
- defSEnv :: GEnv -> [IElement] -> SEnv
- checkDuplicateSiblings :: IModule -> Resolve [IElement]
- checkDuplicateSiblings' :: [IElement] -> Maybe (String, Span)
- checkForJust :: [Maybe (String, Span)] -> Maybe (String, Span)
- checkListDuplicates :: [(String, Span)] -> Maybe (String, Span)
- checkListDuplicates' :: [(String, Span)] -> Maybe (String, Span)
- isIEClafer :: IElement -> Bool
- resolveModuleNames :: (IModule, GEnv) -> Resolve IModule
- resolveClafer :: SEnv -> IClafer -> Resolve IClafer
- mkAncestorList :: SEnv -> [IClafer] -> [(IClafer, [IClafer])]
- resolveElement :: SEnv -> IElement -> Resolve IElement
- resolvePExp :: SEnv -> PExp -> Resolve PExp
- liftError :: Monad m => Either e a -> ExceptT e m a
- processDecl :: MonadState SEnv m => IDecl -> m (Resolve IDecl)
- resolveNav :: SEnv -> PExp -> Bool -> Resolve (PExp, [IClafer])
- mkPath :: Span -> SEnv -> (HowResolved, String, [IClafer]) -> (IExp, [IClafer])
- toTuple :: IClafer -> (String, Maybe IClafer)
- toNav' :: Span -> [(String, Maybe IClafer)] -> IExp
- adjustAncestor :: IClafer -> [(String, Maybe IClafer)] -> [(String, Maybe IClafer)] -> [(String, Maybe IClafer)]
- mkPath' :: Span -> String -> (HowResolved, String, [IClafer]) -> (IExp, [IClafer])
- resolveName :: Span -> SEnv -> String -> Resolve (HowResolved, String, [IClafer])
- resolveImmName :: Span -> SEnv -> String -> Resolve (HowResolved, String, [IClafer])
- resolve :: (Monad f, Functor f) => SEnv -> String -> [SEnv -> String -> f (Maybe b)] -> f b
- resolveNone :: Span -> SEnv -> String -> Resolve t
- resolveSpecial :: SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- resolveBind :: SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- resolveDescendants :: SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- resolveChildren :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- resolveReference :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- resolveChildren' :: Span -> SEnv -> String -> (SEnv -> [IClafer]) -> HowResolved -> Either ClaferSErr (Maybe (HowResolved, String, [IClafer]))
- liftMaybe :: Maybe a -> MaybeT (Either ClaferSErr) a
- resolveAncestor :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- resolveTopLevel :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer]))
- toNodeDeep :: SEnv -> ((IClafer, [IClafer]), [SEnv])
- allInhChildren :: SEnv -> [IClafer]
- allChildren :: SEnv -> [IClafer]
- selectChildren :: (IClafer -> [String]) -> SEnv -> [IClafer]
- findUnique :: Span -> String -> [(IClafer, [IClafer])] -> Resolve (Maybe (String, [IClafer]))
- findFirst :: String -> [(IClafer, [IClafer])] -> Maybe (String, [IClafer])
- showPath :: [String] -> String
- isNamespaceConflict :: [[String]] -> Bool
- filterPaths :: String -> [(IClafer, [IClafer])] -> [(IClafer, [IClafer])]
Documentation
this environment is created for each clafer
data HowResolved Source
How a given name was resolved
Special | "this", "parent", "dref", "root", and "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 |
type Resolve = Either ClaferSErr Source
isIEClafer :: IElement -> Bool Source
processDecl :: MonadState SEnv m => IDecl -> m (Resolve IDecl) Source
mkPath :: Span -> SEnv -> (HowResolved, String, [IClafer]) -> (IExp, [IClafer]) Source
Depending on how resolved construct a navigation path from 'context env'
adjustAncestor :: IClafer -> [(String, Maybe IClafer)] -> [(String, Maybe IClafer)] -> [(String, Maybe IClafer)] Source
resolveName :: Span -> SEnv -> String -> Resolve (HowResolved, String, [IClafer]) Source
resolveImmName :: Span -> SEnv -> String -> Resolve (HowResolved, String, [IClafer]) Source
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
resolveAncestor :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer])) Source
resolveTopLevel :: Span -> SEnv -> String -> Resolve (Maybe (HowResolved, String, [IClafer])) Source
allInhChildren :: SEnv -> [IClafer] Source
allChildren :: SEnv -> [IClafer] Source
findUnique :: Span -> String -> [(IClafer, [IClafer])] -> Resolve (Maybe (String, [IClafer])) Source
isNamespaceConflict :: [[String]] -> Bool Source