hasktorch-codegen-0.0.1.1: Code generation tools for Hasktorch

Safe HaskellNone
LanguageHaskell2010

CodeGen.Parse

Synopsis

Documentation

genericParsers :: forall x. [x] -> (x -> Parsable) -> (x -> Text) -> Parser Parsable Source #

build a parser that will try to find the double-pointer- or pointer- variant first.

typeParser :: (x -> Text) -> x -> Parser x Source #

forLibraries :: (LibType -> Parser x) -> Parser x Source #

parse a library-dependent parser across all of our supported libraries

comment :: Parser () Source #

skip over a _single-line_ of block comment -- something which seems standard in the libTH.

parser :: Parser [Maybe Function] Source #

run a parser to find all possible functions, returning one maybe type per-line.

constant :: Parser (Maybe Function) Source #

returns a Maybe Function because we actually don't care about constants when generating FFI code.

skip :: Parser (Maybe Function) Source #

Skip a line because we have failed to find a function