cubix
Safe HaskellNone
LanguageHaskell2010

Cubix.ParsePretty

Synopsis

Documentation

class ParseFile (fs :: Signature) where Source #

Methods

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".

Instances

Instances details
ParseFile MCSig Source # 
Instance details

Defined in Cubix.ParsePretty

ParseFile MJavaSig Source # 
Instance details

Defined in Cubix.ParsePretty

ParseFile MJSSig Source # 
Instance details

Defined in Cubix.ParsePretty

ParseFile MLuaSig Source # 
Instance details

Defined in Cubix.ParsePretty

ParseFile MPythonSig Source # 
Instance details

Defined in Cubix.ParsePretty

class ParseFile fs => ParseFileTrackSources (fs :: Signature) where Source #

Methods

parseFileTrackSources :: FilePath -> IO (Maybe (AnnTerm (Maybe SourceSpan) fs (RootSort fs))) Source #

Parses a file with the appropriate parser for the language with signature fs, tracking source positions of many nodes. (Which depends on the language frontend)

Recommended to use with the TypeApplications extension, e.g.: parseFileTrackSources @MCSig "my_file.c".

class Pretty (fs :: Signature) where Source #

Minimal complete definition

pretty

Methods

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 #

default prettyUnsafe :: DynCase (Term fs) (RootSort fs) => Term fs l -> String Source #

parseLua :: FilePath -> IO (Maybe (MLuaTerm LBlockL)) Source #

NOTE: This reflects the half-finished transition of Lua to annotated terms

type family RootSort (fs :: [(Type -> Type) -> Type -> Type]) Source #

Instances

Instances details
type RootSort MCSig Source # 
Instance details

Defined in Cubix.ParsePretty

type RootSort MJavaSig Source # 
Instance details

Defined in Cubix.ParsePretty

type RootSort MJSSig Source # 
Instance details

Defined in Cubix.ParsePretty

type RootSort MLuaSig Source # 
Instance details

Defined in Cubix.ParsePretty

type RootSort MPythonSig Source # 
Instance details

Defined in Cubix.ParsePretty