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 #

makes a type level lit (Symbol) from a String

attLabel :: String -> Name -> DecsQ #

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

attMono :: String -> Name -> DecsQ #

for completness, to have a name as the next one

attPoly :: String -> DecsQ #

TH function to define a polymorphic attribute

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

multiple monomorphic attributes at once

Non terminals

addNont :: String -> Q [Dec] #

add a non terminal symbol

Productions

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

Equations

Terminal s = Right (T s) 

type family NonTerminal s where ... #

Equations

NonTerminal s = Left s 

data SymTH #

Constructors

Ter Name 
NonTer Name 
Poly 

addChi :: String -> Name -> SymTH -> Q [Dec] #

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

only prod symbol

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

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

Productions

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

class

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

typeList :: [(Name, Name)] -> Q Type #

nameToSymbol :: Show a => a -> TypeQ #

closeNT :: Name -> Q [Dec] #

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

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

getTList :: Type -> [(Name, Name)] #

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

keeps nt info

mkClause :: InstanceDec -> Clause #

like |mkCon| in semantic functions, builds a case

toSemRec :: [(Name, Name)] -> Exp #

closeNTs :: [Name] -> Q [Dec] #

mkSemFunc :: Name -> Q [Dec] #

mkSemFuncs :: [Name] -> Q [Dec] #