| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Termtab.Parser.Common
Description
Entry point for loading a Song from disk. Dispatches to a
format-specific parser (Termtab.Parser.MIDI, Termtab.Parser.GP5) by
file extension, so callers don't need to know which parser handles which
format.
Documentation
parseFile :: FilePath -> IO (Either ParseError Song) Source #
Parse path into a Song using the parser selected by its file
extension (.mid/.midi -> parseMidi, .gp5 -> parseGP5).
Recognized-but-unimplemented Guitar Pro extensions (.gp3, .gp4,
.gpx, .gp) and unknown extensions both fail with
ParseErrorUnsupported rather than being attempted.