Copyright | (c) Fontaine 2008 |
---|---|
License | BSD |
Maintainer | fontaine@cs.uni-duesseldorf.de |
Stability | experimental |
Portability | GHC-only |
Safe Haskell | None |
Language | Haskell2010 |
Some Utilities
- eitherToExc :: Exception a => Either a b -> IO b
- handleLexError :: (LexError -> IO a) -> IO a -> IO a
- handleParseError :: (ParseError -> IO a) -> IO a -> IO a
- handleRenameError :: (RenameError -> IO a) -> IO a -> IO a
- parseFile :: FilePath -> IO ModuleFromParser
- benchmarkFrontend :: FilePath -> IO (ModuleFromParser, ModuleFromRenaming)
- parseString :: String -> IO ModuleFromParser
Documentation
eitherToExc :: Exception a => Either a b -> IO b Source
"eitherToExe" returns the Right part of Either or throws the Left part as an dynamic exception.
handleLexError :: (LexError -> IO a) -> IO a -> IO a Source
Handle a dymanic exception of type LexError.
handleParseError :: (ParseError -> IO a) -> IO a -> IO a Source
Handle a dymanic exception of type ParseError.
handleRenameError :: (RenameError -> IO a) -> IO a -> IO a Source
Handle a dymanic exception of type RenameError.
parseFile :: FilePath -> IO ModuleFromParser Source
Lex and parse a file and return a LModule, throw an exception in case of an error
benchmarkFrontend :: FilePath -> IO (ModuleFromParser, ModuleFromRenaming) Source
Lex and parse File. | Return the module and print some timing infos
parseString :: String -> IO ModuleFromParser Source
Small test function which just parses a String.