| Copyright | (c) James Alexander Feldman-Crough 2019 |
|---|---|
| License | MPL-2.0 |
| Maintainer | alex@fldcr.com |
| Safe Haskell | None |
| Language | Haskell2010 |
Prosidy.Parse
Description
Synopsis
- parseDocument :: FilePath -> Text -> Either Failure Document
- parseDocumentMetadata :: FilePath -> Text -> Either Failure Metadata
- readDocument :: FilePath -> IO Document
- readDocumentMetadata :: FilePath -> IO Metadata
- newtype Failure = Failure (ParseErrorBundle Text Void)
- prettyFailure :: Failure -> String
Parsing Prosidy types from Text
Reading & parsing Prosidy files
readDocument :: FilePath -> IO Document Source #
Reads a Prosidy Document from the given FilePath.
Errors will be thrown as exceptions. Use parseDocument for a pure
implementation.
readDocumentMetadata :: FilePath -> IO Metadata Source #
Reads a Prosidy document's Metadata header from the given FilePath.
Errors will be thrown as exceptions. Use parseDocumentMetadata for a pure
implementation.
Errors
A parsing error.
Constructors
| Failure (ParseErrorBundle Text Void) |
Instances
| Show Failure Source # | |
| Exception Failure Source # | |
Defined in Prosidy.Parse Methods toException :: Failure -> SomeException # fromException :: SomeException -> Maybe Failure # displayException :: Failure -> String # | |