Copyright | (c) Christian Maeder DFKI GmbH 2008 |
---|---|
License | GPLv2 or higher, see LICENSE.txt |
Maintainer | Christian.Maeder@dfki.de |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Abstract syntax of HetCASL/DOL specification library names. Follows Sect. II:2.2.5 of the CASL Reference Manual and 9.7 of the OMG standard DOL.
Synopsis
- data LibName = LibName {
- getLibId :: IRI
- locIRI :: Maybe IRI
- mimeType :: Maybe String
- libVersion :: Maybe VersionNumber
- data VersionNumber = VersionNumber [String] Range
- isQualNameFrom :: SIMPLE_ID -> LibName -> Id -> Bool
- isQualName :: Id -> Bool
- mkQualName :: SIMPLE_ID -> LibName -> Id -> Id
- unQualName :: Id -> Id
- setFilePath :: FilePath -> LibName -> LibName
- libToFileName :: LibName -> FilePath
- libToString :: LibName -> String
- getFilePath :: LibName -> FilePath
- iriLibName :: IRI -> LibName
- filePathToLibId :: FilePath -> IRI
- emptyLibName :: String -> LibName
- convertFileToLibStr :: FilePath -> String
- mkLibStr :: String -> String
- setMimeType :: Maybe String -> LibName -> LibName
- mkLibName :: IRI -> Maybe VersionNumber -> LibName
- libNameToId :: LibName -> Id
Documentation
LibName | |
|
Instances
Eq LibName Source # | |
Data LibName Source # | |
Defined in Common.LibName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LibName -> c LibName gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LibName dataTypeOf :: LibName -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LibName) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LibName) gmapT :: (forall b. Data b => b -> b) -> LibName -> LibName gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LibName -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LibName -> r gmapQ :: (forall d. Data d => d -> u) -> LibName -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> LibName -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> LibName -> m LibName gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LibName -> m LibName gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LibName -> m LibName | |
Ord LibName Source # | |
Show LibName Source # | |
Generic LibName | |
GetRange LibName Source # | |
FromJSON LibName | |
Defined in ATC.LibName parseJSON :: Value -> Parser LibName parseJSONList :: Value -> Parser [LibName] | |
ToJSON LibName | |
Defined in ATC.LibName toEncoding :: LibName -> Encoding toJSONList :: [LibName] -> Value toEncodingList :: [LibName] -> Encoding | |
ShATermConvertible LibName | |
Defined in ATC.LibName toShATermAux :: ATermTable -> LibName -> IO (ATermTable, Int) toShATermList' :: ATermTable -> [LibName] -> IO (ATermTable, Int) fromShATermAux :: Int -> ATermTable -> (ATermTable, LibName) fromShATermList' :: Int -> ATermTable -> (ATermTable, [LibName]) | |
Pretty LibName Source # | |
ATermConvertibleSML LibName Source # | |
Defined in ATC.Sml_cats from_sml_ShATerm :: ATermTable -> LibName from_sml_ShATermList :: ATermTable -> [LibName] | |
type Rep LibName | |
Defined in ATC.LibName type Rep LibName = D1 ('MetaData "LibName" "Common.LibName" "main" 'False) (C1 ('MetaCons "LibName" 'PrefixI 'True) ((S1 ('MetaSel ('Just "getLibId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 IRI) :*: S1 ('MetaSel ('Just "locIRI") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe IRI))) :*: (S1 ('MetaSel ('Just "mimeType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe String)) :*: S1 ('MetaSel ('Just "libVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe VersionNumber))))) |
data VersionNumber Source #
VersionNumber [String] Range |
Instances
Data VersionNumber Source # | |
Defined in Common.LibName gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> VersionNumber -> c VersionNumber gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c VersionNumber toConstr :: VersionNumber -> Constr dataTypeOf :: VersionNumber -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c VersionNumber) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c VersionNumber) gmapT :: (forall b. Data b => b -> b) -> VersionNumber -> VersionNumber gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> VersionNumber -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> VersionNumber -> r gmapQ :: (forall d. Data d => d -> u) -> VersionNumber -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> VersionNumber -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> VersionNumber -> m VersionNumber gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> VersionNumber -> m VersionNumber gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> VersionNumber -> m VersionNumber | |
Generic VersionNumber | |
Defined in ATC.LibName type Rep VersionNumber :: Type -> Type from :: VersionNumber -> Rep VersionNumber x to :: Rep VersionNumber x -> VersionNumber | |
FromJSON VersionNumber | |
Defined in ATC.LibName parseJSON :: Value -> Parser VersionNumber parseJSONList :: Value -> Parser [VersionNumber] | |
ToJSON VersionNumber | |
Defined in ATC.LibName toJSON :: VersionNumber -> Value toEncoding :: VersionNumber -> Encoding toJSONList :: [VersionNumber] -> Value toEncodingList :: [VersionNumber] -> Encoding | |
ShATermConvertible VersionNumber | |
Defined in ATC.LibName toShATermAux :: ATermTable -> VersionNumber -> IO (ATermTable, Int) toShATermList' :: ATermTable -> [VersionNumber] -> IO (ATermTable, Int) fromShATermAux :: Int -> ATermTable -> (ATermTable, VersionNumber) fromShATermList' :: Int -> ATermTable -> (ATermTable, [VersionNumber]) | |
ATermConvertibleSML VersionNumber Source # | |
Defined in ATC.Sml_cats from_sml_ShATerm :: ATermTable -> VersionNumber from_sml_ShATermList :: ATermTable -> [VersionNumber] | |
type Rep VersionNumber | |
Defined in ATC.LibName type Rep VersionNumber = D1 ('MetaData "VersionNumber" "Common.LibName" "main" 'False) (C1 ('MetaCons "VersionNumber" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range))) |
isQualName :: Id -> Bool Source #
unQualName :: Id -> Id Source #
setFilePath :: FilePath -> LibName -> LibName Source #
insert file name as location IRI
libToFileName :: LibName -> FilePath Source #
interpret library IRI as file path
libToString :: LibName -> String Source #
interpret library IRI as path. Uses CURIE if available.
getFilePath :: LibName -> FilePath Source #
extract location IRI as file name
iriLibName :: IRI -> LibName Source #
filePathToLibId :: FilePath -> IRI Source #
use file name as library IRI
emptyLibName :: String -> LibName Source #
convertFileToLibStr :: FilePath -> String Source #
setMimeType :: Maybe String -> LibName -> LibName Source #
insert optional mime type
libNameToId :: LibName -> Id Source #