Safe Haskell | None |
---|---|
Language | Haskell2010 |
Names and qualified names.
Synopsis
- data NamePart
- newtype Name = Name {}
- data QName where
- nameIds :: Name -> [String]
- stripPrefix :: QName -> QName -> Maybe QName
- fromName :: Name -> Maybe Name
- fromNameRange :: Name -> Maybe (Range, Name)
- fromQName :: QName -> Maybe QName
- fromQNameRange :: QName -> Maybe (Range, QName)
- fromAsName :: AsName -> Maybe Name
- fromModuleName :: TopLevelModuleName -> Maybe QName
- toName :: Name -> Name
- toQName :: QName -> QName
- qNamePath :: QName -> FilePath
- pathQName :: FilePath -> FilePath -> Maybe QName
- matchOperators :: [String] -> [Name] -> [Name]
Definitions
Mixfix identifiers are composed of words and holes,
e.g. _+_
or if_then_else_
or [_/_]
.
Instances
Eq NamePart | |
Data NamePart | |
Defined in Agda.Syntax.Concrete.Name gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NamePart -> c NamePart # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NamePart # toConstr :: NamePart -> Constr # dataTypeOf :: NamePart -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NamePart) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NamePart) # gmapT :: (forall b. Data b => b -> b) -> NamePart -> NamePart # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NamePart -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NamePart -> r # gmapQ :: (forall d. Data d => d -> u) -> NamePart -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> NamePart -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NamePart -> m NamePart # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NamePart -> m NamePart # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NamePart -> m NamePart # | |
Ord NamePart | |
Defined in Agda.Syntax.Concrete.Name | |
Show NamePart | |
Generic NamePart | |
Pretty NamePart | |
Defined in Agda.Syntax.Concrete.Name | |
NFData NamePart | |
Defined in Agda.Syntax.Concrete.Name | |
NumHoles [NamePart] | |
Defined in Agda.Syntax.Concrete.Name | |
type Rep NamePart | |
Defined in Agda.Syntax.Concrete.Name type Rep NamePart = D1 ('MetaData "NamePart" "Agda.Syntax.Concrete.Name" "Agda-2.6.1.3-2WluKmOFu84Cr2Fuyr5biZ" 'False) (C1 ('MetaCons "Hole" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Id" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RawName))) |
An unqualified name, represented as a list of name parts.
Interface
If the first module name is a prefix of the second module name, then strip
the prefix, otherwise return Nothing
.
Conversion
fromModuleName :: TopLevelModuleName -> Maybe QName Source #
Conversion from Agda top level module name type.
Paths
Convert a FilePath
to a module name.