module Language.Alloy.Types (
AlloyInstance, AlloySig, Annotation (..),
Entries, Entry (..), Object (..), Relation (..), Signature (..),
) where
import Data.Map (Map)
import Data.Set (Set)
type AlloyInstance = Entries Map
type AlloySig = Entry Map Set
type Entries a = a Signature (Entry a Set)
data Signature = Signature {
scope :: Maybe String,
sigName :: String
} deriving (Eq, Ord, Show)
data Object =
Object {
objSig :: String,
identifier :: Int
}
| NumberObject {
number :: Int
}
| NamedObject {
objName :: String
} deriving (Eq, Ord, Show)
data Relation a =
EmptyRelation
| Single (a Object)
| Double (a (Object, Object))
| Triple (a (Object, Object, Object))
data Annotation = Skolem deriving (Eq, Show)
data Entry a b = Entry {
annotation :: Maybe Annotation,
relation :: a String (Relation b)
}