futhark-0.25.32: An optimising compiler for a functional, array-oriented language.
Safe HaskellNone
LanguageGHC2021

Futhark.CodeGen.Backends.GenericPython.AST

Documentation

data PyExp Source #

Constructors

Integer Integer 
Bool Bool 
Float Double 
String Text 
RawStringLiteral Text 
Var String 
BinOp String PyExp PyExp 
UnOp String PyExp 
Cond PyExp PyExp PyExp 
Index PyExp PyIdx 
Call PyExp [PyArg] 
Tuple [PyExp] 
List [PyExp] 
Field PyExp String 
Dict [(PyExp, PyExp)] 
Lambda String PyExp 
None 

Instances

Instances details
Show PyExp Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyExp -> ShowS

show :: PyExp -> String

showList :: [PyExp] -> ShowS

Eq PyExp Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyExp -> PyExp -> Bool

(/=) :: PyExp -> PyExp -> Bool

Pretty PyExp Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyExp -> Doc ann Source #

prettyList :: [PyExp] -> Doc ann Source #

data PyIdx Source #

Instances

Instances details
Show PyIdx Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyIdx -> ShowS

show :: PyIdx -> String

showList :: [PyIdx] -> ShowS

Eq PyIdx Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyIdx -> PyIdx -> Bool

(/=) :: PyIdx -> PyIdx -> Bool

Pretty PyIdx Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyIdx -> Doc ann Source #

prettyList :: [PyIdx] -> Doc ann Source #

data PyArg Source #

Constructors

ArgKeyword String PyExp 
Arg PyExp 

Instances

Instances details
Show PyArg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyArg -> ShowS

show :: PyArg -> String

showList :: [PyArg] -> ShowS

Eq PyArg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyArg -> PyArg -> Bool

(/=) :: PyArg -> PyArg -> Bool

Pretty PyArg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyArg -> Doc ann Source #

prettyList :: [PyArg] -> Doc ann Source #

data PyStmt Source #

Instances

Instances details
Show PyStmt Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyStmt -> ShowS

show :: PyStmt -> String

showList :: [PyStmt] -> ShowS

Eq PyStmt Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyStmt -> PyStmt -> Bool

(/=) :: PyStmt -> PyStmt -> Bool

Pretty PyStmt Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyStmt -> Doc ann Source #

prettyList :: [PyStmt] -> Doc ann Source #

MonadWriter [PyStmt] (CompilerM op s) 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython

Methods

writer :: (a, [PyStmt]) -> CompilerM op s a

tell :: [PyStmt] -> CompilerM op s ()

listen :: CompilerM op s a -> CompilerM op s (a, [PyStmt])

pass :: CompilerM op s (a, [PyStmt] -> [PyStmt]) -> CompilerM op s a

newtype PyProg Source #

Constructors

PyProg [PyStmt] 

Instances

Instances details
Show PyProg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyProg -> ShowS

show :: PyProg -> String

showList :: [PyProg] -> ShowS

Eq PyProg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyProg -> PyProg -> Bool

(/=) :: PyProg -> PyProg -> Bool

Pretty PyProg Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyProg -> Doc ann Source #

prettyList :: [PyProg] -> Doc ann Source #

data PyExcept Source #

Constructors

Catch PyExp [PyStmt] 

Instances

Instances details
Show PyExcept Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyExcept -> ShowS

show :: PyExcept -> String

showList :: [PyExcept] -> ShowS

Eq PyExcept Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyExcept -> PyExcept -> Bool

(/=) :: PyExcept -> PyExcept -> Bool

Pretty PyExcept Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyExcept -> Doc ann Source #

prettyList :: [PyExcept] -> Doc ann Source #

data PyFunDef Source #

Constructors

Def String [String] [PyStmt] 

Instances

Instances details
Show PyFunDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyFunDef -> ShowS

show :: PyFunDef -> String

showList :: [PyFunDef] -> ShowS

Eq PyFunDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyFunDef -> PyFunDef -> Bool

(/=) :: PyFunDef -> PyFunDef -> Bool

Pretty PyFunDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

pretty :: PyFunDef -> Doc ann Source #

prettyList :: [PyFunDef] -> Doc ann Source #

data PyClassDef Source #

Constructors

Class String [PyStmt] 

Instances

Instances details
Show PyClassDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

showsPrec :: Int -> PyClassDef -> ShowS

show :: PyClassDef -> String

showList :: [PyClassDef] -> ShowS

Eq PyClassDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST

Methods

(==) :: PyClassDef -> PyClassDef -> Bool

(/=) :: PyClassDef -> PyClassDef -> Bool

Pretty PyClassDef Source # 
Instance details

Defined in Futhark.CodeGen.Backends.GenericPython.AST