{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}

module Transform where
{-# LINE 2 "src-ag/Patterns.ag" #-}

-- Patterns.ag imports

import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 11 "src-generated/Transform.hs" #-}

{-# LINE 2 "src-ag/ConcreteSyntax.ag" #-}

import UU.Scanner.Position (Pos)
import Patterns   (Pattern)
import Expression (Expression)
import CommonTypes
import Macro --marcos

{-# LINE 20 "src-generated/Transform.hs" #-}

{-# LINE 8 "src-ag/Transform.ag" #-}

import Control.Monad(mplus,mzero)
import Data.List (partition, nub,intersperse, union)
import Data.Maybe
import qualified Data.Map as Map
import Data.Map (Map)
import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert, elems)
import qualified Data.Sequence as Seq
import Data.Sequence(Seq, (><))
import UU.Scanner.Position(noPos)

import ConcreteSyntax
import AbstractSyntax
import ErrorMessages
import Patterns (Patterns,Pattern(..))
import Expression (Expression(..))
import HsToken

import RhsCheck
import Debug.Trace
{-# LINE 43 "src-generated/Transform.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 104 "src-ag/Transform.ag" #-}
type DefinedSets = Map Identifier (Set NontermIdent) 
{-# LINE 48 "src-generated/Transform.hs" #-}

{-# LINE 124 "src-ag/Transform.ag" #-}
type FieldMap  = [(Identifier, Type)] 
{-# LINE 52 "src-generated/Transform.hs" #-}

{-# LINE 125 "src-ag/Transform.ag" #-}
type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) 
{-# LINE 56 "src-generated/Transform.hs" #-}

{-# LINE 148 "src-ag/Transform.ag" #-}
type AttrName   = (Identifier,Identifier) 
{-# LINE 60 "src-generated/Transform.hs" #-}

{-# LINE 149 "src-ag/Transform.ag" #-}
type RuleInfo   = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String, Bool, Bool) 
{-# LINE 64 "src-generated/Transform.hs" #-}

{-# LINE 150 "src-ag/Transform.ag" #-}
type SigInfo    = (Identifier,Type) 
{-# LINE 68 "src-generated/Transform.hs" #-}

{-# LINE 151 "src-ag/Transform.ag" #-}
type UniqueInfo = (Identifier,Identifier) 
{-# LINE 72 "src-generated/Transform.hs" #-}

{-# LINE 152 "src-ag/Transform.ag" #-}
type AugmentInfo = (Identifier,Expression)
{-# LINE 76 "src-generated/Transform.hs" #-}

{-# LINE 153 "src-ag/Transform.ag" #-}
type AroundInfo  = (Identifier,Expression)
{-# LINE 80 "src-generated/Transform.hs" #-}

{-# LINE 154 "src-ag/Transform.ag" #-}
type MergeInfo   = (Identifier, Identifier, [Identifier], Expression)
{-# LINE 84 "src-generated/Transform.hs" #-}

{-# LINE 203 "src-ag/Transform.ag" #-}


checkDuplicate :: (Identifier -> Identifier -> Error)
               -> Identifier -> val -> Map Identifier val -> (Map Identifier val,Seq Error)
checkDuplicate dupError key val m
  = case Map.lookupIndex key m of
     Just ix -> let (key',_) = Map.elemAt ix m
                in  (m,Seq.singleton (dupError key key'))
     Nothing -> (Map.insert key val m,Seq.empty)

checkDuplicates :: (Identifier -> Identifier -> Error)
                -> [(Identifier, val)] -> Map Identifier val -> (Map Identifier val,Seq Error)
checkDuplicates dupError new m = foldErrors check m new
 where  check = uncurry (checkDuplicate dupError)

foldErrors :: (b -> t -> (t, Seq Error)) -> t -> [b] -> (t, Seq Error)
foldErrors f n xs = foldl g (n,Seq.empty) xs
  where g ~(e,es) x = let (e',es') = f x e
                      in (e', es >< es')


checkForDuplicates :: (Identifier -> Identifier -> Error)  ->  [Identifier]  ->  [Error]
checkForDuplicates _ [] = []
checkForDuplicates err (x:xs) = let (same,other) = partition (equalId x) xs
                                in  map (err x) same ++ checkForDuplicates err other

equalId :: Identifier -> Identifier -> Bool
equalId x y = getName x == getName y

{-# LINE 116 "src-generated/Transform.hs" #-}

{-# LINE 354 "src-ag/Transform.ag" #-}

type RulesAndErrors = ([Rule], Seq Error)
type SigsAndErrors  = ([TypeSig], Seq Error)
type InstsAndErrors = ([(Identifier, Type)], Seq Error)
type UniquesAndErrors = (Map Identifier Identifier, Seq Error)
type AugmentsAndErrors = (Map Identifier [Expression], Seq Error)
type AroundsAndErrors = (Map Identifier [Expression], Seq Error)
type MergesAndErrors  = (Map Identifier (Identifier, [Identifier], Expression), Seq Error)
type AttrOverwrite  = Map AttrName Bool
type AccumRuleCheck = (RulesAndErrors, AttrOverwrite)
type AccumDefiCheck = (Seq Error, AttrOverwrite, [AttrName], [AttrName])

checkRules :: Map NontermIdent (Attributes, Attributes) -> DataTypes ->
              Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->
              Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->
              NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors
checkRules attributes fields allinsts allsigs _ nt con rs
  = let fieldmap :: FieldMap
        fieldmap = (_LHS, NT nt [] False) : (_LOC, NT nullIdent [] False) : (_INST, NT nullIdent [] False) : (_FIRST, NT nullIdent [] False) : (_LAST, NT nullIdent [] False)
                 : Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fields)
                 ++ mapMaybe (\instNm -> lookup instNm sigs >>= \tp -> return (instNm, tp)) (Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allinsts))
                 --   merged children are not allowed to have any inherited attrs defined: do not include


        sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allsigs)

        hasAttrib f tp attr  = Map.member attr (f (Map.findWithDefault (Map.empty,Map.empty) tp attributes))

        checkRule :: RuleInfo -> AccumRuleCheck -> AccumRuleCheck
        checkRule (mbNm, pat,ex,as,owrt,str, pur, eager) ((r1,e1),m1)
          = let (e2,m2,u2,_) = foldr (checkDefi owrt) (e1,m1,[],[]) as
            in  ( (Rule mbNm (pat u2) ex owrt str True pur False Nothing eager : r1, e2), m2)

        checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck
        checkDefi owrt fa@(field,attr) (e,m,u,bs)
         = case lookup field fieldmap
            of  Just (NT tp _ _) ->
                  let tp' = maybe tp id (deforestedNt tp)
                  in              if field == _LOC || field == _INST || field == _FIRST || field == _LAST
                                     || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr
                                  then case Map.lookupIndex fa m of
                                           Just ix -> let ((_,attr2),b) = Map.elemAt ix m
                                                       in  if b && not (fa `elem` bs)
                                                           then (                                             e, Map.insert fa owrt m, fa:u, fa:bs)
                                                           else (((Seq.<|)) (DupRule nt con field attr2 attr)   e,                    m, fa:u,    bs)
                                           Nothing ->           (                                             e, Map.insert fa owrt m,    u, fa:bs)
                                  else                          (((Seq.<|)) (SuperfluousRule nt con field attr) e,                    m, fa:u,    bs)
                _              ->                               (((Seq.<|)) (UndefChild nt con field)           e,                    m, fa:u,    bs )

    in  fst (foldr checkRule (([],Seq.empty),Map.empty) rs)

checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error
checkRuleNames nt con
  = fst . foldr checkRule (Seq.empty, Set.empty)
  where
    checkRule (Just nm,_,_,_,_,_,_,_) (errs, nms)
      | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)
      | otherwise           = (errs, Set.insert nm nms)
    checkRule (Nothing,_,_,_,_,_,_,_) inp = inp

checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors
checkSigs nt con sis
  = let checkSig (ide,typ) (sigs,errs)
         = if   ide `elem` map (\(TypeSig n _)-> n) sigs
           then (sigs, ((Seq.<|)) (DupSig nt con ide) errs)
           -- else if not (ide `elem` locattrdefs)

           -- then (sigs, ((Seq.<|)) (SupSig nt con ide) errs)

           else (TypeSig ide typ:sigs, errs)
    in  foldr checkSig ([],Seq.empty) sis

checkInsts :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [SigInfo]) -> DataTypes -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors
checkInsts allNts sigMap _ nt con
  = foldr (\inst (insts, errs) ->
              maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)
                    (\info@(k, NT nm args _) ->
                      case findInst k insts of
                        Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)
                        Nothing -> case nm `Set.member` allNts of
                                             True  -> (info : insts, errs)
                                             False | take 2 (getName nm) == "T_" -> let nm'   = Ident (drop 2 (getName nm)) (getPos nm)
                                                                                        info' = (k, NT nm' args True)   -- this should be the only place at which 'for' with value True can be generated

                                                                                    in case nm' `Set.member` allNts of
                                                                                         True  -> (info' : insts, errs)
                                                                                         False -> (insts, Seq.singleton (UndefNont nm') >< errs)
                                                   | otherwise                   -> (insts, Seq.singleton (UndefNont nm) >< errs)
                    )
                  $ findSig inst
          ) ([], Seq.empty)
  where
    sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)

    findSig name
      = do tp@(NT _ _ _) <- lookup name sigs
           return (name, tp)

    findInst _ [] = Nothing
    findInst k ((k', _): r)
      | k == k'   = Just k'
      | otherwise = findInst k r

checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors
checkUniques allAttrs nt con uniques
  = let checkUnique (ident,ref) (us,errs)
          = if ident `Map.member` us
            then (us, ((Seq.<|)) (DupUnique nt con ident) errs)
            else if Map.member ref inhs && Map.member ref syns
                 then (Map.insert ident ref us, errs)
                 else (us, ((Seq.<|)) (MissingUnique nt ref) errs)

        (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs
    in foldr checkUnique (Map.empty, Seq.empty) uniques

checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors
checkAugments allAttrs nt _ augments
  = let checkAugment (ident,expr) (as,errs)
          = if ident `Map.member` as
            then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)
            else if Map.member ident syns
                 then (Map.insert ident [expr] as, errs)
                 else (as, ((Seq.<|)) (MissingSyn nt ident) errs)

        (_,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs
    in foldr checkAugment (Map.empty, Seq.empty) augments

checkArounds :: DataTypes -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors
checkArounds fieldMap nt con arounds
  = let checkAround (ident,expr) (as,errs)
          = if ident `Map.member` as
            then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)
            else case lookup ident fields of
                   Just (NT _ _ _) -> (Map.insert ident [expr] as, errs)
                   _               -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)
        fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)
    in foldr checkAround (Map.empty, Seq.empty) arounds

checkMerges :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [Identifier]) -> DataTypes -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors
checkMerges allNts allInsts fieldMap _ con merges
  = let checkMerge (target,nt,sources,expr) (m,errs)
          = let fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)
                insts  = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)
                allFields = insts ++ map fst fields   -- note: sources of merge may not contain a target (for simplicity)

            in if target `Map.member` m   -- check for duplicate with self

               then (m, DupChild nt con target (fst $ Map.elemAt (Map.findIndex target m) m) Seq.<| errs)
               else if target `elem` allFields
                     then (m, DupChild nt con target (head $ filter (== target) allFields) Seq.<| errs)
                     else let missing = filter (\s -> not (s `elem` allFields)) sources
                          in if null missing
                             then if nt `Set.member` allNts   -- check if the nonterm is defined

                                  then (Map.insert target (nt, sources, expr) m, errs) -- all ok..

                                  else (m, UndefNont nt Seq.<| errs)
                             else (m, (Seq.fromList $ map (UndefChild nt con) missing) Seq.>< errs)
    in foldr checkMerge (Map.empty, Seq.empty) merges

unionunionplusplus :: Map NontermIdent (Map ConstructorIdent [a]) -> Map NontermIdent (Map ConstructorIdent [a]) -> Map NontermIdent (Map ConstructorIdent [a])
unionunionplusplus = Map.unionWith (Map.unionWith (++))
{-# LINE 273 "src-generated/Transform.hs" #-}

{-# LINE 511 "src-ag/Transform.ag" #-}

mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [RuleInfo]) -> DataTypes -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]
mkUniqueRules opts allRules allFields allInsts allAttrDecls nt con usMap
  = map apply groups
  where
    fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)
             ++ Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)
             -- may have duplicates


    attrDefs = let projectDefs (_,_,_,defs,_,_,_,_) = defs
               in concatMap projectDefs $ Map.findWithDefault [] con $ Map.findWithDefault Map.empty nt allRules

    groups = Map.assocs $ Map.foldrWithKey (\i r m -> Map.insertWith (++) r [i] m) Map.empty usMap
    apply (ref,us) = mkRule ref (findOutField ref) us
    findOutField ref = case [ chld | (chld, NT tp _ _) <- fields, tp `hasSyn` ref] of
                         []    -> _LHS
                         (x:_) -> x
    hasSyn tp ref = Map.member ref $ snd $ Map.findWithDefault (Map.empty,Map.empty) tp allAttrDecls
    mkRule ref outFld locAttrs
      = let locs = filter (not . existsLoc) locAttrs
            outAttr = attr outFld ref
            defs = (if hasOut then [] else [outAttr]) ++ [attr _LOC u | u <- locs ]
            pat = Product noPos defs
            rhs = Expression noPos $ wrap ref $ foldr gencase (finalout hasOut locs) locs
                     -- [HsToken ("mkUniques" ++ show (length locAttrs) ++ " ") noPos, AGField _LHS ref noPos Nothing]

            rul = Rule Nothing pat rhs False "-- generated by the unique rule mechanism." False True False Nothing False
            hasOut = exists outAttr
            exists (Alias fld a _) = (fld,a) `elem` attrDefs
            exists _ = False
            existsLoc nm = exists (attr _LOC nm)
        in rul
    attr fld a = Alias fld a (Underscore noPos)
    gencase nm outp
      = h ("case " ++ uniqueDispenser opts ++ " __cont of { (__cont, " ++ getName nm ++ ") -> ") ++ outp ++ h "}"
    h s = [HsToken s noPos]
    finalout noGenCont us = h ("(" ++ concat (intersperse "," ( (if noGenCont then [] else ["__cont"]) ++ map getName us)) ++ ")")
    wrap ref inp = h "let __cont = " ++ [AGField _LHS ref noPos Nothing] ++ h " in seq __cont ( " ++ inp ++ h " )"
{-# LINE 313 "src-generated/Transform.hs" #-}

{-# LINE 747 "src-ag/Transform.ag" #-}

flattenDatas :: DataTypes -> Map NontermIdent (Set NontermIdent)
flattenDatas ds = Map.map flatten ds
  where flatten cs =  Set.fromList [ nt | (_, NT nt _ _) <- concatMap snd (Map.toList cs)]

reachableFrom :: Map NontermIdent (Set NontermIdent) -> Set NontermIdent -> Set NontermIdent
reachableFrom table = reach
  where reach nts = let nts' = Set.unions (nts : [ ns  | nt <- Set.toList nts
                                                 , let ns = Map.findWithDefault Set.empty nt table ])
                    in if Set.size nts' > Set.size nts
                          then reach nts'
                          else nts
invert :: Map NontermIdent (Set NontermIdent) -> Map NontermIdent (Set NontermIdent)
invert = foldr inv Map.empty . Map.toList
  where inv (x,ns) m = fold (\n m' -> Map.insertWith Set.union n (Set.singleton x) m') m ns

path :: Map NontermIdent (Set NontermIdent) -> NontermIdent -> NontermIdent -> Set NontermIdent
path table from to = let children = Map.findWithDefault Set.empty from table
                         forward  = reachableFrom table children
                         backward = reachableFrom (invert table)
                                                  (Set.singleton to)
                     in  Set.intersection forward backward
{-# LINE 338 "src-generated/Transform.hs" #-}

{-# LINE 874 "src-ag/Transform.ag" #-}

extract :: String -> [String]
extract s = case dropWhile isSeparator s of
                                "" -> []
                                s' -> w : extract s''
                                      where (w, s'') = break isSeparator  s'
isSeparator :: Char -> Bool
isSeparator x = x == '_'
{-# LINE 349 "src-generated/Transform.hs" #-}

{-# LINE 900 "src-ag/Transform.ag" #-}

pragmaMapUnion :: PragmaMap -> PragmaMap -> PragmaMap
pragmaMapUnion = Map.unionWith (Map.unionWith Set.union)

pragmaMapSingle :: NontermIdent -> ConstructorIdent -> Set Identifier -> PragmaMap
pragmaMapSingle nt con nms = Map.singleton nt (Map.singleton con nms)
{-# LINE 358 "src-generated/Transform.hs" #-}

{-# LINE 932 "src-ag/Transform.ag" #-}

orderMapUnion :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap
orderMapUnion = Map.unionWith (Map.unionWith Set.union)

orderMapSingle :: NontermIdent -> ConstructorIdent -> Set Dependency -> AttrOrderMap
orderMapSingle nt con deps = Map.singleton nt (Map.singleton con deps)
{-# LINE 367 "src-generated/Transform.hs" #-}

{-# LINE 958 "src-ag/Transform.ag" #-}

mergeParams :: ParamMap -> ParamMap -> ParamMap
mergeParams = Map.unionWith (++)
{-# LINE 373 "src-generated/Transform.hs" #-}

{-# LINE 981 "src-ag/Transform.ag" #-}

mergeCtx :: ContextMap -> ContextMap -> ContextMap
mergeCtx
  = Map.unionWith nubconcat
  where nubconcat a b = nub (a ++ b)
{-# LINE 381 "src-generated/Transform.hs" #-}

{-# LINE 1000 "src-ag/Transform.ag" #-}

mergeQuant :: QuantMap -> QuantMap -> QuantMap
mergeQuant = Map.unionWith (++)
{-# LINE 387 "src-generated/Transform.hs" #-}

{-# LINE 1011 "src-ag/Transform.ag" #-}

mergeDerivings :: Derivings -> Derivings -> Derivings
mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)
{-# LINE 393 "src-generated/Transform.hs" #-}

{-# LINE 1023 "src-ag/Transform.ag" #-}

merge ::(Ord k, Ord k1) => Map k (Map k1 a) -> Map k (Map k1 a) -> Map k (Map k1 a)
merge x y = foldr f y (Map.toList x)
 where f ~(k,v) m = Map.insertWith (Map.union) k v m
{-# LINE 400 "src-generated/Transform.hs" #-}

{-# LINE 1066 "src-ag/Transform.ag" #-}

checkAttrs :: DataTypes -> [NontermIdent] -> [(Identifier, a)] -> [(Identifier, b)] -> Map NontermIdent (Map Identifier a, Map Identifier b) -> (Map NontermIdent (Map Identifier a, Map Identifier b), Seq Error)
checkAttrs allFields nts inherited synthesized decls' = foldErrors check decls' nts where
  check nt decls | not (nt `Map.member` allFields) = (decls,Seq.singleton(UndefNont nt))
                 | otherwise = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt decls
                                   (inh',einh) = checkDuplicates (DupInhAttr nt) inherited   inh
                                   (syn',esyn) = checkDuplicates (DupSynAttr nt) synthesized syn
                               in (Map.insert nt (inh',syn') decls,einh >< esyn)
{-# LINE 411 "src-generated/Transform.hs" #-}

{-# LINE 1078 "src-ag/Transform.ag" #-}

addSelf :: Ord k1 => k1 -> Map k1 (Map k a, Attributes) -> Map k1 (Map k a, Attributes)
addSelf name atMap = let (eInh,eSyn) = Map.findWithDefault(Map.empty,Map.empty) name atMap
                     in  Map.insert name (eInh, Map.insert (Ident "self" noPos) Self eSyn)atMap
{-# LINE 418 "src-generated/Transform.hs" #-}

{-# LINE 1216 "src-ag/Transform.ag" #-}

-- We want the last Just in the list

flipmplus = flip mplus
{-# LINE 424 "src-generated/Transform.hs" #-}

{-# LINE 1224 "src-ag/Transform.ag" #-}

makeType :: Set NontermIdent -> Type -> Type
makeType nts tp@(NT x _ _)   | Set.member x nts = tp
                             | otherwise        = Haskell (typeToHaskellString Nothing [] tp)
makeType _   tp                                 = tp
{-# LINE 432 "src-generated/Transform.hs" #-}

{-# LINE 1230 "src-ag/Transform.ag" #-}

constructGrammar ::    Set NontermIdent
                    -> ParamMap
                    -> Map NontermIdent (Map ConstructorIdent (Set Identifier))
                    -> DataTypes
                    -> Map NontermIdent [ConstructorIdent]
                    -> Map NontermIdent (Map ConstructorIdent [Type])
                    -> Map NontermIdent (Attributes, Attributes)
                    -> Map NontermIdent (Map Identifier (String, String, String))
                    -> Derivings
                    -> Set NontermIdent
                    -> Map NontermIdent (Map ConstructorIdent [Rule])
                    -> Map NontermIdent (Map ConstructorIdent [TypeSig])
                    -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)])
                    -> TypeSyns
                    -> PragmaMap
                    -> AttrOrderMap
                    -> ContextMap
                    -> QuantMap
                    -> UniqueMap
                    -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))
                    -> Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))
                    -> Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))
                    -> Map NontermIdent (Map ConstructorIdent MaybeMacro)
                    -> Grammar

constructGrammar _ ntParams prodParams gram prodOrder constraints attrs uses derivings wrap allrules tsigs allinsts tsyns pragmaMap orderMap contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap macros =
   let gr = [ (nt,alts) | (nt,alts) <- Map.toList gram]
       nonts = map nont gr
       nont (nt,alts) =  let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt attrs
                             rmap      = Map.findWithDefault Map.empty             nt allrules
                             tsmap     = Map.findWithDefault Map.empty             nt tsigs
                             instsmap  = Map.findWithDefault Map.empty             nt allinsts
                             params    = Map.findWithDefault []                    nt ntParams
                             mergemap  = Map.findWithDefault Map.empty             nt mergeMap
                             macromap  = Map.findWithDefault Map.empty             nt macros
                             csmap     = Map.findWithDefault Map.empty             nt constraints
                             psmap     = Map.findWithDefault Map.empty             nt prodParams
                             prs       = Map.findWithDefault []                    nt prodOrder
                             alt con   =
                                   let flds    = Map.findWithDefault [] con alts
                                       rules   = Map.findWithDefault [] con rmap
                                       tsigs'  = Map.findWithDefault [] con tsmap
                                       insts   = Map.findWithDefault [] con instsmap
                                       merges  = [ (n, NT t [] False) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]
                                       cs      = Map.findWithDefault [] con csmap
                                       ps      = Set.elems $ Map.findWithDefault Set.empty con psmap
                                       mbMacro = Map.findWithDefault Nothing con macromap

                                       -- important: keep order of children

                                       cldrn = map child (flds ++ filter (not . existsAsField) insts ++ merges)
                                       child (nm, tp) =
                                          let tpI = if existsAsInst nm
                                                    then fromJust $ lookup nm insts
                                                    else tp
                                              virt = if existsAsInst nm
                                                     then case lookup nm flds of
                                                            Just tp' -> ChildReplace tp'
                                                            Nothing  -> ChildAttr
                                                     else if existsAsMerge nm
                                                          then ChildAttr
                                                          else ChildSyntax
                                          in Child nm tpI virt
                                       existsAsInst nm = maybe False (const True) (lookup nm insts)
                                       existsAsField (nm,_) = maybe False (const True) (lookup nm flds)
                                       existsAsMerge nm = maybe False (const True) (lookup nm merges)
                                   in Production con ps cs cldrn rules tsigs' mbMacro
                            in Nonterminal nt params inh syn (map alt prs)
   in Grammar tsyns uses derivings wrap nonts pragmaMap orderMap ntParams contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap
{-# LINE 504 "src-generated/Transform.hs" #-}

{-# LINE 1301 "src-ag/Transform.ag" #-}

mapUnionWithSetUnion :: Map NontermIdent (Set ConstructorIdent) -> Map NontermIdent (Set ConstructorIdent) -> Map NontermIdent (Set ConstructorIdent)
mapUnionWithSetUnion = Map.unionWith Set.union
mapUnionWithPlusPlus :: Map BlockInfo [a] -> Map BlockInfo [a] -> Map BlockInfo [a]
mapUnionWithPlusPlus = Map.unionWith (++)
{-# LINE 512 "src-generated/Transform.hs" #-}
-- AG ----------------------------------------------------------
-- wrapper
data Inh_AG  = Inh_AG { Inh_AG -> Options
options_Inh_AG :: (Options) }
data Syn_AG  = Syn_AG { Syn_AG
-> (Set NontermIdent, DataTypes,
    Map NontermIdent (Attributes, Attributes))
agi_Syn_AG :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))), Syn_AG -> Blocks
blocks_Syn_AG :: (Blocks), Syn_AG -> Map NontermIdent ConstructorType
constructorTypeMap_Syn_AG :: (Map NontermIdent ConstructorType), Syn_AG -> Seq Error
errors_Syn_AG :: (Seq Error), Syn_AG -> Maybe (String, String, String)
moduleDecl_Syn_AG :: (Maybe (String,String,String)), Syn_AG -> Grammar
output_Syn_AG :: (Grammar), Syn_AG -> Options -> Options
pragmas_Syn_AG :: (Options -> Options) }
{-# INLINABLE wrap_AG #-}
wrap_AG :: T_AG  -> Inh_AG  -> (Syn_AG )
wrap_AG :: T_AG -> Inh_AG -> Syn_AG
wrap_AG (T_AG Identity T_AG_s2
act) (Inh_AG Options
_lhsIoptions) =
   Identity Syn_AG -> Syn_AG
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_AG_s2
sem <- Identity T_AG_s2
act
        let arg1 :: T_AG_vIn1
arg1 = Options -> T_AG_vIn1
T_AG_vIn1 Options
_lhsIoptions
        (T_AG_vOut1 (Set NontermIdent, DataTypes,
 Map NontermIdent (Attributes, Attributes))
_lhsOagi Blocks
_lhsOblocks Map NontermIdent ConstructorType
_lhsOconstructorTypeMap Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl Grammar
_lhsOoutput Options -> Options
_lhsOpragmas) <- T_AG_vOut1 -> Identity T_AG_vOut1
forall (m :: * -> *) a. Monad m => a -> m a
return (T_AG_s2 -> T_AG_v1
inv_AG_s2 T_AG_s2
sem T_AG_vIn1
arg1)
        Syn_AG -> Identity Syn_AG
forall (m :: * -> *) a. Monad m => a -> m a
return ((Set NontermIdent, DataTypes,
 Map NontermIdent (Attributes, Attributes))
-> Blocks
-> Map NontermIdent ConstructorType
-> Seq Error
-> Maybe (String, String, String)
-> Grammar
-> (Options -> Options)
-> Syn_AG
Syn_AG (Set NontermIdent, DataTypes,
 Map NontermIdent (Attributes, Attributes))
_lhsOagi Blocks
_lhsOblocks Map NontermIdent ConstructorType
_lhsOconstructorTypeMap Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl Grammar
_lhsOoutput Options -> Options
_lhsOpragmas)
   )

-- cata
{-# INLINE sem_AG #-}
sem_AG :: AG  -> T_AG 
sem_AG :: AG -> T_AG
sem_AG ( AG Elems
elems_ ) = T_Elems -> T_AG
sem_AG_AG ( Elems -> T_Elems
sem_Elems Elems
elems_ )

-- semantic domain
newtype T_AG  = T_AG {
                     T_AG -> Identity T_AG_s2
attach_T_AG :: Identity (T_AG_s2 )
                     }
newtype T_AG_s2  = C_AG_s2 {
                           T_AG_s2 -> T_AG_v1
inv_AG_s2 :: (T_AG_v1 )
                           }
data T_AG_s3  = C_AG_s3
type T_AG_v1  = (T_AG_vIn1 ) -> (T_AG_vOut1 )
data T_AG_vIn1  = T_AG_vIn1 (Options)
data T_AG_vOut1  = T_AG_vOut1 ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))) (Blocks) (Map NontermIdent ConstructorType) (Seq Error) (Maybe (String,String,String)) (Grammar) (Options -> Options)
{-# NOINLINE sem_AG_AG #-}
sem_AG_AG :: T_Elems  -> T_AG 
sem_AG_AG :: T_Elems -> T_AG
sem_AG_AG T_Elems
arg_elems_ = Identity T_AG_s2 -> T_AG
T_AG (T_AG_s2 -> Identity T_AG_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_AG_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_AG_s2
st2 = let
      v1 :: T_AG_v1 
      v1 :: T_AG_v1
v1 = \ (T_AG_vIn1 Options
_lhsIoptions) -> ( let
         _elemsX20 :: T_Elems_s20
_elemsX20 = Identity T_Elems_s20 -> T_Elems_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Elems -> Identity T_Elems_s20
attach_T_Elems (T_Elems
arg_elems_))
         (T_Elems_vOut19 Map NontermIdent (Attributes, Attributes)
_elemsIattrDecls AttrOrderMap
_elemsIattrOrderCollect Map NontermIdent (Attributes, Attributes)
_elemsIattrs Blocks
_elemsIblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_elemsIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_elemsIcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_elemsIcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_elemsIcollectedConstraints Map NontermIdent (Set NontermIdent)
_elemsIcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_elemsIcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_elemsIcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_elemsIcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_elemsIcollectedMerges Set NontermIdent
_elemsIcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_elemsIcollectedRules Set NontermIdent
_elemsIcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_elemsIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_elemsIcollectedUniques Map NontermIdent ConstructorType
_elemsIconstructorTypeMap ContextMap
_elemsIctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_elemsIdefSets Map NontermIdent (Set NontermIdent)
_elemsIderivings Seq Error
_elemsIerrors Maybe (String, String, String)
_elemsImoduleDecl ParamMap
_elemsIparamsCollect Options -> Options
_elemsIpragmas QuantMap
_elemsIquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_elemsIsemPragmasCollect TypeSyns
_elemsItypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_elemsIuseMap Set NontermIdent
_elemsIwrappers) = T_Elems_s20 -> T_Elems_v19
inv_Elems_s20 T_Elems_s20
_elemsX20 (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent)
-> DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Options
-> T_Elems_vIn19
T_Elems_vIn19 Map NontermIdent (Attributes, Attributes)
_elemsOallAttrDecls Map NontermIdent (Attributes, Attributes)
_elemsOallAttrs Map NontermIdent (Set NontermIdent)
_elemsOallConstructors DataTypes
_elemsOallFields Set NontermIdent
_elemsOallNonterminals Map NontermIdent (Attributes, Attributes)
forall k a. Map k a
_elemsOattrDecls Map NontermIdent (Attributes, Attributes)
forall k a. Map k a
_elemsOattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_elemsOdefSets Map NontermIdent (Set NontermIdent)
_elemsOdefinedSets Options
_elemsOoptions)
         _lhsOoutput :: Grammar
         _lhsOoutput :: Grammar
_lhsOoutput = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent [Type])
-> DataTypes
-> Map NontermIdent (Map NontermIdent MaybeMacro)
-> Set NontermIdent
-> Map
     NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
-> Map
     NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
-> DataTypes
-> Map
     NontermIdent
     (Map
        NontermIdent
        (Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
-> Map NontermIdent (Map NontermIdent [Rule])
-> Map NontermIdent (Map NontermIdent [TypeSig])
-> UniqueMap
-> AttrOrderMap
-> ContextMap
-> Map NontermIdent (Set NontermIdent)
-> ParamMap
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> Options
-> ParamMap
-> Grammar
rule0 Map NontermIdent (Attributes, Attributes)
_allAttrDecls Map NontermIdent (Map NontermIdent (Set NontermIdent))
_allConParams Map NontermIdent (Map NontermIdent [Type])
_allConstraints DataTypes
_allFields Map NontermIdent (Map NontermIdent MaybeMacro)
_allMacros Set NontermIdent
_allNonterminals Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
_checkedArounds Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
_checkedAugments DataTypes
_checkedInsts Map
  NontermIdent
  (Map
     NontermIdent
     (Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
_checkedMerges Map NontermIdent (Map NontermIdent [Rule])
_checkedRules Map NontermIdent (Map NontermIdent [TypeSig])
_checkedSigs UniqueMap
_checkedUniques AttrOrderMap
_elemsIattrOrderCollect ContextMap
_elemsIctxCollect Map NontermIdent (Set NontermIdent)
_elemsIderivings ParamMap
_elemsIparamsCollect QuantMap
_elemsIquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_elemsIsemPragmasCollect TypeSyns
_elemsItypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_elemsIuseMap Set NontermIdent
_elemsIwrappers Options
_lhsIoptions ParamMap
_prodOrder
         _prodOrder :: ParamMap
_prodOrder = [(NontermIdent, NontermIdent, [(NontermIdent, Type)])] -> ParamMap
rule1 [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_elemsIcollectedFields
         _allFields :: DataTypes
_allFields = [(NontermIdent, NontermIdent, [(NontermIdent, Type)])] -> DataTypes
rule2 [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_elemsIcollectedFields
         _allConstraints :: Map NontermIdent (Map NontermIdent [Type])
_allConstraints = [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Map NontermIdent [Type])
rule3 [(NontermIdent, NontermIdent, [Type])]
_elemsIcollectedConstraints
         _allConParams :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_allConParams = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule4 [(NontermIdent, NontermIdent, Set NontermIdent)]
_elemsIcollectedConParams
         _allConstrs :: ParamMap
_allConstrs = [(NontermIdent, NontermIdent, [(NontermIdent, Type)])] -> ParamMap
rule5 [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_elemsIcollectedFields
         _allRules :: Map NontermIdent (Map NontermIdent [RuleInfo])
_allRules = [(NontermIdent, NontermIdent, RuleInfo)]
-> Map NontermIdent (Map NontermIdent [RuleInfo])
rule6 [(NontermIdent, NontermIdent, RuleInfo)]
_elemsIcollectedRules
         _allSigs :: DataTypes
_allSigs = Map NontermIdent (Attributes, Attributes)
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> DataTypes
forall k a.
Map NontermIdent (Attributes, Map k a)
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> DataTypes
rule7 Map NontermIdent (Attributes, Attributes)
_allAttrDecls [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_elemsIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_elemsIcollectedUniques
         _allInsts :: Map NontermIdent ParamMap
_allInsts = [(NontermIdent, NontermIdent, [NontermIdent])]
-> Map NontermIdent ParamMap
rule8 [(NontermIdent, NontermIdent, [NontermIdent])]
_elemsIcollectedInsts
         _allUniques :: Map NontermIdent (Map NontermIdent [UniqueInfo])
_allUniques = [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent (Map NontermIdent [UniqueInfo])
rule9 [(NontermIdent, NontermIdent, [UniqueInfo])]
_elemsIcollectedUniques
         _allAugments :: Map NontermIdent (Map NontermIdent [AugmentInfo])
_allAugments = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> Map NontermIdent (Map NontermIdent [AugmentInfo])
rule10 [(NontermIdent, NontermIdent, [AugmentInfo])]
_elemsIcollectedAugments
         _allArounds :: Map NontermIdent (Map NontermIdent [AugmentInfo])
_allArounds = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> Map NontermIdent (Map NontermIdent [AugmentInfo])
rule11 [(NontermIdent, NontermIdent, [AugmentInfo])]
_elemsIcollectedArounds
         _allMerges :: Map NontermIdent (Map NontermIdent [MergeInfo])
_allMerges = [(NontermIdent, NontermIdent, [MergeInfo])]
-> Map NontermIdent (Map NontermIdent [MergeInfo])
rule12 [(NontermIdent, NontermIdent, [MergeInfo])]
_elemsIcollectedMerges
         _augmentSigs :: Map NontermIdent (Map NontermIdent [TypeSig])
_augmentSigs = Map NontermIdent (Map NontermIdent [AugmentInfo])
-> Map NontermIdent (Map NontermIdent [TypeSig])
forall k k p a. Map k (Map k p) -> Map k (Map k [a])
rule13 Map NontermIdent (Map NontermIdent [AugmentInfo])
_allAugments
         _allRulesErrs :: Map NontermIdent (Map NontermIdent RulesAndErrors)
_allRulesErrs = Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Map NontermIdent ParamMap
-> Map NontermIdent (Map NontermIdent [MergeInfo])
-> Map NontermIdent (Map NontermIdent [RuleInfo])
-> DataTypes
-> Map NontermIdent (Map NontermIdent RulesAndErrors)
rule14 Map NontermIdent (Attributes, Attributes)
_allAttrDecls DataTypes
_allFields Map NontermIdent ParamMap
_allInsts Map NontermIdent (Map NontermIdent [MergeInfo])
_allMerges Map NontermIdent (Map NontermIdent [RuleInfo])
_allRules DataTypes
_allSigs
         _allNamesErrs :: Map NontermIdent (Map NontermIdent (Seq Error))
_allNamesErrs = Map NontermIdent (Map NontermIdent [RuleInfo])
-> Map NontermIdent (Map NontermIdent (Seq Error))
rule15 Map NontermIdent (Map NontermIdent [RuleInfo])
_allRules
         _allSigsErrs :: Map NontermIdent (Map NontermIdent SigsAndErrors)
_allSigsErrs = DataTypes -> Map NontermIdent (Map NontermIdent SigsAndErrors)
rule16 DataTypes
_allSigs
         _allInstsErrs :: Map NontermIdent (Map NontermIdent InstsAndErrors)
_allInstsErrs = DataTypes
-> Map NontermIdent ParamMap
-> Set NontermIdent
-> DataTypes
-> Map NontermIdent (Map NontermIdent InstsAndErrors)
rule17 DataTypes
_allFields Map NontermIdent ParamMap
_allInsts Set NontermIdent
_allNonterminals DataTypes
_allSigs
         _allUniquesErrs :: Map NontermIdent (Map NontermIdent UniquesAndErrors)
_allUniquesErrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Map NontermIdent [UniqueInfo])
-> Map NontermIdent (Map NontermIdent UniquesAndErrors)
rule18 Map NontermIdent (Attributes, Attributes)
_allAttrDecls Map NontermIdent (Map NontermIdent [UniqueInfo])
_allUniques
         _allAugmentErrs :: Map NontermIdent (Map NontermIdent AugmentsAndErrors)
_allAugmentErrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Map NontermIdent [AugmentInfo])
-> Map NontermIdent (Map NontermIdent AugmentsAndErrors)
rule19 Map NontermIdent (Attributes, Attributes)
_allAttrDecls Map NontermIdent (Map NontermIdent [AugmentInfo])
_allAugments
         _allAroundsErrs :: Map NontermIdent (Map NontermIdent AugmentsAndErrors)
_allAroundsErrs = Map NontermIdent (Map NontermIdent [AugmentInfo])
-> DataTypes
-> Map NontermIdent (Map NontermIdent AugmentsAndErrors)
rule20 Map NontermIdent (Map NontermIdent [AugmentInfo])
_allArounds DataTypes
_allFields
         _allMergesErrs :: Map NontermIdent (Map NontermIdent MergesAndErrors)
_allMergesErrs = DataTypes
-> Map NontermIdent ParamMap
-> Map NontermIdent (Map NontermIdent [MergeInfo])
-> Set NontermIdent
-> Map NontermIdent (Map NontermIdent MergesAndErrors)
rule21 DataTypes
_allFields Map NontermIdent ParamMap
_allInsts Map NontermIdent (Map NontermIdent [MergeInfo])
_allMerges Set NontermIdent
_allNonterminals
         _checkedRulesPre :: Map NontermIdent (Map NontermIdent [Rule])
_checkedRulesPre = Map NontermIdent (Map NontermIdent RulesAndErrors)
-> Map NontermIdent (Map NontermIdent [Rule])
forall k k b b. Map k (Map k (b, b)) -> Map k (Map k b)
rule22 Map NontermIdent (Map NontermIdent RulesAndErrors)
_allRulesErrs
         _checkedSigs :: Map NontermIdent (Map NontermIdent [TypeSig])
_checkedSigs = Map NontermIdent (Map NontermIdent SigsAndErrors)
-> Map NontermIdent (Map NontermIdent [TypeSig])
-> Map NontermIdent (Map NontermIdent [TypeSig])
forall a b.
Map NontermIdent (Map NontermIdent ([a], b))
-> Map NontermIdent (Map NontermIdent [a])
-> Map NontermIdent (Map NontermIdent [a])
rule23 Map NontermIdent (Map NontermIdent SigsAndErrors)
_allSigsErrs Map NontermIdent (Map NontermIdent [TypeSig])
_augmentSigs
         _checkedInsts :: DataTypes
_checkedInsts = Map NontermIdent (Map NontermIdent InstsAndErrors) -> DataTypes
forall k k b b. Map k (Map k (b, b)) -> Map k (Map k b)
rule24 Map NontermIdent (Map NontermIdent InstsAndErrors)
_allInstsErrs
         _checkedUniques :: UniqueMap
_checkedUniques = Map NontermIdent (Map NontermIdent UniquesAndErrors) -> UniqueMap
forall k k b b. Map k (Map k (b, b)) -> Map k (Map k b)
rule25 Map NontermIdent (Map NontermIdent UniquesAndErrors)
_allUniquesErrs
         _checkedAugments :: Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
_checkedAugments = Map NontermIdent (Map NontermIdent AugmentsAndErrors)
-> Map
     NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
forall k k b b. Map k (Map k (b, b)) -> Map k (Map k b)
rule26 Map NontermIdent (Map NontermIdent AugmentsAndErrors)
_allAugmentErrs
         _checkedArounds :: Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
_checkedArounds = Map NontermIdent (Map NontermIdent AugmentsAndErrors)
-> Map
     NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
forall k k b b. Map k (Map k (b, b)) -> Map k (Map k b)
rule27 Map NontermIdent (Map NontermIdent AugmentsAndErrors)
_allAroundsErrs
         _checkedRules :: Map NontermIdent (Map NontermIdent [Rule])
_checkedRules = Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Map NontermIdent (Map NontermIdent [RuleInfo])
-> DataTypes
-> Map NontermIdent (Map NontermIdent [Rule])
-> UniqueMap
-> Options
-> Map NontermIdent (Map NontermIdent [Rule])
rule28 Map NontermIdent (Attributes, Attributes)
_allAttrDecls DataTypes
_allFields Map NontermIdent (Map NontermIdent [RuleInfo])
_allRules DataTypes
_checkedInsts Map NontermIdent (Map NontermIdent [Rule])
_checkedRulesPre UniqueMap
_checkedUniques Options
_lhsIoptions
         _checkedMerges :: Map
  NontermIdent
  (Map
     NontermIdent
     (Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
_checkedMerges = Map NontermIdent (Map NontermIdent MergesAndErrors)
-> Map
     NontermIdent
     (Map
        NontermIdent
        (Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
forall k k b b. Map k (Map k (b, b)) -> Map k (Map k b)
rule29 Map NontermIdent (Map NontermIdent MergesAndErrors)
_allMergesErrs
         _errs1 :: Seq Error
_errs1 = TypeSyns -> Seq Error
rule30 TypeSyns
_elemsItypeSyns
         _errs2 :: Seq Error
_errs2 = DataTypes -> Seq Error
forall b.
Map NontermIdent (Map NontermIdent [(NontermIdent, b)])
-> Seq Error
rule31 DataTypes
_allFields
         _errs3 :: Seq a
_errs3 = () -> Seq a
forall a. () -> Seq a
rule32  ()
         _errs4 :: Seq Error
_errs4 = Map NontermIdent (Map NontermIdent RulesAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule33 Map NontermIdent (Map NontermIdent RulesAndErrors)
_allRulesErrs
         _errs5 :: Seq Error
_errs5 = Map NontermIdent (Map NontermIdent SigsAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule34 Map NontermIdent (Map NontermIdent SigsAndErrors)
_allSigsErrs
         _errs6 :: Seq Error
_errs6 = Map NontermIdent (Map NontermIdent InstsAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule35 Map NontermIdent (Map NontermIdent InstsAndErrors)
_allInstsErrs
         _errs7 :: Seq Error
_errs7 = Map NontermIdent (Map NontermIdent UniquesAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule36 Map NontermIdent (Map NontermIdent UniquesAndErrors)
_allUniquesErrs
         _errs8 :: Seq Error
_errs8 = Map NontermIdent (Map NontermIdent AugmentsAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule37 Map NontermIdent (Map NontermIdent AugmentsAndErrors)
_allAugmentErrs
         _errs9 :: Seq Error
_errs9 = Map NontermIdent (Map NontermIdent AugmentsAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule38 Map NontermIdent (Map NontermIdent AugmentsAndErrors)
_allAroundsErrs
         _errs10 :: Seq Error
_errs10 = Map NontermIdent (Map NontermIdent (Seq Error)) -> Seq Error
forall k k a. Map k (Map k (Seq a)) -> Seq a
rule39 Map NontermIdent (Map NontermIdent (Seq Error))
_allNamesErrs
         _errs11 :: Seq Error
_errs11 = Map NontermIdent (Map NontermIdent MergesAndErrors) -> Seq Error
forall k k a a. Map k (Map k (a, Seq a)) -> Seq a
rule40 Map NontermIdent (Map NontermIdent MergesAndErrors)
_allMergesErrs
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
-> Seq Error
rule41 Seq Error
_elemsIerrors Seq Error
_errs1 Seq Error
_errs10 Seq Error
_errs11 Seq Error
_errs2 Seq Error
forall a. Seq a
_errs3 Seq Error
_errs4 Seq Error
_errs5 Seq Error
_errs6 Seq Error
_errs7 Seq Error
_errs8 Seq Error
_errs9
         _allNonterminals :: Set NontermIdent
_allNonterminals = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule42 Set NontermIdent
_elemsIcollectedNames Set NontermIdent
_elemsIcollectedSetNames
         _elemsOallConstructors :: Map NontermIdent (Set NontermIdent)
_elemsOallConstructors = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule43 Map NontermIdent (Set NontermIdent)
_elemsIcollectedConstructorsMap
         _elemsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_elemsOdefSets = Set NontermIdent
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
forall a.
Set NontermIdent -> Map NontermIdent (Set NontermIdent, Set a)
rule44 Set NontermIdent
_allNonterminals
         _elemsOdefinedSets :: Map NontermIdent (Set NontermIdent)
_elemsOdefinedSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule45 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_elemsIdefSets
         _elemsOattrDecls :: Map k a
_elemsOattrDecls = () -> Map k a
forall k a. () -> Map k a
rule46  ()
         _allAttrDecls :: Map NontermIdent (Attributes, Attributes)
_allAttrDecls = Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Options
-> Map NontermIdent (Attributes, Attributes)
rule47 Set NontermIdent
_allNonterminals Map NontermIdent (Attributes, Attributes)
_elemsIattrDecls Options
_lhsIoptions
         _allMacros :: Map NontermIdent (Map NontermIdent MaybeMacro)
_allMacros = [(NontermIdent, NontermIdent, MaybeMacro)]
-> Map NontermIdent (Map NontermIdent MaybeMacro)
rule48 [(NontermIdent, NontermIdent, MaybeMacro)]
_elemsIcollectedMacros
         _lhsOagi :: (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))
         _lhsOagi :: (Set NontermIdent, DataTypes,
 Map NontermIdent (Attributes, Attributes))
_lhsOagi = Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Set NontermIdent
-> (Set NontermIdent, DataTypes,
    Map NontermIdent (Attributes, Attributes))
forall c b a. c -> b -> a -> (a, b, c)
rule49 Map NontermIdent (Attributes, Attributes)
_allAttrs DataTypes
_allFields Set NontermIdent
_allNonterminals
         _allAttrs :: Map NontermIdent (Attributes, Attributes)
_allAttrs = Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Options
-> Map NontermIdent (Attributes, Attributes)
rule50 Set NontermIdent
_allNonterminals Map NontermIdent (Attributes, Attributes)
_elemsIattrs Options
_lhsIoptions
         _elemsOattrs :: Map k a
_elemsOattrs = () -> Map k a
forall k a. () -> Map k a
rule51  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = Blocks -> Blocks
rule52 Blocks
_elemsIblocks
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
rule53 Map NontermIdent ConstructorType
_elemsIconstructorTypeMap
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = Maybe (String, String, String) -> Maybe (String, String, String)
rule54 Maybe (String, String, String)
_elemsImoduleDecl
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = (Options -> Options) -> Options -> Options
rule55 Options -> Options
_elemsIpragmas
         _elemsOallAttrDecls :: Map NontermIdent (Attributes, Attributes)
_elemsOallAttrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
forall a. a -> a
rule56 Map NontermIdent (Attributes, Attributes)
_allAttrDecls
         _elemsOallAttrs :: Map NontermIdent (Attributes, Attributes)
_elemsOallAttrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
forall a. a -> a
rule57 Map NontermIdent (Attributes, Attributes)
_allAttrs
         _elemsOallFields :: DataTypes
_elemsOallFields = DataTypes -> DataTypes
forall a. a -> a
rule58 DataTypes
_allFields
         _elemsOallNonterminals :: Set NontermIdent
_elemsOallNonterminals = Set NontermIdent -> Set NontermIdent
forall a. a -> a
rule59 Set NontermIdent
_allNonterminals
         _elemsOoptions :: Options
_elemsOoptions = Options -> Options
rule60 Options
_lhsIoptions
         __result_ :: T_AG_vOut1
__result_ = (Set NontermIdent, DataTypes,
 Map NontermIdent (Attributes, Attributes))
-> Blocks
-> Map NontermIdent ConstructorType
-> Seq Error
-> Maybe (String, String, String)
-> Grammar
-> (Options -> Options)
-> T_AG_vOut1
T_AG_vOut1 (Set NontermIdent, DataTypes,
 Map NontermIdent (Attributes, Attributes))
_lhsOagi Blocks
_lhsOblocks Map NontermIdent ConstructorType
_lhsOconstructorTypeMap Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl Grammar
_lhsOoutput Options -> Options
_lhsOpragmas
         in T_AG_vOut1
__result_ )
     in T_AG_v1 -> T_AG_s2
C_AG_s2 T_AG_v1
v1
   {-# INLINE rule0 #-}
   {-# LINE 50 "src-ag/Transform.ag" #-}
   rule0 = \ _allAttrDecls _allConParams _allConstraints _allFields _allMacros _allNonterminals _checkedArounds _checkedAugments _checkedInsts _checkedMerges _checkedRules _checkedSigs _checkedUniques ((_elemsIattrOrderCollect) :: AttrOrderMap) ((_elemsIctxCollect) :: ContextMap) ((_elemsIderivings) :: Derivings) ((_elemsIparamsCollect) :: ParamMap) ((_elemsIquantCollect) :: QuantMap) ((_elemsIsemPragmasCollect) :: PragmaMap) ((_elemsItypeSyns) :: TypeSyns) ((_elemsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ((_elemsIwrappers) :: Set NontermIdent) ((_lhsIoptions) :: Options) _prodOrder ->
                      {-# LINE 50 "src-ag/Transform.ag" #-}
                      constructGrammar _allNonterminals
                                       _elemsIparamsCollect
                                       _allConParams
                                       _allFields
                                       _prodOrder
                                       _allConstraints
                                       _allAttrDecls
                                       _elemsIuseMap
                                       _elemsIderivings
                                       (if wrappers _lhsIoptions then _allNonterminals     else _elemsIwrappers)
                                       _checkedRules
                                       _checkedSigs
                                       _checkedInsts
                                       _elemsItypeSyns
                                       _elemsIsemPragmasCollect
                                       _elemsIattrOrderCollect
                                       _elemsIctxCollect
                                       _elemsIquantCollect
                                       _checkedUniques
                                       _checkedAugments
                                       _checkedArounds
                                       _checkedMerges
                                       _allMacros
                      {-# LINE 650 "src-generated/Transform.hs" #-}
   {-# INLINE rule1 #-}
   {-# LINE 258 "src-ag/Transform.ag" #-}
   rule1 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->
                             {-# LINE 258 "src-ag/Transform.ag" #-}
                             let f (nt,con,_) = Map.insertWith g nt [con]
                                 g [con] lst | con `elem` lst = lst
                                             | otherwise      = con : lst
                                 g _ _ = error "This is not possible"
                             in  foldr f Map.empty _elemsIcollectedFields
                             {-# LINE 660 "src-generated/Transform.hs" #-}
   {-# INLINE rule2 #-}
   {-# LINE 263 "src-ag/Transform.ag" #-}
   rule2 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->
                             {-# LINE 263 "src-ag/Transform.ag" #-}
                             let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)
                             in  foldr f (Map.empty) _elemsIcollectedFields
                             {-# LINE 667 "src-generated/Transform.hs" #-}
   {-# INLINE rule3 #-}
   {-# LINE 266 "src-ag/Transform.ag" #-}
   rule3 = \ ((_elemsIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->
                                {-# LINE 266 "src-ag/Transform.ag" #-}
                                let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)
                                in  foldr f (Map.empty) _elemsIcollectedConstraints
                                {-# LINE 674 "src-generated/Transform.hs" #-}
   {-# INLINE rule4 #-}
   {-# LINE 269 "src-ag/Transform.ag" #-}
   rule4 = \ ((_elemsIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->
                                {-# LINE 269 "src-ag/Transform.ag" #-}
                                let f (nt,con,fm) = Map.insertWith (Map.unionWith Set.union) nt (Map.singleton con fm)
                                in  foldr f (Map.empty) _elemsIcollectedConParams
                                {-# LINE 681 "src-generated/Transform.hs" #-}
   {-# INLINE rule5 #-}
   {-# LINE 272 "src-ag/Transform.ag" #-}
   rule5 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->
                             {-# LINE 272 "src-ag/Transform.ag" #-}
                             let f (nt,con,_) = Map.insertWith (++) nt [con]
                             in  foldr f (Map.empty) _elemsIcollectedFields
                             {-# LINE 688 "src-generated/Transform.hs" #-}
   {-# INLINE rule6 #-}
   {-# LINE 275 "src-ag/Transform.ag" #-}
   rule6 = \ ((_elemsIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->
                             {-# LINE 275 "src-ag/Transform.ag" #-}
                             let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])
                             in  foldr f (Map.empty) _elemsIcollectedRules
                             {-# LINE 695 "src-generated/Transform.hs" #-}
   {-# INLINE rule7 #-}
   {-# LINE 278 "src-ag/Transform.ag" #-}
   rule7 = \ _allAttrDecls ((_elemsIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_elemsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->
                             {-# LINE 278 "src-ag/Transform.ag" #-}
                             let f (nt,con,t) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [t])
                                 typeof nt r = Map.findWithDefault (Haskell "<unknown>") r $ fst $ Map.findWithDefault (Map.empty,Map.empty) nt _allAttrDecls
                             in  foldr f (Map.empty) ( _elemsIcollectedSigs
                                                     ++ [ (nt, con, (ident,typeof nt ref))  | (nt, con, us) <- _elemsIcollectedUniques, (ident,ref) <- us ]
                                                     )
                             {-# LINE 705 "src-generated/Transform.hs" #-}
   {-# INLINE rule8 #-}
   {-# LINE 284 "src-ag/Transform.ag" #-}
   rule8 = \ ((_elemsIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->
                             {-# LINE 284 "src-ag/Transform.ag" #-}
                             let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)
                             in  foldr f (Map.empty) _elemsIcollectedInsts
                             {-# LINE 712 "src-generated/Transform.hs" #-}
   {-# INLINE rule9 #-}
   {-# LINE 287 "src-ag/Transform.ag" #-}
   rule9 = \ ((_elemsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->
                             {-# LINE 287 "src-ag/Transform.ag" #-}
                             let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)
                             in foldr f (Map.empty) _elemsIcollectedUniques
                             {-# LINE 719 "src-generated/Transform.hs" #-}
   {-# INLINE rule10 #-}
   {-# LINE 289 "src-ag/Transform.ag" #-}
   rule10 = \ ((_elemsIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->
                             {-# LINE 289 "src-ag/Transform.ag" #-}
                             let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)
                             in foldr f Map.empty _elemsIcollectedAugments
                             {-# LINE 726 "src-generated/Transform.hs" #-}
   {-# INLINE rule11 #-}
   {-# LINE 291 "src-ag/Transform.ag" #-}
   rule11 = \ ((_elemsIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ->
                              {-# LINE 291 "src-ag/Transform.ag" #-}
                              let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)
                              in foldr f Map.empty _elemsIcollectedArounds
                              {-# LINE 733 "src-generated/Transform.hs" #-}
   {-# INLINE rule12 #-}
   {-# LINE 293 "src-ag/Transform.ag" #-}
   rule12 = \ ((_elemsIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) ->
                              {-# LINE 293 "src-ag/Transform.ag" #-}
                              let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)
                               in foldr f Map.empty _elemsIcollectedMerges
                              {-# LINE 740 "src-generated/Transform.hs" #-}
   {-# INLINE rule13 #-}
   {-# LINE 296 "src-ag/Transform.ag" #-}
   rule13 = \ _allAugments ->
                                {-# LINE 296 "src-ag/Transform.ag" #-}
                                let gen _ = []
                                in Map.map (Map.map gen) _allAugments
                                {-# LINE 747 "src-generated/Transform.hs" #-}
   {-# INLINE rule14 #-}
   {-# LINE 299 "src-ag/Transform.ag" #-}
   rule14 = \ _allAttrDecls _allFields _allInsts _allMerges _allRules _allSigs ->
                                {-# LINE 299 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs     _allMerges    )) _allRules
                                {-# LINE 753 "src-generated/Transform.hs" #-}
   {-# INLINE rule15 #-}
   {-# LINE 300 "src-ag/Transform.ag" #-}
   rule15 = \ _allRules ->
                                {-# LINE 300 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules
                                {-# LINE 759 "src-generated/Transform.hs" #-}
   {-# INLINE rule16 #-}
   {-# LINE 301 "src-ag/Transform.ag" #-}
   rule16 = \ _allSigs ->
                                {-# LINE 301 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkSigs                                                 )) _allSigs
                                {-# LINE 765 "src-generated/Transform.hs" #-}
   {-# INLINE rule17 #-}
   {-# LINE 302 "src-ag/Transform.ag" #-}
   rule17 = \ _allFields _allInsts _allNonterminals _allSigs ->
                                {-# LINE 302 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals     _allSigs     _allFields   )) _allInsts
                                {-# LINE 771 "src-generated/Transform.hs" #-}
   {-# INLINE rule18 #-}
   {-# LINE 303 "src-ag/Transform.ag" #-}
   rule18 = \ _allAttrDecls _allUniques ->
                                {-# LINE 303 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls                                )) _allUniques
                                {-# LINE 777 "src-generated/Transform.hs" #-}
   {-# INLINE rule19 #-}
   {-# LINE 304 "src-ag/Transform.ag" #-}
   rule19 = \ _allAttrDecls _allAugments ->
                                {-# LINE 304 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls                               )) _allAugments
                                {-# LINE 783 "src-generated/Transform.hs" #-}
   {-# INLINE rule20 #-}
   {-# LINE 305 "src-ag/Transform.ag" #-}
   rule20 = \ _allArounds _allFields ->
                                {-# LINE 305 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields    )) _allArounds
                                {-# LINE 789 "src-generated/Transform.hs" #-}
   {-# INLINE rule21 #-}
   {-# LINE 306 "src-ag/Transform.ag" #-}
   rule21 = \ _allFields _allInsts _allMerges _allNonterminals ->
                                {-# LINE 306 "src-ag/Transform.ag" #-}
                                Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals     _allInsts     _allFields    )) _allMerges
                                {-# LINE 795 "src-generated/Transform.hs" #-}
   {-# INLINE rule22 #-}
   {-# LINE 308 "src-ag/Transform.ag" #-}
   rule22 = \ _allRulesErrs ->
                                 {-# LINE 308 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allRulesErrs
                                 {-# LINE 801 "src-generated/Transform.hs" #-}
   {-# INLINE rule23 #-}
   {-# LINE 309 "src-ag/Transform.ag" #-}
   rule23 = \ _allSigsErrs _augmentSigs ->
                                 {-# LINE 309 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allSigsErrs     `unionunionplusplus` _augmentSigs
                                 {-# LINE 807 "src-generated/Transform.hs" #-}
   {-# INLINE rule24 #-}
   {-# LINE 310 "src-ag/Transform.ag" #-}
   rule24 = \ _allInstsErrs ->
                                 {-# LINE 310 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allInstsErrs
                                 {-# LINE 813 "src-generated/Transform.hs" #-}
   {-# INLINE rule25 #-}
   {-# LINE 311 "src-ag/Transform.ag" #-}
   rule25 = \ _allUniquesErrs ->
                                 {-# LINE 311 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allUniquesErrs
                                 {-# LINE 819 "src-generated/Transform.hs" #-}
   {-# INLINE rule26 #-}
   {-# LINE 312 "src-ag/Transform.ag" #-}
   rule26 = \ _allAugmentErrs ->
                                 {-# LINE 312 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allAugmentErrs
                                 {-# LINE 825 "src-generated/Transform.hs" #-}
   {-# INLINE rule27 #-}
   {-# LINE 313 "src-ag/Transform.ag" #-}
   rule27 = \ _allAroundsErrs ->
                                 {-# LINE 313 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allAroundsErrs
                                 {-# LINE 831 "src-generated/Transform.hs" #-}
   {-# INLINE rule28 #-}
   {-# LINE 314 "src-ag/Transform.ag" #-}
   rule28 = \ _allAttrDecls _allFields _allRules _checkedInsts _checkedRulesPre _checkedUniques ((_lhsIoptions) :: Options) ->
                                 {-# LINE 314 "src-ag/Transform.ag" #-}
                                 Map.unionWith (Map.unionWith (++)) _checkedRulesPre     (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allRules     _allFields     _checkedInsts     _allAttrDecls    )) _checkedUniques    )
                                 {-# LINE 837 "src-generated/Transform.hs" #-}
   {-# INLINE rule29 #-}
   {-# LINE 315 "src-ag/Transform.ag" #-}
   rule29 = \ _allMergesErrs ->
                                 {-# LINE 315 "src-ag/Transform.ag" #-}
                                 Map.map (Map.map fst) _allMergesErrs
                                 {-# LINE 843 "src-generated/Transform.hs" #-}
   {-# INLINE rule30 #-}
   {-# LINE 317 "src-ag/Transform.ag" #-}
   rule30 = \ ((_elemsItypeSyns) :: TypeSyns) ->
                             {-# LINE 317 "src-ag/Transform.ag" #-}
                             let f = checkForDuplicates (DupSynonym)
                             in  Seq.fromList . f . map fst $ _elemsItypeSyns
                             {-# LINE 850 "src-generated/Transform.hs" #-}
   {-# INLINE rule31 #-}
   {-# LINE 320 "src-ag/Transform.ag" #-}
   rule31 = \ _allFields ->
                             {-# LINE 320 "src-ag/Transform.ag" #-}
                             let g nt (con,fm) = checkForDuplicates (DupChild nt con) (map fst fm)
                                 f (nt,cfm)    = concat . map (g nt) . Map.toList $ cfm
                             in  Seq.fromList . concat . map f . Map.toList $ _allFields
                             {-# LINE 858 "src-generated/Transform.hs" #-}
   {-# INLINE rule32 #-}
   {-# LINE 324 "src-ag/Transform.ag" #-}
   rule32 = \  (_ :: ()) ->
                             {-# LINE 324 "src-ag/Transform.ag" #-}
                             let
                             in   Seq.empty
                             {-# LINE 865 "src-generated/Transform.hs" #-}
   {-# INLINE rule33 #-}
   {-# LINE 328 "src-ag/Transform.ag" #-}
   rule33 = \ _allRulesErrs ->
                             {-# LINE 328 "src-ag/Transform.ag" #-}
                             let  f m s = Map.foldr ((><) . snd) s m
                             in Map.foldr f Seq.empty _allRulesErrs
                             {-# LINE 872 "src-generated/Transform.hs" #-}
   {-# INLINE rule34 #-}
   {-# LINE 331 "src-ag/Transform.ag" #-}
   rule34 = \ _allSigsErrs ->
                             {-# LINE 331 "src-ag/Transform.ag" #-}
                             let  f m s = Map.foldr ((><) . snd) s m
                             in Map.foldr f Seq.empty _allSigsErrs
                             {-# LINE 879 "src-generated/Transform.hs" #-}
   {-# INLINE rule35 #-}
   {-# LINE 334 "src-ag/Transform.ag" #-}
   rule35 = \ _allInstsErrs ->
                             {-# LINE 334 "src-ag/Transform.ag" #-}
                             let  f m s = Map.foldr ((><) . snd) s m
                             in Map.foldr f Seq.empty _allInstsErrs
                             {-# LINE 886 "src-generated/Transform.hs" #-}
   {-# INLINE rule36 #-}
   {-# LINE 337 "src-ag/Transform.ag" #-}
   rule36 = \ _allUniquesErrs ->
                             {-# LINE 337 "src-ag/Transform.ag" #-}
                             let  f m s = Map.foldr ((><) . snd) s m
                             in Map.foldr f Seq.empty _allUniquesErrs
                             {-# LINE 893 "src-generated/Transform.hs" #-}
   {-# INLINE rule37 #-}
   {-# LINE 340 "src-ag/Transform.ag" #-}
   rule37 = \ _allAugmentErrs ->
                             {-# LINE 340 "src-ag/Transform.ag" #-}
                             let  f m s = Map.foldr ((><) . snd) s m
                             in Map.foldr f Seq.empty _allAugmentErrs
                             {-# LINE 900 "src-generated/Transform.hs" #-}
   {-# INLINE rule38 #-}
   {-# LINE 343 "src-ag/Transform.ag" #-}
   rule38 = \ _allAroundsErrs ->
                             {-# LINE 343 "src-ag/Transform.ag" #-}
                             let  f m s = Map.foldr ((><) . snd) s m
                             in Map.foldr f Seq.empty _allAroundsErrs
                             {-# LINE 907 "src-generated/Transform.hs" #-}
   {-# INLINE rule39 #-}
   {-# LINE 346 "src-ag/Transform.ag" #-}
   rule39 = \ _allNamesErrs ->
                              {-# LINE 346 "src-ag/Transform.ag" #-}
                              let  f m s = Map.foldr ((><)) s m
                              in Map.foldr f Seq.empty _allNamesErrs
                              {-# LINE 914 "src-generated/Transform.hs" #-}
   {-# INLINE rule40 #-}
   {-# LINE 349 "src-ag/Transform.ag" #-}
   rule40 = \ _allMergesErrs ->
                              {-# LINE 349 "src-ag/Transform.ag" #-}
                              let f m s = Map.foldr ((><) . snd) s m
                              in Map.foldr f Seq.empty _allMergesErrs
                              {-# LINE 921 "src-generated/Transform.hs" #-}
   {-# INLINE rule41 #-}
   {-# LINE 352 "src-ag/Transform.ag" #-}
   rule41 = \ ((_elemsIerrors) :: Seq Error) _errs1 _errs10 _errs11 _errs2 _errs3 _errs4 _errs5 _errs6 _errs7 _errs8 _errs9 ->
                             {-# LINE 352 "src-ag/Transform.ag" #-}
                             _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11
                             {-# LINE 927 "src-generated/Transform.hs" #-}
   {-# INLINE rule42 #-}
   {-# LINE 606 "src-ag/Transform.ag" #-}
   rule42 = \ ((_elemsIcollectedNames) :: Set Identifier) ((_elemsIcollectedSetNames) :: Set Identifier) ->
                                 {-# LINE 606 "src-ag/Transform.ag" #-}
                                 _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames
                                 {-# LINE 933 "src-generated/Transform.hs" #-}
   {-# INLINE rule43 #-}
   {-# LINE 626 "src-ag/Transform.ag" #-}
   rule43 = \ ((_elemsIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ->
                                 {-# LINE 626 "src-ag/Transform.ag" #-}
                                 _elemsIcollectedConstructorsMap
                                 {-# LINE 939 "src-generated/Transform.hs" #-}
   {-# INLINE rule44 #-}
   {-# LINE 709 "src-ag/Transform.ag" #-}
   rule44 = \ _allNonterminals ->
                             {-# LINE 709 "src-ag/Transform.ag" #-}
                             Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals    ))
                             {-# LINE 945 "src-generated/Transform.hs" #-}
   {-# INLINE rule45 #-}
   {-# LINE 710 "src-ag/Transform.ag" #-}
   rule45 = \ ((_elemsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
                             {-# LINE 710 "src-ag/Transform.ag" #-}
                             Map.map fst _elemsIdefSets
                             {-# LINE 951 "src-generated/Transform.hs" #-}
   {-# INLINE rule46 #-}
   {-# LINE 1030 "src-ag/Transform.ag" #-}
   rule46 = \  (_ :: ()) ->
                           {-# LINE 1030 "src-ag/Transform.ag" #-}
                           Map.empty
                           {-# LINE 957 "src-generated/Transform.hs" #-}
   {-# INLINE rule47 #-}
   {-# LINE 1086 "src-ag/Transform.ag" #-}
   rule47 = \ _allNonterminals ((_elemsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ((_lhsIoptions) :: Options) ->
                             {-# LINE 1086 "src-ag/Transform.ag" #-}
                             if withSelf _lhsIoptions
                              then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals    )
                              else               _elemsIattrDecls
                             {-# LINE 965 "src-generated/Transform.hs" #-}
   {-# INLINE rule48 #-}
   {-# LINE 1328 "src-ag/Transform.ag" #-}
   rule48 = \ ((_elemsIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->
                             {-# LINE 1328 "src-ag/Transform.ag" #-}
                             let f (nt,con,m) = Map.insertWith (Map.union) nt (Map.singleton con m)
                             in  foldr f (Map.empty) _elemsIcollectedMacros
                             {-# LINE 972 "src-generated/Transform.hs" #-}
   {-# INLINE rule49 #-}
   {-# LINE 1341 "src-ag/Transform.ag" #-}
   rule49 = \ _allAttrs _allFields _allNonterminals ->
                        {-# LINE 1341 "src-ag/Transform.ag" #-}
                        (_allNonterminals    ,_allFields    ,_allAttrs    )
                        {-# LINE 978 "src-generated/Transform.hs" #-}
   {-# INLINE rule50 #-}
   {-# LINE 1343 "src-ag/Transform.ag" #-}
   rule50 = \ _allNonterminals ((_elemsIattrs) :: Map NontermIdent (Attributes, Attributes)) ((_lhsIoptions) :: Options) ->
                         {-# LINE 1343 "src-ag/Transform.ag" #-}
                         if withSelf _lhsIoptions
                              then foldr addSelf _elemsIattrs (Set.toList _allNonterminals    )
                              else               _elemsIattrs
                         {-# LINE 986 "src-generated/Transform.hs" #-}
   {-# INLINE rule51 #-}
   {-# LINE 1351 "src-ag/Transform.ag" #-}
   rule51 = \  (_ :: ()) ->
                        {-# LINE 1351 "src-ag/Transform.ag" #-}
                        Map.empty
                        {-# LINE 992 "src-generated/Transform.hs" #-}
   {-# INLINE rule52 #-}
   rule52 = \ ((_elemsIblocks) :: Blocks) ->
     _elemsIblocks
   {-# INLINE rule53 #-}
   rule53 = \ ((_elemsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
     _elemsIconstructorTypeMap
   {-# INLINE rule54 #-}
   rule54 = \ ((_elemsImoduleDecl) :: Maybe (String,String,String)) ->
     _elemsImoduleDecl
   {-# INLINE rule55 #-}
   rule55 = \ ((_elemsIpragmas) :: Options -> Options) ->
     _elemsIpragmas
   {-# INLINE rule56 #-}
   rule56 = \ _allAttrDecls ->
     _allAttrDecls
   {-# INLINE rule57 #-}
   rule57 = \ _allAttrs ->
     _allAttrs
   {-# INLINE rule58 #-}
   rule58 = \ _allFields ->
     _allFields
   {-# INLINE rule59 #-}
   rule59 = \ _allNonterminals ->
     _allNonterminals
   {-# INLINE rule60 #-}
   rule60 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions

-- Alt ---------------------------------------------------------
-- wrapper
data Inh_Alt  = Inh_Alt { Inh_Alt -> Map NontermIdent (Set NontermIdent)
allConstructors_Inh_Alt :: (Map NontermIdent (Set ConstructorIdent)), Inh_Alt -> Set NontermIdent
allNonterminals_Inh_Alt :: (Set NontermIdent), Inh_Alt -> Set NontermIdent
nts_Inh_Alt :: (Set NontermIdent) }
data Syn_Alt  = Syn_Alt { Syn_Alt -> [(NontermIdent, NontermIdent, Set NontermIdent)]
collectedConParams_Syn_Alt :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), Syn_Alt -> [(NontermIdent, NontermIdent, [Type])]
collectedConstraints_Syn_Alt :: ([(NontermIdent, ConstructorIdent, [Type])]), Syn_Alt -> Set NontermIdent
collectedConstructorNames_Syn_Alt :: (Set ConstructorIdent), Syn_Alt -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
collectedFields_Syn_Alt :: ([(NontermIdent, ConstructorIdent, FieldMap)]), Syn_Alt -> [(NontermIdent, NontermIdent, MaybeMacro)]
collectedMacros_Syn_Alt :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]) }
{-# INLINABLE wrap_Alt #-}
wrap_Alt :: T_Alt  -> Inh_Alt  -> (Syn_Alt )
wrap_Alt :: T_Alt -> Inh_Alt -> Syn_Alt
wrap_Alt (T_Alt Identity T_Alt_s5
act) (Inh_Alt Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts) =
   Identity Syn_Alt -> Syn_Alt
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Alt_s5
sem <- Identity T_Alt_s5
act
        let arg4 :: T_Alt_vIn4
arg4 = Map NontermIdent (Set NontermIdent)
-> Set NontermIdent -> Set NontermIdent -> T_Alt_vIn4
T_Alt_vIn4 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts
        (T_Alt_vOut4 [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros) <- T_Alt_vOut4 -> Identity T_Alt_vOut4
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Alt_s5 -> T_Alt_v4
inv_Alt_s5 T_Alt_s5
sem T_Alt_vIn4
arg4)
        Syn_Alt -> Identity Syn_Alt
forall (m :: * -> *) a. Monad m => a -> m a
return ([(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> Syn_Alt
Syn_Alt [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros)
   )

-- cata
{-# INLINE sem_Alt #-}
sem_Alt :: Alt  -> T_Alt 
sem_Alt :: Alt -> T_Alt
sem_Alt ( Alt Pos
pos_ ConstructorSet
names_ [NontermIdent]
tyvars_ Fields
fields_ MaybeMacro
macro_ ) = Pos
-> T_ConstructorSet
-> [NontermIdent]
-> T_Fields
-> MaybeMacro
-> T_Alt
sem_Alt_Alt Pos
pos_ ( ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ConstructorSet
names_ ) [NontermIdent]
tyvars_ ( Fields -> T_Fields
sem_Fields Fields
fields_ ) MaybeMacro
macro_

-- semantic domain
newtype T_Alt  = T_Alt {
                       T_Alt -> Identity T_Alt_s5
attach_T_Alt :: Identity (T_Alt_s5 )
                       }
newtype T_Alt_s5  = C_Alt_s5 {
                             T_Alt_s5 -> T_Alt_v4
inv_Alt_s5 :: (T_Alt_v4 )
                             }
data T_Alt_s6  = C_Alt_s6
type T_Alt_v4  = (T_Alt_vIn4 ) -> (T_Alt_vOut4 )
data T_Alt_vIn4  = T_Alt_vIn4 (Map NontermIdent (Set ConstructorIdent)) (Set NontermIdent) (Set NontermIdent)
data T_Alt_vOut4  = T_Alt_vOut4 ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Set ConstructorIdent) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([(NontermIdent, ConstructorIdent, MaybeMacro)])
{-# NOINLINE sem_Alt_Alt #-}
sem_Alt_Alt :: (Pos) -> T_ConstructorSet  -> ([Identifier]) -> T_Fields  -> (MaybeMacro) -> T_Alt 
sem_Alt_Alt :: Pos
-> T_ConstructorSet
-> [NontermIdent]
-> T_Fields
-> MaybeMacro
-> T_Alt
sem_Alt_Alt Pos
_ T_ConstructorSet
arg_names_ [NontermIdent]
arg_tyvars_ T_Fields
arg_fields_ MaybeMacro
arg_macro_ = Identity T_Alt_s5 -> T_Alt
T_Alt (T_Alt_s5 -> Identity T_Alt_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_Alt_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_Alt_s5
st5 = let
      v4 :: T_Alt_v4 
      v4 :: T_Alt_v4
v4 = \ (T_Alt_vIn4 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts) -> ( let
         _namesX14 :: T_ConstructorSet_s14
_namesX14 = Identity T_ConstructorSet_s14 -> T_ConstructorSet_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet (T_ConstructorSet
arg_names_))
         _fieldsX26 :: T_Fields_s26
_fieldsX26 = Identity T_Fields_s26 -> T_Fields_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Fields -> Identity T_Fields_s26
attach_T_Fields (T_Fields
arg_fields_))
         (T_ConstructorSet_vOut13 Set NontermIdent
_namesIcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_namesIconstructors Seq Error
_namesIerrors) = T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
_namesX14 (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 )
         (T_Fields_vOut25 [Type]
_fieldsIcollectedConstraints [(NontermIdent, Type)]
_fieldsIcollectedFields) = T_Fields_s26 -> T_Fields_v25
inv_Fields_s26 T_Fields_s26
_fieldsX26 (Set NontermIdent -> T_Fields_vIn25
T_Fields_vIn25 Set NontermIdent
_fieldsOallNonterminals)
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = [(NontermIdent, Type)]
-> Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
rule61 [(NontermIdent, Type)]
_fieldsIcollectedFields Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsInts Set NontermIdent -> Set NontermIdent
_namesIconstructors
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = [Type]
-> Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> [(NontermIdent, NontermIdent, [Type])]
rule62 [Type]
_fieldsIcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsInts Set NontermIdent -> Set NontermIdent
_namesIconstructors
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> [NontermIdent]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
rule63 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsInts Set NontermIdent -> Set NontermIdent
_namesIconstructors [NontermIdent]
arg_tyvars_
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> MaybeMacro
-> [(NontermIdent, NontermIdent, MaybeMacro)]
forall c.
Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> c
-> [(NontermIdent, NontermIdent, c)]
rule64 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsInts Set NontermIdent -> Set NontermIdent
_namesIconstructors MaybeMacro
arg_macro_
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = Set NontermIdent -> Set NontermIdent
rule65 Set NontermIdent
_namesIcollectedConstructorNames
         _fieldsOallNonterminals :: Set NontermIdent
_fieldsOallNonterminals = Set NontermIdent -> Set NontermIdent
rule66 Set NontermIdent
_lhsIallNonterminals
         __result_ :: T_Alt_vOut4
__result_ = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> T_Alt_vOut4
T_Alt_vOut4 [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros
         in T_Alt_vOut4
__result_ )
     in T_Alt_v4 -> T_Alt_s5
C_Alt_s5 T_Alt_v4
v4
   {-# INLINE rule61 #-}
   {-# LINE 240 "src-ag/Transform.ag" #-}
   rule61 = \ ((_fieldsIcollectedFields) :: [(Identifier, Type)]) ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->
                                        {-# LINE 240 "src-ag/Transform.ag" #-}
                                        [ (nt, con, _fieldsIcollectedFields)
                                        | nt  <- Set.toList _lhsInts
                                        , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))
                                        ]
                                        {-# LINE 1084 "src-generated/Transform.hs" #-}
   {-# INLINE rule62 #-}
   {-# LINE 244 "src-ag/Transform.ag" #-}
   rule62 = \ ((_fieldsIcollectedConstraints) :: [Type]) ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->
                                        {-# LINE 244 "src-ag/Transform.ag" #-}
                                        [ (nt, con, _fieldsIcollectedConstraints)
                                        | nt  <- Set.toList _lhsInts
                                        , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))
                                        ]
                                        {-# LINE 1093 "src-generated/Transform.hs" #-}
   {-# INLINE rule63 #-}
   {-# LINE 248 "src-ag/Transform.ag" #-}
   rule63 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) tyvars_ ->
                                        {-# LINE 248 "src-ag/Transform.ag" #-}
                                        [ (nt, con, Set.fromList tyvars_)
                                        | nt  <- Set.toList _lhsInts
                                        , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))
                                        ]
                                        {-# LINE 1102 "src-generated/Transform.hs" #-}
   {-# INLINE rule64 #-}
   {-# LINE 1319 "src-ag/Transform.ag" #-}
   rule64 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) macro_ ->
                                        {-# LINE 1319 "src-ag/Transform.ag" #-}
                                        [ (nt, con, macro_)
                                        | nt  <- Set.toList _lhsInts
                                        , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))
                                        ]
                                        {-# LINE 1111 "src-generated/Transform.hs" #-}
   {-# INLINE rule65 #-}
   rule65 = \ ((_namesIcollectedConstructorNames) :: Set ConstructorIdent) ->
     _namesIcollectedConstructorNames
   {-# INLINE rule66 #-}
   rule66 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals

-- Alts --------------------------------------------------------
-- wrapper
data Inh_Alts  = Inh_Alts { Inh_Alts -> Map NontermIdent (Set NontermIdent)
allConstructors_Inh_Alts :: (Map NontermIdent (Set ConstructorIdent)), Inh_Alts -> Set NontermIdent
allNonterminals_Inh_Alts :: (Set NontermIdent), Inh_Alts -> Set NontermIdent
nts_Inh_Alts :: (Set NontermIdent) }
data Syn_Alts  = Syn_Alts { Syn_Alts -> [(NontermIdent, NontermIdent, Set NontermIdent)]
collectedConParams_Syn_Alts :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), Syn_Alts -> [(NontermIdent, NontermIdent, [Type])]
collectedConstraints_Syn_Alts :: ([(NontermIdent, ConstructorIdent, [Type])]), Syn_Alts -> Set NontermIdent
collectedConstructorNames_Syn_Alts :: (Set ConstructorIdent), Syn_Alts -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
collectedFields_Syn_Alts :: ([(NontermIdent, ConstructorIdent, FieldMap)]), Syn_Alts -> [(NontermIdent, NontermIdent, MaybeMacro)]
collectedMacros_Syn_Alts :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]) }
{-# INLINABLE wrap_Alts #-}
wrap_Alts :: T_Alts  -> Inh_Alts  -> (Syn_Alts )
wrap_Alts :: T_Alts -> Inh_Alts -> Syn_Alts
wrap_Alts (T_Alts Identity T_Alts_s8
act) (Inh_Alts Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts) =
   Identity Syn_Alts -> Syn_Alts
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Alts_s8
sem <- Identity T_Alts_s8
act
        let arg7 :: T_Alts_vIn7
arg7 = Map NontermIdent (Set NontermIdent)
-> Set NontermIdent -> Set NontermIdent -> T_Alts_vIn7
T_Alts_vIn7 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts
        (T_Alts_vOut7 [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros) <- T_Alts_vOut7 -> Identity T_Alts_vOut7
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Alts_s8 -> T_Alts_v7
inv_Alts_s8 T_Alts_s8
sem T_Alts_vIn7
arg7)
        Syn_Alts -> Identity Syn_Alts
forall (m :: * -> *) a. Monad m => a -> m a
return ([(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> Syn_Alts
Syn_Alts [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros)
   )

-- cata
{-# NOINLINE sem_Alts #-}
sem_Alts :: Alts  -> T_Alts 
sem_Alts :: Alts -> T_Alts
sem_Alts Alts
list = (T_Alt -> T_Alts -> T_Alts) -> T_Alts -> [T_Alt] -> T_Alts
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Alt -> T_Alts -> T_Alts
sem_Alts_Cons T_Alts
sem_Alts_Nil ((Alt -> T_Alt) -> Alts -> [T_Alt]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Alt -> T_Alt
sem_Alt Alts
list)

-- semantic domain
newtype T_Alts  = T_Alts {
                         T_Alts -> Identity T_Alts_s8
attach_T_Alts :: Identity (T_Alts_s8 )
                         }
newtype T_Alts_s8  = C_Alts_s8 {
                               T_Alts_s8 -> T_Alts_v7
inv_Alts_s8 :: (T_Alts_v7 )
                               }
data T_Alts_s9  = C_Alts_s9
type T_Alts_v7  = (T_Alts_vIn7 ) -> (T_Alts_vOut7 )
data T_Alts_vIn7  = T_Alts_vIn7 (Map NontermIdent (Set ConstructorIdent)) (Set NontermIdent) (Set NontermIdent)
data T_Alts_vOut7  = T_Alts_vOut7 ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Set ConstructorIdent) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([(NontermIdent, ConstructorIdent, MaybeMacro)])
{-# NOINLINE sem_Alts_Cons #-}
sem_Alts_Cons :: T_Alt  -> T_Alts  -> T_Alts 
sem_Alts_Cons :: T_Alt -> T_Alts -> T_Alts
sem_Alts_Cons T_Alt
arg_hd_ T_Alts
arg_tl_ = Identity T_Alts_s8 -> T_Alts
T_Alts (T_Alts_s8 -> Identity T_Alts_s8
forall (m :: * -> *) a. Monad m => a -> m a
return T_Alts_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_Alts_s8
st8 = let
      v7 :: T_Alts_v7 
      v7 :: T_Alts_v7
v7 = \ (T_Alts_vIn7 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts) -> ( let
         _hdX5 :: T_Alt_s5
_hdX5 = Identity T_Alt_s5 -> T_Alt_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Alt -> Identity T_Alt_s5
attach_T_Alt (T_Alt
arg_hd_))
         _tlX8 :: T_Alts_s8
_tlX8 = Identity T_Alts_s8 -> T_Alts_s8
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Alts -> Identity T_Alts_s8
attach_T_Alts (T_Alts
arg_tl_))
         (T_Alt_vOut4 [(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints Set NontermIdent
_hdIcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros) = T_Alt_s5 -> T_Alt_v4
inv_Alt_s5 T_Alt_s5
_hdX5 (Map NontermIdent (Set NontermIdent)
-> Set NontermIdent -> Set NontermIdent -> T_Alt_vIn4
T_Alt_vIn4 Map NontermIdent (Set NontermIdent)
_hdOallConstructors Set NontermIdent
_hdOallNonterminals Set NontermIdent
_hdOnts)
         (T_Alts_vOut7 [(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints Set NontermIdent
_tlIcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros) = T_Alts_s8 -> T_Alts_v7
inv_Alts_s8 T_Alts_s8
_tlX8 (Map NontermIdent (Set NontermIdent)
-> Set NontermIdent -> Set NontermIdent -> T_Alts_vIn7
T_Alts_vIn7 Map NontermIdent (Set NontermIdent)
_tlOallConstructors Set NontermIdent
_tlOallNonterminals Set NontermIdent
_tlOnts)
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
rule67 [(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams [(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
rule68 [(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints [(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule69 Set NontermIdent
_hdIcollectedConstructorNames Set NontermIdent
_tlIcollectedConstructorNames
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
rule70 [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
rule71 [(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros [(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros
         _hdOallConstructors :: Map NontermIdent (Set NontermIdent)
_hdOallConstructors = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule72 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
         _hdOallNonterminals :: Set NontermIdent
_hdOallNonterminals = Set NontermIdent -> Set NontermIdent
rule73 Set NontermIdent
_lhsIallNonterminals
         _hdOnts :: Set NontermIdent
_hdOnts = Set NontermIdent -> Set NontermIdent
rule74 Set NontermIdent
_lhsInts
         _tlOallConstructors :: Map NontermIdent (Set NontermIdent)
_tlOallConstructors = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule75 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
         _tlOallNonterminals :: Set NontermIdent
_tlOallNonterminals = Set NontermIdent -> Set NontermIdent
rule76 Set NontermIdent
_lhsIallNonterminals
         _tlOnts :: Set NontermIdent
_tlOnts = Set NontermIdent -> Set NontermIdent
rule77 Set NontermIdent
_lhsInts
         __result_ :: T_Alts_vOut7
__result_ = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> T_Alts_vOut7
T_Alts_vOut7 [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros
         in T_Alts_vOut7
__result_ )
     in T_Alts_v7 -> T_Alts_s8
C_Alts_s8 T_Alts_v7
v7
   {-# INLINE rule67 #-}
   rule67 :: [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
rule67 = \ (([(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) (([(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->
     [(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams
   {-# INLINE rule68 #-}
   rule68 :: [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
rule68 = \ (([(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) (([(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->
     [(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints
   {-# INLINE rule69 #-}
   rule69 :: Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule69 = \ ((Set NontermIdent
_hdIcollectedConstructorNames) :: Set ConstructorIdent) ((Set NontermIdent
_tlIcollectedConstructorNames) :: Set ConstructorIdent) ->
     Set NontermIdent
_hdIcollectedConstructorNames Set NontermIdent -> Set NontermIdent -> Set NontermIdent
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set NontermIdent
_tlIcollectedConstructorNames
   {-# INLINE rule70 #-}
   rule70 :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
rule70 = \ (([(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) (([(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->
     [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields
   {-# INLINE rule71 #-}
   rule71 :: [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
rule71 = \ (([(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) (([(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->
     [(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros
   {-# INLINE rule72 #-}
   rule72 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule72 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->
     Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
   {-# INLINE rule73 #-}
   rule73 :: Set NontermIdent -> Set NontermIdent
rule73 = \ ((Set NontermIdent
_lhsIallNonterminals) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNonterminals
   {-# INLINE rule74 #-}
   rule74 :: Set NontermIdent -> Set NontermIdent
rule74 = \ ((Set NontermIdent
_lhsInts) :: Set NontermIdent) ->
     Set NontermIdent
_lhsInts
   {-# INLINE rule75 #-}
   rule75 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule75 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->
     Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
   {-# INLINE rule76 #-}
   rule76 :: Set NontermIdent -> Set NontermIdent
rule76 = \ ((Set NontermIdent
_lhsIallNonterminals) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNonterminals
   {-# INLINE rule77 #-}
   rule77 :: Set NontermIdent -> Set NontermIdent
rule77 = \ ((Set NontermIdent
_lhsInts) :: Set NontermIdent) ->
     Set NontermIdent
_lhsInts
{-# NOINLINE sem_Alts_Nil #-}
sem_Alts_Nil ::  T_Alts 
sem_Alts_Nil :: T_Alts
sem_Alts_Nil  = Identity T_Alts_s8 -> T_Alts
T_Alts (T_Alts_s8 -> Identity T_Alts_s8
forall (m :: * -> *) a. Monad m => a -> m a
return T_Alts_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_Alts_s8
st8 = let
      v7 :: T_Alts_v7 
      v7 :: T_Alts_v7
v7 = \ (T_Alts_vIn7 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors Set NontermIdent
_lhsIallNonterminals Set NontermIdent
_lhsInts) -> ( let
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule78  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule79  ()
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = () -> Set NontermIdent
forall a. () -> Set a
rule80  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule81  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule82  ()
         __result_ :: T_Alts_vOut7
__result_ = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> T_Alts_vOut7
T_Alts_vOut7 [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Set NontermIdent
_lhsOcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros
         in T_Alts_vOut7
__result_ )
     in T_Alts_v7 -> T_Alts_s8
C_Alts_s8 T_Alts_v7
v7
   {-# INLINE rule78 #-}
   rule78 :: () -> [a]
rule78 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule79 #-}
   rule79 :: () -> [a]
rule79 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule80 #-}
   rule80 :: () -> Set a
rule80 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule81 #-}
   rule81 :: () -> [a]
rule81 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule82 #-}
   rule82 :: () -> [a]
rule82 = \  (()
_ :: ()) ->
     []

-- Attrs -------------------------------------------------------
-- wrapper
data Inh_Attrs  = Inh_Attrs { Inh_Attrs -> DataTypes
allFields_Inh_Attrs :: (DataTypes), Inh_Attrs -> Set NontermIdent
allNonterminals_Inh_Attrs :: (Set NontermIdent), Inh_Attrs -> Map NontermIdent (Attributes, Attributes)
attrDecls_Inh_Attrs :: (Map NontermIdent (Attributes, Attributes)), Inh_Attrs -> Map NontermIdent (Attributes, Attributes)
attrs_Inh_Attrs :: (Map NontermIdent (Attributes, Attributes)), Inh_Attrs -> Set NontermIdent
nts_Inh_Attrs :: (Set NontermIdent), Inh_Attrs -> Options
options_Inh_Attrs :: (Options) }
data Syn_Attrs  = Syn_Attrs { Syn_Attrs -> Map NontermIdent (Attributes, Attributes)
attrDecls_Syn_Attrs :: (Map NontermIdent (Attributes, Attributes)), Syn_Attrs -> Map NontermIdent (Attributes, Attributes)
attrs_Syn_Attrs :: (Map NontermIdent (Attributes, Attributes)), Syn_Attrs -> Seq Error
errors_Syn_Attrs :: (Seq Error), Syn_Attrs
-> Map NontermIdent (Map NontermIdent (String, String, String))
useMap_Syn_Attrs :: (Map NontermIdent (Map Identifier (String,String,String))) }
{-# INLINABLE wrap_Attrs #-}
wrap_Attrs :: T_Attrs  -> Inh_Attrs  -> (Syn_Attrs )
wrap_Attrs :: T_Attrs -> Inh_Attrs -> Syn_Attrs
wrap_Attrs (T_Attrs Identity T_Attrs_s11
act) (Inh_Attrs DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Set NontermIdent
_lhsInts Options
_lhsIoptions) =
   Identity Syn_Attrs -> Syn_Attrs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Attrs_s11
sem <- Identity T_Attrs_s11
act
        let arg10 :: T_Attrs_vIn10
arg10 = DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Set NontermIdent
-> Options
-> T_Attrs_vIn10
T_Attrs_vIn10 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Set NontermIdent
_lhsInts Options
_lhsIoptions
        (T_Attrs_vOut10 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls Map NontermIdent (Attributes, Attributes)
_lhsOattrs Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap) <- T_Attrs_vOut10 -> Identity T_Attrs_vOut10
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Attrs_s11 -> T_Attrs_v10
inv_Attrs_s11 T_Attrs_s11
sem T_Attrs_vIn10
arg10)
        Syn_Attrs -> Identity Syn_Attrs
forall (m :: * -> *) a. Monad m => a -> m a
return (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Seq Error
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Syn_Attrs
Syn_Attrs Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls Map NontermIdent (Attributes, Attributes)
_lhsOattrs Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap)
   )

-- cata
{-# INLINE sem_Attrs #-}
sem_Attrs :: Attrs  -> T_Attrs 
sem_Attrs :: Attrs -> T_Attrs
sem_Attrs ( Attrs Pos
pos_ AttrNames
inh_ AttrNames
chn_ AttrNames
syn_ ) = Pos -> AttrNames -> AttrNames -> AttrNames -> T_Attrs
sem_Attrs_Attrs Pos
pos_ AttrNames
inh_ AttrNames
chn_ AttrNames
syn_

-- semantic domain
newtype T_Attrs  = T_Attrs {
                           T_Attrs -> Identity T_Attrs_s11
attach_T_Attrs :: Identity (T_Attrs_s11 )
                           }
newtype T_Attrs_s11  = C_Attrs_s11 {
                                   T_Attrs_s11 -> T_Attrs_v10
inv_Attrs_s11 :: (T_Attrs_v10 )
                                   }
data T_Attrs_s12  = C_Attrs_s12
type T_Attrs_v10  = (T_Attrs_vIn10 ) -> (T_Attrs_vOut10 )
data T_Attrs_vIn10  = T_Attrs_vIn10 (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Set NontermIdent) (Options)
data T_Attrs_vOut10  = T_Attrs_vOut10 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Seq Error) (Map NontermIdent (Map Identifier (String,String,String)))
{-# NOINLINE sem_Attrs_Attrs #-}
sem_Attrs_Attrs :: (Pos) -> (AttrNames) -> (AttrNames) -> (AttrNames) -> T_Attrs 
sem_Attrs_Attrs :: Pos -> AttrNames -> AttrNames -> AttrNames -> T_Attrs
sem_Attrs_Attrs Pos
_ AttrNames
arg_inh_ AttrNames
arg_chn_ AttrNames
arg_syn_ = Identity T_Attrs_s11 -> T_Attrs
T_Attrs (T_Attrs_s11 -> Identity T_Attrs_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_Attrs_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_Attrs_s11
st11 = let
      v10 :: T_Attrs_v10 
      v10 :: T_Attrs_v10
v10 = \ (T_Attrs_vIn10 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Set NontermIdent
_lhsInts Options
_lhsIoptions) -> ( let
         (Map NontermIdent (Attributes, Attributes)
_attrDecls,Seq Error
_errors) = [(NontermIdent, Type)]
-> DataTypes
-> Map NontermIdent (Attributes, Attributes)
-> Set NontermIdent
-> [(NontermIdent, Type)]
-> (Map NontermIdent (Attributes, Attributes), Seq Error)
rule83 [(NontermIdent, Type)]
_inherited DataTypes
_lhsIallFields Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Set NontermIdent
_lhsInts [(NontermIdent, Type)]
_synthesized
         ([(NontermIdent, Type)]
_inherited,[(NontermIdent, Type)]
_synthesized,Map NontermIdent (String, String, String)
_useMap) = Set NontermIdent
-> AttrNames
-> AttrNames
-> AttrNames
-> ([(NontermIdent, Type)], [(NontermIdent, Type)],
    Map NontermIdent (String, String, String))
forall a a c.
Set NontermIdent
-> [(NontermIdent, Type, ([a], [a], c))]
-> [(NontermIdent, Type, ([a], [a], c))]
-> [(NontermIdent, Type, ([a], [a], c))]
-> ([(NontermIdent, Type)], [(NontermIdent, Type)],
    Map NontermIdent ([a], [a], c))
rule84 Set NontermIdent
_lhsIallNonterminals AttrNames
arg_chn_ AttrNames
arg_inh_ AttrNames
arg_syn_
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = Set NontermIdent
-> Map NontermIdent (String, String, String)
-> Map NontermIdent (Map NontermIdent (String, String, String))
forall a. Set NontermIdent -> a -> Map NontermIdent a
rule85 Set NontermIdent
_lhsInts Map NontermIdent (String, String, String)
_useMap
         _errors1 :: Seq Error
_errors1 = Options -> AttrNames -> AttrNames -> AttrNames -> Seq Error
forall c.
Options
-> [(NontermIdent, Type, c)]
-> [(NontermIdent, Type, c)]
-> [(NontermIdent, Type, c)]
-> Seq Error
rule86 Options
_lhsIoptions AttrNames
arg_chn_ AttrNames
arg_inh_ AttrNames
arg_syn_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
rule87 Seq Error
_errors Seq Error
_errors1
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = [(NontermIdent, Type)]
-> Map NontermIdent (Attributes, Attributes)
-> Set NontermIdent
-> [(NontermIdent, Type)]
-> Map NontermIdent (Attributes, Attributes)
rule88 [(NontermIdent, Type)]
_inherited Map NontermIdent (Attributes, Attributes)
_lhsIattrs Set NontermIdent
_lhsInts [(NontermIdent, Type)]
_synthesized
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
forall a. a -> a
rule89 Map NontermIdent (Attributes, Attributes)
_attrDecls
         __result_ :: T_Attrs_vOut10
__result_ = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Seq Error
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> T_Attrs_vOut10
T_Attrs_vOut10 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls Map NontermIdent (Attributes, Attributes)
_lhsOattrs Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap
         in T_Attrs_vOut10
__result_ )
     in T_Attrs_v10 -> T_Attrs_s11
C_Attrs_s11 T_Attrs_v10
v10
   {-# INLINE rule83 #-}
   {-# LINE 1039 "src-ag/Transform.ag" #-}
   rule83 = \ _inherited ((_lhsIallFields) :: DataTypes) ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ((_lhsInts) :: Set NontermIdent) _synthesized ->
                                     {-# LINE 1039 "src-ag/Transform.ag" #-}
                                     checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls
                                     {-# LINE 1304 "src-generated/Transform.hs" #-}
   {-# INLINE rule84 #-}
   {-# LINE 1041 "src-ag/Transform.ag" #-}
   rule84 = \ ((_lhsIallNonterminals) :: Set NontermIdent) chn_ inh_ syn_ ->
                                                 {-# LINE 1041 "src-ag/Transform.ag" #-}
                                                 let splitAttrs xs = unzip [ ((n,makeType _lhsIallNonterminals t),(n,ud))
                                                                           | (n,t,ud) <- xs
                                                                           ]
                                                     (inh,_)     = splitAttrs inh_
                                                     (chn,uses1) = splitAttrs chn_
                                                     (syn,uses2) = splitAttrs syn_
                                                     isUse (_,(e1,e2,_)) = not (null e1 || null e2)
                                                 in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))
                                                 {-# LINE 1317 "src-generated/Transform.hs" #-}
   {-# INLINE rule85 #-}
   {-# LINE 1049 "src-ag/Transform.ag" #-}
   rule85 = \ ((_lhsInts) :: Set NontermIdent) _useMap ->
                         {-# LINE 1049 "src-ag/Transform.ag" #-}
                         Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))
                         {-# LINE 1323 "src-generated/Transform.hs" #-}
   {-# INLINE rule86 #-}
   {-# LINE 1051 "src-ag/Transform.ag" #-}
   rule86 = \ ((_lhsIoptions) :: Options) chn_ inh_ syn_ ->
                          {-# LINE 1051 "src-ag/Transform.ag" #-}
                          if checkParseTy _lhsIoptions
                          then let attrs  = inh_ ++ syn_ ++ chn_
                                   items = map (\(ident,tp,_) -> (getPos ident, tp)) attrs
                                   errs  = map check items
                                   check (pos,Haskell s) =
                                     let ex  = Expression pos tks
                                         tks = [tk]
                                         tk  = HsToken s pos
                                     in Seq.fromList $ checkTy ex
                                   check _ = Seq.empty
                               in foldr (Seq.><) Seq.empty errs
                          else Seq.empty
                          {-# LINE 1340 "src-generated/Transform.hs" #-}
   {-# INLINE rule87 #-}
   {-# LINE 1063 "src-ag/Transform.ag" #-}
   rule87 = \ _errors _errors1 ->
                         {-# LINE 1063 "src-ag/Transform.ag" #-}
                         _errors     Seq.>< _errors1
                         {-# LINE 1346 "src-generated/Transform.hs" #-}
   {-# INLINE rule88 #-}
   {-# LINE 1355 "src-ag/Transform.ag" #-}
   rule88 = \ _inherited ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ((_lhsInts) :: Set NontermIdent) _synthesized ->
                          {-# LINE 1355 "src-ag/Transform.ag" #-}
                          let ins decls nt = if Map.member nt decls
                                             then  Map.update (\(inh,syn) -> Just ( Map.union inh $ Map.fromList _inherited
                                                                                       , Map.union syn $ Map.fromList _synthesized)) nt decls
                                             else  Map.insert nt (Map.fromList _inherited, Map.fromList _synthesized) decls
                          in  foldl ins _lhsIattrs (Set.toList _lhsInts)
                          {-# LINE 1356 "src-generated/Transform.hs" #-}
   {-# INLINE rule89 #-}
   rule89 = \ _attrDecls ->
     _attrDecls

-- ConstructorSet ----------------------------------------------
-- wrapper
data Inh_ConstructorSet  = Inh_ConstructorSet {  }
data Syn_ConstructorSet  = Syn_ConstructorSet { Syn_ConstructorSet -> Set NontermIdent
collectedConstructorNames_Syn_ConstructorSet :: (Set ConstructorIdent), Syn_ConstructorSet -> Set NontermIdent -> Set NontermIdent
constructors_Syn_ConstructorSet :: ((Set ConstructorIdent->Set ConstructorIdent)), Syn_ConstructorSet -> Seq Error
errors_Syn_ConstructorSet :: (Seq Error) }
{-# INLINABLE wrap_ConstructorSet #-}
wrap_ConstructorSet :: T_ConstructorSet  -> Inh_ConstructorSet  -> (Syn_ConstructorSet )
wrap_ConstructorSet :: T_ConstructorSet -> Inh_ConstructorSet -> Syn_ConstructorSet
wrap_ConstructorSet (T_ConstructorSet Identity T_ConstructorSet_s14
act) (Inh_ConstructorSet
Inh_ConstructorSet ) =
   Identity Syn_ConstructorSet -> Syn_ConstructorSet
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_ConstructorSet_s14
sem <- Identity T_ConstructorSet_s14
act
        let arg13 :: T_ConstructorSet_vIn13
arg13 = T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 
        (T_ConstructorSet_vOut13 Set NontermIdent
_lhsOcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_lhsOconstructors Seq Error
_lhsOerrors) <- T_ConstructorSet_vOut13 -> Identity T_ConstructorSet_vOut13
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
sem T_ConstructorSet_vIn13
arg13)
        Syn_ConstructorSet -> Identity Syn_ConstructorSet
forall (m :: * -> *) a. Monad m => a -> m a
return (Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> Seq Error
-> Syn_ConstructorSet
Syn_ConstructorSet Set NontermIdent
_lhsOcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_lhsOconstructors Seq Error
_lhsOerrors)
   )

-- cata
{-# NOINLINE sem_ConstructorSet #-}
sem_ConstructorSet :: ConstructorSet  -> T_ConstructorSet 
sem_ConstructorSet :: ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ( CName NontermIdent
name_ ) = NontermIdent -> T_ConstructorSet
sem_ConstructorSet_CName NontermIdent
name_
sem_ConstructorSet ( CUnion ConstructorSet
set1_ ConstructorSet
set2_ ) = T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet
sem_ConstructorSet_CUnion ( ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ConstructorSet
set1_ ) ( ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ConstructorSet
set2_ )
sem_ConstructorSet ( CDifference ConstructorSet
set1_ ConstructorSet
set2_ ) = T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet
sem_ConstructorSet_CDifference ( ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ConstructorSet
set1_ ) ( ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ConstructorSet
set2_ )
sem_ConstructorSet ( ConstructorSet
CAll  ) = T_ConstructorSet
sem_ConstructorSet_CAll 

-- semantic domain
newtype T_ConstructorSet  = T_ConstructorSet {
                                             T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet :: Identity (T_ConstructorSet_s14 )
                                             }
newtype T_ConstructorSet_s14  = C_ConstructorSet_s14 {
                                                     T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 :: (T_ConstructorSet_v13 )
                                                     }
data T_ConstructorSet_s15  = C_ConstructorSet_s15
type T_ConstructorSet_v13  = (T_ConstructorSet_vIn13 ) -> (T_ConstructorSet_vOut13 )
data T_ConstructorSet_vIn13  = T_ConstructorSet_vIn13 
data T_ConstructorSet_vOut13  = T_ConstructorSet_vOut13 (Set ConstructorIdent) ((Set ConstructorIdent->Set ConstructorIdent)) (Seq Error)
{-# NOINLINE sem_ConstructorSet_CName #-}
sem_ConstructorSet_CName :: (ConstructorIdent) -> T_ConstructorSet 
sem_ConstructorSet_CName :: NontermIdent -> T_ConstructorSet
sem_ConstructorSet_CName NontermIdent
arg_name_ = Identity T_ConstructorSet_s14 -> T_ConstructorSet
T_ConstructorSet (T_ConstructorSet_s14 -> Identity T_ConstructorSet_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_ConstructorSet_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_ConstructorSet_s14
st14 = let
      v13 :: T_ConstructorSet_v13 
      v13 :: T_ConstructorSet_v13
v13 = \ (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 ) -> ( let
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = NontermIdent -> Set NontermIdent
forall a. a -> Set a
rule90 NontermIdent
arg_name_
         _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)
         _lhsOconstructors :: Set NontermIdent -> Set NontermIdent
_lhsOconstructors = NontermIdent -> Set NontermIdent -> Set NontermIdent
forall a p. a -> p -> Set a
rule91 NontermIdent
arg_name_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule92  ()
         __result_ :: T_ConstructorSet_vOut13
__result_ = Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> Seq Error
-> T_ConstructorSet_vOut13
T_ConstructorSet_vOut13 Set NontermIdent
_lhsOcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_lhsOconstructors Seq Error
_lhsOerrors
         in T_ConstructorSet_vOut13
__result_ )
     in T_ConstructorSet_v13 -> T_ConstructorSet_s14
C_ConstructorSet_s14 T_ConstructorSet_v13
v13
   {-# INLINE rule90 #-}
   {-# LINE 614 "src-ag/Transform.ag" #-}
   rule90 = \ name_ ->
                                            {-# LINE 614 "src-ag/Transform.ag" #-}
                                            Set.singleton name_
                                            {-# LINE 1415 "src-generated/Transform.hs" #-}
   {-# INLINE rule91 #-}
   {-# LINE 777 "src-ag/Transform.ag" #-}
   rule91 = \ name_ ->
                                     {-# LINE 777 "src-ag/Transform.ag" #-}
                                     \_  -> Set.singleton name_
                                     {-# LINE 1421 "src-generated/Transform.hs" #-}
   {-# INLINE rule92 #-}
   rule92 = \  (_ :: ()) ->
     Seq.empty
{-# NOINLINE sem_ConstructorSet_CUnion #-}
sem_ConstructorSet_CUnion :: T_ConstructorSet  -> T_ConstructorSet  -> T_ConstructorSet 
sem_ConstructorSet_CUnion :: T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet
sem_ConstructorSet_CUnion T_ConstructorSet
arg_set1_ T_ConstructorSet
arg_set2_ = Identity T_ConstructorSet_s14 -> T_ConstructorSet
T_ConstructorSet (T_ConstructorSet_s14 -> Identity T_ConstructorSet_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_ConstructorSet_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_ConstructorSet_s14
st14 = let
      v13 :: T_ConstructorSet_v13 
      v13 :: T_ConstructorSet_v13
v13 = \ (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 ) -> ( let
         _set1X14 :: T_ConstructorSet_s14
_set1X14 = Identity T_ConstructorSet_s14 -> T_ConstructorSet_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet (T_ConstructorSet
arg_set1_))
         _set2X14 :: T_ConstructorSet_s14
_set2X14 = Identity T_ConstructorSet_s14 -> T_ConstructorSet_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet (T_ConstructorSet
arg_set2_))
         (T_ConstructorSet_vOut13 Set NontermIdent
_set1IcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_set1Iconstructors Seq Error
_set1Ierrors) = T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
_set1X14 (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 )
         (T_ConstructorSet_vOut13 Set NontermIdent
_set2IcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_set2Iconstructors Seq Error
_set2Ierrors) = T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
_set2X14 (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 )
         _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)
         _lhsOconstructors :: Set NontermIdent -> Set NontermIdent
_lhsOconstructors = (Set NontermIdent -> Set NontermIdent)
-> (Set NontermIdent -> Set NontermIdent)
-> Set NontermIdent
-> Set NontermIdent
rule93 Set NontermIdent -> Set NontermIdent
_set1Iconstructors Set NontermIdent -> Set NontermIdent
_set2Iconstructors
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule94 Set NontermIdent
_set1IcollectedConstructorNames Set NontermIdent
_set2IcollectedConstructorNames
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule95 Seq Error
_set1Ierrors Seq Error
_set2Ierrors
         __result_ :: T_ConstructorSet_vOut13
__result_ = Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> Seq Error
-> T_ConstructorSet_vOut13
T_ConstructorSet_vOut13 Set NontermIdent
_lhsOcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_lhsOconstructors Seq Error
_lhsOerrors
         in T_ConstructorSet_vOut13
__result_ )
     in T_ConstructorSet_v13 -> T_ConstructorSet_s14
C_ConstructorSet_s14 T_ConstructorSet_v13
v13
   {-# INLINE rule93 #-}
   {-# LINE 778 "src-ag/Transform.ag" #-}
   rule93 = \ ((_set1Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_set2Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->
                                     {-# LINE 778 "src-ag/Transform.ag" #-}
                                     \ds -> _set1Iconstructors ds `Set.union`      _set2Iconstructors ds
                                     {-# LINE 1450 "src-generated/Transform.hs" #-}
   {-# INLINE rule94 #-}
   rule94 = \ ((_set1IcollectedConstructorNames) :: Set ConstructorIdent) ((_set2IcollectedConstructorNames) :: Set ConstructorIdent) ->
     _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames
   {-# INLINE rule95 #-}
   rule95 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->
     _set1Ierrors Seq.>< _set2Ierrors
{-# NOINLINE sem_ConstructorSet_CDifference #-}
sem_ConstructorSet_CDifference :: T_ConstructorSet  -> T_ConstructorSet  -> T_ConstructorSet 
sem_ConstructorSet_CDifference :: T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet
sem_ConstructorSet_CDifference T_ConstructorSet
arg_set1_ T_ConstructorSet
arg_set2_ = Identity T_ConstructorSet_s14 -> T_ConstructorSet
T_ConstructorSet (T_ConstructorSet_s14 -> Identity T_ConstructorSet_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_ConstructorSet_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_ConstructorSet_s14
st14 = let
      v13 :: T_ConstructorSet_v13 
      v13 :: T_ConstructorSet_v13
v13 = \ (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 ) -> ( let
         _set1X14 :: T_ConstructorSet_s14
_set1X14 = Identity T_ConstructorSet_s14 -> T_ConstructorSet_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet (T_ConstructorSet
arg_set1_))
         _set2X14 :: T_ConstructorSet_s14
_set2X14 = Identity T_ConstructorSet_s14 -> T_ConstructorSet_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet (T_ConstructorSet
arg_set2_))
         (T_ConstructorSet_vOut13 Set NontermIdent
_set1IcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_set1Iconstructors Seq Error
_set1Ierrors) = T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
_set1X14 (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 )
         (T_ConstructorSet_vOut13 Set NontermIdent
_set2IcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_set2Iconstructors Seq Error
_set2Ierrors) = T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
_set2X14 (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 )
         _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)
         _lhsOconstructors :: Set NontermIdent -> Set NontermIdent
_lhsOconstructors = (Set NontermIdent -> Set NontermIdent)
-> (Set NontermIdent -> Set NontermIdent)
-> Set NontermIdent
-> Set NontermIdent
rule96 Set NontermIdent -> Set NontermIdent
_set1Iconstructors Set NontermIdent -> Set NontermIdent
_set2Iconstructors
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule97 Set NontermIdent
_set1IcollectedConstructorNames Set NontermIdent
_set2IcollectedConstructorNames
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule98 Seq Error
_set1Ierrors Seq Error
_set2Ierrors
         __result_ :: T_ConstructorSet_vOut13
__result_ = Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> Seq Error
-> T_ConstructorSet_vOut13
T_ConstructorSet_vOut13 Set NontermIdent
_lhsOcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_lhsOconstructors Seq Error
_lhsOerrors
         in T_ConstructorSet_vOut13
__result_ )
     in T_ConstructorSet_v13 -> T_ConstructorSet_s14
C_ConstructorSet_s14 T_ConstructorSet_v13
v13
   {-# INLINE rule96 #-}
   {-# LINE 779 "src-ag/Transform.ag" #-}
   rule96 = \ ((_set1Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_set2Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->
                                     {-# LINE 779 "src-ag/Transform.ag" #-}
                                     \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds
                                     {-# LINE 1482 "src-generated/Transform.hs" #-}
   {-# INLINE rule97 #-}
   rule97 = \ ((_set1IcollectedConstructorNames) :: Set ConstructorIdent) ((_set2IcollectedConstructorNames) :: Set ConstructorIdent) ->
     _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames
   {-# INLINE rule98 #-}
   rule98 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->
     _set1Ierrors Seq.>< _set2Ierrors
{-# NOINLINE sem_ConstructorSet_CAll #-}
sem_ConstructorSet_CAll ::  T_ConstructorSet 
sem_ConstructorSet_CAll :: T_ConstructorSet
sem_ConstructorSet_CAll  = Identity T_ConstructorSet_s14 -> T_ConstructorSet
T_ConstructorSet (T_ConstructorSet_s14 -> Identity T_ConstructorSet_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_ConstructorSet_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_ConstructorSet_s14
st14 = let
      v13 :: T_ConstructorSet_v13 
      v13 :: T_ConstructorSet_v13
v13 = \ (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 ) -> ( let
         _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)
         _lhsOconstructors :: Set NontermIdent -> Set NontermIdent
_lhsOconstructors = () -> Set NontermIdent -> Set NontermIdent
forall p. () -> p -> p
rule99  ()
         _lhsOcollectedConstructorNames :: Set ConstructorIdent
         _lhsOcollectedConstructorNames :: Set NontermIdent
_lhsOcollectedConstructorNames = () -> Set NontermIdent
forall a. () -> Set a
rule100  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule101  ()
         __result_ :: T_ConstructorSet_vOut13
__result_ = Set NontermIdent
-> (Set NontermIdent -> Set NontermIdent)
-> Seq Error
-> T_ConstructorSet_vOut13
T_ConstructorSet_vOut13 Set NontermIdent
_lhsOcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_lhsOconstructors Seq Error
_lhsOerrors
         in T_ConstructorSet_vOut13
__result_ )
     in T_ConstructorSet_v13 -> T_ConstructorSet_s14
C_ConstructorSet_s14 T_ConstructorSet_v13
v13
   {-# INLINE rule99 #-}
   {-# LINE 780 "src-ag/Transform.ag" #-}
   rule99 = \  (_ :: ()) ->
                                     {-# LINE 780 "src-ag/Transform.ag" #-}
                                     \ds -> ds
                                     {-# LINE 1510 "src-generated/Transform.hs" #-}
   {-# INLINE rule100 #-}
   rule100 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule101 #-}
   rule101 = \  (_ :: ()) ->
     Seq.empty

-- Elem --------------------------------------------------------
-- wrapper
data Inh_Elem  = Inh_Elem { Inh_Elem -> Map NontermIdent (Attributes, Attributes)
allAttrDecls_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), Inh_Elem -> Map NontermIdent (Attributes, Attributes)
allAttrs_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), Inh_Elem -> Map NontermIdent (Set NontermIdent)
allConstructors_Inh_Elem :: (Map NontermIdent (Set ConstructorIdent)), Inh_Elem -> DataTypes
allFields_Inh_Elem :: (DataTypes), Inh_Elem -> Set NontermIdent
allNonterminals_Inh_Elem :: (Set NontermIdent), Inh_Elem -> Map NontermIdent (Attributes, Attributes)
attrDecls_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), Inh_Elem -> Map NontermIdent (Attributes, Attributes)
attrs_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), Inh_Elem -> Map NontermIdent (Set NontermIdent, Set NontermIdent)
defSets_Inh_Elem :: (Map Identifier (Set NontermIdent,Set Identifier)), Inh_Elem -> Map NontermIdent (Set NontermIdent)
definedSets_Inh_Elem :: (DefinedSets), Inh_Elem -> Options
options_Inh_Elem :: (Options) }
data Syn_Elem  = Syn_Elem { Syn_Elem -> Map NontermIdent (Attributes, Attributes)
attrDecls_Syn_Elem :: (Map NontermIdent (Attributes, Attributes)), Syn_Elem -> AttrOrderMap
attrOrderCollect_Syn_Elem :: (AttrOrderMap), Syn_Elem -> Map NontermIdent (Attributes, Attributes)
attrs_Syn_Elem :: (Map NontermIdent (Attributes, Attributes)), Syn_Elem -> Blocks
blocks_Syn_Elem :: (Blocks), Syn_Elem -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedArounds_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]), Syn_Elem -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedAugments_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), Syn_Elem -> [(NontermIdent, NontermIdent, Set NontermIdent)]
collectedConParams_Syn_Elem :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), Syn_Elem -> [(NontermIdent, NontermIdent, [Type])]
collectedConstraints_Syn_Elem :: ([(NontermIdent, ConstructorIdent, [Type])]), Syn_Elem -> Map NontermIdent (Set NontermIdent)
collectedConstructorsMap_Syn_Elem :: (Map NontermIdent (Set ConstructorIdent)), Syn_Elem -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
collectedFields_Syn_Elem :: ([(NontermIdent, ConstructorIdent, FieldMap)]), Syn_Elem -> [(NontermIdent, NontermIdent, [NontermIdent])]
collectedInsts_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), Syn_Elem -> [(NontermIdent, NontermIdent, MaybeMacro)]
collectedMacros_Syn_Elem :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]), Syn_Elem -> [(NontermIdent, NontermIdent, [MergeInfo])]
collectedMerges_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]), Syn_Elem -> Set NontermIdent
collectedNames_Syn_Elem :: (Set Identifier), Syn_Elem -> [(NontermIdent, NontermIdent, RuleInfo)]
collectedRules_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), Syn_Elem -> Set NontermIdent
collectedSetNames_Syn_Elem :: (Set Identifier), Syn_Elem -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
collectedSigs_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), Syn_Elem -> [(NontermIdent, NontermIdent, [UniqueInfo])]
collectedUniques_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), Syn_Elem -> Map NontermIdent ConstructorType
constructorTypeMap_Syn_Elem :: (Map NontermIdent ConstructorType), Syn_Elem -> ContextMap
ctxCollect_Syn_Elem :: (ContextMap), Syn_Elem -> Map NontermIdent (Set NontermIdent, Set NontermIdent)
defSets_Syn_Elem :: (Map Identifier (Set NontermIdent,Set Identifier)), Syn_Elem -> Map NontermIdent (Set NontermIdent)
derivings_Syn_Elem :: (Derivings), Syn_Elem -> Seq Error
errors_Syn_Elem :: (Seq Error), Syn_Elem -> Maybe (String, String, String)
moduleDecl_Syn_Elem :: (Maybe (String,String,String)), Syn_Elem -> ParamMap
paramsCollect_Syn_Elem :: (ParamMap), Syn_Elem -> Options -> Options
pragmas_Syn_Elem :: (Options -> Options), Syn_Elem -> QuantMap
quantCollect_Syn_Elem :: (QuantMap), Syn_Elem -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
semPragmasCollect_Syn_Elem :: (PragmaMap), Syn_Elem -> TypeSyns
typeSyns_Syn_Elem :: (TypeSyns), Syn_Elem
-> Map NontermIdent (Map NontermIdent (String, String, String))
useMap_Syn_Elem :: (Map NontermIdent (Map Identifier (String,String,String))), Syn_Elem -> Set NontermIdent
wrappers_Syn_Elem :: (Set NontermIdent) }
{-# INLINABLE wrap_Elem #-}
wrap_Elem :: T_Elem  -> Inh_Elem  -> (Syn_Elem )
wrap_Elem :: T_Elem -> Inh_Elem -> Syn_Elem
wrap_Elem (T_Elem Identity T_Elem_s17
act) (Inh_Elem Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) =
   Identity Syn_Elem -> Syn_Elem
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Elem_s17
sem <- Identity T_Elem_s17
act
        let arg16 :: T_Elem_vIn16
arg16 = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent)
-> DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Options
-> T_Elem_vIn16
T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions
        (T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers) <- T_Elem_vOut16 -> Identity T_Elem_vOut16
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Elem_s17 -> T_Elem_v16
inv_Elem_s17 T_Elem_s17
sem T_Elem_vIn16
arg16)
        Syn_Elem -> Identity Syn_Elem
forall (m :: * -> *) a. Monad m => a -> m a
return (Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> Syn_Elem
Syn_Elem Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers)
   )

-- cata
{-# NOINLINE sem_Elem #-}
sem_Elem :: Elem  -> T_Elem 
sem_Elem :: Elem -> T_Elem
sem_Elem ( Data Pos
pos_ ConstructorType
contype_ [(NontermIdent, [String])]
ctx_ NontSet
names_ [NontermIdent]
params_ Attrs
attrs_ Alts
alts_ Bool
ext_ ) = Pos
-> ConstructorType
-> [(NontermIdent, [String])]
-> T_NontSet
-> [NontermIdent]
-> T_Attrs
-> T_Alts
-> Bool
-> T_Elem
sem_Elem_Data Pos
pos_ ConstructorType
contype_ [(NontermIdent, [String])]
ctx_ ( NontSet -> T_NontSet
sem_NontSet NontSet
names_ ) [NontermIdent]
params_ ( Attrs -> T_Attrs
sem_Attrs Attrs
attrs_ ) ( Alts -> T_Alts
sem_Alts Alts
alts_ ) Bool
ext_
sem_Elem ( Type Pos
pos_ [(NontermIdent, [String])]
ctx_ NontermIdent
name_ [NontermIdent]
params_ ComplexType
type_ ) = Pos
-> [(NontermIdent, [String])]
-> NontermIdent
-> [NontermIdent]
-> ComplexType
-> T_Elem
sem_Elem_Type Pos
pos_ [(NontermIdent, [String])]
ctx_ NontermIdent
name_ [NontermIdent]
params_ ComplexType
type_
sem_Elem ( Attr Pos
pos_ [(NontermIdent, [String])]
ctx_ NontSet
names_ [String]
quants_ Attrs
attrs_ ) = Pos
-> [(NontermIdent, [String])]
-> T_NontSet
-> [String]
-> T_Attrs
-> T_Elem
sem_Elem_Attr Pos
pos_ [(NontermIdent, [String])]
ctx_ ( NontSet -> T_NontSet
sem_NontSet NontSet
names_ ) [String]
quants_ ( Attrs -> T_Attrs
sem_Attrs Attrs
attrs_ )
sem_Elem ( Sem Pos
pos_ [(NontermIdent, [String])]
ctx_ NontSet
names_ Attrs
attrs_ [String]
quants_ SemAlts
alts_ ) = Pos
-> [(NontermIdent, [String])]
-> T_NontSet
-> T_Attrs
-> [String]
-> T_SemAlts
-> T_Elem
sem_Elem_Sem Pos
pos_ [(NontermIdent, [String])]
ctx_ ( NontSet -> T_NontSet
sem_NontSet NontSet
names_ ) ( Attrs -> T_Attrs
sem_Attrs Attrs
attrs_ ) [String]
quants_ ( SemAlts -> T_SemAlts
sem_SemAlts SemAlts
alts_ )
sem_Elem ( Txt Pos
pos_ BlockKind
kind_ Maybe NontermIdent
mbNt_ [String]
lines_ ) = Pos -> BlockKind -> Maybe NontermIdent -> [String] -> T_Elem
sem_Elem_Txt Pos
pos_ BlockKind
kind_ Maybe NontermIdent
mbNt_ [String]
lines_
sem_Elem ( Set Pos
pos_ NontermIdent
name_ Bool
merge_ NontSet
set_ ) = Pos -> NontermIdent -> Bool -> T_NontSet -> T_Elem
sem_Elem_Set Pos
pos_ NontermIdent
name_ Bool
merge_ ( NontSet -> T_NontSet
sem_NontSet NontSet
set_ )
sem_Elem ( Deriving Pos
pos_ NontSet
set_ [NontermIdent]
classes_ ) = Pos -> T_NontSet -> [NontermIdent] -> T_Elem
sem_Elem_Deriving Pos
pos_ ( NontSet -> T_NontSet
sem_NontSet NontSet
set_ ) [NontermIdent]
classes_
sem_Elem ( Wrapper Pos
pos_ NontSet
set_ ) = Pos -> T_NontSet -> T_Elem
sem_Elem_Wrapper Pos
pos_ ( NontSet -> T_NontSet
sem_NontSet NontSet
set_ )
sem_Elem ( Nocatas Pos
pos_ NontSet
set_ ) = Pos -> T_NontSet -> T_Elem
sem_Elem_Nocatas Pos
pos_ ( NontSet -> T_NontSet
sem_NontSet NontSet
set_ )
sem_Elem ( Pragma Pos
pos_ [NontermIdent]
names_ ) = Pos -> [NontermIdent] -> T_Elem
sem_Elem_Pragma Pos
pos_ [NontermIdent]
names_
sem_Elem ( Module Pos
pos_ String
name_ String
exports_ String
imports_ ) = Pos -> String -> String -> String -> T_Elem
sem_Elem_Module Pos
pos_ String
name_ String
exports_ String
imports_

-- semantic domain
newtype T_Elem  = T_Elem {
                         T_Elem -> Identity T_Elem_s17
attach_T_Elem :: Identity (T_Elem_s17 )
                         }
newtype T_Elem_s17  = C_Elem_s17 {
                                 T_Elem_s17 -> T_Elem_v16
inv_Elem_s17 :: (T_Elem_v16 )
                                 }
data T_Elem_s18  = C_Elem_s18
type T_Elem_v16  = (T_Elem_vIn16 ) -> (T_Elem_vOut16 )
data T_Elem_vIn16  = T_Elem_vIn16 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Set ConstructorIdent)) (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map Identifier (Set NontermIdent,Set Identifier)) (DefinedSets) (Options)
data T_Elem_vOut16  = T_Elem_vOut16 (Map NontermIdent (Attributes, Attributes)) (AttrOrderMap) (Map NontermIdent (Attributes, Attributes)) (Blocks) ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Map NontermIdent (Set ConstructorIdent)) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([(NontermIdent, ConstructorIdent, MaybeMacro)]) ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Map NontermIdent ConstructorType) (ContextMap) (Map Identifier (Set NontermIdent,Set Identifier)) (Derivings) (Seq Error) (Maybe (String,String,String)) (ParamMap) (Options -> Options) (QuantMap) (PragmaMap) (TypeSyns) (Map NontermIdent (Map Identifier (String,String,String))) (Set NontermIdent)
{-# NOINLINE sem_Elem_Data #-}
sem_Elem_Data :: (Pos) -> (ConstructorType) -> (ClassContext) -> T_NontSet  -> ([Identifier]) -> T_Attrs  -> T_Alts  -> (Bool) -> T_Elem 
sem_Elem_Data :: Pos
-> ConstructorType
-> [(NontermIdent, [String])]
-> T_NontSet
-> [NontermIdent]
-> T_Attrs
-> T_Alts
-> Bool
-> T_Elem
sem_Elem_Data Pos
_ ConstructorType
arg_contype_ [(NontermIdent, [String])]
arg_ctx_ T_NontSet
arg_names_ [NontermIdent]
arg_params_ T_Attrs
arg_attrs_ T_Alts
arg_alts_ Bool
_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _namesX29 :: T_NontSet_s29
_namesX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_names_))
         _attrsX11 :: T_Attrs_s11
_attrsX11 = Identity T_Attrs_s11 -> T_Attrs_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Attrs -> Identity T_Attrs_s11
attach_T_Attrs (T_Attrs
arg_attrs_))
         _altsX8 :: T_Alts_s8
_altsX8 = Identity T_Alts_s8 -> T_Alts_s8
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Alts -> Identity T_Alts_s8
attach_T_Alts (T_Alts
arg_alts_))
         (T_NontSet_vOut28 Set NontermIdent
_namesIcollectedNames Seq Error
_namesIerrors Set NontermIdent
_namesInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_namesX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_namesOallFields Set NontermIdent
_namesOallNonterminals Map NontermIdent (Set NontermIdent)
_namesOdefinedSets)
         (T_Attrs_vOut10 Map NontermIdent (Attributes, Attributes)
_attrsIattrDecls Map NontermIdent (Attributes, Attributes)
_attrsIattrs Seq Error
_attrsIerrors Map NontermIdent (Map NontermIdent (String, String, String))
_attrsIuseMap) = T_Attrs_s11 -> T_Attrs_v10
inv_Attrs_s11 T_Attrs_s11
_attrsX11 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Set NontermIdent
-> Options
-> T_Attrs_vIn10
T_Attrs_vIn10 DataTypes
_attrsOallFields Set NontermIdent
_attrsOallNonterminals Map NontermIdent (Attributes, Attributes)
_attrsOattrDecls Map NontermIdent (Attributes, Attributes)
_attrsOattrs Set NontermIdent
_attrsOnts Options
_attrsOoptions)
         (T_Alts_vOut7 [(NontermIdent, NontermIdent, Set NontermIdent)]
_altsIcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_altsIcollectedConstraints Set NontermIdent
_altsIcollectedConstructorNames [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_altsIcollectedFields [(NontermIdent, NontermIdent, MaybeMacro)]
_altsIcollectedMacros) = T_Alts_s8 -> T_Alts_v7
inv_Alts_s8 T_Alts_s8
_altsX8 (Map NontermIdent (Set NontermIdent)
-> Set NontermIdent -> Set NontermIdent -> T_Alts_vIn7
T_Alts_vIn7 Map NontermIdent (Set NontermIdent)
_altsOallConstructors Set NontermIdent
_altsOallNonterminals Set NontermIdent
_altsOnts)
         _altsOnts :: Set NontermIdent
_altsOnts = Set NontermIdent -> Set NontermIdent
rule102 Set NontermIdent
_namesInontSet
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = Set NontermIdent
-> Set NontermIdent -> Map NontermIdent (Set NontermIdent)
rule103 Set NontermIdent
_altsIcollectedConstructorNames Set NontermIdent
_namesInontSet
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = Set NontermIdent -> [NontermIdent] -> ParamMap
forall a. Set NontermIdent -> [a] -> Map NontermIdent [a]
rule104 Set NontermIdent
_namesInontSet [NontermIdent]
arg_params_
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = Set NontermIdent -> [(NontermIdent, [String])] -> ContextMap
forall a. Set NontermIdent -> [a] -> Map NontermIdent [a]
rule105 Set NontermIdent
_namesInontSet [(NontermIdent, [String])]
arg_ctx_
         _attrsOnts :: Set NontermIdent
_attrsOnts = Set NontermIdent -> Set NontermIdent
rule106 Set NontermIdent
_namesInontSet
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = Set NontermIdent
-> ConstructorType -> Map NontermIdent ConstructorType
forall a. Set NontermIdent -> a -> Map NontermIdent a
rule107 Set NontermIdent
_namesIcollectedNames ConstructorType
arg_contype_
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule108  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule109  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule110  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule111  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
rule112 [(NontermIdent, NontermIdent, Set NontermIdent)]
_altsIcollectedConParams
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
rule113 [(NontermIdent, NontermIdent, [Type])]
_altsIcollectedConstraints
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
rule114 [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_altsIcollectedFields
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule115  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
rule116 [(NontermIdent, NontermIdent, MaybeMacro)]
_altsIcollectedMacros
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule117  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule118 Set NontermIdent
_namesIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule119  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule120  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule121  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule122  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule123  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule124 Seq Error
_attrsIerrors Seq Error
_namesIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule125  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule126  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule127  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule128  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule129  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
rule130 Map NontermIdent (Map NontermIdent (String, String, String))
_attrsIuseMap
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule131  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule132 Map NontermIdent (Attributes, Attributes)
_attrsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule133 Map NontermIdent (Attributes, Attributes)
_attrsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule134 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _namesOallFields :: DataTypes
_namesOallFields = DataTypes -> DataTypes
rule135 DataTypes
_lhsIallFields
         _namesOallNonterminals :: Set NontermIdent
_namesOallNonterminals = Set NontermIdent -> Set NontermIdent
rule136 Set NontermIdent
_lhsIallNonterminals
         _namesOdefinedSets :: Map NontermIdent (Set NontermIdent)
_namesOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule137 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _attrsOallFields :: DataTypes
_attrsOallFields = DataTypes -> DataTypes
rule138 DataTypes
_lhsIallFields
         _attrsOallNonterminals :: Set NontermIdent
_attrsOallNonterminals = Set NontermIdent -> Set NontermIdent
rule139 Set NontermIdent
_lhsIallNonterminals
         _attrsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_attrsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule140 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _attrsOattrs :: Map NontermIdent (Attributes, Attributes)
_attrsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule141 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _attrsOoptions :: Options
_attrsOoptions = Options -> Options
rule142 Options
_lhsIoptions
         _altsOallConstructors :: Map NontermIdent (Set NontermIdent)
_altsOallConstructors = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule143 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
         _altsOallNonterminals :: Set NontermIdent
_altsOallNonterminals = Set NontermIdent -> Set NontermIdent
rule144 Set NontermIdent
_lhsIallNonterminals
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule102 #-}
   {-# LINE 176 "src-ag/Transform.ag" #-}
   rule102 = \ ((_namesInontSet) :: Set NontermIdent) ->
                      {-# LINE 176 "src-ag/Transform.ag" #-}
                      _namesInontSet
                      {-# LINE 1653 "src-generated/Transform.hs" #-}
   {-# INLINE rule103 #-}
   {-# LINE 620 "src-ag/Transform.ag" #-}
   rule103 = \ ((_altsIcollectedConstructorNames) :: Set ConstructorIdent) ((_namesInontSet) :: Set NontermIdent) ->
                                           {-# LINE 620 "src-ag/Transform.ag" #-}
                                           Map.fromList
                                           [ (n, _altsIcollectedConstructorNames)
                                           | n <- Set.toList _namesInontSet
                                           ]
                                           {-# LINE 1662 "src-generated/Transform.hs" #-}
   {-# INLINE rule104 #-}
   {-# LINE 948 "src-ag/Transform.ag" #-}
   rule104 = \ ((_namesInontSet) :: Set NontermIdent) params_ ->
                            {-# LINE 948 "src-ag/Transform.ag" #-}
                            if null params_
                            then Map.empty
                            else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]
                            {-# LINE 1670 "src-generated/Transform.hs" #-}
   {-# INLINE rule105 #-}
   {-# LINE 971 "src-ag/Transform.ag" #-}
   rule105 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->
                         {-# LINE 971 "src-ag/Transform.ag" #-}
                         if null ctx_
                         then Map.empty
                         else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]
                         {-# LINE 1678 "src-generated/Transform.hs" #-}
   {-# INLINE rule106 #-}
   {-# LINE 1033 "src-ag/Transform.ag" #-}
   rule106 = \ ((_namesInontSet) :: Set NontermIdent) ->
                       {-# LINE 1033 "src-ag/Transform.ag" #-}
                       _namesInontSet
                       {-# LINE 1684 "src-generated/Transform.hs" #-}
   {-# INLINE rule107 #-}
   {-# LINE 1371 "src-ag/Transform.ag" #-}
   rule107 = \ ((_namesIcollectedNames) :: Set Identifier) contype_ ->
                                    {-# LINE 1371 "src-ag/Transform.ag" #-}
                                    Set.fold (\nm mp -> Map.insert nm contype_ mp) Map.empty _namesIcollectedNames
                                    {-# LINE 1690 "src-generated/Transform.hs" #-}
   {-# INLINE rule108 #-}
   rule108 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule109 #-}
   rule109 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule110 #-}
   rule110 = \  (_ :: ()) ->
     []
   {-# INLINE rule111 #-}
   rule111 = \  (_ :: ()) ->
     []
   {-# INLINE rule112 #-}
   rule112 = \ ((_altsIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->
     _altsIcollectedConParams
   {-# INLINE rule113 #-}
   rule113 = \ ((_altsIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->
     _altsIcollectedConstraints
   {-# INLINE rule114 #-}
   rule114 = \ ((_altsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->
     _altsIcollectedFields
   {-# INLINE rule115 #-}
   rule115 = \  (_ :: ()) ->
     []
   {-# INLINE rule116 #-}
   rule116 = \ ((_altsIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->
     _altsIcollectedMacros
   {-# INLINE rule117 #-}
   rule117 = \  (_ :: ()) ->
     []
   {-# INLINE rule118 #-}
   rule118 = \ ((_namesIcollectedNames) :: Set Identifier) ->
     _namesIcollectedNames
   {-# INLINE rule119 #-}
   rule119 = \  (_ :: ()) ->
     []
   {-# INLINE rule120 #-}
   rule120 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule121 #-}
   rule121 = \  (_ :: ()) ->
     []
   {-# INLINE rule122 #-}
   rule122 = \  (_ :: ()) ->
     []
   {-# INLINE rule123 #-}
   rule123 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule124 #-}
   rule124 = \ ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->
     _namesIerrors Seq.>< _attrsIerrors
   {-# INLINE rule125 #-}
   rule125 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule126 #-}
   rule126 = \  (_ :: ()) ->
     id
   {-# INLINE rule127 #-}
   rule127 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule128 #-}
   rule128 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule129 #-}
   rule129 = \  (_ :: ()) ->
     []
   {-# INLINE rule130 #-}
   rule130 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->
     _attrsIuseMap
   {-# INLINE rule131 #-}
   rule131 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule132 #-}
   rule132 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _attrsIattrDecls
   {-# INLINE rule133 #-}
   rule133 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _attrsIattrs
   {-# INLINE rule134 #-}
   rule134 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
   {-# INLINE rule135 #-}
   rule135 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule136 #-}
   rule136 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule137 #-}
   rule137 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
   {-# INLINE rule138 #-}
   rule138 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule139 #-}
   rule139 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule140 #-}
   rule140 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule141 #-}
   rule141 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule142 #-}
   rule142 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule143 #-}
   rule143 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->
     _lhsIallConstructors
   {-# INLINE rule144 #-}
   rule144 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
{-# NOINLINE sem_Elem_Type #-}
sem_Elem_Type :: (Pos) -> (ClassContext) -> (NontermIdent) -> ([Identifier]) -> (ComplexType) -> T_Elem 
sem_Elem_Type :: Pos
-> [(NontermIdent, [String])]
-> NontermIdent
-> [NontermIdent]
-> ComplexType
-> T_Elem
sem_Elem_Type Pos
arg_pos_ [(NontermIdent, [String])]
arg_ctx_ NontermIdent
arg_name_ [NontermIdent]
arg_params_ ComplexType
arg_type_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = [(NontermIdent, [(NontermIdent, Type)])]
-> NontermIdent
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall b c a. [(b, c)] -> a -> [(a, b, c)]
rule145 [(NontermIdent, [(NontermIdent, Type)])]
_expanded NontermIdent
arg_name_
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = NontermIdent -> Set NontermIdent
forall a. a -> Set a
rule146 NontermIdent
arg_name_
         _expanded :: [(NontermIdent, [(NontermIdent, Type)])]
_expanded = ComplexType
-> NontermIdent
-> [NontermIdent]
-> Pos
-> [(NontermIdent, [(NontermIdent, Type)])]
rule147 ComplexType
_argType NontermIdent
arg_name_ [NontermIdent]
arg_params_ Pos
arg_pos_
         _argType :: ComplexType
_argType = Set NontermIdent -> ComplexType -> ComplexType
rule148 Set NontermIdent
_lhsIallNonterminals ComplexType
arg_type_
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = ComplexType -> NontermIdent -> TypeSyns
forall b a. b -> a -> [(a, b)]
rule149 ComplexType
_argType NontermIdent
arg_name_
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = NontermIdent -> [NontermIdent] -> ParamMap
forall k a. k -> [a] -> Map k [a]
rule150 NontermIdent
arg_name_ [NontermIdent]
arg_params_
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = [(NontermIdent, [String])] -> NontermIdent -> ContextMap
forall a k. [a] -> k -> Map k [a]
rule151 [(NontermIdent, [String])]
arg_ctx_ NontermIdent
arg_name_
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule152  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule153  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule154  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule155  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule156  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule157  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule158  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule159  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule160  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule161  ()
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule162  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule163  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule164  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule165  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule166  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule167  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule168  ()
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule169  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule170  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule171  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule172  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule173  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule174  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule175 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule176 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule177 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule145 #-}
   {-# LINE 254 "src-ag/Transform.ag" #-}
   rule145 = \ _expanded name_ ->
                                 {-# LINE 254 "src-ag/Transform.ag" #-}
                                 map (\(x,y)->(name_, x, y)) _expanded
                                 {-# LINE 1881 "src-generated/Transform.hs" #-}
   {-# INLINE rule146 #-}
   {-# LINE 600 "src-ag/Transform.ag" #-}
   rule146 = \ name_ ->
                                 {-# LINE 600 "src-ag/Transform.ag" #-}
                                 Set.singleton name_
                                 {-# LINE 1887 "src-generated/Transform.hs" #-}
   {-# INLINE rule147 #-}
   {-# LINE 654 "src-ag/Transform.ag" #-}
   rule147 = \ _argType name_ params_ pos_ ->
                                 {-# LINE 654 "src-ag/Transform.ag" #-}
                                 case _argType of
                                         List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)
                                                                         ,(Ident "tl" pos_, NT name_ (map getName params_) False)
                                                                         ]
                                                     )
                                                    ,(Ident "Nil" pos_,  [])
                                                    ]
                                         Maybe tp -> [(Ident "Just" pos_, [(Ident "just" pos_, tp)
                                                                         ]
                                                     )
                                                    ,(Ident "Nothing" pos_,  [])
                                                    ]
                                         Either tp1 tp2 -> [
                                                      (Ident "Left"    pos_,  [(Ident "left"  pos_, tp1) ])
                                                    , (Ident "Right"   pos_,  [(Ident "right" pos_, tp2) ])
                                                    ]
                                         Map tp1 tp2 -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, tp1)
                                                                               , (Ident "val" pos_, tp2)
                                                                               , (Ident "tl" pos_, NT name_ (map getName params_) False)
                                                                               ])
                                                        , (Ident "Nil" pos_, [])
                                                        ]
                                         IntMap tp   -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, Haskell "Int")
                                                                               , (Ident "val" pos_, tp)
                                                                               , (Ident "tl" pos_, NT name_ (map getName params_) False)
                                                                               ])
                                                        , (Ident "Nil" pos_, [])
                                                        ]
                                         OrdSet tp   -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, tp)
                                                                               , (Ident "tl" pos_, NT name_ (map getName params_) False) ])
                                                        , (Ident "Nil" pos_, [])
                                                        ]
                                         IntSet      -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, Haskell "Int")
                                                                               , (Ident "tl" pos_, NT name_ (map getName params_) False) ])
                                                        , (Ident "Nil" pos_, [])
                                                        ]
                                         Tuple xs -> [(Ident "Tuple" pos_, xs)]
                                 {-# LINE 1929 "src-generated/Transform.hs" #-}
   {-# INLINE rule148 #-}
   {-# LINE 691 "src-ag/Transform.ag" #-}
   rule148 = \ ((_lhsIallNonterminals) :: Set NontermIdent) type_ ->
                                 {-# LINE 691 "src-ag/Transform.ag" #-}
                                 case type_ of
                                  Maybe tp       -> Maybe  (  makeType _lhsIallNonterminals tp)
                                  Either tp1 tp2 -> Either (  makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)
                                  List tp        -> List   (  makeType _lhsIallNonterminals tp)
                                  Tuple xs       -> Tuple [(f,makeType _lhsIallNonterminals tp) | (f,tp) <- xs]
                                  Map tp1 tp2    -> Map    (  makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)
                                  IntMap tp      -> IntMap (  makeType _lhsIallNonterminals tp)
                                  OrdSet tp      -> OrdSet (  makeType _lhsIallNonterminals tp)
                                  IntSet         -> IntSet
                                 {-# LINE 1943 "src-generated/Transform.hs" #-}
   {-# INLINE rule149 #-}
   {-# LINE 700 "src-ag/Transform.ag" #-}
   rule149 = \ _argType name_ ->
                                 {-# LINE 700 "src-ag/Transform.ag" #-}
                                 [(name_,_argType)]
                                 {-# LINE 1949 "src-generated/Transform.hs" #-}
   {-# INLINE rule150 #-}
   {-# LINE 954 "src-ag/Transform.ag" #-}
   rule150 = \ name_ params_ ->
                            {-# LINE 954 "src-ag/Transform.ag" #-}
                            if null params_
                            then Map.empty
                            else Map.singleton name_ params_
                            {-# LINE 1957 "src-generated/Transform.hs" #-}
   {-# INLINE rule151 #-}
   {-# LINE 977 "src-ag/Transform.ag" #-}
   rule151 = \ ctx_ name_ ->
                         {-# LINE 977 "src-ag/Transform.ag" #-}
                         if null ctx_
                         then Map.empty
                         else Map.singleton name_ ctx_
                         {-# LINE 1965 "src-generated/Transform.hs" #-}
   {-# INLINE rule152 #-}
   rule152 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule153 #-}
   rule153 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule154 #-}
   rule154 = \  (_ :: ()) ->
     []
   {-# INLINE rule155 #-}
   rule155 = \  (_ :: ()) ->
     []
   {-# INLINE rule156 #-}
   rule156 = \  (_ :: ()) ->
     []
   {-# INLINE rule157 #-}
   rule157 = \  (_ :: ()) ->
     []
   {-# INLINE rule158 #-}
   rule158 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule159 #-}
   rule159 = \  (_ :: ()) ->
     []
   {-# INLINE rule160 #-}
   rule160 = \  (_ :: ()) ->
     []
   {-# INLINE rule161 #-}
   rule161 = \  (_ :: ()) ->
     []
   {-# INLINE rule162 #-}
   rule162 = \  (_ :: ()) ->
     []
   {-# INLINE rule163 #-}
   rule163 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule164 #-}
   rule164 = \  (_ :: ()) ->
     []
   {-# INLINE rule165 #-}
   rule165 = \  (_ :: ()) ->
     []
   {-# INLINE rule166 #-}
   rule166 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule167 #-}
   rule167 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule168 #-}
   rule168 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule169 #-}
   rule169 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule170 #-}
   rule170 = \  (_ :: ()) ->
     id
   {-# INLINE rule171 #-}
   rule171 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule172 #-}
   rule172 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule173 #-}
   rule173 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule174 #-}
   rule174 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule175 #-}
   rule175 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule176 #-}
   rule176 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule177 #-}
   rule177 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
{-# NOINLINE sem_Elem_Attr #-}
sem_Elem_Attr :: (Pos) -> (ClassContext) -> T_NontSet  -> ([String]) -> T_Attrs  -> T_Elem 
sem_Elem_Attr :: Pos
-> [(NontermIdent, [String])]
-> T_NontSet
-> [String]
-> T_Attrs
-> T_Elem
sem_Elem_Attr Pos
_ [(NontermIdent, [String])]
arg_ctx_ T_NontSet
arg_names_ [String]
arg_quants_ T_Attrs
arg_attrs_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _namesX29 :: T_NontSet_s29
_namesX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_names_))
         _attrsX11 :: T_Attrs_s11
_attrsX11 = Identity T_Attrs_s11 -> T_Attrs_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Attrs -> Identity T_Attrs_s11
attach_T_Attrs (T_Attrs
arg_attrs_))
         (T_NontSet_vOut28 Set NontermIdent
_namesIcollectedNames Seq Error
_namesIerrors Set NontermIdent
_namesInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_namesX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_namesOallFields Set NontermIdent
_namesOallNonterminals Map NontermIdent (Set NontermIdent)
_namesOdefinedSets)
         (T_Attrs_vOut10 Map NontermIdent (Attributes, Attributes)
_attrsIattrDecls Map NontermIdent (Attributes, Attributes)
_attrsIattrs Seq Error
_attrsIerrors Map NontermIdent (Map NontermIdent (String, String, String))
_attrsIuseMap) = T_Attrs_s11 -> T_Attrs_v10
inv_Attrs_s11 T_Attrs_s11
_attrsX11 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Set NontermIdent
-> Options
-> T_Attrs_vIn10
T_Attrs_vIn10 DataTypes
_attrsOallFields Set NontermIdent
_attrsOallNonterminals Map NontermIdent (Attributes, Attributes)
_attrsOattrDecls Map NontermIdent (Attributes, Attributes)
_attrsOattrs Set NontermIdent
_attrsOnts Options
_attrsOoptions)
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = Set NontermIdent -> [(NontermIdent, [String])] -> ContextMap
forall a. Set NontermIdent -> [a] -> Map NontermIdent [a]
rule178 Set NontermIdent
_namesInontSet [(NontermIdent, [String])]
arg_ctx_
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = Set NontermIdent -> [String] -> QuantMap
forall a. Set NontermIdent -> [a] -> Map NontermIdent [a]
rule179 Set NontermIdent
_namesInontSet [String]
arg_quants_
         _attrsOnts :: Set NontermIdent
_attrsOnts = Set NontermIdent -> Set NontermIdent
rule180 Set NontermIdent
_namesInontSet
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule181  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule182  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule183  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule184  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule185  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule186  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule187  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule188  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule189  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule190  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule191  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule192 Set NontermIdent
_namesIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule193  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule194  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule195  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule196  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule197  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule198  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule199 Seq Error
_attrsIerrors Seq Error
_namesIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule200  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule201  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule202  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule203  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule204  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
rule205 Map NontermIdent (Map NontermIdent (String, String, String))
_attrsIuseMap
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule206  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule207 Map NontermIdent (Attributes, Attributes)
_attrsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule208 Map NontermIdent (Attributes, Attributes)
_attrsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule209 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _namesOallFields :: DataTypes
_namesOallFields = DataTypes -> DataTypes
rule210 DataTypes
_lhsIallFields
         _namesOallNonterminals :: Set NontermIdent
_namesOallNonterminals = Set NontermIdent -> Set NontermIdent
rule211 Set NontermIdent
_lhsIallNonterminals
         _namesOdefinedSets :: Map NontermIdent (Set NontermIdent)
_namesOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule212 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _attrsOallFields :: DataTypes
_attrsOallFields = DataTypes -> DataTypes
rule213 DataTypes
_lhsIallFields
         _attrsOallNonterminals :: Set NontermIdent
_attrsOallNonterminals = Set NontermIdent -> Set NontermIdent
rule214 Set NontermIdent
_lhsIallNonterminals
         _attrsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_attrsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule215 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _attrsOattrs :: Map NontermIdent (Attributes, Attributes)
_attrsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule216 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _attrsOoptions :: Options
_attrsOoptions = Options -> Options
rule217 Options
_lhsIoptions
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule178 #-}
   {-# LINE 971 "src-ag/Transform.ag" #-}
   rule178 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->
                         {-# LINE 971 "src-ag/Transform.ag" #-}
                         if null ctx_
                         then Map.empty
                         else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]
                         {-# LINE 2136 "src-generated/Transform.hs" #-}
   {-# INLINE rule179 #-}
   {-# LINE 996 "src-ag/Transform.ag" #-}
   rule179 = \ ((_namesInontSet) :: Set NontermIdent) quants_ ->
                           {-# LINE 996 "src-ag/Transform.ag" #-}
                           if null quants_
                           then Map.empty
                           else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]
                           {-# LINE 2144 "src-generated/Transform.hs" #-}
   {-# INLINE rule180 #-}
   {-# LINE 1034 "src-ag/Transform.ag" #-}
   rule180 = \ ((_namesInontSet) :: Set NontermIdent) ->
                       {-# LINE 1034 "src-ag/Transform.ag" #-}
                       _namesInontSet
                       {-# LINE 2150 "src-generated/Transform.hs" #-}
   {-# INLINE rule181 #-}
   rule181 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule182 #-}
   rule182 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule183 #-}
   rule183 = \  (_ :: ()) ->
     []
   {-# INLINE rule184 #-}
   rule184 = \  (_ :: ()) ->
     []
   {-# INLINE rule185 #-}
   rule185 = \  (_ :: ()) ->
     []
   {-# INLINE rule186 #-}
   rule186 = \  (_ :: ()) ->
     []
   {-# INLINE rule187 #-}
   rule187 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule188 #-}
   rule188 = \  (_ :: ()) ->
     []
   {-# INLINE rule189 #-}
   rule189 = \  (_ :: ()) ->
     []
   {-# INLINE rule190 #-}
   rule190 = \  (_ :: ()) ->
     []
   {-# INLINE rule191 #-}
   rule191 = \  (_ :: ()) ->
     []
   {-# INLINE rule192 #-}
   rule192 = \ ((_namesIcollectedNames) :: Set Identifier) ->
     _namesIcollectedNames
   {-# INLINE rule193 #-}
   rule193 = \  (_ :: ()) ->
     []
   {-# INLINE rule194 #-}
   rule194 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule195 #-}
   rule195 = \  (_ :: ()) ->
     []
   {-# INLINE rule196 #-}
   rule196 = \  (_ :: ()) ->
     []
   {-# INLINE rule197 #-}
   rule197 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule198 #-}
   rule198 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule199 #-}
   rule199 = \ ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->
     _namesIerrors Seq.>< _attrsIerrors
   {-# INLINE rule200 #-}
   rule200 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule201 #-}
   rule201 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule202 #-}
   rule202 = \  (_ :: ()) ->
     id
   {-# INLINE rule203 #-}
   rule203 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule204 #-}
   rule204 = \  (_ :: ()) ->
     []
   {-# INLINE rule205 #-}
   rule205 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->
     _attrsIuseMap
   {-# INLINE rule206 #-}
   rule206 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule207 #-}
   rule207 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _attrsIattrDecls
   {-# INLINE rule208 #-}
   rule208 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _attrsIattrs
   {-# INLINE rule209 #-}
   rule209 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
   {-# INLINE rule210 #-}
   rule210 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule211 #-}
   rule211 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule212 #-}
   rule212 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
   {-# INLINE rule213 #-}
   rule213 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule214 #-}
   rule214 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule215 #-}
   rule215 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule216 #-}
   rule216 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule217 #-}
   rule217 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# NOINLINE sem_Elem_Sem #-}
sem_Elem_Sem :: (Pos) -> (ClassContext) -> T_NontSet  -> T_Attrs  -> ([String]) -> T_SemAlts  -> T_Elem 
sem_Elem_Sem :: Pos
-> [(NontermIdent, [String])]
-> T_NontSet
-> T_Attrs
-> [String]
-> T_SemAlts
-> T_Elem
sem_Elem_Sem Pos
_ [(NontermIdent, [String])]
arg_ctx_ T_NontSet
arg_names_ T_Attrs
arg_attrs_ [String]
arg_quants_ T_SemAlts
arg_alts_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _namesX29 :: T_NontSet_s29
_namesX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_names_))
         _attrsX11 :: T_Attrs_s11
_attrsX11 = Identity T_Attrs_s11 -> T_Attrs_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Attrs -> Identity T_Attrs_s11
attach_T_Attrs (T_Attrs
arg_attrs_))
         _altsX41 :: T_SemAlts_s41
_altsX41 = Identity T_SemAlts_s41 -> T_SemAlts_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_SemAlts -> Identity T_SemAlts_s41
attach_T_SemAlts (T_SemAlts
arg_alts_))
         (T_NontSet_vOut28 Set NontermIdent
_namesIcollectedNames Seq Error
_namesIerrors Set NontermIdent
_namesInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_namesX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_namesOallFields Set NontermIdent
_namesOallNonterminals Map NontermIdent (Set NontermIdent)
_namesOdefinedSets)
         (T_Attrs_vOut10 Map NontermIdent (Attributes, Attributes)
_attrsIattrDecls Map NontermIdent (Attributes, Attributes)
_attrsIattrs Seq Error
_attrsIerrors Map NontermIdent (Map NontermIdent (String, String, String))
_attrsIuseMap) = T_Attrs_s11 -> T_Attrs_v10
inv_Attrs_s11 T_Attrs_s11
_attrsX11 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Set NontermIdent
-> Options
-> T_Attrs_vIn10
T_Attrs_vIn10 DataTypes
_attrsOallFields Set NontermIdent
_attrsOallNonterminals Map NontermIdent (Attributes, Attributes)
_attrsOattrDecls Map NontermIdent (Attributes, Attributes)
_attrsOattrs Set NontermIdent
_attrsOnts Options
_attrsOoptions)
         (T_SemAlts_vOut40 AttrOrderMap
_altsIattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_altsIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_altsIcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_altsIcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_altsIcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_altsIcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_altsIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_altsIcollectedUniques Seq Error
_altsIerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_altsIsemPragmasCollect) = T_SemAlts_s41 -> T_SemAlts_v40
inv_SemAlts_s41 T_SemAlts_s41
_altsX41 (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Set NontermIdent
-> Options
-> T_SemAlts_vIn40
T_SemAlts_vIn40 Map NontermIdent (Attributes, Attributes)
_altsOallAttrDecls Map NontermIdent (Attributes, Attributes)
_altsOallAttrs DataTypes
_altsOallFields Set NontermIdent
_altsOnts Options
_altsOoptions)
         _altsOnts :: Set NontermIdent
_altsOnts = Set NontermIdent -> Set NontermIdent
rule218 Set NontermIdent
_namesInontSet
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = Set NontermIdent -> [(NontermIdent, [String])] -> ContextMap
forall a. Set NontermIdent -> [a] -> Map NontermIdent [a]
rule219 Set NontermIdent
_namesInontSet [(NontermIdent, [String])]
arg_ctx_
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = Set NontermIdent -> [String] -> QuantMap
forall a. Set NontermIdent -> [a] -> Map NontermIdent [a]
rule220 Set NontermIdent
_namesInontSet [String]
arg_quants_
         _attrsOnts :: Set NontermIdent
_attrsOnts = Set NontermIdent -> Set NontermIdent
rule221 Set NontermIdent
_namesInontSet
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = AttrOrderMap -> AttrOrderMap
rule222 AttrOrderMap
_altsIattrOrderCollect
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule223  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule224 [(NontermIdent, NontermIdent, [AugmentInfo])]
_altsIcollectedArounds
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule225 [(NontermIdent, NontermIdent, [AugmentInfo])]
_altsIcollectedAugments
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule226  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule227  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule228  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule229  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
rule230 [(NontermIdent, NontermIdent, [NontermIdent])]
_altsIcollectedInsts
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule231  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
rule232 [(NontermIdent, NontermIdent, [MergeInfo])]
_altsIcollectedMerges
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule233 Set NontermIdent
_namesIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
rule234 [(NontermIdent, NontermIdent, RuleInfo)]
_altsIcollectedRules
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule235  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
rule236 [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_altsIcollectedSigs
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
rule237 [(NontermIdent, NontermIdent, [UniqueInfo])]
_altsIcollectedUniques
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule238  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule239  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error -> Seq Error
rule240 Seq Error
_altsIerrors Seq Error
_attrsIerrors Seq Error
_namesIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule241  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule242  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule243  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule244 Map NontermIdent (Map NontermIdent (Set NontermIdent))
_altsIsemPragmasCollect
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule245  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
rule246 Map NontermIdent (Map NontermIdent (String, String, String))
_attrsIuseMap
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule247  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule248 Map NontermIdent (Attributes, Attributes)
_attrsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule249 Map NontermIdent (Attributes, Attributes)
_attrsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule250 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _namesOallFields :: DataTypes
_namesOallFields = DataTypes -> DataTypes
rule251 DataTypes
_lhsIallFields
         _namesOallNonterminals :: Set NontermIdent
_namesOallNonterminals = Set NontermIdent -> Set NontermIdent
rule252 Set NontermIdent
_lhsIallNonterminals
         _namesOdefinedSets :: Map NontermIdent (Set NontermIdent)
_namesOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule253 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _attrsOallFields :: DataTypes
_attrsOallFields = DataTypes -> DataTypes
rule254 DataTypes
_lhsIallFields
         _attrsOallNonterminals :: Set NontermIdent
_attrsOallNonterminals = Set NontermIdent -> Set NontermIdent
rule255 Set NontermIdent
_lhsIallNonterminals
         _attrsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_attrsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule256 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _attrsOattrs :: Map NontermIdent (Attributes, Attributes)
_attrsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule257 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _attrsOoptions :: Options
_attrsOoptions = Options -> Options
rule258 Options
_lhsIoptions
         _altsOallAttrDecls :: Map NontermIdent (Attributes, Attributes)
_altsOallAttrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule259 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
         _altsOallAttrs :: Map NontermIdent (Attributes, Attributes)
_altsOallAttrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule260 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
         _altsOallFields :: DataTypes
_altsOallFields = DataTypes -> DataTypes
rule261 DataTypes
_lhsIallFields
         _altsOoptions :: Options
_altsOoptions = Options -> Options
rule262 Options
_lhsIoptions
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule218 #-}
   {-# LINE 177 "src-ag/Transform.ag" #-}
   rule218 = \ ((_namesInontSet) :: Set NontermIdent) ->
                      {-# LINE 177 "src-ag/Transform.ag" #-}
                      _namesInontSet
                      {-# LINE 2359 "src-generated/Transform.hs" #-}
   {-# INLINE rule219 #-}
   {-# LINE 971 "src-ag/Transform.ag" #-}
   rule219 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->
                         {-# LINE 971 "src-ag/Transform.ag" #-}
                         if null ctx_
                         then Map.empty
                         else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]
                         {-# LINE 2367 "src-generated/Transform.hs" #-}
   {-# INLINE rule220 #-}
   {-# LINE 996 "src-ag/Transform.ag" #-}
   rule220 = \ ((_namesInontSet) :: Set NontermIdent) quants_ ->
                           {-# LINE 996 "src-ag/Transform.ag" #-}
                           if null quants_
                           then Map.empty
                           else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]
                           {-# LINE 2375 "src-generated/Transform.hs" #-}
   {-# INLINE rule221 #-}
   {-# LINE 1035 "src-ag/Transform.ag" #-}
   rule221 = \ ((_namesInontSet) :: Set NontermIdent) ->
                       {-# LINE 1035 "src-ag/Transform.ag" #-}
                       _namesInontSet
                       {-# LINE 2381 "src-generated/Transform.hs" #-}
   {-# INLINE rule222 #-}
   rule222 = \ ((_altsIattrOrderCollect) :: AttrOrderMap) ->
     _altsIattrOrderCollect
   {-# INLINE rule223 #-}
   rule223 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule224 #-}
   rule224 = \ ((_altsIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ->
     _altsIcollectedArounds
   {-# INLINE rule225 #-}
   rule225 = \ ((_altsIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->
     _altsIcollectedAugments
   {-# INLINE rule226 #-}
   rule226 = \  (_ :: ()) ->
     []
   {-# INLINE rule227 #-}
   rule227 = \  (_ :: ()) ->
     []
   {-# INLINE rule228 #-}
   rule228 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule229 #-}
   rule229 = \  (_ :: ()) ->
     []
   {-# INLINE rule230 #-}
   rule230 = \ ((_altsIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->
     _altsIcollectedInsts
   {-# INLINE rule231 #-}
   rule231 = \  (_ :: ()) ->
     []
   {-# INLINE rule232 #-}
   rule232 = \ ((_altsIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) ->
     _altsIcollectedMerges
   {-# INLINE rule233 #-}
   rule233 = \ ((_namesIcollectedNames) :: Set Identifier) ->
     _namesIcollectedNames
   {-# INLINE rule234 #-}
   rule234 = \ ((_altsIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->
     _altsIcollectedRules
   {-# INLINE rule235 #-}
   rule235 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule236 #-}
   rule236 = \ ((_altsIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->
     _altsIcollectedSigs
   {-# INLINE rule237 #-}
   rule237 = \ ((_altsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->
     _altsIcollectedUniques
   {-# INLINE rule238 #-}
   rule238 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule239 #-}
   rule239 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule240 #-}
   rule240 = \ ((_altsIerrors) :: Seq Error) ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->
     _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors
   {-# INLINE rule241 #-}
   rule241 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule242 #-}
   rule242 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule243 #-}
   rule243 = \  (_ :: ()) ->
     id
   {-# INLINE rule244 #-}
   rule244 = \ ((_altsIsemPragmasCollect) :: PragmaMap) ->
     _altsIsemPragmasCollect
   {-# INLINE rule245 #-}
   rule245 = \  (_ :: ()) ->
     []
   {-# INLINE rule246 #-}
   rule246 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->
     _attrsIuseMap
   {-# INLINE rule247 #-}
   rule247 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule248 #-}
   rule248 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _attrsIattrDecls
   {-# INLINE rule249 #-}
   rule249 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _attrsIattrs
   {-# INLINE rule250 #-}
   rule250 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
   {-# INLINE rule251 #-}
   rule251 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule252 #-}
   rule252 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule253 #-}
   rule253 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
   {-# INLINE rule254 #-}
   rule254 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule255 #-}
   rule255 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule256 #-}
   rule256 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule257 #-}
   rule257 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule258 #-}
   rule258 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule259 #-}
   rule259 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIallAttrDecls
   {-# INLINE rule260 #-}
   rule260 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIallAttrs
   {-# INLINE rule261 #-}
   rule261 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule262 #-}
   rule262 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# NOINLINE sem_Elem_Txt #-}
sem_Elem_Txt :: (Pos) -> (BlockKind) -> (Maybe NontermIdent) -> ([String]) -> T_Elem 
sem_Elem_Txt :: Pos -> BlockKind -> Maybe NontermIdent -> [String] -> T_Elem
sem_Elem_Txt Pos
arg_pos_ BlockKind
arg_kind_ Maybe NontermIdent
arg_mbNt_ [String]
arg_lines_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _blockInfo :: BlockInfo
_blockInfo = BlockKind -> Maybe NontermIdent -> BlockInfo
forall a b. a -> b -> (a, b)
rule263 BlockKind
arg_kind_ Maybe NontermIdent
arg_mbNt_
         _blockValue :: [([String], Pos)]
_blockValue = [String] -> Pos -> [([String], Pos)]
forall a b. a -> b -> [(a, b)]
rule264 [String]
arg_lines_ Pos
arg_pos_
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = BlockInfo -> [([String], Pos)] -> Blocks
forall k a. k -> a -> Map k a
rule265 BlockInfo
_blockInfo [([String], Pos)]
_blockValue
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Options -> [String] -> Pos -> Seq Error
rule266 Options
_lhsIoptions [String]
arg_lines_ Pos
arg_pos_
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule267  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule268  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule269  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule270  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule271  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule272  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule273  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule274  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule275  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule276  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = () -> Set NontermIdent
forall a. () -> Set a
rule277  ()
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule278  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule279  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule280  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule281  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule282  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule283  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule284  ()
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule285  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule286  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule287  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule288  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule289  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule290  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule291  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule292  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule293 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule294 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule295 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule263 #-}
   {-# LINE 186 "src-ag/Transform.ag" #-}
   rule263 = \ kind_ mbNt_ ->
                            {-# LINE 186 "src-ag/Transform.ag" #-}
                            ( kind_
                            , mbNt_
                            )
                            {-# LINE 2586 "src-generated/Transform.hs" #-}
   {-# INLINE rule264 #-}
   {-# LINE 189 "src-ag/Transform.ag" #-}
   rule264 = \ lines_ pos_ ->
                            {-# LINE 189 "src-ag/Transform.ag" #-}
                            [(lines_, pos_)]
                            {-# LINE 2592 "src-generated/Transform.hs" #-}
   {-# INLINE rule265 #-}
   {-# LINE 190 "src-ag/Transform.ag" #-}
   rule265 = \ _blockInfo _blockValue ->
                            {-# LINE 190 "src-ag/Transform.ag" #-}
                            Map.singleton _blockInfo     _blockValue
                            {-# LINE 2598 "src-generated/Transform.hs" #-}
   {-# INLINE rule266 #-}
   {-# LINE 191 "src-ag/Transform.ag" #-}
   rule266 = \ ((_lhsIoptions) :: Options) lines_ pos_ ->
                            {-# LINE 191 "src-ag/Transform.ag" #-}
                            if checkParseBlock _lhsIoptions
                            then let ex  = Expression pos_ tks
                                     tks = [tk]
                                     tk  = HsToken (unlines lines_) pos_
                                 in Seq.fromList $ checkBlock $ ex
                            else Seq.empty
                            {-# LINE 2609 "src-generated/Transform.hs" #-}
   {-# INLINE rule267 #-}
   rule267 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule268 #-}
   rule268 = \  (_ :: ()) ->
     []
   {-# INLINE rule269 #-}
   rule269 = \  (_ :: ()) ->
     []
   {-# INLINE rule270 #-}
   rule270 = \  (_ :: ()) ->
     []
   {-# INLINE rule271 #-}
   rule271 = \  (_ :: ()) ->
     []
   {-# INLINE rule272 #-}
   rule272 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule273 #-}
   rule273 = \  (_ :: ()) ->
     []
   {-# INLINE rule274 #-}
   rule274 = \  (_ :: ()) ->
     []
   {-# INLINE rule275 #-}
   rule275 = \  (_ :: ()) ->
     []
   {-# INLINE rule276 #-}
   rule276 = \  (_ :: ()) ->
     []
   {-# INLINE rule277 #-}
   rule277 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule278 #-}
   rule278 = \  (_ :: ()) ->
     []
   {-# INLINE rule279 #-}
   rule279 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule280 #-}
   rule280 = \  (_ :: ()) ->
     []
   {-# INLINE rule281 #-}
   rule281 = \  (_ :: ()) ->
     []
   {-# INLINE rule282 #-}
   rule282 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule283 #-}
   rule283 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule284 #-}
   rule284 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule285 #-}
   rule285 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule286 #-}
   rule286 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule287 #-}
   rule287 = \  (_ :: ()) ->
     id
   {-# INLINE rule288 #-}
   rule288 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule289 #-}
   rule289 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule290 #-}
   rule290 = \  (_ :: ()) ->
     []
   {-# INLINE rule291 #-}
   rule291 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule292 #-}
   rule292 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule293 #-}
   rule293 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule294 #-}
   rule294 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule295 #-}
   rule295 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
{-# NOINLINE sem_Elem_Set #-}
sem_Elem_Set :: (Pos) -> (NontermIdent) -> (Bool) -> T_NontSet  -> T_Elem 
sem_Elem_Set :: Pos -> NontermIdent -> Bool -> T_NontSet -> T_Elem
sem_Elem_Set Pos
_ NontermIdent
arg_name_ Bool
arg_merge_ T_NontSet
arg_set_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _setX29 :: T_NontSet_s29
_setX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set_))
         (T_NontSet_vOut28 Set NontermIdent
_setIcollectedNames Seq Error
_setIerrors Set NontermIdent
_setInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_setX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_setOallFields Set NontermIdent
_setOallNonterminals Map NontermIdent (Set NontermIdent)
_setOdefinedSets)
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = NontermIdent -> Set NontermIdent
forall a. a -> Set a
rule296 NontermIdent
arg_name_
         (Map NontermIdent (Set NontermIdent, Set NontermIdent)
_defSets2,Seq Error
_errs) = Set NontermIdent
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Set NontermIdent
-> Set NontermIdent
-> Bool
-> NontermIdent
-> (Map NontermIdent (Set NontermIdent, Set NontermIdent),
    Seq Error)
rule297 Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Set NontermIdent
_setIcollectedNames Set NontermIdent
_setInontSet Bool
arg_merge_ NontermIdent
arg_name_
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
forall a. a -> a
rule298 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_defSets2
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule299 Seq Error
_errs Seq Error
_setIerrors
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule300  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule301  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule302  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule303  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule304  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule305  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule306  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule307  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule308  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule309  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule310  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule311 Set NontermIdent
_setIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule312  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule313  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule314  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule315  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule316  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule317  ()
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule318  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule319  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule320  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule321  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule322  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule323  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule324  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule325  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule326 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule327 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _setOallFields :: DataTypes
_setOallFields = DataTypes -> DataTypes
rule328 DataTypes
_lhsIallFields
         _setOallNonterminals :: Set NontermIdent
_setOallNonterminals = Set NontermIdent -> Set NontermIdent
rule329 Set NontermIdent
_lhsIallNonterminals
         _setOdefinedSets :: Map NontermIdent (Set NontermIdent)
_setOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule330 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule296 #-}
   {-# LINE 597 "src-ag/Transform.ag" #-}
   rule296 = \ name_ ->
                                   {-# LINE 597 "src-ag/Transform.ag" #-}
                                   Set.singleton name_
                                   {-# LINE 2780 "src-generated/Transform.hs" #-}
   {-# INLINE rule297 #-}
   {-# LINE 714 "src-ag/Transform.ag" #-}
   rule297 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ((_setIcollectedNames) :: Set Identifier) ((_setInontSet) :: Set NontermIdent) merge_ name_ ->
                                {-# LINE 714 "src-ag/Transform.ag" #-}
                                let allUsedNames = Set.unions [ maybe (Set.singleton n)
                                                                      snd
                                                                      (Map.lookup n _lhsIdefSets)
                                                              | n <- Set.toList _setIcollectedNames
                                                              ]
                                    (nontSet,e1) | Set.member name_ allUsedNames
                                                             = (Set.empty, Seq.singleton(CyclicSet name_))
                                                 | otherwise = (_setInontSet, Seq.empty)
                                    (res, e2) = let toAdd = (nontSet,Set.insert name_ allUsedNames)
                                                    un (a,b) (c,d) = (a `Set.union` c, b `Set.union` d)
                                                in if Set.member name_ _lhsIallNonterminals || not merge_
                                                   then checkDuplicate DupSet name_ toAdd _lhsIdefSets
                                                   else (Map.insertWith un name_ toAdd _lhsIdefSets, Seq.empty)
                                in (res, e1 Seq.>< e2)
                                {-# LINE 2799 "src-generated/Transform.hs" #-}
   {-# INLINE rule298 #-}
   {-# LINE 728 "src-ag/Transform.ag" #-}
   rule298 = \ _defSets2 ->
                                {-# LINE 728 "src-ag/Transform.ag" #-}
                                _defSets2
                                {-# LINE 2805 "src-generated/Transform.hs" #-}
   {-# INLINE rule299 #-}
   {-# LINE 729 "src-ag/Transform.ag" #-}
   rule299 = \ _errs ((_setIerrors) :: Seq Error) ->
                                {-# LINE 729 "src-ag/Transform.ag" #-}
                                _errs >< _setIerrors
                                {-# LINE 2811 "src-generated/Transform.hs" #-}
   {-# INLINE rule300 #-}
   rule300 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule301 #-}
   rule301 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule302 #-}
   rule302 = \  (_ :: ()) ->
     []
   {-# INLINE rule303 #-}
   rule303 = \  (_ :: ()) ->
     []
   {-# INLINE rule304 #-}
   rule304 = \  (_ :: ()) ->
     []
   {-# INLINE rule305 #-}
   rule305 = \  (_ :: ()) ->
     []
   {-# INLINE rule306 #-}
   rule306 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule307 #-}
   rule307 = \  (_ :: ()) ->
     []
   {-# INLINE rule308 #-}
   rule308 = \  (_ :: ()) ->
     []
   {-# INLINE rule309 #-}
   rule309 = \  (_ :: ()) ->
     []
   {-# INLINE rule310 #-}
   rule310 = \  (_ :: ()) ->
     []
   {-# INLINE rule311 #-}
   rule311 = \ ((_setIcollectedNames) :: Set Identifier) ->
     _setIcollectedNames
   {-# INLINE rule312 #-}
   rule312 = \  (_ :: ()) ->
     []
   {-# INLINE rule313 #-}
   rule313 = \  (_ :: ()) ->
     []
   {-# INLINE rule314 #-}
   rule314 = \  (_ :: ()) ->
     []
   {-# INLINE rule315 #-}
   rule315 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule316 #-}
   rule316 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule317 #-}
   rule317 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule318 #-}
   rule318 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule319 #-}
   rule319 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule320 #-}
   rule320 = \  (_ :: ()) ->
     id
   {-# INLINE rule321 #-}
   rule321 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule322 #-}
   rule322 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule323 #-}
   rule323 = \  (_ :: ()) ->
     []
   {-# INLINE rule324 #-}
   rule324 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule325 #-}
   rule325 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule326 #-}
   rule326 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule327 #-}
   rule327 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule328 #-}
   rule328 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule329 #-}
   rule329 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule330 #-}
   rule330 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_Elem_Deriving #-}
sem_Elem_Deriving :: (Pos) -> T_NontSet  -> ([NontermIdent]) -> T_Elem 
sem_Elem_Deriving :: Pos -> T_NontSet -> [NontermIdent] -> T_Elem
sem_Elem_Deriving Pos
_ T_NontSet
arg_set_ [NontermIdent]
arg_classes_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _setX29 :: T_NontSet_s29
_setX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set_))
         (T_NontSet_vOut28 Set NontermIdent
_setIcollectedNames Seq Error
_setIerrors Set NontermIdent
_setInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_setX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_setOallFields Set NontermIdent
_setOallNonterminals Map NontermIdent (Set NontermIdent)
_setOdefinedSets)
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = Set NontermIdent
-> [NontermIdent] -> Map NontermIdent (Set NontermIdent)
rule331 Set NontermIdent
_setInontSet [NontermIdent]
arg_classes_
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule332  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule333  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule334  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule335  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule336  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule337  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule338  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule339  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule340  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule341  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule342  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule343 Set NontermIdent
_setIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule344  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule345  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule346  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule347  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule348  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule349  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule350 Seq Error
_setIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule351  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule352  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule353  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule354  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule355  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule356  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule357  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule358  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule359 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule360 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule361 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _setOallFields :: DataTypes
_setOallFields = DataTypes -> DataTypes
rule362 DataTypes
_lhsIallFields
         _setOallNonterminals :: Set NontermIdent
_setOallNonterminals = Set NontermIdent -> Set NontermIdent
rule363 Set NontermIdent
_lhsIallNonterminals
         _setOdefinedSets :: Map NontermIdent (Set NontermIdent)
_setOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule364 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule331 #-}
   {-# LINE 1017 "src-ag/Transform.ag" #-}
   rule331 = \ ((_setInontSet) :: Set NontermIdent) classes_ ->
                               {-# LINE 1017 "src-ag/Transform.ag" #-}
                               Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]
                               {-# LINE 2987 "src-generated/Transform.hs" #-}
   {-# INLINE rule332 #-}
   rule332 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule333 #-}
   rule333 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule334 #-}
   rule334 = \  (_ :: ()) ->
     []
   {-# INLINE rule335 #-}
   rule335 = \  (_ :: ()) ->
     []
   {-# INLINE rule336 #-}
   rule336 = \  (_ :: ()) ->
     []
   {-# INLINE rule337 #-}
   rule337 = \  (_ :: ()) ->
     []
   {-# INLINE rule338 #-}
   rule338 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule339 #-}
   rule339 = \  (_ :: ()) ->
     []
   {-# INLINE rule340 #-}
   rule340 = \  (_ :: ()) ->
     []
   {-# INLINE rule341 #-}
   rule341 = \  (_ :: ()) ->
     []
   {-# INLINE rule342 #-}
   rule342 = \  (_ :: ()) ->
     []
   {-# INLINE rule343 #-}
   rule343 = \ ((_setIcollectedNames) :: Set Identifier) ->
     _setIcollectedNames
   {-# INLINE rule344 #-}
   rule344 = \  (_ :: ()) ->
     []
   {-# INLINE rule345 #-}
   rule345 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule346 #-}
   rule346 = \  (_ :: ()) ->
     []
   {-# INLINE rule347 #-}
   rule347 = \  (_ :: ()) ->
     []
   {-# INLINE rule348 #-}
   rule348 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule349 #-}
   rule349 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule350 #-}
   rule350 = \ ((_setIerrors) :: Seq Error) ->
     _setIerrors
   {-# INLINE rule351 #-}
   rule351 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule352 #-}
   rule352 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule353 #-}
   rule353 = \  (_ :: ()) ->
     id
   {-# INLINE rule354 #-}
   rule354 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule355 #-}
   rule355 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule356 #-}
   rule356 = \  (_ :: ()) ->
     []
   {-# INLINE rule357 #-}
   rule357 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule358 #-}
   rule358 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule359 #-}
   rule359 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule360 #-}
   rule360 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule361 #-}
   rule361 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
   {-# INLINE rule362 #-}
   rule362 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule363 #-}
   rule363 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule364 #-}
   rule364 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_Elem_Wrapper #-}
sem_Elem_Wrapper :: (Pos) -> T_NontSet  -> T_Elem 
sem_Elem_Wrapper :: Pos -> T_NontSet -> T_Elem
sem_Elem_Wrapper Pos
_ T_NontSet
arg_set_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _setX29 :: T_NontSet_s29
_setX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set_))
         (T_NontSet_vOut28 Set NontermIdent
_setIcollectedNames Seq Error
_setIerrors Set NontermIdent
_setInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_setX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_setOallFields Set NontermIdent
_setOallNonterminals Map NontermIdent (Set NontermIdent)
_setOdefinedSets)
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = Set NontermIdent -> Set NontermIdent
rule365 Set NontermIdent
_setInontSet
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule366  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule367  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule368  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule369  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule370  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule371  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule372  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule373  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule374  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule375  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule376  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule377 Set NontermIdent
_setIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule378  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule379  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule380  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule381  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule382  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule383  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule384  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule385 Seq Error
_setIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule386  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule387  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule388  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule389  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule390  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule391  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule392  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule393 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule394 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule395 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _setOallFields :: DataTypes
_setOallFields = DataTypes -> DataTypes
rule396 DataTypes
_lhsIallFields
         _setOallNonterminals :: Set NontermIdent
_setOallNonterminals = Set NontermIdent -> Set NontermIdent
rule397 Set NontermIdent
_lhsIallNonterminals
         _setOdefinedSets :: Map NontermIdent (Set NontermIdent)
_setOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule398 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule365 #-}
   {-# LINE 789 "src-ag/Transform.ag" #-}
   rule365 = \ ((_setInontSet) :: Set NontermIdent) ->
                             {-# LINE 789 "src-ag/Transform.ag" #-}
                             _setInontSet
                             {-# LINE 3169 "src-generated/Transform.hs" #-}
   {-# INLINE rule366 #-}
   rule366 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule367 #-}
   rule367 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule368 #-}
   rule368 = \  (_ :: ()) ->
     []
   {-# INLINE rule369 #-}
   rule369 = \  (_ :: ()) ->
     []
   {-# INLINE rule370 #-}
   rule370 = \  (_ :: ()) ->
     []
   {-# INLINE rule371 #-}
   rule371 = \  (_ :: ()) ->
     []
   {-# INLINE rule372 #-}
   rule372 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule373 #-}
   rule373 = \  (_ :: ()) ->
     []
   {-# INLINE rule374 #-}
   rule374 = \  (_ :: ()) ->
     []
   {-# INLINE rule375 #-}
   rule375 = \  (_ :: ()) ->
     []
   {-# INLINE rule376 #-}
   rule376 = \  (_ :: ()) ->
     []
   {-# INLINE rule377 #-}
   rule377 = \ ((_setIcollectedNames) :: Set Identifier) ->
     _setIcollectedNames
   {-# INLINE rule378 #-}
   rule378 = \  (_ :: ()) ->
     []
   {-# INLINE rule379 #-}
   rule379 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule380 #-}
   rule380 = \  (_ :: ()) ->
     []
   {-# INLINE rule381 #-}
   rule381 = \  (_ :: ()) ->
     []
   {-# INLINE rule382 #-}
   rule382 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule383 #-}
   rule383 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule384 #-}
   rule384 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule385 #-}
   rule385 = \ ((_setIerrors) :: Seq Error) ->
     _setIerrors
   {-# INLINE rule386 #-}
   rule386 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule387 #-}
   rule387 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule388 #-}
   rule388 = \  (_ :: ()) ->
     id
   {-# INLINE rule389 #-}
   rule389 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule390 #-}
   rule390 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule391 #-}
   rule391 = \  (_ :: ()) ->
     []
   {-# INLINE rule392 #-}
   rule392 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule393 #-}
   rule393 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule394 #-}
   rule394 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule395 #-}
   rule395 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
   {-# INLINE rule396 #-}
   rule396 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule397 #-}
   rule397 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule398 #-}
   rule398 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_Elem_Nocatas #-}
sem_Elem_Nocatas :: (Pos) -> T_NontSet  -> T_Elem 
sem_Elem_Nocatas :: Pos -> T_NontSet -> T_Elem
sem_Elem_Nocatas Pos
_ T_NontSet
arg_set_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _setX29 :: T_NontSet_s29
_setX29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set_))
         (T_NontSet_vOut28 Set NontermIdent
_setIcollectedNames Seq Error
_setIerrors Set NontermIdent
_setInontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_setX29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_setOallFields Set NontermIdent
_setOallNonterminals Map NontermIdent (Set NontermIdent)
_setOdefinedSets)
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = Set NontermIdent -> Options -> Options
rule399 Set NontermIdent
_setInontSet
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule400  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule401  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule402  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule403  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule404  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule405  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule406  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule407  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule408  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule409  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule410  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent
rule411 Set NontermIdent
_setIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule412  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule413  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule414  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule415  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule416  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule417  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule418  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule419 Seq Error
_setIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule420  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule421  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule422  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule423  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule424  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule425  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule426  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule427 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule428 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule429 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _setOallFields :: DataTypes
_setOallFields = DataTypes -> DataTypes
rule430 DataTypes
_lhsIallFields
         _setOallNonterminals :: Set NontermIdent
_setOallNonterminals = Set NontermIdent -> Set NontermIdent
rule431 Set NontermIdent
_lhsIallNonterminals
         _setOdefinedSets :: Map NontermIdent (Set NontermIdent)
_setOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule432 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule399 #-}
   {-# LINE 796 "src-ag/Transform.ag" #-}
   rule399 = \ ((_setInontSet) :: Set NontermIdent) ->
                             {-# LINE 796 "src-ag/Transform.ag" #-}
                             \o -> o { nocatas = _setInontSet `Set.union` nocatas o }
                             {-# LINE 3351 "src-generated/Transform.hs" #-}
   {-# INLINE rule400 #-}
   rule400 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule401 #-}
   rule401 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule402 #-}
   rule402 = \  (_ :: ()) ->
     []
   {-# INLINE rule403 #-}
   rule403 = \  (_ :: ()) ->
     []
   {-# INLINE rule404 #-}
   rule404 = \  (_ :: ()) ->
     []
   {-# INLINE rule405 #-}
   rule405 = \  (_ :: ()) ->
     []
   {-# INLINE rule406 #-}
   rule406 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule407 #-}
   rule407 = \  (_ :: ()) ->
     []
   {-# INLINE rule408 #-}
   rule408 = \  (_ :: ()) ->
     []
   {-# INLINE rule409 #-}
   rule409 = \  (_ :: ()) ->
     []
   {-# INLINE rule410 #-}
   rule410 = \  (_ :: ()) ->
     []
   {-# INLINE rule411 #-}
   rule411 = \ ((_setIcollectedNames) :: Set Identifier) ->
     _setIcollectedNames
   {-# INLINE rule412 #-}
   rule412 = \  (_ :: ()) ->
     []
   {-# INLINE rule413 #-}
   rule413 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule414 #-}
   rule414 = \  (_ :: ()) ->
     []
   {-# INLINE rule415 #-}
   rule415 = \  (_ :: ()) ->
     []
   {-# INLINE rule416 #-}
   rule416 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule417 #-}
   rule417 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule418 #-}
   rule418 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule419 #-}
   rule419 = \ ((_setIerrors) :: Seq Error) ->
     _setIerrors
   {-# INLINE rule420 #-}
   rule420 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule421 #-}
   rule421 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule422 #-}
   rule422 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule423 #-}
   rule423 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule424 #-}
   rule424 = \  (_ :: ()) ->
     []
   {-# INLINE rule425 #-}
   rule425 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule426 #-}
   rule426 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule427 #-}
   rule427 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule428 #-}
   rule428 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule429 #-}
   rule429 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
   {-# INLINE rule430 #-}
   rule430 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule431 #-}
   rule431 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule432 #-}
   rule432 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_Elem_Pragma #-}
sem_Elem_Pragma :: (Pos) -> ([NontermIdent]) -> T_Elem 
sem_Elem_Pragma :: Pos -> [NontermIdent] -> T_Elem
sem_Elem_Pragma Pos
_ [NontermIdent]
arg_names_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = [NontermIdent] -> Options -> Options
rule433 [NontermIdent]
arg_names_
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule434  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule435  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule436  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule437  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule438  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule439  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule440  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule441  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule442  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule443  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule444  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = () -> Set NontermIdent
forall a. () -> Set a
rule445  ()
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule446  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule447  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule448  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule449  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule450  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule451  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule452  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule453  ()
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule454  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule455  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule456  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule457  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule458  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule459  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule460  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule461 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule462 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule463 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule433 #-}
   {-# LINE 805 "src-ag/Transform.ag" #-}
   rule433 = \ names_ ->
                            {-# LINE 805 "src-ag/Transform.ag" #-}
                            let mk n o = case getName n of
                                           "gencatas"     -> o { folds       = True  }
                                           "nogencatas"   -> o { folds       = False }
                                           "gendatas"     -> o { dataTypes   = True  }
                                           "datarecords"  -> o { dataRecords = True  }
                                           "nogendatas"   -> o { dataTypes   = False }
                                           "gensems"      -> o { semfuns     = True  }
                                           "nogensems"    -> o { semfuns     = False }
                                           "gentypesigs"  -> o { typeSigs    = True  }
                                           "nogentypesigs"-> o { typeSigs    = False }
                                           "nocycle"      -> o { withCycle   = False, loag = False }
                                           "cycle"        -> o { withCycle   = True  }
                                           "nostrictdata" -> o { strictData  = False }
                                           "strictdata"   -> o { strictData  = True  }
                                           "nostrictcase" -> o { strictCases = False }
                                           "strictcase"   -> o { strictCases = True  }
                                           "strictercase" -> o { strictCases = True, stricterCases = True }
                                           "nostrictwrap" -> o { strictWrap  = False }
                                           "strictwrap"   -> o { strictWrap  = True  }
                                           "novisit"      -> o { visit       = False, loag = False }
                                           "visit"        -> o { visit       = True  }
                                           "nocase"       -> o { cases       = False }
                                           "case"         -> o { cases       = True  }
                                           "noseq"        -> o { withSeq     = False }
                                           "seq"          -> o { withSeq     = True  }
                                           "nounbox"      -> o { unbox       = False }
                                           "unbox"        -> o { unbox       = True  }
                                           "bangpats"     -> o { bangpats    = True  }
                                           "breadthfirst" -> o { breadthFirst = True }
                                           "breadthfirstStrict" -> o { breadthFirstStrict = True }
                                           "nooptimize"   -> o { cases = False , visit = False }
                                           "optimize"     -> o { cases = True  , visit = True  }
                                           "strictsem"    -> o { strictSems = True }
                                           "gentraces"    -> o { genTraces = True }
                                           "genusetraces" -> o { genUseTraces = True }
                                           "splitsems"    -> o { splitSems = True }
                                           "gencostcentres" -> o { genCostCentres = True }
                                           "sepsemmods"   -> sepSemModsOpt o
                                           "genlinepragmas" -> o { genLinePragmas = True }
                                           "newtypes"       -> o { newtypes = True }
                                           "nonewtypes"     -> o { newtypes = False }
                                           "nooptimizations" -> o { noOptimizations = True }
                                           "kennedywarren"   -> o { kennedyWarren = True }
                                           "aspectag"        -> o { genAspectAG = True }
                                           'n':'o':'g':'r':'o':'u':'p':'_':atts
                                                             -> o { noGroup =  extract atts  ++ noGroup o }
                                           "rename"          -> o { rename = True }
                                           "parallel"        -> o { parallelInvoke = True }
                                           "monadicwrappers" -> o { monadicWrappers = True }
                                           "dummytokenvisit" -> o { dummyTokenVisit = True }
                                           "tupleasdummytoken" -> o { tupleAsDummyToken = True }
                                           "stateasdummytoken" -> o { tupleAsDummyToken = False }
                                           "strictdummytoken" -> o { strictDummyToken = True }
                                           "noperruletypesigs" -> o { noPerRuleTypeSigs = True }
                                           "noperstatetypesigs" -> o { noPerStateTypeSigs = True }
                                           "noeagerblackholing" -> o { noEagerBlackholing = True }
                                           "noperrulecostcentres" -> o { noPerRuleCostCentres = True }
                                           "nopervisitcostcentres" -> o { noPerVisitCostCentres = True }
                                           "helpinlining" -> o { helpInlining = True }
                                           "noinlinepragmas" -> o { noInlinePragmas = True }
                                           "aggressiveinlinepragmas" -> o { aggressiveInlinePragmas = True }
                                           "latehigherorderbindings" -> o { lateHigherOrderBinding = True }
                                           "ocaml"                   -> ocamlOpt o
                                           "cleanlang"               -> cleanOpt o
                                           s              -> trace ("uuagc: ignoring unknown pragma: " ++ s) o
                            in \o -> foldr mk o names_
                            {-# LINE 3593 "src-generated/Transform.hs" #-}
   {-# INLINE rule434 #-}
   rule434 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule435 #-}
   rule435 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule436 #-}
   rule436 = \  (_ :: ()) ->
     []
   {-# INLINE rule437 #-}
   rule437 = \  (_ :: ()) ->
     []
   {-# INLINE rule438 #-}
   rule438 = \  (_ :: ()) ->
     []
   {-# INLINE rule439 #-}
   rule439 = \  (_ :: ()) ->
     []
   {-# INLINE rule440 #-}
   rule440 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule441 #-}
   rule441 = \  (_ :: ()) ->
     []
   {-# INLINE rule442 #-}
   rule442 = \  (_ :: ()) ->
     []
   {-# INLINE rule443 #-}
   rule443 = \  (_ :: ()) ->
     []
   {-# INLINE rule444 #-}
   rule444 = \  (_ :: ()) ->
     []
   {-# INLINE rule445 #-}
   rule445 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule446 #-}
   rule446 = \  (_ :: ()) ->
     []
   {-# INLINE rule447 #-}
   rule447 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule448 #-}
   rule448 = \  (_ :: ()) ->
     []
   {-# INLINE rule449 #-}
   rule449 = \  (_ :: ()) ->
     []
   {-# INLINE rule450 #-}
   rule450 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule451 #-}
   rule451 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule452 #-}
   rule452 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule453 #-}
   rule453 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule454 #-}
   rule454 = \  (_ :: ()) ->
     mzero
   {-# INLINE rule455 #-}
   rule455 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule456 #-}
   rule456 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule457 #-}
   rule457 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule458 #-}
   rule458 = \  (_ :: ()) ->
     []
   {-# INLINE rule459 #-}
   rule459 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule460 #-}
   rule460 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule461 #-}
   rule461 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule462 #-}
   rule462 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule463 #-}
   rule463 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets
{-# NOINLINE sem_Elem_Module #-}
sem_Elem_Module :: (Pos) -> (String) -> (String) -> (String) -> T_Elem 
sem_Elem_Module :: Pos -> String -> String -> String -> T_Elem
sem_Elem_Module Pos
_ String
arg_name_ String
arg_exports_ String
arg_imports_ = Identity T_Elem_s17 -> T_Elem
T_Elem (T_Elem_s17 -> Identity T_Elem_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elem_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Elem_s17
st17 = let
      v16 :: T_Elem_v16 
      v16 :: T_Elem_v16
v16 = \ (T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = String -> String -> String -> Maybe (String, String, String)
forall b c a. b -> c -> a -> Maybe (a, b, c)
rule464 String
arg_exports_ String
arg_imports_ String
arg_name_
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule465  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule466  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule467  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule468  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule469  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule470  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule471  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule472  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule473  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule474  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule475  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = () -> Set NontermIdent
forall a. () -> Set a
rule476  ()
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule477  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule478  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule479  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule480  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule481  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule482  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule483  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule484  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule485  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule486  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule487  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule488  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule489  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule490  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule491  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule492 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule493 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule494 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         __result_ :: T_Elem_vOut16
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elem_vOut16
T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elem_vOut16
__result_ )
     in T_Elem_v16 -> T_Elem_s17
C_Elem_s17 T_Elem_v16
v16
   {-# INLINE rule464 #-}
   {-# LINE 1214 "src-ag/Transform.ag" #-}
   rule464 = \ exports_ imports_ name_ ->
                         {-# LINE 1214 "src-ag/Transform.ag" #-}
                         Just (name_, exports_, imports_)
                         {-# LINE 3761 "src-generated/Transform.hs" #-}
   {-# INLINE rule465 #-}
   rule465 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule466 #-}
   rule466 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule467 #-}
   rule467 = \  (_ :: ()) ->
     []
   {-# INLINE rule468 #-}
   rule468 = \  (_ :: ()) ->
     []
   {-# INLINE rule469 #-}
   rule469 = \  (_ :: ()) ->
     []
   {-# INLINE rule470 #-}
   rule470 = \  (_ :: ()) ->
     []
   {-# INLINE rule471 #-}
   rule471 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule472 #-}
   rule472 = \  (_ :: ()) ->
     []
   {-# INLINE rule473 #-}
   rule473 = \  (_ :: ()) ->
     []
   {-# INLINE rule474 #-}
   rule474 = \  (_ :: ()) ->
     []
   {-# INLINE rule475 #-}
   rule475 = \  (_ :: ()) ->
     []
   {-# INLINE rule476 #-}
   rule476 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule477 #-}
   rule477 = \  (_ :: ()) ->
     []
   {-# INLINE rule478 #-}
   rule478 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule479 #-}
   rule479 = \  (_ :: ()) ->
     []
   {-# INLINE rule480 #-}
   rule480 = \  (_ :: ()) ->
     []
   {-# INLINE rule481 #-}
   rule481 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule482 #-}
   rule482 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule483 #-}
   rule483 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule484 #-}
   rule484 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule485 #-}
   rule485 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule486 #-}
   rule486 = \  (_ :: ()) ->
     id
   {-# INLINE rule487 #-}
   rule487 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule488 #-}
   rule488 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule489 #-}
   rule489 = \  (_ :: ()) ->
     []
   {-# INLINE rule490 #-}
   rule490 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule491 #-}
   rule491 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule492 #-}
   rule492 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrDecls
   {-# INLINE rule493 #-}
   rule493 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     _lhsIattrs
   {-# INLINE rule494 #-}
   rule494 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     _lhsIdefSets

-- Elems -------------------------------------------------------
-- wrapper
data Inh_Elems  = Inh_Elems { Inh_Elems -> Map NontermIdent (Attributes, Attributes)
allAttrDecls_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), Inh_Elems -> Map NontermIdent (Attributes, Attributes)
allAttrs_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), Inh_Elems -> Map NontermIdent (Set NontermIdent)
allConstructors_Inh_Elems :: (Map NontermIdent (Set ConstructorIdent)), Inh_Elems -> DataTypes
allFields_Inh_Elems :: (DataTypes), Inh_Elems -> Set NontermIdent
allNonterminals_Inh_Elems :: (Set NontermIdent), Inh_Elems -> Map NontermIdent (Attributes, Attributes)
attrDecls_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), Inh_Elems -> Map NontermIdent (Attributes, Attributes)
attrs_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), Inh_Elems -> Map NontermIdent (Set NontermIdent, Set NontermIdent)
defSets_Inh_Elems :: (Map Identifier (Set NontermIdent,Set Identifier)), Inh_Elems -> Map NontermIdent (Set NontermIdent)
definedSets_Inh_Elems :: (DefinedSets), Inh_Elems -> Options
options_Inh_Elems :: (Options) }
data Syn_Elems  = Syn_Elems { Syn_Elems -> Map NontermIdent (Attributes, Attributes)
attrDecls_Syn_Elems :: (Map NontermIdent (Attributes, Attributes)), Syn_Elems -> AttrOrderMap
attrOrderCollect_Syn_Elems :: (AttrOrderMap), Syn_Elems -> Map NontermIdent (Attributes, Attributes)
attrs_Syn_Elems :: (Map NontermIdent (Attributes, Attributes)), Syn_Elems -> Blocks
blocks_Syn_Elems :: (Blocks), Syn_Elems -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedArounds_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]), Syn_Elems -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedAugments_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), Syn_Elems -> [(NontermIdent, NontermIdent, Set NontermIdent)]
collectedConParams_Syn_Elems :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), Syn_Elems -> [(NontermIdent, NontermIdent, [Type])]
collectedConstraints_Syn_Elems :: ([(NontermIdent, ConstructorIdent, [Type])]), Syn_Elems -> Map NontermIdent (Set NontermIdent)
collectedConstructorsMap_Syn_Elems :: (Map NontermIdent (Set ConstructorIdent)), Syn_Elems -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
collectedFields_Syn_Elems :: ([(NontermIdent, ConstructorIdent, FieldMap)]), Syn_Elems -> [(NontermIdent, NontermIdent, [NontermIdent])]
collectedInsts_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), Syn_Elems -> [(NontermIdent, NontermIdent, MaybeMacro)]
collectedMacros_Syn_Elems :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]), Syn_Elems -> [(NontermIdent, NontermIdent, [MergeInfo])]
collectedMerges_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]), Syn_Elems -> Set NontermIdent
collectedNames_Syn_Elems :: (Set Identifier), Syn_Elems -> [(NontermIdent, NontermIdent, RuleInfo)]
collectedRules_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), Syn_Elems -> Set NontermIdent
collectedSetNames_Syn_Elems :: (Set Identifier), Syn_Elems -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
collectedSigs_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), Syn_Elems -> [(NontermIdent, NontermIdent, [UniqueInfo])]
collectedUniques_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), Syn_Elems -> Map NontermIdent ConstructorType
constructorTypeMap_Syn_Elems :: (Map NontermIdent ConstructorType), Syn_Elems -> ContextMap
ctxCollect_Syn_Elems :: (ContextMap), Syn_Elems -> Map NontermIdent (Set NontermIdent, Set NontermIdent)
defSets_Syn_Elems :: (Map Identifier (Set NontermIdent,Set Identifier)), Syn_Elems -> Map NontermIdent (Set NontermIdent)
derivings_Syn_Elems :: (Derivings), Syn_Elems -> Seq Error
errors_Syn_Elems :: (Seq Error), Syn_Elems -> Maybe (String, String, String)
moduleDecl_Syn_Elems :: (Maybe (String,String,String)), Syn_Elems -> ParamMap
paramsCollect_Syn_Elems :: (ParamMap), Syn_Elems -> Options -> Options
pragmas_Syn_Elems :: (Options -> Options), Syn_Elems -> QuantMap
quantCollect_Syn_Elems :: (QuantMap), Syn_Elems -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
semPragmasCollect_Syn_Elems :: (PragmaMap), Syn_Elems -> TypeSyns
typeSyns_Syn_Elems :: (TypeSyns), Syn_Elems
-> Map NontermIdent (Map NontermIdent (String, String, String))
useMap_Syn_Elems :: (Map NontermIdent (Map Identifier (String,String,String))), Syn_Elems -> Set NontermIdent
wrappers_Syn_Elems :: (Set NontermIdent) }
{-# INLINABLE wrap_Elems #-}
wrap_Elems :: T_Elems  -> Inh_Elems  -> (Syn_Elems )
wrap_Elems :: T_Elems -> Inh_Elems -> Syn_Elems
wrap_Elems (T_Elems Identity T_Elems_s20
act) (Inh_Elems Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) =
   Identity Syn_Elems -> Syn_Elems
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Elems_s20
sem <- Identity T_Elems_s20
act
        let arg19 :: T_Elems_vIn19
arg19 = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent)
-> DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Options
-> T_Elems_vIn19
T_Elems_vIn19 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions
        (T_Elems_vOut19 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers) <- T_Elems_vOut19 -> Identity T_Elems_vOut19
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Elems_s20 -> T_Elems_v19
inv_Elems_s20 T_Elems_s20
sem T_Elems_vIn19
arg19)
        Syn_Elems -> Identity Syn_Elems
forall (m :: * -> *) a. Monad m => a -> m a
return (Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> Syn_Elems
Syn_Elems Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers)
   )

-- cata
{-# NOINLINE sem_Elems #-}
sem_Elems :: Elems  -> T_Elems 
sem_Elems :: Elems -> T_Elems
sem_Elems Elems
list = (T_Elem -> T_Elems -> T_Elems) -> T_Elems -> [T_Elem] -> T_Elems
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Elem -> T_Elems -> T_Elems
sem_Elems_Cons T_Elems
sem_Elems_Nil ((Elem -> T_Elem) -> Elems -> [T_Elem]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Elem -> T_Elem
sem_Elem Elems
list)

-- semantic domain
newtype T_Elems  = T_Elems {
                           T_Elems -> Identity T_Elems_s20
attach_T_Elems :: Identity (T_Elems_s20 )
                           }
newtype T_Elems_s20  = C_Elems_s20 {
                                   T_Elems_s20 -> T_Elems_v19
inv_Elems_s20 :: (T_Elems_v19 )
                                   }
data T_Elems_s21  = C_Elems_s21
type T_Elems_v19  = (T_Elems_vIn19 ) -> (T_Elems_vOut19 )
data T_Elems_vIn19  = T_Elems_vIn19 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Set ConstructorIdent)) (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map Identifier (Set NontermIdent,Set Identifier)) (DefinedSets) (Options)
data T_Elems_vOut19  = T_Elems_vOut19 (Map NontermIdent (Attributes, Attributes)) (AttrOrderMap) (Map NontermIdent (Attributes, Attributes)) (Blocks) ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Map NontermIdent (Set ConstructorIdent)) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([(NontermIdent, ConstructorIdent, MaybeMacro)]) ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Map NontermIdent ConstructorType) (ContextMap) (Map Identifier (Set NontermIdent,Set Identifier)) (Derivings) (Seq Error) (Maybe (String,String,String)) (ParamMap) (Options -> Options) (QuantMap) (PragmaMap) (TypeSyns) (Map NontermIdent (Map Identifier (String,String,String))) (Set NontermIdent)
{-# NOINLINE sem_Elems_Cons #-}
sem_Elems_Cons :: T_Elem  -> T_Elems  -> T_Elems 
sem_Elems_Cons :: T_Elem -> T_Elems -> T_Elems
sem_Elems_Cons T_Elem
arg_hd_ T_Elems
arg_tl_ = Identity T_Elems_s20 -> T_Elems
T_Elems (T_Elems_s20 -> Identity T_Elems_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elems_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Elems_s20
st20 = let
      v19 :: T_Elems_v19 
      v19 :: T_Elems_v19
v19 = \ (T_Elems_vIn19 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _hdX17 :: T_Elem_s17
_hdX17 = Identity T_Elem_s17 -> T_Elem_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Elem -> Identity T_Elem_s17
attach_T_Elem (T_Elem
arg_hd_))
         _tlX20 :: T_Elems_s20
_tlX20 = Identity T_Elems_s20 -> T_Elems_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Elems -> Identity T_Elems_s20
attach_T_Elems (T_Elems
arg_tl_))
         (T_Elem_vOut16 Map NontermIdent (Attributes, Attributes)
_hdIattrDecls AttrOrderMap
_hdIattrOrderCollect Map NontermIdent (Attributes, Attributes)
_hdIattrs Blocks
_hdIblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints Map NontermIdent (Set NontermIdent)
_hdIcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges Set NontermIdent
_hdIcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules Set NontermIdent
_hdIcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques Map NontermIdent ConstructorType
_hdIconstructorTypeMap ContextMap
_hdIctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_hdIdefSets Map NontermIdent (Set NontermIdent)
_hdIderivings Seq Error
_hdIerrors Maybe (String, String, String)
_hdImoduleDecl ParamMap
_hdIparamsCollect Options -> Options
_hdIpragmas QuantMap
_hdIquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect TypeSyns
_hdItypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_hdIuseMap Set NontermIdent
_hdIwrappers) = T_Elem_s17 -> T_Elem_v16
inv_Elem_s17 T_Elem_s17
_hdX17 (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent)
-> DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Options
-> T_Elem_vIn16
T_Elem_vIn16 Map NontermIdent (Attributes, Attributes)
_hdOallAttrDecls Map NontermIdent (Attributes, Attributes)
_hdOallAttrs Map NontermIdent (Set NontermIdent)
_hdOallConstructors DataTypes
_hdOallFields Set NontermIdent
_hdOallNonterminals Map NontermIdent (Attributes, Attributes)
_hdOattrDecls Map NontermIdent (Attributes, Attributes)
_hdOattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_hdOdefSets Map NontermIdent (Set NontermIdent)
_hdOdefinedSets Options
_hdOoptions)
         (T_Elems_vOut19 Map NontermIdent (Attributes, Attributes)
_tlIattrDecls AttrOrderMap
_tlIattrOrderCollect Map NontermIdent (Attributes, Attributes)
_tlIattrs Blocks
_tlIblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints Map NontermIdent (Set NontermIdent)
_tlIcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges Set NontermIdent
_tlIcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules Set NontermIdent
_tlIcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques Map NontermIdent ConstructorType
_tlIconstructorTypeMap ContextMap
_tlIctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_tlIdefSets Map NontermIdent (Set NontermIdent)
_tlIderivings Seq Error
_tlIerrors Maybe (String, String, String)
_tlImoduleDecl ParamMap
_tlIparamsCollect Options -> Options
_tlIpragmas QuantMap
_tlIquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect TypeSyns
_tlItypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_tlIuseMap Set NontermIdent
_tlIwrappers) = T_Elems_s20 -> T_Elems_v19
inv_Elems_s20 T_Elems_s20
_tlX20 (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent)
-> DataTypes
-> Set NontermIdent
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Options
-> T_Elems_vIn19
T_Elems_vIn19 Map NontermIdent (Attributes, Attributes)
_tlOallAttrDecls Map NontermIdent (Attributes, Attributes)
_tlOallAttrs Map NontermIdent (Set NontermIdent)
_tlOallConstructors DataTypes
_tlOallFields Set NontermIdent
_tlOallNonterminals Map NontermIdent (Attributes, Attributes)
_tlOattrDecls Map NontermIdent (Attributes, Attributes)
_tlOattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_tlOdefSets Map NontermIdent (Set NontermIdent)
_tlOdefinedSets Options
_tlOoptions)
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = AttrOrderMap -> AttrOrderMap -> AttrOrderMap
rule495 AttrOrderMap
_hdIattrOrderCollect AttrOrderMap
_tlIattrOrderCollect
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = Blocks -> Blocks -> Blocks
rule496 Blocks
_hdIblocks Blocks
_tlIblocks
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule497 [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule498 [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
rule499 [(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams [(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
rule500 [(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints [(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule501 Map NontermIdent (Set NontermIdent)
_hdIcollectedConstructorsMap Map NontermIdent (Set NontermIdent)
_tlIcollectedConstructorsMap
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
rule502 [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
rule503 [(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts [(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
rule504 [(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros [(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
rule505 [(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges [(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule506 Set NontermIdent
_hdIcollectedNames Set NontermIdent
_tlIcollectedNames
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
rule507 [(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules [(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule508 Set NontermIdent
_hdIcollectedSetNames Set NontermIdent
_tlIcollectedSetNames
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
rule509 [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
rule510 [(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques [(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
rule511 Map NontermIdent ConstructorType
_hdIconstructorTypeMap Map NontermIdent ConstructorType
_tlIconstructorTypeMap
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = ContextMap -> ContextMap -> ContextMap
rule512 ContextMap
_hdIctxCollect ContextMap
_tlIctxCollect
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule513 Map NontermIdent (Set NontermIdent)
_hdIderivings Map NontermIdent (Set NontermIdent)
_tlIderivings
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule514 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = Maybe (String, String, String)
-> Maybe (String, String, String) -> Maybe (String, String, String)
rule515 Maybe (String, String, String)
_hdImoduleDecl Maybe (String, String, String)
_tlImoduleDecl
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = ParamMap -> ParamMap -> ParamMap
rule516 ParamMap
_hdIparamsCollect ParamMap
_tlIparamsCollect
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = (Options -> Options) -> (Options -> Options) -> Options -> Options
rule517 Options -> Options
_hdIpragmas Options -> Options
_tlIpragmas
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = QuantMap -> QuantMap -> QuantMap
rule518 QuantMap
_hdIquantCollect QuantMap
_tlIquantCollect
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule519 Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = TypeSyns -> TypeSyns -> TypeSyns
rule520 TypeSyns
_hdItypeSyns TypeSyns
_tlItypeSyns
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
rule521 Map NontermIdent (Map NontermIdent (String, String, String))
_hdIuseMap Map NontermIdent (Map NontermIdent (String, String, String))
_tlIuseMap
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule522 Set NontermIdent
_hdIwrappers Set NontermIdent
_tlIwrappers
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule523 Map NontermIdent (Attributes, Attributes)
_tlIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule524 Map NontermIdent (Attributes, Attributes)
_tlIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule525 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_tlIdefSets
         _hdOallAttrDecls :: Map NontermIdent (Attributes, Attributes)
_hdOallAttrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule526 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
         _hdOallAttrs :: Map NontermIdent (Attributes, Attributes)
_hdOallAttrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule527 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
         _hdOallConstructors :: Map NontermIdent (Set NontermIdent)
_hdOallConstructors = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule528 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
         _hdOallFields :: DataTypes
_hdOallFields = DataTypes -> DataTypes
rule529 DataTypes
_lhsIallFields
         _hdOallNonterminals :: Set NontermIdent
_hdOallNonterminals = Set NontermIdent -> Set NontermIdent
rule530 Set NontermIdent
_lhsIallNonterminals
         _hdOattrDecls :: Map NontermIdent (Attributes, Attributes)
_hdOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule531 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _hdOattrs :: Map NontermIdent (Attributes, Attributes)
_hdOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule532 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _hdOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_hdOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule533 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         _hdOdefinedSets :: Map NontermIdent (Set NontermIdent)
_hdOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule534 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule535 Options
_lhsIoptions
         _tlOallAttrDecls :: Map NontermIdent (Attributes, Attributes)
_tlOallAttrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule536 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
         _tlOallAttrs :: Map NontermIdent (Attributes, Attributes)
_tlOallAttrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule537 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
         _tlOallConstructors :: Map NontermIdent (Set NontermIdent)
_tlOallConstructors = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule538 Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
         _tlOallFields :: DataTypes
_tlOallFields = DataTypes -> DataTypes
rule539 DataTypes
_lhsIallFields
         _tlOallNonterminals :: Set NontermIdent
_tlOallNonterminals = Set NontermIdent -> Set NontermIdent
rule540 Set NontermIdent
_lhsIallNonterminals
         _tlOattrDecls :: Map NontermIdent (Attributes, Attributes)
_tlOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule541 Map NontermIdent (Attributes, Attributes)
_hdIattrDecls
         _tlOattrs :: Map NontermIdent (Attributes, Attributes)
_tlOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule542 Map NontermIdent (Attributes, Attributes)
_hdIattrs
         _tlOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_tlOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule543 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_hdIdefSets
         _tlOdefinedSets :: Map NontermIdent (Set NontermIdent)
_tlOdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule544 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule545 Options
_lhsIoptions
         __result_ :: T_Elems_vOut19
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elems_vOut19
T_Elems_vOut19 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elems_vOut19
__result_ )
     in T_Elems_v19 -> T_Elems_s20
C_Elems_s20 T_Elems_v19
v19
   {-# INLINE rule495 #-}
   rule495 :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap
rule495 = \ ((AttrOrderMap
_hdIattrOrderCollect) :: AttrOrderMap) ((AttrOrderMap
_tlIattrOrderCollect) :: AttrOrderMap) ->
     AttrOrderMap
_hdIattrOrderCollect AttrOrderMap -> AttrOrderMap -> AttrOrderMap
`orderMapUnion` AttrOrderMap
_tlIattrOrderCollect
   {-# INLINE rule496 #-}
   rule496 :: Blocks -> Blocks -> Blocks
rule496 = \ ((Blocks
_hdIblocks) :: Blocks) ((Blocks
_tlIblocks) :: Blocks) ->
     Blocks
_hdIblocks Blocks -> Blocks -> Blocks
forall a.
Map BlockInfo [a] -> Map BlockInfo [a] -> Map BlockInfo [a]
`mapUnionWithPlusPlus` Blocks
_tlIblocks
   {-# INLINE rule497 #-}
   rule497 :: [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule497 = \ (([(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) (([(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ->
     [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds
   {-# INLINE rule498 #-}
   rule498 :: [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule498 = \ (([(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) (([(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->
     [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments
   {-# INLINE rule499 #-}
   rule499 :: [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
rule499 = \ (([(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) (([(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->
     [(NontermIdent, NontermIdent, Set NontermIdent)]
_hdIcollectedConParams [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, Set NontermIdent)]
_tlIcollectedConParams
   {-# INLINE rule500 #-}
   rule500 :: [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
rule500 = \ (([(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) (([(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->
     [(NontermIdent, NontermIdent, [Type])]
_hdIcollectedConstraints [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
-> [(NontermIdent, NontermIdent, [Type])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [Type])]
_tlIcollectedConstraints
   {-# INLINE rule501 #-}
   rule501 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule501 = \ ((Map NontermIdent (Set NontermIdent)
_hdIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ((Map NontermIdent (Set NontermIdent)
_tlIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ->
     Map NontermIdent (Set NontermIdent)
_hdIcollectedConstructorsMap Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
`mapUnionWithSetUnion` Map NontermIdent (Set NontermIdent)
_tlIcollectedConstructorsMap
   {-# INLINE rule502 #-}
   rule502 :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
rule502 = \ (([(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) (([(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->
     [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_hdIcollectedFields [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_tlIcollectedFields
   {-# INLINE rule503 #-}
   rule503 :: [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
rule503 = \ (([(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) (([(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->
     [(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts
   {-# INLINE rule504 #-}
   rule504 :: [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
rule504 = \ (([(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) (([(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->
     [(NontermIdent, NontermIdent, MaybeMacro)]
_hdIcollectedMacros [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, MaybeMacro)]
_tlIcollectedMacros
   {-# INLINE rule505 #-}
   rule505 :: [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
rule505 = \ (([(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) (([(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) ->
     [(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges
   {-# INLINE rule506 #-}
   rule506 :: Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule506 = \ ((Set NontermIdent
_hdIcollectedNames) :: Set Identifier) ((Set NontermIdent
_tlIcollectedNames) :: Set Identifier) ->
     Set NontermIdent
_hdIcollectedNames Set NontermIdent -> Set NontermIdent -> Set NontermIdent
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set NontermIdent
_tlIcollectedNames
   {-# INLINE rule507 #-}
   rule507 :: [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
rule507 = \ (([(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) (([(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->
     [(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules
   {-# INLINE rule508 #-}
   rule508 :: Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule508 = \ ((Set NontermIdent
_hdIcollectedSetNames) :: Set Identifier) ((Set NontermIdent
_tlIcollectedSetNames) :: Set Identifier) ->
     Set NontermIdent
_hdIcollectedSetNames Set NontermIdent -> Set NontermIdent -> Set NontermIdent
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set NontermIdent
_tlIcollectedSetNames
   {-# INLINE rule509 #-}
   rule509 :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
rule509 = \ (([(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) (([(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->
     [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs
   {-# INLINE rule510 #-}
   rule510 :: [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
rule510 = \ (([(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (([(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->
     [(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques
   {-# INLINE rule511 #-}
   rule511 :: Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
rule511 = \ ((Map NontermIdent ConstructorType
_hdIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((Map NontermIdent ConstructorType
_tlIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->
     Map NontermIdent ConstructorType
_hdIconstructorTypeMap Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
-> Map NontermIdent ConstructorType
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map NontermIdent ConstructorType
_tlIconstructorTypeMap
   {-# INLINE rule512 #-}
   rule512 :: ContextMap -> ContextMap -> ContextMap
rule512 = \ ((ContextMap
_hdIctxCollect) :: ContextMap) ((ContextMap
_tlIctxCollect) :: ContextMap) ->
     ContextMap
_hdIctxCollect ContextMap -> ContextMap -> ContextMap
`mergeCtx` ContextMap
_tlIctxCollect
   {-# INLINE rule513 #-}
   rule513 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule513 = \ ((Map NontermIdent (Set NontermIdent)
_hdIderivings) :: Derivings) ((Map NontermIdent (Set NontermIdent)
_tlIderivings) :: Derivings) ->
     Map NontermIdent (Set NontermIdent)
_hdIderivings Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
`mergeDerivings` Map NontermIdent (Set NontermIdent)
_tlIderivings
   {-# INLINE rule514 #-}
   rule514 :: Seq Error -> Seq Error -> Seq Error
rule514 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule515 #-}
   rule515 :: Maybe (String, String, String)
-> Maybe (String, String, String) -> Maybe (String, String, String)
rule515 = \ ((Maybe (String, String, String)
_hdImoduleDecl) :: Maybe (String,String,String)) ((Maybe (String, String, String)
_tlImoduleDecl) :: Maybe (String,String,String)) ->
     Maybe (String, String, String)
_hdImoduleDecl Maybe (String, String, String)
-> Maybe (String, String, String) -> Maybe (String, String, String)
forall a. Maybe a -> Maybe a -> Maybe a
`flipmplus` Maybe (String, String, String)
_tlImoduleDecl
   {-# INLINE rule516 #-}
   rule516 :: ParamMap -> ParamMap -> ParamMap
rule516 = \ ((ParamMap
_hdIparamsCollect) :: ParamMap) ((ParamMap
_tlIparamsCollect) :: ParamMap) ->
     ParamMap
_hdIparamsCollect ParamMap -> ParamMap -> ParamMap
`mergeParams` ParamMap
_tlIparamsCollect
   {-# INLINE rule517 #-}
   rule517 :: (Options -> Options) -> (Options -> Options) -> Options -> Options
rule517 = \ ((Options -> Options
_hdIpragmas) :: Options -> Options) ((Options -> Options
_tlIpragmas) :: Options -> Options) ->
     Options -> Options
_hdIpragmas (Options -> Options) -> (Options -> Options) -> Options -> Options
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Options -> Options
_tlIpragmas
   {-# INLINE rule518 #-}
   rule518 :: QuantMap -> QuantMap -> QuantMap
rule518 = \ ((QuantMap
_hdIquantCollect) :: QuantMap) ((QuantMap
_tlIquantCollect) :: QuantMap) ->
     QuantMap
_hdIquantCollect QuantMap -> QuantMap -> QuantMap
`mergeQuant` QuantMap
_tlIquantCollect
   {-# INLINE rule519 #-}
   rule519 :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule519 = \ ((Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect) :: PragmaMap) ((Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect) :: PragmaMap) ->
     Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
`pragmaMapUnion` Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect
   {-# INLINE rule520 #-}
   rule520 :: TypeSyns -> TypeSyns -> TypeSyns
rule520 = \ ((TypeSyns
_hdItypeSyns) :: TypeSyns) ((TypeSyns
_tlItypeSyns) :: TypeSyns) ->
     TypeSyns
_hdItypeSyns TypeSyns -> TypeSyns -> TypeSyns
forall a. [a] -> [a] -> [a]
++ TypeSyns
_tlItypeSyns
   {-# INLINE rule521 #-}
   rule521 :: Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
rule521 = \ ((Map NontermIdent (Map NontermIdent (String, String, String))
_hdIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ((Map NontermIdent (Map NontermIdent (String, String, String))
_tlIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->
     Map NontermIdent (Map NontermIdent (String, String, String))
_hdIuseMap Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Map NontermIdent (String, String, String))
forall k k1 a.
(Ord k, Ord k1) =>
Map k (Map k1 a) -> Map k (Map k1 a) -> Map k (Map k1 a)
`merge` Map NontermIdent (Map NontermIdent (String, String, String))
_tlIuseMap
   {-# INLINE rule522 #-}
   rule522 :: Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule522 = \ ((Set NontermIdent
_hdIwrappers) :: Set NontermIdent) ((Set NontermIdent
_tlIwrappers) :: Set NontermIdent) ->
     Set NontermIdent
_hdIwrappers Set NontermIdent -> Set NontermIdent -> Set NontermIdent
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set NontermIdent
_tlIwrappers
   {-# INLINE rule523 #-}
   rule523 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule523 = \ ((Map NontermIdent (Attributes, Attributes)
_tlIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_tlIattrDecls
   {-# INLINE rule524 #-}
   rule524 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule524 = \ ((Map NontermIdent (Attributes, Attributes)
_tlIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_tlIattrs
   {-# INLINE rule525 #-}
   rule525 :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule525 = \ ((Map NontermIdent (Set NontermIdent, Set NontermIdent)
_tlIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     Map NontermIdent (Set NontermIdent, Set NontermIdent)
_tlIdefSets
   {-# INLINE rule526 #-}
   rule526 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule526 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
   {-# INLINE rule527 #-}
   rule527 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule527 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
   {-# INLINE rule528 #-}
   rule528 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule528 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->
     Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
   {-# INLINE rule529 #-}
   rule529 :: DataTypes -> DataTypes
rule529 = \ ((DataTypes
_lhsIallFields) :: DataTypes) ->
     DataTypes
_lhsIallFields
   {-# INLINE rule530 #-}
   rule530 :: Set NontermIdent -> Set NontermIdent
rule530 = \ ((Set NontermIdent
_lhsIallNonterminals) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNonterminals
   {-# INLINE rule531 #-}
   rule531 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule531 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
   {-# INLINE rule532 #-}
   rule532 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule532 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIattrs
   {-# INLINE rule533 #-}
   rule533 :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule533 = \ ((Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
   {-# INLINE rule534 #-}
   rule534 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule534 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) :: DefinedSets) ->
     Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
   {-# INLINE rule535 #-}
   rule535 :: Options -> Options
rule535 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule536 #-}
   rule536 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule536 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
   {-# INLINE rule537 #-}
   rule537 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule537 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
   {-# INLINE rule538 #-}
   rule538 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule538 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->
     Map NontermIdent (Set NontermIdent)
_lhsIallConstructors
   {-# INLINE rule539 #-}
   rule539 :: DataTypes -> DataTypes
rule539 = \ ((DataTypes
_lhsIallFields) :: DataTypes) ->
     DataTypes
_lhsIallFields
   {-# INLINE rule540 #-}
   rule540 :: Set NontermIdent -> Set NontermIdent
rule540 = \ ((Set NontermIdent
_lhsIallNonterminals) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNonterminals
   {-# INLINE rule541 #-}
   rule541 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule541 = \ ((Map NontermIdent (Attributes, Attributes)
_hdIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_hdIattrDecls
   {-# INLINE rule542 #-}
   rule542 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule542 = \ ((Map NontermIdent (Attributes, Attributes)
_hdIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_hdIattrs
   {-# INLINE rule543 #-}
   rule543 :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule543 = \ ((Map NontermIdent (Set NontermIdent, Set NontermIdent)
_hdIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     Map NontermIdent (Set NontermIdent, Set NontermIdent)
_hdIdefSets
   {-# INLINE rule544 #-}
   rule544 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule544 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) :: DefinedSets) ->
     Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
   {-# INLINE rule545 #-}
   rule545 :: Options -> Options
rule545 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
{-# NOINLINE sem_Elems_Nil #-}
sem_Elems_Nil ::  T_Elems 
sem_Elems_Nil :: T_Elems
sem_Elems_Nil  = Identity T_Elems_s20 -> T_Elems
T_Elems (T_Elems_s20 -> Identity T_Elems_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_Elems_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Elems_s20
st20 = let
      v19 :: T_Elems_v19 
      v19 :: T_Elems_v19
v19 = \ (T_Elems_vIn19 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs Map NontermIdent (Set NontermIdent)
_lhsIallConstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls Map NontermIdent (Attributes, Attributes)
_lhsIattrs Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets Options
_lhsIoptions) -> ( let
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule546  ()
         _lhsOblocks :: Blocks
         _lhsOblocks :: Blocks
_lhsOblocks = () -> Blocks
forall k a. () -> Map k a
rule547  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule548  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule549  ()
         _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]
         _lhsOcollectedConParams :: [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams = () -> [(NontermIdent, NontermIdent, Set NontermIdent)]
forall a. () -> [a]
rule550  ()
         _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]
         _lhsOcollectedConstraints :: [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints = () -> [(NontermIdent, NontermIdent, [Type])]
forall a. () -> [a]
rule551  ()
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)
         _lhsOcollectedConstructorsMap :: Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule552  ()
         _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]
         _lhsOcollectedFields :: [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields = () -> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
forall a. () -> [a]
rule553  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule554  ()
         _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]
         _lhsOcollectedMacros :: [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros = () -> [(NontermIdent, NontermIdent, MaybeMacro)]
forall a. () -> [a]
rule555  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule556  ()
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = () -> Set NontermIdent
forall a. () -> Set a
rule557  ()
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule558  ()
         _lhsOcollectedSetNames :: Set Identifier
         _lhsOcollectedSetNames :: Set NontermIdent
_lhsOcollectedSetNames = () -> Set NontermIdent
forall a. () -> Set a
rule559  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule560  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule561  ()
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
         _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType
_lhsOconstructorTypeMap = () -> Map NontermIdent ConstructorType
forall k a. () -> Map k a
rule562  ()
         _lhsOctxCollect :: ContextMap
         _lhsOctxCollect :: ContextMap
_lhsOctxCollect = () -> ContextMap
forall k a. () -> Map k a
rule563  ()
         _lhsOderivings :: Derivings
         _lhsOderivings :: Map NontermIdent (Set NontermIdent)
_lhsOderivings = () -> Map NontermIdent (Set NontermIdent)
forall k a. () -> Map k a
rule564  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule565  ()
         _lhsOmoduleDecl :: Maybe (String,String,String)
         _lhsOmoduleDecl :: Maybe (String, String, String)
_lhsOmoduleDecl = () -> Maybe (String, String, String)
forall a. () -> Maybe a
rule566  ()
         _lhsOparamsCollect :: ParamMap
         _lhsOparamsCollect :: ParamMap
_lhsOparamsCollect = () -> ParamMap
forall k a. () -> Map k a
rule567  ()
         _lhsOpragmas :: Options -> Options
         _lhsOpragmas :: Options -> Options
_lhsOpragmas = () -> Options -> Options
forall p. () -> p -> p
rule568  ()
         _lhsOquantCollect :: QuantMap
         _lhsOquantCollect :: QuantMap
_lhsOquantCollect = () -> QuantMap
forall k a. () -> Map k a
rule569  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule570  ()
         _lhsOtypeSyns :: TypeSyns
         _lhsOtypeSyns :: TypeSyns
_lhsOtypeSyns = () -> TypeSyns
forall a. () -> [a]
rule571  ()
         _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))
         _lhsOuseMap :: Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap = () -> Map NontermIdent (Map NontermIdent (String, String, String))
forall k a. () -> Map k a
rule572  ()
         _lhsOwrappers :: Set NontermIdent
         _lhsOwrappers :: Set NontermIdent
_lhsOwrappers = () -> Set NontermIdent
forall a. () -> Set a
rule573  ()
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule574 Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
         _lhsOattrs :: Map NontermIdent (Attributes, Attributes)
_lhsOattrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule575 Map NontermIdent (Attributes, Attributes)
_lhsIattrs
         _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)
         _lhsOdefSets :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets = Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule576 Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets
         __result_ :: T_Elems_vOut19
__result_ = Map NontermIdent (Attributes, Attributes)
-> AttrOrderMap
-> Map NontermIdent (Attributes, Attributes)
-> Blocks
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, Set NontermIdent)]
-> [(NontermIdent, NontermIdent, [Type])]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, MaybeMacro)]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> Set NontermIdent
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Map NontermIdent ConstructorType
-> ContextMap
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
-> Seq Error
-> Maybe (String, String, String)
-> ParamMap
-> (Options -> Options)
-> QuantMap
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> TypeSyns
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> T_Elems_vOut19
T_Elems_vOut19 Map NontermIdent (Attributes, Attributes)
_lhsOattrDecls AttrOrderMap
_lhsOattrOrderCollect Map NontermIdent (Attributes, Attributes)
_lhsOattrs Blocks
_lhsOblocks [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, Set NontermIdent)]
_lhsOcollectedConParams [(NontermIdent, NontermIdent, [Type])]
_lhsOcollectedConstraints Map NontermIdent (Set NontermIdent)
_lhsOcollectedConstructorsMap [(NontermIdent, NontermIdent, [(NontermIdent, Type)])]
_lhsOcollectedFields [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, MaybeMacro)]
_lhsOcollectedMacros [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges Set NontermIdent
_lhsOcollectedNames [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules Set NontermIdent
_lhsOcollectedSetNames [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Map NontermIdent ConstructorType
_lhsOconstructorTypeMap ContextMap
_lhsOctxCollect Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsOdefSets Map NontermIdent (Set NontermIdent)
_lhsOderivings Seq Error
_lhsOerrors Maybe (String, String, String)
_lhsOmoduleDecl ParamMap
_lhsOparamsCollect Options -> Options
_lhsOpragmas QuantMap
_lhsOquantCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect TypeSyns
_lhsOtypeSyns Map NontermIdent (Map NontermIdent (String, String, String))
_lhsOuseMap Set NontermIdent
_lhsOwrappers
         in T_Elems_vOut19
__result_ )
     in T_Elems_v19 -> T_Elems_s20
C_Elems_s20 T_Elems_v19
v19
   {-# INLINE rule546 #-}
   rule546 :: () -> Map k a
rule546 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule547 #-}
   rule547 :: () -> Map k a
rule547 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule548 #-}
   rule548 :: () -> [a]
rule548 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule549 #-}
   rule549 :: () -> [a]
rule549 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule550 #-}
   rule550 :: () -> [a]
rule550 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule551 #-}
   rule551 :: () -> [a]
rule551 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule552 #-}
   rule552 :: () -> Map k a
rule552 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule553 #-}
   rule553 :: () -> [a]
rule553 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule554 #-}
   rule554 :: () -> [a]
rule554 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule555 #-}
   rule555 :: () -> [a]
rule555 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule556 #-}
   rule556 :: () -> [a]
rule556 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule557 #-}
   rule557 :: () -> Set a
rule557 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule558 #-}
   rule558 :: () -> [a]
rule558 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule559 #-}
   rule559 :: () -> Set a
rule559 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule560 #-}
   rule560 :: () -> [a]
rule560 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule561 #-}
   rule561 :: () -> [a]
rule561 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule562 #-}
   rule562 :: () -> Map k a
rule562 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule563 #-}
   rule563 :: () -> Map k a
rule563 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule564 #-}
   rule564 :: () -> Map k a
rule564 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule565 #-}
   rule565 :: () -> Seq a
rule565 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule566 #-}
   rule566 :: () -> Maybe a
rule566 = \  (()
_ :: ()) ->
     Maybe a
forall (m :: * -> *) a. MonadPlus m => m a
mzero
   {-# INLINE rule567 #-}
   rule567 :: () -> Map k a
rule567 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule568 #-}
   rule568 :: () -> a -> a
rule568 = \  (()
_ :: ()) ->
     a -> a
forall a. a -> a
id
   {-# INLINE rule569 #-}
   rule569 :: () -> Map k a
rule569 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule570 #-}
   rule570 :: () -> Map k a
rule570 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule571 #-}
   rule571 :: () -> [a]
rule571 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule572 #-}
   rule572 :: () -> Map k a
rule572 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule573 #-}
   rule573 :: () -> Set a
rule573 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule574 #-}
   rule574 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule574 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIattrDecls
   {-# INLINE rule575 #-}
   rule575 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule575 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIattrs
   {-# INLINE rule576 #-}
   rule576 :: Map NontermIdent (Set NontermIdent, Set NontermIdent)
-> Map NontermIdent (Set NontermIdent, Set NontermIdent)
rule576 = \ ((Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->
     Map NontermIdent (Set NontermIdent, Set NontermIdent)
_lhsIdefSets

-- Field -------------------------------------------------------
-- wrapper
data Inh_Field  = Inh_Field { Inh_Field -> Set NontermIdent
allNonterminals_Inh_Field :: (Set NontermIdent) }
data Syn_Field  = Syn_Field { Syn_Field -> [Type]
collectedConstraints_Syn_Field :: ([Type]), Syn_Field -> [(NontermIdent, Type)]
collectedFields_Syn_Field :: ([(Identifier, Type)]) }
{-# INLINABLE wrap_Field #-}
wrap_Field :: T_Field  -> Inh_Field  -> (Syn_Field )
wrap_Field :: T_Field -> Inh_Field -> Syn_Field
wrap_Field (T_Field Identity T_Field_s23
act) (Inh_Field Set NontermIdent
_lhsIallNonterminals) =
   Identity Syn_Field -> Syn_Field
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Field_s23
sem <- Identity T_Field_s23
act
        let arg22 :: T_Field_vIn22
arg22 = Set NontermIdent -> T_Field_vIn22
T_Field_vIn22 Set NontermIdent
_lhsIallNonterminals
        (T_Field_vOut22 [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields) <- T_Field_vOut22 -> Identity T_Field_vOut22
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Field_s23 -> T_Field_v22
inv_Field_s23 T_Field_s23
sem T_Field_vIn22
arg22)
        Syn_Field -> Identity Syn_Field
forall (m :: * -> *) a. Monad m => a -> m a
return ([Type] -> [(NontermIdent, Type)] -> Syn_Field
Syn_Field [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields)
   )

-- cata
{-# NOINLINE sem_Field #-}
sem_Field :: Field  -> T_Field 
sem_Field :: Field -> T_Field
sem_Field ( FChild NontermIdent
name_ Type
tp_ ) = NontermIdent -> Type -> T_Field
sem_Field_FChild NontermIdent
name_ Type
tp_
sem_Field ( FCtx [Type]
tps_ ) = [Type] -> T_Field
sem_Field_FCtx [Type]
tps_

-- semantic domain
newtype T_Field  = T_Field {
                           T_Field -> Identity T_Field_s23
attach_T_Field :: Identity (T_Field_s23 )
                           }
newtype T_Field_s23  = C_Field_s23 {
                                   T_Field_s23 -> T_Field_v22
inv_Field_s23 :: (T_Field_v22 )
                                   }
data T_Field_s24  = C_Field_s24
type T_Field_v22  = (T_Field_vIn22 ) -> (T_Field_vOut22 )
data T_Field_vIn22  = T_Field_vIn22 (Set NontermIdent)
data T_Field_vOut22  = T_Field_vOut22 ([Type]) ([(Identifier, Type)])
{-# NOINLINE sem_Field_FChild #-}
sem_Field_FChild :: (Identifier) -> (Type) -> T_Field 
sem_Field_FChild :: NontermIdent -> Type -> T_Field
sem_Field_FChild NontermIdent
arg_name_ Type
arg_tp_ = Identity T_Field_s23 -> T_Field
T_Field (T_Field_s23 -> Identity T_Field_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Field_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_Field_s23
st23 = let
      v22 :: T_Field_v22 
      v22 :: T_Field_v22
v22 = \ (T_Field_vIn22 Set NontermIdent
_lhsIallNonterminals) -> ( let
         _lhsOcollectedFields :: [(Identifier, Type)]
         _lhsOcollectedFields :: [(NontermIdent, Type)]
_lhsOcollectedFields = Set NontermIdent -> NontermIdent -> Type -> [(NontermIdent, Type)]
forall a. Set NontermIdent -> a -> Type -> [(a, Type)]
rule577 Set NontermIdent
_lhsIallNonterminals NontermIdent
arg_name_ Type
arg_tp_
         _lhsOcollectedConstraints :: [Type]
         _lhsOcollectedConstraints :: [Type]
_lhsOcollectedConstraints = () -> [Type]
forall a. () -> [a]
rule578  ()
         __result_ :: T_Field_vOut22
__result_ = [Type] -> [(NontermIdent, Type)] -> T_Field_vOut22
T_Field_vOut22 [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields
         in T_Field_vOut22
__result_ )
     in T_Field_v22 -> T_Field_s23
C_Field_s23 T_Field_v22
v22
   {-# INLINE rule577 #-}
   {-# LINE 579 "src-ag/Transform.ag" #-}
   rule577 = \ ((_lhsIallNonterminals) :: Set NontermIdent) name_ tp_ ->
                          {-# LINE 579 "src-ag/Transform.ag" #-}
                          [(name_, makeType _lhsIallNonterminals tp_)]
                          {-# LINE 4348 "src-generated/Transform.hs" #-}
   {-# INLINE rule578 #-}
   rule578 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_Field_FCtx #-}
sem_Field_FCtx :: ([Type]) -> T_Field 
sem_Field_FCtx :: [Type] -> T_Field
sem_Field_FCtx [Type]
arg_tps_ = Identity T_Field_s23 -> T_Field
T_Field (T_Field_s23 -> Identity T_Field_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Field_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_Field_s23
st23 = let
      v22 :: T_Field_v22 
      v22 :: T_Field_v22
v22 = \ (T_Field_vIn22 Set NontermIdent
_lhsIallNonterminals) -> ( let
         _lhsOcollectedConstraints :: [Type]
         _lhsOcollectedConstraints :: [Type]
_lhsOcollectedConstraints = [Type] -> [Type]
forall a. a -> a
rule579 [Type]
arg_tps_
         _lhsOcollectedFields :: [(Identifier, Type)]
         _lhsOcollectedFields :: [(NontermIdent, Type)]
_lhsOcollectedFields = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule580  ()
         __result_ :: T_Field_vOut22
__result_ = [Type] -> [(NontermIdent, Type)] -> T_Field_vOut22
T_Field_vOut22 [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields
         in T_Field_vOut22
__result_ )
     in T_Field_v22 -> T_Field_s23
C_Field_s23 T_Field_v22
v22
   {-# INLINE rule579 #-}
   {-# LINE 588 "src-ag/Transform.ag" #-}
   rule579 = \ tps_ ->
                               {-# LINE 588 "src-ag/Transform.ag" #-}
                               tps_
                               {-# LINE 4371 "src-generated/Transform.hs" #-}
   {-# INLINE rule580 #-}
   rule580 = \  (_ :: ()) ->
     []

-- Fields ------------------------------------------------------
-- wrapper
data Inh_Fields  = Inh_Fields { Inh_Fields -> Set NontermIdent
allNonterminals_Inh_Fields :: (Set NontermIdent) }
data Syn_Fields  = Syn_Fields { Syn_Fields -> [Type]
collectedConstraints_Syn_Fields :: ([Type]), Syn_Fields -> [(NontermIdent, Type)]
collectedFields_Syn_Fields :: ([(Identifier, Type)]) }
{-# INLINABLE wrap_Fields #-}
wrap_Fields :: T_Fields  -> Inh_Fields  -> (Syn_Fields )
wrap_Fields :: T_Fields -> Inh_Fields -> Syn_Fields
wrap_Fields (T_Fields Identity T_Fields_s26
act) (Inh_Fields Set NontermIdent
_lhsIallNonterminals) =
   Identity Syn_Fields -> Syn_Fields
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Fields_s26
sem <- Identity T_Fields_s26
act
        let arg25 :: T_Fields_vIn25
arg25 = Set NontermIdent -> T_Fields_vIn25
T_Fields_vIn25 Set NontermIdent
_lhsIallNonterminals
        (T_Fields_vOut25 [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields) <- T_Fields_vOut25 -> Identity T_Fields_vOut25
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Fields_s26 -> T_Fields_v25
inv_Fields_s26 T_Fields_s26
sem T_Fields_vIn25
arg25)
        Syn_Fields -> Identity Syn_Fields
forall (m :: * -> *) a. Monad m => a -> m a
return ([Type] -> [(NontermIdent, Type)] -> Syn_Fields
Syn_Fields [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields)
   )

-- cata
{-# NOINLINE sem_Fields #-}
sem_Fields :: Fields  -> T_Fields 
sem_Fields :: Fields -> T_Fields
sem_Fields Fields
list = (T_Field -> T_Fields -> T_Fields)
-> T_Fields -> [T_Field] -> T_Fields
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Field -> T_Fields -> T_Fields
sem_Fields_Cons T_Fields
sem_Fields_Nil ((Field -> T_Field) -> Fields -> [T_Field]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Field -> T_Field
sem_Field Fields
list)

-- semantic domain
newtype T_Fields  = T_Fields {
                             T_Fields -> Identity T_Fields_s26
attach_T_Fields :: Identity (T_Fields_s26 )
                             }
newtype T_Fields_s26  = C_Fields_s26 {
                                     T_Fields_s26 -> T_Fields_v25
inv_Fields_s26 :: (T_Fields_v25 )
                                     }
data T_Fields_s27  = C_Fields_s27
type T_Fields_v25  = (T_Fields_vIn25 ) -> (T_Fields_vOut25 )
data T_Fields_vIn25  = T_Fields_vIn25 (Set NontermIdent)
data T_Fields_vOut25  = T_Fields_vOut25 ([Type]) ([(Identifier, Type)])
{-# NOINLINE sem_Fields_Cons #-}
sem_Fields_Cons :: T_Field  -> T_Fields  -> T_Fields 
sem_Fields_Cons :: T_Field -> T_Fields -> T_Fields
sem_Fields_Cons T_Field
arg_hd_ T_Fields
arg_tl_ = Identity T_Fields_s26 -> T_Fields
T_Fields (T_Fields_s26 -> Identity T_Fields_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Fields_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_Fields_s26
st26 = let
      v25 :: T_Fields_v25 
      v25 :: T_Fields_v25
v25 = \ (T_Fields_vIn25 Set NontermIdent
_lhsIallNonterminals) -> ( let
         _hdX23 :: T_Field_s23
_hdX23 = Identity T_Field_s23 -> T_Field_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Field -> Identity T_Field_s23
attach_T_Field (T_Field
arg_hd_))
         _tlX26 :: T_Fields_s26
_tlX26 = Identity T_Fields_s26 -> T_Fields_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Fields -> Identity T_Fields_s26
attach_T_Fields (T_Fields
arg_tl_))
         (T_Field_vOut22 [Type]
_hdIcollectedConstraints [(NontermIdent, Type)]
_hdIcollectedFields) = T_Field_s23 -> T_Field_v22
inv_Field_s23 T_Field_s23
_hdX23 (Set NontermIdent -> T_Field_vIn22
T_Field_vIn22 Set NontermIdent
_hdOallNonterminals)
         (T_Fields_vOut25 [Type]
_tlIcollectedConstraints [(NontermIdent, Type)]
_tlIcollectedFields) = T_Fields_s26 -> T_Fields_v25
inv_Fields_s26 T_Fields_s26
_tlX26 (Set NontermIdent -> T_Fields_vIn25
T_Fields_vIn25 Set NontermIdent
_tlOallNonterminals)
         _lhsOcollectedConstraints :: [Type]
         _lhsOcollectedConstraints :: [Type]
_lhsOcollectedConstraints = [Type] -> [Type] -> [Type]
rule581 [Type]
_hdIcollectedConstraints [Type]
_tlIcollectedConstraints
         _lhsOcollectedFields :: [(Identifier, Type)]
         _lhsOcollectedFields :: [(NontermIdent, Type)]
_lhsOcollectedFields = [(NontermIdent, Type)]
-> [(NontermIdent, Type)] -> [(NontermIdent, Type)]
rule582 [(NontermIdent, Type)]
_hdIcollectedFields [(NontermIdent, Type)]
_tlIcollectedFields
         _hdOallNonterminals :: Set NontermIdent
_hdOallNonterminals = Set NontermIdent -> Set NontermIdent
rule583 Set NontermIdent
_lhsIallNonterminals
         _tlOallNonterminals :: Set NontermIdent
_tlOallNonterminals = Set NontermIdent -> Set NontermIdent
rule584 Set NontermIdent
_lhsIallNonterminals
         __result_ :: T_Fields_vOut25
__result_ = [Type] -> [(NontermIdent, Type)] -> T_Fields_vOut25
T_Fields_vOut25 [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields
         in T_Fields_vOut25
__result_ )
     in T_Fields_v25 -> T_Fields_s26
C_Fields_s26 T_Fields_v25
v25
   {-# INLINE rule581 #-}
   rule581 :: [Type] -> [Type] -> [Type]
rule581 = \ (([Type]
_hdIcollectedConstraints) :: [Type]) (([Type]
_tlIcollectedConstraints) :: [Type]) ->
     [Type]
_hdIcollectedConstraints [Type] -> [Type] -> [Type]
forall a. [a] -> [a] -> [a]
++ [Type]
_tlIcollectedConstraints
   {-# INLINE rule582 #-}
   rule582 :: [(NontermIdent, Type)]
-> [(NontermIdent, Type)] -> [(NontermIdent, Type)]
rule582 = \ (([(NontermIdent, Type)]
_hdIcollectedFields) :: [(Identifier, Type)]) (([(NontermIdent, Type)]
_tlIcollectedFields) :: [(Identifier, Type)]) ->
     [(NontermIdent, Type)]
_hdIcollectedFields [(NontermIdent, Type)]
-> [(NontermIdent, Type)] -> [(NontermIdent, Type)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, Type)]
_tlIcollectedFields
   {-# INLINE rule583 #-}
   rule583 :: Set NontermIdent -> Set NontermIdent
rule583 = \ ((Set NontermIdent
_lhsIallNonterminals) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNonterminals
   {-# INLINE rule584 #-}
   rule584 :: Set NontermIdent -> Set NontermIdent
rule584 = \ ((Set NontermIdent
_lhsIallNonterminals) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNonterminals
{-# NOINLINE sem_Fields_Nil #-}
sem_Fields_Nil ::  T_Fields 
sem_Fields_Nil :: T_Fields
sem_Fields_Nil  = Identity T_Fields_s26 -> T_Fields
T_Fields (T_Fields_s26 -> Identity T_Fields_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Fields_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_Fields_s26
st26 = let
      v25 :: T_Fields_v25 
      v25 :: T_Fields_v25
v25 = \ (T_Fields_vIn25 Set NontermIdent
_lhsIallNonterminals) -> ( let
         _lhsOcollectedConstraints :: [Type]
         _lhsOcollectedConstraints :: [Type]
_lhsOcollectedConstraints = () -> [Type]
forall a. () -> [a]
rule585  ()
         _lhsOcollectedFields :: [(Identifier, Type)]
         _lhsOcollectedFields :: [(NontermIdent, Type)]
_lhsOcollectedFields = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule586  ()
         __result_ :: T_Fields_vOut25
__result_ = [Type] -> [(NontermIdent, Type)] -> T_Fields_vOut25
T_Fields_vOut25 [Type]
_lhsOcollectedConstraints [(NontermIdent, Type)]
_lhsOcollectedFields
         in T_Fields_vOut25
__result_ )
     in T_Fields_v25 -> T_Fields_s26
C_Fields_s26 T_Fields_v25
v25
   {-# INLINE rule585 #-}
   rule585 :: () -> [a]
rule585 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule586 #-}
   rule586 :: () -> [a]
rule586 = \  (()
_ :: ()) ->
     []

-- NontSet -----------------------------------------------------
-- wrapper
data Inh_NontSet  = Inh_NontSet { Inh_NontSet -> DataTypes
allFields_Inh_NontSet :: (DataTypes), Inh_NontSet -> Set NontermIdent
allNonterminals_Inh_NontSet :: (Set NontermIdent), Inh_NontSet -> Map NontermIdent (Set NontermIdent)
definedSets_Inh_NontSet :: (DefinedSets) }
data Syn_NontSet  = Syn_NontSet { Syn_NontSet -> Set NontermIdent
collectedNames_Syn_NontSet :: (Set Identifier), Syn_NontSet -> Seq Error
errors_Syn_NontSet :: (Seq Error), Syn_NontSet -> Set NontermIdent
nontSet_Syn_NontSet :: (Set NontermIdent) }
{-# INLINABLE wrap_NontSet #-}
wrap_NontSet :: T_NontSet  -> Inh_NontSet  -> (Syn_NontSet )
wrap_NontSet :: T_NontSet -> Inh_NontSet -> Syn_NontSet
wrap_NontSet (T_NontSet Identity T_NontSet_s29
act) (Inh_NontSet DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) =
   Identity Syn_NontSet -> Syn_NontSet
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_NontSet_s29
sem <- Identity T_NontSet_s29
act
        let arg28 :: T_NontSet_vIn28
arg28 = DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
        (T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet) <- T_NontSet_vOut28 -> Identity T_NontSet_vOut28
forall (m :: * -> *) a. Monad m => a -> m a
return (T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
sem T_NontSet_vIn28
arg28)
        Syn_NontSet -> Identity Syn_NontSet
forall (m :: * -> *) a. Monad m => a -> m a
return (Set NontermIdent -> Seq Error -> Set NontermIdent -> Syn_NontSet
Syn_NontSet Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet)
   )

-- cata
{-# NOINLINE sem_NontSet #-}
sem_NontSet :: NontSet  -> T_NontSet 
sem_NontSet :: NontSet -> T_NontSet
sem_NontSet ( NamedSet NontermIdent
name_ ) = NontermIdent -> T_NontSet
sem_NontSet_NamedSet NontermIdent
name_
sem_NontSet ( NontSet
All  ) = T_NontSet
sem_NontSet_All 
sem_NontSet ( Union NontSet
set1_ NontSet
set2_ ) = T_NontSet -> T_NontSet -> T_NontSet
sem_NontSet_Union ( NontSet -> T_NontSet
sem_NontSet NontSet
set1_ ) ( NontSet -> T_NontSet
sem_NontSet NontSet
set2_ )
sem_NontSet ( Intersect NontSet
set1_ NontSet
set2_ ) = T_NontSet -> T_NontSet -> T_NontSet
sem_NontSet_Intersect ( NontSet -> T_NontSet
sem_NontSet NontSet
set1_ ) ( NontSet -> T_NontSet
sem_NontSet NontSet
set2_ )
sem_NontSet ( Difference NontSet
set1_ NontSet
set2_ ) = T_NontSet -> T_NontSet -> T_NontSet
sem_NontSet_Difference ( NontSet -> T_NontSet
sem_NontSet NontSet
set1_ ) ( NontSet -> T_NontSet
sem_NontSet NontSet
set2_ )
sem_NontSet ( Path NontermIdent
from_ NontermIdent
to_ ) = NontermIdent -> NontermIdent -> T_NontSet
sem_NontSet_Path NontermIdent
from_ NontermIdent
to_

-- semantic domain
newtype T_NontSet  = T_NontSet {
                               T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet :: Identity (T_NontSet_s29 )
                               }
newtype T_NontSet_s29  = C_NontSet_s29 {
                                       T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 :: (T_NontSet_v28 )
                                       }
data T_NontSet_s30  = C_NontSet_s30
type T_NontSet_v28  = (T_NontSet_vIn28 ) -> (T_NontSet_vOut28 )
data T_NontSet_vIn28  = T_NontSet_vIn28 (DataTypes) (Set NontermIdent) (DefinedSets)
data T_NontSet_vOut28  = T_NontSet_vOut28 (Set Identifier) (Seq Error) (Set NontermIdent)
{-# NOINLINE sem_NontSet_NamedSet #-}
sem_NontSet_NamedSet :: (NontermIdent) -> T_NontSet 
sem_NontSet_NamedSet :: NontermIdent -> T_NontSet
sem_NontSet_NamedSet NontermIdent
arg_name_ = Identity T_NontSet_s29 -> T_NontSet
T_NontSet (T_NontSet_s29 -> Identity T_NontSet_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_NontSet_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_NontSet_s29
st29 = let
      v28 :: T_NontSet_v28 
      v28 :: T_NontSet_v28
v28 = \ (T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) -> ( let
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = NontermIdent -> Set NontermIdent
forall a. a -> Set a
rule587 NontermIdent
arg_name_
         (Set NontermIdent
_nontSet,Seq Error
_errors) = Map NontermIdent (Set NontermIdent)
-> NontermIdent -> (Set NontermIdent, Seq Error)
rule588 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets NontermIdent
arg_name_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
forall a. a -> a
rule589 Seq Error
_errors
         _lhsOnontSet :: Set NontermIdent
         _lhsOnontSet :: Set NontermIdent
_lhsOnontSet = Set NontermIdent -> Set NontermIdent
forall a. a -> a
rule590 Set NontermIdent
_nontSet
         __result_ :: T_NontSet_vOut28
__result_ = Set NontermIdent
-> Seq Error -> Set NontermIdent -> T_NontSet_vOut28
T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet
         in T_NontSet_vOut28
__result_ )
     in T_NontSet_v28 -> T_NontSet_s29
C_NontSet_s29 T_NontSet_v28
v28
   {-# INLINE rule587 #-}
   {-# LINE 603 "src-ag/Transform.ag" #-}
   rule587 = \ name_ ->
                                    {-# LINE 603 "src-ag/Transform.ag" #-}
                                    Set.singleton name_
                                    {-# LINE 4516 "src-generated/Transform.hs" #-}
   {-# INLINE rule588 #-}
   {-# LINE 733 "src-ag/Transform.ag" #-}
   rule588 = \ ((_lhsIdefinedSets) :: DefinedSets) name_ ->
                                        {-# LINE 733 "src-ag/Transform.ag" #-}
                                        case Map.lookup name_ _lhsIdefinedSets of
                                                     Nothing  -> (Set.empty, Seq.singleton (UndefNont name_))
                                                     Just set -> (set, Seq.empty)
                                        {-# LINE 4524 "src-generated/Transform.hs" #-}
   {-# INLINE rule589 #-}
   rule589 = \ _errors ->
     _errors
   {-# INLINE rule590 #-}
   rule590 = \ _nontSet ->
     _nontSet
{-# NOINLINE sem_NontSet_All #-}
sem_NontSet_All ::  T_NontSet 
sem_NontSet_All :: T_NontSet
sem_NontSet_All  = Identity T_NontSet_s29 -> T_NontSet
T_NontSet (T_NontSet_s29 -> Identity T_NontSet_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_NontSet_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_NontSet_s29
st29 = let
      v28 :: T_NontSet_v28 
      v28 :: T_NontSet_v28
v28 = \ (T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) -> ( let
         _lhsOnontSet :: Set NontermIdent
         _lhsOnontSet :: Set NontermIdent
_lhsOnontSet = Set NontermIdent -> Set NontermIdent
rule591 Set NontermIdent
_lhsIallNonterminals
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = () -> Set NontermIdent
forall a. () -> Set a
rule592  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule593  ()
         __result_ :: T_NontSet_vOut28
__result_ = Set NontermIdent
-> Seq Error -> Set NontermIdent -> T_NontSet_vOut28
T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet
         in T_NontSet_vOut28
__result_ )
     in T_NontSet_v28 -> T_NontSet_s29
C_NontSet_s29 T_NontSet_v28
v28
   {-# INLINE rule591 #-}
   {-# LINE 732 "src-ag/Transform.ag" #-}
   rule591 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
                               {-# LINE 732 "src-ag/Transform.ag" #-}
                               _lhsIallNonterminals
                               {-# LINE 4552 "src-generated/Transform.hs" #-}
   {-# INLINE rule592 #-}
   rule592 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule593 #-}
   rule593 = \  (_ :: ()) ->
     Seq.empty
{-# NOINLINE sem_NontSet_Union #-}
sem_NontSet_Union :: T_NontSet  -> T_NontSet  -> T_NontSet 
sem_NontSet_Union :: T_NontSet -> T_NontSet -> T_NontSet
sem_NontSet_Union T_NontSet
arg_set1_ T_NontSet
arg_set2_ = Identity T_NontSet_s29 -> T_NontSet
T_NontSet (T_NontSet_s29 -> Identity T_NontSet_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_NontSet_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_NontSet_s29
st29 = let
      v28 :: T_NontSet_v28 
      v28 :: T_NontSet_v28
v28 = \ (T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) -> ( let
         _set1X29 :: T_NontSet_s29
_set1X29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set1_))
         _set2X29 :: T_NontSet_s29
_set2X29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set2_))
         (T_NontSet_vOut28 Set NontermIdent
_set1IcollectedNames Seq Error
_set1Ierrors Set NontermIdent
_set1InontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_set1X29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_set1OallFields Set NontermIdent
_set1OallNonterminals Map NontermIdent (Set NontermIdent)
_set1OdefinedSets)
         (T_NontSet_vOut28 Set NontermIdent
_set2IcollectedNames Seq Error
_set2Ierrors Set NontermIdent
_set2InontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_set2X29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_set2OallFields Set NontermIdent
_set2OallNonterminals Map NontermIdent (Set NontermIdent)
_set2OdefinedSets)
         _lhsOnontSet :: Set NontermIdent
         _lhsOnontSet :: Set NontermIdent
_lhsOnontSet = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule594 Set NontermIdent
_set1InontSet Set NontermIdent
_set2InontSet
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule595 Set NontermIdent
_set1IcollectedNames Set NontermIdent
_set2IcollectedNames
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule596 Seq Error
_set1Ierrors Seq Error
_set2Ierrors
         _set1OallFields :: DataTypes
_set1OallFields = DataTypes -> DataTypes
rule597 DataTypes
_lhsIallFields
         _set1OallNonterminals :: Set NontermIdent
_set1OallNonterminals = Set NontermIdent -> Set NontermIdent
rule598 Set NontermIdent
_lhsIallNonterminals
         _set1OdefinedSets :: Map NontermIdent (Set NontermIdent)
_set1OdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule599 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _set2OallFields :: DataTypes
_set2OallFields = DataTypes -> DataTypes
rule600 DataTypes
_lhsIallFields
         _set2OallNonterminals :: Set NontermIdent
_set2OallNonterminals = Set NontermIdent -> Set NontermIdent
rule601 Set NontermIdent
_lhsIallNonterminals
         _set2OdefinedSets :: Map NontermIdent (Set NontermIdent)
_set2OdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule602 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_NontSet_vOut28
__result_ = Set NontermIdent
-> Seq Error -> Set NontermIdent -> T_NontSet_vOut28
T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet
         in T_NontSet_vOut28
__result_ )
     in T_NontSet_v28 -> T_NontSet_s29
C_NontSet_s29 T_NontSet_v28
v28
   {-# INLINE rule594 #-}
   {-# LINE 736 "src-ag/Transform.ag" #-}
   rule594 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->
                               {-# LINE 736 "src-ag/Transform.ag" #-}
                               Set.union         _set1InontSet _set2InontSet
                               {-# LINE 4590 "src-generated/Transform.hs" #-}
   {-# INLINE rule595 #-}
   rule595 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->
     _set1IcollectedNames `Set.union` _set2IcollectedNames
   {-# INLINE rule596 #-}
   rule596 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->
     _set1Ierrors Seq.>< _set2Ierrors
   {-# INLINE rule597 #-}
   rule597 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule598 #-}
   rule598 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule599 #-}
   rule599 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
   {-# INLINE rule600 #-}
   rule600 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule601 #-}
   rule601 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule602 #-}
   rule602 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_NontSet_Intersect #-}
sem_NontSet_Intersect :: T_NontSet  -> T_NontSet  -> T_NontSet 
sem_NontSet_Intersect :: T_NontSet -> T_NontSet -> T_NontSet
sem_NontSet_Intersect T_NontSet
arg_set1_ T_NontSet
arg_set2_ = Identity T_NontSet_s29 -> T_NontSet
T_NontSet (T_NontSet_s29 -> Identity T_NontSet_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_NontSet_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_NontSet_s29
st29 = let
      v28 :: T_NontSet_v28 
      v28 :: T_NontSet_v28
v28 = \ (T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) -> ( let
         _set1X29 :: T_NontSet_s29
_set1X29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set1_))
         _set2X29 :: T_NontSet_s29
_set2X29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set2_))
         (T_NontSet_vOut28 Set NontermIdent
_set1IcollectedNames Seq Error
_set1Ierrors Set NontermIdent
_set1InontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_set1X29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_set1OallFields Set NontermIdent
_set1OallNonterminals Map NontermIdent (Set NontermIdent)
_set1OdefinedSets)
         (T_NontSet_vOut28 Set NontermIdent
_set2IcollectedNames Seq Error
_set2Ierrors Set NontermIdent
_set2InontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_set2X29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_set2OallFields Set NontermIdent
_set2OallNonterminals Map NontermIdent (Set NontermIdent)
_set2OdefinedSets)
         _lhsOnontSet :: Set NontermIdent
         _lhsOnontSet :: Set NontermIdent
_lhsOnontSet = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule603 Set NontermIdent
_set1InontSet Set NontermIdent
_set2InontSet
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule604 Set NontermIdent
_set1IcollectedNames Set NontermIdent
_set2IcollectedNames
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule605 Seq Error
_set1Ierrors Seq Error
_set2Ierrors
         _set1OallFields :: DataTypes
_set1OallFields = DataTypes -> DataTypes
rule606 DataTypes
_lhsIallFields
         _set1OallNonterminals :: Set NontermIdent
_set1OallNonterminals = Set NontermIdent -> Set NontermIdent
rule607 Set NontermIdent
_lhsIallNonterminals
         _set1OdefinedSets :: Map NontermIdent (Set NontermIdent)
_set1OdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule608 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _set2OallFields :: DataTypes
_set2OallFields = DataTypes -> DataTypes
rule609 DataTypes
_lhsIallFields
         _set2OallNonterminals :: Set NontermIdent
_set2OallNonterminals = Set NontermIdent -> Set NontermIdent
rule610 Set NontermIdent
_lhsIallNonterminals
         _set2OdefinedSets :: Map NontermIdent (Set NontermIdent)
_set2OdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule611 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_NontSet_vOut28
__result_ = Set NontermIdent
-> Seq Error -> Set NontermIdent -> T_NontSet_vOut28
T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet
         in T_NontSet_vOut28
__result_ )
     in T_NontSet_v28 -> T_NontSet_s29
C_NontSet_s29 T_NontSet_v28
v28
   {-# INLINE rule603 #-}
   {-# LINE 737 "src-ag/Transform.ag" #-}
   rule603 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->
                               {-# LINE 737 "src-ag/Transform.ag" #-}
                               Set.intersection  _set1InontSet _set2InontSet
                               {-# LINE 4646 "src-generated/Transform.hs" #-}
   {-# INLINE rule604 #-}
   rule604 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->
     _set1IcollectedNames `Set.union` _set2IcollectedNames
   {-# INLINE rule605 #-}
   rule605 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->
     _set1Ierrors Seq.>< _set2Ierrors
   {-# INLINE rule606 #-}
   rule606 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule607 #-}
   rule607 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule608 #-}
   rule608 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
   {-# INLINE rule609 #-}
   rule609 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule610 #-}
   rule610 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule611 #-}
   rule611 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_NontSet_Difference #-}
sem_NontSet_Difference :: T_NontSet  -> T_NontSet  -> T_NontSet 
sem_NontSet_Difference :: T_NontSet -> T_NontSet -> T_NontSet
sem_NontSet_Difference T_NontSet
arg_set1_ T_NontSet
arg_set2_ = Identity T_NontSet_s29 -> T_NontSet
T_NontSet (T_NontSet_s29 -> Identity T_NontSet_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_NontSet_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_NontSet_s29
st29 = let
      v28 :: T_NontSet_v28 
      v28 :: T_NontSet_v28
v28 = \ (T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) -> ( let
         _set1X29 :: T_NontSet_s29
_set1X29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set1_))
         _set2X29 :: T_NontSet_s29
_set2X29 = Identity T_NontSet_s29 -> T_NontSet_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_NontSet -> Identity T_NontSet_s29
attach_T_NontSet (T_NontSet
arg_set2_))
         (T_NontSet_vOut28 Set NontermIdent
_set1IcollectedNames Seq Error
_set1Ierrors Set NontermIdent
_set1InontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_set1X29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_set1OallFields Set NontermIdent
_set1OallNonterminals Map NontermIdent (Set NontermIdent)
_set1OdefinedSets)
         (T_NontSet_vOut28 Set NontermIdent
_set2IcollectedNames Seq Error
_set2Ierrors Set NontermIdent
_set2InontSet) = T_NontSet_s29 -> T_NontSet_v28
inv_NontSet_s29 T_NontSet_s29
_set2X29 (DataTypes
-> Set NontermIdent
-> Map NontermIdent (Set NontermIdent)
-> T_NontSet_vIn28
T_NontSet_vIn28 DataTypes
_set2OallFields Set NontermIdent
_set2OallNonterminals Map NontermIdent (Set NontermIdent)
_set2OdefinedSets)
         _lhsOnontSet :: Set NontermIdent
         _lhsOnontSet :: Set NontermIdent
_lhsOnontSet = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule612 Set NontermIdent
_set1InontSet Set NontermIdent
_set2InontSet
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule613 Set NontermIdent
_set1IcollectedNames Set NontermIdent
_set2IcollectedNames
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule614 Seq Error
_set1Ierrors Seq Error
_set2Ierrors
         _set1OallFields :: DataTypes
_set1OallFields = DataTypes -> DataTypes
rule615 DataTypes
_lhsIallFields
         _set1OallNonterminals :: Set NontermIdent
_set1OallNonterminals = Set NontermIdent -> Set NontermIdent
rule616 Set NontermIdent
_lhsIallNonterminals
         _set1OdefinedSets :: Map NontermIdent (Set NontermIdent)
_set1OdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule617 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         _set2OallFields :: DataTypes
_set2OallFields = DataTypes -> DataTypes
rule618 DataTypes
_lhsIallFields
         _set2OallNonterminals :: Set NontermIdent
_set2OallNonterminals = Set NontermIdent -> Set NontermIdent
rule619 Set NontermIdent
_lhsIallNonterminals
         _set2OdefinedSets :: Map NontermIdent (Set NontermIdent)
_set2OdefinedSets = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule620 Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets
         __result_ :: T_NontSet_vOut28
__result_ = Set NontermIdent
-> Seq Error -> Set NontermIdent -> T_NontSet_vOut28
T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet
         in T_NontSet_vOut28
__result_ )
     in T_NontSet_v28 -> T_NontSet_s29
C_NontSet_s29 T_NontSet_v28
v28
   {-# INLINE rule612 #-}
   {-# LINE 738 "src-ag/Transform.ag" #-}
   rule612 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->
                               {-# LINE 738 "src-ag/Transform.ag" #-}
                               Set.difference    _set1InontSet _set2InontSet
                               {-# LINE 4702 "src-generated/Transform.hs" #-}
   {-# INLINE rule613 #-}
   rule613 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->
     _set1IcollectedNames `Set.union` _set2IcollectedNames
   {-# INLINE rule614 #-}
   rule614 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->
     _set1Ierrors Seq.>< _set2Ierrors
   {-# INLINE rule615 #-}
   rule615 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule616 #-}
   rule616 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule617 #-}
   rule617 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
   {-# INLINE rule618 #-}
   rule618 = \ ((_lhsIallFields) :: DataTypes) ->
     _lhsIallFields
   {-# INLINE rule619 #-}
   rule619 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->
     _lhsIallNonterminals
   {-# INLINE rule620 #-}
   rule620 = \ ((_lhsIdefinedSets) :: DefinedSets) ->
     _lhsIdefinedSets
{-# NOINLINE sem_NontSet_Path #-}
sem_NontSet_Path :: (NontermIdent) -> (NontermIdent) -> T_NontSet 
sem_NontSet_Path :: NontermIdent -> NontermIdent -> T_NontSet
sem_NontSet_Path NontermIdent
arg_from_ NontermIdent
arg_to_ = Identity T_NontSet_s29 -> T_NontSet
T_NontSet (T_NontSet_s29 -> Identity T_NontSet_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_NontSet_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_NontSet_s29
st29 = let
      v28 :: T_NontSet_v28 
      v28 :: T_NontSet_v28
v28 = \ (T_NontSet_vIn28 DataTypes
_lhsIallFields Set NontermIdent
_lhsIallNonterminals Map NontermIdent (Set NontermIdent)
_lhsIdefinedSets) -> ( let
         _lhsOnontSet :: Set NontermIdent
         _lhsOnontSet :: Set NontermIdent
_lhsOnontSet = DataTypes -> NontermIdent -> NontermIdent -> Set NontermIdent
rule621 DataTypes
_lhsIallFields NontermIdent
arg_from_ NontermIdent
arg_to_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Set NontermIdent -> NontermIdent -> NontermIdent -> Seq Error
rule622 Set NontermIdent
_lhsIallNonterminals NontermIdent
arg_from_ NontermIdent
arg_to_
         _lhsOcollectedNames :: Set Identifier
         _lhsOcollectedNames :: Set NontermIdent
_lhsOcollectedNames = () -> Set NontermIdent
forall a. () -> Set a
rule623  ()
         __result_ :: T_NontSet_vOut28
__result_ = Set NontermIdent
-> Seq Error -> Set NontermIdent -> T_NontSet_vOut28
T_NontSet_vOut28 Set NontermIdent
_lhsOcollectedNames Seq Error
_lhsOerrors Set NontermIdent
_lhsOnontSet
         in T_NontSet_vOut28
__result_ )
     in T_NontSet_v28 -> T_NontSet_s29
C_NontSet_s29 T_NontSet_v28
v28
   {-# INLINE rule621 #-}
   {-# LINE 739 "src-ag/Transform.ag" #-}
   rule621 = \ ((_lhsIallFields) :: DataTypes) from_ to_ ->
                               {-# LINE 739 "src-ag/Transform.ag" #-}
                               let table = flattenDatas _lhsIallFields
                               in path table from_ to_
                               {-# LINE 4749 "src-generated/Transform.hs" #-}
   {-# INLINE rule622 #-}
   {-# LINE 741 "src-ag/Transform.ag" #-}
   rule622 = \ ((_lhsIallNonterminals) :: Set NontermIdent) from_ to_ ->
                              {-# LINE 741 "src-ag/Transform.ag" #-}
                              let check name | Set.member name _lhsIallNonterminals
                                                         = Seq.empty
                                             | otherwise = Seq.singleton (UndefNont name)
                              in check from_ >< check to_
                              {-# LINE 4758 "src-generated/Transform.hs" #-}
   {-# INLINE rule623 #-}
   rule623 = \  (_ :: ()) ->
     Set.empty

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern {  }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> [UniqueInfo]
definedAttrs_Syn_Pattern :: ([AttrName]), Syn_Pattern -> [NontermIdent]
definedInsts_Syn_Pattern :: ([Identifier]), Syn_Pattern -> [UniqueInfo] -> Pattern
patunder_Syn_Pattern :: ([AttrName]->Pattern), Syn_Pattern -> Pos
stpos_Syn_Pattern :: (Pos) }
{-# INLINABLE wrap_Pattern #-}
wrap_Pattern :: T_Pattern  -> Inh_Pattern  -> (Syn_Pattern )
wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern
wrap_Pattern (T_Pattern Identity T_Pattern_s32
act) (Inh_Pattern
Inh_Pattern ) =
   Identity Syn_Pattern -> Syn_Pattern
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Pattern_s32
sem <- Identity T_Pattern_s32
act
        let arg31 :: T_Pattern_vIn31
arg31 = T_Pattern_vIn31
T_Pattern_vIn31 
        (T_Pattern_vOut31 Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos) <- T_Pattern_vOut31 -> Identity T_Pattern_vOut31
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s32 -> T_Pattern_v31
inv_Pattern_s32 T_Pattern_s32
sem T_Pattern_vIn31
arg31)
        Syn_Pattern -> Identity Syn_Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos)
   )

-- cata
{-# NOINLINE sem_Pattern #-}
sem_Pattern :: Pattern  -> T_Pattern 
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Constr NontermIdent
name_ [Pattern]
pats_ ) = NontermIdent -> T_Patterns -> T_Pattern
sem_Pattern_Constr NontermIdent
name_ ( [Pattern] -> T_Patterns
sem_Patterns [Pattern]
pats_ )
sem_Pattern ( Product Pos
pos_ [Pattern]
pats_ ) = Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
pos_ ( [Pattern] -> T_Patterns
sem_Patterns [Pattern]
pats_ )
sem_Pattern ( Alias NontermIdent
field_ NontermIdent
attr_ Pattern
pat_ ) = NontermIdent -> NontermIdent -> T_Pattern -> T_Pattern
sem_Pattern_Alias NontermIdent
field_ NontermIdent
attr_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Irrefutable Pattern
pat_ ) = T_Pattern -> T_Pattern
sem_Pattern_Irrefutable ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Underscore Pos
pos_ ) = Pos -> T_Pattern
sem_Pattern_Underscore Pos
pos_

-- semantic domain
newtype T_Pattern  = T_Pattern {
                               T_Pattern -> Identity T_Pattern_s32
attach_T_Pattern :: Identity (T_Pattern_s32 )
                               }
newtype T_Pattern_s32  = C_Pattern_s32 {
                                       T_Pattern_s32 -> T_Pattern_v31
inv_Pattern_s32 :: (T_Pattern_v31 )
                                       }
data T_Pattern_s33  = C_Pattern_s33
type T_Pattern_v31  = (T_Pattern_vIn31 ) -> (T_Pattern_vOut31 )
data T_Pattern_vIn31  = T_Pattern_vIn31 
data T_Pattern_vOut31  = T_Pattern_vOut31 (Pattern) ([AttrName]) ([Identifier]) ([AttrName]->Pattern) (Pos)
{-# NOINLINE sem_Pattern_Constr #-}
sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns  -> T_Pattern 
sem_Pattern_Constr :: NontermIdent -> T_Patterns -> T_Pattern
sem_Pattern_Constr NontermIdent
arg_name_ T_Patterns
arg_pats_ = Identity T_Pattern_s32 -> T_Pattern
T_Pattern (T_Pattern_s32 -> Identity T_Pattern_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Pattern_s32
st32 = let
      v31 :: T_Pattern_v31 
      v31 :: T_Pattern_v31
v31 = \ (T_Pattern_vIn31
T_Pattern_vIn31 ) -> ( let
         _patsX35 :: T_Patterns_s35
_patsX35 = Identity T_Patterns_s35 -> T_Patterns_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s35
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut34 [Pattern]
_patsIcopy [UniqueInfo]
_patsIdefinedAttrs [NontermIdent]
_patsIdefinedInsts [UniqueInfo] -> [Pattern]
_patsIpatunder) = T_Patterns_s35 -> T_Patterns_v34
inv_Patterns_s35 T_Patterns_s35
_patsX35 (T_Patterns_vIn34
T_Patterns_vIn34 )
         _lhsOpatunder :: [AttrName]->Pattern
         _lhsOpatunder :: [UniqueInfo] -> Pattern
_lhsOpatunder = ([UniqueInfo] -> [Pattern])
-> NontermIdent -> [UniqueInfo] -> Pattern
rule624 [UniqueInfo] -> [Pattern]
_patsIpatunder NontermIdent
arg_name_
         _lhsOstpos :: Pos
         _lhsOstpos :: Pos
_lhsOstpos = NontermIdent -> Pos
rule625 NontermIdent
arg_name_
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = [UniqueInfo] -> [UniqueInfo]
rule626 [UniqueInfo]
_patsIdefinedAttrs
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule627 [NontermIdent]
_patsIdefinedInsts
         _copy :: Pattern
_copy = [Pattern] -> NontermIdent -> Pattern
rule628 [Pattern]
_patsIcopy NontermIdent
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule629 Pattern
_copy
         __result_ :: T_Pattern_vOut31
__result_ = Pattern
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> T_Pattern_vOut31
T_Pattern_vOut31 Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos
         in T_Pattern_vOut31
__result_ )
     in T_Pattern_v31 -> T_Pattern_s32
C_Pattern_s32 T_Pattern_v31
v31
   {-# INLINE rule624 #-}
   {-# LINE 1190 "src-ag/Transform.ag" #-}
   rule624 = \ ((_patsIpatunder) :: [AttrName]->Patterns) name_ ->
                               {-# LINE 1190 "src-ag/Transform.ag" #-}
                               \us -> Constr name_ (_patsIpatunder us)
                               {-# LINE 4825 "src-generated/Transform.hs" #-}
   {-# INLINE rule625 #-}
   {-# LINE 1201 "src-ag/Transform.ag" #-}
   rule625 = \ name_ ->
                             {-# LINE 1201 "src-ag/Transform.ag" #-}
                             getPos name_
                             {-# LINE 4831 "src-generated/Transform.hs" #-}
   {-# INLINE rule626 #-}
   rule626 = \ ((_patsIdefinedAttrs) :: [AttrName]) ->
     _patsIdefinedAttrs
   {-# INLINE rule627 #-}
   rule627 = \ ((_patsIdefinedInsts) :: [Identifier]) ->
     _patsIdefinedInsts
   {-# INLINE rule628 #-}
   rule628 = \ ((_patsIcopy) :: Patterns) name_ ->
     Constr name_ _patsIcopy
   {-# INLINE rule629 #-}
   rule629 = \ _copy ->
     _copy
{-# NOINLINE sem_Pattern_Product #-}
sem_Pattern_Product :: (Pos) -> T_Patterns  -> T_Pattern 
sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
arg_pos_ T_Patterns
arg_pats_ = Identity T_Pattern_s32 -> T_Pattern
T_Pattern (T_Pattern_s32 -> Identity T_Pattern_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Pattern_s32
st32 = let
      v31 :: T_Pattern_v31 
      v31 :: T_Pattern_v31
v31 = \ (T_Pattern_vIn31
T_Pattern_vIn31 ) -> ( let
         _patsX35 :: T_Patterns_s35
_patsX35 = Identity T_Patterns_s35 -> T_Patterns_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s35
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut34 [Pattern]
_patsIcopy [UniqueInfo]
_patsIdefinedAttrs [NontermIdent]
_patsIdefinedInsts [UniqueInfo] -> [Pattern]
_patsIpatunder) = T_Patterns_s35 -> T_Patterns_v34
inv_Patterns_s35 T_Patterns_s35
_patsX35 (T_Patterns_vIn34
T_Patterns_vIn34 )
         _lhsOpatunder :: [AttrName]->Pattern
         _lhsOpatunder :: [UniqueInfo] -> Pattern
_lhsOpatunder = ([UniqueInfo] -> [Pattern]) -> Pos -> [UniqueInfo] -> Pattern
rule630 [UniqueInfo] -> [Pattern]
_patsIpatunder Pos
arg_pos_
         _lhsOstpos :: Pos
         _lhsOstpos :: Pos
_lhsOstpos = Pos -> Pos
forall a. a -> a
rule631 Pos
arg_pos_
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = [UniqueInfo] -> [UniqueInfo]
rule632 [UniqueInfo]
_patsIdefinedAttrs
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule633 [NontermIdent]
_patsIdefinedInsts
         _copy :: Pattern
_copy = [Pattern] -> Pos -> Pattern
rule634 [Pattern]
_patsIcopy Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule635 Pattern
_copy
         __result_ :: T_Pattern_vOut31
__result_ = Pattern
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> T_Pattern_vOut31
T_Pattern_vOut31 Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos
         in T_Pattern_vOut31
__result_ )
     in T_Pattern_v31 -> T_Pattern_s32
C_Pattern_s32 T_Pattern_v31
v31
   {-# INLINE rule630 #-}
   {-# LINE 1191 "src-ag/Transform.ag" #-}
   rule630 = \ ((_patsIpatunder) :: [AttrName]->Patterns) pos_ ->
                                {-# LINE 1191 "src-ag/Transform.ag" #-}
                                \us -> Product pos_ (_patsIpatunder us)
                                {-# LINE 4872 "src-generated/Transform.hs" #-}
   {-# INLINE rule631 #-}
   {-# LINE 1202 "src-ag/Transform.ag" #-}
   rule631 = \ pos_ ->
                             {-# LINE 1202 "src-ag/Transform.ag" #-}
                             pos_
                             {-# LINE 4878 "src-generated/Transform.hs" #-}
   {-# INLINE rule632 #-}
   rule632 = \ ((_patsIdefinedAttrs) :: [AttrName]) ->
     _patsIdefinedAttrs
   {-# INLINE rule633 #-}
   rule633 = \ ((_patsIdefinedInsts) :: [Identifier]) ->
     _patsIdefinedInsts
   {-# INLINE rule634 #-}
   rule634 = \ ((_patsIcopy) :: Patterns) pos_ ->
     Product pos_ _patsIcopy
   {-# INLINE rule635 #-}
   rule635 = \ _copy ->
     _copy
{-# NOINLINE sem_Pattern_Alias #-}
sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern  -> T_Pattern 
sem_Pattern_Alias :: NontermIdent -> NontermIdent -> T_Pattern -> T_Pattern
sem_Pattern_Alias NontermIdent
arg_field_ NontermIdent
arg_attr_ T_Pattern
arg_pat_ = Identity T_Pattern_s32 -> T_Pattern
T_Pattern (T_Pattern_s32 -> Identity T_Pattern_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Pattern_s32
st32 = let
      v31 :: T_Pattern_v31 
      v31 :: T_Pattern_v31
v31 = \ (T_Pattern_vIn31
T_Pattern_vIn31 ) -> ( let
         _patX32 :: T_Pattern_s32
_patX32 = Identity T_Pattern_s32 -> T_Pattern_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s32
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut31 Pattern
_patIcopy [UniqueInfo]
_patIdefinedAttrs [NontermIdent]
_patIdefinedInsts [UniqueInfo] -> Pattern
_patIpatunder Pos
_patIstpos) = T_Pattern_s32 -> T_Pattern_v31
inv_Pattern_s32 T_Pattern_s32
_patX32 (T_Pattern_vIn31
T_Pattern_vIn31 )
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = [UniqueInfo] -> NontermIdent -> NontermIdent -> [UniqueInfo]
rule636 [UniqueInfo]
_patIdefinedAttrs NontermIdent
arg_attr_ NontermIdent
arg_field_
         _lhsOpatunder :: [AttrName]->Pattern
         _lhsOpatunder :: [UniqueInfo] -> Pattern
_lhsOpatunder = Pattern -> NontermIdent -> NontermIdent -> [UniqueInfo] -> Pattern
rule637 Pattern
_copy NontermIdent
arg_attr_ NontermIdent
arg_field_
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> NontermIdent -> NontermIdent -> [NontermIdent]
rule638 [NontermIdent]
_patIdefinedInsts NontermIdent
arg_attr_ NontermIdent
arg_field_
         _lhsOstpos :: Pos
         _lhsOstpos :: Pos
_lhsOstpos = NontermIdent -> Pos
rule639 NontermIdent
arg_field_
         _copy :: Pattern
_copy = Pattern -> NontermIdent -> NontermIdent -> Pattern
rule640 Pattern
_patIcopy NontermIdent
arg_attr_ NontermIdent
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule641 Pattern
_copy
         __result_ :: T_Pattern_vOut31
__result_ = Pattern
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> T_Pattern_vOut31
T_Pattern_vOut31 Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos
         in T_Pattern_vOut31
__result_ )
     in T_Pattern_v31 -> T_Pattern_s32
C_Pattern_s32 T_Pattern_v31
v31
   {-# INLINE rule636 #-}
   {-# LINE 1186 "src-ag/Transform.ag" #-}
   rule636 = \ ((_patIdefinedAttrs) :: [AttrName]) attr_ field_ ->
                               {-# LINE 1186 "src-ag/Transform.ag" #-}
                               (field_, attr_) : _patIdefinedAttrs
                               {-# LINE 4919 "src-generated/Transform.hs" #-}
   {-# INLINE rule637 #-}
   {-# LINE 1187 "src-ag/Transform.ag" #-}
   rule637 = \ _copy attr_ field_ ->
                               {-# LINE 1187 "src-ag/Transform.ag" #-}
                               \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy
                               {-# LINE 4925 "src-generated/Transform.hs" #-}
   {-# INLINE rule638 #-}
   {-# LINE 1188 "src-ag/Transform.ag" #-}
   rule638 = \ ((_patIdefinedInsts) :: [Identifier]) attr_ field_ ->
                               {-# LINE 1188 "src-ag/Transform.ag" #-}
                               (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts
                               {-# LINE 4931 "src-generated/Transform.hs" #-}
   {-# INLINE rule639 #-}
   {-# LINE 1203 "src-ag/Transform.ag" #-}
   rule639 = \ field_ ->
                             {-# LINE 1203 "src-ag/Transform.ag" #-}
                             getPos field_
                             {-# LINE 4937 "src-generated/Transform.hs" #-}
   {-# INLINE rule640 #-}
   rule640 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule641 #-}
   rule641 = \ _copy ->
     _copy
{-# NOINLINE sem_Pattern_Irrefutable #-}
sem_Pattern_Irrefutable :: T_Pattern  -> T_Pattern 
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable T_Pattern
arg_pat_ = Identity T_Pattern_s32 -> T_Pattern
T_Pattern (T_Pattern_s32 -> Identity T_Pattern_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Pattern_s32
st32 = let
      v31 :: T_Pattern_v31 
      v31 :: T_Pattern_v31
v31 = \ (T_Pattern_vIn31
T_Pattern_vIn31 ) -> ( let
         _patX32 :: T_Pattern_s32
_patX32 = Identity T_Pattern_s32 -> T_Pattern_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s32
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut31 Pattern
_patIcopy [UniqueInfo]
_patIdefinedAttrs [NontermIdent]
_patIdefinedInsts [UniqueInfo] -> Pattern
_patIpatunder Pos
_patIstpos) = T_Pattern_s32 -> T_Pattern_v31
inv_Pattern_s32 T_Pattern_s32
_patX32 (T_Pattern_vIn31
T_Pattern_vIn31 )
         _lhsOpatunder :: [AttrName]->Pattern
         _lhsOpatunder :: [UniqueInfo] -> Pattern
_lhsOpatunder = ([UniqueInfo] -> Pattern) -> [UniqueInfo] -> Pattern
rule642 [UniqueInfo] -> Pattern
_patIpatunder
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = [UniqueInfo] -> [UniqueInfo]
rule643 [UniqueInfo]
_patIdefinedAttrs
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule644 [NontermIdent]
_patIdefinedInsts
         _copy :: Pattern
_copy = Pattern -> Pattern
rule645 Pattern
_patIcopy
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule646 Pattern
_copy
         _lhsOstpos :: Pos
         _lhsOstpos :: Pos
_lhsOstpos = Pos -> Pos
rule647 Pos
_patIstpos
         __result_ :: T_Pattern_vOut31
__result_ = Pattern
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> T_Pattern_vOut31
T_Pattern_vOut31 Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos
         in T_Pattern_vOut31
__result_ )
     in T_Pattern_v31 -> T_Pattern_s32
C_Pattern_s32 T_Pattern_v31
v31
   {-# INLINE rule642 #-}
   {-# LINE 1192 "src-ag/Transform.ag" #-}
   rule642 = \ ((_patIpatunder) :: [AttrName]->Pattern) ->
                                 {-# LINE 1192 "src-ag/Transform.ag" #-}
                                 \us -> Irrefutable (_patIpatunder us)
                                 {-# LINE 4972 "src-generated/Transform.hs" #-}
   {-# INLINE rule643 #-}
   rule643 = \ ((_patIdefinedAttrs) :: [AttrName]) ->
     _patIdefinedAttrs
   {-# INLINE rule644 #-}
   rule644 = \ ((_patIdefinedInsts) :: [Identifier]) ->
     _patIdefinedInsts
   {-# INLINE rule645 #-}
   rule645 = \ ((_patIcopy) :: Pattern) ->
     Irrefutable _patIcopy
   {-# INLINE rule646 #-}
   rule646 = \ _copy ->
     _copy
   {-# INLINE rule647 #-}
   rule647 = \ ((_patIstpos) :: Pos) ->
     _patIstpos
{-# NOINLINE sem_Pattern_Underscore #-}
sem_Pattern_Underscore :: (Pos) -> T_Pattern 
sem_Pattern_Underscore :: Pos -> T_Pattern
sem_Pattern_Underscore Pos
arg_pos_ = Identity T_Pattern_s32 -> T_Pattern
T_Pattern (T_Pattern_s32 -> Identity T_Pattern_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Pattern_s32
st32 = let
      v31 :: T_Pattern_v31 
      v31 :: T_Pattern_v31
v31 = \ (T_Pattern_vIn31
T_Pattern_vIn31 ) -> ( let
         _lhsOpatunder :: [AttrName]->Pattern
         _lhsOpatunder :: [UniqueInfo] -> Pattern
_lhsOpatunder = Pattern -> [UniqueInfo] -> Pattern
forall a b. a -> b -> a
rule648 Pattern
_copy
         _lhsOstpos :: Pos
         _lhsOstpos :: Pos
_lhsOstpos = Pos -> Pos
forall a. a -> a
rule649 Pos
arg_pos_
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = () -> [UniqueInfo]
forall a. () -> [a]
rule650  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule651  ()
         _copy :: Pattern
_copy = Pos -> Pattern
rule652 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule653 Pattern
_copy
         __result_ :: T_Pattern_vOut31
__result_ = Pattern
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> T_Pattern_vOut31
T_Pattern_vOut31 Pattern
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> Pattern
_lhsOpatunder Pos
_lhsOstpos
         in T_Pattern_vOut31
__result_ )
     in T_Pattern_v31 -> T_Pattern_s32
C_Pattern_s32 T_Pattern_v31
v31
   {-# INLINE rule648 #-}
   {-# LINE 1189 "src-ag/Transform.ag" #-}
   rule648 = \ _copy ->
                                {-# LINE 1189 "src-ag/Transform.ag" #-}
                                \_ -> _copy
                                {-# LINE 5014 "src-generated/Transform.hs" #-}
   {-# INLINE rule649 #-}
   {-# LINE 1204 "src-ag/Transform.ag" #-}
   rule649 = \ pos_ ->
                             {-# LINE 1204 "src-ag/Transform.ag" #-}
                             pos_
                             {-# LINE 5020 "src-generated/Transform.hs" #-}
   {-# INLINE rule650 #-}
   rule650 = \  (_ :: ()) ->
     []
   {-# INLINE rule651 #-}
   rule651 = \  (_ :: ()) ->
     []
   {-# INLINE rule652 #-}
   rule652 = \ pos_ ->
     Underscore pos_
   {-# INLINE rule653 #-}
   rule653 = \ _copy ->
     _copy

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns {  }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> [Pattern]
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> [UniqueInfo]
definedAttrs_Syn_Patterns :: ([AttrName]), Syn_Patterns -> [NontermIdent]
definedInsts_Syn_Patterns :: ([Identifier]), Syn_Patterns -> [UniqueInfo] -> [Pattern]
patunder_Syn_Patterns :: ([AttrName]->Patterns) }
{-# INLINABLE wrap_Patterns #-}
wrap_Patterns :: T_Patterns  -> Inh_Patterns  -> (Syn_Patterns )
wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns
wrap_Patterns (T_Patterns Identity T_Patterns_s35
act) (Inh_Patterns
Inh_Patterns ) =
   Identity Syn_Patterns -> Syn_Patterns
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Patterns_s35
sem <- Identity T_Patterns_s35
act
        let arg34 :: T_Patterns_vIn34
arg34 = T_Patterns_vIn34
T_Patterns_vIn34 
        (T_Patterns_vOut34 [Pattern]
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> [Pattern]
_lhsOpatunder) <- T_Patterns_vOut34 -> Identity T_Patterns_vOut34
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s35 -> T_Patterns_v34
inv_Patterns_s35 T_Patterns_s35
sem T_Patterns_vIn34
arg34)
        Syn_Patterns -> Identity Syn_Patterns
forall (m :: * -> *) a. Monad m => a -> m a
return ([Pattern]
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> [Pattern])
-> Syn_Patterns
Syn_Patterns [Pattern]
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> [Pattern]
_lhsOpatunder)
   )

-- cata
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns  -> T_Patterns 
sem_Patterns :: [Pattern] -> T_Patterns
sem_Patterns [Pattern]
list = (T_Pattern -> T_Patterns -> T_Patterns)
-> T_Patterns -> [T_Pattern] -> T_Patterns
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Patterns
sem_Patterns_Nil ((Pattern -> T_Pattern) -> [Pattern] -> [T_Pattern]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Pattern -> T_Pattern
sem_Pattern [Pattern]
list)

-- semantic domain
newtype T_Patterns  = T_Patterns {
                                 T_Patterns -> Identity T_Patterns_s35
attach_T_Patterns :: Identity (T_Patterns_s35 )
                                 }
newtype T_Patterns_s35  = C_Patterns_s35 {
                                         T_Patterns_s35 -> T_Patterns_v34
inv_Patterns_s35 :: (T_Patterns_v34 )
                                         }
data T_Patterns_s36  = C_Patterns_s36
type T_Patterns_v34  = (T_Patterns_vIn34 ) -> (T_Patterns_vOut34 )
data T_Patterns_vIn34  = T_Patterns_vIn34 
data T_Patterns_vOut34  = T_Patterns_vOut34 (Patterns) ([AttrName]) ([Identifier]) ([AttrName]->Patterns)
{-# NOINLINE sem_Patterns_Cons #-}
sem_Patterns_Cons :: T_Pattern  -> T_Patterns  -> T_Patterns 
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Pattern
arg_hd_ T_Patterns
arg_tl_ = Identity T_Patterns_s35 -> T_Patterns
T_Patterns (T_Patterns_s35 -> Identity T_Patterns_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Patterns_s35
st35 = let
      v34 :: T_Patterns_v34 
      v34 :: T_Patterns_v34
v34 = \ (T_Patterns_vIn34
T_Patterns_vIn34 ) -> ( let
         _hdX32 :: T_Pattern_s32
_hdX32 = Identity T_Pattern_s32 -> T_Pattern_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s32
attach_T_Pattern (T_Pattern
arg_hd_))
         _tlX35 :: T_Patterns_s35
_tlX35 = Identity T_Patterns_s35 -> T_Patterns_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s35
attach_T_Patterns (T_Patterns
arg_tl_))
         (T_Pattern_vOut31 Pattern
_hdIcopy [UniqueInfo]
_hdIdefinedAttrs [NontermIdent]
_hdIdefinedInsts [UniqueInfo] -> Pattern
_hdIpatunder Pos
_hdIstpos) = T_Pattern_s32 -> T_Pattern_v31
inv_Pattern_s32 T_Pattern_s32
_hdX32 (T_Pattern_vIn31
T_Pattern_vIn31 )
         (T_Patterns_vOut34 [Pattern]
_tlIcopy [UniqueInfo]
_tlIdefinedAttrs [NontermIdent]
_tlIdefinedInsts [UniqueInfo] -> [Pattern]
_tlIpatunder) = T_Patterns_s35 -> T_Patterns_v34
inv_Patterns_s35 T_Patterns_s35
_tlX35 (T_Patterns_vIn34
T_Patterns_vIn34 )
         _lhsOpatunder :: [AttrName]->Patterns
         _lhsOpatunder :: [UniqueInfo] -> [Pattern]
_lhsOpatunder = ([UniqueInfo] -> Pattern)
-> ([UniqueInfo] -> [Pattern]) -> [UniqueInfo] -> [Pattern]
rule654 [UniqueInfo] -> Pattern
_hdIpatunder [UniqueInfo] -> [Pattern]
_tlIpatunder
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = [UniqueInfo] -> [UniqueInfo] -> [UniqueInfo]
rule655 [UniqueInfo]
_hdIdefinedAttrs [UniqueInfo]
_tlIdefinedAttrs
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule656 [NontermIdent]
_hdIdefinedInsts [NontermIdent]
_tlIdefinedInsts
         _copy :: [Pattern]
_copy = Pattern -> [Pattern] -> [Pattern]
rule657 Pattern
_hdIcopy [Pattern]
_tlIcopy
         _lhsOcopy :: Patterns
         _lhsOcopy :: [Pattern]
_lhsOcopy = [Pattern] -> [Pattern]
forall a. a -> a
rule658 [Pattern]
_copy
         __result_ :: T_Patterns_vOut34
__result_ = [Pattern]
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> [Pattern])
-> T_Patterns_vOut34
T_Patterns_vOut34 [Pattern]
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> [Pattern]
_lhsOpatunder
         in T_Patterns_vOut34
__result_ )
     in T_Patterns_v34 -> T_Patterns_s35
C_Patterns_s35 T_Patterns_v34
v34
   {-# INLINE rule654 #-}
   {-# LINE 1196 "src-ag/Transform.ag" #-}
   rule654 = \ ((_hdIpatunder) :: [AttrName]->Pattern) ((_tlIpatunder) :: [AttrName]->Patterns) ->
                          {-# LINE 1196 "src-ag/Transform.ag" #-}
                          \us -> (_hdIpatunder us) : (_tlIpatunder us)
                          {-# LINE 5092 "src-generated/Transform.hs" #-}
   {-# INLINE rule655 #-}
   rule655 = \ ((_hdIdefinedAttrs) :: [AttrName]) ((_tlIdefinedAttrs) :: [AttrName]) ->
     _hdIdefinedAttrs ++ _tlIdefinedAttrs
   {-# INLINE rule656 #-}
   rule656 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->
     _hdIdefinedInsts ++ _tlIdefinedInsts
   {-# INLINE rule657 #-}
   rule657 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->
     (:) _hdIcopy _tlIcopy
   {-# INLINE rule658 #-}
   rule658 = \ _copy ->
     _copy
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil ::  T_Patterns 
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil  = Identity T_Patterns_s35 -> T_Patterns
T_Patterns (T_Patterns_s35 -> Identity T_Patterns_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Patterns_s35
st35 = let
      v34 :: T_Patterns_v34 
      v34 :: T_Patterns_v34
v34 = \ (T_Patterns_vIn34
T_Patterns_vIn34 ) -> ( let
         _lhsOpatunder :: [AttrName]->Patterns
         _lhsOpatunder :: [UniqueInfo] -> [Pattern]
_lhsOpatunder = () -> [UniqueInfo] -> [Pattern]
forall p a. () -> p -> [a]
rule659  ()
         _lhsOdefinedAttrs :: [AttrName]
         _lhsOdefinedAttrs :: [UniqueInfo]
_lhsOdefinedAttrs = () -> [UniqueInfo]
forall a. () -> [a]
rule660  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule661  ()
         _copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule662  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: [Pattern]
_lhsOcopy = [Pattern] -> [Pattern]
forall a. a -> a
rule663 [Pattern]
forall a. [a]
_copy
         __result_ :: T_Patterns_vOut34
__result_ = [Pattern]
-> [UniqueInfo]
-> [NontermIdent]
-> ([UniqueInfo] -> [Pattern])
-> T_Patterns_vOut34
T_Patterns_vOut34 [Pattern]
_lhsOcopy [UniqueInfo]
_lhsOdefinedAttrs [NontermIdent]
_lhsOdefinedInsts [UniqueInfo] -> [Pattern]
_lhsOpatunder
         in T_Patterns_vOut34
__result_ )
     in T_Patterns_v34 -> T_Patterns_s35
C_Patterns_s35 T_Patterns_v34
v34
   {-# INLINE rule659 #-}
   {-# LINE 1195 "src-ag/Transform.ag" #-}
   rule659 = \  (_ :: ()) ->
                         {-# LINE 1195 "src-ag/Transform.ag" #-}
                         \_ ->  []
                         {-# LINE 5129 "src-generated/Transform.hs" #-}
   {-# INLINE rule660 #-}
   rule660 = \  (_ :: ()) ->
     []
   {-# INLINE rule661 #-}
   rule661 = \  (_ :: ()) ->
     []
   {-# INLINE rule662 #-}
   rule662 = \  (_ :: ()) ->
     []
   {-# INLINE rule663 #-}
   rule663 = \ _copy ->
     _copy

-- SemAlt ------------------------------------------------------
-- wrapper
data Inh_SemAlt  = Inh_SemAlt { Inh_SemAlt -> Map NontermIdent (Attributes, Attributes)
allAttrDecls_Inh_SemAlt :: (Map NontermIdent (Attributes, Attributes)), Inh_SemAlt -> Map NontermIdent (Attributes, Attributes)
allAttrs_Inh_SemAlt :: (Map NontermIdent (Attributes, Attributes)), Inh_SemAlt -> DataTypes
allFields_Inh_SemAlt :: (DataTypes), Inh_SemAlt -> Set NontermIdent
nts_Inh_SemAlt :: (Set NontermIdent), Inh_SemAlt -> Options
options_Inh_SemAlt :: (Options) }
data Syn_SemAlt  = Syn_SemAlt { Syn_SemAlt -> AttrOrderMap
attrOrderCollect_Syn_SemAlt :: (AttrOrderMap), Syn_SemAlt -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedArounds_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]), Syn_SemAlt -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedAugments_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), Syn_SemAlt -> [(NontermIdent, NontermIdent, [NontermIdent])]
collectedInsts_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), Syn_SemAlt -> [(NontermIdent, NontermIdent, [MergeInfo])]
collectedMerges_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]), Syn_SemAlt -> [(NontermIdent, NontermIdent, RuleInfo)]
collectedRules_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), Syn_SemAlt -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
collectedSigs_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), Syn_SemAlt -> [(NontermIdent, NontermIdent, [UniqueInfo])]
collectedUniques_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), Syn_SemAlt -> Seq Error
errors_Syn_SemAlt :: (Seq Error), Syn_SemAlt
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
semPragmasCollect_Syn_SemAlt :: (PragmaMap) }
{-# INLINABLE wrap_SemAlt #-}
wrap_SemAlt :: T_SemAlt  -> Inh_SemAlt  -> (Syn_SemAlt )
wrap_SemAlt :: T_SemAlt -> Inh_SemAlt -> Syn_SemAlt
wrap_SemAlt (T_SemAlt Identity T_SemAlt_s38
act) (Inh_SemAlt Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions) =
   Identity Syn_SemAlt -> Syn_SemAlt
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_SemAlt_s38
sem <- Identity T_SemAlt_s38
act
        let arg37 :: T_SemAlt_vIn37
arg37 = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Set NontermIdent
-> Options
-> T_SemAlt_vIn37
T_SemAlt_vIn37 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions
        (T_SemAlt_vOut37 AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect) <- T_SemAlt_vOut37 -> Identity T_SemAlt_vOut37
forall (m :: * -> *) a. Monad m => a -> m a
return (T_SemAlt_s38 -> T_SemAlt_v37
inv_SemAlt_s38 T_SemAlt_s38
sem T_SemAlt_vIn37
arg37)
        Syn_SemAlt -> Identity Syn_SemAlt
forall (m :: * -> *) a. Monad m => a -> m a
return (AttrOrderMap
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Seq Error
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Syn_SemAlt
Syn_SemAlt AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect)
   )

-- cata
{-# INLINE sem_SemAlt #-}
sem_SemAlt :: SemAlt  -> T_SemAlt 
sem_SemAlt :: SemAlt -> T_SemAlt
sem_SemAlt ( SemAlt Pos
pos_ ConstructorSet
constructorSet_ SemDefs
rules_ ) = Pos -> T_ConstructorSet -> T_SemDefs -> T_SemAlt
sem_SemAlt_SemAlt Pos
pos_ ( ConstructorSet -> T_ConstructorSet
sem_ConstructorSet ConstructorSet
constructorSet_ ) ( SemDefs -> T_SemDefs
sem_SemDefs SemDefs
rules_ )

-- semantic domain
newtype T_SemAlt  = T_SemAlt {
                             T_SemAlt -> Identity T_SemAlt_s38
attach_T_SemAlt :: Identity (T_SemAlt_s38 )
                             }
newtype T_SemAlt_s38  = C_SemAlt_s38 {
                                     T_SemAlt_s38 -> T_SemAlt_v37
inv_SemAlt_s38 :: (T_SemAlt_v37 )
                                     }
data T_SemAlt_s39  = C_SemAlt_s39
type T_SemAlt_v37  = (T_SemAlt_vIn37 ) -> (T_SemAlt_vOut37 )
data T_SemAlt_vIn37  = T_SemAlt_vIn37 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (DataTypes) (Set NontermIdent) (Options)
data T_SemAlt_vOut37  = T_SemAlt_vOut37 (AttrOrderMap) ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Seq Error) (PragmaMap)
{-# NOINLINE sem_SemAlt_SemAlt #-}
sem_SemAlt_SemAlt :: (Pos) -> T_ConstructorSet  -> T_SemDefs  -> T_SemAlt 
sem_SemAlt_SemAlt :: Pos -> T_ConstructorSet -> T_SemDefs -> T_SemAlt
sem_SemAlt_SemAlt Pos
_ T_ConstructorSet
arg_constructorSet_ T_SemDefs
arg_rules_ = Identity T_SemAlt_s38 -> T_SemAlt
T_SemAlt (T_SemAlt_s38 -> Identity T_SemAlt_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemAlt_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_SemAlt_s38
st38 = let
      v37 :: T_SemAlt_v37 
      v37 :: T_SemAlt_v37
v37 = \ (T_SemAlt_vIn37 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions) -> ( let
         _constructorSetX14 :: T_ConstructorSet_s14
_constructorSetX14 = Identity T_ConstructorSet_s14 -> T_ConstructorSet_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ConstructorSet -> Identity T_ConstructorSet_s14
attach_T_ConstructorSet (T_ConstructorSet
arg_constructorSet_))
         _rulesX47 :: T_SemDefs_s47
_rulesX47 = Identity T_SemDefs_s47 -> T_SemDefs_s47
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_SemDefs -> Identity T_SemDefs_s47
attach_T_SemDefs (T_SemDefs
arg_rules_))
         (T_ConstructorSet_vOut13 Set NontermIdent
_constructorSetIcollectedConstructorNames Set NontermIdent -> Set NontermIdent
_constructorSetIconstructors Seq Error
_constructorSetIerrors) = T_ConstructorSet_s14 -> T_ConstructorSet_v13
inv_ConstructorSet_s14 T_ConstructorSet_s14
_constructorSetX14 (T_ConstructorSet_vIn13
T_ConstructorSet_vIn13 )
         (T_SemDefs_vOut46 [AugmentInfo]
_rulesIaroundInfos [AugmentInfo]
_rulesIaugmentInfos [NontermIdent]
_rulesIdefinedInsts Seq Error
_rulesIerrors [MergeInfo]
_rulesImergeInfos Set Dependency
_rulesIorderDepsCollect [NontermIdent]
_rulesIpragmaNamesCollect [RuleInfo]
_rulesIruleInfos [(NontermIdent, Type)]
_rulesIsigInfos [UniqueInfo]
_rulesIuniqueInfos) = T_SemDefs_s47 -> T_SemDefs_v46
inv_SemDefs_s47 T_SemDefs_s47
_rulesX47 (Options -> T_SemDefs_vIn46
T_SemDefs_vIn46 Options
_rulesOoptions)
         _pragmaNames :: Set NontermIdent
_pragmaNames = [NontermIdent] -> Set NontermIdent
rule664 [NontermIdent]
_rulesIpragmaNamesCollect
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> Set NontermIdent
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall c.
[(NontermIdent, Set NontermIdent, c)]
-> Set NontermIdent
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule665 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo Set NontermIdent
_pragmaNames
         _attrOrders :: [AttrOrderMap]
_attrOrders = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> Set Dependency -> [AttrOrderMap]
forall c.
[(NontermIdent, Set NontermIdent, c)]
-> Set Dependency -> [AttrOrderMap]
rule666 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo Set Dependency
_rulesIorderDepsCollect
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = [AttrOrderMap] -> AttrOrderMap
rule667 [AttrOrderMap]
_attrOrders
         _coninfo :: [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo = (Set NontermIdent -> Set NontermIdent)
-> DataTypes
-> Set NontermIdent
-> [(NontermIdent, Set NontermIdent, Set NontermIdent)]
rule668 Set NontermIdent -> Set NontermIdent
_constructorSetIconstructors DataTypes
_lhsIallFields Set NontermIdent
_lhsInts
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> Seq Error -> Seq Error
rule669 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo Seq Error
_rulesIerrors
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [RuleInfo] -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a b c. [(a, Set b, c)] -> [RuleInfo] -> [(a, b, RuleInfo)]
rule670 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [RuleInfo]
_rulesIruleInfos
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [(NontermIdent, Type)]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a b c.
[(a, Set b, c)]
-> [(NontermIdent, Type)] -> [(a, b, (NontermIdent, Type))]
rule671 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [(NontermIdent, Type)]
_rulesIsigInfos
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [NontermIdent] -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a b c.
[(a, Set b, c)] -> [NontermIdent] -> [(a, b, [NontermIdent])]
rule672 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [NontermIdent]
_rulesIdefinedInsts
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [UniqueInfo] -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a b c.
[(a, Set b, c)] -> [UniqueInfo] -> [(a, b, [UniqueInfo])]
rule673 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [UniqueInfo]
_rulesIuniqueInfos
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [AugmentInfo] -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a b c.
[(a, Set b, c)] -> [AugmentInfo] -> [(a, b, [AugmentInfo])]
rule674 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [AugmentInfo]
_rulesIaugmentInfos
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [AugmentInfo] -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a b c.
[(a, Set b, c)] -> [AugmentInfo] -> [(a, b, [AugmentInfo])]
rule675 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [AugmentInfo]
_rulesIaroundInfos
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = [(NontermIdent, Set NontermIdent, Set NontermIdent)]
-> [MergeInfo] -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a b c.
[(a, Set b, c)] -> [MergeInfo] -> [(a, b, [MergeInfo])]
rule676 [(NontermIdent, Set NontermIdent, Set NontermIdent)]
_coninfo [MergeInfo]
_rulesImergeInfos
         _rulesOoptions :: Options
_rulesOoptions = Options -> Options
rule677 Options
_lhsIoptions
         __result_ :: T_SemAlt_vOut37
__result_ = AttrOrderMap
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Seq Error
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> T_SemAlt_vOut37
T_SemAlt_vOut37 AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect
         in T_SemAlt_vOut37
__result_ )
     in T_SemAlt_v37 -> T_SemAlt_s38
C_SemAlt_s38 T_SemAlt_v37
v37
   {-# INLINE rule664 #-}
   {-# LINE 888 "src-ag/Transform.ag" #-}
   rule664 = \ ((_rulesIpragmaNamesCollect) :: [Identifier]) ->
                                {-# LINE 888 "src-ag/Transform.ag" #-}
                                Set.fromList _rulesIpragmaNamesCollect
                                {-# LINE 5216 "src-generated/Transform.hs" #-}
   {-# INLINE rule665 #-}
   {-# LINE 889 "src-ag/Transform.ag" #-}
   rule665 = \ _coninfo _pragmaNames ->
                                {-# LINE 889 "src-ag/Transform.ag" #-}
                                foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames
                                                               | (nt, conset, _) <- _coninfo
                                                               , con <- Set.toList conset
                                                               ]
                                {-# LINE 5225 "src-generated/Transform.hs" #-}
   {-# INLINE rule666 #-}
   {-# LINE 918 "src-ag/Transform.ag" #-}
   rule666 = \ _coninfo ((_rulesIorderDepsCollect) :: Set Dependency) ->
            {-# LINE 918 "src-ag/Transform.ag" #-}
            [ orderMapSingle nt con _rulesIorderDepsCollect
            | (nt, conset, _) <- _coninfo
            , con <- Set.toList conset
            ]
            {-# LINE 5234 "src-generated/Transform.hs" #-}
   {-# INLINE rule667 #-}
   {-# LINE 923 "src-ag/Transform.ag" #-}
   rule667 = \ _attrOrders ->
                               {-# LINE 923 "src-ag/Transform.ag" #-}
                               foldr orderMapUnion Map.empty _attrOrders
                               {-# LINE 5240 "src-generated/Transform.hs" #-}
   {-# INLINE rule668 #-}
   {-# LINE 1105 "src-ag/Transform.ag" #-}
   rule668 = \ ((_constructorSetIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_lhsIallFields) :: DataTypes) ((_lhsInts) :: Set NontermIdent) ->
                           {-# LINE 1105 "src-ag/Transform.ag" #-}
                           [ (nt, conset, conkeys)
                           | nt  <- Set.toList _lhsInts
                           , let conmap = Map.findWithDefault Map.empty nt _lhsIallFields
                           , let conkeys = Set.fromList (Map.keys conmap)
                           , let conset  = _constructorSetIconstructors conkeys
                           ]
                           {-# LINE 5251 "src-generated/Transform.hs" #-}
   {-# INLINE rule669 #-}
   {-# LINE 1112 "src-ag/Transform.ag" #-}
   rule669 = \ _coninfo ((_rulesIerrors) :: Seq Error) ->
                          {-# LINE 1112 "src-ag/Transform.ag" #-}
                          Seq.fromList
                             [ UndefAlt nt con
                             | (nt, conset, conkeys) <- _coninfo
                             , con <- Set.toList (Set.difference conset conkeys)
                             ]
                          Seq.>< _rulesIerrors
                          {-# LINE 5262 "src-generated/Transform.hs" #-}
   {-# INLINE rule670 #-}
   {-# LINE 1119 "src-ag/Transform.ag" #-}
   rule670 = \ _coninfo ((_rulesIruleInfos) :: [RuleInfo]) ->
                         {-# LINE 1119 "src-ag/Transform.ag" #-}
                         [ (nt,con,r)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         , r <- _rulesIruleInfos
                         ]
                         {-# LINE 5272 "src-generated/Transform.hs" #-}
   {-# INLINE rule671 #-}
   {-# LINE 1125 "src-ag/Transform.ag" #-}
   rule671 = \ _coninfo ((_rulesIsigInfos) :: [SigInfo]) ->
                         {-# LINE 1125 "src-ag/Transform.ag" #-}
                         [ (nt,con,ts)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         , ts <- _rulesIsigInfos
                         ]
                         {-# LINE 5282 "src-generated/Transform.hs" #-}
   {-# INLINE rule672 #-}
   {-# LINE 1132 "src-ag/Transform.ag" #-}
   rule672 = \ _coninfo ((_rulesIdefinedInsts) :: [Identifier]) ->
                         {-# LINE 1132 "src-ag/Transform.ag" #-}
                         [ (nt,con,_rulesIdefinedInsts)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         ]
                         {-# LINE 5291 "src-generated/Transform.hs" #-}
   {-# INLINE rule673 #-}
   {-# LINE 1138 "src-ag/Transform.ag" #-}
   rule673 = \ _coninfo ((_rulesIuniqueInfos) :: [UniqueInfo]) ->
                         {-# LINE 1138 "src-ag/Transform.ag" #-}
                         [ (nt,con,_rulesIuniqueInfos)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         ]
                         {-# LINE 5300 "src-generated/Transform.hs" #-}
   {-# INLINE rule674 #-}
   {-# LINE 1144 "src-ag/Transform.ag" #-}
   rule674 = \ _coninfo ((_rulesIaugmentInfos) :: [AugmentInfo]) ->
                         {-# LINE 1144 "src-ag/Transform.ag" #-}
                         [ (nt, con, _rulesIaugmentInfos)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         ]
                         {-# LINE 5309 "src-generated/Transform.hs" #-}
   {-# INLINE rule675 #-}
   {-# LINE 1150 "src-ag/Transform.ag" #-}
   rule675 = \ _coninfo ((_rulesIaroundInfos) :: [AroundInfo]) ->
                         {-# LINE 1150 "src-ag/Transform.ag" #-}
                         [ (nt, con, _rulesIaroundInfos)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         ]
                         {-# LINE 5318 "src-generated/Transform.hs" #-}
   {-# INLINE rule676 #-}
   {-# LINE 1156 "src-ag/Transform.ag" #-}
   rule676 = \ _coninfo ((_rulesImergeInfos) :: [MergeInfo]) ->
                         {-# LINE 1156 "src-ag/Transform.ag" #-}
                         [ (nt, con, _rulesImergeInfos)
                         | (nt, conset, _) <- _coninfo
                         , con <- Set.toList conset
                         ]
                         {-# LINE 5327 "src-generated/Transform.hs" #-}
   {-# INLINE rule677 #-}
   rule677 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions

-- SemAlts -----------------------------------------------------
-- wrapper
data Inh_SemAlts  = Inh_SemAlts { Inh_SemAlts -> Map NontermIdent (Attributes, Attributes)
allAttrDecls_Inh_SemAlts :: (Map NontermIdent (Attributes, Attributes)), Inh_SemAlts -> Map NontermIdent (Attributes, Attributes)
allAttrs_Inh_SemAlts :: (Map NontermIdent (Attributes, Attributes)), Inh_SemAlts -> DataTypes
allFields_Inh_SemAlts :: (DataTypes), Inh_SemAlts -> Set NontermIdent
nts_Inh_SemAlts :: (Set NontermIdent), Inh_SemAlts -> Options
options_Inh_SemAlts :: (Options) }
data Syn_SemAlts  = Syn_SemAlts { Syn_SemAlts -> AttrOrderMap
attrOrderCollect_Syn_SemAlts :: (AttrOrderMap), Syn_SemAlts -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedArounds_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]), Syn_SemAlts -> [(NontermIdent, NontermIdent, [AugmentInfo])]
collectedAugments_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), Syn_SemAlts -> [(NontermIdent, NontermIdent, [NontermIdent])]
collectedInsts_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), Syn_SemAlts -> [(NontermIdent, NontermIdent, [MergeInfo])]
collectedMerges_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]), Syn_SemAlts -> [(NontermIdent, NontermIdent, RuleInfo)]
collectedRules_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), Syn_SemAlts -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
collectedSigs_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), Syn_SemAlts -> [(NontermIdent, NontermIdent, [UniqueInfo])]
collectedUniques_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), Syn_SemAlts -> Seq Error
errors_Syn_SemAlts :: (Seq Error), Syn_SemAlts
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
semPragmasCollect_Syn_SemAlts :: (PragmaMap) }
{-# INLINABLE wrap_SemAlts #-}
wrap_SemAlts :: T_SemAlts  -> Inh_SemAlts  -> (Syn_SemAlts )
wrap_SemAlts :: T_SemAlts -> Inh_SemAlts -> Syn_SemAlts
wrap_SemAlts (T_SemAlts Identity T_SemAlts_s41
act) (Inh_SemAlts Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions) =
   Identity Syn_SemAlts -> Syn_SemAlts
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_SemAlts_s41
sem <- Identity T_SemAlts_s41
act
        let arg40 :: T_SemAlts_vIn40
arg40 = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Set NontermIdent
-> Options
-> T_SemAlts_vIn40
T_SemAlts_vIn40 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions
        (T_SemAlts_vOut40 AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect) <- T_SemAlts_vOut40 -> Identity T_SemAlts_vOut40
forall (m :: * -> *) a. Monad m => a -> m a
return (T_SemAlts_s41 -> T_SemAlts_v40
inv_SemAlts_s41 T_SemAlts_s41
sem T_SemAlts_vIn40
arg40)
        Syn_SemAlts -> Identity Syn_SemAlts
forall (m :: * -> *) a. Monad m => a -> m a
return (AttrOrderMap
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Seq Error
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Syn_SemAlts
Syn_SemAlts AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect)
   )

-- cata
{-# NOINLINE sem_SemAlts #-}
sem_SemAlts :: SemAlts  -> T_SemAlts 
sem_SemAlts :: SemAlts -> T_SemAlts
sem_SemAlts SemAlts
list = (T_SemAlt -> T_SemAlts -> T_SemAlts)
-> T_SemAlts -> [T_SemAlt] -> T_SemAlts
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_SemAlt -> T_SemAlts -> T_SemAlts
sem_SemAlts_Cons T_SemAlts
sem_SemAlts_Nil ((SemAlt -> T_SemAlt) -> SemAlts -> [T_SemAlt]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map SemAlt -> T_SemAlt
sem_SemAlt SemAlts
list)

-- semantic domain
newtype T_SemAlts  = T_SemAlts {
                               T_SemAlts -> Identity T_SemAlts_s41
attach_T_SemAlts :: Identity (T_SemAlts_s41 )
                               }
newtype T_SemAlts_s41  = C_SemAlts_s41 {
                                       T_SemAlts_s41 -> T_SemAlts_v40
inv_SemAlts_s41 :: (T_SemAlts_v40 )
                                       }
data T_SemAlts_s42  = C_SemAlts_s42
type T_SemAlts_v40  = (T_SemAlts_vIn40 ) -> (T_SemAlts_vOut40 )
data T_SemAlts_vIn40  = T_SemAlts_vIn40 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (DataTypes) (Set NontermIdent) (Options)
data T_SemAlts_vOut40  = T_SemAlts_vOut40 (AttrOrderMap) ([ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Seq Error) (PragmaMap)
{-# NOINLINE sem_SemAlts_Cons #-}
sem_SemAlts_Cons :: T_SemAlt  -> T_SemAlts  -> T_SemAlts 
sem_SemAlts_Cons :: T_SemAlt -> T_SemAlts -> T_SemAlts
sem_SemAlts_Cons T_SemAlt
arg_hd_ T_SemAlts
arg_tl_ = Identity T_SemAlts_s41 -> T_SemAlts
T_SemAlts (T_SemAlts_s41 -> Identity T_SemAlts_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemAlts_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_SemAlts_s41
st41 = let
      v40 :: T_SemAlts_v40 
      v40 :: T_SemAlts_v40
v40 = \ (T_SemAlts_vIn40 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions) -> ( let
         _hdX38 :: T_SemAlt_s38
_hdX38 = Identity T_SemAlt_s38 -> T_SemAlt_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_SemAlt -> Identity T_SemAlt_s38
attach_T_SemAlt (T_SemAlt
arg_hd_))
         _tlX41 :: T_SemAlts_s41
_tlX41 = Identity T_SemAlts_s41 -> T_SemAlts_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_SemAlts -> Identity T_SemAlts_s41
attach_T_SemAlts (T_SemAlts
arg_tl_))
         (T_SemAlt_vOut37 AttrOrderMap
_hdIattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques Seq Error
_hdIerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect) = T_SemAlt_s38 -> T_SemAlt_v37
inv_SemAlt_s38 T_SemAlt_s38
_hdX38 (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Set NontermIdent
-> Options
-> T_SemAlt_vIn37
T_SemAlt_vIn37 Map NontermIdent (Attributes, Attributes)
_hdOallAttrDecls Map NontermIdent (Attributes, Attributes)
_hdOallAttrs DataTypes
_hdOallFields Set NontermIdent
_hdOnts Options
_hdOoptions)
         (T_SemAlts_vOut40 AttrOrderMap
_tlIattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques Seq Error
_tlIerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect) = T_SemAlts_s41 -> T_SemAlts_v40
inv_SemAlts_s41 T_SemAlts_s41
_tlX41 (Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
-> DataTypes
-> Set NontermIdent
-> Options
-> T_SemAlts_vIn40
T_SemAlts_vIn40 Map NontermIdent (Attributes, Attributes)
_tlOallAttrDecls Map NontermIdent (Attributes, Attributes)
_tlOallAttrs DataTypes
_tlOallFields Set NontermIdent
_tlOnts Options
_tlOoptions)
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = AttrOrderMap -> AttrOrderMap -> AttrOrderMap
rule678 AttrOrderMap
_hdIattrOrderCollect AttrOrderMap
_tlIattrOrderCollect
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule679 [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule680 [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
rule681 [(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts [(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
rule682 [(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges [(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
rule683 [(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules [(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
rule684 [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
rule685 [(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques [(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule686 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule687 Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect
         _hdOallAttrDecls :: Map NontermIdent (Attributes, Attributes)
_hdOallAttrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule688 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
         _hdOallAttrs :: Map NontermIdent (Attributes, Attributes)
_hdOallAttrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule689 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
         _hdOallFields :: DataTypes
_hdOallFields = DataTypes -> DataTypes
rule690 DataTypes
_lhsIallFields
         _hdOnts :: Set NontermIdent
_hdOnts = Set NontermIdent -> Set NontermIdent
rule691 Set NontermIdent
_lhsInts
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule692 Options
_lhsIoptions
         _tlOallAttrDecls :: Map NontermIdent (Attributes, Attributes)
_tlOallAttrDecls = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule693 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
         _tlOallAttrs :: Map NontermIdent (Attributes, Attributes)
_tlOallAttrs = Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule694 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
         _tlOallFields :: DataTypes
_tlOallFields = DataTypes -> DataTypes
rule695 DataTypes
_lhsIallFields
         _tlOnts :: Set NontermIdent
_tlOnts = Set NontermIdent -> Set NontermIdent
rule696 Set NontermIdent
_lhsInts
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule697 Options
_lhsIoptions
         __result_ :: T_SemAlts_vOut40
__result_ = AttrOrderMap
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Seq Error
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> T_SemAlts_vOut40
T_SemAlts_vOut40 AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect
         in T_SemAlts_vOut40
__result_ )
     in T_SemAlts_v40 -> T_SemAlts_s41
C_SemAlts_s41 T_SemAlts_v40
v40
   {-# INLINE rule678 #-}
   rule678 :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap
rule678 = \ ((AttrOrderMap
_hdIattrOrderCollect) :: AttrOrderMap) ((AttrOrderMap
_tlIattrOrderCollect) :: AttrOrderMap) ->
     AttrOrderMap
_hdIattrOrderCollect AttrOrderMap -> AttrOrderMap -> AttrOrderMap
`orderMapUnion` AttrOrderMap
_tlIattrOrderCollect
   {-# INLINE rule679 #-}
   rule679 :: [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule679 = \ (([(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) (([(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]) ->
     [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedArounds
   {-# INLINE rule680 #-}
   rule680 :: [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
rule680 = \ (([(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) (([(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->
     [(NontermIdent, NontermIdent, [AugmentInfo])]
_hdIcollectedAugments [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [AugmentInfo])]
_tlIcollectedAugments
   {-# INLINE rule681 #-}
   rule681 :: [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
rule681 = \ (([(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) (([(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->
     [(NontermIdent, NontermIdent, [NontermIdent])]
_hdIcollectedInsts [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [NontermIdent])]
_tlIcollectedInsts
   {-# INLINE rule682 #-}
   rule682 :: [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
rule682 = \ (([(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) (([(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]) ->
     [(NontermIdent, NontermIdent, [MergeInfo])]
_hdIcollectedMerges [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [MergeInfo])]
_tlIcollectedMerges
   {-# INLINE rule683 #-}
   rule683 :: [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
rule683 = \ (([(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) (([(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->
     [(NontermIdent, NontermIdent, RuleInfo)]
_hdIcollectedRules [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, RuleInfo)]
_tlIcollectedRules
   {-# INLINE rule684 #-}
   rule684 :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
rule684 = \ (([(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) (([(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->
     [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_hdIcollectedSigs [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_tlIcollectedSigs
   {-# INLINE rule685 #-}
   rule685 :: [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
rule685 = \ (([(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (([(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->
     [(NontermIdent, NontermIdent, [UniqueInfo])]
_hdIcollectedUniques [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent, [UniqueInfo])]
_tlIcollectedUniques
   {-# INLINE rule686 #-}
   rule686 :: Seq Error -> Seq Error -> Seq Error
rule686 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule687 #-}
   rule687 :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
rule687 = \ ((Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect) :: PragmaMap) ((Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect) :: PragmaMap) ->
     Map NontermIdent (Map NontermIdent (Set NontermIdent))
_hdIsemPragmasCollect Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
`pragmaMapUnion` Map NontermIdent (Map NontermIdent (Set NontermIdent))
_tlIsemPragmasCollect
   {-# INLINE rule688 #-}
   rule688 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule688 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
   {-# INLINE rule689 #-}
   rule689 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule689 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
   {-# INLINE rule690 #-}
   rule690 :: DataTypes -> DataTypes
rule690 = \ ((DataTypes
_lhsIallFields) :: DataTypes) ->
     DataTypes
_lhsIallFields
   {-# INLINE rule691 #-}
   rule691 :: Set NontermIdent -> Set NontermIdent
rule691 = \ ((Set NontermIdent
_lhsInts) :: Set NontermIdent) ->
     Set NontermIdent
_lhsInts
   {-# INLINE rule692 #-}
   rule692 :: Options -> Options
rule692 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule693 #-}
   rule693 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule693 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls
   {-# INLINE rule694 #-}
   rule694 :: Map NontermIdent (Attributes, Attributes)
-> Map NontermIdent (Attributes, Attributes)
rule694 = \ ((Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->
     Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs
   {-# INLINE rule695 #-}
   rule695 :: DataTypes -> DataTypes
rule695 = \ ((DataTypes
_lhsIallFields) :: DataTypes) ->
     DataTypes
_lhsIallFields
   {-# INLINE rule696 #-}
   rule696 :: Set NontermIdent -> Set NontermIdent
rule696 = \ ((Set NontermIdent
_lhsInts) :: Set NontermIdent) ->
     Set NontermIdent
_lhsInts
   {-# INLINE rule697 #-}
   rule697 :: Options -> Options
rule697 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
{-# NOINLINE sem_SemAlts_Nil #-}
sem_SemAlts_Nil ::  T_SemAlts 
sem_SemAlts_Nil :: T_SemAlts
sem_SemAlts_Nil  = Identity T_SemAlts_s41 -> T_SemAlts
T_SemAlts (T_SemAlts_s41 -> Identity T_SemAlts_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemAlts_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_SemAlts_s41
st41 = let
      v40 :: T_SemAlts_v40 
      v40 :: T_SemAlts_v40
v40 = \ (T_SemAlts_vIn40 Map NontermIdent (Attributes, Attributes)
_lhsIallAttrDecls Map NontermIdent (Attributes, Attributes)
_lhsIallAttrs DataTypes
_lhsIallFields Set NontermIdent
_lhsInts Options
_lhsIoptions) -> ( let
         _lhsOattrOrderCollect :: AttrOrderMap
         _lhsOattrOrderCollect :: AttrOrderMap
_lhsOattrOrderCollect = () -> AttrOrderMap
forall k a. () -> Map k a
rule698  ()
         _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo])  ]
         _lhsOcollectedArounds :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule699  ()
         _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]
         _lhsOcollectedAugments :: [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments = () -> [(NontermIdent, NontermIdent, [AugmentInfo])]
forall a. () -> [a]
rule700  ()
         _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]
         _lhsOcollectedInsts :: [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts = () -> [(NontermIdent, NontermIdent, [NontermIdent])]
forall a. () -> [a]
rule701  ()
         _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo])   ]
         _lhsOcollectedMerges :: [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges = () -> [(NontermIdent, NontermIdent, [MergeInfo])]
forall a. () -> [a]
rule702  ()
         _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]
         _lhsOcollectedRules :: [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules = () -> [(NontermIdent, NontermIdent, RuleInfo)]
forall a. () -> [a]
rule703  ()
         _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]
         _lhsOcollectedSigs :: [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs = () -> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
forall a. () -> [a]
rule704  ()
         _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]
         _lhsOcollectedUniques :: [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques = () -> [(NontermIdent, NontermIdent, [UniqueInfo])]
forall a. () -> [a]
rule705  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule706  ()
         _lhsOsemPragmasCollect :: PragmaMap
         _lhsOsemPragmasCollect :: Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect = () -> Map NontermIdent (Map NontermIdent (Set NontermIdent))
forall k a. () -> Map k a
rule707  ()
         __result_ :: T_SemAlts_vOut40
__result_ = AttrOrderMap
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [AugmentInfo])]
-> [(NontermIdent, NontermIdent, [NontermIdent])]
-> [(NontermIdent, NontermIdent, [MergeInfo])]
-> [(NontermIdent, NontermIdent, RuleInfo)]
-> [(NontermIdent, NontermIdent, (NontermIdent, Type))]
-> [(NontermIdent, NontermIdent, [UniqueInfo])]
-> Seq Error
-> Map NontermIdent (Map NontermIdent (Set NontermIdent))
-> T_SemAlts_vOut40
T_SemAlts_vOut40 AttrOrderMap
_lhsOattrOrderCollect [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedArounds [(NontermIdent, NontermIdent, [AugmentInfo])]
_lhsOcollectedAugments [(NontermIdent, NontermIdent, [NontermIdent])]
_lhsOcollectedInsts [(NontermIdent, NontermIdent, [MergeInfo])]
_lhsOcollectedMerges [(NontermIdent, NontermIdent, RuleInfo)]
_lhsOcollectedRules [(NontermIdent, NontermIdent, (NontermIdent, Type))]
_lhsOcollectedSigs [(NontermIdent, NontermIdent, [UniqueInfo])]
_lhsOcollectedUniques Seq Error
_lhsOerrors Map NontermIdent (Map NontermIdent (Set NontermIdent))
_lhsOsemPragmasCollect
         in T_SemAlts_vOut40
__result_ )
     in T_SemAlts_v40 -> T_SemAlts_s41
C_SemAlts_s41 T_SemAlts_v40
v40
   {-# INLINE rule698 #-}
   rule698 :: () -> Map k a
rule698 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule699 #-}
   rule699 :: () -> [a]
rule699 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule700 #-}
   rule700 :: () -> [a]
rule700 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule701 #-}
   rule701 :: () -> [a]
rule701 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule702 #-}
   rule702 :: () -> [a]
rule702 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule703 #-}
   rule703 :: () -> [a]
rule703 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule704 #-}
   rule704 :: () -> [a]
rule704 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule705 #-}
   rule705 :: () -> [a]
rule705 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule706 #-}
   rule706 :: () -> Seq a
rule706 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule707 #-}
   rule707 :: () -> Map k a
rule707 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty

-- SemDef ------------------------------------------------------
-- wrapper
data Inh_SemDef  = Inh_SemDef { Inh_SemDef -> Options
options_Inh_SemDef :: (Options) }
data Syn_SemDef  = Syn_SemDef { Syn_SemDef -> [AugmentInfo]
aroundInfos_Syn_SemDef :: ([AroundInfo]), Syn_SemDef -> [AugmentInfo]
augmentInfos_Syn_SemDef :: ([AugmentInfo]), Syn_SemDef -> [NontermIdent]
definedInsts_Syn_SemDef :: ([Identifier]), Syn_SemDef -> Seq Error
errors_Syn_SemDef :: (Seq Error), Syn_SemDef -> [MergeInfo]
mergeInfos_Syn_SemDef :: ([MergeInfo]), Syn_SemDef -> Set Dependency
orderDepsCollect_Syn_SemDef :: (Set Dependency), Syn_SemDef -> [NontermIdent]
pragmaNamesCollect_Syn_SemDef :: ([Identifier]), Syn_SemDef -> [RuleInfo]
ruleInfos_Syn_SemDef :: ([RuleInfo]), Syn_SemDef -> [(NontermIdent, Type)]
sigInfos_Syn_SemDef :: ([SigInfo]), Syn_SemDef -> [UniqueInfo]
uniqueInfos_Syn_SemDef :: ([UniqueInfo]) }
{-# INLINABLE wrap_SemDef #-}
wrap_SemDef :: T_SemDef  -> Inh_SemDef  -> (Syn_SemDef )
wrap_SemDef :: T_SemDef -> Inh_SemDef -> Syn_SemDef
wrap_SemDef (T_SemDef Identity T_SemDef_s44
act) (Inh_SemDef Options
_lhsIoptions) =
   Identity Syn_SemDef -> Syn_SemDef
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_SemDef_s44
sem <- Identity T_SemDef_s44
act
        let arg43 :: T_SemDef_vIn43
arg43 = Options -> T_SemDef_vIn43
T_SemDef_vIn43 Options
_lhsIoptions
        (T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos) <- T_SemDef_vOut43 -> Identity T_SemDef_vOut43
forall (m :: * -> *) a. Monad m => a -> m a
return (T_SemDef_s44 -> T_SemDef_v43
inv_SemDef_s44 T_SemDef_s44
sem T_SemDef_vIn43
arg43)
        Syn_SemDef -> Identity Syn_SemDef
forall (m :: * -> *) a. Monad m => a -> m a
return ([AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> Syn_SemDef
Syn_SemDef [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos)
   )

-- cata
{-# NOINLINE sem_SemDef #-}
sem_SemDef :: SemDef  -> T_SemDef 
sem_SemDef :: SemDef -> T_SemDef
sem_SemDef ( Def Pos
pos_ Maybe NontermIdent
mbName_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ Bool
pure_ Bool
eager_ ) = Pos
-> Maybe NontermIdent
-> T_Pattern
-> Expression
-> Bool
-> Bool
-> Bool
-> T_SemDef
sem_SemDef_Def Pos
pos_ Maybe NontermIdent
mbName_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pattern_ ) Expression
rhs_ Bool
owrt_ Bool
pure_ Bool
eager_
sem_SemDef ( TypeDef Pos
pos_ NontermIdent
ident_ Type
tp_ ) = Pos -> NontermIdent -> Type -> T_SemDef
sem_SemDef_TypeDef Pos
pos_ NontermIdent
ident_ Type
tp_
sem_SemDef ( UniqueDef NontermIdent
ident_ NontermIdent
ref_ ) = NontermIdent -> NontermIdent -> T_SemDef
sem_SemDef_UniqueDef NontermIdent
ident_ NontermIdent
ref_
sem_SemDef ( AugmentDef NontermIdent
ident_ Expression
rhs_ ) = NontermIdent -> Expression -> T_SemDef
sem_SemDef_AugmentDef NontermIdent
ident_ Expression
rhs_
sem_SemDef ( AroundDef NontermIdent
ident_ Expression
rhs_ ) = NontermIdent -> Expression -> T_SemDef
sem_SemDef_AroundDef NontermIdent
ident_ Expression
rhs_
sem_SemDef ( MergeDef NontermIdent
target_ NontermIdent
nt_ [NontermIdent]
sources_ Expression
rhs_ ) = NontermIdent
-> NontermIdent -> [NontermIdent] -> Expression -> T_SemDef
sem_SemDef_MergeDef NontermIdent
target_ NontermIdent
nt_ [NontermIdent]
sources_ Expression
rhs_
sem_SemDef ( SemPragma [NontermIdent]
names_ ) = [NontermIdent] -> T_SemDef
sem_SemDef_SemPragma [NontermIdent]
names_
sem_SemDef ( AttrOrderBefore [Occurrence]
before_ [Occurrence]
after_ ) = [Occurrence] -> [Occurrence] -> T_SemDef
sem_SemDef_AttrOrderBefore [Occurrence]
before_ [Occurrence]
after_

-- semantic domain
newtype T_SemDef  = T_SemDef {
                             T_SemDef -> Identity T_SemDef_s44
attach_T_SemDef :: Identity (T_SemDef_s44 )
                             }
newtype T_SemDef_s44  = C_SemDef_s44 {
                                     T_SemDef_s44 -> T_SemDef_v43
inv_SemDef_s44 :: (T_SemDef_v43 )
                                     }
data T_SemDef_s45  = C_SemDef_s45
type T_SemDef_v43  = (T_SemDef_vIn43 ) -> (T_SemDef_vOut43 )
data T_SemDef_vIn43  = T_SemDef_vIn43 (Options)
data T_SemDef_vOut43  = T_SemDef_vOut43 ([AroundInfo]) ([AugmentInfo]) ([Identifier]) (Seq Error) ([MergeInfo]) (Set Dependency) ([Identifier]) ([RuleInfo]) ([SigInfo]) ([UniqueInfo])
{-# NOINLINE sem_SemDef_Def #-}
sem_SemDef_Def :: (Pos) -> (Maybe Identifier) -> T_Pattern  -> (Expression) -> (Bool) -> (Bool) -> (Bool) -> T_SemDef 
sem_SemDef_Def :: Pos
-> Maybe NontermIdent
-> T_Pattern
-> Expression
-> Bool
-> Bool
-> Bool
-> T_SemDef
sem_SemDef_Def Pos
_ Maybe NontermIdent
arg_mbName_ T_Pattern
arg_pattern_ Expression
arg_rhs_ Bool
arg_owrt_ Bool
arg_pure_ Bool
arg_eager_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _patternX32 :: T_Pattern_s32
_patternX32 = Identity T_Pattern_s32 -> T_Pattern_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s32
attach_T_Pattern (T_Pattern
arg_pattern_))
         (T_Pattern_vOut31 Pattern
_patternIcopy [UniqueInfo]
_patternIdefinedAttrs [NontermIdent]
_patternIdefinedInsts [UniqueInfo] -> Pattern
_patternIpatunder Pos
_patternIstpos) = T_Pattern_s32 -> T_Pattern_v31
inv_Pattern_s32 T_Pattern_s32
_patternX32 (T_Pattern_vIn31
T_Pattern_vIn31 )
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Options -> Expression -> Seq Error
rule708 Options
_lhsIoptions Expression
arg_rhs_
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = [UniqueInfo]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> Bool
-> Maybe NontermIdent
-> Bool
-> Bool
-> Expression
-> [RuleInfo]
forall h a e g c.
[UniqueInfo]
-> ([UniqueInfo] -> Pattern)
-> Pos
-> h
-> a
-> e
-> g
-> c
-> [(a, [UniqueInfo] -> Pattern, c, [UniqueInfo], e, String, g, h)]
rule709 [UniqueInfo]
_patternIdefinedAttrs [UniqueInfo] -> Pattern
_patternIpatunder Pos
_patternIstpos Bool
arg_eager_ Maybe NontermIdent
arg_mbName_ Bool
arg_owrt_ Bool
arg_pure_ Expression
arg_rhs_
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule710  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule711  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule712 [NontermIdent]
_patternIdefinedInsts
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule713  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule714  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule715  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule716  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule717  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule708 #-}
   {-# LINE 556 "src-ag/Transform.ag" #-}
   rule708 = \ ((_lhsIoptions) :: Options) rhs_ ->
                 {-# LINE 556 "src-ag/Transform.ag" #-}
                 if checkParseRhs _lhsIoptions
                 then Seq.fromList $ checkRhs rhs_
                 else Seq.empty
                 {-# LINE 5603 "src-generated/Transform.hs" #-}
   {-# INLINE rule709 #-}
   {-# LINE 1162 "src-ag/Transform.ag" #-}
   rule709 = \ ((_patternIdefinedAttrs) :: [AttrName]) ((_patternIpatunder) :: [AttrName]->Pattern) ((_patternIstpos) :: Pos) eager_ mbName_ owrt_ pure_ rhs_ ->
                           {-# LINE 1162 "src-ag/Transform.ag" #-}
                           [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos, pure_, eager_) ]
                           {-# LINE 5609 "src-generated/Transform.hs" #-}
   {-# INLINE rule710 #-}
   rule710 = \  (_ :: ()) ->
     []
   {-# INLINE rule711 #-}
   rule711 = \  (_ :: ()) ->
     []
   {-# INLINE rule712 #-}
   rule712 = \ ((_patternIdefinedInsts) :: [Identifier]) ->
     _patternIdefinedInsts
   {-# INLINE rule713 #-}
   rule713 = \  (_ :: ()) ->
     []
   {-# INLINE rule714 #-}
   rule714 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule715 #-}
   rule715 = \  (_ :: ()) ->
     []
   {-# INLINE rule716 #-}
   rule716 = \  (_ :: ()) ->
     []
   {-# INLINE rule717 #-}
   rule717 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_TypeDef #-}
sem_SemDef_TypeDef :: (Pos) -> (Identifier) -> (Type) -> T_SemDef 
sem_SemDef_TypeDef :: Pos -> NontermIdent -> Type -> T_SemDef
sem_SemDef_TypeDef Pos
arg_pos_ NontermIdent
arg_ident_ Type
arg_tp_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Options -> Pos -> Type -> Seq Error
rule718 Options
_lhsIoptions Pos
arg_pos_ Type
arg_tp_
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = NontermIdent -> Type -> [(NontermIdent, Type)]
forall a b. a -> b -> [(a, b)]
rule719 NontermIdent
arg_ident_ Type
arg_tp_
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule720  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule721  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule722  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule723  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule724  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule725  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule726  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule727  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule718 #-}
   {-# LINE 563 "src-ag/Transform.ag" #-}
   rule718 = \ ((_lhsIoptions) :: Options) pos_ tp_ ->
                 {-# LINE 563 "src-ag/Transform.ag" #-}
                 if checkParseTy _lhsIoptions
                 then case tp_ of
                        Haskell s -> let ex  = Expression pos_ tks
                                         tks = [tk]
                                         tk  = HsToken s pos_
                                     in Seq.fromList $ checkTy ex
                        _ -> Seq.empty
                 else Seq.empty
                 {-# LINE 5676 "src-generated/Transform.hs" #-}
   {-# INLINE rule719 #-}
   {-# LINE 1165 "src-ag/Transform.ag" #-}
   rule719 = \ ident_ tp_ ->
                              {-# LINE 1165 "src-ag/Transform.ag" #-}
                              [ (ident_, tp_) ]
                              {-# LINE 5682 "src-generated/Transform.hs" #-}
   {-# INLINE rule720 #-}
   rule720 = \  (_ :: ()) ->
     []
   {-# INLINE rule721 #-}
   rule721 = \  (_ :: ()) ->
     []
   {-# INLINE rule722 #-}
   rule722 = \  (_ :: ()) ->
     []
   {-# INLINE rule723 #-}
   rule723 = \  (_ :: ()) ->
     []
   {-# INLINE rule724 #-}
   rule724 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule725 #-}
   rule725 = \  (_ :: ()) ->
     []
   {-# INLINE rule726 #-}
   rule726 = \  (_ :: ()) ->
     []
   {-# INLINE rule727 #-}
   rule727 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_UniqueDef #-}
sem_SemDef_UniqueDef :: (Identifier) -> (Identifier) -> T_SemDef 
sem_SemDef_UniqueDef :: NontermIdent -> NontermIdent -> T_SemDef
sem_SemDef_UniqueDef NontermIdent
arg_ident_ NontermIdent
arg_ref_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = NontermIdent -> NontermIdent -> [UniqueInfo]
forall a b. a -> b -> [(a, b)]
rule728 NontermIdent
arg_ident_ NontermIdent
arg_ref_
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule729  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule730  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule731  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule732  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule733  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule734  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule735  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule736  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule737  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule728 #-}
   {-# LINE 1168 "src-ag/Transform.ag" #-}
   rule728 = \ ident_ ref_ ->
                                   {-# LINE 1168 "src-ag/Transform.ag" #-}
                                   [ (ident_, ref_) ]
                                   {-# LINE 5742 "src-generated/Transform.hs" #-}
   {-# INLINE rule729 #-}
   rule729 = \  (_ :: ()) ->
     []
   {-# INLINE rule730 #-}
   rule730 = \  (_ :: ()) ->
     []
   {-# INLINE rule731 #-}
   rule731 = \  (_ :: ()) ->
     []
   {-# INLINE rule732 #-}
   rule732 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule733 #-}
   rule733 = \  (_ :: ()) ->
     []
   {-# INLINE rule734 #-}
   rule734 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule735 #-}
   rule735 = \  (_ :: ()) ->
     []
   {-# INLINE rule736 #-}
   rule736 = \  (_ :: ()) ->
     []
   {-# INLINE rule737 #-}
   rule737 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_AugmentDef #-}
sem_SemDef_AugmentDef :: (Identifier) -> (Expression) -> T_SemDef 
sem_SemDef_AugmentDef :: NontermIdent -> Expression -> T_SemDef
sem_SemDef_AugmentDef NontermIdent
arg_ident_ Expression
arg_rhs_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = NontermIdent -> Expression -> [AugmentInfo]
forall a b. a -> b -> [(a, b)]
rule738 NontermIdent
arg_ident_ Expression
arg_rhs_
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule739  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule740  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule741  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule742  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule743  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule744  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule745  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule746  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule747  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule738 #-}
   {-# LINE 1171 "src-ag/Transform.ag" #-}
   rule738 = \ ident_ rhs_ ->
                                     {-# LINE 1171 "src-ag/Transform.ag" #-}
                                     [ (ident_, rhs_) ]
                                     {-# LINE 5805 "src-generated/Transform.hs" #-}
   {-# INLINE rule739 #-}
   rule739 = \  (_ :: ()) ->
     []
   {-# INLINE rule740 #-}
   rule740 = \  (_ :: ()) ->
     []
   {-# INLINE rule741 #-}
   rule741 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule742 #-}
   rule742 = \  (_ :: ()) ->
     []
   {-# INLINE rule743 #-}
   rule743 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule744 #-}
   rule744 = \  (_ :: ()) ->
     []
   {-# INLINE rule745 #-}
   rule745 = \  (_ :: ()) ->
     []
   {-# INLINE rule746 #-}
   rule746 = \  (_ :: ()) ->
     []
   {-# INLINE rule747 #-}
   rule747 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_AroundDef #-}
sem_SemDef_AroundDef :: (Identifier) -> (Expression) -> T_SemDef 
sem_SemDef_AroundDef :: NontermIdent -> Expression -> T_SemDef
sem_SemDef_AroundDef NontermIdent
arg_ident_ Expression
arg_rhs_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = NontermIdent -> Expression -> [AugmentInfo]
forall a b. a -> b -> [(a, b)]
rule748 NontermIdent
arg_ident_ Expression
arg_rhs_
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule749  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule750  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule751  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule752  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule753  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule754  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule755  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule756  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule757  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule748 #-}
   {-# LINE 1174 "src-ag/Transform.ag" #-}
   rule748 = \ ident_ rhs_ ->
                                    {-# LINE 1174 "src-ag/Transform.ag" #-}
                                    [ (ident_, rhs_) ]
                                    {-# LINE 5868 "src-generated/Transform.hs" #-}
   {-# INLINE rule749 #-}
   rule749 = \  (_ :: ()) ->
     []
   {-# INLINE rule750 #-}
   rule750 = \  (_ :: ()) ->
     []
   {-# INLINE rule751 #-}
   rule751 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule752 #-}
   rule752 = \  (_ :: ()) ->
     []
   {-# INLINE rule753 #-}
   rule753 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule754 #-}
   rule754 = \  (_ :: ()) ->
     []
   {-# INLINE rule755 #-}
   rule755 = \  (_ :: ()) ->
     []
   {-# INLINE rule756 #-}
   rule756 = \  (_ :: ()) ->
     []
   {-# INLINE rule757 #-}
   rule757 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_MergeDef #-}
sem_SemDef_MergeDef :: (Identifier) -> (Identifier) -> ([Identifier]) -> (Expression) -> T_SemDef 
sem_SemDef_MergeDef :: NontermIdent
-> NontermIdent -> [NontermIdent] -> Expression -> T_SemDef
sem_SemDef_MergeDef NontermIdent
arg_target_ NontermIdent
arg_nt_ [NontermIdent]
arg_sources_ Expression
arg_rhs_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Options -> Expression -> Seq Error
rule758 Options
_lhsIoptions Expression
arg_rhs_
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = NontermIdent
-> Expression -> [NontermIdent] -> NontermIdent -> [MergeInfo]
forall b d c a. b -> d -> c -> a -> [(a, b, c, d)]
rule759 NontermIdent
arg_nt_ Expression
arg_rhs_ [NontermIdent]
arg_sources_ NontermIdent
arg_target_
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule760  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule761  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule762  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule763  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule764  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule765  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule766  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule767  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule758 #-}
   {-# LINE 556 "src-ag/Transform.ag" #-}
   rule758 = \ ((_lhsIoptions) :: Options) rhs_ ->
                 {-# LINE 556 "src-ag/Transform.ag" #-}
                 if checkParseRhs _lhsIoptions
                 then Seq.fromList $ checkRhs rhs_
                 else Seq.empty
                 {-# LINE 5933 "src-generated/Transform.hs" #-}
   {-# INLINE rule759 #-}
   {-# LINE 1177 "src-ag/Transform.ag" #-}
   rule759 = \ nt_ rhs_ sources_ target_ ->
                                   {-# LINE 1177 "src-ag/Transform.ag" #-}
                                   [ (target_, nt_, sources_, rhs_) ]
                                   {-# LINE 5939 "src-generated/Transform.hs" #-}
   {-# INLINE rule760 #-}
   rule760 = \  (_ :: ()) ->
     []
   {-# INLINE rule761 #-}
   rule761 = \  (_ :: ()) ->
     []
   {-# INLINE rule762 #-}
   rule762 = \  (_ :: ()) ->
     []
   {-# INLINE rule763 #-}
   rule763 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule764 #-}
   rule764 = \  (_ :: ()) ->
     []
   {-# INLINE rule765 #-}
   rule765 = \  (_ :: ()) ->
     []
   {-# INLINE rule766 #-}
   rule766 = \  (_ :: ()) ->
     []
   {-# INLINE rule767 #-}
   rule767 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_SemPragma #-}
sem_SemDef_SemPragma :: ([NontermIdent]) -> T_SemDef 
sem_SemDef_SemPragma :: [NontermIdent] -> T_SemDef
sem_SemDef_SemPragma [NontermIdent]
arg_names_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = [NontermIdent] -> [NontermIdent]
forall a. a -> a
rule768 [NontermIdent]
arg_names_
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule769  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule770  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule771  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule772  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule773  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule774  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule775  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule776  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule777  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule768 #-}
   {-# LINE 898 "src-ag/Transform.ag" #-}
   rule768 = \ names_ ->
                                 {-# LINE 898 "src-ag/Transform.ag" #-}
                                 names_
                                 {-# LINE 5999 "src-generated/Transform.hs" #-}
   {-# INLINE rule769 #-}
   rule769 = \  (_ :: ()) ->
     []
   {-# INLINE rule770 #-}
   rule770 = \  (_ :: ()) ->
     []
   {-# INLINE rule771 #-}
   rule771 = \  (_ :: ()) ->
     []
   {-# INLINE rule772 #-}
   rule772 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule773 #-}
   rule773 = \  (_ :: ()) ->
     []
   {-# INLINE rule774 #-}
   rule774 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule775 #-}
   rule775 = \  (_ :: ()) ->
     []
   {-# INLINE rule776 #-}
   rule776 = \  (_ :: ()) ->
     []
   {-# INLINE rule777 #-}
   rule777 = \  (_ :: ()) ->
     []
{-# NOINLINE sem_SemDef_AttrOrderBefore #-}
sem_SemDef_AttrOrderBefore :: ([Occurrence]) -> ([Occurrence]) -> T_SemDef 
sem_SemDef_AttrOrderBefore :: [Occurrence] -> [Occurrence] -> T_SemDef
sem_SemDef_AttrOrderBefore [Occurrence]
arg_before_ [Occurrence]
arg_after_ = Identity T_SemDef_s44 -> T_SemDef
T_SemDef (T_SemDef_s44 -> Identity T_SemDef_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDef_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_SemDef_s44
st44 = let
      v43 :: T_SemDef_v43 
      v43 :: T_SemDef_v43
v43 = \ (T_SemDef_vIn43 Options
_lhsIoptions) -> ( let
         _dependency :: [Dependency]
_dependency = [Occurrence] -> [Occurrence] -> [Dependency]
rule778 [Occurrence]
arg_after_ [Occurrence]
arg_before_
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = [Dependency] -> Set Dependency
rule779 [Dependency]
_dependency
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule780  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule781  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule782  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule783  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule784  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule785  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule786  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule787  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule788  ()
         __result_ :: T_SemDef_vOut43
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDef_vOut43
T_SemDef_vOut43 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDef_vOut43
__result_ )
     in T_SemDef_v43 -> T_SemDef_s44
C_SemDef_s44 T_SemDef_v43
v43
   {-# INLINE rule778 #-}
   {-# LINE 929 "src-ag/Transform.ag" #-}
   rule778 = \ after_ before_ ->
                               {-# LINE 929 "src-ag/Transform.ag" #-}
                               [ Dependency b a | b <- before_, a <- after_ ]
                               {-# LINE 6063 "src-generated/Transform.hs" #-}
   {-# INLINE rule779 #-}
   {-# LINE 930 "src-ag/Transform.ag" #-}
   rule779 = \ _dependency ->
                               {-# LINE 930 "src-ag/Transform.ag" #-}
                               Set.fromList _dependency
                               {-# LINE 6069 "src-generated/Transform.hs" #-}
   {-# INLINE rule780 #-}
   rule780 = \  (_ :: ()) ->
     []
   {-# INLINE rule781 #-}
   rule781 = \  (_ :: ()) ->
     []
   {-# INLINE rule782 #-}
   rule782 = \  (_ :: ()) ->
     []
   {-# INLINE rule783 #-}
   rule783 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule784 #-}
   rule784 = \  (_ :: ()) ->
     []
   {-# INLINE rule785 #-}
   rule785 = \  (_ :: ()) ->
     []
   {-# INLINE rule786 #-}
   rule786 = \  (_ :: ()) ->
     []
   {-# INLINE rule787 #-}
   rule787 = \  (_ :: ()) ->
     []
   {-# INLINE rule788 #-}
   rule788 = \  (_ :: ()) ->
     []

-- SemDefs -----------------------------------------------------
-- wrapper
data Inh_SemDefs  = Inh_SemDefs { Inh_SemDefs -> Options
options_Inh_SemDefs :: (Options) }
data Syn_SemDefs  = Syn_SemDefs { Syn_SemDefs -> [AugmentInfo]
aroundInfos_Syn_SemDefs :: ([AroundInfo]), Syn_SemDefs -> [AugmentInfo]
augmentInfos_Syn_SemDefs :: ([AugmentInfo]), Syn_SemDefs -> [NontermIdent]
definedInsts_Syn_SemDefs :: ([Identifier]), Syn_SemDefs -> Seq Error
errors_Syn_SemDefs :: (Seq Error), Syn_SemDefs -> [MergeInfo]
mergeInfos_Syn_SemDefs :: ([MergeInfo]), Syn_SemDefs -> Set Dependency
orderDepsCollect_Syn_SemDefs :: (Set Dependency), Syn_SemDefs -> [NontermIdent]
pragmaNamesCollect_Syn_SemDefs :: ([Identifier]), Syn_SemDefs -> [RuleInfo]
ruleInfos_Syn_SemDefs :: ([RuleInfo]), Syn_SemDefs -> [(NontermIdent, Type)]
sigInfos_Syn_SemDefs :: ([SigInfo]), Syn_SemDefs -> [UniqueInfo]
uniqueInfos_Syn_SemDefs :: ([UniqueInfo]) }
{-# INLINABLE wrap_SemDefs #-}
wrap_SemDefs :: T_SemDefs  -> Inh_SemDefs  -> (Syn_SemDefs )
wrap_SemDefs :: T_SemDefs -> Inh_SemDefs -> Syn_SemDefs
wrap_SemDefs (T_SemDefs Identity T_SemDefs_s47
act) (Inh_SemDefs Options
_lhsIoptions) =
   Identity Syn_SemDefs -> Syn_SemDefs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_SemDefs_s47
sem <- Identity T_SemDefs_s47
act
        let arg46 :: T_SemDefs_vIn46
arg46 = Options -> T_SemDefs_vIn46
T_SemDefs_vIn46 Options
_lhsIoptions
        (T_SemDefs_vOut46 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos) <- T_SemDefs_vOut46 -> Identity T_SemDefs_vOut46
forall (m :: * -> *) a. Monad m => a -> m a
return (T_SemDefs_s47 -> T_SemDefs_v46
inv_SemDefs_s47 T_SemDefs_s47
sem T_SemDefs_vIn46
arg46)
        Syn_SemDefs -> Identity Syn_SemDefs
forall (m :: * -> *) a. Monad m => a -> m a
return ([AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> Syn_SemDefs
Syn_SemDefs [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos)
   )

-- cata
{-# NOINLINE sem_SemDefs #-}
sem_SemDefs :: SemDefs  -> T_SemDefs 
sem_SemDefs :: SemDefs -> T_SemDefs
sem_SemDefs SemDefs
list = (T_SemDef -> T_SemDefs -> T_SemDefs)
-> T_SemDefs -> [T_SemDef] -> T_SemDefs
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_SemDef -> T_SemDefs -> T_SemDefs
sem_SemDefs_Cons T_SemDefs
sem_SemDefs_Nil ((SemDef -> T_SemDef) -> SemDefs -> [T_SemDef]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map SemDef -> T_SemDef
sem_SemDef SemDefs
list)

-- semantic domain
newtype T_SemDefs  = T_SemDefs {
                               T_SemDefs -> Identity T_SemDefs_s47
attach_T_SemDefs :: Identity (T_SemDefs_s47 )
                               }
newtype T_SemDefs_s47  = C_SemDefs_s47 {
                                       T_SemDefs_s47 -> T_SemDefs_v46
inv_SemDefs_s47 :: (T_SemDefs_v46 )
                                       }
data T_SemDefs_s48  = C_SemDefs_s48
type T_SemDefs_v46  = (T_SemDefs_vIn46 ) -> (T_SemDefs_vOut46 )
data T_SemDefs_vIn46  = T_SemDefs_vIn46 (Options)
data T_SemDefs_vOut46  = T_SemDefs_vOut46 ([AroundInfo]) ([AugmentInfo]) ([Identifier]) (Seq Error) ([MergeInfo]) (Set Dependency) ([Identifier]) ([RuleInfo]) ([SigInfo]) ([UniqueInfo])
{-# NOINLINE sem_SemDefs_Cons #-}
sem_SemDefs_Cons :: T_SemDef  -> T_SemDefs  -> T_SemDefs 
sem_SemDefs_Cons :: T_SemDef -> T_SemDefs -> T_SemDefs
sem_SemDefs_Cons T_SemDef
arg_hd_ T_SemDefs
arg_tl_ = Identity T_SemDefs_s47 -> T_SemDefs
T_SemDefs (T_SemDefs_s47 -> Identity T_SemDefs_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDefs_s47
st47) where
   {-# NOINLINE st47 #-}
   st47 :: T_SemDefs_s47
st47 = let
      v46 :: T_SemDefs_v46 
      v46 :: T_SemDefs_v46
v46 = \ (T_SemDefs_vIn46 Options
_lhsIoptions) -> ( let
         _hdX44 :: T_SemDef_s44
_hdX44 = Identity T_SemDef_s44 -> T_SemDef_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_SemDef -> Identity T_SemDef_s44
attach_T_SemDef (T_SemDef
arg_hd_))
         _tlX47 :: T_SemDefs_s47
_tlX47 = Identity T_SemDefs_s47 -> T_SemDefs_s47
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_SemDefs -> Identity T_SemDefs_s47
attach_T_SemDefs (T_SemDefs
arg_tl_))
         (T_SemDef_vOut43 [AugmentInfo]
_hdIaroundInfos [AugmentInfo]
_hdIaugmentInfos [NontermIdent]
_hdIdefinedInsts Seq Error
_hdIerrors [MergeInfo]
_hdImergeInfos Set Dependency
_hdIorderDepsCollect [NontermIdent]
_hdIpragmaNamesCollect [RuleInfo]
_hdIruleInfos [(NontermIdent, Type)]
_hdIsigInfos [UniqueInfo]
_hdIuniqueInfos) = T_SemDef_s44 -> T_SemDef_v43
inv_SemDef_s44 T_SemDef_s44
_hdX44 (Options -> T_SemDef_vIn43
T_SemDef_vIn43 Options
_hdOoptions)
         (T_SemDefs_vOut46 [AugmentInfo]
_tlIaroundInfos [AugmentInfo]
_tlIaugmentInfos [NontermIdent]
_tlIdefinedInsts Seq Error
_tlIerrors [MergeInfo]
_tlImergeInfos Set Dependency
_tlIorderDepsCollect [NontermIdent]
_tlIpragmaNamesCollect [RuleInfo]
_tlIruleInfos [(NontermIdent, Type)]
_tlIsigInfos [UniqueInfo]
_tlIuniqueInfos) = T_SemDefs_s47 -> T_SemDefs_v46
inv_SemDefs_s47 T_SemDefs_s47
_tlX47 (Options -> T_SemDefs_vIn46
T_SemDefs_vIn46 Options
_tlOoptions)
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = [AugmentInfo] -> [AugmentInfo] -> [AugmentInfo]
rule789 [AugmentInfo]
_hdIaroundInfos [AugmentInfo]
_tlIaroundInfos
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = [AugmentInfo] -> [AugmentInfo] -> [AugmentInfo]
rule790 [AugmentInfo]
_hdIaugmentInfos [AugmentInfo]
_tlIaugmentInfos
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule791 [NontermIdent]
_hdIdefinedInsts [NontermIdent]
_tlIdefinedInsts
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule792 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = [MergeInfo] -> [MergeInfo] -> [MergeInfo]
rule793 [MergeInfo]
_hdImergeInfos [MergeInfo]
_tlImergeInfos
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = Set Dependency -> Set Dependency -> Set Dependency
rule794 Set Dependency
_hdIorderDepsCollect Set Dependency
_tlIorderDepsCollect
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule795 [NontermIdent]
_hdIpragmaNamesCollect [NontermIdent]
_tlIpragmaNamesCollect
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = [RuleInfo] -> [RuleInfo] -> [RuleInfo]
rule796 [RuleInfo]
_hdIruleInfos [RuleInfo]
_tlIruleInfos
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = [(NontermIdent, Type)]
-> [(NontermIdent, Type)] -> [(NontermIdent, Type)]
rule797 [(NontermIdent, Type)]
_hdIsigInfos [(NontermIdent, Type)]
_tlIsigInfos
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = [UniqueInfo] -> [UniqueInfo] -> [UniqueInfo]
rule798 [UniqueInfo]
_hdIuniqueInfos [UniqueInfo]
_tlIuniqueInfos
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule799 Options
_lhsIoptions
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule800 Options
_lhsIoptions
         __result_ :: T_SemDefs_vOut46
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDefs_vOut46
T_SemDefs_vOut46 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDefs_vOut46
__result_ )
     in T_SemDefs_v46 -> T_SemDefs_s47
C_SemDefs_s47 T_SemDefs_v46
v46
   {-# INLINE rule789 #-}
   rule789 :: [AugmentInfo] -> [AugmentInfo] -> [AugmentInfo]
rule789 = \ (([AugmentInfo]
_hdIaroundInfos) :: [AroundInfo]) (([AugmentInfo]
_tlIaroundInfos) :: [AroundInfo]) ->
     [AugmentInfo]
_hdIaroundInfos [AugmentInfo] -> [AugmentInfo] -> [AugmentInfo]
forall a. [a] -> [a] -> [a]
++ [AugmentInfo]
_tlIaroundInfos
   {-# INLINE rule790 #-}
   rule790 :: [AugmentInfo] -> [AugmentInfo] -> [AugmentInfo]
rule790 = \ (([AugmentInfo]
_hdIaugmentInfos) :: [AugmentInfo]) (([AugmentInfo]
_tlIaugmentInfos) :: [AugmentInfo]) ->
     [AugmentInfo]
_hdIaugmentInfos [AugmentInfo] -> [AugmentInfo] -> [AugmentInfo]
forall a. [a] -> [a] -> [a]
++ [AugmentInfo]
_tlIaugmentInfos
   {-# INLINE rule791 #-}
   rule791 :: [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule791 = \ (([NontermIdent]
_hdIdefinedInsts) :: [Identifier]) (([NontermIdent]
_tlIdefinedInsts) :: [Identifier]) ->
     [NontermIdent]
_hdIdefinedInsts [NontermIdent] -> [NontermIdent] -> [NontermIdent]
forall a. [a] -> [a] -> [a]
++ [NontermIdent]
_tlIdefinedInsts
   {-# INLINE rule792 #-}
   rule792 :: Seq Error -> Seq Error -> Seq Error
rule792 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule793 #-}
   rule793 :: [MergeInfo] -> [MergeInfo] -> [MergeInfo]
rule793 = \ (([MergeInfo]
_hdImergeInfos) :: [MergeInfo]) (([MergeInfo]
_tlImergeInfos) :: [MergeInfo]) ->
     [MergeInfo]
_hdImergeInfos [MergeInfo] -> [MergeInfo] -> [MergeInfo]
forall a. [a] -> [a] -> [a]
++ [MergeInfo]
_tlImergeInfos
   {-# INLINE rule794 #-}
   rule794 :: Set Dependency -> Set Dependency -> Set Dependency
rule794 = \ ((Set Dependency
_hdIorderDepsCollect) :: Set Dependency) ((Set Dependency
_tlIorderDepsCollect) :: Set Dependency) ->
     Set Dependency
_hdIorderDepsCollect Set Dependency -> Set Dependency -> Set Dependency
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set Dependency
_tlIorderDepsCollect
   {-# INLINE rule795 #-}
   rule795 :: [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule795 = \ (([NontermIdent]
_hdIpragmaNamesCollect) :: [Identifier]) (([NontermIdent]
_tlIpragmaNamesCollect) :: [Identifier]) ->
     [NontermIdent]
_hdIpragmaNamesCollect [NontermIdent] -> [NontermIdent] -> [NontermIdent]
forall a. [a] -> [a] -> [a]
++ [NontermIdent]
_tlIpragmaNamesCollect
   {-# INLINE rule796 #-}
   rule796 :: [RuleInfo] -> [RuleInfo] -> [RuleInfo]
rule796 = \ (([RuleInfo]
_hdIruleInfos) :: [RuleInfo]) (([RuleInfo]
_tlIruleInfos) :: [RuleInfo]) ->
     [RuleInfo]
_hdIruleInfos [RuleInfo] -> [RuleInfo] -> [RuleInfo]
forall a. [a] -> [a] -> [a]
++ [RuleInfo]
_tlIruleInfos
   {-# INLINE rule797 #-}
   rule797 :: [(NontermIdent, Type)]
-> [(NontermIdent, Type)] -> [(NontermIdent, Type)]
rule797 = \ (([(NontermIdent, Type)]
_hdIsigInfos) :: [SigInfo]) (([(NontermIdent, Type)]
_tlIsigInfos) :: [SigInfo]) ->
     [(NontermIdent, Type)]
_hdIsigInfos [(NontermIdent, Type)]
-> [(NontermIdent, Type)] -> [(NontermIdent, Type)]
forall a. [a] -> [a] -> [a]
++ [(NontermIdent, Type)]
_tlIsigInfos
   {-# INLINE rule798 #-}
   rule798 :: [UniqueInfo] -> [UniqueInfo] -> [UniqueInfo]
rule798 = \ (([UniqueInfo]
_hdIuniqueInfos) :: [UniqueInfo]) (([UniqueInfo]
_tlIuniqueInfos) :: [UniqueInfo]) ->
     [UniqueInfo]
_hdIuniqueInfos [UniqueInfo] -> [UniqueInfo] -> [UniqueInfo]
forall a. [a] -> [a] -> [a]
++ [UniqueInfo]
_tlIuniqueInfos
   {-# INLINE rule799 #-}
   rule799 :: Options -> Options
rule799 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule800 #-}
   rule800 :: Options -> Options
rule800 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
{-# NOINLINE sem_SemDefs_Nil #-}
sem_SemDefs_Nil ::  T_SemDefs 
sem_SemDefs_Nil :: T_SemDefs
sem_SemDefs_Nil  = Identity T_SemDefs_s47 -> T_SemDefs
T_SemDefs (T_SemDefs_s47 -> Identity T_SemDefs_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_SemDefs_s47
st47) where
   {-# NOINLINE st47 #-}
   st47 :: T_SemDefs_s47
st47 = let
      v46 :: T_SemDefs_v46 
      v46 :: T_SemDefs_v46
v46 = \ (T_SemDefs_vIn46 Options
_lhsIoptions) -> ( let
         _lhsOaroundInfos :: [AroundInfo]
         _lhsOaroundInfos :: [AugmentInfo]
_lhsOaroundInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule801  ()
         _lhsOaugmentInfos :: [AugmentInfo]
         _lhsOaugmentInfos :: [AugmentInfo]
_lhsOaugmentInfos = () -> [AugmentInfo]
forall a. () -> [a]
rule802  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = () -> [NontermIdent]
forall a. () -> [a]
rule803  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule804  ()
         _lhsOmergeInfos :: [MergeInfo]
         _lhsOmergeInfos :: [MergeInfo]
_lhsOmergeInfos = () -> [MergeInfo]
forall a. () -> [a]
rule805  ()
         _lhsOorderDepsCollect :: Set Dependency
         _lhsOorderDepsCollect :: Set Dependency
_lhsOorderDepsCollect = () -> Set Dependency
forall a. () -> Set a
rule806  ()
         _lhsOpragmaNamesCollect :: [Identifier]
         _lhsOpragmaNamesCollect :: [NontermIdent]
_lhsOpragmaNamesCollect = () -> [NontermIdent]
forall a. () -> [a]
rule807  ()
         _lhsOruleInfos :: [RuleInfo]
         _lhsOruleInfos :: [RuleInfo]
_lhsOruleInfos = () -> [RuleInfo]
forall a. () -> [a]
rule808  ()
         _lhsOsigInfos :: [SigInfo]
         _lhsOsigInfos :: [(NontermIdent, Type)]
_lhsOsigInfos = () -> [(NontermIdent, Type)]
forall a. () -> [a]
rule809  ()
         _lhsOuniqueInfos :: [UniqueInfo]
         _lhsOuniqueInfos :: [UniqueInfo]
_lhsOuniqueInfos = () -> [UniqueInfo]
forall a. () -> [a]
rule810  ()
         __result_ :: T_SemDefs_vOut46
__result_ = [AugmentInfo]
-> [AugmentInfo]
-> [NontermIdent]
-> Seq Error
-> [MergeInfo]
-> Set Dependency
-> [NontermIdent]
-> [RuleInfo]
-> [(NontermIdent, Type)]
-> [UniqueInfo]
-> T_SemDefs_vOut46
T_SemDefs_vOut46 [AugmentInfo]
_lhsOaroundInfos [AugmentInfo]
_lhsOaugmentInfos [NontermIdent]
_lhsOdefinedInsts Seq Error
_lhsOerrors [MergeInfo]
_lhsOmergeInfos Set Dependency
_lhsOorderDepsCollect [NontermIdent]
_lhsOpragmaNamesCollect [RuleInfo]
_lhsOruleInfos [(NontermIdent, Type)]
_lhsOsigInfos [UniqueInfo]
_lhsOuniqueInfos
         in T_SemDefs_vOut46
__result_ )
     in T_SemDefs_v46 -> T_SemDefs_s47
C_SemDefs_s47 T_SemDefs_v46
v46
   {-# INLINE rule801 #-}
   rule801 :: () -> [a]
rule801 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule802 #-}
   rule802 :: () -> [a]
rule802 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule803 #-}
   rule803 :: () -> [a]
rule803 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule804 #-}
   rule804 :: () -> Seq a
rule804 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule805 #-}
   rule805 :: () -> [a]
rule805 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule806 #-}
   rule806 :: () -> Set a
rule806 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule807 #-}
   rule807 :: () -> [a]
rule807 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule808 #-}
   rule808 :: () -> [a]
rule808 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule809 #-}
   rule809 :: () -> [a]
rule809 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule810 #-}
   rule810 :: () -> [a]
rule810 = \  (()
_ :: ()) ->
     []