Copyright | (c) Dominik Dietrich DFKI Bremen 2010 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | dominik.dietrich@dfki.de |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Types and functions for EnCL logic signatures
Synopsis
- data Sign = Sign (Map Token OpType) (Map Token (Maybe APInt)) (Map Token EPDecl)
- opIds :: Sign -> Set Id
- data OpType = OpType {
- opArity :: Int
- pretty :: Pretty a => a -> Doc
- isLegalSignature :: Sign -> Bool
- addToSig :: Sign -> Token -> OpType -> Sign
- unite :: Sign -> Sign -> Sign
- emptySig :: Sign
- isSubSigOf :: Sign -> Sign -> Bool
- sigDiff :: Sign -> Sign -> Sign
- sigUnion :: Sign -> Sign -> Result Sign
- lookupSym :: Sign -> Id -> Bool
- optypeFromArity :: Int -> OpType
- addEPDefValToSig :: Sign -> Token -> APInt -> Sign
- addEPDeclToSig :: Sign -> Token -> EPDomain -> Sign
- addEPDomVarDeclToSig :: Sign -> Token -> APInt -> Sign
Documentation
Datatype for EnCL Signatures Signatures are just sets of Tokens for the operators
Instances
Instances
Eq OpType Source # | |
Data OpType Source # | |
Defined in CSL.Sign gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OpType -> c OpType gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OpType dataTypeOf :: OpType -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c OpType) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OpType) gmapT :: (forall b. Data b => b -> b) -> OpType -> OpType gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OpType -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OpType -> r gmapQ :: (forall d. Data d => d -> u) -> OpType -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> OpType -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> OpType -> m OpType gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OpType -> m OpType gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OpType -> m OpType | |
Ord OpType Source # | |
Show OpType Source # | |
Generic OpType | |
FromJSON OpType | |
Defined in CSL.ATC_CSL parseJSON :: Value -> Parser OpType parseJSONList :: Value -> Parser [OpType] | |
ToJSON OpType | |
Defined in CSL.ATC_CSL toEncoding :: OpType -> Encoding toJSONList :: [OpType] -> Value toEncodingList :: [OpType] -> Encoding | |
ShATermConvertible OpType | |
Defined in CSL.ATC_CSL toShATermAux :: ATermTable -> OpType -> IO (ATermTable, Int) toShATermList' :: ATermTable -> [OpType] -> IO (ATermTable, Int) fromShATermAux :: Int -> ATermTable -> (ATermTable, OpType) fromShATermList' :: Int -> ATermTable -> (ATermTable, [OpType]) | |
type Rep OpType | |
Defined in CSL.ATC_CSL type Rep OpType = D1 ('MetaData "OpType" "CSL.Sign" "main" 'False) (C1 ('MetaCons "OpType" 'PrefixI 'True) (S1 ('MetaSel ('Just "opArity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) |
isLegalSignature :: Sign -> Bool Source #
determines whether a signature is valid. all sets are ok, so glued to true
addToSig :: Sign -> Token -> OpType -> Sign Source #
Basic function to extend a given signature by adding an item (id) to it
isSubSigOf :: Sign -> Sign -> Bool Source #
Determines if sig1 is subsignature of sig2
sigUnion :: Sign -> Sign -> Result Sign Source #
union of Signatures or do I have to care about more things here?
optypeFromArity :: Int -> OpType Source #