lambdacube-compiler-0.6.0.1: LambdaCube 3D is a DSL to program GPUs

Safe HaskellNone
LanguageHaskell2010

LambdaCube.Compiler.Patterns

Documentation

type PatList = ([ParPat_ ()], [(ParPat_ (), SExp)]) Source #

data Pat_ c Source #

Instances

Rearrange Pat Source # 

Methods

rearrange :: Int -> RearrangeFun -> Pat -> Pat Source #

PatVars Pat Source # 

Methods

getPVars :: Pat -> [SIName] Source #

PShow (Pat_ a) Source # 

Methods

pShow :: Pat_ a -> Doc Source #

SetSourceInfo (Pat_ c) Source # 

Methods

setSI :: SI -> Pat_ c -> Pat_ c Source #

SourceInfo (Pat_ c) Source # 

Methods

sourceInfo :: Pat_ c -> SI Source #

pattern ParPat :: forall t. [Pat_ t] -> ParPat_ t Source #

pattern PWildcard :: forall t. SI -> ParPat_ t Source #

pattern PCon :: forall t. (SIName, t) -> [ParPat_ t] -> Pat_ t Source #

pattern ViewPat :: forall t. SExp -> ParPat_ t -> Pat_ t Source #

pattern PatType :: forall t. ParPat_ t -> SExp -> Pat_ t Source #

pattern PVarSimp :: forall t. SIName -> ParPat_ t Source #

pattern PConSimp :: forall t. (SIName, t) -> [ParPat_ t] -> ParPat_ t Source #

pattern ViewPatSimp :: forall t. SExp -> ParPat_ t -> ParPat_ t Source #

pattern PatTypeSimp :: forall t. ParPat_ t -> SExp -> ParPat_ t Source #

pBuiltin :: FNameTag -> Either (d1, [(FNameTag, d)]) d2 -> [ParPat_ (Either (d1, [(SIName, d)]) d2)] -> ParPat_ (Either (d1, [(SIName, d)]) d2) Source #

cTrue :: (Num d, Num t) => ParPat_ (Either ((SName, t), [(SIName, d)]) d1) Source #

cZero :: (Num d, Num t) => ParPat_ (Either ((SName, t), [(SIName, d)]) d1) Source #

cNil :: (Num d, Num t) => ParPat_ (Either ((SName, t), [(SIName, d)]) d1) Source #

cHNil :: (Num d, Num t, IsString t1) => ParPat_ (Either ((t1, t), [(SIName, d)]) d1) Source #

cList :: Num d2 => ParPat_ (Either (d1, [(SIName, d)]) d2) -> ParPat_ (Either (d1, [(SIName, d)]) d2) Source #

cHList :: Num d2 => ParPat_ (Either (d1, [(SIName, d)]) d2) -> ParPat_ (Either (d1, [(SIName, d)]) d2) Source #

cSucc :: (Num d, Num t) => ParPat_ (Either ((SName, t), [(SIName, d)]) d1) -> ParPat_ (Either ((SName, t), [(SIName, d)]) d1) Source #

cCons :: (Num d, Num t) => ParPat_ (Either ((SName, t), [(SIName, d)]) d1) -> ParPat_ (Either ((SName, t), [(SIName, d)]) d1) -> ParPat_ (Either ((SName, t), [(SIName, d)]) d1) Source #

cHCons :: (Num d, Num t, IsString t1) => ParPat_ (Either ((t1, t), [(SIName, d)]) d1) -> ParPat_ (Either ((t1, t), [(SIName, d)]) d1) -> ParPat_ (Either ((t1, t), [(SIName, d)]) d1) Source #

pattern PParens :: forall t. ParPat_ t -> ParPat_ t Source #

mapP :: (Int -> SExp -> SExp) -> Int -> Pat -> Pat Source #

upPats :: PatVars a => (Int -> a -> t) -> Int -> [a] -> [t] Source #

class PatVars a where Source #

Minimal complete definition

getPVars

Methods

getPVars :: a -> [SIName] Source #

Instances

PatVars ParPat Source # 

Methods

getPVars :: ParPat -> [SIName] Source #

PatVars Pat Source # 

Methods

getPVars :: Pat -> [SIName] Source #

PatVars a => PatVars [a] Source # 

Methods

getPVars :: [a] -> [SIName] Source #

patVars :: PatVars a => a -> Int Source #

lLet :: Rearrange a => SIName -> SExp' Void -> Lets a -> Lets a Source #

foldLets :: (t1 -> t) -> Lets t1 -> t Source #

mapLets :: Num t1 => (t1 -> SExp -> SExp) -> (t1 -> t -> a) -> t1 -> Lets t -> Lets a Source #

mapGT :: (Int -> ParPat -> ParPat) -> (Int -> SExp -> SExp) -> Int -> GuardTree -> GuardTree Source #

pattern Otherwise :: forall t. SExp' t Source #

buildNode :: (Rearrange t1, Rearrange b, PatVars t1) => (t1 -> SExp' t -> b -> b) -> Int -> [t1] -> [Int] -> b -> b Source #