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

Safe HaskellNone

Language.Clafer.Intermediate.Analysis

Synopsis

Documentation

newtype AnalysisT m a Source

Constructors

AnalysisT (ReaderT Info m a) 

Instances

MonadTrans AnalysisT 
MonadError e m => MonadError e (AnalysisT m) 
Monad m => MonadReader Info (AnalysisT m) 
MonadState s m => MonadState s (AnalysisT m) 
Monad m => Monad (AnalysisT m) 
Functor m => Functor (AnalysisT m) 
MonadPlus m => MonadPlus (AnalysisT m) 
Applicative m => Applicative (AnalysisT m) 
(Monad m, Functor m) => MonadAnalysis (AnalysisT m) 

data SSuper Source

Constructors

Ref String 
Colon String 

Instances

Show SSuper 

data SClafer Source

Easier to work with. IClafers have links from parents to children. SClafers have links from children to parent.

Constructors

SClafer 

Fields

uid :: String
 
origUid :: String
 
isAbstract :: Bool
 
low :: Integer
 
high :: Integer
 
groupLow :: Integer
 
groupHigh :: Integer
 
parent :: Maybe String
 
super :: Maybe SSuper
 
constraints :: [PExp]
 

data Info Source

Constructors

Info 

Fields

sclafers :: [SClafer]
 

Instances

Show Info 
Monad m => MonadReader Info (AnalysisT m) 

parentUid :: Monad m => SClafer -> m StringSource

parentOf :: (Uidable c, MonadAnalysis m) => c -> m cSource

parentsOf :: (Uidable c, MonadAnalysis m) => c -> m [c]Source

ancestorsOf :: (Uidable c, MonadAnalysis m) => c -> m [c]Source

refUid :: Monad m => SClafer -> m StringSource

refOf :: (Uidable c, MonadAnalysis m) => c -> m cSource

refsOf :: (Uidable c, MonadAnalysis m) => c -> m [c]Source

colonUid :: (Uidable c, MonadAnalysis m) => c -> m StringSource

colonOf :: (Uidable c, MonadAnalysis m) => c -> m cSource

colonsOf :: (Uidable c, MonadAnalysis m) => c -> m [c]Source

colonsTo :: (Uidable c, MonadAnalysis m) => c -> m [c]Source

hierarchy :: (Uidable c, MonadAnalysis m) => c -> m [c]Source

isDirectChild :: (Uidable c, MonadAnalysis m) => c -> c -> m BoolSource

isIndirectChild :: (Uidable c, MonadAnalysis m) => c -> c -> m BoolSource

isChild :: (Uidable c, MonadAnalysis m) => c -> c -> m BoolSource

class Matchable c => Uidable c whereSource

Methods

toClafer :: MonadAnalysis m => c -> m SClaferSource

fromClafer :: MonadAnalysis m => SClafer -> m cSource

toUid :: MonadAnalysis m => c -> m StringSource

fromUid :: MonadAnalysis m => String -> m cSource

Instances

data Anything Source

Constructors

Anything 

Instances

class Matchable u whereSource

Methods

matches :: u -> SClafer -> BoolSource

(|^) :: (MonadAnalysis m, Matchable a, Matchable b) => a -> b -> m [(SClafer, SClafer)]Source

(|->) :: (MonadAnalysis m, Matchable a, Matchable b) => a -> b -> m [(SClafer, SClafer)]Source

(|:) :: (MonadAnalysis m, Matchable a, Matchable b) => a -> b -> m [(SClafer, SClafer)]Source

rootUid :: StringSource

liftMaybe :: Monad m => Maybe a -> MaybeT m aSource

liftList :: Monad m => [a] -> ListT m aSource

runListT_ :: Monad m => ListT m a -> m ()Source

foreach :: m [a] -> ListT m aSource

foreachM :: Monad m => [a] -> ListT m aSource

subClafers :: (a, b) -> aSource

superClafers :: (a, b) -> bSource

findAll :: Monad m => m a -> ListT m aSource

select :: Monad m => m [a] -> (a -> b) -> m [b]Source

suchThat :: Monad m => m [a] -> (a -> Bool) -> m [a]Source

concatMapM :: Monad m => (a -> m [b]) -> [a] -> m [b]Source

whenM :: Monad m => m Bool -> m () -> m ()Source

unlessM :: Monad m => m Bool -> m () -> m ()Source

fromMaybeT :: Monad m => a -> MaybeT m a -> m aSource

mapMaybeT :: (m1 (Maybe a1) -> m (Maybe a)) -> MaybeT m1 a1 -> MaybeT m aSource

mapVSupplyT :: (Monad m, Monad m1) => (m1 a1 -> m a) -> VSupplyT m1 a1 -> VSupplyT m aSource

mapLeft :: (t -> a) -> Either t b -> Either a bSource

mapRight :: (t -> b) -> Either a t -> Either a bSource

(<:>) :: Monad m => m a -> m [a] -> m [a]Source

testing :: Eq b => (a -> b) -> a -> a -> BoolSource

comparing :: Ord b => (a -> b) -> a -> a -> OrderingSource

syntaxOf :: PExp -> StringSource

combine :: Ord a => [(a, b)] -> [(a, [b])]Source

sameAs :: PExp -> PExp -> BoolSource