Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class ParseFile fs where
- class Pretty fs where
- parseLua :: FilePath -> IO (Maybe (MLuaTerm LBlockL))
- prettyLua :: MLuaTerm LBlockL -> String
- parseC :: FilePath -> IO (Maybe (MCTerm CTranslationUnitL))
- parseJava :: FilePath -> IO (Maybe (MJavaTerm CompilationUnitL))
- parseJavaScript :: FilePath -> IO (Maybe (MJSTerm JSASTL))
- parsePython :: FilePath -> IO (Maybe (MPythonTerm ModuleL))
- prettyC :: MCTerm CTranslationUnitL -> String
- prettyJava :: MJavaTerm CompilationUnitL -> String
- prettyJavaScript :: MJSTerm JSASTL -> String
- prettyPython :: MPythonTerm ModuleL -> String
Documentation
class ParseFile fs where Source #
parseFile :: FilePath -> IO (Maybe (Term fs (RootSort fs))) Source #
Parses a file with the appropriate parser for the language with signature fs
.
Recommended to use with the TypeApplications
extension,
e.g.: parseFile @MCSig "my_file.c"
.
class Pretty fs where Source #
pretty :: Term fs (RootSort fs) -> String Source #
Pretty-prints a term, using the appropriate pretty-printer for the language with
signature fs
.
prettyUnsafe :: Term fs l -> String Source #
parseLua :: FilePath -> IO (Maybe (MLuaTerm LBlockL)) Source #
NOTE: This reflects the half-finished transition of Lua to annotated terms
parsePython :: FilePath -> IO (Maybe (MPythonTerm ModuleL)) Source #
prettyPython :: MPythonTerm ModuleL -> String Source #