AspectAG-0.6.0.0: Strongly typed Attribute Grammars implemented using type-level programming.

Copyright(c) Juan García Garland
LicenseGPL
Maintainerjpgarcia@fing.edu.uy
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Language.Grammars.AspectAG.TH

Contents

Description

 
Synopsis

Attribute labels

str2Sym :: String -> TypeQ Source #

makes a type level lit (Symbol) from a String

attLabel :: String -> Name -> DecsQ Source #

TH function to define a typed attribute label given a name and a quoted type

attMono :: String -> Name -> DecsQ Source #

for completness, to have a name as the next one

attPoly :: String -> DecsQ Source #

TH function to define a polymorphic attribute

attLabels :: [(String, Name)] -> Q [Dec] Source #

multiple monomorphic attributes at once

Non terminals

addNont :: String -> Q [Dec] Source #

add a non terminal symbol

Productions

type family Terminal s :: Either NT T where ... Source #

Equations

Terminal s = Right (T s) 

type family NonTerminal s where ... Source #

Equations

NonTerminal s = Left s 

data SymTH Source #

Constructors

Ter Name 
NonTer Name 
Poly 

addPrd :: String -> Name -> Q [Dec] Source #

only prod symbol

addPrdType :: Monad m => [Char] -> Name -> m [Dec] Source #

addProd :: String -> Name -> [(String, SymTH)] -> Q [Dec] Source #

Productions

class Prods (lhs :: NT) (name :: Symbol) (rhs :: [(Symbol, Symbol)]) Source #

class

addInstance :: Name -> String -> [(Name, Name)] -> Q [Dec] Source #

mkBangP :: (a, Name) -> (Bang, Type) Source #

mkBangPR :: (a, Name) -> (a, Bang, Type) Source #

getTListNT :: Type -> [(Name, Name)] Source #

keeps nt info

mkClause :: InstanceDec -> Clause Source #

like |mkCon| in semantic functions, builds a case