Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module defines custom types for defining names of various syntax terms.
These types are all instances of IsString
. For easier use,
we recommend enabling the OverloadedStrings
extension.
Synopsis
- data RdrNameStr
- data OccNameStr
- newtype ModuleNameStr = ModuleNameStr {}
- qual :: ModuleNameStr -> OccNameStr -> RdrNameStr
- unqual :: OccNameStr -> RdrNameStr
Documentation
data RdrNameStr Source #
A string identifier which may be qualified to a particular module.
For example:
fromString "A.b.c" == RawQual (fromString "A.b") (fromString "c") fromString "c" == RawUnqual (fromString "c")
This definition is simililar to RdrName
, but independent of whether it's
in the type or value namespace. Functions in this package that take
a RdrName
as input will internally convert it to the proper namespace.
Instances
IsString RdrNameStr Source # | |
Defined in GHC.SourceGen.Name.Internal fromString :: String -> RdrNameStr # |
data OccNameStr Source #
A string identifier. This definition is simililar to RdrName
, but
independent of whether it's in the type or value namespace.
Instances
IsString OccNameStr Source # | |
Defined in GHC.SourceGen.Name.Internal fromString :: String -> OccNameStr # |
newtype ModuleNameStr Source #
A newtype wrapper around ModuleName
which is an instance of IsString
.
Instances
IsString ModuleNameStr Source # | |
Defined in GHC.SourceGen.Name.Internal fromString :: String -> ModuleNameStr # |
qual :: ModuleNameStr -> OccNameStr -> RdrNameStr Source #
unqual :: OccNameStr -> RdrNameStr Source #