nanopass-0.0.3.0: Create compilers using small passes and many intermediate representations.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Nanopass.Internal.Extend

Documentation

addNonterms Source #

Arguments

:: Set UpName

known non-terminals for the new language

-> Map LowName (Name 'Valid LowName)

known type variables for the new language

-> [Nonterm 'Unvalidated]

new non-terminals to add

-> EditingNonterms

old language's non-terminals

-> Either Error EditingNonterms 

modNonterms Source #

Arguments

:: Set UpName

known non-terminals for the new language

-> Map LowName (Name 'Valid LowName)

known type variables for the new language

-> Map UpName [ProductionsEdit]

edits to various non-terminals' productions

-> EditingNonterms

old language's non-terminals

-> Either Error EditingNonterms 

delNonterms Source #

Arguments

:: [UpName]

names of non-terminals to remove

-> EditingNonterms

old language's non-terminals

-> Either Error EditingNonterms 

extendProductions Source #

Arguments

:: Set UpName

known non-terminals for the new language

-> Map LowName (Name 'Valid LowName)

known type variables for the new language

-> Map UpName (Production 'Valid) 
-> [ProductionsEdit] 
-> Either Error (Map UpName (Production 'Valid))