Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Utilities related to the parsing and printing of names using the default syntax.
Synopsis
- parseText :: Text -> Maybe Name
- parseTextEither :: Text -> Either Text Name
- unsafeParseText :: HasCallStack => Text -> Name
- toText :: Name -> Text
- unsafeParseVar :: Var v => v -> Name
- parseVar :: Var v => v -> Maybe Name
- toVar :: Var v => Name -> v
- nameP :: Monad m => ParsecT (Token ParseErr) [Char] m Name
- relativeNameP :: forall m. Monad m => ParsecT (Token ParseErr) [Char] m Name
- isSymboly :: Name -> Bool
String conversions
unsafeParseText :: HasCallStack => Text -> Name Source #
Unsafely parse a name from a string literal.
unsafeParseVar :: Var v => v -> Name Source #
Unsafely parse a name from a var, by first rendering the var as a string.
See unsafeFromText
.
parseVar :: Var v => v -> Maybe Name Source #
Parse a name from a var, by first rendering the var as a string.
toVar :: Var v => Name -> v Source #
Convert a name to a string representation, then parse that as a var.
Name parsers
relativeNameP :: forall m. Monad m => ParsecT (Token ParseErr) [Char] m Name Source #
A relative name parser.