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

module GenerateCode where
{-# LINE 2 "src-ag/DeclBlocks.ag" #-}

import Code (Decl,Expr)
{-# LINE 9 "src-generated/GenerateCode.hs" #-}

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

-- Patterns.ag imports
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 16 "src-generated/GenerateCode.hs" #-}

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

import Patterns
import CommonTypes
import Data.Map(Map)
import Data.Set(Set)
{-# LINE 24 "src-generated/GenerateCode.hs" #-}

{-# LINE 9 "src-ag/GenerateCode.ag" #-}

import CommonTypes
import SequentialTypes
import Code hiding (Type)
import qualified Code
import Options
import CodeSyntax
import ErrorMessages
import GrammarInfo
import DeclBlocks

import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.Set as Set
import Data.Set(Set)
import qualified Data.Sequence as Seq
import Data.Sequence(Seq)
import UU.Scanner.Position
import TokenDef
import HsToken
import HsTokenScanner

import Data.List(partition,intersperse)
import Data.Maybe(fromJust,isJust)

{-# LINE 52 "src-generated/GenerateCode.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 107 "src-ag/GenerateCode.ag" #-}

-- remove possible @v references in the types of a data type.
cleanupArg :: Options -> String -> String
cleanupArg opts s
  = case idEvalType opts (SimpleType s) of
      SimpleType s' -> s'
      _             -> error "Only SimpleType supported"
{-# LINE 63 "src-generated/GenerateCode.hs" #-}

{-# LINE 123 "src-ag/GenerateCode.ag" #-}

appContext :: ContextMap -> NontermIdent -> Code.Type -> Code.Type
appContext mp nt tp
  = maybe tp (\ctx -> CtxApp (map (\(n,ns) -> (getName n, ns)) ctx) tp) $ Map.lookup nt mp

appQuant :: QuantMap -> NontermIdent -> Code.Type -> Code.Type
appQuant mp nt tp
  = foldr QuantApp tp $ Map.findWithDefault [] nt mp
{-# LINE 74 "src-generated/GenerateCode.hs" #-}

{-# LINE 249 "src-ag/GenerateCode.ag" #-}

mkDecl :: Bool -> Lhs -> Expr -> Set String -> Set String -> Decl
mkDecl True  lhs rhs _ _   = Bind lhs rhs
mkDecl False lhs rhs s1 s2 = Decl lhs rhs s1 s2

unwrapSem :: Bool -> NontermIdent -> Expr -> Expr
unwrapSem False _ e = e
unwrapSem True nm e = Case e alts
  where alts  = [CaseAlt left right]
        left  = Fun (typeName nm 0) [SimpleExpr "x"]
        right = SimpleExpr "x"
{-# LINE 88 "src-generated/GenerateCode.hs" #-}

{-# LINE 545 "src-ag/GenerateCode.ag" #-}

mkLambdaArg :: String -> Maybe Code.Type -> Expr
mkLambdaArg nm Nothing = SimpleExpr nm
mkLambdaArg nm (Just tp) = TypedExpr (SimpleExpr nm) tp

mkLambda :: Exprs -> Expr -> Expr
mkLambda [] e = e
mkLambda xs e = Lambda xs e

mkSemFun :: Identifier -> Int -> Exprs -> Expr -> Expr
mkSemFun nt nr xs e = SemFun (typeName nt nr) xs e

typeAppStrs :: String -> [String] -> Code.Type
typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)

isHigherOrder :: ChildKind -> Bool
isHigherOrder ChildAttr = True
isHigherOrder _         = False

pickOrigType :: (Identifier, Type, ChildKind) -> (Identifier, Type, ChildKind)
pickOrigType (nm, _, virt@(ChildReplace x)) = (nm, x, virt)
pickOrigType x = x
{-# LINE 113 "src-generated/GenerateCode.hs" #-}

{-# LINE 642 "src-ag/GenerateCode.ag" #-}

mkPartitionedFunction :: String -> Bool -> [Decl] -> [String] -> DeclBlocks -> ([Decl], Expr)
mkPartitionedFunction prefix' optCase nextVisitDecls lastExprVars cpsTree
  = let inh = Inh_DeclBlocksRoot { prefix_Inh_DeclBlocksRoot = prefix'
                                 , optCase_Inh_DeclBlocksRoot = optCase
                                 , nextVisitDecls_Inh_DeclBlocksRoot = nextVisitDecls
                                 , lastExprVars_Inh_DeclBlocksRoot = lastExprVars
                                 }
        sem = sem_DeclBlocksRoot (DeclBlocksRoot cpsTree)
        syn = wrap_DeclBlocksRoot sem inh
    in (lambdas_Syn_DeclBlocksRoot syn, firstCall_Syn_DeclBlocksRoot syn)
{-# LINE 127 "src-generated/GenerateCode.hs" #-}

{-# LINE 692 "src-ag/GenerateCode.ag" #-}

freevars :: [String] -> [Decl] -> [String]
freevars additional decls
  = Set.toList (allused `Set.difference` alldefined)
  where
    allused = Set.unions (Set.fromList additional : map usedvars decls)
    alldefined = Set.unions (map definedvars decls)

    usedvars (Decl _ _ _ uses) = uses
    usedvars _                 = Set.empty

    definedvars (Decl _ _ defs _) = defs
    definedvars _                 = Set.empty

mkBlockLambda :: Bool -> String -> [String] -> [Decl] -> Expr -> Decl
mkBlockLambda optCase name args decls expr
  = Decl lhs rhs Set.empty Set.empty
  where
    lhs = Fun name (map SimpleExpr args)
    rhs = mkLet optCase decls expr
{-# LINE 150 "src-generated/GenerateCode.hs" #-}

{-# LINE 770 "src-ag/GenerateCode.ag" #-}

typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type
typeToCodeType _ _ tp
  = case tp of
      NT nt tps defor -> NontermType (getName nt) tps defor
      Haskell t       -> SimpleType t
      Self            -> error "Self type not allowed here."

evalType :: Options -> (String -> String) -> Code.Type -> Code.Type
evalType opts replf t'
  = chase t'
  where
    chase t
      = case t of
          Arr l r              -> Arr (chase l) (chase r)
          TypeApp f as         -> TypeApp (chase f) (map chase as)
          TupleType tps        -> TupleType (map chase tps)
          UnboxedTupleType tps -> UnboxedTupleType (map chase tps)
          Code.List tp         -> Code.List (chase tp)
          SimpleType txt       -> let tks  = lexTokens opts (initPos txt) txt
                                      tks' = map replaceTok tks
                                      txt' = unlines . showTokens . tokensToStrings $ tks'
                                  in SimpleType txt'
          TMaybe m             -> TMaybe (chase m)
          TEither l r          -> TEither (chase l) (chase r)
          TMap k v             -> TMap (chase k) (chase v)
          TIntMap v            -> TIntMap (chase v)
          TSet m               -> TSet (chase m)
          _                    -> t

    replaceTok t
      = case t of
          AGLocal v p _ -> HsToken (replf $ getName v) p
          _             -> t

idEvalType :: Options -> Code.Type -> Code.Type
idEvalType options = evalType options id
{-# LINE 190 "src-generated/GenerateCode.hs" #-}

{-# LINE 896 "src-ag/GenerateCode.ag" #-}

-- for a virtual child that already existed as a child, returns
isFirstOrder :: ChildKind -> Type -> Maybe Type
isFirstOrder ChildSyntax       tp = Just tp
isFirstOrder ChildAttr         _  = Nothing
isFirstOrder (ChildReplace tp) _  = Just tp
{-# LINE 199 "src-generated/GenerateCode.hs" #-}

{-# LINE 917 "src-ag/GenerateCode.ag" #-}

makeLocalComment :: Int -> String -> Identifier -> Maybe Type -> String
makeLocalComment width what  name tp = let  x = getName name
                                            y = maybe "_" (\t -> case t of
                                                                   (NT nt tps _) -> getName nt ++ " " ++ unwords tps
                                                                   Haskell t' -> '{' : t' ++ "}"
                                                                   Self -> error "Self type not allowed here.") tp
                                       in   ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )

{-# LINE 211 "src-generated/GenerateCode.hs" #-}

{-# LINE 951 "src-ag/GenerateCode.ag" #-}

-- Lets or nested Cases?
-- or even a do-expression?

data DeclsType = DeclsLet | DeclsCase | DeclsDo

mkDecls :: DeclsType -> Decls -> Expr -> Expr
mkDecls DeclsLet  = mkLet False
mkDecls DeclsCase = mkLet True
mkDecls DeclsDo   = \decls -> Do (map toBind decls)
  where toBind (Decl lhs rhs _ _) = BindLet lhs rhs
        toBind d                  = d

mkLet :: Bool -> Decls -> Expr -> Expr
mkLet False decls body = Let decls body
mkLet True decls body = foldr oneCase body decls

oneCase :: Decl -> Expr -> Expr
oneCase (Decl left rhs _ _)      ex = Case rhs [CaseAlt left ex]
oneCase (Resume _ nt left rhs)   ex = ResumeExpr nt rhs left ex
oneCase _                        ex = ex

-- Gives the name of the visit function
funname :: Show a => a -> Int -> String
funname field 0  = show field ++ "_"
funname field nr = show field ++ "_" ++ show nr

-- Gives the name of a semantic function
seqSemname :: String -> NontermIdent -> ConstructorIdent -> Int -> String
seqSemname pre nt con  0 = semname pre nt con
seqSemname pre nt con nr = semname pre nt con ++ "_" ++ show nr

-- Gives the name of a type
typeName :: NontermIdent -> Int -> String
typeName nt 0 = "T_" ++ show nt
typeName nt n = "T_" ++ show nt ++ "_" ++ show n

ntOfVisit :: NontermIdent -> Int -> NontermIdent
ntOfVisit nt 0 = nt
ntOfVisit nt n = Ident (show nt ++ "_" ++ show n) (getPos nt)

-- Gives the name of a visit function
visitname  ::  String -> NontermIdent -> Int -> String
visitname pre nt n =  pre ++ getName nt ++ "_" ++ show n
{-# LINE 258 "src-generated/GenerateCode.hs" #-}

{-# LINE 1042 "src-ag/GenerateCode.ag" #-}

toNamedType :: Bool -> NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> Code.NamedType
toNamedType genStrict nt con nm tp
  = Code.Named genStrict strNm tp
  where strNm = recordFieldname nt con nm
{-# LINE 266 "src-generated/GenerateCode.hs" #-}
-- CGrammar ----------------------------------------------------
-- wrapper
data Inh_CGrammar  = Inh_CGrammar { Inh_CGrammar -> Options
options_Inh_CGrammar :: (Options) }
data Syn_CGrammar  = Syn_CGrammar { Syn_CGrammar -> Seq Error
errors_Syn_CGrammar :: (Seq Error), Syn_CGrammar -> Program
output_Syn_CGrammar :: (Program) }
{-# INLINABLE wrap_CGrammar #-}
wrap_CGrammar :: T_CGrammar  -> Inh_CGrammar  -> (Syn_CGrammar )
wrap_CGrammar :: T_CGrammar -> Inh_CGrammar -> Syn_CGrammar
wrap_CGrammar (T_CGrammar Identity T_CGrammar_s2
act) (Inh_CGrammar Options
_lhsIoptions) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CGrammar_s2
sem <- Identity T_CGrammar_s2
act
        let arg1 :: T_CGrammar_vIn1
arg1 = Options -> T_CGrammar_vIn1
T_CGrammar_vIn1 Options
_lhsIoptions
        (T_CGrammar_vOut1 Seq Error
_lhsOerrors Program
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CGrammar_s2 -> T_CGrammar_v1
inv_CGrammar_s2 T_CGrammar_s2
sem T_CGrammar_vIn1
arg1)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> Program -> Syn_CGrammar
Syn_CGrammar Seq Error
_lhsOerrors Program
_lhsOoutput)
   )

-- cata
{-# INLINE sem_CGrammar #-}
sem_CGrammar :: CGrammar  -> T_CGrammar 
sem_CGrammar :: CGrammar -> T_CGrammar
sem_CGrammar ( CGrammar TypeSyns
typeSyns_ Map NontermIdent (Set NontermIdent)
derivings_ Set NontermIdent
wrappers_ CNonterminals
nonts_ PragmaMap
pragmas_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ PragmaMap
aroundsMap_ Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
mergeMap_ Bool
multivisit_ ) = TypeSyns
-> Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> T_CNonterminals
-> PragmaMap
-> ParamMap
-> ContextMap
-> QuantMap
-> PragmaMap
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> T_CGrammar
sem_CGrammar_CGrammar TypeSyns
typeSyns_ Map NontermIdent (Set NontermIdent)
derivings_ Set NontermIdent
wrappers_ ( CNonterminals -> T_CNonterminals
sem_CNonterminals CNonterminals
nonts_ ) PragmaMap
pragmas_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ PragmaMap
aroundsMap_ Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
mergeMap_ Bool
multivisit_

-- semantic domain
newtype T_CGrammar  = T_CGrammar {
                                 T_CGrammar -> Identity T_CGrammar_s2
attach_T_CGrammar :: Identity (T_CGrammar_s2 )
                                 }
newtype T_CGrammar_s2  = C_CGrammar_s2 {
                                       T_CGrammar_s2 -> T_CGrammar_v1
inv_CGrammar_s2 :: (T_CGrammar_v1 )
                                       }
data T_CGrammar_s3  = C_CGrammar_s3
type T_CGrammar_v1  = (T_CGrammar_vIn1 ) -> (T_CGrammar_vOut1 )
data T_CGrammar_vIn1  = T_CGrammar_vIn1 (Options)
data T_CGrammar_vOut1  = T_CGrammar_vOut1 (Seq Error) (Program)
{-# NOINLINE sem_CGrammar_CGrammar #-}
sem_CGrammar_CGrammar :: (TypeSyns) -> (Derivings) -> (Set NontermIdent) -> T_CNonterminals  -> (PragmaMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (Map NontermIdent (Map ConstructorIdent (Set Identifier))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) -> (Bool) -> T_CGrammar 
sem_CGrammar_CGrammar :: TypeSyns
-> Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> T_CNonterminals
-> PragmaMap
-> ParamMap
-> ContextMap
-> QuantMap
-> PragmaMap
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> T_CGrammar
sem_CGrammar_CGrammar TypeSyns
arg_typeSyns_ Map NontermIdent (Set NontermIdent)
arg_derivings_ Set NontermIdent
arg_wrappers_ T_CNonterminals
arg_nonts_ PragmaMap
arg_pragmas_ ParamMap
arg_paramMap_ ContextMap
arg_contextMap_ QuantMap
arg_quantMap_ PragmaMap
arg_aroundsMap_ Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
arg_mergeMap_ Bool
arg_multivisit_ = Identity T_CGrammar_s2 -> T_CGrammar
T_CGrammar (forall (m :: * -> *) a. Monad m => a -> m a
return T_CGrammar_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_CGrammar_s2
st2 = let
      v1 :: T_CGrammar_v1 
      v1 :: T_CGrammar_v1
v1 = \ (T_CGrammar_vIn1 Options
_lhsIoptions) -> ( let
         _nontsX11 :: T_CNonterminals_s11
_nontsX11 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CNonterminals -> Identity T_CNonterminals_s11
attach_T_CNonterminals (T_CNonterminals
arg_nonts_))
         (T_CNonterminals_vOut10 Chunks
_nontsIchunks Set NontermIdent
_nontsIgathNts Map (NontermIdent, Int) ([String], Type)
_nontsIsemDomUnfoldGath) = T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 T_CNonterminals_s11
_nontsX11 (Set NontermIdent
-> PragmaMap
-> PragmaMap
-> ContextMap
-> Map NontermIdent (Set NontermIdent)
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> TypeSyns
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CNonterminals_vIn10
T_CNonterminals_vIn10 Set NontermIdent
_nontsOallNts PragmaMap
_nontsOallPragmas PragmaMap
_nontsOaroundMap ContextMap
_nontsOcontextMap Map NontermIdent (Set NontermIdent)
_nontsOderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_nontsOmergeMap Bool
_nontsOo_case Bool
_nontsOo_cata Bool
_nontsOo_clean Bool
_nontsOo_costcentre Maybe Bool
_nontsOo_data Bool
_nontsOo_linePragmas Bool
_nontsOo_monadic Bool
_nontsOo_newtypes Bool
_nontsOo_pretty Bool
_nontsOo_rename Bool
_nontsOo_sem Bool
_nontsOo_sig Bool
_nontsOo_splitsems Bool
_nontsOo_strictwrap Bool
_nontsOo_traces Bool
_nontsOo_unbox Options
_nontsOoptions ParamMap
_nontsOparamMap String
_nontsOprefix QuantMap
_nontsOquantMap TypeSyns
_nontsOtypeSyns NontermIdent -> Int -> [String] -> Type
_nontsOunfoldSemDom Bool
_nontsOwith_sig Set NontermIdent
_nontsOwrappers)
         _nontsOo_sig :: Bool
_nontsOo_sig = Options -> Bool
rule0 Options
_lhsIoptions
         _nontsOo_cata :: Bool
_nontsOo_cata = Options -> Bool
rule1 Options
_lhsIoptions
         _nontsOo_sem :: Bool
_nontsOo_sem = Options -> Bool
rule2 Options
_lhsIoptions
         _nontsOo_newtypes :: Bool
_nontsOo_newtypes = Options -> Bool
rule3 Options
_lhsIoptions
         _nontsOo_unbox :: Bool
_nontsOo_unbox = Options -> Bool
rule4 Options
_lhsIoptions
         _nontsOo_case :: Bool
_nontsOo_case = Options -> Bool
rule5 Options
_lhsIoptions
         _nontsOo_pretty :: Bool
_nontsOo_pretty = Options -> Bool
rule6 Options
_lhsIoptions
         _nontsOo_rename :: Bool
_nontsOo_rename = Options -> Bool
rule7 Options
_lhsIoptions
         _nontsOo_strictwrap :: Bool
_nontsOo_strictwrap = Options -> Bool
rule8 Options
_lhsIoptions
         _nontsOo_splitsems :: Bool
_nontsOo_splitsems = Options -> Bool
rule9 Options
_lhsIoptions
         _nontsOo_data :: Maybe Bool
_nontsOo_data = Options -> Maybe Bool
rule10 Options
_lhsIoptions
         _nontsOprefix :: String
_nontsOprefix = Options -> String
rule11 Options
_lhsIoptions
         _nontsOo_traces :: Bool
_nontsOo_traces = Options -> Bool
rule12 Options
_lhsIoptions
         _nontsOo_costcentre :: Bool
_nontsOo_costcentre = Options -> Bool
rule13 Options
_lhsIoptions
         _nontsOo_linePragmas :: Bool
_nontsOo_linePragmas = Options -> Bool
rule14 Options
_lhsIoptions
         _nontsOo_monadic :: Bool
_nontsOo_monadic = Options -> Bool
rule15 Options
_lhsIoptions
         _nontsOo_clean :: Bool
_nontsOo_clean = Options -> Bool
rule16 Options
_lhsIoptions
         _options :: Options
_options = Options -> Bool -> Options
rule17 Options
_lhsIoptions Bool
arg_multivisit_
         _nontsOallPragmas :: PragmaMap
_nontsOallPragmas = forall a. a -> a
rule18 PragmaMap
arg_pragmas_
         _nontsOparamMap :: ParamMap
_nontsOparamMap = forall a. a -> a
rule19 ParamMap
arg_paramMap_
         _nontsOcontextMap :: ContextMap
_nontsOcontextMap = forall a. a -> a
rule20 ContextMap
arg_contextMap_
         _nontsOquantMap :: QuantMap
_nontsOquantMap = forall a. a -> a
rule21 QuantMap
arg_quantMap_
         _nontsOallNts :: Set NontermIdent
_nontsOallNts = Set NontermIdent -> Set NontermIdent
rule22 Set NontermIdent
_nontsIgathNts
         _aroundMap :: PragmaMap
_aroundMap = forall a. a -> a
rule23 PragmaMap
arg_aroundsMap_
         _mergeMap :: Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_mergeMap = forall a. a -> a
rule24 Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
arg_mergeMap_
         _unfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_unfoldSemDom = Options
-> Map (NontermIdent, Int) ([String], Type)
-> NontermIdent
-> Int
-> [String]
-> Type
rule25 Options
_lhsIoptions Map (NontermIdent, Int) ([String], Type)
_nontsIsemDomUnfoldGath
         _nontsOwith_sig :: Bool
_nontsOwith_sig = Options -> Bool
rule26 Options
_lhsIoptions
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule27  ()
         _lhsOoutput :: Program
         _lhsOoutput :: Program
_lhsOoutput = Chunks -> Bool -> Program
rule28 Chunks
_nontsIchunks Bool
arg_multivisit_
         _nontsOtypeSyns :: TypeSyns
_nontsOtypeSyns = forall a. a -> a
rule29 TypeSyns
arg_typeSyns_
         _nontsOderivings :: Map NontermIdent (Set NontermIdent)
_nontsOderivings = forall a. a -> a
rule30 Map NontermIdent (Set NontermIdent)
arg_derivings_
         _nontsOwrappers :: Set NontermIdent
_nontsOwrappers = forall a. a -> a
rule31 Set NontermIdent
arg_wrappers_
         _nontsOaroundMap :: PragmaMap
_nontsOaroundMap = forall a. a -> a
rule32 PragmaMap
_aroundMap
         _nontsOmergeMap :: Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_nontsOmergeMap = forall a. a -> a
rule33 Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_mergeMap
         _nontsOoptions :: Options
_nontsOoptions = forall a. a -> a
rule34 Options
_options
         _nontsOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_nontsOunfoldSemDom = forall a. a -> a
rule35 NontermIdent -> Int -> [String] -> Type
_unfoldSemDom
         __result_ :: T_CGrammar_vOut1
__result_ = Seq Error -> Program -> T_CGrammar_vOut1
T_CGrammar_vOut1 Seq Error
_lhsOerrors Program
_lhsOoutput
         in T_CGrammar_vOut1
__result_ )
     in T_CGrammar_v1 -> T_CGrammar_s2
C_CGrammar_s2 T_CGrammar_v1
v1
   {-# INLINE rule0 #-}
   {-# LINE 52 "src-ag/GenerateCode.ag" #-}
   rule0 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 52 "src-ag/GenerateCode.ag" #-}
                                        typeSigs       _lhsIoptions
                                        {-# LINE 352 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule1 #-}
   {-# LINE 53 "src-ag/GenerateCode.ag" #-}
   rule1 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 53 "src-ag/GenerateCode.ag" #-}
                                        folds          _lhsIoptions
                                        {-# LINE 358 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule2 #-}
   {-# LINE 54 "src-ag/GenerateCode.ag" #-}
   rule2 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 54 "src-ag/GenerateCode.ag" #-}
                                        semfuns        _lhsIoptions
                                        {-# LINE 364 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule3 #-}
   {-# LINE 55 "src-ag/GenerateCode.ag" #-}
   rule3 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 55 "src-ag/GenerateCode.ag" #-}
                                        newtypes       _lhsIoptions
                                        {-# LINE 370 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule4 #-}
   {-# LINE 56 "src-ag/GenerateCode.ag" #-}
   rule4 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 56 "src-ag/GenerateCode.ag" #-}
                                        unbox          _lhsIoptions
                                        {-# LINE 376 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule5 #-}
   {-# LINE 57 "src-ag/GenerateCode.ag" #-}
   rule5 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 57 "src-ag/GenerateCode.ag" #-}
                                        cases          _lhsIoptions
                                        {-# LINE 382 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule6 #-}
   {-# LINE 58 "src-ag/GenerateCode.ag" #-}
   rule6 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 58 "src-ag/GenerateCode.ag" #-}
                                        attrInfo       _lhsIoptions
                                        {-# LINE 388 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule7 #-}
   {-# LINE 59 "src-ag/GenerateCode.ag" #-}
   rule7 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 59 "src-ag/GenerateCode.ag" #-}
                                        rename         _lhsIoptions
                                        {-# LINE 394 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule8 #-}
   {-# LINE 60 "src-ag/GenerateCode.ag" #-}
   rule8 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 60 "src-ag/GenerateCode.ag" #-}
                                        strictWrap     _lhsIoptions
                                        {-# LINE 400 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule9 #-}
   {-# LINE 61 "src-ag/GenerateCode.ag" #-}
   rule9 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 61 "src-ag/GenerateCode.ag" #-}
                                        splitSems      _lhsIoptions
                                        {-# LINE 406 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule10 #-}
   {-# LINE 62 "src-ag/GenerateCode.ag" #-}
   rule10 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 62 "src-ag/GenerateCode.ag" #-}
                                        if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing
                                        {-# LINE 412 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule11 #-}
   {-# LINE 63 "src-ag/GenerateCode.ag" #-}
   rule11 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 63 "src-ag/GenerateCode.ag" #-}
                                        prefix         _lhsIoptions
                                        {-# LINE 418 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule12 #-}
   {-# LINE 64 "src-ag/GenerateCode.ag" #-}
   rule12 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 64 "src-ag/GenerateCode.ag" #-}
                                        genTraces      _lhsIoptions
                                        {-# LINE 424 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule13 #-}
   {-# LINE 65 "src-ag/GenerateCode.ag" #-}
   rule13 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 65 "src-ag/GenerateCode.ag" #-}
                                        genCostCentres _lhsIoptions
                                        {-# LINE 430 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule14 #-}
   {-# LINE 66 "src-ag/GenerateCode.ag" #-}
   rule14 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 66 "src-ag/GenerateCode.ag" #-}
                                        genLinePragmas _lhsIoptions
                                        {-# LINE 436 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule15 #-}
   {-# LINE 67 "src-ag/GenerateCode.ag" #-}
   rule15 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 67 "src-ag/GenerateCode.ag" #-}
                                        monadic        _lhsIoptions
                                        {-# LINE 442 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule16 #-}
   {-# LINE 68 "src-ag/GenerateCode.ag" #-}
   rule16 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 68 "src-ag/GenerateCode.ag" #-}
                                        clean          _lhsIoptions
                                        {-# LINE 448 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule17 #-}
   {-# LINE 71 "src-ag/GenerateCode.ag" #-}
   rule17 = \ ((_lhsIoptions) :: Options) multivisit_ ->
                  {-# LINE 71 "src-ag/GenerateCode.ag" #-}
                  _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }
                  {-# LINE 454 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule18 #-}
   {-# LINE 76 "src-ag/GenerateCode.ag" #-}
   rule18 = \ pragmas_ ->
                                   {-# LINE 76 "src-ag/GenerateCode.ag" #-}
                                   pragmas_
                                   {-# LINE 460 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule19 #-}
   {-# LINE 98 "src-ag/GenerateCode.ag" #-}
   rule19 = \ paramMap_ ->
                                {-# LINE 98 "src-ag/GenerateCode.ag" #-}
                                paramMap_
                                {-# LINE 466 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule20 #-}
   {-# LINE 120 "src-ag/GenerateCode.ag" #-}
   rule20 = \ contextMap_ ->
                           {-# LINE 120 "src-ag/GenerateCode.ag" #-}
                           contextMap_
                           {-# LINE 472 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule21 #-}
   {-# LINE 121 "src-ag/GenerateCode.ag" #-}
   rule21 = \ quantMap_ ->
                           {-# LINE 121 "src-ag/GenerateCode.ag" #-}
                           quantMap_
                           {-# LINE 478 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule22 #-}
   {-# LINE 137 "src-ag/GenerateCode.ag" #-}
   rule22 = \ ((_nontsIgathNts) :: Set NontermIdent) ->
                       {-# LINE 137 "src-ag/GenerateCode.ag" #-}
                       _nontsIgathNts
                       {-# LINE 484 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule23 #-}
   {-# LINE 591 "src-ag/GenerateCode.ag" #-}
   rule23 = \ aroundsMap_ ->
                                                   {-# LINE 591 "src-ag/GenerateCode.ag" #-}
                                                   aroundsMap_
                                                   {-# LINE 490 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule24 #-}
   {-# LINE 607 "src-ag/GenerateCode.ag" #-}
   rule24 = \ mergeMap_ ->
                                                  {-# LINE 607 "src-ag/GenerateCode.ag" #-}
                                                  mergeMap_
                                                  {-# LINE 496 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule25 #-}
   {-# LINE 764 "src-ag/GenerateCode.ag" #-}
   rule25 = \ ((_lhsIoptions) :: Options) ((_nontsIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->
         {-# LINE 764 "src-ag/GenerateCode.ag" #-}
         \nt nr repl ->
          let (params, tp) = Map.findWithDefault (error ("No such semantic domain: " ++ show nt)) (nt, nr) _nontsIsemDomUnfoldGath
              replMap = Map.fromList (zip params repl)
              replace k = Map.findWithDefault ('@':k) k replMap
          in evalType _lhsIoptions replace tp
         {-# LINE 506 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule26 #-}
   {-# LINE 865 "src-ag/GenerateCode.ag" #-}
   rule26 = \ ((_lhsIoptions) :: Options) ->
                                {-# LINE 865 "src-ag/GenerateCode.ag" #-}
                                typeSigs _lhsIoptions
                                {-# LINE 512 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule27 #-}
   {-# LINE 868 "src-ag/GenerateCode.ag" #-}
   rule27 = \  (_ :: ()) ->
                             {-# LINE 868 "src-ag/GenerateCode.ag" #-}
                             Seq.empty
                             {-# LINE 518 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule28 #-}
   {-# LINE 937 "src-ag/GenerateCode.ag" #-}
   rule28 = \ ((_nontsIchunks) :: Chunks) multivisit_ ->
                               {-# LINE 937 "src-ag/GenerateCode.ag" #-}
                               Program _nontsIchunks multivisit_
                               {-# LINE 524 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule29 #-}
   {-# LINE 1005 "src-ag/GenerateCode.ag" #-}
   rule29 = \ typeSyns_ ->
                                   {-# LINE 1005 "src-ag/GenerateCode.ag" #-}
                                   typeSyns_
                                   {-# LINE 530 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule30 #-}
   {-# LINE 1006 "src-ag/GenerateCode.ag" #-}
   rule30 = \ derivings_ ->
                                   {-# LINE 1006 "src-ag/GenerateCode.ag" #-}
                                   derivings_
                                   {-# LINE 536 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule31 #-}
   {-# LINE 1007 "src-ag/GenerateCode.ag" #-}
   rule31 = \ wrappers_ ->
                                   {-# LINE 1007 "src-ag/GenerateCode.ag" #-}
                                   wrappers_
                                   {-# LINE 542 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule32 #-}
   rule32 = \ _aroundMap ->
     _aroundMap
   {-# INLINE rule33 #-}
   rule33 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule34 #-}
   rule34 = \ _options ->
     _options
   {-# INLINE rule35 #-}
   rule35 = \ _unfoldSemDom ->
     _unfoldSemDom

-- CInterface --------------------------------------------------
-- wrapper
data Inh_CInterface  = Inh_CInterface { Inh_CInterface -> Map NontermIdent Type
inh_Inh_CInterface :: (Attributes), Inh_CInterface -> NontermIdent
nt_Inh_CInterface :: (NontermIdent), Inh_CInterface -> Bool
o_case_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_cata_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_clean_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_costcentre_Inh_CInterface :: (Bool), Inh_CInterface -> Maybe Bool
o_data_Inh_CInterface :: (Maybe Bool), Inh_CInterface -> Bool
o_linePragmas_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_monadic_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_newtypes_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_pretty_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_rename_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_sem_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_sig_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_splitsems_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_strictwrap_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_traces_Inh_CInterface :: (Bool), Inh_CInterface -> Bool
o_unbox_Inh_CInterface :: (Bool), Inh_CInterface -> Options
options_Inh_CInterface :: (Options), Inh_CInterface -> ParamMap
paramMap_Inh_CInterface :: (ParamMap), Inh_CInterface -> String
prefix_Inh_CInterface :: (String), Inh_CInterface -> Map NontermIdent Type
syn_Inh_CInterface :: (Attributes) }
data Syn_CInterface  = Syn_CInterface { Syn_CInterface -> [String]
comments_Syn_CInterface :: ([String]), Syn_CInterface -> [Decl]
semDom_Syn_CInterface :: ([Decl]), Syn_CInterface -> Map (NontermIdent, Int) ([String], Type)
semDomUnfoldGath_Syn_CInterface :: (Map (NontermIdent, Int) ([String], Code.Type)), Syn_CInterface -> [Decl]
wrapDecls_Syn_CInterface :: (Decls) }
{-# INLINABLE wrap_CInterface #-}
wrap_CInterface :: T_CInterface  -> Inh_CInterface  -> (Syn_CInterface )
wrap_CInterface :: T_CInterface -> Inh_CInterface -> Syn_CInterface
wrap_CInterface (T_CInterface Identity T_CInterface_s5
act) (Inh_CInterface Map NontermIdent Type
_lhsIinh NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CInterface_s5
sem <- Identity T_CInterface_s5
act
        let arg4 :: T_CInterface_vIn4
arg4 = Map NontermIdent Type
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CInterface_vIn4
T_CInterface_vIn4 Map NontermIdent Type
_lhsIinh NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn
        (T_CInterface_vOut4 [String]
_lhsOcomments [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CInterface_s5 -> T_CInterface_v4
inv_CInterface_s5 T_CInterface_s5
sem T_CInterface_vIn4
arg4)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([String]
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> Syn_CInterface
Syn_CInterface [String]
_lhsOcomments [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls)
   )

-- cata
{-# INLINE sem_CInterface #-}
sem_CInterface :: CInterface  -> T_CInterface 
sem_CInterface :: CInterface -> T_CInterface
sem_CInterface ( CInterface CSegments
seg_ ) = T_CSegments -> T_CInterface
sem_CInterface_CInterface ( CSegments -> T_CSegments
sem_CSegments CSegments
seg_ )

-- semantic domain
newtype T_CInterface  = T_CInterface {
                                     T_CInterface -> Identity T_CInterface_s5
attach_T_CInterface :: Identity (T_CInterface_s5 )
                                     }
newtype T_CInterface_s5  = C_CInterface_s5 {
                                           T_CInterface_s5 -> T_CInterface_v4
inv_CInterface_s5 :: (T_CInterface_v4 )
                                           }
data T_CInterface_s6  = C_CInterface_s6
type T_CInterface_v4  = (T_CInterface_vIn4 ) -> (T_CInterface_vOut4 )
data T_CInterface_vIn4  = T_CInterface_vIn4 (Attributes) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)
data T_CInterface_vOut4  = T_CInterface_vOut4 ([String]) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)
{-# NOINLINE sem_CInterface_CInterface #-}
sem_CInterface_CInterface :: T_CSegments  -> T_CInterface 
sem_CInterface_CInterface :: T_CSegments -> T_CInterface
sem_CInterface_CInterface T_CSegments
arg_seg_ = Identity T_CInterface_s5 -> T_CInterface
T_CInterface (forall (m :: * -> *) a. Monad m => a -> m a
return T_CInterface_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_CInterface_s5
st5 = let
      v4 :: T_CInterface_v4 
      v4 :: T_CInterface_v4
v4 = \ (T_CInterface_vIn4 Map NontermIdent Type
_lhsIinh NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) -> ( let
         _segX26 :: T_CSegments_s26
_segX26 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CSegments -> Identity T_CSegments_s26
attach_T_CSegments (T_CSegments
arg_seg_))
         (T_CSegments_vOut25 [String]
_segIcomments Bool
_segIisNil [Decl]
_segIsemDom Map (NontermIdent, Int) ([String], Type)
_segIsemDomUnfoldGath [Decl]
_segIwrapDecls) = T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 T_CSegments_s26
_segX26 (Map NontermIdent Type
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CSegments_vIn25
T_CSegments_vIn25 Map NontermIdent Type
_segOinh Int
_segOnr NontermIdent
_segOnt Bool
_segOo_case Bool
_segOo_cata Bool
_segOo_clean Bool
_segOo_costcentre Maybe Bool
_segOo_data Bool
_segOo_linePragmas Bool
_segOo_monadic Bool
_segOo_newtypes Bool
_segOo_pretty Bool
_segOo_rename Bool
_segOo_sem Bool
_segOo_sig Bool
_segOo_splitsems Bool
_segOo_strictwrap Bool
_segOo_traces Bool
_segOo_unbox Options
_segOoptions ParamMap
_segOparamMap String
_segOprefix Map NontermIdent Type
_segOsyn)
         _segOnr :: Int
_segOnr = () -> Int
rule36  ()
         _lhsOsemDom :: [Decl]
         _lhsOsemDom :: [Decl]
_lhsOsemDom = [Decl] -> [Decl]
rule37 [Decl]
_segIsemDom
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = [String] -> [String]
rule38 [String]
_segIcomments
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
rule39 Map (NontermIdent, Int) ([String], Type)
_segIsemDomUnfoldGath
         _lhsOwrapDecls :: Decls
         _lhsOwrapDecls :: [Decl]
_lhsOwrapDecls = [Decl] -> [Decl]
rule40 [Decl]
_segIwrapDecls
         _segOinh :: Map NontermIdent Type
_segOinh = Map NontermIdent Type -> Map NontermIdent Type
rule41 Map NontermIdent Type
_lhsIinh
         _segOnt :: NontermIdent
_segOnt = NontermIdent -> NontermIdent
rule42 NontermIdent
_lhsInt
         _segOo_case :: Bool
_segOo_case = Bool -> Bool
rule43 Bool
_lhsIo_case
         _segOo_cata :: Bool
_segOo_cata = Bool -> Bool
rule44 Bool
_lhsIo_cata
         _segOo_clean :: Bool
_segOo_clean = Bool -> Bool
rule45 Bool
_lhsIo_clean
         _segOo_costcentre :: Bool
_segOo_costcentre = Bool -> Bool
rule46 Bool
_lhsIo_costcentre
         _segOo_data :: Maybe Bool
_segOo_data = Maybe Bool -> Maybe Bool
rule47 Maybe Bool
_lhsIo_data
         _segOo_linePragmas :: Bool
_segOo_linePragmas = Bool -> Bool
rule48 Bool
_lhsIo_linePragmas
         _segOo_monadic :: Bool
_segOo_monadic = Bool -> Bool
rule49 Bool
_lhsIo_monadic
         _segOo_newtypes :: Bool
_segOo_newtypes = Bool -> Bool
rule50 Bool
_lhsIo_newtypes
         _segOo_pretty :: Bool
_segOo_pretty = Bool -> Bool
rule51 Bool
_lhsIo_pretty
         _segOo_rename :: Bool
_segOo_rename = Bool -> Bool
rule52 Bool
_lhsIo_rename
         _segOo_sem :: Bool
_segOo_sem = Bool -> Bool
rule53 Bool
_lhsIo_sem
         _segOo_sig :: Bool
_segOo_sig = Bool -> Bool
rule54 Bool
_lhsIo_sig
         _segOo_splitsems :: Bool
_segOo_splitsems = Bool -> Bool
rule55 Bool
_lhsIo_splitsems
         _segOo_strictwrap :: Bool
_segOo_strictwrap = Bool -> Bool
rule56 Bool
_lhsIo_strictwrap
         _segOo_traces :: Bool
_segOo_traces = Bool -> Bool
rule57 Bool
_lhsIo_traces
         _segOo_unbox :: Bool
_segOo_unbox = Bool -> Bool
rule58 Bool
_lhsIo_unbox
         _segOoptions :: Options
_segOoptions = Options -> Options
rule59 Options
_lhsIoptions
         _segOparamMap :: ParamMap
_segOparamMap = ParamMap -> ParamMap
rule60 ParamMap
_lhsIparamMap
         _segOprefix :: String
_segOprefix = String -> String
rule61 String
_lhsIprefix
         _segOsyn :: Map NontermIdent Type
_segOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule62 Map NontermIdent Type
_lhsIsyn
         __result_ :: T_CInterface_vOut4
__result_ = [String]
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> T_CInterface_vOut4
T_CInterface_vOut4 [String]
_lhsOcomments [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls
         in T_CInterface_vOut4
__result_ )
     in T_CInterface_v4 -> T_CInterface_s5
C_CInterface_s5 T_CInterface_v4
v4
   {-# INLINE rule36 #-}
   {-# LINE 287 "src-ag/GenerateCode.ag" #-}
   rule36 = \  (_ :: ()) ->
                           {-# LINE 287 "src-ag/GenerateCode.ag" #-}
                           0
                           {-# LINE 634 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule37 #-}
   {-# LINE 721 "src-ag/GenerateCode.ag" #-}
   rule37 = \ ((_segIsemDom) :: [Decl]) ->
                                {-# LINE 721 "src-ag/GenerateCode.ag" #-}
                                Comment "semantic domain" : _segIsemDom
                                {-# LINE 640 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule38 #-}
   rule38 = \ ((_segIcomments) :: [String]) ->
     _segIcomments
   {-# INLINE rule39 #-}
   rule39 = \ ((_segIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->
     _segIsemDomUnfoldGath
   {-# INLINE rule40 #-}
   rule40 = \ ((_segIwrapDecls) :: Decls) ->
     _segIwrapDecls
   {-# INLINE rule41 #-}
   rule41 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule42 #-}
   rule42 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule43 #-}
   rule43 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule44 #-}
   rule44 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule45 #-}
   rule45 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule46 #-}
   rule46 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule47 #-}
   rule47 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule48 #-}
   rule48 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule49 #-}
   rule49 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule50 #-}
   rule50 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule51 #-}
   rule51 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule52 #-}
   rule52 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule53 #-}
   rule53 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule54 #-}
   rule54 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule55 #-}
   rule55 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule56 #-}
   rule56 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule57 #-}
   rule57 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule58 #-}
   rule58 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule59 #-}
   rule59 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule60 #-}
   rule60 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule61 #-}
   rule61 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule62 #-}
   rule62 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn

-- CNonterminal ------------------------------------------------
-- wrapper
data Inh_CNonterminal  = Inh_CNonterminal { Inh_CNonterminal -> Set NontermIdent
allNts_Inh_CNonterminal :: (Set NontermIdent), Inh_CNonterminal -> PragmaMap
allPragmas_Inh_CNonterminal :: (PragmaMap), Inh_CNonterminal -> PragmaMap
aroundMap_Inh_CNonterminal :: (Map NontermIdent (Map ConstructorIdent (Set Identifier))), Inh_CNonterminal -> ContextMap
contextMap_Inh_CNonterminal :: (ContextMap), Inh_CNonterminal -> Map NontermIdent (Set NontermIdent)
derivings_Inh_CNonterminal :: (Derivings), Inh_CNonterminal
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
mergeMap_Inh_CNonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))), Inh_CNonterminal -> Bool
o_case_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_cata_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_clean_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_costcentre_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Maybe Bool
o_data_Inh_CNonterminal :: (Maybe Bool), Inh_CNonterminal -> Bool
o_linePragmas_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_monadic_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_newtypes_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_pretty_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_rename_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_sem_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_sig_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_splitsems_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_strictwrap_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_traces_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Bool
o_unbox_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Options
options_Inh_CNonterminal :: (Options), Inh_CNonterminal -> ParamMap
paramMap_Inh_CNonterminal :: (ParamMap), Inh_CNonterminal -> String
prefix_Inh_CNonterminal :: (String), Inh_CNonterminal -> QuantMap
quantMap_Inh_CNonterminal :: (QuantMap), Inh_CNonterminal -> TypeSyns
typeSyns_Inh_CNonterminal :: (TypeSyns), Inh_CNonterminal -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CNonterminal :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CNonterminal -> Bool
with_sig_Inh_CNonterminal :: (Bool), Inh_CNonterminal -> Set NontermIdent
wrappers_Inh_CNonterminal :: (Set NontermIdent) }
data Syn_CNonterminal  = Syn_CNonterminal { Syn_CNonterminal -> Chunks
chunks_Syn_CNonterminal :: (Chunks), Syn_CNonterminal -> Set NontermIdent
gathNts_Syn_CNonterminal :: (Set NontermIdent), Syn_CNonterminal -> Map (NontermIdent, Int) ([String], Type)
semDomUnfoldGath_Syn_CNonterminal :: (Map (NontermIdent, Int) ([String], Code.Type)) }
{-# INLINABLE wrap_CNonterminal #-}
wrap_CNonterminal :: T_CNonterminal  -> Inh_CNonterminal  -> (Syn_CNonterminal )
wrap_CNonterminal :: T_CNonterminal -> Inh_CNonterminal -> Syn_CNonterminal
wrap_CNonterminal (T_CNonterminal Identity T_CNonterminal_s8
act) (Inh_CNonterminal Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CNonterminal_s8
sem <- Identity T_CNonterminal_s8
act
        let arg7 :: T_CNonterminal_vIn7
arg7 = Set NontermIdent
-> PragmaMap
-> PragmaMap
-> ContextMap
-> Map NontermIdent (Set NontermIdent)
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> TypeSyns
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CNonterminal_vIn7
T_CNonterminal_vIn7 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers
        (T_CNonterminal_vOut7 Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CNonterminal_s8 -> T_CNonterminal_v7
inv_CNonterminal_s8 T_CNonterminal_s8
sem T_CNonterminal_vIn7
arg7)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Chunks
-> Set NontermIdent
-> Map (NontermIdent, Int) ([String], Type)
-> Syn_CNonterminal
Syn_CNonterminal Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath)
   )

-- cata
{-# INLINE sem_CNonterminal #-}
sem_CNonterminal :: CNonterminal  -> T_CNonterminal 
sem_CNonterminal :: CNonterminal -> T_CNonterminal
sem_CNonterminal ( CNonterminal NontermIdent
nt_ [NontermIdent]
params_ Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ CProductions
prods_ CInterface
inter_ ) = NontermIdent
-> [NontermIdent]
-> Map NontermIdent Type
-> Map NontermIdent Type
-> T_CProductions
-> T_CInterface
-> T_CNonterminal
sem_CNonterminal_CNonterminal NontermIdent
nt_ [NontermIdent]
params_ Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ ( CProductions -> T_CProductions
sem_CProductions CProductions
prods_ ) ( CInterface -> T_CInterface
sem_CInterface CInterface
inter_ )

-- semantic domain
newtype T_CNonterminal  = T_CNonterminal {
                                         T_CNonterminal -> Identity T_CNonterminal_s8
attach_T_CNonterminal :: Identity (T_CNonterminal_s8 )
                                         }
newtype T_CNonterminal_s8  = C_CNonterminal_s8 {
                                               T_CNonterminal_s8 -> T_CNonterminal_v7
inv_CNonterminal_s8 :: (T_CNonterminal_v7 )
                                               }
data T_CNonterminal_s9  = C_CNonterminal_s9
type T_CNonterminal_v7  = (T_CNonterminal_vIn7 ) -> (T_CNonterminal_vOut7 )
data T_CNonterminal_vIn7  = T_CNonterminal_vIn7 (Set NontermIdent) (PragmaMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) (ContextMap) (Derivings) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (TypeSyns) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)
data T_CNonterminal_vOut7  = T_CNonterminal_vOut7 (Chunks) (Set NontermIdent) (Map (NontermIdent, Int) ([String], Code.Type))
{-# NOINLINE sem_CNonterminal_CNonterminal #-}
sem_CNonterminal_CNonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_CProductions  -> T_CInterface  -> T_CNonterminal 
sem_CNonterminal_CNonterminal :: NontermIdent
-> [NontermIdent]
-> Map NontermIdent Type
-> Map NontermIdent Type
-> T_CProductions
-> T_CInterface
-> T_CNonterminal
sem_CNonterminal_CNonterminal NontermIdent
arg_nt_ [NontermIdent]
arg_params_ Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_ T_CProductions
arg_prods_ T_CInterface
arg_inter_ = Identity T_CNonterminal_s8 -> T_CNonterminal
T_CNonterminal (forall (m :: * -> *) a. Monad m => a -> m a
return T_CNonterminal_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_CNonterminal_s8
st8 = let
      v7 :: T_CNonterminal_v7 
      v7 :: T_CNonterminal_v7
v7 = \ (T_CNonterminal_vIn7 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _prodsX17 :: T_CProductions_s17
_prodsX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CProductions -> Identity T_CProductions_s17
attach_T_CProductions (T_CProductions
arg_prods_))
         _interX5 :: T_CInterface_s5
_interX5 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CInterface -> Identity T_CInterface_s5
attach_T_CInterface (T_CInterface
arg_inter_))
         (T_CProductions_vOut16 [Decl]
_prodsIcataAlts [String]
_prodsIcomments DataAlts
_prodsIdataAlts [Decl]
_prodsIdecls [String]
_prodsIsemNames) = T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 T_CProductions_s17
_prodsX17 (Set NontermIdent
-> PragmaMap
-> Map NontermIdent (Set NontermIdent)
-> ContextMap
-> Map NontermIdent Type
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CProductions_vIn16
T_CProductions_vIn16 Set NontermIdent
_prodsOallNts PragmaMap
_prodsOallPragmas Map NontermIdent (Set NontermIdent)
_prodsOaroundMap ContextMap
_prodsOcontextMap Map NontermIdent Type
_prodsOinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_prodsOmergeMap NontermIdent
_prodsOnt Bool
_prodsOo_case Bool
_prodsOo_cata Bool
_prodsOo_clean Bool
_prodsOo_costcentre Maybe Bool
_prodsOo_data Bool
_prodsOo_linePragmas Bool
_prodsOo_monadic Bool
_prodsOo_newtypes Bool
_prodsOo_pretty Bool
_prodsOo_rename Bool
_prodsOo_sem Bool
_prodsOo_sig Bool
_prodsOo_splitsems Bool
_prodsOo_strictwrap Bool
_prodsOo_traces Bool
_prodsOo_unbox Options
_prodsOoptions ParamMap
_prodsOparamMap String
_prodsOprefix QuantMap
_prodsOquantMap Map NontermIdent Type
_prodsOsyn NontermIdent -> Int -> [String] -> Type
_prodsOunfoldSemDom Bool
_prodsOwith_sig Set NontermIdent
_prodsOwrappers)
         (T_CInterface_vOut4 [String]
_interIcomments [Decl]
_interIsemDom Map (NontermIdent, Int) ([String], Type)
_interIsemDomUnfoldGath [Decl]
_interIwrapDecls) = T_CInterface_s5 -> T_CInterface_v4
inv_CInterface_s5 T_CInterface_s5
_interX5 (Map NontermIdent Type
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CInterface_vIn4
T_CInterface_vIn4 Map NontermIdent Type
_interOinh NontermIdent
_interOnt Bool
_interOo_case Bool
_interOo_cata Bool
_interOo_clean Bool
_interOo_costcentre Maybe Bool
_interOo_data Bool
_interOo_linePragmas Bool
_interOo_monadic Bool
_interOo_newtypes Bool
_interOo_pretty Bool
_interOo_rename Bool
_interOo_sem Bool
_interOo_sig Bool
_interOo_splitsems Bool
_interOo_strictwrap Bool
_interOo_traces Bool
_interOo_unbox Options
_interOoptions ParamMap
_interOparamMap String
_interOprefix Map NontermIdent Type
_interOsyn)
         (Map NontermIdent Type
_interOinh,Map NontermIdent Type
_interOsyn,NontermIdent
_interOnt) = forall {a} {c} {b}. a -> c -> b -> (a, b, c)
rule63 Map NontermIdent Type
arg_inh_ NontermIdent
arg_nt_ Map NontermIdent Type
arg_syn_
         (Map NontermIdent Type
_prodsOinh,Map NontermIdent Type
_prodsOsyn,NontermIdent
_prodsOnt) = forall {a} {c} {b}. a -> c -> b -> (a, b, c)
rule64 Map NontermIdent Type
arg_inh_ NontermIdent
arg_nt_ Map NontermIdent Type
arg_syn_
         _lhsOgathNts :: Set NontermIdent
         _lhsOgathNts :: Set NontermIdent
_lhsOgathNts = forall a. a -> Set a
rule65 NontermIdent
arg_nt_
         _aroundMap :: Map NontermIdent (Set NontermIdent)
_aroundMap = PragmaMap -> NontermIdent -> Map NontermIdent (Set NontermIdent)
rule66 PragmaMap
_lhsIaroundMap NontermIdent
arg_nt_
         _mergeMap :: Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_mergeMap = Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> NontermIdent
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
rule67 Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap NontermIdent
arg_nt_
         _semWrapper :: [Decl]
_semWrapper = [Decl]
-> Bool
-> Bool
-> Options
-> Map NontermIdent Type
-> NontermIdent
-> [NontermIdent]
-> Map NontermIdent Type
-> [Decl]
rule68 [Decl]
_interIwrapDecls Bool
_lhsIo_newtypes Bool
_lhsIo_strictwrap Options
_lhsIoptions Map NontermIdent Type
arg_inh_ NontermIdent
arg_nt_ [NontermIdent]
arg_params_ Map NontermIdent Type
arg_syn_
         _comment :: Decl
_comment = [String] -> [String] -> Decl
rule69 [String]
_interIcomments [String]
_prodsIcomments
         _lhsOchunks :: Chunks
         _lhsOchunks :: Chunks
_lhsOchunks = [Decl]
-> Decl
-> Decl
-> Bool
-> [Decl]
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Set NontermIdent
-> [Decl]
-> [String]
-> [Decl]
-> NontermIdent
-> Chunks
rule70 [Decl]
_cataFun Decl
_comment Decl
_dataDef Bool
_genCata [Decl]
_interIsemDom Bool
_lhsIo_cata Maybe Bool
_lhsIo_data Bool
_lhsIo_pretty Bool
_lhsIo_sem Bool
_lhsIo_sig Set NontermIdent
_lhsIwrappers [Decl]
_prodsIdecls [String]
_prodsIsemNames [Decl]
_semWrapper NontermIdent
arg_nt_
         _dataDef :: Decl
_dataDef = Map NontermIdent (Set NontermIdent)
-> Maybe Bool
-> Options
-> TypeSyns
-> DataAlts
-> NontermIdent
-> [NontermIdent]
-> Decl
rule71 Map NontermIdent (Set NontermIdent)
_lhsIderivings Maybe Bool
_lhsIo_data Options
_lhsIoptions TypeSyns
_lhsItypeSyns DataAlts
_prodsIdataAlts NontermIdent
arg_nt_ [NontermIdent]
arg_params_
         _genCata :: Bool
_genCata = Options -> NontermIdent -> Bool
rule72 Options
_lhsIoptions NontermIdent
arg_nt_
         _cataFun :: [Decl]
_cataFun = ContextMap
-> Bool
-> Options
-> String
-> QuantMap
-> TypeSyns
-> [Decl]
-> NontermIdent
-> [NontermIdent]
-> [Decl]
rule73 ContextMap
_lhsIcontextMap Bool
_lhsIo_sig Options
_lhsIoptions String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns [Decl]
_prodsIcataAlts NontermIdent
arg_nt_ [NontermIdent]
arg_params_
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
rule74 Map (NontermIdent, Int) ([String], Type)
_interIsemDomUnfoldGath
         _prodsOallNts :: Set NontermIdent
_prodsOallNts = Set NontermIdent -> Set NontermIdent
rule75 Set NontermIdent
_lhsIallNts
         _prodsOallPragmas :: PragmaMap
_prodsOallPragmas = PragmaMap -> PragmaMap
rule76 PragmaMap
_lhsIallPragmas
         _prodsOaroundMap :: Map NontermIdent (Set NontermIdent)
_prodsOaroundMap = forall a. a -> a
rule77 Map NontermIdent (Set NontermIdent)
_aroundMap
         _prodsOcontextMap :: ContextMap
_prodsOcontextMap = ContextMap -> ContextMap
rule78 ContextMap
_lhsIcontextMap
         _prodsOmergeMap :: Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_prodsOmergeMap = forall a. a -> a
rule79 Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_mergeMap
         _prodsOo_case :: Bool
_prodsOo_case = Bool -> Bool
rule80 Bool
_lhsIo_case
         _prodsOo_cata :: Bool
_prodsOo_cata = Bool -> Bool
rule81 Bool
_lhsIo_cata
         _prodsOo_clean :: Bool
_prodsOo_clean = Bool -> Bool
rule82 Bool
_lhsIo_clean
         _prodsOo_costcentre :: Bool
_prodsOo_costcentre = Bool -> Bool
rule83 Bool
_lhsIo_costcentre
         _prodsOo_data :: Maybe Bool
_prodsOo_data = Maybe Bool -> Maybe Bool
rule84 Maybe Bool
_lhsIo_data
         _prodsOo_linePragmas :: Bool
_prodsOo_linePragmas = Bool -> Bool
rule85 Bool
_lhsIo_linePragmas
         _prodsOo_monadic :: Bool
_prodsOo_monadic = Bool -> Bool
rule86 Bool
_lhsIo_monadic
         _prodsOo_newtypes :: Bool
_prodsOo_newtypes = Bool -> Bool
rule87 Bool
_lhsIo_newtypes
         _prodsOo_pretty :: Bool
_prodsOo_pretty = Bool -> Bool
rule88 Bool
_lhsIo_pretty
         _prodsOo_rename :: Bool
_prodsOo_rename = Bool -> Bool
rule89 Bool
_lhsIo_rename
         _prodsOo_sem :: Bool
_prodsOo_sem = Bool -> Bool
rule90 Bool
_lhsIo_sem
         _prodsOo_sig :: Bool
_prodsOo_sig = Bool -> Bool
rule91 Bool
_lhsIo_sig
         _prodsOo_splitsems :: Bool
_prodsOo_splitsems = Bool -> Bool
rule92 Bool
_lhsIo_splitsems
         _prodsOo_strictwrap :: Bool
_prodsOo_strictwrap = Bool -> Bool
rule93 Bool
_lhsIo_strictwrap
         _prodsOo_traces :: Bool
_prodsOo_traces = Bool -> Bool
rule94 Bool
_lhsIo_traces
         _prodsOo_unbox :: Bool
_prodsOo_unbox = Bool -> Bool
rule95 Bool
_lhsIo_unbox
         _prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule96 Options
_lhsIoptions
         _prodsOparamMap :: ParamMap
_prodsOparamMap = ParamMap -> ParamMap
rule97 ParamMap
_lhsIparamMap
         _prodsOprefix :: String
_prodsOprefix = String -> String
rule98 String
_lhsIprefix
         _prodsOquantMap :: QuantMap
_prodsOquantMap = QuantMap -> QuantMap
rule99 QuantMap
_lhsIquantMap
         _prodsOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_prodsOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule100 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _prodsOwith_sig :: Bool
_prodsOwith_sig = Bool -> Bool
rule101 Bool
_lhsIwith_sig
         _prodsOwrappers :: Set NontermIdent
_prodsOwrappers = Set NontermIdent -> Set NontermIdent
rule102 Set NontermIdent
_lhsIwrappers
         _interOo_case :: Bool
_interOo_case = Bool -> Bool
rule103 Bool
_lhsIo_case
         _interOo_cata :: Bool
_interOo_cata = Bool -> Bool
rule104 Bool
_lhsIo_cata
         _interOo_clean :: Bool
_interOo_clean = Bool -> Bool
rule105 Bool
_lhsIo_clean
         _interOo_costcentre :: Bool
_interOo_costcentre = Bool -> Bool
rule106 Bool
_lhsIo_costcentre
         _interOo_data :: Maybe Bool
_interOo_data = Maybe Bool -> Maybe Bool
rule107 Maybe Bool
_lhsIo_data
         _interOo_linePragmas :: Bool
_interOo_linePragmas = Bool -> Bool
rule108 Bool
_lhsIo_linePragmas
         _interOo_monadic :: Bool
_interOo_monadic = Bool -> Bool
rule109 Bool
_lhsIo_monadic
         _interOo_newtypes :: Bool
_interOo_newtypes = Bool -> Bool
rule110 Bool
_lhsIo_newtypes
         _interOo_pretty :: Bool
_interOo_pretty = Bool -> Bool
rule111 Bool
_lhsIo_pretty
         _interOo_rename :: Bool
_interOo_rename = Bool -> Bool
rule112 Bool
_lhsIo_rename
         _interOo_sem :: Bool
_interOo_sem = Bool -> Bool
rule113 Bool
_lhsIo_sem
         _interOo_sig :: Bool
_interOo_sig = Bool -> Bool
rule114 Bool
_lhsIo_sig
         _interOo_splitsems :: Bool
_interOo_splitsems = Bool -> Bool
rule115 Bool
_lhsIo_splitsems
         _interOo_strictwrap :: Bool
_interOo_strictwrap = Bool -> Bool
rule116 Bool
_lhsIo_strictwrap
         _interOo_traces :: Bool
_interOo_traces = Bool -> Bool
rule117 Bool
_lhsIo_traces
         _interOo_unbox :: Bool
_interOo_unbox = Bool -> Bool
rule118 Bool
_lhsIo_unbox
         _interOoptions :: Options
_interOoptions = Options -> Options
rule119 Options
_lhsIoptions
         _interOparamMap :: ParamMap
_interOparamMap = ParamMap -> ParamMap
rule120 ParamMap
_lhsIparamMap
         _interOprefix :: String
_interOprefix = String -> String
rule121 String
_lhsIprefix
         __result_ :: T_CNonterminal_vOut7
__result_ = Chunks
-> Set NontermIdent
-> Map (NontermIdent, Int) ([String], Type)
-> T_CNonterminal_vOut7
T_CNonterminal_vOut7 Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath
         in T_CNonterminal_vOut7
__result_ )
     in T_CNonterminal_v7 -> T_CNonterminal_s8
C_CNonterminal_s8 T_CNonterminal_v7
v7
   {-# INLINE rule63 #-}
   {-# LINE 86 "src-ag/GenerateCode.ag" #-}
   rule63 = \ inh_ nt_ syn_ ->
                                          {-# LINE 86 "src-ag/GenerateCode.ag" #-}
                                          (inh_,syn_,nt_)
                                          {-# LINE 828 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule64 #-}
   {-# LINE 87 "src-ag/GenerateCode.ag" #-}
   rule64 = \ inh_ nt_ syn_ ->
                                         {-# LINE 87 "src-ag/GenerateCode.ag" #-}
                                         (inh_,syn_,nt_)
                                         {-# LINE 834 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule65 #-}
   {-# LINE 143 "src-ag/GenerateCode.ag" #-}
   rule65 = \ nt_ ->
                      {-# LINE 143 "src-ag/GenerateCode.ag" #-}
                      Set.singleton nt_
                      {-# LINE 840 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule66 #-}
   {-# LINE 592 "src-ag/GenerateCode.ag" #-}
   rule66 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) nt_ ->
                                                   {-# LINE 592 "src-ag/GenerateCode.ag" #-}
                                                   Map.findWithDefault Map.empty nt_ _lhsIaroundMap
                                                   {-# LINE 846 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule67 #-}
   {-# LINE 608 "src-ag/GenerateCode.ag" #-}
   rule67 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) nt_ ->
                                                  {-# LINE 608 "src-ag/GenerateCode.ag" #-}
                                                  Map.findWithDefault Map.empty nt_ _lhsImergeMap
                                                  {-# LINE 852 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule68 #-}
   {-# LINE 814 "src-ag/GenerateCode.ag" #-}
   rule68 = \ ((_interIwrapDecls) :: Decls) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_strictwrap) :: Bool) ((_lhsIoptions) :: Options) inh_ nt_ params_ syn_ ->
                                    {-# LINE 814 "src-ag/GenerateCode.ag" #-}
                                    let params' = map getName params_
                                        inhAttrs = Map.toList inh_
                                        synAttrs = Map.toList syn_
                                        inhVars = [ SimpleExpr (attrname _lhsIoptions True _LHS a) | (a,_) <- inhAttrs ]
                                        synVars = [ SimpleExpr (attrname _lhsIoptions False _LHS a) | (a,_) <- synAttrs ]
                                        var = "sem"
                                        wrapNT = "wrap" ++ "_" ++ getName nt_
                                        inhNT = "Inh" ++ "_" ++ getName nt_
                                        synNT = "Syn" ++ "_" ++ getName nt_
                                        varPat = if  _lhsIo_newtypes
                                                     then App (sdtype nt_) [SimpleExpr var]
                                                     else SimpleExpr var
                                        evalTp | null params' = id
                                               | otherwise    = idEvalType _lhsIoptions
                                        appParams nm = TypeApp (SimpleType nm) (map SimpleType params')
                                        typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))
                                        mkstrict = Named _lhsIo_strictwrap
                                        mkdata n attrs = Data n params' [Record n [mkstrict (getName f++"_"++n) $ evalTp $ typeToCodeType (Just nt_) params' t | (f,t) <- attrs]] False []
                                        datas = [mkdata inhNT inhAttrs, mkdata synNT synAttrs]
                                    in datas ++ [ typeSig
                                                , Decl (Fun wrapNT [varPat, App inhNT inhVars])
                                                      (Let _interIwrapDecls (App synNT synVars))
                                                      Set.empty Set.empty
                                                ]
                                    {-# LINE 881 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule69 #-}
   {-# LINE 875 "src-ag/GenerateCode.ag" #-}
   rule69 = \ ((_interIcomments) :: [String]) ((_prodsIcomments) :: [String]) ->
                                 {-# LINE 875 "src-ag/GenerateCode.ag" #-}
                                 Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )
                                 {-# LINE 887 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule70 #-}
   {-# LINE 940 "src-ag/GenerateCode.ag" #-}
   rule70 = \ _cataFun _comment _dataDef _genCata ((_interIsemDom) :: [Decl]) ((_lhsIo_cata) :: Bool) ((_lhsIo_data) :: Maybe Bool) ((_lhsIo_pretty) :: Bool) ((_lhsIo_sem) :: Bool) ((_lhsIo_sig) :: Bool) ((_lhsIwrappers) :: Set NontermIdent) ((_prodsIdecls) :: Decls) ((_prodsIsemNames) :: [String]) _semWrapper nt_ ->
                                 {-# LINE 940 "src-ag/GenerateCode.ag" #-}
                                 [ Chunk (getName nt_)
                                        (Comment (getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-'))
                                        (if _lhsIo_pretty                  then [_comment    ]   else [])
                                        (if isJust _lhsIo_data             then [_dataDef    ]   else [])
                                        (if _lhsIo_cata && _genCata        then  _cataFun        else [])
                                        (if _lhsIo_sig                     then  _interIsemDom   else [])
                                        (if nt_ `Set.member` _lhsIwrappers then  _semWrapper     else [])
                                        (if _lhsIo_sem                     then  _prodsIdecls     else [])
                                        (if _lhsIo_sem                     then  _prodsIsemNames  else [])
                                 ]
                                 {-# LINE 902 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule71 #-}
   {-# LINE 1010 "src-ag/GenerateCode.ag" #-}
   rule71 = \ ((_lhsIderivings) :: Derivings) ((_lhsIo_data) :: Maybe Bool) ((_lhsIoptions) :: Options) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdataAlts) :: DataAlts) nt_ params_ ->
                                 {-# LINE 1010 "src-ag/GenerateCode.ag" #-}
                                 let params' = map getName params_
                                     typeSyn tp = let theType =
                                                        case tp of
                                                          CommonTypes.Maybe t      -> TMaybe $ typeToCodeType (Just nt_) params' t
                                                          CommonTypes.Either t1 t2 -> TEither (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)
                                                          CommonTypes.Map t1 t2    -> TMap (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)
                                                          CommonTypes.IntMap t     -> TIntMap $ typeToCodeType (Just nt_) params' t
                                                          CommonTypes.List t       -> Code.List $ typeToCodeType (Just nt_) params' t
                                                          CommonTypes.Tuple ts     -> Code.TupleType [typeToCodeType (Just nt_) params' t | (_,t) <- ts ]
                                                          CommonTypes.OrdSet t     -> TSet $ typeToCodeType (Just nt_) params' t
                                                          CommonTypes.IntSet       -> TIntSet
                                                   in Code.Type (getName nt_) params' (idEvalType _lhsIoptions theType)
                                     derivings  = maybe [] (map getName . Set.toList) (Map.lookup nt_ _lhsIderivings)
                                     dataDef    = Data (getName nt_) (map getName params_) _prodsIdataAlts (maybe False id _lhsIo_data) derivings
                                 in maybe dataDef typeSyn $ lookup nt_ _lhsItypeSyns
                                 {-# LINE 922 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule72 #-}
   {-# LINE 1054 "src-ag/GenerateCode.ag" #-}
   rule72 = \ ((_lhsIoptions) :: Options) nt_ ->
                                 {-# LINE 1054 "src-ag/GenerateCode.ag" #-}
                                 not (nt_ `Set.member` nocatas _lhsIoptions)
                                 {-# LINE 928 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule73 #-}
   {-# LINE 1055 "src-ag/GenerateCode.ag" #-}
   rule73 = \ ((_lhsIcontextMap) :: ContextMap) ((_lhsIo_sig) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIprefix) :: String) ((_lhsIquantMap) :: QuantMap) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIcataAlts) :: Decls) nt_ params_ ->
                                 {-# LINE 1055 "src-ag/GenerateCode.ag" #-}
                                 let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))
                                     evalTp | null params_ = id
                                            | otherwise    = idEvalType _lhsIoptions
                                     tSig = TSig (cataname _lhsIprefix nt_)
                                                 (appQuant _lhsIquantMap nt_ $ appContext _lhsIcontextMap nt_ $ evalTp $ appParams (getName nt_) `Arr` appParams (sdtype nt_))
                                     special typ = case typ of
                                                   CommonTypes.List tp ->
                                                       let cons = SimpleExpr (semname _lhsIprefix nt_ (identifier "Cons"))
                                                           nil  = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))
                                                           arg  = SimpleExpr "list"
                                                           rarg = case tp of
                                                                    NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                                in SimpleExpr ("(Prelude.map " ++ (cataname _lhsIprefix t') ++ " list)")
                                                                    _        -> arg
                                                           lhs = Fun (cataname _lhsIprefix nt_) [arg]
                                                           rhs = (App "Prelude.foldr" [cons,nil,rarg])
                                                       in  [Decl lhs rhs Set.empty Set.empty]
                                                   CommonTypes.Maybe tp ->
                                                       let just    = semname _lhsIprefix nt_ (identifier "Just")
                                                           nothing = semname _lhsIprefix nt_ (identifier "Nothing" )
                                                           arg  = SimpleExpr "x"
                                                           rarg = case tp of
                                                                    NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                                in App (cataname _lhsIprefix t') [arg]
                                                                    _        -> arg
                                                           lhs a = Fun (cataname _lhsIprefix nt_) [a]
                                                       in  [Decl (lhs (App "Prelude.Just" [arg]))     (App just [rarg])    Set.empty Set.empty
                                                           ,Decl (lhs (SimpleExpr "Prelude.Nothing")) (SimpleExpr nothing) Set.empty Set.empty
                                                           ]
                                                   CommonTypes.Either tp1 tp2 ->
                                                       let left  = semname _lhsIprefix nt_ (identifier "Left")
                                                           right = semname _lhsIprefix nt_ (identifier "Right" )
                                                           arg   = SimpleExpr "x"
                                                           rarg0 = case tp1 of
                                                                    NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                                in App (cataname _lhsIprefix t') [arg]
                                                                    _        -> arg
                                                           rarg1 = case tp2 of
                                                                    NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                                in App (cataname _lhsIprefix t') [arg]
                                                                    _        -> arg
                                                           lhs a = Fun (cataname _lhsIprefix nt_) [a]
                                                       in  [Decl (lhs (App "Prelude.Left"  [arg]))     (App left  [rarg0])    Set.empty Set.empty
                                                           ,Decl (lhs (App "Prelude.Right" [arg]))     (App right [rarg1])    Set.empty Set.empty
                                                           ]
                                                   CommonTypes.Map _ tp ->
                                                     let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))
                                                         nil   = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))
                                                         arg   = SimpleExpr "m"
                                                         rarg  = case tp of
                                                                   NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                               in App "Data.Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]
                                                                   _        -> arg
                                                         lhs   = Fun (cataname _lhsIprefix nt_) [arg]
                                                         rhs   = App "Data.Map.foldrWithKey" [entry,nil,rarg]
                                                     in [Decl lhs rhs Set.empty Set.empty]
                                                   CommonTypes.IntMap tp ->
                                                     let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))
                                                         nil   = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))
                                                         arg   = SimpleExpr "m"
                                                         rarg  = case tp of
                                                                   NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                               in App "Data.IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]
                                                                   _        -> arg
                                                         lhs   = Fun (cataname _lhsIprefix nt_) [arg]
                                                         rhs   = App "Data.IntMap.foldWithKey" [entry,nil,rarg]
                                                     in [Decl lhs rhs Set.empty Set.empty]
                                                   CommonTypes.Tuple tps ->
                                                       let con  = semname _lhsIprefix nt_ (identifier "Tuple")
                                                           tps' = [ (SimpleExpr (getName x),y) | (x,y) <- tps]
                                                           rargs = map rarg tps'
                                                           rarg (n, tp) = case tp of
                                                                    NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                                in App (cataname _lhsIprefix t') [n]
                                                                    _        -> n
                                                           lhs = Fun (cataname _lhsIprefix nt_) [TupleExpr (map fst tps')]
                                                           rhs = App con rargs
                                                       in  [Decl lhs rhs Set.empty Set.empty]
                                                   CommonTypes.OrdSet tp ->
                                                       let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))
                                                           nil   = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))
                                                           arg   = SimpleExpr "set"
                                                           rentry = case tp of
                                                                     NT t _ _ -> let t' = maybe t id (deforestedNt t)
                                                                                 in App "(.)" [entry, SimpleExpr $ cataname _lhsIprefix t']
                                                                     _        -> entry
                                                           lhs = Fun (cataname _lhsIprefix nt_) [arg]
                                                           rhs = (App "Data.Set.foldr" [rentry,nil,arg])
                                                       in  [Decl lhs rhs Set.empty Set.empty]
                                                   CommonTypes.IntSet ->
                                                       let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))
                                                           nil   = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))
                                                           arg   = SimpleExpr "set"
                                                           lhs = Fun (cataname _lhsIprefix nt_) [arg]
                                                           rhs = (App "Data.IntSet.foldr" [entry,nil,arg])
                                                       in  [Decl lhs rhs Set.empty Set.empty]
                                 in  Comment "cata" :
                                     (if _lhsIo_sig then [tSig] else []) ++
                                     maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)
                                 {-# LINE 1032 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule74 #-}
   rule74 = \ ((_interIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->
     _interIsemDomUnfoldGath
   {-# INLINE rule75 #-}
   rule75 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule76 #-}
   rule76 = \ ((_lhsIallPragmas) :: PragmaMap) ->
     _lhsIallPragmas
   {-# INLINE rule77 #-}
   rule77 = \ _aroundMap ->
     _aroundMap
   {-# INLINE rule78 #-}
   rule78 = \ ((_lhsIcontextMap) :: ContextMap) ->
     _lhsIcontextMap
   {-# INLINE rule79 #-}
   rule79 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule80 #-}
   rule80 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule81 #-}
   rule81 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule82 #-}
   rule82 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule83 #-}
   rule83 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule84 #-}
   rule84 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule85 #-}
   rule85 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule86 #-}
   rule86 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule87 #-}
   rule87 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule88 #-}
   rule88 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule89 #-}
   rule89 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule90 #-}
   rule90 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule91 #-}
   rule91 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule92 #-}
   rule92 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule93 #-}
   rule93 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule94 #-}
   rule94 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule95 #-}
   rule95 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule96 #-}
   rule96 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule97 #-}
   rule97 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule98 #-}
   rule98 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule99 #-}
   rule99 = \ ((_lhsIquantMap) :: QuantMap) ->
     _lhsIquantMap
   {-# INLINE rule100 #-}
   rule100 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule101 #-}
   rule101 = \ ((_lhsIwith_sig) :: Bool) ->
     _lhsIwith_sig
   {-# INLINE rule102 #-}
   rule102 = \ ((_lhsIwrappers) :: Set NontermIdent) ->
     _lhsIwrappers
   {-# INLINE rule103 #-}
   rule103 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule104 #-}
   rule104 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule105 #-}
   rule105 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule106 #-}
   rule106 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule107 #-}
   rule107 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule108 #-}
   rule108 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule109 #-}
   rule109 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule110 #-}
   rule110 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule111 #-}
   rule111 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule112 #-}
   rule112 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule113 #-}
   rule113 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule114 #-}
   rule114 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule115 #-}
   rule115 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule116 #-}
   rule116 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule117 #-}
   rule117 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule118 #-}
   rule118 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule119 #-}
   rule119 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule120 #-}
   rule120 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule121 #-}
   rule121 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix

-- CNonterminals -----------------------------------------------
-- wrapper
data Inh_CNonterminals  = Inh_CNonterminals { Inh_CNonterminals -> Set NontermIdent
allNts_Inh_CNonterminals :: (Set NontermIdent), Inh_CNonterminals -> PragmaMap
allPragmas_Inh_CNonterminals :: (PragmaMap), Inh_CNonterminals -> PragmaMap
aroundMap_Inh_CNonterminals :: (Map NontermIdent (Map ConstructorIdent (Set Identifier))), Inh_CNonterminals -> ContextMap
contextMap_Inh_CNonterminals :: (ContextMap), Inh_CNonterminals -> Map NontermIdent (Set NontermIdent)
derivings_Inh_CNonterminals :: (Derivings), Inh_CNonterminals
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
mergeMap_Inh_CNonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))), Inh_CNonterminals -> Bool
o_case_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_cata_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_clean_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_costcentre_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Maybe Bool
o_data_Inh_CNonterminals :: (Maybe Bool), Inh_CNonterminals -> Bool
o_linePragmas_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_monadic_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_newtypes_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_pretty_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_rename_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_sem_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_sig_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_splitsems_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_strictwrap_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_traces_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Bool
o_unbox_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Options
options_Inh_CNonterminals :: (Options), Inh_CNonterminals -> ParamMap
paramMap_Inh_CNonterminals :: (ParamMap), Inh_CNonterminals -> String
prefix_Inh_CNonterminals :: (String), Inh_CNonterminals -> QuantMap
quantMap_Inh_CNonterminals :: (QuantMap), Inh_CNonterminals -> TypeSyns
typeSyns_Inh_CNonterminals :: (TypeSyns), Inh_CNonterminals -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CNonterminals :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CNonterminals -> Bool
with_sig_Inh_CNonterminals :: (Bool), Inh_CNonterminals -> Set NontermIdent
wrappers_Inh_CNonterminals :: (Set NontermIdent) }
data Syn_CNonterminals  = Syn_CNonterminals { Syn_CNonterminals -> Chunks
chunks_Syn_CNonterminals :: (Chunks), Syn_CNonterminals -> Set NontermIdent
gathNts_Syn_CNonterminals :: (Set NontermIdent), Syn_CNonterminals -> Map (NontermIdent, Int) ([String], Type)
semDomUnfoldGath_Syn_CNonterminals :: (Map (NontermIdent, Int) ([String], Code.Type)) }
{-# INLINABLE wrap_CNonterminals #-}
wrap_CNonterminals :: T_CNonterminals  -> Inh_CNonterminals  -> (Syn_CNonterminals )
wrap_CNonterminals :: T_CNonterminals -> Inh_CNonterminals -> Syn_CNonterminals
wrap_CNonterminals (T_CNonterminals Identity T_CNonterminals_s11
act) (Inh_CNonterminals Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CNonterminals_s11
sem <- Identity T_CNonterminals_s11
act
        let arg10 :: T_CNonterminals_vIn10
arg10 = Set NontermIdent
-> PragmaMap
-> PragmaMap
-> ContextMap
-> Map NontermIdent (Set NontermIdent)
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> TypeSyns
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CNonterminals_vIn10
T_CNonterminals_vIn10 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers
        (T_CNonterminals_vOut10 Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 T_CNonterminals_s11
sem T_CNonterminals_vIn10
arg10)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Chunks
-> Set NontermIdent
-> Map (NontermIdent, Int) ([String], Type)
-> Syn_CNonterminals
Syn_CNonterminals Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath)
   )

-- cata
{-# NOINLINE sem_CNonterminals #-}
sem_CNonterminals :: CNonterminals  -> T_CNonterminals 
sem_CNonterminals :: CNonterminals -> T_CNonterminals
sem_CNonterminals CNonterminals
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CNonterminal -> T_CNonterminals -> T_CNonterminals
sem_CNonterminals_Cons T_CNonterminals
sem_CNonterminals_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map CNonterminal -> T_CNonterminal
sem_CNonterminal CNonterminals
list)

-- semantic domain
newtype T_CNonterminals  = T_CNonterminals {
                                           T_CNonterminals -> Identity T_CNonterminals_s11
attach_T_CNonterminals :: Identity (T_CNonterminals_s11 )
                                           }
newtype T_CNonterminals_s11  = C_CNonterminals_s11 {
                                                   T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 :: (T_CNonterminals_v10 )
                                                   }
data T_CNonterminals_s12  = C_CNonterminals_s12
type T_CNonterminals_v10  = (T_CNonterminals_vIn10 ) -> (T_CNonterminals_vOut10 )
data T_CNonterminals_vIn10  = T_CNonterminals_vIn10 (Set NontermIdent) (PragmaMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) (ContextMap) (Derivings) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (TypeSyns) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)
data T_CNonterminals_vOut10  = T_CNonterminals_vOut10 (Chunks) (Set NontermIdent) (Map (NontermIdent, Int) ([String], Code.Type))
{-# NOINLINE sem_CNonterminals_Cons #-}
sem_CNonterminals_Cons :: T_CNonterminal  -> T_CNonterminals  -> T_CNonterminals 
sem_CNonterminals_Cons :: T_CNonterminal -> T_CNonterminals -> T_CNonterminals
sem_CNonterminals_Cons T_CNonterminal
arg_hd_ T_CNonterminals
arg_tl_ = Identity T_CNonterminals_s11 -> T_CNonterminals
T_CNonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_CNonterminals_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_CNonterminals_s11
st11 = let
      v10 :: T_CNonterminals_v10 
      v10 :: T_CNonterminals_v10
v10 = \ (T_CNonterminals_vIn10 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _hdX8 :: T_CNonterminal_s8
_hdX8 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CNonterminal -> Identity T_CNonterminal_s8
attach_T_CNonterminal (T_CNonterminal
arg_hd_))
         _tlX11 :: T_CNonterminals_s11
_tlX11 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CNonterminals -> Identity T_CNonterminals_s11
attach_T_CNonterminals (T_CNonterminals
arg_tl_))
         (T_CNonterminal_vOut7 Chunks
_hdIchunks Set NontermIdent
_hdIgathNts Map (NontermIdent, Int) ([String], Type)
_hdIsemDomUnfoldGath) = T_CNonterminal_s8 -> T_CNonterminal_v7
inv_CNonterminal_s8 T_CNonterminal_s8
_hdX8 (Set NontermIdent
-> PragmaMap
-> PragmaMap
-> ContextMap
-> Map NontermIdent (Set NontermIdent)
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> TypeSyns
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CNonterminal_vIn7
T_CNonterminal_vIn7 Set NontermIdent
_hdOallNts PragmaMap
_hdOallPragmas PragmaMap
_hdOaroundMap ContextMap
_hdOcontextMap Map NontermIdent (Set NontermIdent)
_hdOderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_hdOmergeMap Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_clean Bool
_hdOo_costcentre Maybe Bool
_hdOo_data Bool
_hdOo_linePragmas Bool
_hdOo_monadic Bool
_hdOo_newtypes Bool
_hdOo_pretty Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_splitsems Bool
_hdOo_strictwrap Bool
_hdOo_traces Bool
_hdOo_unbox Options
_hdOoptions ParamMap
_hdOparamMap String
_hdOprefix QuantMap
_hdOquantMap TypeSyns
_hdOtypeSyns NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom Bool
_hdOwith_sig Set NontermIdent
_hdOwrappers)
         (T_CNonterminals_vOut10 Chunks
_tlIchunks Set NontermIdent
_tlIgathNts Map (NontermIdent, Int) ([String], Type)
_tlIsemDomUnfoldGath) = T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 T_CNonterminals_s11
_tlX11 (Set NontermIdent
-> PragmaMap
-> PragmaMap
-> ContextMap
-> Map NontermIdent (Set NontermIdent)
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> TypeSyns
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CNonterminals_vIn10
T_CNonterminals_vIn10 Set NontermIdent
_tlOallNts PragmaMap
_tlOallPragmas PragmaMap
_tlOaroundMap ContextMap
_tlOcontextMap Map NontermIdent (Set NontermIdent)
_tlOderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_tlOmergeMap Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_clean Bool
_tlOo_costcentre Maybe Bool
_tlOo_data Bool
_tlOo_linePragmas Bool
_tlOo_monadic Bool
_tlOo_newtypes Bool
_tlOo_pretty Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_splitsems Bool
_tlOo_strictwrap Bool
_tlOo_traces Bool
_tlOo_unbox Options
_tlOoptions ParamMap
_tlOparamMap String
_tlOprefix QuantMap
_tlOquantMap TypeSyns
_tlOtypeSyns NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom Bool
_tlOwith_sig Set NontermIdent
_tlOwrappers)
         _lhsOchunks :: Chunks
         _lhsOchunks :: Chunks
_lhsOchunks = Chunks -> Chunks -> Chunks
rule122 Chunks
_hdIchunks Chunks
_tlIchunks
         _lhsOgathNts :: Set NontermIdent
         _lhsOgathNts :: Set NontermIdent
_lhsOgathNts = Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule123 Set NontermIdent
_hdIgathNts Set NontermIdent
_tlIgathNts
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
rule124 Map (NontermIdent, Int) ([String], Type)
_hdIsemDomUnfoldGath Map (NontermIdent, Int) ([String], Type)
_tlIsemDomUnfoldGath
         _hdOallNts :: Set NontermIdent
_hdOallNts = Set NontermIdent -> Set NontermIdent
rule125 Set NontermIdent
_lhsIallNts
         _hdOallPragmas :: PragmaMap
_hdOallPragmas = PragmaMap -> PragmaMap
rule126 PragmaMap
_lhsIallPragmas
         _hdOaroundMap :: PragmaMap
_hdOaroundMap = PragmaMap -> PragmaMap
rule127 PragmaMap
_lhsIaroundMap
         _hdOcontextMap :: ContextMap
_hdOcontextMap = ContextMap -> ContextMap
rule128 ContextMap
_lhsIcontextMap
         _hdOderivings :: Map NontermIdent (Set NontermIdent)
_hdOderivings = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule129 Map NontermIdent (Set NontermIdent)
_lhsIderivings
         _hdOmergeMap :: Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_hdOmergeMap = Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
rule130 Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule131 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule132 Bool
_lhsIo_cata
         _hdOo_clean :: Bool
_hdOo_clean = Bool -> Bool
rule133 Bool
_lhsIo_clean
         _hdOo_costcentre :: Bool
_hdOo_costcentre = Bool -> Bool
rule134 Bool
_lhsIo_costcentre
         _hdOo_data :: Maybe Bool
_hdOo_data = Maybe Bool -> Maybe Bool
rule135 Maybe Bool
_lhsIo_data
         _hdOo_linePragmas :: Bool
_hdOo_linePragmas = Bool -> Bool
rule136 Bool
_lhsIo_linePragmas
         _hdOo_monadic :: Bool
_hdOo_monadic = Bool -> Bool
rule137 Bool
_lhsIo_monadic
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule138 Bool
_lhsIo_newtypes
         _hdOo_pretty :: Bool
_hdOo_pretty = Bool -> Bool
rule139 Bool
_lhsIo_pretty
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule140 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule141 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule142 Bool
_lhsIo_sig
         _hdOo_splitsems :: Bool
_hdOo_splitsems = Bool -> Bool
rule143 Bool
_lhsIo_splitsems
         _hdOo_strictwrap :: Bool
_hdOo_strictwrap = Bool -> Bool
rule144 Bool
_lhsIo_strictwrap
         _hdOo_traces :: Bool
_hdOo_traces = Bool -> Bool
rule145 Bool
_lhsIo_traces
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule146 Bool
_lhsIo_unbox
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule147 Options
_lhsIoptions
         _hdOparamMap :: ParamMap
_hdOparamMap = ParamMap -> ParamMap
rule148 ParamMap
_lhsIparamMap
         _hdOprefix :: String
_hdOprefix = String -> String
rule149 String
_lhsIprefix
         _hdOquantMap :: QuantMap
_hdOquantMap = QuantMap -> QuantMap
rule150 QuantMap
_lhsIquantMap
         _hdOtypeSyns :: TypeSyns
_hdOtypeSyns = TypeSyns -> TypeSyns
rule151 TypeSyns
_lhsItypeSyns
         _hdOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule152 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _hdOwith_sig :: Bool
_hdOwith_sig = Bool -> Bool
rule153 Bool
_lhsIwith_sig
         _hdOwrappers :: Set NontermIdent
_hdOwrappers = Set NontermIdent -> Set NontermIdent
rule154 Set NontermIdent
_lhsIwrappers
         _tlOallNts :: Set NontermIdent
_tlOallNts = Set NontermIdent -> Set NontermIdent
rule155 Set NontermIdent
_lhsIallNts
         _tlOallPragmas :: PragmaMap
_tlOallPragmas = PragmaMap -> PragmaMap
rule156 PragmaMap
_lhsIallPragmas
         _tlOaroundMap :: PragmaMap
_tlOaroundMap = PragmaMap -> PragmaMap
rule157 PragmaMap
_lhsIaroundMap
         _tlOcontextMap :: ContextMap
_tlOcontextMap = ContextMap -> ContextMap
rule158 ContextMap
_lhsIcontextMap
         _tlOderivings :: Map NontermIdent (Set NontermIdent)
_tlOderivings = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule159 Map NontermIdent (Set NontermIdent)
_lhsIderivings
         _tlOmergeMap :: Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_tlOmergeMap = Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
rule160 Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule161 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule162 Bool
_lhsIo_cata
         _tlOo_clean :: Bool
_tlOo_clean = Bool -> Bool
rule163 Bool
_lhsIo_clean
         _tlOo_costcentre :: Bool
_tlOo_costcentre = Bool -> Bool
rule164 Bool
_lhsIo_costcentre
         _tlOo_data :: Maybe Bool
_tlOo_data = Maybe Bool -> Maybe Bool
rule165 Maybe Bool
_lhsIo_data
         _tlOo_linePragmas :: Bool
_tlOo_linePragmas = Bool -> Bool
rule166 Bool
_lhsIo_linePragmas
         _tlOo_monadic :: Bool
_tlOo_monadic = Bool -> Bool
rule167 Bool
_lhsIo_monadic
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule168 Bool
_lhsIo_newtypes
         _tlOo_pretty :: Bool
_tlOo_pretty = Bool -> Bool
rule169 Bool
_lhsIo_pretty
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule170 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule171 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule172 Bool
_lhsIo_sig
         _tlOo_splitsems :: Bool
_tlOo_splitsems = Bool -> Bool
rule173 Bool
_lhsIo_splitsems
         _tlOo_strictwrap :: Bool
_tlOo_strictwrap = Bool -> Bool
rule174 Bool
_lhsIo_strictwrap
         _tlOo_traces :: Bool
_tlOo_traces = Bool -> Bool
rule175 Bool
_lhsIo_traces
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule176 Bool
_lhsIo_unbox
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule177 Options
_lhsIoptions
         _tlOparamMap :: ParamMap
_tlOparamMap = ParamMap -> ParamMap
rule178 ParamMap
_lhsIparamMap
         _tlOprefix :: String
_tlOprefix = String -> String
rule179 String
_lhsIprefix
         _tlOquantMap :: QuantMap
_tlOquantMap = QuantMap -> QuantMap
rule180 QuantMap
_lhsIquantMap
         _tlOtypeSyns :: TypeSyns
_tlOtypeSyns = TypeSyns -> TypeSyns
rule181 TypeSyns
_lhsItypeSyns
         _tlOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule182 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _tlOwith_sig :: Bool
_tlOwith_sig = Bool -> Bool
rule183 Bool
_lhsIwith_sig
         _tlOwrappers :: Set NontermIdent
_tlOwrappers = Set NontermIdent -> Set NontermIdent
rule184 Set NontermIdent
_lhsIwrappers
         __result_ :: T_CNonterminals_vOut10
__result_ = Chunks
-> Set NontermIdent
-> Map (NontermIdent, Int) ([String], Type)
-> T_CNonterminals_vOut10
T_CNonterminals_vOut10 Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath
         in T_CNonterminals_vOut10
__result_ )
     in T_CNonterminals_v10 -> T_CNonterminals_s11
C_CNonterminals_s11 T_CNonterminals_v10
v10
   {-# INLINE rule122 #-}
   rule122 :: Chunks -> Chunks -> Chunks
rule122 = \ ((Chunks
_hdIchunks) :: Chunks) ((Chunks
_tlIchunks) :: Chunks) ->
     Chunks
_hdIchunks forall a. [a] -> [a] -> [a]
++ Chunks
_tlIchunks
   {-# INLINE rule123 #-}
   rule123 :: Set NontermIdent -> Set NontermIdent -> Set NontermIdent
rule123 = \ ((Set NontermIdent
_hdIgathNts) :: Set NontermIdent) ((Set NontermIdent
_tlIgathNts) :: Set NontermIdent) ->
     Set NontermIdent
_hdIgathNts forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set NontermIdent
_tlIgathNts
   {-# INLINE rule124 #-}
   rule124 :: Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
rule124 = \ ((Map (NontermIdent, Int) ([String], Type)
_hdIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ((Map (NontermIdent, Int) ([String], Type)
_tlIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->
     Map (NontermIdent, Int) ([String], Type)
_hdIsemDomUnfoldGath forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map (NontermIdent, Int) ([String], Type)
_tlIsemDomUnfoldGath
   {-# INLINE rule125 #-}
   rule125 :: Set NontermIdent -> Set NontermIdent
rule125 = \ ((Set NontermIdent
_lhsIallNts) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNts
   {-# INLINE rule126 #-}
   rule126 :: PragmaMap -> PragmaMap
rule126 = \ ((PragmaMap
_lhsIallPragmas) :: PragmaMap) ->
     PragmaMap
_lhsIallPragmas
   {-# INLINE rule127 #-}
   rule127 :: PragmaMap -> PragmaMap
rule127 = \ ((PragmaMap
_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->
     PragmaMap
_lhsIaroundMap
   {-# INLINE rule128 #-}
   rule128 :: ContextMap -> ContextMap
rule128 = \ ((ContextMap
_lhsIcontextMap) :: ContextMap) ->
     ContextMap
_lhsIcontextMap
   {-# INLINE rule129 #-}
   rule129 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule129 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIderivings) :: Derivings) ->
     Map NontermIdent (Set NontermIdent)
_lhsIderivings
   {-# INLINE rule130 #-}
   rule130 :: Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
rule130 = \ ((Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->
     Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap
   {-# INLINE rule131 #-}
   rule131 :: Bool -> Bool
rule131 = \ ((Bool
_lhsIo_case) :: Bool) ->
     Bool
_lhsIo_case
   {-# INLINE rule132 #-}
   rule132 :: Bool -> Bool
rule132 = \ ((Bool
_lhsIo_cata) :: Bool) ->
     Bool
_lhsIo_cata
   {-# INLINE rule133 #-}
   rule133 :: Bool -> Bool
rule133 = \ ((Bool
_lhsIo_clean) :: Bool) ->
     Bool
_lhsIo_clean
   {-# INLINE rule134 #-}
   rule134 :: Bool -> Bool
rule134 = \ ((Bool
_lhsIo_costcentre) :: Bool) ->
     Bool
_lhsIo_costcentre
   {-# INLINE rule135 #-}
   rule135 :: Maybe Bool -> Maybe Bool
rule135 = \ ((Maybe Bool
_lhsIo_data) :: Maybe Bool) ->
     Maybe Bool
_lhsIo_data
   {-# INLINE rule136 #-}
   rule136 :: Bool -> Bool
rule136 = \ ((Bool
_lhsIo_linePragmas) :: Bool) ->
     Bool
_lhsIo_linePragmas
   {-# INLINE rule137 #-}
   rule137 :: Bool -> Bool
rule137 = \ ((Bool
_lhsIo_monadic) :: Bool) ->
     Bool
_lhsIo_monadic
   {-# INLINE rule138 #-}
   rule138 :: Bool -> Bool
rule138 = \ ((Bool
_lhsIo_newtypes) :: Bool) ->
     Bool
_lhsIo_newtypes
   {-# INLINE rule139 #-}
   rule139 :: Bool -> Bool
rule139 = \ ((Bool
_lhsIo_pretty) :: Bool) ->
     Bool
_lhsIo_pretty
   {-# INLINE rule140 #-}
   rule140 :: Bool -> Bool
rule140 = \ ((Bool
_lhsIo_rename) :: Bool) ->
     Bool
_lhsIo_rename
   {-# INLINE rule141 #-}
   rule141 :: Bool -> Bool
rule141 = \ ((Bool
_lhsIo_sem) :: Bool) ->
     Bool
_lhsIo_sem
   {-# INLINE rule142 #-}
   rule142 :: Bool -> Bool
rule142 = \ ((Bool
_lhsIo_sig) :: Bool) ->
     Bool
_lhsIo_sig
   {-# INLINE rule143 #-}
   rule143 :: Bool -> Bool
rule143 = \ ((Bool
_lhsIo_splitsems) :: Bool) ->
     Bool
_lhsIo_splitsems
   {-# INLINE rule144 #-}
   rule144 :: Bool -> Bool
rule144 = \ ((Bool
_lhsIo_strictwrap) :: Bool) ->
     Bool
_lhsIo_strictwrap
   {-# INLINE rule145 #-}
   rule145 :: Bool -> Bool
rule145 = \ ((Bool
_lhsIo_traces) :: Bool) ->
     Bool
_lhsIo_traces
   {-# INLINE rule146 #-}
   rule146 :: Bool -> Bool
rule146 = \ ((Bool
_lhsIo_unbox) :: Bool) ->
     Bool
_lhsIo_unbox
   {-# INLINE rule147 #-}
   rule147 :: Options -> Options
rule147 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule148 #-}
   rule148 :: ParamMap -> ParamMap
rule148 = \ ((ParamMap
_lhsIparamMap) :: ParamMap) ->
     ParamMap
_lhsIparamMap
   {-# INLINE rule149 #-}
   rule149 :: String -> String
rule149 = \ ((String
_lhsIprefix) :: String) ->
     String
_lhsIprefix
   {-# INLINE rule150 #-}
   rule150 :: QuantMap -> QuantMap
rule150 = \ ((QuantMap
_lhsIquantMap) :: QuantMap) ->
     QuantMap
_lhsIquantMap
   {-# INLINE rule151 #-}
   rule151 :: TypeSyns -> TypeSyns
rule151 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
     TypeSyns
_lhsItypeSyns
   {-# INLINE rule152 #-}
   rule152 :: (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule152 = \ ((NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
   {-# INLINE rule153 #-}
   rule153 :: Bool -> Bool
rule153 = \ ((Bool
_lhsIwith_sig) :: Bool) ->
     Bool
_lhsIwith_sig
   {-# INLINE rule154 #-}
   rule154 :: Set NontermIdent -> Set NontermIdent
rule154 = \ ((Set NontermIdent
_lhsIwrappers) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIwrappers
   {-# INLINE rule155 #-}
   rule155 :: Set NontermIdent -> Set NontermIdent
rule155 = \ ((Set NontermIdent
_lhsIallNts) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIallNts
   {-# INLINE rule156 #-}
   rule156 :: PragmaMap -> PragmaMap
rule156 = \ ((PragmaMap
_lhsIallPragmas) :: PragmaMap) ->
     PragmaMap
_lhsIallPragmas
   {-# INLINE rule157 #-}
   rule157 :: PragmaMap -> PragmaMap
rule157 = \ ((PragmaMap
_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->
     PragmaMap
_lhsIaroundMap
   {-# INLINE rule158 #-}
   rule158 :: ContextMap -> ContextMap
rule158 = \ ((ContextMap
_lhsIcontextMap) :: ContextMap) ->
     ContextMap
_lhsIcontextMap
   {-# INLINE rule159 #-}
   rule159 :: Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule159 = \ ((Map NontermIdent (Set NontermIdent)
_lhsIderivings) :: Derivings) ->
     Map NontermIdent (Set NontermIdent)
_lhsIderivings
   {-# INLINE rule160 #-}
   rule160 :: Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
-> Map
     NontermIdent
     (Map
        NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
rule160 = \ ((Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->
     Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap
   {-# INLINE rule161 #-}
   rule161 :: Bool -> Bool
rule161 = \ ((Bool
_lhsIo_case) :: Bool) ->
     Bool
_lhsIo_case
   {-# INLINE rule162 #-}
   rule162 :: Bool -> Bool
rule162 = \ ((Bool
_lhsIo_cata) :: Bool) ->
     Bool
_lhsIo_cata
   {-# INLINE rule163 #-}
   rule163 :: Bool -> Bool
rule163 = \ ((Bool
_lhsIo_clean) :: Bool) ->
     Bool
_lhsIo_clean
   {-# INLINE rule164 #-}
   rule164 :: Bool -> Bool
rule164 = \ ((Bool
_lhsIo_costcentre) :: Bool) ->
     Bool
_lhsIo_costcentre
   {-# INLINE rule165 #-}
   rule165 :: Maybe Bool -> Maybe Bool
rule165 = \ ((Maybe Bool
_lhsIo_data) :: Maybe Bool) ->
     Maybe Bool
_lhsIo_data
   {-# INLINE rule166 #-}
   rule166 :: Bool -> Bool
rule166 = \ ((Bool
_lhsIo_linePragmas) :: Bool) ->
     Bool
_lhsIo_linePragmas
   {-# INLINE rule167 #-}
   rule167 :: Bool -> Bool
rule167 = \ ((Bool
_lhsIo_monadic) :: Bool) ->
     Bool
_lhsIo_monadic
   {-# INLINE rule168 #-}
   rule168 :: Bool -> Bool
rule168 = \ ((Bool
_lhsIo_newtypes) :: Bool) ->
     Bool
_lhsIo_newtypes
   {-# INLINE rule169 #-}
   rule169 :: Bool -> Bool
rule169 = \ ((Bool
_lhsIo_pretty) :: Bool) ->
     Bool
_lhsIo_pretty
   {-# INLINE rule170 #-}
   rule170 :: Bool -> Bool
rule170 = \ ((Bool
_lhsIo_rename) :: Bool) ->
     Bool
_lhsIo_rename
   {-# INLINE rule171 #-}
   rule171 :: Bool -> Bool
rule171 = \ ((Bool
_lhsIo_sem) :: Bool) ->
     Bool
_lhsIo_sem
   {-# INLINE rule172 #-}
   rule172 :: Bool -> Bool
rule172 = \ ((Bool
_lhsIo_sig) :: Bool) ->
     Bool
_lhsIo_sig
   {-# INLINE rule173 #-}
   rule173 :: Bool -> Bool
rule173 = \ ((Bool
_lhsIo_splitsems) :: Bool) ->
     Bool
_lhsIo_splitsems
   {-# INLINE rule174 #-}
   rule174 :: Bool -> Bool
rule174 = \ ((Bool
_lhsIo_strictwrap) :: Bool) ->
     Bool
_lhsIo_strictwrap
   {-# INLINE rule175 #-}
   rule175 :: Bool -> Bool
rule175 = \ ((Bool
_lhsIo_traces) :: Bool) ->
     Bool
_lhsIo_traces
   {-# INLINE rule176 #-}
   rule176 :: Bool -> Bool
rule176 = \ ((Bool
_lhsIo_unbox) :: Bool) ->
     Bool
_lhsIo_unbox
   {-# INLINE rule177 #-}
   rule177 :: Options -> Options
rule177 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule178 #-}
   rule178 :: ParamMap -> ParamMap
rule178 = \ ((ParamMap
_lhsIparamMap) :: ParamMap) ->
     ParamMap
_lhsIparamMap
   {-# INLINE rule179 #-}
   rule179 :: String -> String
rule179 = \ ((String
_lhsIprefix) :: String) ->
     String
_lhsIprefix
   {-# INLINE rule180 #-}
   rule180 :: QuantMap -> QuantMap
rule180 = \ ((QuantMap
_lhsIquantMap) :: QuantMap) ->
     QuantMap
_lhsIquantMap
   {-# INLINE rule181 #-}
   rule181 :: TypeSyns -> TypeSyns
rule181 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
     TypeSyns
_lhsItypeSyns
   {-# INLINE rule182 #-}
   rule182 :: (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule182 = \ ((NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
   {-# INLINE rule183 #-}
   rule183 :: Bool -> Bool
rule183 = \ ((Bool
_lhsIwith_sig) :: Bool) ->
     Bool
_lhsIwith_sig
   {-# INLINE rule184 #-}
   rule184 :: Set NontermIdent -> Set NontermIdent
rule184 = \ ((Set NontermIdent
_lhsIwrappers) :: Set NontermIdent) ->
     Set NontermIdent
_lhsIwrappers
{-# NOINLINE sem_CNonterminals_Nil #-}
sem_CNonterminals_Nil ::  T_CNonterminals 
sem_CNonterminals_Nil :: T_CNonterminals
sem_CNonterminals_Nil  = Identity T_CNonterminals_s11 -> T_CNonterminals
T_CNonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_CNonterminals_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_CNonterminals_s11
st11 = let
      v10 :: T_CNonterminals_v10 
      v10 :: T_CNonterminals_v10
v10 = \ (T_CNonterminals_vIn10 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas PragmaMap
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent (Set NontermIdent)
_lhsIderivings Map
  NontermIdent
  (Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent])))
_lhsImergeMap Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap TypeSyns
_lhsItypeSyns NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _lhsOchunks :: Chunks
         _lhsOchunks :: Chunks
_lhsOchunks = forall {a}. () -> [a]
rule185  ()
         _lhsOgathNts :: Set NontermIdent
         _lhsOgathNts :: Set NontermIdent
_lhsOgathNts = forall {a}. () -> Set a
rule186  ()
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = forall {k} {a}. () -> Map k a
rule187  ()
         __result_ :: T_CNonterminals_vOut10
__result_ = Chunks
-> Set NontermIdent
-> Map (NontermIdent, Int) ([String], Type)
-> T_CNonterminals_vOut10
T_CNonterminals_vOut10 Chunks
_lhsOchunks Set NontermIdent
_lhsOgathNts Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath
         in T_CNonterminals_vOut10
__result_ )
     in T_CNonterminals_v10 -> T_CNonterminals_s11
C_CNonterminals_s11 T_CNonterminals_v10
v10
   {-# INLINE rule185 #-}
   rule185 :: () -> [a]
rule185 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule186 #-}
   rule186 :: () -> Set a
rule186 = \  (()
_ :: ()) ->
     forall a. Set a
Set.empty
   {-# INLINE rule187 #-}
   rule187 :: () -> Map k a
rule187 = \  (()
_ :: ()) ->
     forall k a. Map k a
Map.empty

-- CProduction -------------------------------------------------
-- wrapper
data Inh_CProduction  = Inh_CProduction { Inh_CProduction -> Set NontermIdent
allNts_Inh_CProduction :: (Set NontermIdent), Inh_CProduction -> PragmaMap
allPragmas_Inh_CProduction :: (PragmaMap), Inh_CProduction -> Map NontermIdent (Set NontermIdent)
aroundMap_Inh_CProduction :: (Map ConstructorIdent (Set Identifier)), Inh_CProduction -> ContextMap
contextMap_Inh_CProduction :: (ContextMap), Inh_CProduction -> Map NontermIdent Type
inh_Inh_CProduction :: (Attributes), Inh_CProduction
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
mergeMap_Inh_CProduction :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))), Inh_CProduction -> NontermIdent
nt_Inh_CProduction :: (NontermIdent), Inh_CProduction -> Bool
o_case_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_cata_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_clean_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_costcentre_Inh_CProduction :: (Bool), Inh_CProduction -> Maybe Bool
o_data_Inh_CProduction :: (Maybe Bool), Inh_CProduction -> Bool
o_linePragmas_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_monadic_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_newtypes_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_pretty_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_rename_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_sem_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_sig_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_splitsems_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_strictwrap_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_traces_Inh_CProduction :: (Bool), Inh_CProduction -> Bool
o_unbox_Inh_CProduction :: (Bool), Inh_CProduction -> Options
options_Inh_CProduction :: (Options), Inh_CProduction -> ParamMap
paramMap_Inh_CProduction :: (ParamMap), Inh_CProduction -> String
prefix_Inh_CProduction :: (String), Inh_CProduction -> QuantMap
quantMap_Inh_CProduction :: (QuantMap), Inh_CProduction -> Map NontermIdent Type
syn_Inh_CProduction :: (Attributes), Inh_CProduction -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CProduction :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CProduction -> Bool
with_sig_Inh_CProduction :: (Bool), Inh_CProduction -> Set NontermIdent
wrappers_Inh_CProduction :: (Set NontermIdent) }
data Syn_CProduction  = Syn_CProduction { Syn_CProduction -> Decl
cataAlt_Syn_CProduction :: (Decl), Syn_CProduction -> [String]
comments_Syn_CProduction :: ([String]), Syn_CProduction -> DataAlt
dataAlt_Syn_CProduction :: (DataAlt), Syn_CProduction -> [Decl]
decls_Syn_CProduction :: (Decls), Syn_CProduction -> [String]
semNames_Syn_CProduction :: ([String]) }
{-# INLINABLE wrap_CProduction #-}
wrap_CProduction :: T_CProduction  -> Inh_CProduction  -> (Syn_CProduction )
wrap_CProduction :: T_CProduction -> Inh_CProduction -> Syn_CProduction
wrap_CProduction (T_CProduction Identity T_CProduction_s14
act) (Inh_CProduction Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CProduction_s14
sem <- Identity T_CProduction_s14
act
        let arg13 :: T_CProduction_vIn13
arg13 = Set NontermIdent
-> PragmaMap
-> Map NontermIdent (Set NontermIdent)
-> ContextMap
-> Map NontermIdent Type
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CProduction_vIn13
T_CProduction_vIn13 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers
        (T_CProduction_vOut13 Decl
_lhsOcataAlt [String]
_lhsOcomments DataAlt
_lhsOdataAlt [Decl]
_lhsOdecls [String]
_lhsOsemNames) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CProduction_s14 -> T_CProduction_v13
inv_CProduction_s14 T_CProduction_s14
sem T_CProduction_vIn13
arg13)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Decl
-> [String] -> DataAlt -> [Decl] -> [String] -> Syn_CProduction
Syn_CProduction Decl
_lhsOcataAlt [String]
_lhsOcomments DataAlt
_lhsOdataAlt [Decl]
_lhsOdecls [String]
_lhsOsemNames)
   )

-- cata
{-# INLINE sem_CProduction #-}
sem_CProduction :: CProduction  -> T_CProduction 
sem_CProduction :: CProduction -> T_CProduction
sem_CProduction ( CProduction NontermIdent
con_ CVisits
visits_ [(NontermIdent, Type, ChildKind)]
children_ [NontermIdent]
terminals_ ) = NontermIdent
-> T_CVisits
-> [(NontermIdent, Type, ChildKind)]
-> [NontermIdent]
-> T_CProduction
sem_CProduction_CProduction NontermIdent
con_ ( CVisits -> T_CVisits
sem_CVisits CVisits
visits_ ) [(NontermIdent, Type, ChildKind)]
children_ [NontermIdent]
terminals_

-- semantic domain
newtype T_CProduction  = T_CProduction {
                                       T_CProduction -> Identity T_CProduction_s14
attach_T_CProduction :: Identity (T_CProduction_s14 )
                                       }
newtype T_CProduction_s14  = C_CProduction_s14 {
                                               T_CProduction_s14 -> T_CProduction_v13
inv_CProduction_s14 :: (T_CProduction_v13 )
                                               }
data T_CProduction_s15  = C_CProduction_s15
type T_CProduction_v13  = (T_CProduction_vIn13 ) -> (T_CProduction_vOut13 )
data T_CProduction_vIn13  = T_CProduction_vIn13 (Set NontermIdent) (PragmaMap) (Map ConstructorIdent (Set Identifier)) (ContextMap) (Attributes) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (Attributes) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)
data T_CProduction_vOut13  = T_CProduction_vOut13 (Decl) ([String]) (DataAlt) (Decls) ([String])
{-# NOINLINE sem_CProduction_CProduction #-}
sem_CProduction_CProduction :: (ConstructorIdent) -> T_CVisits  -> ([(Identifier,Type,ChildKind)]) -> ([Identifier]) -> T_CProduction 
sem_CProduction_CProduction :: NontermIdent
-> T_CVisits
-> [(NontermIdent, Type, ChildKind)]
-> [NontermIdent]
-> T_CProduction
sem_CProduction_CProduction NontermIdent
arg_con_ T_CVisits
arg_visits_ [(NontermIdent, Type, ChildKind)]
arg_children_ [NontermIdent]
arg_terminals_ = Identity T_CProduction_s14 -> T_CProduction
T_CProduction (forall (m :: * -> *) a. Monad m => a -> m a
return T_CProduction_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_CProduction_s14
st14 = let
      v13 :: T_CProduction_v13 
      v13 :: T_CProduction_v13
v13 = \ (T_CProduction_vIn13 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _visitsX32 :: T_CVisits_s32
_visitsX32 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CVisits -> Identity T_CVisits_s32
attach_T_CVisits (T_CVisits
arg_visits_))
         (T_CVisits_vOut31 [String]
_visitsIcomments [Decl]
_visitsIdecls Map NontermIdent Int
_visitsIgatherInstVisitNrs Exprs
_visitsIintra Set String
_visitsIintraVars Bool
_visitsIisNil [String]
_visitsIsemNames Set NontermIdent
_visitsIvisitedSet) = T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 T_CVisits_s32
_visitsX32 (Set NontermIdent
-> PragmaMap
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> ContextMap
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> Bool
-> Set NontermIdent
-> T_CVisits_vIn31
T_CVisits_vIn31 Set NontermIdent
_visitsOallNts PragmaMap
_visitsOallPragmas Set NontermIdent
_visitsOaroundMap [(NontermIdent, Type, ChildKind)]
_visitsOchildren NontermIdent
_visitsOcon ContextMap
_visitsOcontextMap Map NontermIdent Type
_visitsOinh Map NontermIdent Int
_visitsOinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_visitsOmergeMap Int
_visitsOnr NontermIdent
_visitsOnt Bool
_visitsOo_case Bool
_visitsOo_cata Bool
_visitsOo_clean Bool
_visitsOo_costcentre Maybe Bool
_visitsOo_data Bool
_visitsOo_linePragmas Bool
_visitsOo_monadic Bool
_visitsOo_newtypes Bool
_visitsOo_pretty Bool
_visitsOo_rename Bool
_visitsOo_sem Bool
_visitsOo_sig Bool
_visitsOo_splitsems Bool
_visitsOo_strictwrap Bool
_visitsOo_traces Bool
_visitsOo_unbox Options
_visitsOoptions Map NontermIdent (NontermIdent, [String])
_visitsOparamInstMap ParamMap
_visitsOparamMap String
_visitsOprefix QuantMap
_visitsOquantMap Map NontermIdent Type
_visitsOsyn [NontermIdent]
_visitsOterminals NontermIdent -> Int -> [String] -> Type
_visitsOunfoldSemDom forall a. Set a
_visitsOvisitedSet Bool
_visitsOwith_sig Set NontermIdent
_visitsOwrappers)
         _visitsOcon :: NontermIdent
_visitsOcon = forall a. a -> a
rule188 NontermIdent
arg_con_
         _visitsOterminals :: [NontermIdent]
_visitsOterminals = forall a. a -> a
rule189 [NontermIdent]
arg_terminals_
         _paramInstMap :: Map NontermIdent (NontermIdent, [String])
_paramInstMap = forall {c}.
Options
-> [(NontermIdent, Type, c)]
-> Map NontermIdent (NontermIdent, [String])
rule190 Options
_lhsIoptions [(NontermIdent, Type, ChildKind)]
arg_children_
         _visitsOvisitedSet :: Set a
_visitsOvisitedSet = forall {a}. () -> Set a
rule191  ()
         _visitsOnr :: Int
_visitsOnr = () -> Int
rule192  ()
         _visitsOchildren :: [(NontermIdent, Type, ChildKind)]
_visitsOchildren = forall a. a -> a
rule193 [(NontermIdent, Type, ChildKind)]
arg_children_
         _visitsOinstVisitNrs :: Map NontermIdent Int
_visitsOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule194 Map NontermIdent Int
_visitsIgatherInstVisitNrs
         _aroundMap :: Set NontermIdent
_aroundMap = Map NontermIdent (Set NontermIdent)
-> NontermIdent -> Set NontermIdent
rule195 Map NontermIdent (Set NontermIdent)
_lhsIaroundMap NontermIdent
arg_con_
         _mergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_mergeMap = Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> NontermIdent -> Map NontermIdent (NontermIdent, [NontermIdent])
rule196 Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
arg_con_
         _firstOrderChildren :: [(NontermIdent, Type, ChildKind)]
_firstOrderChildren = forall {a}. [(a, Type, ChildKind)] -> [(a, Type, ChildKind)]
rule197 [(NontermIdent, Type, ChildKind)]
arg_children_
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {c}.
[(NontermIdent, Type, c)] -> [String] -> NontermIdent -> [String]
rule198 [(NontermIdent, Type, ChildKind)]
_firstOrderChildren [String]
_visitsIcomments NontermIdent
arg_con_
         _params :: [String]
_params = NontermIdent -> ParamMap -> [String]
rule199 NontermIdent
_lhsInt ParamMap
_lhsIparamMap
         _lhsOdataAlt :: DataAlt
         _lhsOdataAlt :: DataAlt
_lhsOdataAlt = forall {c}.
[(NontermIdent, Type, c)]
-> NontermIdent
-> Bool
-> Options
-> [String]
-> NontermIdent
-> DataAlt
rule200 [(NontermIdent, Type, ChildKind)]
_firstOrderChildren NontermIdent
_lhsInt Bool
_lhsIo_rename Options
_lhsIoptions [String]
_params NontermIdent
arg_con_
         _lhsOcataAlt :: Decl
         _lhsOcataAlt :: Decl
_lhsOcataAlt = forall {c}.
[(NontermIdent, Type, c)]
-> NontermIdent
-> Bool
-> Options
-> String
-> NontermIdent
-> Decl
rule201 [(NontermIdent, Type, ChildKind)]
_firstOrderChildren NontermIdent
_lhsInt Bool
_lhsIo_rename Options
_lhsIoptions String
_lhsIprefix NontermIdent
arg_con_
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = [Decl] -> [Decl]
rule202 [Decl]
_visitsIdecls
         _lhsOsemNames :: [String]
         _lhsOsemNames :: [String]
_lhsOsemNames = [String] -> [String]
rule203 [String]
_visitsIsemNames
         _visitsOallNts :: Set NontermIdent
_visitsOallNts = Set NontermIdent -> Set NontermIdent
rule204 Set NontermIdent
_lhsIallNts
         _visitsOallPragmas :: PragmaMap
_visitsOallPragmas = PragmaMap -> PragmaMap
rule205 PragmaMap
_lhsIallPragmas
         _visitsOaroundMap :: Set NontermIdent
_visitsOaroundMap = forall a. a -> a
rule206 Set NontermIdent
_aroundMap
         _visitsOcontextMap :: ContextMap
_visitsOcontextMap = ContextMap -> ContextMap
rule207 ContextMap
_lhsIcontextMap
         _visitsOinh :: Map NontermIdent Type
_visitsOinh = Map NontermIdent Type -> Map NontermIdent Type
rule208 Map NontermIdent Type
_lhsIinh
         _visitsOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_visitsOmergeMap = forall a. a -> a
rule209 Map NontermIdent (NontermIdent, [NontermIdent])
_mergeMap
         _visitsOnt :: NontermIdent
_visitsOnt = NontermIdent -> NontermIdent
rule210 NontermIdent
_lhsInt
         _visitsOo_case :: Bool
_visitsOo_case = Bool -> Bool
rule211 Bool
_lhsIo_case
         _visitsOo_cata :: Bool
_visitsOo_cata = Bool -> Bool
rule212 Bool
_lhsIo_cata
         _visitsOo_clean :: Bool
_visitsOo_clean = Bool -> Bool
rule213 Bool
_lhsIo_clean
         _visitsOo_costcentre :: Bool
_visitsOo_costcentre = Bool -> Bool
rule214 Bool
_lhsIo_costcentre
         _visitsOo_data :: Maybe Bool
_visitsOo_data = Maybe Bool -> Maybe Bool
rule215 Maybe Bool
_lhsIo_data
         _visitsOo_linePragmas :: Bool
_visitsOo_linePragmas = Bool -> Bool
rule216 Bool
_lhsIo_linePragmas
         _visitsOo_monadic :: Bool
_visitsOo_monadic = Bool -> Bool
rule217 Bool
_lhsIo_monadic
         _visitsOo_newtypes :: Bool
_visitsOo_newtypes = Bool -> Bool
rule218 Bool
_lhsIo_newtypes
         _visitsOo_pretty :: Bool
_visitsOo_pretty = Bool -> Bool
rule219 Bool
_lhsIo_pretty
         _visitsOo_rename :: Bool
_visitsOo_rename = Bool -> Bool
rule220 Bool
_lhsIo_rename
         _visitsOo_sem :: Bool
_visitsOo_sem = Bool -> Bool
rule221 Bool
_lhsIo_sem
         _visitsOo_sig :: Bool
_visitsOo_sig = Bool -> Bool
rule222 Bool
_lhsIo_sig
         _visitsOo_splitsems :: Bool
_visitsOo_splitsems = Bool -> Bool
rule223 Bool
_lhsIo_splitsems
         _visitsOo_strictwrap :: Bool
_visitsOo_strictwrap = Bool -> Bool
rule224 Bool
_lhsIo_strictwrap
         _visitsOo_traces :: Bool
_visitsOo_traces = Bool -> Bool
rule225 Bool
_lhsIo_traces
         _visitsOo_unbox :: Bool
_visitsOo_unbox = Bool -> Bool
rule226 Bool
_lhsIo_unbox
         _visitsOoptions :: Options
_visitsOoptions = Options -> Options
rule227 Options
_lhsIoptions
         _visitsOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_visitsOparamInstMap = forall a. a -> a
rule228 Map NontermIdent (NontermIdent, [String])
_paramInstMap
         _visitsOparamMap :: ParamMap
_visitsOparamMap = ParamMap -> ParamMap
rule229 ParamMap
_lhsIparamMap
         _visitsOprefix :: String
_visitsOprefix = String -> String
rule230 String
_lhsIprefix
         _visitsOquantMap :: QuantMap
_visitsOquantMap = QuantMap -> QuantMap
rule231 QuantMap
_lhsIquantMap
         _visitsOsyn :: Map NontermIdent Type
_visitsOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule232 Map NontermIdent Type
_lhsIsyn
         _visitsOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_visitsOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule233 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _visitsOwith_sig :: Bool
_visitsOwith_sig = Bool -> Bool
rule234 Bool
_lhsIwith_sig
         _visitsOwrappers :: Set NontermIdent
_visitsOwrappers = Set NontermIdent -> Set NontermIdent
rule235 Set NontermIdent
_lhsIwrappers
         __result_ :: T_CProduction_vOut13
__result_ = Decl
-> [String]
-> DataAlt
-> [Decl]
-> [String]
-> T_CProduction_vOut13
T_CProduction_vOut13 Decl
_lhsOcataAlt [String]
_lhsOcomments DataAlt
_lhsOdataAlt [Decl]
_lhsOdecls [String]
_lhsOsemNames
         in T_CProduction_vOut13
__result_ )
     in T_CProduction_v13 -> T_CProduction_s14
C_CProduction_s14 T_CProduction_v13
v13
   {-# INLINE rule188 #-}
   {-# LINE 92 "src-ag/GenerateCode.ag" #-}
   rule188 = \ con_ ->
                                 {-# LINE 92 "src-ag/GenerateCode.ag" #-}
                                 con_
                                 {-# LINE 1603 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule189 #-}
   {-# LINE 93 "src-ag/GenerateCode.ag" #-}
   rule189 = \ terminals_ ->
                                        {-# LINE 93 "src-ag/GenerateCode.ag" #-}
                                        terminals_
                                        {-# LINE 1609 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule190 #-}
   {-# LINE 105 "src-ag/GenerateCode.ag" #-}
   rule190 = \ ((_lhsIoptions) :: Options) children_ ->
                           {-# LINE 105 "src-ag/GenerateCode.ag" #-}
                           Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map (cleanupArg _lhsIoptions) $ nontermArgs tp, not (null tps) ]
                           {-# LINE 1615 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule191 #-}
   {-# LINE 147 "src-ag/GenerateCode.ag" #-}
   rule191 = \  (_ :: ()) ->
                                                     {-# LINE 147 "src-ag/GenerateCode.ag" #-}
                                                     Set.empty
                                                     {-# LINE 1621 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule192 #-}
   {-# LINE 283 "src-ag/GenerateCode.ag" #-}
   rule192 = \  (_ :: ()) ->
                               {-# LINE 283 "src-ag/GenerateCode.ag" #-}
                               0
                               {-# LINE 1627 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule193 #-}
   {-# LINE 418 "src-ag/GenerateCode.ag" #-}
   rule193 = \ children_ ->
                                     {-# LINE 418 "src-ag/GenerateCode.ag" #-}
                                     children_
                                     {-# LINE 1633 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule194 #-}
   {-# LINE 573 "src-ag/GenerateCode.ag" #-}
   rule194 = \ ((_visitsIgatherInstVisitNrs) :: Map Identifier Int) ->
                              {-# LINE 573 "src-ag/GenerateCode.ag" #-}
                              _visitsIgatherInstVisitNrs
                              {-# LINE 1639 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule195 #-}
   {-# LINE 593 "src-ag/GenerateCode.ag" #-}
   rule195 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) con_ ->
                                                   {-# LINE 593 "src-ag/GenerateCode.ag" #-}
                                                   Map.findWithDefault Set.empty con_ _lhsIaroundMap
                                                   {-# LINE 1645 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule196 #-}
   {-# LINE 609 "src-ag/GenerateCode.ag" #-}
   rule196 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) con_ ->
                                                  {-# LINE 609 "src-ag/GenerateCode.ag" #-}
                                                  Map.findWithDefault Map.empty con_ _lhsImergeMap
                                                  {-# LINE 1651 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule197 #-}
   {-# LINE 890 "src-ag/GenerateCode.ag" #-}
   rule197 = \ children_ ->
                                            {-# LINE 890 "src-ag/GenerateCode.ag" #-}
                                            [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]
                                            {-# LINE 1657 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule198 #-}
   {-# LINE 891 "src-ag/GenerateCode.ag" #-}
   rule198 = \ _firstOrderChildren ((_visitsIcomments) :: [String]) con_ ->
                                   {-# LINE 891 "src-ag/GenerateCode.ag" #-}
                                   ("alternative " ++ getName con_ ++ ":")
                                   : map ind (  map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren
                                             ++ _visitsIcomments
                                             )
                                   {-# LINE 1666 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule199 #-}
   {-# LINE 1034 "src-ag/GenerateCode.ag" #-}
   rule199 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->
                                {-# LINE 1034 "src-ag/GenerateCode.ag" #-}
                                map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap
                                {-# LINE 1672 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule200 #-}
   {-# LINE 1035 "src-ag/GenerateCode.ag" #-}
   rule200 = \ _firstOrderChildren ((_lhsInt) :: NontermIdent) ((_lhsIo_rename) :: Bool) ((_lhsIoptions) :: Options) _params con_ ->
                                {-# LINE 1035 "src-ag/GenerateCode.ag" #-}
                                let conNm = conname _lhsIo_rename _lhsInt con_
                                    mkFields :: (NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> a) -> [a]
                                    mkFields f = map (\(nm,t,_) -> f _lhsInt con_ nm (typeToCodeType (Just _lhsInt) _params     $ removeDeforested t)) _firstOrderChildren
                                in if dataRecords _lhsIoptions
                                   then Record conNm $ mkFields $ toNamedType (strictData _lhsIoptions)
                                   else DataAlt conNm $ mkFields $ \_ _ _ t -> t
                                {-# LINE 1683 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule201 #-}
   {-# LINE 1165 "src-ag/GenerateCode.ag" #-}
   rule201 = \ _firstOrderChildren ((_lhsInt) :: NontermIdent) ((_lhsIo_rename) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIprefix) :: String) con_ ->
                                {-# LINE 1165 "src-ag/GenerateCode.ag" #-}
                                let lhs = Fun (cataname _lhsIprefix _lhsInt) [lhs_pat]
                                    lhs_pat = App (conname _lhsIo_rename _lhsInt con_)
                                                   (map (\(n,_,_) -> SimpleExpr $ locname _lhsIoptions $ n) _firstOrderChildren    )
                                    rhs = App (semname _lhsIprefix _lhsInt con_)
                                               (map argument _firstOrderChildren    )
                                    argument (nm,NT tp _ _,_) = App (cataname _lhsIprefix tp)
                                                                     [SimpleExpr (locname _lhsIoptions nm)]
                                    argument (nm, _,_)    = SimpleExpr (locname _lhsIoptions nm)
                                 in Decl lhs rhs Set.empty Set.empty
                                {-# LINE 1697 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule202 #-}
   rule202 = \ ((_visitsIdecls) :: Decls) ->
     _visitsIdecls
   {-# INLINE rule203 #-}
   rule203 = \ ((_visitsIsemNames) :: [String]) ->
     _visitsIsemNames
   {-# INLINE rule204 #-}
   rule204 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule205 #-}
   rule205 = \ ((_lhsIallPragmas) :: PragmaMap) ->
     _lhsIallPragmas
   {-# INLINE rule206 #-}
   rule206 = \ _aroundMap ->
     _aroundMap
   {-# INLINE rule207 #-}
   rule207 = \ ((_lhsIcontextMap) :: ContextMap) ->
     _lhsIcontextMap
   {-# INLINE rule208 #-}
   rule208 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule209 #-}
   rule209 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule210 #-}
   rule210 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule211 #-}
   rule211 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule212 #-}
   rule212 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule213 #-}
   rule213 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule214 #-}
   rule214 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule215 #-}
   rule215 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule216 #-}
   rule216 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule217 #-}
   rule217 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule218 #-}
   rule218 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule219 #-}
   rule219 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule220 #-}
   rule220 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule221 #-}
   rule221 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule222 #-}
   rule222 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule223 #-}
   rule223 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule224 #-}
   rule224 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule225 #-}
   rule225 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule226 #-}
   rule226 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule227 #-}
   rule227 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule228 #-}
   rule228 = \ _paramInstMap ->
     _paramInstMap
   {-# INLINE rule229 #-}
   rule229 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule230 #-}
   rule230 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule231 #-}
   rule231 = \ ((_lhsIquantMap) :: QuantMap) ->
     _lhsIquantMap
   {-# INLINE rule232 #-}
   rule232 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule233 #-}
   rule233 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule234 #-}
   rule234 = \ ((_lhsIwith_sig) :: Bool) ->
     _lhsIwith_sig
   {-# INLINE rule235 #-}
   rule235 = \ ((_lhsIwrappers) :: Set NontermIdent) ->
     _lhsIwrappers

-- CProductions ------------------------------------------------
-- wrapper
data Inh_CProductions  = Inh_CProductions { Inh_CProductions -> Set NontermIdent
allNts_Inh_CProductions :: (Set NontermIdent), Inh_CProductions -> PragmaMap
allPragmas_Inh_CProductions :: (PragmaMap), Inh_CProductions -> Map NontermIdent (Set NontermIdent)
aroundMap_Inh_CProductions :: (Map ConstructorIdent (Set Identifier)), Inh_CProductions -> ContextMap
contextMap_Inh_CProductions :: (ContextMap), Inh_CProductions -> Map NontermIdent Type
inh_Inh_CProductions :: (Attributes), Inh_CProductions
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
mergeMap_Inh_CProductions :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))), Inh_CProductions -> NontermIdent
nt_Inh_CProductions :: (NontermIdent), Inh_CProductions -> Bool
o_case_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_cata_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_clean_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_costcentre_Inh_CProductions :: (Bool), Inh_CProductions -> Maybe Bool
o_data_Inh_CProductions :: (Maybe Bool), Inh_CProductions -> Bool
o_linePragmas_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_monadic_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_newtypes_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_pretty_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_rename_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_sem_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_sig_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_splitsems_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_strictwrap_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_traces_Inh_CProductions :: (Bool), Inh_CProductions -> Bool
o_unbox_Inh_CProductions :: (Bool), Inh_CProductions -> Options
options_Inh_CProductions :: (Options), Inh_CProductions -> ParamMap
paramMap_Inh_CProductions :: (ParamMap), Inh_CProductions -> String
prefix_Inh_CProductions :: (String), Inh_CProductions -> QuantMap
quantMap_Inh_CProductions :: (QuantMap), Inh_CProductions -> Map NontermIdent Type
syn_Inh_CProductions :: (Attributes), Inh_CProductions -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CProductions :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CProductions -> Bool
with_sig_Inh_CProductions :: (Bool), Inh_CProductions -> Set NontermIdent
wrappers_Inh_CProductions :: (Set NontermIdent) }
data Syn_CProductions  = Syn_CProductions { Syn_CProductions -> [Decl]
cataAlts_Syn_CProductions :: (Decls), Syn_CProductions -> [String]
comments_Syn_CProductions :: ([String]), Syn_CProductions -> DataAlts
dataAlts_Syn_CProductions :: (DataAlts), Syn_CProductions -> [Decl]
decls_Syn_CProductions :: (Decls), Syn_CProductions -> [String]
semNames_Syn_CProductions :: ([String]) }
{-# INLINABLE wrap_CProductions #-}
wrap_CProductions :: T_CProductions  -> Inh_CProductions  -> (Syn_CProductions )
wrap_CProductions :: T_CProductions -> Inh_CProductions -> Syn_CProductions
wrap_CProductions (T_CProductions Identity T_CProductions_s17
act) (Inh_CProductions Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CProductions_s17
sem <- Identity T_CProductions_s17
act
        let arg16 :: T_CProductions_vIn16
arg16 = Set NontermIdent
-> PragmaMap
-> Map NontermIdent (Set NontermIdent)
-> ContextMap
-> Map NontermIdent Type
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CProductions_vIn16
T_CProductions_vIn16 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers
        (T_CProductions_vOut16 [Decl]
_lhsOcataAlts [String]
_lhsOcomments DataAlts
_lhsOdataAlts [Decl]
_lhsOdecls [String]
_lhsOsemNames) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 T_CProductions_s17
sem T_CProductions_vIn16
arg16)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([Decl]
-> [String] -> DataAlts -> [Decl] -> [String] -> Syn_CProductions
Syn_CProductions [Decl]
_lhsOcataAlts [String]
_lhsOcomments DataAlts
_lhsOdataAlts [Decl]
_lhsOdecls [String]
_lhsOsemNames)
   )

-- cata
{-# NOINLINE sem_CProductions #-}
sem_CProductions :: CProductions  -> T_CProductions 
sem_CProductions :: CProductions -> T_CProductions
sem_CProductions CProductions
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CProduction -> T_CProductions -> T_CProductions
sem_CProductions_Cons T_CProductions
sem_CProductions_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map CProduction -> T_CProduction
sem_CProduction CProductions
list)

-- semantic domain
newtype T_CProductions  = T_CProductions {
                                         T_CProductions -> Identity T_CProductions_s17
attach_T_CProductions :: Identity (T_CProductions_s17 )
                                         }
newtype T_CProductions_s17  = C_CProductions_s17 {
                                                 T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 :: (T_CProductions_v16 )
                                                 }
data T_CProductions_s18  = C_CProductions_s18
type T_CProductions_v16  = (T_CProductions_vIn16 ) -> (T_CProductions_vOut16 )
data T_CProductions_vIn16  = T_CProductions_vIn16 (Set NontermIdent) (PragmaMap) (Map ConstructorIdent (Set Identifier)) (ContextMap) (Attributes) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (Attributes) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)
data T_CProductions_vOut16  = T_CProductions_vOut16 (Decls) ([String]) (DataAlts) (Decls) ([String])
{-# NOINLINE sem_CProductions_Cons #-}
sem_CProductions_Cons :: T_CProduction  -> T_CProductions  -> T_CProductions 
sem_CProductions_Cons :: T_CProduction -> T_CProductions -> T_CProductions
sem_CProductions_Cons T_CProduction
arg_hd_ T_CProductions
arg_tl_ = Identity T_CProductions_s17 -> T_CProductions
T_CProductions (forall (m :: * -> *) a. Monad m => a -> m a
return T_CProductions_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_CProductions_s17
st17 = let
      v16 :: T_CProductions_v16 
      v16 :: T_CProductions_v16
v16 = \ (T_CProductions_vIn16 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _hdX14 :: T_CProduction_s14
_hdX14 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CProduction -> Identity T_CProduction_s14
attach_T_CProduction (T_CProduction
arg_hd_))
         _tlX17 :: T_CProductions_s17
_tlX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CProductions -> Identity T_CProductions_s17
attach_T_CProductions (T_CProductions
arg_tl_))
         (T_CProduction_vOut13 Decl
_hdIcataAlt [String]
_hdIcomments DataAlt
_hdIdataAlt [Decl]
_hdIdecls [String]
_hdIsemNames) = T_CProduction_s14 -> T_CProduction_v13
inv_CProduction_s14 T_CProduction_s14
_hdX14 (Set NontermIdent
-> PragmaMap
-> Map NontermIdent (Set NontermIdent)
-> ContextMap
-> Map NontermIdent Type
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CProduction_vIn13
T_CProduction_vIn13 Set NontermIdent
_hdOallNts PragmaMap
_hdOallPragmas Map NontermIdent (Set NontermIdent)
_hdOaroundMap ContextMap
_hdOcontextMap Map NontermIdent Type
_hdOinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_hdOmergeMap NontermIdent
_hdOnt Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_clean Bool
_hdOo_costcentre Maybe Bool
_hdOo_data Bool
_hdOo_linePragmas Bool
_hdOo_monadic Bool
_hdOo_newtypes Bool
_hdOo_pretty Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_splitsems Bool
_hdOo_strictwrap Bool
_hdOo_traces Bool
_hdOo_unbox Options
_hdOoptions ParamMap
_hdOparamMap String
_hdOprefix QuantMap
_hdOquantMap Map NontermIdent Type
_hdOsyn NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom Bool
_hdOwith_sig Set NontermIdent
_hdOwrappers)
         (T_CProductions_vOut16 [Decl]
_tlIcataAlts [String]
_tlIcomments DataAlts
_tlIdataAlts [Decl]
_tlIdecls [String]
_tlIsemNames) = T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 T_CProductions_s17
_tlX17 (Set NontermIdent
-> PragmaMap
-> Map NontermIdent (Set NontermIdent)
-> ContextMap
-> Map NontermIdent Type
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> (NontermIdent -> Int -> [String] -> Type)
-> Bool
-> Set NontermIdent
-> T_CProductions_vIn16
T_CProductions_vIn16 Set NontermIdent
_tlOallNts PragmaMap
_tlOallPragmas Map NontermIdent (Set NontermIdent)
_tlOaroundMap ContextMap
_tlOcontextMap Map NontermIdent Type
_tlOinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_tlOmergeMap NontermIdent
_tlOnt Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_clean Bool
_tlOo_costcentre Maybe Bool
_tlOo_data Bool
_tlOo_linePragmas Bool
_tlOo_monadic Bool
_tlOo_newtypes Bool
_tlOo_pretty Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_splitsems Bool
_tlOo_strictwrap Bool
_tlOo_traces Bool
_tlOo_unbox Options
_tlOoptions ParamMap
_tlOparamMap String
_tlOprefix QuantMap
_tlOquantMap Map NontermIdent Type
_tlOsyn NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom Bool
_tlOwith_sig Set NontermIdent
_tlOwrappers)
         _lhsOdataAlts :: DataAlts
         _lhsOdataAlts :: DataAlts
_lhsOdataAlts = DataAlt -> DataAlts -> DataAlts
rule236 DataAlt
_hdIdataAlt DataAlts
_tlIdataAlts
         _lhsOcataAlts :: Decls
         _lhsOcataAlts :: [Decl]
_lhsOcataAlts = Decl -> [Decl] -> [Decl]
rule237 Decl
_hdIcataAlt [Decl]
_tlIcataAlts
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = [String] -> [String] -> [String]
rule238 [String]
_hdIcomments [String]
_tlIcomments
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = [Decl] -> [Decl] -> [Decl]
rule239 [Decl]
_hdIdecls [Decl]
_tlIdecls
         _lhsOsemNames :: [String]
         _lhsOsemNames :: [String]
_lhsOsemNames = [String] -> [String] -> [String]
rule240 [String]
_hdIsemNames [String]
_tlIsemNames
         _hdOallNts :: Set NontermIdent
_hdOallNts = Set NontermIdent -> Set NontermIdent
rule241 Set NontermIdent
_lhsIallNts
         _hdOallPragmas :: PragmaMap
_hdOallPragmas = PragmaMap -> PragmaMap
rule242 PragmaMap
_lhsIallPragmas
         _hdOaroundMap :: Map NontermIdent (Set NontermIdent)
_hdOaroundMap = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule243 Map NontermIdent (Set NontermIdent)
_lhsIaroundMap
         _hdOcontextMap :: ContextMap
_hdOcontextMap = ContextMap -> ContextMap
rule244 ContextMap
_lhsIcontextMap
         _hdOinh :: Map NontermIdent Type
_hdOinh = Map NontermIdent Type -> Map NontermIdent Type
rule245 Map NontermIdent Type
_lhsIinh
         _hdOmergeMap :: Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_hdOmergeMap = Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
rule246 Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap
         _hdOnt :: NontermIdent
_hdOnt = NontermIdent -> NontermIdent
rule247 NontermIdent
_lhsInt
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule248 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule249 Bool
_lhsIo_cata
         _hdOo_clean :: Bool
_hdOo_clean = Bool -> Bool
rule250 Bool
_lhsIo_clean
         _hdOo_costcentre :: Bool
_hdOo_costcentre = Bool -> Bool
rule251 Bool
_lhsIo_costcentre
         _hdOo_data :: Maybe Bool
_hdOo_data = Maybe Bool -> Maybe Bool
rule252 Maybe Bool
_lhsIo_data
         _hdOo_linePragmas :: Bool
_hdOo_linePragmas = Bool -> Bool
rule253 Bool
_lhsIo_linePragmas
         _hdOo_monadic :: Bool
_hdOo_monadic = Bool -> Bool
rule254 Bool
_lhsIo_monadic
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule255 Bool
_lhsIo_newtypes
         _hdOo_pretty :: Bool
_hdOo_pretty = Bool -> Bool
rule256 Bool
_lhsIo_pretty
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule257 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule258 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule259 Bool
_lhsIo_sig
         _hdOo_splitsems :: Bool
_hdOo_splitsems = Bool -> Bool
rule260 Bool
_lhsIo_splitsems
         _hdOo_strictwrap :: Bool
_hdOo_strictwrap = Bool -> Bool
rule261 Bool
_lhsIo_strictwrap
         _hdOo_traces :: Bool
_hdOo_traces = Bool -> Bool
rule262 Bool
_lhsIo_traces
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule263 Bool
_lhsIo_unbox
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule264 Options
_lhsIoptions
         _hdOparamMap :: ParamMap
_hdOparamMap = ParamMap -> ParamMap
rule265 ParamMap
_lhsIparamMap
         _hdOprefix :: String
_hdOprefix = String -> String
rule266 String
_lhsIprefix
         _hdOquantMap :: QuantMap
_hdOquantMap = QuantMap -> QuantMap
rule267 QuantMap
_lhsIquantMap
         _hdOsyn :: Map NontermIdent Type
_hdOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule268 Map NontermIdent Type
_lhsIsyn
         _hdOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule269 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _hdOwith_sig :: Bool
_hdOwith_sig = Bool -> Bool
rule270 Bool
_lhsIwith_sig
         _hdOwrappers :: Set NontermIdent
_hdOwrappers = Set NontermIdent -> Set NontermIdent
rule271 Set NontermIdent
_lhsIwrappers
         _tlOallNts :: Set NontermIdent
_tlOallNts = Set NontermIdent -> Set NontermIdent
rule272 Set NontermIdent
_lhsIallNts
         _tlOallPragmas :: PragmaMap
_tlOallPragmas = PragmaMap -> PragmaMap
rule273 PragmaMap
_lhsIallPragmas
         _tlOaroundMap :: Map NontermIdent (Set NontermIdent)
_tlOaroundMap = Map NontermIdent (Set NontermIdent)
-> Map NontermIdent (Set NontermIdent)
rule274 Map NontermIdent (Set NontermIdent)
_lhsIaroundMap
         _tlOcontextMap :: ContextMap
_tlOcontextMap = ContextMap -> ContextMap
rule275 ContextMap
_lhsIcontextMap
         _tlOinh :: Map NontermIdent Type
_tlOinh = Map NontermIdent Type -> Map NontermIdent Type
rule276 Map NontermIdent Type
_lhsIinh
         _tlOmergeMap :: Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_tlOmergeMap = Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
-> Map
     NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
rule277 Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap
         _tlOnt :: NontermIdent
_tlOnt = NontermIdent -> NontermIdent
rule278 NontermIdent
_lhsInt
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule279 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule280 Bool
_lhsIo_cata
         _tlOo_clean :: Bool
_tlOo_clean = Bool -> Bool
rule281 Bool
_lhsIo_clean
         _tlOo_costcentre :: Bool
_tlOo_costcentre = Bool -> Bool
rule282 Bool
_lhsIo_costcentre
         _tlOo_data :: Maybe Bool
_tlOo_data = Maybe Bool -> Maybe Bool
rule283 Maybe Bool
_lhsIo_data
         _tlOo_linePragmas :: Bool
_tlOo_linePragmas = Bool -> Bool
rule284 Bool
_lhsIo_linePragmas
         _tlOo_monadic :: Bool
_tlOo_monadic = Bool -> Bool
rule285 Bool
_lhsIo_monadic
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule286 Bool
_lhsIo_newtypes
         _tlOo_pretty :: Bool
_tlOo_pretty = Bool -> Bool
rule287 Bool
_lhsIo_pretty
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule288 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule289 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule290 Bool
_lhsIo_sig
         _tlOo_splitsems :: Bool
_tlOo_splitsems = Bool -> Bool
rule291 Bool
_lhsIo_splitsems
         _tlOo_strictwrap :: Bool
_tlOo_strictwrap = Bool -> Bool
rule292 Bool
_lhsIo_strictwrap
         _tlOo_traces :: Bool
_tlOo_traces = Bool -> Bool
rule293 Bool
_lhsIo_traces
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule294 Bool
_lhsIo_unbox
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule295 Options
_lhsIoptions
         _tlOparamMap :: ParamMap
_tlOparamMap = ParamMap -> ParamMap
rule296 ParamMap
_lhsIparamMap
         _tlOprefix :: String
_tlOprefix = String -> String
rule297 String
_lhsIprefix
         _tlOquantMap :: QuantMap
_tlOquantMap = QuantMap -> QuantMap
rule298 QuantMap
_lhsIquantMap
         _tlOsyn :: Map NontermIdent Type
_tlOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule299 Map NontermIdent Type
_lhsIsyn
         _tlOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule300 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _tlOwith_sig :: Bool
_tlOwith_sig = Bool -> Bool
rule301 Bool
_lhsIwith_sig
         _tlOwrappers :: Set NontermIdent
_tlOwrappers = Set NontermIdent -> Set NontermIdent
rule302 Set NontermIdent
_lhsIwrappers
         __result_ :: T_CProductions_vOut16
__result_ = [Decl]
-> [String]
-> DataAlts
-> [Decl]
-> [String]
-> T_CProductions_vOut16
T_CProductions_vOut16 [Decl]
_lhsOcataAlts [String]
_lhsOcomments DataAlts
_lhsOdataAlts [Decl]
_lhsOdecls [String]
_lhsOsemNames
         in T_CProductions_vOut16
__result_ )
     in T_CProductions_v16 -> T_CProductions_s17
C_CProductions_s17 T_CProductions_v16
v16
   {-# INLINE rule236 #-}
   {-# LINE 1030 "src-ag/GenerateCode.ag" #-}
   rule236 = \ ((_hdIdataAlt) :: DataAlt) ((_tlIdataAlts) :: DataAlts) ->
                                  {-# LINE 1030 "src-ag/GenerateCode.ag" #-}
                                  _hdIdataAlt : _tlIdataAlts
                                  {-# LINE 1922 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule237 #-}
   {-# LINE 1161 "src-ag/GenerateCode.ag" #-}
   rule237 = \ ((_hdIcataAlt) :: Decl) ((_tlIcataAlts) :: Decls) ->
                          {-# LINE 1161 "src-ag/GenerateCode.ag" #-}
                          _hdIcataAlt : _tlIcataAlts
                          {-# LINE 1928 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule238 #-}
   rule238 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->
     _hdIcomments ++ _tlIcomments
   {-# INLINE rule239 #-}
   rule239 = \ ((_hdIdecls) :: Decls) ((_tlIdecls) :: Decls) ->
     _hdIdecls ++ _tlIdecls
   {-# INLINE rule240 #-}
   rule240 = \ ((_hdIsemNames) :: [String]) ((_tlIsemNames) :: [String]) ->
     _hdIsemNames ++ _tlIsemNames
   {-# INLINE rule241 #-}
   rule241 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule242 #-}
   rule242 = \ ((_lhsIallPragmas) :: PragmaMap) ->
     _lhsIallPragmas
   {-# INLINE rule243 #-}
   rule243 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) ->
     _lhsIaroundMap
   {-# INLINE rule244 #-}
   rule244 = \ ((_lhsIcontextMap) :: ContextMap) ->
     _lhsIcontextMap
   {-# INLINE rule245 #-}
   rule245 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule246 #-}
   rule246 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->
     _lhsImergeMap
   {-# INLINE rule247 #-}
   rule247 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule248 #-}
   rule248 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule249 #-}
   rule249 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule250 #-}
   rule250 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule251 #-}
   rule251 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule252 #-}
   rule252 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule253 #-}
   rule253 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule254 #-}
   rule254 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule255 #-}
   rule255 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule256 #-}
   rule256 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule257 #-}
   rule257 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule258 #-}
   rule258 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule259 #-}
   rule259 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule260 #-}
   rule260 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule261 #-}
   rule261 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule262 #-}
   rule262 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule263 #-}
   rule263 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule264 #-}
   rule264 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule265 #-}
   rule265 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule266 #-}
   rule266 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule267 #-}
   rule267 = \ ((_lhsIquantMap) :: QuantMap) ->
     _lhsIquantMap
   {-# INLINE rule268 #-}
   rule268 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule269 #-}
   rule269 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule270 #-}
   rule270 = \ ((_lhsIwith_sig) :: Bool) ->
     _lhsIwith_sig
   {-# INLINE rule271 #-}
   rule271 = \ ((_lhsIwrappers) :: Set NontermIdent) ->
     _lhsIwrappers
   {-# INLINE rule272 #-}
   rule272 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule273 #-}
   rule273 = \ ((_lhsIallPragmas) :: PragmaMap) ->
     _lhsIallPragmas
   {-# INLINE rule274 #-}
   rule274 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) ->
     _lhsIaroundMap
   {-# INLINE rule275 #-}
   rule275 = \ ((_lhsIcontextMap) :: ContextMap) ->
     _lhsIcontextMap
   {-# INLINE rule276 #-}
   rule276 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule277 #-}
   rule277 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->
     _lhsImergeMap
   {-# INLINE rule278 #-}
   rule278 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule279 #-}
   rule279 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule280 #-}
   rule280 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule281 #-}
   rule281 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule282 #-}
   rule282 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule283 #-}
   rule283 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule284 #-}
   rule284 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule285 #-}
   rule285 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule286 #-}
   rule286 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule287 #-}
   rule287 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule288 #-}
   rule288 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule289 #-}
   rule289 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule290 #-}
   rule290 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule291 #-}
   rule291 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule292 #-}
   rule292 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule293 #-}
   rule293 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule294 #-}
   rule294 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule295 #-}
   rule295 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule296 #-}
   rule296 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule297 #-}
   rule297 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule298 #-}
   rule298 = \ ((_lhsIquantMap) :: QuantMap) ->
     _lhsIquantMap
   {-# INLINE rule299 #-}
   rule299 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule300 #-}
   rule300 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule301 #-}
   rule301 = \ ((_lhsIwith_sig) :: Bool) ->
     _lhsIwith_sig
   {-# INLINE rule302 #-}
   rule302 = \ ((_lhsIwrappers) :: Set NontermIdent) ->
     _lhsIwrappers
{-# NOINLINE sem_CProductions_Nil #-}
sem_CProductions_Nil ::  T_CProductions 
sem_CProductions_Nil :: T_CProductions
sem_CProductions_Nil  = Identity T_CProductions_s17 -> T_CProductions
T_CProductions (forall (m :: * -> *) a. Monad m => a -> m a
return T_CProductions_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_CProductions_s17
st17 = let
      v16 :: T_CProductions_v16 
      v16 :: T_CProductions_v16
v16 = \ (T_CProductions_vIn16 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Map NontermIdent (Set NontermIdent)
_lhsIaroundMap ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent (Map NontermIdent (NontermIdent, [NontermIdent]))
_lhsImergeMap NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _lhsOdataAlts :: DataAlts
         _lhsOdataAlts :: DataAlts
_lhsOdataAlts = forall {a}. () -> [a]
rule303  ()
         _lhsOcataAlts :: Decls
         _lhsOcataAlts :: [Decl]
_lhsOcataAlts = forall {a}. () -> [a]
rule304  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {a}. () -> [a]
rule305  ()
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = forall {a}. () -> [a]
rule306  ()
         _lhsOsemNames :: [String]
         _lhsOsemNames :: [String]
_lhsOsemNames = forall {a}. () -> [a]
rule307  ()
         __result_ :: T_CProductions_vOut16
__result_ = [Decl]
-> [String]
-> DataAlts
-> [Decl]
-> [String]
-> T_CProductions_vOut16
T_CProductions_vOut16 [Decl]
_lhsOcataAlts [String]
_lhsOcomments DataAlts
_lhsOdataAlts [Decl]
_lhsOdecls [String]
_lhsOsemNames
         in T_CProductions_vOut16
__result_ )
     in T_CProductions_v16 -> T_CProductions_s17
C_CProductions_s17 T_CProductions_v16
v16
   {-# INLINE rule303 #-}
   {-# LINE 1031 "src-ag/GenerateCode.ag" #-}
   rule303 = \  (_ :: ()) ->
                                  {-# LINE 1031 "src-ag/GenerateCode.ag" #-}
                                  []
                                  {-# LINE 2149 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule304 #-}
   {-# LINE 1162 "src-ag/GenerateCode.ag" #-}
   rule304 = \  (_ :: ()) ->
                          {-# LINE 1162 "src-ag/GenerateCode.ag" #-}
                          []
                          {-# LINE 2155 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule305 #-}
   rule305 = \  (_ :: ()) ->
     []
   {-# INLINE rule306 #-}
   rule306 = \  (_ :: ()) ->
     []
   {-# INLINE rule307 #-}
   rule307 = \  (_ :: ()) ->
     []

-- CRule -------------------------------------------------------
-- wrapper
data Inh_CRule  = Inh_CRule { Inh_CRule -> Set NontermIdent
allNts_Inh_CRule :: (Set NontermIdent), Inh_CRule -> Set NontermIdent
aroundMap_Inh_CRule :: (Set Identifier), Inh_CRule -> [(NontermIdent, Type, ChildKind)]
children_Inh_CRule :: ([(Identifier,Type,ChildKind)]), Inh_CRule -> NontermIdent
con_Inh_CRule :: (ConstructorIdent), Inh_CRule -> [Decl]
declsAbove_Inh_CRule :: ([Decl]), Inh_CRule -> Map NontermIdent Type
inh_Inh_CRule :: (Attributes), Inh_CRule -> Map NontermIdent Int
instVisitNrs_Inh_CRule :: (Map Identifier Int), Inh_CRule -> Map NontermIdent (NontermIdent, [NontermIdent])
mergeMap_Inh_CRule :: (Map Identifier (Identifier, [Identifier])), Inh_CRule -> Int
nr_Inh_CRule :: (Int), Inh_CRule -> NontermIdent
nt_Inh_CRule :: (NontermIdent), Inh_CRule -> Bool
o_case_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_cata_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_clean_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_costcentre_Inh_CRule :: (Bool), Inh_CRule -> Maybe Bool
o_data_Inh_CRule :: (Maybe Bool), Inh_CRule -> Bool
o_linePragmas_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_monadic_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_newtypes_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_pretty_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_rename_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_sem_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_sig_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_splitsems_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_strictwrap_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_traces_Inh_CRule :: (Bool), Inh_CRule -> Bool
o_unbox_Inh_CRule :: (Bool), Inh_CRule -> Options
options_Inh_CRule :: (Options), Inh_CRule -> Map NontermIdent (NontermIdent, [String])
paramInstMap_Inh_CRule :: (Map Identifier (NontermIdent, [String])), Inh_CRule -> ParamMap
paramMap_Inh_CRule :: (ParamMap), Inh_CRule -> String
prefix_Inh_CRule :: (String), Inh_CRule -> Map NontermIdent Type
syn_Inh_CRule :: (Attributes), Inh_CRule -> [NontermIdent]
terminals_Inh_CRule :: ([Identifier]), Inh_CRule -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CRule :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CRule -> Set NontermIdent
visitedSet_Inh_CRule :: (Set Identifier), Inh_CRule -> String
what_Inh_CRule :: (String) }
data Syn_CRule  = Syn_CRule { Syn_CRule -> Bool
allTpsFound_Syn_CRule :: (Bool), Syn_CRule -> DeclBlocks -> DeclBlocks
bldBlocksFun_Syn_CRule :: (DeclBlocks -> DeclBlocks), Syn_CRule -> [String]
comments_Syn_CRule :: ([String]), Syn_CRule -> [Decl]
decls_Syn_CRule :: (Decls), Syn_CRule -> [Decl]
declsAbove_Syn_CRule :: ([Decl]), Syn_CRule -> [NontermIdent]
definedInsts_Syn_CRule :: ([Identifier]), Syn_CRule -> Exprs
exprs_Syn_CRule :: (Exprs), Syn_CRule -> [Decl]
tSigs_Syn_CRule :: ([Decl]), Syn_CRule -> [Type]
tps_Syn_CRule :: ([Type]), Syn_CRule -> Set String
usedVars_Syn_CRule :: (Set String), Syn_CRule -> Set NontermIdent
visitedSet_Syn_CRule :: (Set Identifier) }
{-# INLINABLE wrap_CRule #-}
wrap_CRule :: T_CRule  -> Inh_CRule  -> (Syn_CRule )
wrap_CRule :: T_CRule -> Inh_CRule -> Syn_CRule
wrap_CRule (T_CRule Identity T_CRule_s20
act) (Inh_CRule Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CRule_s20
sem <- Identity T_CRule_s20
act
        let arg19 :: T_CRule_vIn19
arg19 = Set NontermIdent
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> String
-> T_CRule_vIn19
T_CRule_vIn19 Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat
        (T_CRule_vOut19 Bool
_lhsOallTpsFound DeclBlocks -> DeclBlocks
_lhsObldBlocksFun [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CRule_s20 -> T_CRule_v19
inv_CRule_s20 T_CRule_s20
sem T_CRule_vIn19
arg19)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
-> (DeclBlocks -> DeclBlocks)
-> [String]
-> [Decl]
-> [Decl]
-> [NontermIdent]
-> Exprs
-> [Decl]
-> [Type]
-> Set String
-> Set NontermIdent
-> Syn_CRule
Syn_CRule Bool
_lhsOallTpsFound DeclBlocks -> DeclBlocks
_lhsObldBlocksFun [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet)
   )

-- cata
{-# NOINLINE sem_CRule #-}
sem_CRule :: CRule  -> T_CRule 
sem_CRule :: CRule -> T_CRule
sem_CRule ( CRule NontermIdent
name_ Bool
isIn_ Bool
hasCode_ NontermIdent
nt_ NontermIdent
con_ NontermIdent
field_ Maybe NontermIdent
childnt_ Maybe Type
tp_ Pattern
pattern_ [String]
rhs_ Map Int (NontermIdent, NontermIdent, Maybe Type)
defines_ Bool
owrt_ String
origin_ Set (NontermIdent, NontermIdent)
uses_ Bool
explicit_ Maybe NontermIdent
mbNamed_ ) = NontermIdent
-> Bool
-> Bool
-> NontermIdent
-> NontermIdent
-> NontermIdent
-> Maybe NontermIdent
-> Maybe Type
-> T_Pattern
-> [String]
-> Map Int (NontermIdent, NontermIdent, Maybe Type)
-> Bool
-> String
-> Set (NontermIdent, NontermIdent)
-> Bool
-> Maybe NontermIdent
-> T_CRule
sem_CRule_CRule NontermIdent
name_ Bool
isIn_ Bool
hasCode_ NontermIdent
nt_ NontermIdent
con_ NontermIdent
field_ Maybe NontermIdent
childnt_ Maybe Type
tp_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pattern_ ) [String]
rhs_ Map Int (NontermIdent, NontermIdent, Maybe Type)
defines_ Bool
owrt_ String
origin_ Set (NontermIdent, NontermIdent)
uses_ Bool
explicit_ Maybe NontermIdent
mbNamed_
sem_CRule ( CChildVisit NontermIdent
name_ NontermIdent
nt_ Int
nr_ Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ Bool
isLast_ ) = NontermIdent
-> NontermIdent
-> Int
-> Map NontermIdent Type
-> Map NontermIdent Type
-> Bool
-> T_CRule
sem_CRule_CChildVisit NontermIdent
name_ NontermIdent
nt_ Int
nr_ Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ Bool
isLast_

-- semantic domain
newtype T_CRule  = T_CRule {
                           T_CRule -> Identity T_CRule_s20
attach_T_CRule :: Identity (T_CRule_s20 )
                           }
newtype T_CRule_s20  = C_CRule_s20 {
                                   T_CRule_s20 -> T_CRule_v19
inv_CRule_s20 :: (T_CRule_v19 )
                                   }
data T_CRule_s21  = C_CRule_s21
type T_CRule_v19  = (T_CRule_vIn19 ) -> (T_CRule_vOut19 )
data T_CRule_vIn19  = T_CRule_vIn19 (Set NontermIdent) (Set Identifier) ([(Identifier,Type,ChildKind)]) (ConstructorIdent) ([Decl]) (Attributes) (Map Identifier Int) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (String)
data T_CRule_vOut19  = T_CRule_vOut19 (Bool) (DeclBlocks -> DeclBlocks) ([String]) (Decls) ([Decl]) ([Identifier]) (Exprs) ([Decl]) ([Type]) (Set String) (Set Identifier)
{-# NOINLINE sem_CRule_CRule #-}
sem_CRule_CRule :: (Identifier) -> (Bool) -> (Bool) -> (NontermIdent) -> (ConstructorIdent) -> (Identifier) -> (Maybe NontermIdent) -> (Maybe Type) -> T_Pattern  -> ([String]) -> (Map Int (Identifier,Identifier,Maybe Type)) -> (Bool) -> (String) -> (Set (Identifier, Identifier)) -> (Bool) -> (Maybe Identifier) -> T_CRule 
sem_CRule_CRule :: NontermIdent
-> Bool
-> Bool
-> NontermIdent
-> NontermIdent
-> NontermIdent
-> Maybe NontermIdent
-> Maybe Type
-> T_Pattern
-> [String]
-> Map Int (NontermIdent, NontermIdent, Maybe Type)
-> Bool
-> String
-> Set (NontermIdent, NontermIdent)
-> Bool
-> Maybe NontermIdent
-> T_CRule
sem_CRule_CRule NontermIdent
arg_name_ Bool
arg_isIn_ Bool
arg_hasCode_ NontermIdent
arg_nt_ NontermIdent
arg_con_ NontermIdent
arg_field_ Maybe NontermIdent
_ Maybe Type
arg_tp_ T_Pattern
arg_pattern_ [String]
arg_rhs_ Map Int (NontermIdent, NontermIdent, Maybe Type)
arg_defines_ Bool
_ String
arg_origin_ Set (NontermIdent, NontermIdent)
arg_uses_ Bool
arg_explicit_ Maybe NontermIdent
arg_mbNamed_ = Identity T_CRule_s20 -> T_CRule
T_CRule (forall (m :: * -> *) a. Monad m => a -> m a
return T_CRule_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_CRule_s20
st20 = let
      v19 :: T_CRule_v19 
      v19 :: T_CRule_v19
v19 = \ (T_CRule_vIn19 Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat) -> ( let
         _patternX41 :: T_Pattern_s41
_patternX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pattern_))
         (T_Pattern_vOut40 Pattern
_patternIcopy [NontermIdent]
_patternIdefinedInsts [(NontermIdent, NontermIdent)]
_patternIpatternAttributes) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patternX41 (T_Pattern_vIn40
T_Pattern_vIn40 )
         _instTypes :: [(NontermIdent, (NontermIdent, ChildKind, Bool))]
_instTypes = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, (NontermIdent, ChildKind, Bool))]
rule308 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _originComment :: [Decl] -> [Decl]
_originComment = Bool -> String -> [Decl] -> [Decl]
rule309 Bool
_lhsIo_pretty String
arg_origin_
         _instDecls :: [Decl]
_instDecls = [NontermIdent]
-> [(NontermIdent, (NontermIdent, ChildKind, Bool))]
-> Bool
-> Bool
-> Options
-> String
-> [Decl]
rule310 [NontermIdent]
_definedInsts [(NontermIdent, (NontermIdent, ChildKind, Bool))]
_instTypes Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Options
_lhsIoptions String
_lhsIprefix
         _patDescr :: String
_patDescr = [(NontermIdent, NontermIdent)] -> Bool -> String
rule311 [(NontermIdent, NontermIdent)]
_patternIpatternAttributes Bool
arg_isIn_
         _traceDescr :: String
_traceDescr = String
-> NontermIdent -> Maybe NontermIdent -> NontermIdent -> String
rule312 String
_patDescr NontermIdent
arg_con_ Maybe NontermIdent
arg_mbNamed_ NontermIdent
arg_nt_
         _addTrace :: Expr -> Expr
_addTrace = Bool -> String -> Expr -> Expr
rule313 Bool
_lhsIo_traces String
_traceDescr
         _costCentreDescr :: String
_costCentreDescr = String -> NontermIdent -> NontermIdent -> String
rule314 String
_patDescr NontermIdent
arg_con_ NontermIdent
arg_nt_
         _addCostCentre :: Expr -> Expr
_addCostCentre = String -> Bool -> Expr -> Expr
rule315 String
_costCentreDescr Bool
_lhsIo_costcentre
         _addLinePragma :: Expr -> Expr
_addLinePragma = Bool -> NontermIdent -> Expr -> Expr
rule316 Bool
_lhsIo_linePragmas NontermIdent
arg_name_
         _decls :: [Decl]
_decls = forall {a} {a} {k} {c}.
(a -> a)
-> (Expr -> a)
-> (a -> Expr)
-> [Decl]
-> Bool
-> Options
-> ([Decl] -> [Decl])
-> Pattern
-> Map k (NontermIdent, NontermIdent, c)
-> Bool
-> Bool
-> [String]
-> Set (NontermIdent, NontermIdent)
-> [Decl]
rule317 Expr -> Expr
_addCostCentre Expr -> Expr
_addLinePragma Expr -> Expr
_addTrace [Decl]
_instDecls Bool
_lhsIo_monadic Options
_lhsIoptions [Decl] -> [Decl]
_originComment Pattern
_patternIcopy Map Int (NontermIdent, NontermIdent, Maybe Type)
arg_defines_ Bool
arg_explicit_ Bool
arg_hasCode_ [String]
arg_rhs_ Set (NontermIdent, NontermIdent)
arg_uses_
         _definedInsts :: [NontermIdent]
_definedInsts = [NontermIdent] -> Bool -> [NontermIdent]
rule318 [NontermIdent]
_patternIdefinedInsts Bool
arg_isIn_
         _rulename :: String
_rulename = Options
-> [NontermIdent] -> NontermIdent -> Bool -> NontermIdent -> String
rule319 Options
_lhsIoptions [NontermIdent]
_lhsIterminals NontermIdent
arg_field_ Bool
arg_isIn_ NontermIdent
arg_name_
         _lhsOexprs :: Exprs
         _lhsOexprs :: Exprs
_lhsOexprs = String -> Exprs
rule320 String
_rulename
         _lhsOusedVars :: Set String
         _lhsOusedVars :: Set String
_lhsOusedVars = forall a. a -> Set a
rule321 String
_rulename
         _mkTp :: Type -> Type
_mkTp = NontermIdent -> [String] -> Type -> Type
rule322 NontermIdent
_lhsInt [String]
_orgParams
         _lhsOtSigs :: [Decl]
         _lhsOtSigs :: [Decl]
_lhsOtSigs = forall {a} {k}.
(NontermIdent -> a -> Type)
-> [(NontermIdent, Type, ChildKind)]
-> Options
-> (Type -> a)
-> Map k (NontermIdent, NontermIdent, Maybe Type)
-> [Decl]
rule323 NontermIdent -> Type -> Type
_evalTp [(NontermIdent, Type, ChildKind)]
_lhsIchildren Options
_lhsIoptions Type -> Type
_mkTp Map Int (NontermIdent, NontermIdent, Maybe Type)
arg_defines_
         _orgParams :: [String]
_orgParams = NontermIdent -> ParamMap -> [String]
rule324 NontermIdent
_lhsInt ParamMap
_lhsIparamMap
         _evalTp :: NontermIdent -> Type -> Type
_evalTp = forall {a}.
NontermIdent
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> [a]
-> NontermIdent
-> Type
-> Type
rule325 NontermIdent
_lhsInt Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap [String]
_orgParams
         _lhsOtps :: [Type]
         _lhsOallTpsFound :: Bool
         ([Type]
_lhsOtps,Bool
_lhsOallTpsFound) = forall {a}. Maybe a -> ([a], Bool)
rule326 Maybe Type
arg_tp_
         _lhsOdeclsAbove :: [Decl]
         _lhsOdeclsAbove :: [Decl]
_lhsOdeclsAbove = [Decl] -> [Decl] -> [Decl]
rule327 [Decl]
_decls [Decl]
_lhsIdeclsAbove
         _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks
         _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks
_lhsObldBlocksFun = forall {a}. () -> a -> a
rule328  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {k}.
String
-> Map k (NontermIdent, NontermIdent, Maybe Type) -> [String]
rule329 String
_lhsIwhat Map Int (NontermIdent, NontermIdent, Maybe Type)
arg_defines_
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = forall a. a -> a
rule330 [Decl]
_decls
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = forall a. a -> a
rule331 [NontermIdent]
_definedInsts
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = Set NontermIdent -> Set NontermIdent
rule332 Set NontermIdent
_lhsIvisitedSet
         __result_ :: T_CRule_vOut19
__result_ = Bool
-> (DeclBlocks -> DeclBlocks)
-> [String]
-> [Decl]
-> [Decl]
-> [NontermIdent]
-> Exprs
-> [Decl]
-> [Type]
-> Set String
-> Set NontermIdent
-> T_CRule_vOut19
T_CRule_vOut19 Bool
_lhsOallTpsFound DeclBlocks -> DeclBlocks
_lhsObldBlocksFun [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet
         in T_CRule_vOut19
__result_ )
     in T_CRule_v19 -> T_CRule_s20
C_CRule_s20 T_CRule_v19
v19
   {-# INLINE rule308 #-}
   {-# LINE 158 "src-ag/GenerateCode.ag" #-}
   rule308 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->
                             {-# LINE 158 "src-ag/GenerateCode.ag" #-}
                             [ (n, (t, mb, for)) | (n, NT t _ for, mb) <- _lhsIchildren ]
                             {-# LINE 2250 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule309 #-}
   {-# LINE 159 "src-ag/GenerateCode.ag" #-}
   rule309 = \ ((_lhsIo_pretty) :: Bool) origin_ ->
                                 {-# LINE 159 "src-ag/GenerateCode.ag" #-}
                                 if  _lhsIo_pretty
                                     then (Comment origin_:)
                                     else id
                                 {-# LINE 2258 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule310 #-}
   {-# LINE 162 "src-ag/GenerateCode.ag" #-}
   rule310 = \ _definedInsts _instTypes ((_lhsIo_monadic) :: Bool) ((_lhsIo_newtypes) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIprefix) :: String) ->
                             {-# LINE 162 "src-ag/GenerateCode.ag" #-}
                             [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst))))
                                    ( let (nm,mb,defor) = fromJust $ inst `lookup` _instTypes
                                      in unwrapSem _lhsIo_newtypes nm
                                         $ case mb of
                                             ChildReplace _ -> App instLocFieldName [SimpleExpr $ fieldname inst]
                                             _              ->
                                                if defor
                                                then SimpleExpr instLocFieldName
                                                else App (cataname _lhsIprefix nm)
                                                               [SimpleExpr instLocFieldName]
                                    )
                                    (Set.singleton instSemFieldName)
                                    (Set.singleton instLocFieldName)
                             | inst <- _definedInsts
                             , let instLocFieldName = attrname _lhsIoptions True _INST inst
                                   instSemFieldName = attrname _lhsIoptions False _INST' inst
                             ]
                             {-# LINE 2280 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule311 #-}
   {-# LINE 179 "src-ag/GenerateCode.ag" #-}
   rule311 = \ ((_patternIpatternAttributes) :: [(Identifier, Identifier)]) isIn_ ->
                            {-# LINE 179 "src-ag/GenerateCode.ag" #-}
                            if isIn_
                            then "_"
                            else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)
                            {-# LINE 2288 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule312 #-}
   {-# LINE 182 "src-ag/GenerateCode.ag" #-}
   rule312 = \ _patDescr con_ mbNamed_ nt_ ->
                              {-# LINE 182 "src-ag/GenerateCode.ag" #-}
                              (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr
                              {-# LINE 2294 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule313 #-}
   {-# LINE 184 "src-ag/GenerateCode.ag" #-}
   rule313 = \ ((_lhsIo_traces) :: Bool) _traceDescr ->
                            {-# LINE 184 "src-ag/GenerateCode.ag" #-}
                            \v -> if _lhsIo_traces
                                  then Trace _traceDescr     v
                                  else v
                            {-# LINE 2302 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule314 #-}
   {-# LINE 187 "src-ag/GenerateCode.ag" #-}
   rule314 = \ _patDescr con_ nt_ ->
                                   {-# LINE 187 "src-ag/GenerateCode.ag" #-}
                                   show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr
                                   {-# LINE 2308 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule315 #-}
   {-# LINE 188 "src-ag/GenerateCode.ag" #-}
   rule315 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->
                                 {-# LINE 188 "src-ag/GenerateCode.ag" #-}
                                 \v -> if _lhsIo_costcentre
                                       then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v
                                       else v
                                 {-# LINE 2316 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule316 #-}
   {-# LINE 191 "src-ag/GenerateCode.ag" #-}
   rule316 = \ ((_lhsIo_linePragmas) :: Bool) name_ ->
                                 {-# LINE 191 "src-ag/GenerateCode.ag" #-}
                                 \v -> let p = getPos name_
                                           hasPos = line p > 0 && column p >= 0 && not (null (file p))
                                       in if _lhsIo_linePragmas && hasPos
                                          then PragmaExpr True True ("LINE " ++ show (line p) ++ " " ++ show (file p))
                                               $ LineExpr
                                               $ v
                                          else v
                                 {-# LINE 2328 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule317 #-}
   {-# LINE 198 "src-ag/GenerateCode.ag" #-}
   rule317 = \ _addCostCentre _addLinePragma _addTrace _instDecls ((_lhsIo_monadic) :: Bool) ((_lhsIoptions) :: Options) _originComment ((_patternIcopy) :: Pattern) defines_ explicit_ hasCode_ rhs_ uses_ ->
                         {-# LINE 198 "src-ag/GenerateCode.ag" #-}
                         if hasCode_
                         then _originComment ( mkDecl (_lhsIo_monadic && explicit_) (Pattern3 _patternIcopy) (_addTrace     $ _addCostCentre     $ _addLinePragma     $ (TextExpr rhs_))
                                                    (Set.fromList [attrname _lhsIoptions False fld nm | (fld,nm,_) <- Map.elems defines_])
                                                    (Set.fromList [attrname _lhsIoptions True fld nm | (fld,nm) <- Set.toList uses_])
                                             : _instDecls    )
                         else _instDecls
                         {-# LINE 2339 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule318 #-}
   {-# LINE 269 "src-ag/GenerateCode.ag" #-}
   rule318 = \ ((_patternIdefinedInsts) :: [Identifier]) isIn_ ->
                                {-# LINE 269 "src-ag/GenerateCode.ag" #-}
                                if isIn_ then [] else _patternIdefinedInsts
                                {-# LINE 2345 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule319 #-}
   {-# LINE 339 "src-ag/GenerateCode.ag" #-}
   rule319 = \ ((_lhsIoptions) :: Options) ((_lhsIterminals) :: [Identifier]) field_ isIn_ name_ ->
                            {-# LINE 339 "src-ag/GenerateCode.ag" #-}
                            if  field_ == _LOC && name_ `elem` _lhsIterminals
                            then funname name_ 0
                            else attrname _lhsIoptions isIn_ field_ name_
                            {-# LINE 2353 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule320 #-}
   {-# LINE 342 "src-ag/GenerateCode.ag" #-}
   rule320 = \ _rulename ->
                         {-# LINE 342 "src-ag/GenerateCode.ag" #-}
                         [SimpleExpr _rulename    ]
                         {-# LINE 2359 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule321 #-}
   {-# LINE 358 "src-ag/GenerateCode.ag" #-}
   rule321 = \ _rulename ->
                       {-# LINE 358 "src-ag/GenerateCode.ag" #-}
                       Set.singleton _rulename
                       {-# LINE 2365 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule322 #-}
   {-# LINE 368 "src-ag/GenerateCode.ag" #-}
   rule322 = \ ((_lhsInt) :: NontermIdent) _orgParams ->
                               {-# LINE 368 "src-ag/GenerateCode.ag" #-}
                               typeToCodeType (Just _lhsInt) _orgParams
                               {-# LINE 2371 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule323 #-}
   {-# LINE 369 "src-ag/GenerateCode.ag" #-}
   rule323 = \ _evalTp ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ((_lhsIoptions) :: Options) _mkTp defines_ ->
                                {-# LINE 369 "src-ag/GenerateCode.ag" #-}
                                [ TSig (attrname _lhsIoptions False field attr) tp'
                                |  (field,attr,tp) <- Map.elems defines_, isJust tp
                                , let tp1 = _evalTp     field $ _mkTp (fromJust tp)
                                      tp' = case findOrigType attr _lhsIchildren of
                                             Just tp' -> let tp'' = case tp' of
                                                                      NT n params b -> NT (Ident ("T_" ++ show n) (getPos n)) params b
                                                                      _ -> tp'
                                                             tp2 = _evalTp     field $ _mkTp tp''
                                                         in Arr tp2 tp1
                                             Nothing -> tp1
                                      findOrigType _ [] = Nothing
                                      findOrigType nm ((n,_,kind) : r)
                                        | nm == n = case kind of
                                                      ChildReplace orig -> Just orig
                                                      _                 -> Nothing
                                        | otherwise = findOrigType nm r
                                ]
                                {-# LINE 2393 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule324 #-}
   {-# LINE 387 "src-ag/GenerateCode.ag" #-}
   rule324 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->
                                    {-# LINE 387 "src-ag/GenerateCode.ag" #-}
                                    map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap
                                    {-# LINE 2399 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule325 #-}
   {-# LINE 389 "src-ag/GenerateCode.ag" #-}
   rule325 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ((_lhsIparamMap) :: ParamMap) _orgParams ->
                      {-# LINE 389 "src-ag/GenerateCode.ag" #-}
                      \field tp -> let orgFldParams = map getName $ Map.findWithDefault [] childNt _lhsIparamMap
                                       (childNt,instParams) = Map.findWithDefault (_lhsInt,[]) field _lhsIparamInstMap
                                       replMap = Map.fromList (zip orgFldParams instParams)
                                       replace k = Map.findWithDefault ('@':k) k replMap
                                   in if null instParams
                                      then if null _orgParams
                                           then tp
                                           else idEvalType _lhsIoptions tp
                                      else evalType _lhsIoptions replace tp
                      {-# LINE 2413 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule326 #-}
   {-# LINE 424 "src-ag/GenerateCode.ag" #-}
   rule326 = \ tp_ ->
                                            {-# LINE 424 "src-ag/GenerateCode.ag" #-}
                                            maybe ([],False) (\tp -> ([tp],True)) tp_
                                            {-# LINE 2419 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule327 #-}
   {-# LINE 625 "src-ag/GenerateCode.ag" #-}
   rule327 = \ _decls ((_lhsIdeclsAbove) :: [Decl]) ->
                         {-# LINE 625 "src-ag/GenerateCode.ag" #-}
                         _lhsIdeclsAbove ++ _decls
                         {-# LINE 2425 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule328 #-}
   {-# LINE 638 "src-ag/GenerateCode.ag" #-}
   rule328 = \  (_ :: ()) ->
                           {-# LINE 638 "src-ag/GenerateCode.ag" #-}
                           id
                           {-# LINE 2431 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule329 #-}
   {-# LINE 914 "src-ag/GenerateCode.ag" #-}
   rule329 = \ ((_lhsIwhat) :: String) defines_ ->
                                   {-# LINE 914 "src-ag/GenerateCode.ag" #-}
                                   [ makeLocalComment 11 _lhsIwhat name tp | (field,name,tp) <- Map.elems defines_, field == _LOC ]
                                   ++ [ makeLocalComment 11 "inst " name tp | (field,name,tp) <- Map.elems defines_, field == _INST ]
                                   {-# LINE 2438 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule330 #-}
   rule330 = \ _decls ->
     _decls
   {-# INLINE rule331 #-}
   rule331 = \ _definedInsts ->
     _definedInsts
   {-# INLINE rule332 #-}
   rule332 = \ ((_lhsIvisitedSet) :: Set Identifier) ->
     _lhsIvisitedSet
{-# NOINLINE sem_CRule_CChildVisit #-}
sem_CRule_CChildVisit :: (Identifier) -> (NontermIdent) -> (Int) -> (Attributes) -> (Attributes) -> (Bool) -> T_CRule 
sem_CRule_CChildVisit :: NontermIdent
-> NontermIdent
-> Int
-> Map NontermIdent Type
-> Map NontermIdent Type
-> Bool
-> T_CRule
sem_CRule_CChildVisit NontermIdent
arg_name_ NontermIdent
arg_nt_ Int
arg_nr_ Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_ Bool
arg_isLast_ = Identity T_CRule_s20 -> T_CRule
T_CRule (forall (m :: * -> *) a. Monad m => a -> m a
return T_CRule_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_CRule_s20
st20 = let
      v19 :: T_CRule_v19 
      v19 :: T_CRule_v19
v19 = \ (T_CRule_vIn19 Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat) -> ( let
         _visitedSet :: Set NontermIdent
_visitedSet = Set NontermIdent -> NontermIdent -> Set NontermIdent
rule333 Set NontermIdent
_lhsIvisitedSet NontermIdent
arg_name_
         _costCentreDescr :: String
_costCentreDescr = NontermIdent
-> NontermIdent -> NontermIdent -> Int -> NontermIdent -> String
rule334 NontermIdent
_lhsIcon NontermIdent
_lhsInt NontermIdent
arg_name_ Int
arg_nr_ NontermIdent
arg_nt_
         _addCostCentre :: Expr -> Expr
_addCostCentre = String -> Bool -> Expr -> Expr
rule335 String
_costCentreDescr Bool
_lhsIo_costcentre
         _decls :: [Decl]
_decls = forall {a} {a}.
(Expr -> Expr)
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Bool
-> Bool
-> Bool
-> Options
-> Set NontermIdent
-> Map NontermIdent a
-> Bool
-> NontermIdent
-> Int
-> NontermIdent
-> Map NontermIdent a
-> [Decl]
rule336 Expr -> Expr
_addCostCentre Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_unbox Options
_lhsIoptions Set NontermIdent
_visitedSet Map NontermIdent Type
arg_inh_ Bool
arg_isLast_ NontermIdent
arg_name_ Int
arg_nr_ NontermIdent
arg_nt_ Map NontermIdent Type
arg_syn_
         _isSuperfluousHigherOrderIntra :: Bool
_isSuperfluousHigherOrderIntra = Map NontermIdent Int -> Int -> NontermIdent -> Bool
rule337 Map NontermIdent Int
_lhsIinstVisitNrs Int
_lhsInr NontermIdent
arg_name_
         _names :: [String]
_names = Bool -> NontermIdent -> Int -> [String]
rule338 Bool
_isSuperfluousHigherOrderIntra NontermIdent
arg_name_ Int
arg_nr_
         _lhsOexprs :: Exprs
         _lhsOexprs :: Exprs
_lhsOexprs = [String]
-> Bool
-> (NontermIdent -> Int -> [String] -> Type)
-> [String]
-> Int
-> NontermIdent
-> Exprs
rule339 [String]
_instParams Bool
_lhsIo_newtypes NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom [String]
_names Int
arg_nr_ NontermIdent
arg_nt_
         _lhsOusedVars :: Set String
         _lhsOusedVars :: Set String
_lhsOusedVars = [String] -> Set String
rule340 [String]
_names
         _mkTp :: Type -> Type
_mkTp = forall {c}. (Type -> c) -> [String] -> NontermIdent -> Type -> c
rule341 Type -> Type
_evalTp [String]
_orgParams NontermIdent
arg_nt_
         _definedTps :: [Decl]
_definedTps = forall {t}.
Options
-> (t -> Type) -> NontermIdent -> Map NontermIdent t -> [Decl]
rule342 Options
_lhsIoptions Type -> Type
_mkTp NontermIdent
arg_name_ Map NontermIdent Type
arg_syn_
         _nextTp :: String
_nextTp = Int -> NontermIdent -> String
rule343 Int
arg_nr_ NontermIdent
arg_nt_
         _lhsOtSigs :: [Decl]
         _lhsOtSigs :: [Decl]
_lhsOtSigs = [Decl]
-> [String] -> String -> Bool -> NontermIdent -> Int -> [Decl]
rule344 [Decl]
_definedTps [String]
_instParams String
_nextTp Bool
arg_isLast_ NontermIdent
arg_name_ Int
arg_nr_
         _orgParams :: [String]
_orgParams = ParamMap -> NontermIdent -> [String]
rule345 ParamMap
_lhsIparamMap NontermIdent
arg_nt_
         _instParams :: [String]
_instParams = Map NontermIdent (NontermIdent, [String])
-> NontermIdent -> NontermIdent -> [String]
rule346 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap NontermIdent
arg_name_ NontermIdent
arg_nt_
         _replParamMap :: Map String String
_replParamMap = forall {a}. [a] -> [String] -> Map String a
rule347 [String]
_instParams [String]
_orgParams
         _replace :: String -> String
_replace = Map String String -> String -> String
rule348 Map String String
_replParamMap
         _evalTp :: Type -> Type
_evalTp = forall {a}. Options -> [a] -> (String -> String) -> Type -> Type
rule349 Options
_lhsIoptions [String]
_orgParams String -> String
_replace
         _lhsOtps :: [Type]
         _lhsOtps :: [Type]
_lhsOtps = [String] -> Bool -> Int -> NontermIdent -> [Type]
rule350 [String]
_instParams Bool
_isSuperfluousHigherOrderIntra Int
arg_nr_ NontermIdent
arg_nt_
         _lhsOdeclsAbove :: [Decl]
         _lhsOdeclsAbove :: [Decl]
_lhsOdeclsAbove = forall {a}. () -> [a]
rule351  ()
         _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks
         _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks
_lhsObldBlocksFun = [Decl] -> [Decl] -> DeclBlocks -> DeclBlocks
rule352 [Decl]
_decls [Decl]
_lhsIdeclsAbove
         _lhsOallTpsFound :: Bool
         _lhsOallTpsFound :: Bool
_lhsOallTpsFound = () -> Bool
rule353  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {a}. () -> [a]
rule354  ()
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = forall a. a -> a
rule355 [Decl]
_decls
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = forall {a}. () -> [a]
rule356  ()
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = forall a. a -> a
rule357 Set NontermIdent
_visitedSet
         __result_ :: T_CRule_vOut19
__result_ = Bool
-> (DeclBlocks -> DeclBlocks)
-> [String]
-> [Decl]
-> [Decl]
-> [NontermIdent]
-> Exprs
-> [Decl]
-> [Type]
-> Set String
-> Set NontermIdent
-> T_CRule_vOut19
T_CRule_vOut19 Bool
_lhsOallTpsFound DeclBlocks -> DeclBlocks
_lhsObldBlocksFun [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet
         in T_CRule_vOut19
__result_ )
     in T_CRule_v19 -> T_CRule_s20
C_CRule_s20 T_CRule_v19
v19
   {-# INLINE rule333 #-}
   {-# LINE 148 "src-ag/GenerateCode.ag" #-}
   rule333 = \ ((_lhsIvisitedSet) :: Set Identifier) name_ ->
                                            {-# LINE 148 "src-ag/GenerateCode.ag" #-}
                                            Set.insert name_ _lhsIvisitedSet
                                            {-# LINE 2499 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule334 #-}
   {-# LINE 204 "src-ag/GenerateCode.ag" #-}
   rule334 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ nr_ nt_ ->
                                         {-# LINE 204 "src-ag/GenerateCode.ag" #-}
                                         show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_
                                         {-# LINE 2505 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule335 #-}
   {-# LINE 205 "src-ag/GenerateCode.ag" #-}
   rule335 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->
                                       {-# LINE 205 "src-ag/GenerateCode.ag" #-}
                                       \v -> if _lhsIo_costcentre
                                             then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v
                                             else v
                                       {-# LINE 2513 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule336 #-}
   {-# LINE 208 "src-ag/GenerateCode.ag" #-}
   rule336 = \ _addCostCentre ((_lhsIaroundMap) :: Set Identifier) ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ((_lhsIo_monadic) :: Bool) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) _visitedSet inh_ isLast_ name_ nr_ nt_ syn_ ->
                               {-# LINE 208 "src-ag/GenerateCode.ag" #-}
                               let  lhsVars =  map (attrname _lhsIoptions True name_) (Map.keys syn_)
                                               ++ if isLast_ then [] else [unwrap ++ funname name_ (nr_+1)]
                                    rhsVars = map (attrname _lhsIoptions False name_) (Map.keys inh_)
                                    unwrap = if _lhsIo_newtypes then typeName nt_ (nr_ + 1) ++ " " else ""
                                    tuple | isMerging = TupleLhs [locname _lhsIoptions name_ ++ "_comp"]
                                          | otherwise = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars
                                    rhs = _addCostCentre     $ Code.InvokeExpr (typeName nt_ nr_) (SimpleExpr fun) (map SimpleExpr rhsVars)
                                    isVirtual _ [] = False
                                    isVirtual nm ((n,_,kind) : r)
                                      | nm == n   = case kind of
                                                      ChildAttr      -> True
                                                      ChildReplace _ -> True
                                                      _              -> False
                                      | otherwise = isVirtual nm r
                                    isMerged = name_ `Map.member` _lhsImergeMap
                                    isMerging = name_ `elem` concatMap (\(_,cs) -> cs) (Map.elems _lhsImergeMap)
                                    merges = [ (c,cs) | (c,(_,cs)) <- Map.assocs _lhsImergeMap, all (`Set.member` _visitedSet    ) cs, name_ `elem` (c:cs) ]
                                    baseNm = if nr_ == 0 && isVirtual name_ _lhsIchildren
                                             then Ident (getName name_ ++ "_inst") (getPos name_)
                                             else name_
                                    fun | nr_ == 0 && Set.member name_ _lhsIaroundMap
                                                    = locname _lhsIoptions name_ ++ "_around " ++ funname baseNm 0
                                        | otherwise = funname baseNm nr_
                                    outDecls | isMerged  = []
                                             | otherwise =
                                                           if isMerging
                                                           then [mkDecl _lhsIo_monadic tuple rhs Set.empty Set.empty]
                                                           else [Resume _lhsIo_monadic (typeName nt_ nr_) tuple rhs]
                                    outMerged | null merges || nr_ /= 0 = []
                                              | otherwise = let (c,cs) = head merges
                                                                tuple' = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars'
                                                                lhsVars' = map (attrname _lhsIoptions True c) (Map.keys syn_)
                                                                           ++ if isLast_ then [] else [unwrap ++ funname c (nr_+1)]
                                                                rhsVars' = [ locname _lhsIoptions c' ++ "_comp" | c' <- cs ]
                                                                fun'    = locname _lhsIoptions c ++ "_merge"
                                                                rhs' = App fun' (map SimpleExpr rhsVars')
                                                            in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']
                               in
                                  (outDecls ++ outMerged)
                               {-# LINE 2557 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule337 #-}
   {-# LINE 331 "src-ag/GenerateCode.ag" #-}
   rule337 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ((_lhsInr) :: Int) name_ ->
            {-# LINE 331 "src-ag/GenerateCode.ag" #-}
            _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs
            {-# LINE 2563 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule338 #-}
   {-# LINE 344 "src-ag/GenerateCode.ag" #-}
   rule338 = \ _isSuperfluousHigherOrderIntra name_ nr_ ->
                     {-# LINE 344 "src-ag/GenerateCode.ag" #-}
                     if _isSuperfluousHigherOrderIntra
                     then []
                     else [funname name_ (nr_+1)]
                     {-# LINE 2571 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule339 #-}
   {-# LINE 348 "src-ag/GenerateCode.ag" #-}
   rule339 = \ _instParams ((_lhsIo_newtypes) :: Bool) ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) _names nr_ nt_ ->
                     {-# LINE 348 "src-ag/GenerateCode.ag" #-}
                     let wrap = if _lhsIo_newtypes then \x -> App (typeName nt_ (nr_ + 1)) [x] else id
                         addType expr | null _instParams     = expr
                                      | otherwise            = TypedExpr expr (_lhsIunfoldSemDom nt_ (nr_+1) _instParams    )
                     in map (wrap . addType . SimpleExpr) _names
                     {-# LINE 2580 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule340 #-}
   {-# LINE 360 "src-ag/GenerateCode.ag" #-}
   rule340 = \ _names ->
                       {-# LINE 360 "src-ag/GenerateCode.ag" #-}
                       Set.fromList _names
                       {-# LINE 2586 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule341 #-}
   {-# LINE 399 "src-ag/GenerateCode.ag" #-}
   rule341 = \ _evalTp _orgParams nt_ ->
                               {-# LINE 399 "src-ag/GenerateCode.ag" #-}
                               _evalTp     . typeToCodeType (Just nt_) _orgParams
                               {-# LINE 2592 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule342 #-}
   {-# LINE 400 "src-ag/GenerateCode.ag" #-}
   rule342 = \ ((_lhsIoptions) :: Options) _mkTp name_ syn_ ->
                                     {-# LINE 400 "src-ag/GenerateCode.ag" #-}
                                     [ TSig (attrname _lhsIoptions True name_ a) (_mkTp tp) |  (a,tp) <- Map.toList syn_ ]
                                     {-# LINE 2598 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule343 #-}
   {-# LINE 401 "src-ag/GenerateCode.ag" #-}
   rule343 = \ nr_ nt_ ->
                                 {-# LINE 401 "src-ag/GenerateCode.ag" #-}
                                 typeName nt_ (nr_+1)
                                 {-# LINE 2604 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule344 #-}
   {-# LINE 402 "src-ag/GenerateCode.ag" #-}
   rule344 = \ _definedTps _instParams _nextTp isLast_ name_ nr_ ->
                                {-# LINE 402 "src-ag/GenerateCode.ag" #-}
                                (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams    )) :)) _definedTps
                                {-# LINE 2610 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule345 #-}
   {-# LINE 404 "src-ag/GenerateCode.ag" #-}
   rule345 = \ ((_lhsIparamMap) :: ParamMap) nt_ ->
                                    {-# LINE 404 "src-ag/GenerateCode.ag" #-}
                                    map getName $ Map.findWithDefault [] nt_ _lhsIparamMap
                                    {-# LINE 2616 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule346 #-}
   {-# LINE 405 "src-ag/GenerateCode.ag" #-}
   rule346 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) name_ nt_ ->
                                     {-# LINE 405 "src-ag/GenerateCode.ag" #-}
                                     snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap
                                     {-# LINE 2622 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule347 #-}
   {-# LINE 406 "src-ag/GenerateCode.ag" #-}
   rule347 = \ _instParams _orgParams ->
                                       {-# LINE 406 "src-ag/GenerateCode.ag" #-}
                                       Map.fromList (zip _orgParams     _instParams    )
                                       {-# LINE 2628 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule348 #-}
   {-# LINE 407 "src-ag/GenerateCode.ag" #-}
   rule348 = \ _replParamMap ->
                                  {-# LINE 407 "src-ag/GenerateCode.ag" #-}
                                  \k -> Map.findWithDefault k k _replParamMap
                                  {-# LINE 2634 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule349 #-}
   {-# LINE 408 "src-ag/GenerateCode.ag" #-}
   rule349 = \ ((_lhsIoptions) :: Options) _orgParams _replace ->
                                 {-# LINE 408 "src-ag/GenerateCode.ag" #-}
                                 if null _orgParams     then id else evalType _lhsIoptions _replace
                                 {-# LINE 2640 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule350 #-}
   {-# LINE 425 "src-ag/GenerateCode.ag" #-}
   rule350 = \ _instParams _isSuperfluousHigherOrderIntra nr_ nt_ ->
                              {-# LINE 425 "src-ag/GenerateCode.ag" #-}
                              if _isSuperfluousHigherOrderIntra
                              then []
                              else [NT (ntOfVisit nt_ (nr_+1)) _instParams     False]
                              {-# LINE 2648 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule351 #-}
   {-# LINE 627 "src-ag/GenerateCode.ag" #-}
   rule351 = \  (_ :: ()) ->
                         {-# LINE 627 "src-ag/GenerateCode.ag" #-}
                         []
                         {-# LINE 2654 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule352 #-}
   {-# LINE 640 "src-ag/GenerateCode.ag" #-}
   rule352 = \ _decls ((_lhsIdeclsAbove) :: [Decl]) ->
                           {-# LINE 640 "src-ag/GenerateCode.ag" #-}
                           DeclBlock _lhsIdeclsAbove (head _decls    )
                           {-# LINE 2660 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule353 #-}
   rule353 = \  (_ :: ()) ->
     True
   {-# INLINE rule354 #-}
   rule354 = \  (_ :: ()) ->
     []
   {-# INLINE rule355 #-}
   rule355 = \ _decls ->
     _decls
   {-# INLINE rule356 #-}
   rule356 = \  (_ :: ()) ->
     []
   {-# INLINE rule357 #-}
   rule357 = \ _visitedSet ->
     _visitedSet

-- CSegment ----------------------------------------------------
-- wrapper
data Inh_CSegment  = Inh_CSegment { Inh_CSegment -> Map NontermIdent Type
inh_Inh_CSegment :: (Attributes), Inh_CSegment -> Bool
isLast_Inh_CSegment :: (Bool), Inh_CSegment -> Int
nr_Inh_CSegment :: (Int), Inh_CSegment -> NontermIdent
nt_Inh_CSegment :: (NontermIdent), Inh_CSegment -> Bool
o_case_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_cata_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_clean_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_costcentre_Inh_CSegment :: (Bool), Inh_CSegment -> Maybe Bool
o_data_Inh_CSegment :: (Maybe Bool), Inh_CSegment -> Bool
o_linePragmas_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_monadic_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_newtypes_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_pretty_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_rename_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_sem_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_sig_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_splitsems_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_strictwrap_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_traces_Inh_CSegment :: (Bool), Inh_CSegment -> Bool
o_unbox_Inh_CSegment :: (Bool), Inh_CSegment -> Options
options_Inh_CSegment :: (Options), Inh_CSegment -> ParamMap
paramMap_Inh_CSegment :: (ParamMap), Inh_CSegment -> String
prefix_Inh_CSegment :: (String), Inh_CSegment -> Map NontermIdent Type
syn_Inh_CSegment :: (Attributes) }
data Syn_CSegment  = Syn_CSegment { Syn_CSegment -> [String]
comments_Syn_CSegment :: ([String]), Syn_CSegment -> [Decl]
semDom_Syn_CSegment :: ([Decl]), Syn_CSegment -> Map (NontermIdent, Int) ([String], Type)
semDomUnfoldGath_Syn_CSegment :: (Map (NontermIdent, Int) ([String], Code.Type)), Syn_CSegment -> [Decl]
wrapDecls_Syn_CSegment :: (Decls) }
{-# INLINABLE wrap_CSegment #-}
wrap_CSegment :: T_CSegment  -> Inh_CSegment  -> (Syn_CSegment )
wrap_CSegment :: T_CSegment -> Inh_CSegment -> Syn_CSegment
wrap_CSegment (T_CSegment Identity T_CSegment_s23
act) (Inh_CSegment Map NontermIdent Type
_lhsIinh Bool
_lhsIisLast Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CSegment_s23
sem <- Identity T_CSegment_s23
act
        let arg22 :: T_CSegment_vIn22
arg22 = Map NontermIdent Type
-> Bool
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CSegment_vIn22
T_CSegment_vIn22 Map NontermIdent Type
_lhsIinh Bool
_lhsIisLast Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn
        (T_CSegment_vOut22 [String]
_lhsOcomments [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CSegment_s23 -> T_CSegment_v22
inv_CSegment_s23 T_CSegment_s23
sem T_CSegment_vIn22
arg22)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([String]
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> Syn_CSegment
Syn_CSegment [String]
_lhsOcomments [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls)
   )

-- cata
{-# INLINE sem_CSegment #-}
sem_CSegment :: CSegment  -> T_CSegment 
sem_CSegment :: CSegment -> T_CSegment
sem_CSegment ( CSegment Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ ) = Map NontermIdent Type -> Map NontermIdent Type -> T_CSegment
sem_CSegment_CSegment Map NontermIdent Type
inh_ Map NontermIdent Type
syn_

-- semantic domain
newtype T_CSegment  = T_CSegment {
                                 T_CSegment -> Identity T_CSegment_s23
attach_T_CSegment :: Identity (T_CSegment_s23 )
                                 }
newtype T_CSegment_s23  = C_CSegment_s23 {
                                         T_CSegment_s23 -> T_CSegment_v22
inv_CSegment_s23 :: (T_CSegment_v22 )
                                         }
data T_CSegment_s24  = C_CSegment_s24
type T_CSegment_v22  = (T_CSegment_vIn22 ) -> (T_CSegment_vOut22 )
data T_CSegment_vIn22  = T_CSegment_vIn22 (Attributes) (Bool) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)
data T_CSegment_vOut22  = T_CSegment_vOut22 ([String]) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)
{-# NOINLINE sem_CSegment_CSegment #-}
sem_CSegment_CSegment :: (Attributes) -> (Attributes) -> T_CSegment 
sem_CSegment_CSegment :: Map NontermIdent Type -> Map NontermIdent Type -> T_CSegment
sem_CSegment_CSegment Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_ = Identity T_CSegment_s23 -> T_CSegment
T_CSegment (forall (m :: * -> *) a. Monad m => a -> m a
return T_CSegment_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_CSegment_s23
st23 = let
      v22 :: T_CSegment_v22 
      v22 :: T_CSegment_v22
v22 = \ (T_CSegment_vIn22 Map NontermIdent Type
_lhsIinh Bool
_lhsIisLast Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) -> ( let
         _altSemForm :: Bool
_altSemForm = Options -> Bool
rule358 Options
_lhsIoptions
         _tp :: Type
_tp = Bool -> Type -> Types -> Type -> Type
rule359 Bool
_altSemForm Type
_indexExpr Types
_inhTps Type
_synTps
         _inhTps :: Types
_inhTps = forall {k}. NontermIdent -> [String] -> Map k Type -> Types
rule360 NontermIdent
_lhsInt [String]
_params Map NontermIdent Type
arg_inh_
         _inhTup :: Type
_inhTup = Types -> Bool -> Type
rule361 Types
_inhTps Bool
_lhsIo_unbox
         _synTps :: Type
_synTps = forall {a} {k}.
Types
-> [a] -> NontermIdent -> Bool -> [String] -> Map k Type -> Type
rule362 Types
_continuation Types
_inhTps NontermIdent
_lhsInt Bool
_lhsIo_unbox [String]
_params Map NontermIdent Type
arg_syn_
         _curTypeName :: String
_curTypeName = Int -> NontermIdent -> String
rule363 Int
_lhsInr NontermIdent
_lhsInt
         _nextTypeName :: String
_nextTypeName = Int -> NontermIdent -> String
rule364 Int
_lhsInr NontermIdent
_lhsInt
         _indexName :: String
_indexName = String -> String
rule365 String
_curTypeName
         _dataIndex :: Decl
_dataIndex = String -> [String] -> Decl
rule366 String
_indexName [String]
_params
         _indexExpr :: Type
_indexExpr = String -> [String] -> Type
rule367 String
_indexName [String]
_params
         _indexStr :: String
_indexStr = String -> [String] -> String
rule368 String
_indexName [String]
_params
         _inhInstance :: Decl
_inhInstance = String -> Type -> Int -> NontermIdent -> Decl
rule369 String
_indexStr Type
_inhTup Int
_lhsInr NontermIdent
_lhsInt
         _synInstance :: Decl
_synInstance = String -> Int -> NontermIdent -> Type -> Decl
rule370 String
_indexStr Int
_lhsInr NontermIdent
_lhsInt Type
_synTps
         _continuation :: Types
_continuation = Bool -> String -> [String] -> Types
rule371 Bool
_lhsIisLast String
_nextTypeName [String]
_params
         _params :: [String]
_params = NontermIdent -> ParamMap -> [String]
rule372 NontermIdent
_lhsInt ParamMap
_lhsIparamMap
         _lhsOsemDom :: [Decl]
         _lhsOsemDom :: [Decl]
_lhsOsemDom = Bool
-> Decl
-> Decl
-> Int
-> NontermIdent
-> Bool
-> Options
-> [String]
-> Decl
-> Type
-> [Decl]
rule373 Bool
_altSemForm Decl
_dataIndex Decl
_inhInstance Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_newtypes Options
_lhsIoptions [String]
_params Decl
_synInstance Type
_tp
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = forall {a} {b}.
Int -> NontermIdent -> a -> b -> Map (NontermIdent, Int) (a, b)
rule374 Int
_lhsInr NontermIdent
_lhsInt [String]
_params Type
_tp
         _lhsOwrapDecls :: Decls
         _lhsOwrapDecls :: [Decl]
_lhsOwrapDecls = forall {a} {a}.
Bool
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Options
-> Map NontermIdent a
-> Map NontermIdent a
-> [Decl]
rule375 Bool
_lhsIisLast Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_newtypes Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = Int -> Map NontermIdent Type -> Map NontermIdent Type -> [String]
rule376 Int
_lhsInr Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_
         __result_ :: T_CSegment_vOut22
__result_ = [String]
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> T_CSegment_vOut22
T_CSegment_vOut22 [String]
_lhsOcomments [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls
         in T_CSegment_vOut22
__result_ )
     in T_CSegment_v22 -> T_CSegment_s23
C_CSegment_s23 T_CSegment_v22
v22
   {-# INLINE rule358 #-}
   {-# LINE 724 "src-ag/GenerateCode.ag" #-}
   rule358 = \ ((_lhsIoptions) :: Options) ->
                                 {-# LINE 724 "src-ag/GenerateCode.ag" #-}
                                 breadthFirst _lhsIoptions
                                 {-# LINE 2745 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule359 #-}
   {-# LINE 725 "src-ag/GenerateCode.ag" #-}
   rule359 = \ _altSemForm _indexExpr _inhTps _synTps ->
                         {-# LINE 725 "src-ag/GenerateCode.ag" #-}
                         if _altSemForm
                         then TypeApp (SimpleType "Child") [SimpleType "EvalInfo", _indexExpr     ]
                         else foldr Arr _synTps     _inhTps
                         {-# LINE 2753 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule360 #-}
   {-# LINE 728 "src-ag/GenerateCode.ag" #-}
   rule360 = \ ((_lhsInt) :: NontermIdent) _params inh_ ->
                             {-# LINE 728 "src-ag/GenerateCode.ag" #-}
                             [typeToCodeType (Just _lhsInt) _params     tp |  tp <- Map.elems inh_]
                             {-# LINE 2759 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule361 #-}
   {-# LINE 729 "src-ag/GenerateCode.ag" #-}
   rule361 = \ _inhTps ((_lhsIo_unbox) :: Bool) ->
                             {-# LINE 729 "src-ag/GenerateCode.ag" #-}
                             mkTupleType _lhsIo_unbox (null _inhTps    ) _inhTps
                             {-# LINE 2765 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule362 #-}
   {-# LINE 730 "src-ag/GenerateCode.ag" #-}
   rule362 = \ _continuation _inhTps ((_lhsInt) :: NontermIdent) ((_lhsIo_unbox) :: Bool) _params syn_ ->
                             {-# LINE 730 "src-ag/GenerateCode.ag" #-}
                             mkTupleType _lhsIo_unbox (null _inhTps    ) ([typeToCodeType (Just _lhsInt) _params     tp |  tp <- Map.elems syn_] ++ _continuation    )
                             {-# LINE 2771 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule363 #-}
   {-# LINE 731 "src-ag/GenerateCode.ag" #-}
   rule363 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->
                                   {-# LINE 731 "src-ag/GenerateCode.ag" #-}
                                   typeName _lhsInt _lhsInr
                                   {-# LINE 2777 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule364 #-}
   {-# LINE 732 "src-ag/GenerateCode.ag" #-}
   rule364 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->
                                   {-# LINE 732 "src-ag/GenerateCode.ag" #-}
                                   typeName _lhsInt (_lhsInr + 1)
                                   {-# LINE 2783 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule365 #-}
   {-# LINE 733 "src-ag/GenerateCode.ag" #-}
   rule365 = \ _curTypeName ->
                                   {-# LINE 733 "src-ag/GenerateCode.ag" #-}
                                   "I_" ++ _curTypeName
                                   {-# LINE 2789 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule366 #-}
   {-# LINE 734 "src-ag/GenerateCode.ag" #-}
   rule366 = \ _indexName _params ->
                                {-# LINE 734 "src-ag/GenerateCode.ag" #-}
                                Code.Data _indexName     _params     [DataAlt _indexName     []] False []
                                {-# LINE 2795 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule367 #-}
   {-# LINE 735 "src-ag/GenerateCode.ag" #-}
   rule367 = \ _indexName _params ->
                                {-# LINE 735 "src-ag/GenerateCode.ag" #-}
                                TypeApp (SimpleType _indexName    ) (map (SimpleType . ('@':)) _params    )
                                {-# LINE 2801 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule368 #-}
   {-# LINE 736 "src-ag/GenerateCode.ag" #-}
   rule368 = \ _indexName _params ->
                                {-# LINE 736 "src-ag/GenerateCode.ag" #-}
                                "(" ++ _indexName     ++ concatMap (\p -> " " ++ p) _params     ++ ")"
                                {-# LINE 2807 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule369 #-}
   {-# LINE 737 "src-ag/GenerateCode.ag" #-}
   rule369 = \ _indexStr _inhTup ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->
                                  {-# LINE 737 "src-ag/GenerateCode.ag" #-}
                                  Code.Data "instance Inh" [_indexStr    ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup    ] ] False []
                                  {-# LINE 2813 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule370 #-}
   {-# LINE 738 "src-ag/GenerateCode.ag" #-}
   rule370 = \ _indexStr ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) _synTps ->
                                  {-# LINE 738 "src-ag/GenerateCode.ag" #-}
                                  Code.Data "instance Syn" [_indexStr    ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps    ] ] False []
                                  {-# LINE 2819 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule371 #-}
   {-# LINE 739 "src-ag/GenerateCode.ag" #-}
   rule371 = \ ((_lhsIisLast) :: Bool) _nextTypeName _params ->
                                   {-# LINE 739 "src-ag/GenerateCode.ag" #-}
                                   if  _lhsIisLast
                                   then []
                                   else [TypeApp (SimpleType _nextTypeName    ) (map (SimpleType . ('@':)) _params    )]
                                   {-# LINE 2827 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule372 #-}
   {-# LINE 742 "src-ag/GenerateCode.ag" #-}
   rule372 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->
                             {-# LINE 742 "src-ag/GenerateCode.ag" #-}
                             map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap
                             {-# LINE 2833 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule373 #-}
   {-# LINE 743 "src-ag/GenerateCode.ag" #-}
   rule373 = \ _altSemForm _dataIndex _inhInstance ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIoptions) :: Options) _params _synInstance _tp ->
                             {-# LINE 743 "src-ag/GenerateCode.ag" #-}
                             let name = typeName _lhsInt _lhsInr
                                 evalTp | null _params     = id
                                        | otherwise        = idEvalType _lhsIoptions
                             in ( if _lhsIo_newtypes
                                  then [ Code.NewType name _params     name (evalTp _tp    ) ]
                                  else [ Code.Type name _params     (evalTp _tp    ) ] )
                                ++ ( if _altSemForm
                                     then [_dataIndex    , _inhInstance    , _synInstance    ]
                                     else [] )
                             {-# LINE 2847 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule374 #-}
   {-# LINE 757 "src-ag/GenerateCode.ag" #-}
   rule374 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) _params _tp ->
                               {-# LINE 757 "src-ag/GenerateCode.ag" #-}
                               Map.singleton (_lhsInt, _lhsInr) (_params    , _tp    )
                               {-# LINE 2853 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule375 #-}
   {-# LINE 842 "src-ag/GenerateCode.ag" #-}
   rule375 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) inh_ syn_ ->
                                 {-# LINE 842 "src-ag/GenerateCode.ag" #-}
                                 let lhsVars = map (lhsname _lhsIoptions False) (Map.keys syn_)
                                               ++ if _lhsIisLast then [] else [unwrap ++ sem (_lhsInr+1)]
                                     rhsVars = map (lhsname _lhsIoptions True) (Map.keys inh_)
                                     rhs = map SimpleExpr rhsVars
                                     unwrap = if _lhsIo_newtypes then typeName _lhsInt (_lhsInr + 1) ++ " " else ""
                                     var   = "sem"
                                     sem 0 = var
                                     sem n = var ++ "_" ++ show n
                                     ntt   = typeName _lhsInt _lhsInr
                                 in [ EvalDecl ntt (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (InvokeExpr ntt (SimpleExpr $ sem _lhsInr) rhs) ]
                                 {-# LINE 2868 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule376 #-}
   {-# LINE 884 "src-ag/GenerateCode.ag" #-}
   rule376 = \ ((_lhsInr) :: Int) inh_ syn_ ->
                                   {-# LINE 884 "src-ag/GenerateCode.ag" #-}
                                   let body = map ind (showsSegment (CSegment inh_ syn_))
                                   in if null body
                                      then []
                                      else ("visit " ++ show _lhsInr ++ ":") : body
                                   {-# LINE 2877 "src-generated/GenerateCode.hs" #-}

-- CSegments ---------------------------------------------------
-- wrapper
data Inh_CSegments  = Inh_CSegments { Inh_CSegments -> Map NontermIdent Type
inh_Inh_CSegments :: (Attributes), Inh_CSegments -> Int
nr_Inh_CSegments :: (Int), Inh_CSegments -> NontermIdent
nt_Inh_CSegments :: (NontermIdent), Inh_CSegments -> Bool
o_case_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_cata_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_clean_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_costcentre_Inh_CSegments :: (Bool), Inh_CSegments -> Maybe Bool
o_data_Inh_CSegments :: (Maybe Bool), Inh_CSegments -> Bool
o_linePragmas_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_monadic_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_newtypes_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_pretty_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_rename_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_sem_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_sig_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_splitsems_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_strictwrap_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_traces_Inh_CSegments :: (Bool), Inh_CSegments -> Bool
o_unbox_Inh_CSegments :: (Bool), Inh_CSegments -> Options
options_Inh_CSegments :: (Options), Inh_CSegments -> ParamMap
paramMap_Inh_CSegments :: (ParamMap), Inh_CSegments -> String
prefix_Inh_CSegments :: (String), Inh_CSegments -> Map NontermIdent Type
syn_Inh_CSegments :: (Attributes) }
data Syn_CSegments  = Syn_CSegments { Syn_CSegments -> [String]
comments_Syn_CSegments :: ([String]), Syn_CSegments -> Bool
isNil_Syn_CSegments :: (Bool), Syn_CSegments -> [Decl]
semDom_Syn_CSegments :: ([Decl]), Syn_CSegments -> Map (NontermIdent, Int) ([String], Type)
semDomUnfoldGath_Syn_CSegments :: (Map (NontermIdent, Int) ([String], Code.Type)), Syn_CSegments -> [Decl]
wrapDecls_Syn_CSegments :: (Decls) }
{-# INLINABLE wrap_CSegments #-}
wrap_CSegments :: T_CSegments  -> Inh_CSegments  -> (Syn_CSegments )
wrap_CSegments :: T_CSegments -> Inh_CSegments -> Syn_CSegments
wrap_CSegments (T_CSegments Identity T_CSegments_s26
act) (Inh_CSegments Map NontermIdent Type
_lhsIinh Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CSegments_s26
sem <- Identity T_CSegments_s26
act
        let arg25 :: T_CSegments_vIn25
arg25 = Map NontermIdent Type
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CSegments_vIn25
T_CSegments_vIn25 Map NontermIdent Type
_lhsIinh Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn
        (T_CSegments_vOut25 [String]
_lhsOcomments Bool
_lhsOisNil [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 T_CSegments_s26
sem T_CSegments_vIn25
arg25)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([String]
-> Bool
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> Syn_CSegments
Syn_CSegments [String]
_lhsOcomments Bool
_lhsOisNil [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls)
   )

-- cata
{-# NOINLINE sem_CSegments #-}
sem_CSegments :: CSegments  -> T_CSegments 
sem_CSegments :: CSegments -> T_CSegments
sem_CSegments CSegments
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CSegment -> T_CSegments -> T_CSegments
sem_CSegments_Cons T_CSegments
sem_CSegments_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map CSegment -> T_CSegment
sem_CSegment CSegments
list)

-- semantic domain
newtype T_CSegments  = T_CSegments {
                                   T_CSegments -> Identity T_CSegments_s26
attach_T_CSegments :: Identity (T_CSegments_s26 )
                                   }
newtype T_CSegments_s26  = C_CSegments_s26 {
                                           T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 :: (T_CSegments_v25 )
                                           }
data T_CSegments_s27  = C_CSegments_s27
type T_CSegments_v25  = (T_CSegments_vIn25 ) -> (T_CSegments_vOut25 )
data T_CSegments_vIn25  = T_CSegments_vIn25 (Attributes) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)
data T_CSegments_vOut25  = T_CSegments_vOut25 ([String]) (Bool) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)
{-# NOINLINE sem_CSegments_Cons #-}
sem_CSegments_Cons :: T_CSegment  -> T_CSegments  -> T_CSegments 
sem_CSegments_Cons :: T_CSegment -> T_CSegments -> T_CSegments
sem_CSegments_Cons T_CSegment
arg_hd_ T_CSegments
arg_tl_ = Identity T_CSegments_s26 -> T_CSegments
T_CSegments (forall (m :: * -> *) a. Monad m => a -> m a
return T_CSegments_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_CSegments_s26
st26 = let
      v25 :: T_CSegments_v25 
      v25 :: T_CSegments_v25
v25 = \ (T_CSegments_vIn25 Map NontermIdent Type
_lhsIinh Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) -> ( let
         _hdX23 :: T_CSegment_s23
_hdX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CSegment -> Identity T_CSegment_s23
attach_T_CSegment (T_CSegment
arg_hd_))
         _tlX26 :: T_CSegments_s26
_tlX26 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CSegments -> Identity T_CSegments_s26
attach_T_CSegments (T_CSegments
arg_tl_))
         (T_CSegment_vOut22 [String]
_hdIcomments [Decl]
_hdIsemDom Map (NontermIdent, Int) ([String], Type)
_hdIsemDomUnfoldGath [Decl]
_hdIwrapDecls) = T_CSegment_s23 -> T_CSegment_v22
inv_CSegment_s23 T_CSegment_s23
_hdX23 (Map NontermIdent Type
-> Bool
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CSegment_vIn22
T_CSegment_vIn22 Map NontermIdent Type
_hdOinh Bool
_hdOisLast Int
_hdOnr NontermIdent
_hdOnt Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_clean Bool
_hdOo_costcentre Maybe Bool
_hdOo_data Bool
_hdOo_linePragmas Bool
_hdOo_monadic Bool
_hdOo_newtypes Bool
_hdOo_pretty Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_splitsems Bool
_hdOo_strictwrap Bool
_hdOo_traces Bool
_hdOo_unbox Options
_hdOoptions ParamMap
_hdOparamMap String
_hdOprefix Map NontermIdent Type
_hdOsyn)
         (T_CSegments_vOut25 [String]
_tlIcomments Bool
_tlIisNil [Decl]
_tlIsemDom Map (NontermIdent, Int) ([String], Type)
_tlIsemDomUnfoldGath [Decl]
_tlIwrapDecls) = T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 T_CSegments_s26
_tlX26 (Map NontermIdent Type
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> ParamMap
-> String
-> Map NontermIdent Type
-> T_CSegments_vIn25
T_CSegments_vIn25 Map NontermIdent Type
_tlOinh Int
_tlOnr NontermIdent
_tlOnt Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_clean Bool
_tlOo_costcentre Maybe Bool
_tlOo_data Bool
_tlOo_linePragmas Bool
_tlOo_monadic Bool
_tlOo_newtypes Bool
_tlOo_pretty Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_splitsems Bool
_tlOo_strictwrap Bool
_tlOo_traces Bool
_tlOo_unbox Options
_tlOoptions ParamMap
_tlOparamMap String
_tlOprefix Map NontermIdent Type
_tlOsyn)
         _tlOnr :: Int
_tlOnr = Int -> Int
rule377 Int
_lhsInr
         _lhsOisNil :: Bool
         _lhsOisNil :: Bool
_lhsOisNil = () -> Bool
rule378  ()
         _hdOisLast :: Bool
_hdOisLast = Bool -> Bool
rule379 Bool
_tlIisNil
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = [String] -> [String] -> [String]
rule380 [String]
_hdIcomments [String]
_tlIcomments
         _lhsOsemDom :: [Decl]
         _lhsOsemDom :: [Decl]
_lhsOsemDom = [Decl] -> [Decl] -> [Decl]
rule381 [Decl]
_hdIsemDom [Decl]
_tlIsemDom
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
-> Map (NontermIdent, Int) ([String], Type)
rule382 Map (NontermIdent, Int) ([String], Type)
_hdIsemDomUnfoldGath Map (NontermIdent, Int) ([String], Type)
_tlIsemDomUnfoldGath
         _lhsOwrapDecls :: Decls
         _lhsOwrapDecls :: [Decl]
_lhsOwrapDecls = [Decl] -> [Decl] -> [Decl]
rule383 [Decl]
_hdIwrapDecls [Decl]
_tlIwrapDecls
         _hdOinh :: Map NontermIdent Type
_hdOinh = Map NontermIdent Type -> Map NontermIdent Type
rule384 Map NontermIdent Type
_lhsIinh
         _hdOnr :: Int
_hdOnr = Int -> Int
rule385 Int
_lhsInr
         _hdOnt :: NontermIdent
_hdOnt = NontermIdent -> NontermIdent
rule386 NontermIdent
_lhsInt
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule387 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule388 Bool
_lhsIo_cata
         _hdOo_clean :: Bool
_hdOo_clean = Bool -> Bool
rule389 Bool
_lhsIo_clean
         _hdOo_costcentre :: Bool
_hdOo_costcentre = Bool -> Bool
rule390 Bool
_lhsIo_costcentre
         _hdOo_data :: Maybe Bool
_hdOo_data = Maybe Bool -> Maybe Bool
rule391 Maybe Bool
_lhsIo_data
         _hdOo_linePragmas :: Bool
_hdOo_linePragmas = Bool -> Bool
rule392 Bool
_lhsIo_linePragmas
         _hdOo_monadic :: Bool
_hdOo_monadic = Bool -> Bool
rule393 Bool
_lhsIo_monadic
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule394 Bool
_lhsIo_newtypes
         _hdOo_pretty :: Bool
_hdOo_pretty = Bool -> Bool
rule395 Bool
_lhsIo_pretty
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule396 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule397 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule398 Bool
_lhsIo_sig
         _hdOo_splitsems :: Bool
_hdOo_splitsems = Bool -> Bool
rule399 Bool
_lhsIo_splitsems
         _hdOo_strictwrap :: Bool
_hdOo_strictwrap = Bool -> Bool
rule400 Bool
_lhsIo_strictwrap
         _hdOo_traces :: Bool
_hdOo_traces = Bool -> Bool
rule401 Bool
_lhsIo_traces
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule402 Bool
_lhsIo_unbox
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule403 Options
_lhsIoptions
         _hdOparamMap :: ParamMap
_hdOparamMap = ParamMap -> ParamMap
rule404 ParamMap
_lhsIparamMap
         _hdOprefix :: String
_hdOprefix = String -> String
rule405 String
_lhsIprefix
         _hdOsyn :: Map NontermIdent Type
_hdOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule406 Map NontermIdent Type
_lhsIsyn
         _tlOinh :: Map NontermIdent Type
_tlOinh = Map NontermIdent Type -> Map NontermIdent Type
rule407 Map NontermIdent Type
_lhsIinh
         _tlOnt :: NontermIdent
_tlOnt = NontermIdent -> NontermIdent
rule408 NontermIdent
_lhsInt
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule409 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule410 Bool
_lhsIo_cata
         _tlOo_clean :: Bool
_tlOo_clean = Bool -> Bool
rule411 Bool
_lhsIo_clean
         _tlOo_costcentre :: Bool
_tlOo_costcentre = Bool -> Bool
rule412 Bool
_lhsIo_costcentre
         _tlOo_data :: Maybe Bool
_tlOo_data = Maybe Bool -> Maybe Bool
rule413 Maybe Bool
_lhsIo_data
         _tlOo_linePragmas :: Bool
_tlOo_linePragmas = Bool -> Bool
rule414 Bool
_lhsIo_linePragmas
         _tlOo_monadic :: Bool
_tlOo_monadic = Bool -> Bool
rule415 Bool
_lhsIo_monadic
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule416 Bool
_lhsIo_newtypes
         _tlOo_pretty :: Bool
_tlOo_pretty = Bool -> Bool
rule417 Bool
_lhsIo_pretty
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule418 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule419 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule420 Bool
_lhsIo_sig
         _tlOo_splitsems :: Bool
_tlOo_splitsems = Bool -> Bool
rule421 Bool
_lhsIo_splitsems
         _tlOo_strictwrap :: Bool
_tlOo_strictwrap = Bool -> Bool
rule422 Bool
_lhsIo_strictwrap
         _tlOo_traces :: Bool
_tlOo_traces = Bool -> Bool
rule423 Bool
_lhsIo_traces
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule424 Bool
_lhsIo_unbox
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule425 Options
_lhsIoptions
         _tlOparamMap :: ParamMap
_tlOparamMap = ParamMap -> ParamMap
rule426 ParamMap
_lhsIparamMap
         _tlOprefix :: String
_tlOprefix = String -> String
rule427 String
_lhsIprefix
         _tlOsyn :: Map NontermIdent Type
_tlOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule428 Map NontermIdent Type
_lhsIsyn
         __result_ :: T_CSegments_vOut25
__result_ = [String]
-> Bool
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> T_CSegments_vOut25
T_CSegments_vOut25 [String]
_lhsOcomments Bool
_lhsOisNil [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls
         in T_CSegments_vOut25
__result_ )
     in T_CSegments_v25 -> T_CSegments_s26
C_CSegments_s26 T_CSegments_v25
v25
   {-# INLINE rule377 #-}
   {-# LINE 289 "src-ag/GenerateCode.ag" #-}
   rule377 = \ ((_lhsInr) :: Int) ->
                    {-# LINE 289 "src-ag/GenerateCode.ag" #-}
                    _lhsInr + 1
                    {-# LINE 2985 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule378 #-}
   {-# LINE 302 "src-ag/GenerateCode.ag" #-}
   rule378 = \  (_ :: ()) ->
                         {-# LINE 302 "src-ag/GenerateCode.ag" #-}
                         False
                         {-# LINE 2991 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule379 #-}
   {-# LINE 303 "src-ag/GenerateCode.ag" #-}
   rule379 = \ ((_tlIisNil) :: Bool) ->
                         {-# LINE 303 "src-ag/GenerateCode.ag" #-}
                         _tlIisNil
                         {-# LINE 2997 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule380 #-}
   rule380 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->
     _hdIcomments ++ _tlIcomments
   {-# INLINE rule381 #-}
   rule381 = \ ((_hdIsemDom) :: [Decl]) ((_tlIsemDom) :: [Decl]) ->
     _hdIsemDom ++ _tlIsemDom
   {-# INLINE rule382 #-}
   rule382 = \ ((_hdIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ((_tlIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->
     _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath
   {-# INLINE rule383 #-}
   rule383 = \ ((_hdIwrapDecls) :: Decls) ((_tlIwrapDecls) :: Decls) ->
     _hdIwrapDecls ++ _tlIwrapDecls
   {-# INLINE rule384 #-}
   rule384 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule385 #-}
   rule385 = \ ((_lhsInr) :: Int) ->
     _lhsInr
   {-# INLINE rule386 #-}
   rule386 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule387 #-}
   rule387 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule388 #-}
   rule388 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule389 #-}
   rule389 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule390 #-}
   rule390 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule391 #-}
   rule391 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule392 #-}
   rule392 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule393 #-}
   rule393 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule394 #-}
   rule394 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule395 #-}
   rule395 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule396 #-}
   rule396 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule397 #-}
   rule397 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule398 #-}
   rule398 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule399 #-}
   rule399 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule400 #-}
   rule400 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule401 #-}
   rule401 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule402 #-}
   rule402 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule403 #-}
   rule403 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule404 #-}
   rule404 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule405 #-}
   rule405 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule406 #-}
   rule406 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule407 #-}
   rule407 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule408 #-}
   rule408 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule409 #-}
   rule409 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule410 #-}
   rule410 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule411 #-}
   rule411 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule412 #-}
   rule412 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule413 #-}
   rule413 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule414 #-}
   rule414 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule415 #-}
   rule415 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule416 #-}
   rule416 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule417 #-}
   rule417 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule418 #-}
   rule418 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule419 #-}
   rule419 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule420 #-}
   rule420 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule421 #-}
   rule421 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule422 #-}
   rule422 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule423 #-}
   rule423 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule424 #-}
   rule424 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule425 #-}
   rule425 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule426 #-}
   rule426 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule427 #-}
   rule427 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule428 #-}
   rule428 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
{-# NOINLINE sem_CSegments_Nil #-}
sem_CSegments_Nil ::  T_CSegments 
sem_CSegments_Nil :: T_CSegments
sem_CSegments_Nil  = Identity T_CSegments_s26 -> T_CSegments
T_CSegments (forall (m :: * -> *) a. Monad m => a -> m a
return T_CSegments_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_CSegments_s26
st26 = let
      v25 :: T_CSegments_v25 
      v25 :: T_CSegments_v25
v25 = \ (T_CSegments_vIn25 Map NontermIdent Type
_lhsIinh Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn) -> ( let
         _lhsOisNil :: Bool
         _lhsOisNil :: Bool
_lhsOisNil = () -> Bool
rule429  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {a}. () -> [a]
rule430  ()
         _lhsOsemDom :: [Decl]
         _lhsOsemDom :: [Decl]
_lhsOsemDom = forall {a}. () -> [a]
rule431  ()
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)
         _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath = forall {k} {a}. () -> Map k a
rule432  ()
         _lhsOwrapDecls :: Decls
         _lhsOwrapDecls :: [Decl]
_lhsOwrapDecls = forall {a}. () -> [a]
rule433  ()
         __result_ :: T_CSegments_vOut25
__result_ = [String]
-> Bool
-> [Decl]
-> Map (NontermIdent, Int) ([String], Type)
-> [Decl]
-> T_CSegments_vOut25
T_CSegments_vOut25 [String]
_lhsOcomments Bool
_lhsOisNil [Decl]
_lhsOsemDom Map (NontermIdent, Int) ([String], Type)
_lhsOsemDomUnfoldGath [Decl]
_lhsOwrapDecls
         in T_CSegments_vOut25
__result_ )
     in T_CSegments_v25 -> T_CSegments_s26
C_CSegments_s26 T_CSegments_v25
v25
   {-# INLINE rule429 #-}
   {-# LINE 304 "src-ag/GenerateCode.ag" #-}
   rule429 = \  (_ :: ()) ->
                       {-# LINE 304 "src-ag/GenerateCode.ag" #-}
                       True
                       {-# LINE 3170 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule430 #-}
   rule430 = \  (_ :: ()) ->
     []
   {-# INLINE rule431 #-}
   rule431 = \  (_ :: ()) ->
     []
   {-# INLINE rule432 #-}
   rule432 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule433 #-}
   rule433 = \  (_ :: ()) ->
     []

-- CVisit ------------------------------------------------------
-- wrapper
data Inh_CVisit  = Inh_CVisit { Inh_CVisit -> Set NontermIdent
allNts_Inh_CVisit :: (Set NontermIdent), Inh_CVisit -> PragmaMap
allPragmas_Inh_CVisit :: (PragmaMap), Inh_CVisit -> Set NontermIdent
aroundMap_Inh_CVisit :: (Set Identifier), Inh_CVisit -> [(NontermIdent, Type, ChildKind)]
children_Inh_CVisit :: ([(Identifier,Type, ChildKind)]), Inh_CVisit -> NontermIdent
con_Inh_CVisit :: (ConstructorIdent), Inh_CVisit -> ContextMap
contextMap_Inh_CVisit :: (ContextMap), Inh_CVisit -> [Decl]
decls_Inh_CVisit :: (Decls), Inh_CVisit -> Map NontermIdent Type
inh_Inh_CVisit :: (Attributes), Inh_CVisit -> Map NontermIdent Int
instVisitNrs_Inh_CVisit :: (Map Identifier Int), Inh_CVisit -> Bool
isLast_Inh_CVisit :: (Bool), Inh_CVisit -> Map NontermIdent (NontermIdent, [NontermIdent])
mergeMap_Inh_CVisit :: (Map Identifier (Identifier, [Identifier])), Inh_CVisit -> Exprs
nextIntra_Inh_CVisit :: (Exprs), Inh_CVisit -> Set String
nextIntraVars_Inh_CVisit :: (Set String), Inh_CVisit -> Int
nr_Inh_CVisit :: (Int), Inh_CVisit -> NontermIdent
nt_Inh_CVisit :: (NontermIdent), Inh_CVisit -> Bool
o_case_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_cata_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_clean_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_costcentre_Inh_CVisit :: (Bool), Inh_CVisit -> Maybe Bool
o_data_Inh_CVisit :: (Maybe Bool), Inh_CVisit -> Bool
o_linePragmas_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_monadic_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_newtypes_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_pretty_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_rename_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_sem_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_sig_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_splitsems_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_strictwrap_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_traces_Inh_CVisit :: (Bool), Inh_CVisit -> Bool
o_unbox_Inh_CVisit :: (Bool), Inh_CVisit -> Options
options_Inh_CVisit :: (Options), Inh_CVisit -> Map NontermIdent (NontermIdent, [String])
paramInstMap_Inh_CVisit :: (Map Identifier (NontermIdent, [String])), Inh_CVisit -> ParamMap
paramMap_Inh_CVisit :: (ParamMap), Inh_CVisit -> String
prefix_Inh_CVisit :: (String), Inh_CVisit -> QuantMap
quantMap_Inh_CVisit :: (QuantMap), Inh_CVisit -> Map NontermIdent Type
syn_Inh_CVisit :: (Attributes), Inh_CVisit -> [NontermIdent]
terminals_Inh_CVisit :: ([Identifier]), Inh_CVisit -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CVisit :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CVisit -> Set NontermIdent
visitedSet_Inh_CVisit :: (Set Identifier), Inh_CVisit -> Bool
with_sig_Inh_CVisit :: (Bool), Inh_CVisit -> Set NontermIdent
wrappers_Inh_CVisit :: (Set NontermIdent) }
data Syn_CVisit  = Syn_CVisit { Syn_CVisit -> [String]
comments_Syn_CVisit :: ([String]), Syn_CVisit -> [Decl]
decls_Syn_CVisit :: (Decls), Syn_CVisit -> Map NontermIdent Int
gatherInstVisitNrs_Syn_CVisit :: (Map Identifier Int), Syn_CVisit -> Exprs
intra_Syn_CVisit :: (Exprs), Syn_CVisit -> Set String
intraVars_Syn_CVisit :: (Set String), Syn_CVisit -> [String]
semNames_Syn_CVisit :: ([String]), Syn_CVisit -> Set NontermIdent
visitedSet_Syn_CVisit :: (Set Identifier) }
{-# INLINABLE wrap_CVisit #-}
wrap_CVisit :: T_CVisit  -> Inh_CVisit  -> (Syn_CVisit )
wrap_CVisit :: T_CVisit -> Inh_CVisit -> Syn_CVisit
wrap_CVisit (T_CVisit Identity T_CVisit_s29
act) (Inh_CVisit Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap [Decl]
_lhsIdecls Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Bool
_lhsIisLast Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Exprs
_lhsInextIntra Set String
_lhsInextIntraVars Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CVisit_s29
sem <- Identity T_CVisit_s29
act
        let arg28 :: T_CVisit_vIn28
arg28 = Set NontermIdent
-> PragmaMap
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> ContextMap
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Bool
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Exprs
-> Set String
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> Bool
-> Set NontermIdent
-> T_CVisit_vIn28
T_CVisit_vIn28 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap [Decl]
_lhsIdecls Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Bool
_lhsIisLast Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Exprs
_lhsInextIntra Set String
_lhsInextIntraVars Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers
        (T_CVisit_vOut28 [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CVisit_s29 -> T_CVisit_v28
inv_CVisit_s29 T_CVisit_s29
sem T_CVisit_vIn28
arg28)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([String]
-> [Decl]
-> Map NontermIdent Int
-> Exprs
-> Set String
-> [String]
-> Set NontermIdent
-> Syn_CVisit
Syn_CVisit [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet)
   )

-- cata
{-# INLINE sem_CVisit #-}
sem_CVisit :: CVisit  -> T_CVisit 
sem_CVisit :: CVisit -> T_CVisit
sem_CVisit ( CVisit Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ Sequence
vss_ Sequence
intra_ Bool
ordered_ ) = Map NontermIdent Type
-> Map NontermIdent Type
-> T_Sequence
-> T_Sequence
-> Bool
-> T_CVisit
sem_CVisit_CVisit Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ ( Sequence -> T_Sequence
sem_Sequence Sequence
vss_ ) ( Sequence -> T_Sequence
sem_Sequence Sequence
intra_ ) Bool
ordered_

-- semantic domain
newtype T_CVisit  = T_CVisit {
                             T_CVisit -> Identity T_CVisit_s29
attach_T_CVisit :: Identity (T_CVisit_s29 )
                             }
newtype T_CVisit_s29  = C_CVisit_s29 {
                                     T_CVisit_s29 -> T_CVisit_v28
inv_CVisit_s29 :: (T_CVisit_v28 )
                                     }
data T_CVisit_s30  = C_CVisit_s30
type T_CVisit_v28  = (T_CVisit_vIn28 ) -> (T_CVisit_vOut28 )
data T_CVisit_vIn28  = T_CVisit_vIn28 (Set NontermIdent) (PragmaMap) (Set Identifier) ([(Identifier,Type, ChildKind)]) (ConstructorIdent) (ContextMap) (Decls) (Attributes) (Map Identifier Int) (Bool) (Map Identifier (Identifier, [Identifier])) (Exprs) (Set String) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (QuantMap) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (Bool) (Set NontermIdent)
data T_CVisit_vOut28  = T_CVisit_vOut28 ([String]) (Decls) (Map Identifier Int) (Exprs) (Set String) ([String]) (Set Identifier)
{-# NOINLINE sem_CVisit_CVisit #-}
sem_CVisit_CVisit :: (Attributes) -> (Attributes) -> T_Sequence  -> T_Sequence  -> (Bool) -> T_CVisit 
sem_CVisit_CVisit :: Map NontermIdent Type
-> Map NontermIdent Type
-> T_Sequence
-> T_Sequence
-> Bool
-> T_CVisit
sem_CVisit_CVisit Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_ T_Sequence
arg_vss_ T_Sequence
arg_intra_ Bool
arg_ordered_ = Identity T_CVisit_s29 -> T_CVisit
T_CVisit (forall (m :: * -> *) a. Monad m => a -> m a
return T_CVisit_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_CVisit_s29
st29 = let
      v28 :: T_CVisit_v28 
      v28 :: T_CVisit_v28
v28 = \ (T_CVisit_vIn28 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap [Decl]
_lhsIdecls Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Bool
_lhsIisLast Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Exprs
_lhsInextIntra Set String
_lhsInextIntraVars Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _vssX47 :: T_Sequence_s47
_vssX47 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Sequence -> Identity T_Sequence_s47
attach_T_Sequence (T_Sequence
arg_vss_))
         _intraX47 :: T_Sequence_s47
_intraX47 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Sequence -> Identity T_Sequence_s47
attach_T_Sequence (T_Sequence
arg_intra_))
         (T_Sequence_vOut46 Bool
_vssIallTpsFound DeclBlocks
_vssIblockDecls [String]
_vssIcomments [Decl]
_vssIdecls [Decl]
_vssIdeclsAbove [NontermIdent]
_vssIdefinedInsts Exprs
_vssIexprs [Decl]
_vssItSigs [Type]
_vssItps Set String
_vssIusedVars Set NontermIdent
_vssIvisitedSet) = T_Sequence_s47 -> T_Sequence_v46
inv_Sequence_s47 T_Sequence_s47
_vssX47 (Set NontermIdent
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Expr
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> String
-> T_Sequence_vIn46
T_Sequence_vIn46 Set NontermIdent
_vssOallNts Set NontermIdent
_vssOaroundMap [(NontermIdent, Type, ChildKind)]
_vssOchildren NontermIdent
_vssOcon forall a. [a]
_vssOdeclsAbove Map NontermIdent Type
_vssOinh Map NontermIdent Int
_vssOinstVisitNrs Expr
_vssOlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_vssOmergeMap Int
_vssOnr NontermIdent
_vssOnt Bool
_vssOo_case Bool
_vssOo_cata Bool
_vssOo_clean Bool
_vssOo_costcentre Maybe Bool
_vssOo_data Bool
_vssOo_linePragmas Bool
_vssOo_monadic Bool
_vssOo_newtypes Bool
_vssOo_pretty Bool
_vssOo_rename Bool
_vssOo_sem Bool
_vssOo_sig Bool
_vssOo_splitsems Bool
_vssOo_strictwrap Bool
_vssOo_traces Bool
_vssOo_unbox Options
_vssOoptions Map NontermIdent (NontermIdent, [String])
_vssOparamInstMap ParamMap
_vssOparamMap String
_vssOprefix Map NontermIdent Type
_vssOsyn [NontermIdent]
_vssOterminals NontermIdent -> Int -> [String] -> Type
_vssOunfoldSemDom Set NontermIdent
_vssOvisitedSet String
_vssOwhat)
         (T_Sequence_vOut46 Bool
_intraIallTpsFound DeclBlocks
_intraIblockDecls [String]
_intraIcomments [Decl]
_intraIdecls [Decl]
_intraIdeclsAbove [NontermIdent]
_intraIdefinedInsts Exprs
_intraIexprs [Decl]
_intraItSigs [Type]
_intraItps Set String
_intraIusedVars Set NontermIdent
_intraIvisitedSet) = T_Sequence_s47 -> T_Sequence_v46
inv_Sequence_s47 T_Sequence_s47
_intraX47 (Set NontermIdent
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Expr
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> String
-> T_Sequence_vIn46
T_Sequence_vIn46 Set NontermIdent
_intraOallNts Set NontermIdent
_intraOaroundMap [(NontermIdent, Type, ChildKind)]
_intraOchildren NontermIdent
_intraOcon forall {a}. a
_intraOdeclsAbove Map NontermIdent Type
_intraOinh Map NontermIdent Int
_intraOinstVisitNrs forall {a}. a
_intraOlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_intraOmergeMap Int
_intraOnr NontermIdent
_intraOnt Bool
_intraOo_case Bool
_intraOo_cata Bool
_intraOo_clean Bool
_intraOo_costcentre Maybe Bool
_intraOo_data Bool
_intraOo_linePragmas Bool
_intraOo_monadic Bool
_intraOo_newtypes Bool
_intraOo_pretty Bool
_intraOo_rename Bool
_intraOo_sem Bool
_intraOo_sig Bool
_intraOo_splitsems Bool
_intraOo_strictwrap Bool
_intraOo_traces Bool
_intraOo_unbox Options
_intraOoptions Map NontermIdent (NontermIdent, [String])
_intraOparamInstMap ParamMap
_intraOparamMap String
_intraOprefix Map NontermIdent Type
_intraOsyn [NontermIdent]
_intraOterminals NontermIdent -> Int -> [String] -> Type
_intraOunfoldSemDom Set NontermIdent
_intraOvisitedSet String
_intraOwhat)
         _lhsOintra :: Exprs
         _lhsOintra :: Exprs
_lhsOintra = Exprs -> Exprs
rule434 Exprs
_intraIexprs
         _lhsOintraVars :: Set String
         _lhsOintraVars :: Set String
_lhsOintraVars = Set String -> Set String
rule435 Set String
_intraIusedVars
         ([(NontermIdent, Type, ChildKind)]
_higherOrderChildren,[(NontermIdent, Type, ChildKind)]
_firstOrderChildren) = [(NontermIdent, Type, ChildKind)]
-> ([(NontermIdent, Type, ChildKind)],
    [(NontermIdent, Type, ChildKind)])
rule436 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _firstOrderOrig :: [(NontermIdent, Type, ChildKind)]
_firstOrderOrig = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule437 [(NontermIdent, Type, ChildKind)]
_firstOrderChildren
         _funcname :: String
_funcname = NontermIdent -> Int -> NontermIdent -> String -> String
rule438 NontermIdent
_lhsIcon Int
_lhsInr NontermIdent
_lhsInt String
_lhsIprefix
         _nextVisitName :: [String]
_nextVisitName = Bool -> Int -> NontermIdent -> String -> [String]
rule439 Bool
_lhsIisLast Int
_lhsInr NontermIdent
_lhsInt String
_lhsIprefix
         _nextVisitDecl :: [Decl]
_nextVisitDecl = NontermIdent
-> [Decl]
-> Bool
-> Set String
-> Int
-> NontermIdent
-> String
-> [String]
-> [Decl]
rule440 NontermIdent
_lhsIcon [Decl]
_lhsIdecls Bool
_lhsIisLast Set String
_lhsInextIntraVars Int
_lhsInr NontermIdent
_lhsInt String
_lhsIprefix [String]
_nextVisitName
         _isOneVisit :: Bool
_isOneVisit = Bool -> Int -> Bool
rule441 Bool
_lhsIisLast Int
_lhsInr
         _hasWrappers :: Bool
_hasWrappers = NontermIdent -> Set NontermIdent -> Bool
rule442 NontermIdent
_lhsInt Set NontermIdent
_lhsIwrappers
         _refDecls :: [Decl]
_refDecls = forall {a}.
Bool
-> Bool -> NontermIdent -> Options -> Map NontermIdent a -> [Decl]
rule443 Bool
_hasWrappers Bool
_isOneVisit NontermIdent
_lhsInt Options
_lhsIoptions Map NontermIdent Type
arg_syn_
         _decls :: [Decl]
_decls = Bool -> [Decl] -> [Decl] -> [Decl] -> [Decl] -> [Decl]
rule444 Bool
_lhsIo_clean [Decl]
_nextVisitDecl [Decl]
_refDecls [Decl]
_typeSigs [Decl]
_vssIdecls
         _vssOlastExpr :: Expr
_vssOlastExpr = forall {a} {a} {a}.
Bool
-> Options -> [String] -> Map a a -> Map NontermIdent a -> Expr
rule445 Bool
_lhsIo_unbox Options
_lhsIoptions [String]
_nextVisitName Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_
         _intraOlastExpr :: a
_intraOlastExpr = forall {a}. () -> a
rule446  ()
         _lastExprVars :: [String]
_lastExprVars = forall {a}. Options -> [String] -> Map NontermIdent a -> [String]
rule447 Options
_lhsIoptions [String]
_nextVisitName Map NontermIdent Type
arg_syn_
         ([Decl]
_blockFunDecls,Expr
_blockFirstFunCall) = String
-> [String] -> [Decl] -> Bool -> DeclBlocks -> ([Decl], Expr)
rule448 String
_funcname [String]
_lastExprVars [Decl]
_nextVisitDecl Bool
_o_case DeclBlocks
_vssIblockDecls
         _costCentreDescr :: String
_costCentreDescr = NontermIdent -> Int -> NontermIdent -> String
rule449 NontermIdent
_lhsIcon Int
_lhsInr NontermIdent
_lhsInt
         _addCostCentre :: Expr -> Expr
_addCostCentre = String -> Bool -> Expr -> Expr
rule450 String
_costCentreDescr Bool
_lhsIo_costcentre
         _params :: [String]
_params = NontermIdent -> ParamMap -> [String]
rule451 NontermIdent
_lhsInt ParamMap
_lhsIparamMap
         _semFun :: Decl
_semFun = forall {c} {a}.
(Expr -> Expr)
-> Expr
-> [Decl]
-> DeclsType
-> [(NontermIdent, Type, c)]
-> String
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Options
-> (NontermIdent -> Int -> [String] -> Type)
-> [String]
-> Bool
-> [String]
-> Map NontermIdent Type
-> Bool
-> Map NontermIdent a
-> Decl
rule452 Expr -> Expr
_addCostCentre Expr
_blockFirstFunCall [Decl]
_decls DeclsType
_declsType [(NontermIdent, Type, ChildKind)]
_firstOrderOrig String
_funcname Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_newtypes Bool
_lhsIo_unbox Options
_lhsIoptions NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom [String]
_nextVisitName Bool
_o_splitsems [String]
_params Map NontermIdent Type
arg_inh_ Bool
arg_ordered_ Map NontermIdent Type
arg_syn_
         _tsig :: Decl
_tsig = String -> Type -> Decl
rule453 String
_funcname Type
_semType
         _semType :: Type
_semType = forall {a} {c}.
[(a, Type, c)]
-> ContextMap
-> Int
-> NontermIdent
-> Options
-> QuantMap
-> [String]
-> Type
rule454 [(NontermIdent, Type, ChildKind)]
_firstOrderOrig ContextMap
_lhsIcontextMap Int
_lhsInr NontermIdent
_lhsInt Options
_lhsIoptions QuantMap
_lhsIquantMap [String]
_params
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = forall {a}. [a] -> Bool -> Bool -> a -> a -> Bool -> [a]
rule455 [Decl]
_blockFunDecls Bool
_lhsIwith_sig Bool
_o_splitsems Decl
_semFun Decl
_tsig Bool
arg_ordered_
         _typeSigs :: [Decl]
_typeSigs = Bool -> Bool -> [Decl] -> [Decl]
rule456 Bool
_lhsIo_sig Bool
_o_case [Decl]
_vssItSigs
         _o_do :: Bool
_o_do = Bool -> Bool -> Bool
rule457 Bool
_lhsIo_monadic Bool
arg_ordered_
         _o_case :: Bool
_o_case = PragmaMap
-> NontermIdent -> NontermIdent -> Bool -> Bool -> Bool -> Bool
rule458 PragmaMap
_lhsIallPragmas NontermIdent
_lhsIcon NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_o_do Bool
arg_ordered_
         _declsType :: DeclsType
_declsType = Bool -> Bool -> DeclsType
rule459 Bool
_o_case Bool
_o_do
         _o_splitsems :: Bool
_o_splitsems = Bool -> Bool -> Bool
rule460 Bool
_lhsIo_splitsems Bool
arg_ordered_
         _lhsOgatherInstVisitNrs :: Map Identifier Int
         _lhsOgatherInstVisitNrs :: Map NontermIdent Int
_lhsOgatherInstVisitNrs = Int -> [NontermIdent] -> Map NontermIdent Int
rule461 Int
_lhsInr [NontermIdent]
_vssIdefinedInsts
         _vssOdeclsAbove :: [a]
_vssOdeclsAbove = forall {a}. () -> [a]
rule462  ()
         _intraOdeclsAbove :: a
_intraOdeclsAbove = forall {a}. () -> a
rule463  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = [String] -> Int -> [String] -> [String]
rule464 [String]
_intraIcomments Int
_lhsInr [String]
_vssIcomments
         _vssOwhat :: String
_vssOwhat = () -> String
rule465  ()
         _intraOwhat :: String
_intraOwhat = () -> String
rule466  ()
         _lhsOsemNames :: [String]
         _lhsOsemNames :: [String]
_lhsOsemNames = forall {a}. a -> [a]
rule467 String
_funcname
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = Set NontermIdent -> Set NontermIdent
rule468 Set NontermIdent
_intraIvisitedSet
         _vssOallNts :: Set NontermIdent
_vssOallNts = Set NontermIdent -> Set NontermIdent
rule469 Set NontermIdent
_lhsIallNts
         _vssOaroundMap :: Set NontermIdent
_vssOaroundMap = Set NontermIdent -> Set NontermIdent
rule470 Set NontermIdent
_lhsIaroundMap
         _vssOchildren :: [(NontermIdent, Type, ChildKind)]
_vssOchildren = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule471 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _vssOcon :: NontermIdent
_vssOcon = NontermIdent -> NontermIdent
rule472 NontermIdent
_lhsIcon
         _vssOinh :: Map NontermIdent Type
_vssOinh = Map NontermIdent Type -> Map NontermIdent Type
rule473 Map NontermIdent Type
_lhsIinh
         _vssOinstVisitNrs :: Map NontermIdent Int
_vssOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule474 Map NontermIdent Int
_lhsIinstVisitNrs
         _vssOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_vssOmergeMap = Map NontermIdent (NontermIdent, [NontermIdent])
-> Map NontermIdent (NontermIdent, [NontermIdent])
rule475 Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap
         _vssOnr :: Int
_vssOnr = Int -> Int
rule476 Int
_lhsInr
         _vssOnt :: NontermIdent
_vssOnt = NontermIdent -> NontermIdent
rule477 NontermIdent
_lhsInt
         _vssOo_case :: Bool
_vssOo_case = forall a. a -> a
rule478 Bool
_o_case
         _vssOo_cata :: Bool
_vssOo_cata = Bool -> Bool
rule479 Bool
_lhsIo_cata
         _vssOo_clean :: Bool
_vssOo_clean = Bool -> Bool
rule480 Bool
_lhsIo_clean
         _vssOo_costcentre :: Bool
_vssOo_costcentre = Bool -> Bool
rule481 Bool
_lhsIo_costcentre
         _vssOo_data :: Maybe Bool
_vssOo_data = Maybe Bool -> Maybe Bool
rule482 Maybe Bool
_lhsIo_data
         _vssOo_linePragmas :: Bool
_vssOo_linePragmas = Bool -> Bool
rule483 Bool
_lhsIo_linePragmas
         _vssOo_monadic :: Bool
_vssOo_monadic = Bool -> Bool
rule484 Bool
_lhsIo_monadic
         _vssOo_newtypes :: Bool
_vssOo_newtypes = Bool -> Bool
rule485 Bool
_lhsIo_newtypes
         _vssOo_pretty :: Bool
_vssOo_pretty = Bool -> Bool
rule486 Bool
_lhsIo_pretty
         _vssOo_rename :: Bool
_vssOo_rename = Bool -> Bool
rule487 Bool
_lhsIo_rename
         _vssOo_sem :: Bool
_vssOo_sem = Bool -> Bool
rule488 Bool
_lhsIo_sem
         _vssOo_sig :: Bool
_vssOo_sig = Bool -> Bool
rule489 Bool
_lhsIo_sig
         _vssOo_splitsems :: Bool
_vssOo_splitsems = forall a. a -> a
rule490 Bool
_o_splitsems
         _vssOo_strictwrap :: Bool
_vssOo_strictwrap = Bool -> Bool
rule491 Bool
_lhsIo_strictwrap
         _vssOo_traces :: Bool
_vssOo_traces = Bool -> Bool
rule492 Bool
_lhsIo_traces
         _vssOo_unbox :: Bool
_vssOo_unbox = Bool -> Bool
rule493 Bool
_lhsIo_unbox
         _vssOoptions :: Options
_vssOoptions = Options -> Options
rule494 Options
_lhsIoptions
         _vssOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_vssOparamInstMap = Map NontermIdent (NontermIdent, [String])
-> Map NontermIdent (NontermIdent, [String])
rule495 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap
         _vssOparamMap :: ParamMap
_vssOparamMap = ParamMap -> ParamMap
rule496 ParamMap
_lhsIparamMap
         _vssOprefix :: String
_vssOprefix = String -> String
rule497 String
_lhsIprefix
         _vssOsyn :: Map NontermIdent Type
_vssOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule498 Map NontermIdent Type
_lhsIsyn
         _vssOterminals :: [NontermIdent]
_vssOterminals = [NontermIdent] -> [NontermIdent]
rule499 [NontermIdent]
_lhsIterminals
         _vssOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_vssOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule500 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _vssOvisitedSet :: Set NontermIdent
_vssOvisitedSet = Set NontermIdent -> Set NontermIdent
rule501 Set NontermIdent
_lhsIvisitedSet
         _intraOallNts :: Set NontermIdent
_intraOallNts = Set NontermIdent -> Set NontermIdent
rule502 Set NontermIdent
_lhsIallNts
         _intraOaroundMap :: Set NontermIdent
_intraOaroundMap = Set NontermIdent -> Set NontermIdent
rule503 Set NontermIdent
_lhsIaroundMap
         _intraOchildren :: [(NontermIdent, Type, ChildKind)]
_intraOchildren = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule504 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _intraOcon :: NontermIdent
_intraOcon = NontermIdent -> NontermIdent
rule505 NontermIdent
_lhsIcon
         _intraOinh :: Map NontermIdent Type
_intraOinh = Map NontermIdent Type -> Map NontermIdent Type
rule506 Map NontermIdent Type
_lhsIinh
         _intraOinstVisitNrs :: Map NontermIdent Int
_intraOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule507 Map NontermIdent Int
_lhsIinstVisitNrs
         _intraOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_intraOmergeMap = Map NontermIdent (NontermIdent, [NontermIdent])
-> Map NontermIdent (NontermIdent, [NontermIdent])
rule508 Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap
         _intraOnr :: Int
_intraOnr = Int -> Int
rule509 Int
_lhsInr
         _intraOnt :: NontermIdent
_intraOnt = NontermIdent -> NontermIdent
rule510 NontermIdent
_lhsInt
         _intraOo_case :: Bool
_intraOo_case = forall a. a -> a
rule511 Bool
_o_case
         _intraOo_cata :: Bool
_intraOo_cata = Bool -> Bool
rule512 Bool
_lhsIo_cata
         _intraOo_clean :: Bool
_intraOo_clean = Bool -> Bool
rule513 Bool
_lhsIo_clean
         _intraOo_costcentre :: Bool
_intraOo_costcentre = Bool -> Bool
rule514 Bool
_lhsIo_costcentre
         _intraOo_data :: Maybe Bool
_intraOo_data = Maybe Bool -> Maybe Bool
rule515 Maybe Bool
_lhsIo_data
         _intraOo_linePragmas :: Bool
_intraOo_linePragmas = Bool -> Bool
rule516 Bool
_lhsIo_linePragmas
         _intraOo_monadic :: Bool
_intraOo_monadic = Bool -> Bool
rule517 Bool
_lhsIo_monadic
         _intraOo_newtypes :: Bool
_intraOo_newtypes = Bool -> Bool
rule518 Bool
_lhsIo_newtypes
         _intraOo_pretty :: Bool
_intraOo_pretty = Bool -> Bool
rule519 Bool
_lhsIo_pretty
         _intraOo_rename :: Bool
_intraOo_rename = Bool -> Bool
rule520 Bool
_lhsIo_rename
         _intraOo_sem :: Bool
_intraOo_sem = Bool -> Bool
rule521 Bool
_lhsIo_sem
         _intraOo_sig :: Bool
_intraOo_sig = Bool -> Bool
rule522 Bool
_lhsIo_sig
         _intraOo_splitsems :: Bool
_intraOo_splitsems = forall a. a -> a
rule523 Bool
_o_splitsems
         _intraOo_strictwrap :: Bool
_intraOo_strictwrap = Bool -> Bool
rule524 Bool
_lhsIo_strictwrap
         _intraOo_traces :: Bool
_intraOo_traces = Bool -> Bool
rule525 Bool
_lhsIo_traces
         _intraOo_unbox :: Bool
_intraOo_unbox = Bool -> Bool
rule526 Bool
_lhsIo_unbox
         _intraOoptions :: Options
_intraOoptions = Options -> Options
rule527 Options
_lhsIoptions
         _intraOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_intraOparamInstMap = Map NontermIdent (NontermIdent, [String])
-> Map NontermIdent (NontermIdent, [String])
rule528 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap
         _intraOparamMap :: ParamMap
_intraOparamMap = ParamMap -> ParamMap
rule529 ParamMap
_lhsIparamMap
         _intraOprefix :: String
_intraOprefix = String -> String
rule530 String
_lhsIprefix
         _intraOsyn :: Map NontermIdent Type
_intraOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule531 Map NontermIdent Type
_lhsIsyn
         _intraOterminals :: [NontermIdent]
_intraOterminals = [NontermIdent] -> [NontermIdent]
rule532 [NontermIdent]
_lhsIterminals
         _intraOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_intraOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule533 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _intraOvisitedSet :: Set NontermIdent
_intraOvisitedSet = Set NontermIdent -> Set NontermIdent
rule534 Set NontermIdent
_vssIvisitedSet
         __result_ :: T_CVisit_vOut28
__result_ = [String]
-> [Decl]
-> Map NontermIdent Int
-> Exprs
-> Set String
-> [String]
-> Set NontermIdent
-> T_CVisit_vOut28
T_CVisit_vOut28 [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet
         in T_CVisit_vOut28
__result_ )
     in T_CVisit_v28 -> T_CVisit_s29
C_CVisit_s29 T_CVisit_v28
v28
   {-# INLINE rule434 #-}
   {-# LINE 313 "src-ag/GenerateCode.ag" #-}
   rule434 = \ ((_intraIexprs) :: Exprs) ->
                          {-# LINE 313 "src-ag/GenerateCode.ag" #-}
                          _intraIexprs
                          {-# LINE 3341 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule435 #-}
   {-# LINE 314 "src-ag/GenerateCode.ag" #-}
   rule435 = \ ((_intraIusedVars) :: Set String) ->
                              {-# LINE 314 "src-ag/GenerateCode.ag" #-}
                              _intraIusedVars
                              {-# LINE 3347 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule436 #-}
   {-# LINE 447 "src-ag/GenerateCode.ag" #-}
   rule436 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->
                                                                 {-# LINE 447 "src-ag/GenerateCode.ag" #-}
                                                                 partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren
                                                                 {-# LINE 3353 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule437 #-}
   {-# LINE 448 "src-ag/GenerateCode.ag" #-}
   rule437 = \ _firstOrderChildren ->
                                   {-# LINE 448 "src-ag/GenerateCode.ag" #-}
                                   map pickOrigType _firstOrderChildren
                                   {-# LINE 3359 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule438 #-}
   {-# LINE 449 "src-ag/GenerateCode.ag" #-}
   rule438 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) ->
                             {-# LINE 449 "src-ag/GenerateCode.ag" #-}
                             seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr
                             {-# LINE 3365 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule439 #-}
   {-# LINE 450 "src-ag/GenerateCode.ag" #-}
   rule439 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) ->
                                  {-# LINE 450 "src-ag/GenerateCode.ag" #-}
                                  if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]
                                  {-# LINE 3371 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule440 #-}
   {-# LINE 451 "src-ag/GenerateCode.ag" #-}
   rule440 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsIdecls) :: Decls) ((_lhsIisLast) :: Bool) ((_lhsInextIntraVars) :: Set String) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) _nextVisitName ->
                                  {-# LINE 451 "src-ag/GenerateCode.ag" #-}
                                  let  lhs = TupleLhs _nextVisitName
                                       rhs = Let _lhsIdecls (SimpleExpr fun)
                                       fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)
                                  in if _lhsIisLast
                                     then []
                                     else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]
                                  {-# LINE 3382 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule441 #-}
   {-# LINE 458 "src-ag/GenerateCode.ag" #-}
   rule441 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ->
                                {-# LINE 458 "src-ag/GenerateCode.ag" #-}
                                _lhsIisLast && _lhsInr == 0
                                {-# LINE 3388 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule442 #-}
   {-# LINE 459 "src-ag/GenerateCode.ag" #-}
   rule442 = \ ((_lhsInt) :: NontermIdent) ((_lhsIwrappers) :: Set NontermIdent) ->
                                {-# LINE 459 "src-ag/GenerateCode.ag" #-}
                                _lhsInt `Set.member` _lhsIwrappers
                                {-# LINE 3394 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule443 #-}
   {-# LINE 460 "src-ag/GenerateCode.ag" #-}
   rule443 = \ _hasWrappers _isOneVisit ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) syn_ ->
                             {-# LINE 460 "src-ag/GenerateCode.ag" #-}
                             if _isOneVisit     && _hasWrappers     && reference _lhsIoptions
                             then let synAttrs = Map.toList syn_
                                      synNT = "Syn" ++ "_" ++ getName _lhsInt
                                      synVars = [ SimpleExpr (attrname _lhsIoptions False _LHS a) | (a,_) <- synAttrs ]
                                      rhs = App synNT synVars
                                      lhs = Fun "___node" []
                                  in [Decl lhs rhs Set.empty Set.empty]
                             else []
                             {-# LINE 3407 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule444 #-}
   {-# LINE 468 "src-ag/GenerateCode.ag" #-}
   rule444 = \ ((_lhsIo_clean) :: Bool) _nextVisitDecl _refDecls _typeSigs ((_vssIdecls) :: Decls) ->
                          {-# LINE 468 "src-ag/GenerateCode.ag" #-}
                          if _lhsIo_clean
                            then _vssIdecls ++ _nextVisitDecl ++ _refDecls
                            else _typeSigs ++ _vssIdecls ++ _nextVisitDecl ++ _refDecls
                          {-# LINE 3415 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule445 #-}
   {-# LINE 471 "src-ag/GenerateCode.ag" #-}
   rule445 = \ ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) _nextVisitName inh_ syn_ ->
                             {-# LINE 471 "src-ag/GenerateCode.ag" #-}
                             mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname _lhsIoptions False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName
                             {-# LINE 3421 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule446 #-}
   {-# LINE 472 "src-ag/GenerateCode.ag" #-}
   rule446 = \  (_ :: ()) ->
                               {-# LINE 472 "src-ag/GenerateCode.ag" #-}
                               error "lastExpr: not used here"
                               {-# LINE 3427 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule447 #-}
   {-# LINE 473 "src-ag/GenerateCode.ag" #-}
   rule447 = \ ((_lhsIoptions) :: Options) _nextVisitName syn_ ->
                                 {-# LINE 473 "src-ag/GenerateCode.ag" #-}
                                 map (lhsname _lhsIoptions False) (Map.keys syn_) ++ _nextVisitName
                                 {-# LINE 3433 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule448 #-}
   {-# LINE 474 "src-ag/GenerateCode.ag" #-}
   rule448 = \ _funcname _lastExprVars _nextVisitDecl _o_case ((_vssIblockDecls) :: DeclBlocks) ->
                                                           {-# LINE 474 "src-ag/GenerateCode.ag" #-}
                                                           mkPartitionedFunction _funcname     _o_case     _nextVisitDecl     _lastExprVars     _vssIblockDecls
                                                           {-# LINE 3439 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule449 #-}
   {-# LINE 476 "src-ag/GenerateCode.ag" #-}
   rule449 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->
                                    {-# LINE 476 "src-ag/GenerateCode.ag" #-}
                                    "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr
                                    {-# LINE 3445 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule450 #-}
   {-# LINE 477 "src-ag/GenerateCode.ag" #-}
   rule450 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->
                                  {-# LINE 477 "src-ag/GenerateCode.ag" #-}
                                  \v -> if _lhsIo_costcentre
                                        then PragmaExpr True False ("SCC \"" ++ _costCentreDescr     ++ "\"") v
                                        else v
                                  {-# LINE 3453 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule451 #-}
   {-# LINE 481 "src-ag/GenerateCode.ag" #-}
   rule451 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->
                           {-# LINE 481 "src-ag/GenerateCode.ag" #-}
                           map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap
                           {-# LINE 3459 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule452 #-}
   {-# LINE 482 "src-ag/GenerateCode.ag" #-}
   rule452 = \ _addCostCentre _blockFirstFunCall _decls _declsType _firstOrderOrig _funcname ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) _nextVisitName _o_splitsems _params inh_ ordered_ syn_ ->
                           {-# LINE 482 "src-ag/GenerateCode.ag" #-}
                           let  lhs = Fun _funcname lhs_args
                                lhs_args = if _lhsInr == 0 then map field _firstOrderOrig     else []
                                field (name,NT tp tps _,_) = let unwrap | _lhsIo_newtypes = \x -> App (sdtype tp) [x]
                                                                        | otherwise       = id
                                                                 addType expr | null tps  = expr
                                                                              | otherwise = TypedExpr expr (_lhsIunfoldSemDom tp 0 tps)
                                                             in unwrap $ addType $ SimpleExpr $ funname name 0
                                field (name,tp,_)        = let expr = SimpleExpr (funname name 0)
                                                           in if null _params
                                                              then expr
                                                              else TypedExpr expr (idEvalType _lhsIoptions $ typeToCodeType (Just _lhsInt) _params     $ removeDeforested tp)
                                mbEvalTp | null _params     = const Nothing
                                         | otherwise        = Just . (idEvalType _lhsIoptions)
                                rhs = wrap
                                    . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname _lhsIoptions True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params     $ removeDeforested tp) | (nm,tp) <- Map.assocs inh_]
                                    $ _addCostCentre
                                    $ if ordered_ && _o_splitsems
                                      then _blockFirstFunCall
                                      else mkDecls _declsType     _decls
                                           . ResultExpr (typeName _lhsInt _lhsInr)
                                           . mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_)
                                           $ map (SimpleExpr . lhsname _lhsIoptions False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName
                                wrap = if  _lhsIo_newtypes
                                           then \x -> App (typeName _lhsInt _lhsInr) [x]
                                           else id
                           in Decl lhs rhs Set.empty Set.empty
                           {-# LINE 3490 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule453 #-}
   {-# LINE 513 "src-ag/GenerateCode.ag" #-}
   rule453 = \ _funcname _semType ->
                         {-# LINE 513 "src-ag/GenerateCode.ag" #-}
                         TSig _funcname _semType
                         {-# LINE 3496 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule454 #-}
   {-# LINE 514 "src-ag/GenerateCode.ag" #-}
   rule454 = \ _firstOrderOrig ((_lhsIcontextMap) :: ContextMap) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIquantMap) :: QuantMap) _params ->
                            {-# LINE 514 "src-ag/GenerateCode.ag" #-}
                            let argType (NT tp tps _)  r | tp /= _SELF = typeAppStrs (sdtype tp) tps `Arr` r
                                                         | tp == _SELF = error "GenerateCode: found an intra-type with type SELF, which should have been prevented by CRule.tps"
                                argType (Haskell tp) r                 = SimpleType tp          `Arr` r
                                argType _ _ = error "Self type not allowed here"
                                evalTp | null _params     = id
                                       | otherwise        = idEvalType _lhsIoptions
                            in appQuant _lhsIquantMap _lhsInt $ appContext _lhsIcontextMap _lhsInt $ evalTp $
                               if  _lhsInr == 0
                                   then foldr argType (typeAppStrs (sdtype   _lhsInt        ) _params    ) (map (\(_,t,_) -> t) _firstOrderOrig    )
                                   else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params    ) []
                            {-# LINE 3511 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule455 #-}
   {-# LINE 525 "src-ag/GenerateCode.ag" #-}
   rule455 = \ _blockFunDecls ((_lhsIwith_sig) :: Bool) _o_splitsems _semFun _tsig ordered_ ->
                           {-# LINE 525 "src-ag/GenerateCode.ag" #-}
                           ( if  _lhsIwith_sig
                             then [_tsig, _semFun]
                             else [_semFun]
                           ) ++
                           ( if ordered_ && _o_splitsems
                             then _blockFunDecls
                             else []
                           )
                           {-# LINE 3524 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule456 #-}
   {-# LINE 533 "src-ag/GenerateCode.ag" #-}
   rule456 = \ ((_lhsIo_sig) :: Bool) _o_case ((_vssItSigs) :: [Decl]) ->
                              {-# LINE 533 "src-ag/GenerateCode.ag" #-}
                              if  _lhsIo_sig && not _o_case
                                  then  _vssItSigs
                                  else  []
                              {-# LINE 3532 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule457 #-}
   {-# LINE 536 "src-ag/GenerateCode.ag" #-}
   rule457 = \ ((_lhsIo_monadic) :: Bool) ordered_ ->
                           {-# LINE 536 "src-ag/GenerateCode.ag" #-}
                           ordered_ && _lhsIo_monadic
                           {-# LINE 3538 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule458 #-}
   {-# LINE 537 "src-ag/GenerateCode.ag" #-}
   rule458 = \ ((_lhsIallPragmas) :: PragmaMap) ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIo_case) :: Bool) _o_do ordered_ ->
                           {-# LINE 537 "src-ag/GenerateCode.ag" #-}
                           not _o_do     && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)
                           {-# LINE 3544 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule459 #-}
   {-# LINE 538 "src-ag/GenerateCode.ag" #-}
   rule459 = \ _o_case _o_do ->
                              {-# LINE 538 "src-ag/GenerateCode.ag" #-}
                              if _o_do
                              then DeclsDo
                              else if _o_case
                                   then DeclsCase
                                   else DeclsLet
                              {-# LINE 3554 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule460 #-}
   {-# LINE 543 "src-ag/GenerateCode.ag" #-}
   rule460 = \ ((_lhsIo_splitsems) :: Bool) ordered_ ->
                                {-# LINE 543 "src-ag/GenerateCode.ag" #-}
                                ordered_ && _lhsIo_splitsems
                                {-# LINE 3560 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule461 #-}
   {-# LINE 577 "src-ag/GenerateCode.ag" #-}
   rule461 = \ ((_lhsInr) :: Int) ((_vssIdefinedInsts) :: [Identifier]) ->
                                 {-# LINE 577 "src-ag/GenerateCode.ag" #-}
                                 Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]
                                 {-# LINE 3566 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule462 #-}
   {-# LINE 620 "src-ag/GenerateCode.ag" #-}
   rule462 = \  (_ :: ()) ->
                         {-# LINE 620 "src-ag/GenerateCode.ag" #-}
                         []
                         {-# LINE 3572 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule463 #-}
   {-# LINE 621 "src-ag/GenerateCode.ag" #-}
   rule463 = \  (_ :: ()) ->
                           {-# LINE 621 "src-ag/GenerateCode.ag" #-}
                           error "declsAbove: not used here"
                           {-# LINE 3578 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule464 #-}
   {-# LINE 905 "src-ag/GenerateCode.ag" #-}
   rule464 = \ ((_intraIcomments) :: [String]) ((_lhsInr) :: Int) ((_vssIcomments) :: [String]) ->
                                   {-# LINE 905 "src-ag/GenerateCode.ag" #-}
                                   let body = map ind (_vssIcomments ++ _intraIcomments)
                                   in if null body
                                      then []
                                      else ("visit " ++ show _lhsInr ++ ":") : body
                                   {-# LINE 3587 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule465 #-}
   {-# LINE 909 "src-ag/GenerateCode.ag" #-}
   rule465 = \  (_ :: ()) ->
                                  {-# LINE 909 "src-ag/GenerateCode.ag" #-}
                                  "local"
                                  {-# LINE 3593 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule466 #-}
   {-# LINE 910 "src-ag/GenerateCode.ag" #-}
   rule466 = \  (_ :: ()) ->
                                  {-# LINE 910 "src-ag/GenerateCode.ag" #-}
                                  "intra"
                                  {-# LINE 3599 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule467 #-}
   {-# LINE 1190 "src-ag/GenerateCode.ag" #-}
   rule467 = \ _funcname ->
                       {-# LINE 1190 "src-ag/GenerateCode.ag" #-}
                       [_funcname    ]
                       {-# LINE 3605 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule468 #-}
   rule468 = \ ((_intraIvisitedSet) :: Set Identifier) ->
     _intraIvisitedSet
   {-# INLINE rule469 #-}
   rule469 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule470 #-}
   rule470 = \ ((_lhsIaroundMap) :: Set Identifier) ->
     _lhsIaroundMap
   {-# INLINE rule471 #-}
   rule471 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->
     _lhsIchildren
   {-# INLINE rule472 #-}
   rule472 = \ ((_lhsIcon) :: ConstructorIdent) ->
     _lhsIcon
   {-# INLINE rule473 #-}
   rule473 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule474 #-}
   rule474 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->
     _lhsIinstVisitNrs
   {-# INLINE rule475 #-}
   rule475 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule476 #-}
   rule476 = \ ((_lhsInr) :: Int) ->
     _lhsInr
   {-# INLINE rule477 #-}
   rule477 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule478 #-}
   rule478 = \ _o_case ->
     _o_case
   {-# INLINE rule479 #-}
   rule479 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule480 #-}
   rule480 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule481 #-}
   rule481 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule482 #-}
   rule482 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule483 #-}
   rule483 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule484 #-}
   rule484 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule485 #-}
   rule485 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule486 #-}
   rule486 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule487 #-}
   rule487 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule488 #-}
   rule488 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule489 #-}
   rule489 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule490 #-}
   rule490 = \ _o_splitsems ->
     _o_splitsems
   {-# INLINE rule491 #-}
   rule491 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule492 #-}
   rule492 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule493 #-}
   rule493 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule494 #-}
   rule494 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule495 #-}
   rule495 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->
     _lhsIparamInstMap
   {-# INLINE rule496 #-}
   rule496 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule497 #-}
   rule497 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule498 #-}
   rule498 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule499 #-}
   rule499 = \ ((_lhsIterminals) :: [Identifier]) ->
     _lhsIterminals
   {-# INLINE rule500 #-}
   rule500 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule501 #-}
   rule501 = \ ((_lhsIvisitedSet) :: Set Identifier) ->
     _lhsIvisitedSet
   {-# INLINE rule502 #-}
   rule502 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule503 #-}
   rule503 = \ ((_lhsIaroundMap) :: Set Identifier) ->
     _lhsIaroundMap
   {-# INLINE rule504 #-}
   rule504 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->
     _lhsIchildren
   {-# INLINE rule505 #-}
   rule505 = \ ((_lhsIcon) :: ConstructorIdent) ->
     _lhsIcon
   {-# INLINE rule506 #-}
   rule506 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule507 #-}
   rule507 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->
     _lhsIinstVisitNrs
   {-# INLINE rule508 #-}
   rule508 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule509 #-}
   rule509 = \ ((_lhsInr) :: Int) ->
     _lhsInr
   {-# INLINE rule510 #-}
   rule510 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule511 #-}
   rule511 = \ _o_case ->
     _o_case
   {-# INLINE rule512 #-}
   rule512 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule513 #-}
   rule513 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule514 #-}
   rule514 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule515 #-}
   rule515 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule516 #-}
   rule516 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule517 #-}
   rule517 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule518 #-}
   rule518 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule519 #-}
   rule519 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule520 #-}
   rule520 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule521 #-}
   rule521 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule522 #-}
   rule522 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule523 #-}
   rule523 = \ _o_splitsems ->
     _o_splitsems
   {-# INLINE rule524 #-}
   rule524 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule525 #-}
   rule525 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule526 #-}
   rule526 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule527 #-}
   rule527 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule528 #-}
   rule528 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->
     _lhsIparamInstMap
   {-# INLINE rule529 #-}
   rule529 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule530 #-}
   rule530 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule531 #-}
   rule531 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule532 #-}
   rule532 = \ ((_lhsIterminals) :: [Identifier]) ->
     _lhsIterminals
   {-# INLINE rule533 #-}
   rule533 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule534 #-}
   rule534 = \ ((_vssIvisitedSet) :: Set Identifier) ->
     _vssIvisitedSet

-- CVisits -----------------------------------------------------
-- wrapper
data Inh_CVisits  = Inh_CVisits { Inh_CVisits -> Set NontermIdent
allNts_Inh_CVisits :: (Set NontermIdent), Inh_CVisits -> PragmaMap
allPragmas_Inh_CVisits :: (PragmaMap), Inh_CVisits -> Set NontermIdent
aroundMap_Inh_CVisits :: (Set Identifier), Inh_CVisits -> [(NontermIdent, Type, ChildKind)]
children_Inh_CVisits :: ([(Identifier,Type, ChildKind)]), Inh_CVisits -> NontermIdent
con_Inh_CVisits :: (ConstructorIdent), Inh_CVisits -> ContextMap
contextMap_Inh_CVisits :: (ContextMap), Inh_CVisits -> Map NontermIdent Type
inh_Inh_CVisits :: (Attributes), Inh_CVisits -> Map NontermIdent Int
instVisitNrs_Inh_CVisits :: (Map Identifier Int), Inh_CVisits -> Map NontermIdent (NontermIdent, [NontermIdent])
mergeMap_Inh_CVisits :: (Map Identifier (Identifier, [Identifier])), Inh_CVisits -> Int
nr_Inh_CVisits :: (Int), Inh_CVisits -> NontermIdent
nt_Inh_CVisits :: (NontermIdent), Inh_CVisits -> Bool
o_case_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_cata_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_clean_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_costcentre_Inh_CVisits :: (Bool), Inh_CVisits -> Maybe Bool
o_data_Inh_CVisits :: (Maybe Bool), Inh_CVisits -> Bool
o_linePragmas_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_monadic_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_newtypes_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_pretty_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_rename_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_sem_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_sig_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_splitsems_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_strictwrap_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_traces_Inh_CVisits :: (Bool), Inh_CVisits -> Bool
o_unbox_Inh_CVisits :: (Bool), Inh_CVisits -> Options
options_Inh_CVisits :: (Options), Inh_CVisits -> Map NontermIdent (NontermIdent, [String])
paramInstMap_Inh_CVisits :: (Map Identifier (NontermIdent, [String])), Inh_CVisits -> ParamMap
paramMap_Inh_CVisits :: (ParamMap), Inh_CVisits -> String
prefix_Inh_CVisits :: (String), Inh_CVisits -> QuantMap
quantMap_Inh_CVisits :: (QuantMap), Inh_CVisits -> Map NontermIdent Type
syn_Inh_CVisits :: (Attributes), Inh_CVisits -> [NontermIdent]
terminals_Inh_CVisits :: ([Identifier]), Inh_CVisits -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_CVisits :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_CVisits -> Set NontermIdent
visitedSet_Inh_CVisits :: (Set Identifier), Inh_CVisits -> Bool
with_sig_Inh_CVisits :: (Bool), Inh_CVisits -> Set NontermIdent
wrappers_Inh_CVisits :: (Set NontermIdent) }
data Syn_CVisits  = Syn_CVisits { Syn_CVisits -> [String]
comments_Syn_CVisits :: ([String]), Syn_CVisits -> [Decl]
decls_Syn_CVisits :: (Decls), Syn_CVisits -> Map NontermIdent Int
gatherInstVisitNrs_Syn_CVisits :: (Map Identifier Int), Syn_CVisits -> Exprs
intra_Syn_CVisits :: (Exprs), Syn_CVisits -> Set String
intraVars_Syn_CVisits :: (Set String), Syn_CVisits -> Bool
isNil_Syn_CVisits :: (Bool), Syn_CVisits -> [String]
semNames_Syn_CVisits :: ([String]), Syn_CVisits -> Set NontermIdent
visitedSet_Syn_CVisits :: (Set Identifier) }
{-# INLINABLE wrap_CVisits #-}
wrap_CVisits :: T_CVisits  -> Inh_CVisits  -> (Syn_CVisits )
wrap_CVisits :: T_CVisits -> Inh_CVisits -> Syn_CVisits
wrap_CVisits (T_CVisits Identity T_CVisits_s32
act) (Inh_CVisits Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CVisits_s32
sem <- Identity T_CVisits_s32
act
        let arg31 :: T_CVisits_vIn31
arg31 = Set NontermIdent
-> PragmaMap
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> ContextMap
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> Bool
-> Set NontermIdent
-> T_CVisits_vIn31
T_CVisits_vIn31 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers
        (T_CVisits_vOut31 [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars Bool
_lhsOisNil [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 T_CVisits_s32
sem T_CVisits_vIn31
arg31)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([String]
-> [Decl]
-> Map NontermIdent Int
-> Exprs
-> Set String
-> Bool
-> [String]
-> Set NontermIdent
-> Syn_CVisits
Syn_CVisits [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars Bool
_lhsOisNil [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet)
   )

-- cata
{-# NOINLINE sem_CVisits #-}
sem_CVisits :: CVisits  -> T_CVisits 
sem_CVisits :: CVisits -> T_CVisits
sem_CVisits CVisits
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CVisit -> T_CVisits -> T_CVisits
sem_CVisits_Cons T_CVisits
sem_CVisits_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map CVisit -> T_CVisit
sem_CVisit CVisits
list)

-- semantic domain
newtype T_CVisits  = T_CVisits {
                               T_CVisits -> Identity T_CVisits_s32
attach_T_CVisits :: Identity (T_CVisits_s32 )
                               }
newtype T_CVisits_s32  = C_CVisits_s32 {
                                       T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 :: (T_CVisits_v31 )
                                       }
data T_CVisits_s33  = C_CVisits_s33
type T_CVisits_v31  = (T_CVisits_vIn31 ) -> (T_CVisits_vOut31 )
data T_CVisits_vIn31  = T_CVisits_vIn31 (Set NontermIdent) (PragmaMap) (Set Identifier) ([(Identifier,Type, ChildKind)]) (ConstructorIdent) (ContextMap) (Attributes) (Map Identifier Int) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (QuantMap) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (Bool) (Set NontermIdent)
data T_CVisits_vOut31  = T_CVisits_vOut31 ([String]) (Decls) (Map Identifier Int) (Exprs) (Set String) (Bool) ([String]) (Set Identifier)
{-# NOINLINE sem_CVisits_Cons #-}
sem_CVisits_Cons :: T_CVisit  -> T_CVisits  -> T_CVisits 
sem_CVisits_Cons :: T_CVisit -> T_CVisits -> T_CVisits
sem_CVisits_Cons T_CVisit
arg_hd_ T_CVisits
arg_tl_ = Identity T_CVisits_s32 -> T_CVisits
T_CVisits (forall (m :: * -> *) a. Monad m => a -> m a
return T_CVisits_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_CVisits_s32
st32 = let
      v31 :: T_CVisits_v31 
      v31 :: T_CVisits_v31
v31 = \ (T_CVisits_vIn31 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _hdX29 :: T_CVisit_s29
_hdX29 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CVisit -> Identity T_CVisit_s29
attach_T_CVisit (T_CVisit
arg_hd_))
         _tlX32 :: T_CVisits_s32
_tlX32 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CVisits -> Identity T_CVisits_s32
attach_T_CVisits (T_CVisits
arg_tl_))
         (T_CVisit_vOut28 [String]
_hdIcomments [Decl]
_hdIdecls Map NontermIdent Int
_hdIgatherInstVisitNrs Exprs
_hdIintra Set String
_hdIintraVars [String]
_hdIsemNames Set NontermIdent
_hdIvisitedSet) = T_CVisit_s29 -> T_CVisit_v28
inv_CVisit_s29 T_CVisit_s29
_hdX29 (Set NontermIdent
-> PragmaMap
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> ContextMap
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Bool
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Exprs
-> Set String
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> Bool
-> Set NontermIdent
-> T_CVisit_vIn28
T_CVisit_vIn28 Set NontermIdent
_hdOallNts PragmaMap
_hdOallPragmas Set NontermIdent
_hdOaroundMap [(NontermIdent, Type, ChildKind)]
_hdOchildren NontermIdent
_hdOcon ContextMap
_hdOcontextMap [Decl]
_hdOdecls Map NontermIdent Type
_hdOinh Map NontermIdent Int
_hdOinstVisitNrs Bool
_hdOisLast Map NontermIdent (NontermIdent, [NontermIdent])
_hdOmergeMap Exprs
_hdOnextIntra Set String
_hdOnextIntraVars Int
_hdOnr NontermIdent
_hdOnt Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_clean Bool
_hdOo_costcentre Maybe Bool
_hdOo_data Bool
_hdOo_linePragmas Bool
_hdOo_monadic Bool
_hdOo_newtypes Bool
_hdOo_pretty Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_splitsems Bool
_hdOo_strictwrap Bool
_hdOo_traces Bool
_hdOo_unbox Options
_hdOoptions Map NontermIdent (NontermIdent, [String])
_hdOparamInstMap ParamMap
_hdOparamMap String
_hdOprefix QuantMap
_hdOquantMap Map NontermIdent Type
_hdOsyn [NontermIdent]
_hdOterminals NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom Set NontermIdent
_hdOvisitedSet Bool
_hdOwith_sig Set NontermIdent
_hdOwrappers)
         (T_CVisits_vOut31 [String]
_tlIcomments [Decl]
_tlIdecls Map NontermIdent Int
_tlIgatherInstVisitNrs Exprs
_tlIintra Set String
_tlIintraVars Bool
_tlIisNil [String]
_tlIsemNames Set NontermIdent
_tlIvisitedSet) = T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 T_CVisits_s32
_tlX32 (Set NontermIdent
-> PragmaMap
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> ContextMap
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> QuantMap
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> Bool
-> Set NontermIdent
-> T_CVisits_vIn31
T_CVisits_vIn31 Set NontermIdent
_tlOallNts PragmaMap
_tlOallPragmas Set NontermIdent
_tlOaroundMap [(NontermIdent, Type, ChildKind)]
_tlOchildren NontermIdent
_tlOcon ContextMap
_tlOcontextMap Map NontermIdent Type
_tlOinh Map NontermIdent Int
_tlOinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_tlOmergeMap Int
_tlOnr NontermIdent
_tlOnt Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_clean Bool
_tlOo_costcentre Maybe Bool
_tlOo_data Bool
_tlOo_linePragmas Bool
_tlOo_monadic Bool
_tlOo_newtypes Bool
_tlOo_pretty Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_splitsems Bool
_tlOo_strictwrap Bool
_tlOo_traces Bool
_tlOo_unbox Options
_tlOoptions Map NontermIdent (NontermIdent, [String])
_tlOparamInstMap ParamMap
_tlOparamMap String
_tlOprefix QuantMap
_tlOquantMap Map NontermIdent Type
_tlOsyn [NontermIdent]
_tlOterminals NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom Set NontermIdent
_tlOvisitedSet Bool
_tlOwith_sig Set NontermIdent
_tlOwrappers)
         _tlOnr :: Int
_tlOnr = Int -> Int
rule535 Int
_lhsInr
         _lhsOisNil :: Bool
         _lhsOisNil :: Bool
_lhsOisNil = () -> Bool
rule536  ()
         _hdOisLast :: Bool
_hdOisLast = Bool -> Bool
rule537 Bool
_tlIisNil
         _hdOnextIntra :: Exprs
_hdOnextIntra = Exprs -> Exprs
rule538 Exprs
_tlIintra
         _hdOnextIntraVars :: Set String
_hdOnextIntraVars = Set String -> Set String
rule539 Set String
_tlIintraVars
         _lhsOintra :: Exprs
         _lhsOintra :: Exprs
_lhsOintra = Exprs -> Exprs
rule540 Exprs
_hdIintra
         _lhsOintraVars :: Set String
         _lhsOintraVars :: Set String
_lhsOintraVars = Set String -> Set String
rule541 Set String
_hdIintraVars
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = [Decl] -> [Decl]
rule542 [Decl]
_hdIdecls
         _hdOdecls :: [Decl]
_hdOdecls = [Decl] -> [Decl]
rule543 [Decl]
_tlIdecls
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = [String] -> [String] -> [String]
rule544 [String]
_hdIcomments [String]
_tlIcomments
         _lhsOgatherInstVisitNrs :: Map Identifier Int
         _lhsOgatherInstVisitNrs :: Map NontermIdent Int
_lhsOgatherInstVisitNrs = Map NontermIdent Int
-> Map NontermIdent Int -> Map NontermIdent Int
rule545 Map NontermIdent Int
_hdIgatherInstVisitNrs Map NontermIdent Int
_tlIgatherInstVisitNrs
         _lhsOsemNames :: [String]
         _lhsOsemNames :: [String]
_lhsOsemNames = [String] -> [String] -> [String]
rule546 [String]
_hdIsemNames [String]
_tlIsemNames
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = Set NontermIdent -> Set NontermIdent
rule547 Set NontermIdent
_tlIvisitedSet
         _hdOallNts :: Set NontermIdent
_hdOallNts = Set NontermIdent -> Set NontermIdent
rule548 Set NontermIdent
_lhsIallNts
         _hdOallPragmas :: PragmaMap
_hdOallPragmas = PragmaMap -> PragmaMap
rule549 PragmaMap
_lhsIallPragmas
         _hdOaroundMap :: Set NontermIdent
_hdOaroundMap = Set NontermIdent -> Set NontermIdent
rule550 Set NontermIdent
_lhsIaroundMap
         _hdOchildren :: [(NontermIdent, Type, ChildKind)]
_hdOchildren = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule551 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _hdOcon :: NontermIdent
_hdOcon = NontermIdent -> NontermIdent
rule552 NontermIdent
_lhsIcon
         _hdOcontextMap :: ContextMap
_hdOcontextMap = ContextMap -> ContextMap
rule553 ContextMap
_lhsIcontextMap
         _hdOinh :: Map NontermIdent Type
_hdOinh = Map NontermIdent Type -> Map NontermIdent Type
rule554 Map NontermIdent Type
_lhsIinh
         _hdOinstVisitNrs :: Map NontermIdent Int
_hdOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule555 Map NontermIdent Int
_lhsIinstVisitNrs
         _hdOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_hdOmergeMap = Map NontermIdent (NontermIdent, [NontermIdent])
-> Map NontermIdent (NontermIdent, [NontermIdent])
rule556 Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap
         _hdOnr :: Int
_hdOnr = Int -> Int
rule557 Int
_lhsInr
         _hdOnt :: NontermIdent
_hdOnt = NontermIdent -> NontermIdent
rule558 NontermIdent
_lhsInt
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule559 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule560 Bool
_lhsIo_cata
         _hdOo_clean :: Bool
_hdOo_clean = Bool -> Bool
rule561 Bool
_lhsIo_clean
         _hdOo_costcentre :: Bool
_hdOo_costcentre = Bool -> Bool
rule562 Bool
_lhsIo_costcentre
         _hdOo_data :: Maybe Bool
_hdOo_data = Maybe Bool -> Maybe Bool
rule563 Maybe Bool
_lhsIo_data
         _hdOo_linePragmas :: Bool
_hdOo_linePragmas = Bool -> Bool
rule564 Bool
_lhsIo_linePragmas
         _hdOo_monadic :: Bool
_hdOo_monadic = Bool -> Bool
rule565 Bool
_lhsIo_monadic
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule566 Bool
_lhsIo_newtypes
         _hdOo_pretty :: Bool
_hdOo_pretty = Bool -> Bool
rule567 Bool
_lhsIo_pretty
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule568 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule569 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule570 Bool
_lhsIo_sig
         _hdOo_splitsems :: Bool
_hdOo_splitsems = Bool -> Bool
rule571 Bool
_lhsIo_splitsems
         _hdOo_strictwrap :: Bool
_hdOo_strictwrap = Bool -> Bool
rule572 Bool
_lhsIo_strictwrap
         _hdOo_traces :: Bool
_hdOo_traces = Bool -> Bool
rule573 Bool
_lhsIo_traces
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule574 Bool
_lhsIo_unbox
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule575 Options
_lhsIoptions
         _hdOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_hdOparamInstMap = Map NontermIdent (NontermIdent, [String])
-> Map NontermIdent (NontermIdent, [String])
rule576 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap
         _hdOparamMap :: ParamMap
_hdOparamMap = ParamMap -> ParamMap
rule577 ParamMap
_lhsIparamMap
         _hdOprefix :: String
_hdOprefix = String -> String
rule578 String
_lhsIprefix
         _hdOquantMap :: QuantMap
_hdOquantMap = QuantMap -> QuantMap
rule579 QuantMap
_lhsIquantMap
         _hdOsyn :: Map NontermIdent Type
_hdOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule580 Map NontermIdent Type
_lhsIsyn
         _hdOterminals :: [NontermIdent]
_hdOterminals = [NontermIdent] -> [NontermIdent]
rule581 [NontermIdent]
_lhsIterminals
         _hdOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule582 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _hdOvisitedSet :: Set NontermIdent
_hdOvisitedSet = Set NontermIdent -> Set NontermIdent
rule583 Set NontermIdent
_lhsIvisitedSet
         _hdOwith_sig :: Bool
_hdOwith_sig = Bool -> Bool
rule584 Bool
_lhsIwith_sig
         _hdOwrappers :: Set NontermIdent
_hdOwrappers = Set NontermIdent -> Set NontermIdent
rule585 Set NontermIdent
_lhsIwrappers
         _tlOallNts :: Set NontermIdent
_tlOallNts = Set NontermIdent -> Set NontermIdent
rule586 Set NontermIdent
_lhsIallNts
         _tlOallPragmas :: PragmaMap
_tlOallPragmas = PragmaMap -> PragmaMap
rule587 PragmaMap
_lhsIallPragmas
         _tlOaroundMap :: Set NontermIdent
_tlOaroundMap = Set NontermIdent -> Set NontermIdent
rule588 Set NontermIdent
_lhsIaroundMap
         _tlOchildren :: [(NontermIdent, Type, ChildKind)]
_tlOchildren = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule589 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _tlOcon :: NontermIdent
_tlOcon = NontermIdent -> NontermIdent
rule590 NontermIdent
_lhsIcon
         _tlOcontextMap :: ContextMap
_tlOcontextMap = ContextMap -> ContextMap
rule591 ContextMap
_lhsIcontextMap
         _tlOinh :: Map NontermIdent Type
_tlOinh = Map NontermIdent Type -> Map NontermIdent Type
rule592 Map NontermIdent Type
_lhsIinh
         _tlOinstVisitNrs :: Map NontermIdent Int
_tlOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule593 Map NontermIdent Int
_lhsIinstVisitNrs
         _tlOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_tlOmergeMap = Map NontermIdent (NontermIdent, [NontermIdent])
-> Map NontermIdent (NontermIdent, [NontermIdent])
rule594 Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap
         _tlOnt :: NontermIdent
_tlOnt = NontermIdent -> NontermIdent
rule595 NontermIdent
_lhsInt
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule596 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule597 Bool
_lhsIo_cata
         _tlOo_clean :: Bool
_tlOo_clean = Bool -> Bool
rule598 Bool
_lhsIo_clean
         _tlOo_costcentre :: Bool
_tlOo_costcentre = Bool -> Bool
rule599 Bool
_lhsIo_costcentre
         _tlOo_data :: Maybe Bool
_tlOo_data = Maybe Bool -> Maybe Bool
rule600 Maybe Bool
_lhsIo_data
         _tlOo_linePragmas :: Bool
_tlOo_linePragmas = Bool -> Bool
rule601 Bool
_lhsIo_linePragmas
         _tlOo_monadic :: Bool
_tlOo_monadic = Bool -> Bool
rule602 Bool
_lhsIo_monadic
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule603 Bool
_lhsIo_newtypes
         _tlOo_pretty :: Bool
_tlOo_pretty = Bool -> Bool
rule604 Bool
_lhsIo_pretty
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule605 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule606 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule607 Bool
_lhsIo_sig
         _tlOo_splitsems :: Bool
_tlOo_splitsems = Bool -> Bool
rule608 Bool
_lhsIo_splitsems
         _tlOo_strictwrap :: Bool
_tlOo_strictwrap = Bool -> Bool
rule609 Bool
_lhsIo_strictwrap
         _tlOo_traces :: Bool
_tlOo_traces = Bool -> Bool
rule610 Bool
_lhsIo_traces
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule611 Bool
_lhsIo_unbox
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule612 Options
_lhsIoptions
         _tlOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_tlOparamInstMap = Map NontermIdent (NontermIdent, [String])
-> Map NontermIdent (NontermIdent, [String])
rule613 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap
         _tlOparamMap :: ParamMap
_tlOparamMap = ParamMap -> ParamMap
rule614 ParamMap
_lhsIparamMap
         _tlOprefix :: String
_tlOprefix = String -> String
rule615 String
_lhsIprefix
         _tlOquantMap :: QuantMap
_tlOquantMap = QuantMap -> QuantMap
rule616 QuantMap
_lhsIquantMap
         _tlOsyn :: Map NontermIdent Type
_tlOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule617 Map NontermIdent Type
_lhsIsyn
         _tlOterminals :: [NontermIdent]
_tlOterminals = [NontermIdent] -> [NontermIdent]
rule618 [NontermIdent]
_lhsIterminals
         _tlOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule619 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _tlOvisitedSet :: Set NontermIdent
_tlOvisitedSet = Set NontermIdent -> Set NontermIdent
rule620 Set NontermIdent
_hdIvisitedSet
         _tlOwith_sig :: Bool
_tlOwith_sig = Bool -> Bool
rule621 Bool
_lhsIwith_sig
         _tlOwrappers :: Set NontermIdent
_tlOwrappers = Set NontermIdent -> Set NontermIdent
rule622 Set NontermIdent
_lhsIwrappers
         __result_ :: T_CVisits_vOut31
__result_ = [String]
-> [Decl]
-> Map NontermIdent Int
-> Exprs
-> Set String
-> Bool
-> [String]
-> Set NontermIdent
-> T_CVisits_vOut31
T_CVisits_vOut31 [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars Bool
_lhsOisNil [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet
         in T_CVisits_vOut31
__result_ )
     in T_CVisits_v31 -> T_CVisits_s32
C_CVisits_s32 T_CVisits_v31
v31
   {-# INLINE rule535 #-}
   {-# LINE 285 "src-ag/GenerateCode.ag" #-}
   rule535 = \ ((_lhsInr) :: Int) ->
                    {-# LINE 285 "src-ag/GenerateCode.ag" #-}
                    _lhsInr + 1
                    {-# LINE 3953 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule536 #-}
   {-# LINE 298 "src-ag/GenerateCode.ag" #-}
   rule536 = \  (_ :: ()) ->
                         {-# LINE 298 "src-ag/GenerateCode.ag" #-}
                         False
                         {-# LINE 3959 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule537 #-}
   {-# LINE 299 "src-ag/GenerateCode.ag" #-}
   rule537 = \ ((_tlIisNil) :: Bool) ->
                         {-# LINE 299 "src-ag/GenerateCode.ag" #-}
                         _tlIisNil
                         {-# LINE 3965 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule538 #-}
   {-# LINE 316 "src-ag/GenerateCode.ag" #-}
   rule538 = \ ((_tlIintra) :: Exprs) ->
                            {-# LINE 316 "src-ag/GenerateCode.ag" #-}
                            _tlIintra
                            {-# LINE 3971 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule539 #-}
   {-# LINE 317 "src-ag/GenerateCode.ag" #-}
   rule539 = \ ((_tlIintraVars) :: Set String) ->
                                {-# LINE 317 "src-ag/GenerateCode.ag" #-}
                                _tlIintraVars
                                {-# LINE 3977 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule540 #-}
   {-# LINE 318 "src-ag/GenerateCode.ag" #-}
   rule540 = \ ((_hdIintra) :: Exprs) ->
                         {-# LINE 318 "src-ag/GenerateCode.ag" #-}
                         _hdIintra
                         {-# LINE 3983 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule541 #-}
   {-# LINE 319 "src-ag/GenerateCode.ag" #-}
   rule541 = \ ((_hdIintraVars) :: Set String) ->
                             {-# LINE 319 "src-ag/GenerateCode.ag" #-}
                             _hdIintraVars
                             {-# LINE 3989 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule542 #-}
   {-# LINE 437 "src-ag/GenerateCode.ag" #-}
   rule542 = \ ((_hdIdecls) :: Decls) ->
                        {-# LINE 437 "src-ag/GenerateCode.ag" #-}
                        _hdIdecls
                        {-# LINE 3995 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule543 #-}
   {-# LINE 438 "src-ag/GenerateCode.ag" #-}
   rule543 = \ ((_tlIdecls) :: Decls) ->
                        {-# LINE 438 "src-ag/GenerateCode.ag" #-}
                        _tlIdecls
                        {-# LINE 4001 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule544 #-}
   rule544 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->
     _hdIcomments ++ _tlIcomments
   {-# INLINE rule545 #-}
   rule545 = \ ((_hdIgatherInstVisitNrs) :: Map Identifier Int) ((_tlIgatherInstVisitNrs) :: Map Identifier Int) ->
     _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs
   {-# INLINE rule546 #-}
   rule546 = \ ((_hdIsemNames) :: [String]) ((_tlIsemNames) :: [String]) ->
     _hdIsemNames ++ _tlIsemNames
   {-# INLINE rule547 #-}
   rule547 = \ ((_tlIvisitedSet) :: Set Identifier) ->
     _tlIvisitedSet
   {-# INLINE rule548 #-}
   rule548 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule549 #-}
   rule549 = \ ((_lhsIallPragmas) :: PragmaMap) ->
     _lhsIallPragmas
   {-# INLINE rule550 #-}
   rule550 = \ ((_lhsIaroundMap) :: Set Identifier) ->
     _lhsIaroundMap
   {-# INLINE rule551 #-}
   rule551 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->
     _lhsIchildren
   {-# INLINE rule552 #-}
   rule552 = \ ((_lhsIcon) :: ConstructorIdent) ->
     _lhsIcon
   {-# INLINE rule553 #-}
   rule553 = \ ((_lhsIcontextMap) :: ContextMap) ->
     _lhsIcontextMap
   {-# INLINE rule554 #-}
   rule554 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule555 #-}
   rule555 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->
     _lhsIinstVisitNrs
   {-# INLINE rule556 #-}
   rule556 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule557 #-}
   rule557 = \ ((_lhsInr) :: Int) ->
     _lhsInr
   {-# INLINE rule558 #-}
   rule558 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule559 #-}
   rule559 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule560 #-}
   rule560 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule561 #-}
   rule561 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule562 #-}
   rule562 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule563 #-}
   rule563 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule564 #-}
   rule564 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule565 #-}
   rule565 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule566 #-}
   rule566 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule567 #-}
   rule567 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule568 #-}
   rule568 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule569 #-}
   rule569 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule570 #-}
   rule570 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule571 #-}
   rule571 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule572 #-}
   rule572 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule573 #-}
   rule573 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule574 #-}
   rule574 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule575 #-}
   rule575 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule576 #-}
   rule576 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->
     _lhsIparamInstMap
   {-# INLINE rule577 #-}
   rule577 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule578 #-}
   rule578 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule579 #-}
   rule579 = \ ((_lhsIquantMap) :: QuantMap) ->
     _lhsIquantMap
   {-# INLINE rule580 #-}
   rule580 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule581 #-}
   rule581 = \ ((_lhsIterminals) :: [Identifier]) ->
     _lhsIterminals
   {-# INLINE rule582 #-}
   rule582 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule583 #-}
   rule583 = \ ((_lhsIvisitedSet) :: Set Identifier) ->
     _lhsIvisitedSet
   {-# INLINE rule584 #-}
   rule584 = \ ((_lhsIwith_sig) :: Bool) ->
     _lhsIwith_sig
   {-# INLINE rule585 #-}
   rule585 = \ ((_lhsIwrappers) :: Set NontermIdent) ->
     _lhsIwrappers
   {-# INLINE rule586 #-}
   rule586 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule587 #-}
   rule587 = \ ((_lhsIallPragmas) :: PragmaMap) ->
     _lhsIallPragmas
   {-# INLINE rule588 #-}
   rule588 = \ ((_lhsIaroundMap) :: Set Identifier) ->
     _lhsIaroundMap
   {-# INLINE rule589 #-}
   rule589 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->
     _lhsIchildren
   {-# INLINE rule590 #-}
   rule590 = \ ((_lhsIcon) :: ConstructorIdent) ->
     _lhsIcon
   {-# INLINE rule591 #-}
   rule591 = \ ((_lhsIcontextMap) :: ContextMap) ->
     _lhsIcontextMap
   {-# INLINE rule592 #-}
   rule592 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule593 #-}
   rule593 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->
     _lhsIinstVisitNrs
   {-# INLINE rule594 #-}
   rule594 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule595 #-}
   rule595 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule596 #-}
   rule596 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule597 #-}
   rule597 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule598 #-}
   rule598 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule599 #-}
   rule599 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule600 #-}
   rule600 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule601 #-}
   rule601 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule602 #-}
   rule602 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule603 #-}
   rule603 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule604 #-}
   rule604 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule605 #-}
   rule605 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule606 #-}
   rule606 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule607 #-}
   rule607 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule608 #-}
   rule608 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule609 #-}
   rule609 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule610 #-}
   rule610 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule611 #-}
   rule611 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule612 #-}
   rule612 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule613 #-}
   rule613 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->
     _lhsIparamInstMap
   {-# INLINE rule614 #-}
   rule614 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule615 #-}
   rule615 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule616 #-}
   rule616 = \ ((_lhsIquantMap) :: QuantMap) ->
     _lhsIquantMap
   {-# INLINE rule617 #-}
   rule617 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule618 #-}
   rule618 = \ ((_lhsIterminals) :: [Identifier]) ->
     _lhsIterminals
   {-# INLINE rule619 #-}
   rule619 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule620 #-}
   rule620 = \ ((_hdIvisitedSet) :: Set Identifier) ->
     _hdIvisitedSet
   {-# INLINE rule621 #-}
   rule621 = \ ((_lhsIwith_sig) :: Bool) ->
     _lhsIwith_sig
   {-# INLINE rule622 #-}
   rule622 = \ ((_lhsIwrappers) :: Set NontermIdent) ->
     _lhsIwrappers
{-# NOINLINE sem_CVisits_Nil #-}
sem_CVisits_Nil ::  T_CVisits 
sem_CVisits_Nil :: T_CVisits
sem_CVisits_Nil  = Identity T_CVisits_s32 -> T_CVisits
T_CVisits (forall (m :: * -> *) a. Monad m => a -> m a
return T_CVisits_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_CVisits_s32
st32 = let
      v31 :: T_CVisits_v31 
      v31 :: T_CVisits_v31
v31 = \ (T_CVisits_vIn31 Set NontermIdent
_lhsIallNts PragmaMap
_lhsIallPragmas Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon ContextMap
_lhsIcontextMap Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix QuantMap
_lhsIquantMap Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet Bool
_lhsIwith_sig Set NontermIdent
_lhsIwrappers) -> ( let
         _lhsOisNil :: Bool
         _lhsOisNil :: Bool
_lhsOisNil = () -> Bool
rule623  ()
         _lhsOintra :: Exprs
         _lhsOintra :: Exprs
_lhsOintra = forall {a}. () -> [a]
rule624  ()
         _lhsOintraVars :: Set String
         _lhsOintraVars :: Set String
_lhsOintraVars = forall {a}. () -> Set a
rule625  ()
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = forall {a}. () -> [a]
rule626  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {a}. () -> [a]
rule627  ()
         _lhsOgatherInstVisitNrs :: Map Identifier Int
         _lhsOgatherInstVisitNrs :: Map NontermIdent Int
_lhsOgatherInstVisitNrs = forall {k} {a}. () -> Map k a
rule628  ()
         _lhsOsemNames :: [String]
         _lhsOsemNames :: [String]
_lhsOsemNames = forall {a}. () -> [a]
rule629  ()
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = Set NontermIdent -> Set NontermIdent
rule630 Set NontermIdent
_lhsIvisitedSet
         __result_ :: T_CVisits_vOut31
__result_ = [String]
-> [Decl]
-> Map NontermIdent Int
-> Exprs
-> Set String
-> Bool
-> [String]
-> Set NontermIdent
-> T_CVisits_vOut31
T_CVisits_vOut31 [String]
_lhsOcomments [Decl]
_lhsOdecls Map NontermIdent Int
_lhsOgatherInstVisitNrs Exprs
_lhsOintra Set String
_lhsOintraVars Bool
_lhsOisNil [String]
_lhsOsemNames Set NontermIdent
_lhsOvisitedSet
         in T_CVisits_vOut31
__result_ )
     in T_CVisits_v31 -> T_CVisits_s32
C_CVisits_s32 T_CVisits_v31
v31
   {-# INLINE rule623 #-}
   {-# LINE 300 "src-ag/GenerateCode.ag" #-}
   rule623 = \  (_ :: ()) ->
                       {-# LINE 300 "src-ag/GenerateCode.ag" #-}
                       True
                       {-# LINE 4270 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule624 #-}
   {-# LINE 320 "src-ag/GenerateCode.ag" #-}
   rule624 = \  (_ :: ()) ->
                       {-# LINE 320 "src-ag/GenerateCode.ag" #-}
                       []
                       {-# LINE 4276 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule625 #-}
   {-# LINE 321 "src-ag/GenerateCode.ag" #-}
   rule625 = \  (_ :: ()) ->
                           {-# LINE 321 "src-ag/GenerateCode.ag" #-}
                           Set.empty
                           {-# LINE 4282 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule626 #-}
   {-# LINE 436 "src-ag/GenerateCode.ag" #-}
   rule626 = \  (_ :: ()) ->
                        {-# LINE 436 "src-ag/GenerateCode.ag" #-}
                        []
                        {-# LINE 4288 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule627 #-}
   rule627 = \  (_ :: ()) ->
     []
   {-# INLINE rule628 #-}
   rule628 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule629 #-}
   rule629 = \  (_ :: ()) ->
     []
   {-# INLINE rule630 #-}
   rule630 = \ ((_lhsIvisitedSet) :: Set Identifier) ->
     _lhsIvisitedSet

-- DeclBlocks --------------------------------------------------
-- wrapper
data Inh_DeclBlocks  = Inh_DeclBlocks { Inh_DeclBlocks -> Int
blockNr_Inh_DeclBlocks :: (Int), Inh_DeclBlocks -> [String]
lastExprVars_Inh_DeclBlocks :: ([String]), Inh_DeclBlocks -> [Decl]
nextVisitDecls_Inh_DeclBlocks :: ([Decl]), Inh_DeclBlocks -> Bool
optCase_Inh_DeclBlocks :: (Bool), Inh_DeclBlocks -> String
prefix_Inh_DeclBlocks :: (String) }
data Syn_DeclBlocks  = Syn_DeclBlocks { Syn_DeclBlocks -> Expr
callExpr_Syn_DeclBlocks :: (Expr), Syn_DeclBlocks -> [Decl]
decls_Syn_DeclBlocks :: ([Decl]), Syn_DeclBlocks -> [String]
freeVars_Syn_DeclBlocks :: ([String]) }
{-# INLINABLE wrap_DeclBlocks #-}
wrap_DeclBlocks :: T_DeclBlocks  -> Inh_DeclBlocks  -> (Syn_DeclBlocks )
wrap_DeclBlocks :: T_DeclBlocks -> Inh_DeclBlocks -> Syn_DeclBlocks
wrap_DeclBlocks (T_DeclBlocks Identity T_DeclBlocks_s35
act) (Inh_DeclBlocks Int
_lhsIblockNr [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_DeclBlocks_s35
sem <- Identity T_DeclBlocks_s35
act
        let arg34 :: T_DeclBlocks_vIn34
arg34 = Int -> [String] -> [Decl] -> Bool -> String -> T_DeclBlocks_vIn34
T_DeclBlocks_vIn34 Int
_lhsIblockNr [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix
        (T_DeclBlocks_vOut34 Expr
_lhsOcallExpr [Decl]
_lhsOdecls [String]
_lhsOfreeVars) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_DeclBlocks_s35 -> T_DeclBlocks_v34
inv_DeclBlocks_s35 T_DeclBlocks_s35
sem T_DeclBlocks_vIn34
arg34)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Expr -> [Decl] -> [String] -> Syn_DeclBlocks
Syn_DeclBlocks Expr
_lhsOcallExpr [Decl]
_lhsOdecls [String]
_lhsOfreeVars)
   )

-- cata
{-# NOINLINE sem_DeclBlocks #-}
sem_DeclBlocks :: DeclBlocks  -> T_DeclBlocks 
sem_DeclBlocks :: DeclBlocks -> T_DeclBlocks
sem_DeclBlocks ( DeclBlock [Decl]
defs_ Decl
visit_ DeclBlocks
next_ ) = [Decl] -> Decl -> T_DeclBlocks -> T_DeclBlocks
sem_DeclBlocks_DeclBlock [Decl]
defs_ Decl
visit_ ( DeclBlocks -> T_DeclBlocks
sem_DeclBlocks DeclBlocks
next_ )
sem_DeclBlocks ( DeclTerminator [Decl]
defs_ Expr
result_ ) = [Decl] -> Expr -> T_DeclBlocks
sem_DeclBlocks_DeclTerminator [Decl]
defs_ Expr
result_

-- semantic domain
newtype T_DeclBlocks  = T_DeclBlocks {
                                     T_DeclBlocks -> Identity T_DeclBlocks_s35
attach_T_DeclBlocks :: Identity (T_DeclBlocks_s35 )
                                     }
newtype T_DeclBlocks_s35  = C_DeclBlocks_s35 {
                                             T_DeclBlocks_s35 -> T_DeclBlocks_v34
inv_DeclBlocks_s35 :: (T_DeclBlocks_v34 )
                                             }
data T_DeclBlocks_s36  = C_DeclBlocks_s36
type T_DeclBlocks_v34  = (T_DeclBlocks_vIn34 ) -> (T_DeclBlocks_vOut34 )
data T_DeclBlocks_vIn34  = T_DeclBlocks_vIn34 (Int) ([String]) ([Decl]) (Bool) (String)
data T_DeclBlocks_vOut34  = T_DeclBlocks_vOut34 (Expr) ([Decl]) ([String])
{-# NOINLINE sem_DeclBlocks_DeclBlock #-}
sem_DeclBlocks_DeclBlock :: ([Decl]) -> (Decl) -> T_DeclBlocks  -> T_DeclBlocks 
sem_DeclBlocks_DeclBlock :: [Decl] -> Decl -> T_DeclBlocks -> T_DeclBlocks
sem_DeclBlocks_DeclBlock [Decl]
arg_defs_ Decl
arg_visit_ T_DeclBlocks
arg_next_ = Identity T_DeclBlocks_s35 -> T_DeclBlocks
T_DeclBlocks (forall (m :: * -> *) a. Monad m => a -> m a
return T_DeclBlocks_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_DeclBlocks_s35
st35 = let
      v34 :: T_DeclBlocks_v34 
      v34 :: T_DeclBlocks_v34
v34 = \ (T_DeclBlocks_vIn34 Int
_lhsIblockNr [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix) -> ( let
         _nextX35 :: T_DeclBlocks_s35
_nextX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DeclBlocks -> Identity T_DeclBlocks_s35
attach_T_DeclBlocks (T_DeclBlocks
arg_next_))
         (T_DeclBlocks_vOut34 Expr
_nextIcallExpr [Decl]
_nextIdecls [String]
_nextIfreeVars) = T_DeclBlocks_s35 -> T_DeclBlocks_v34
inv_DeclBlocks_s35 T_DeclBlocks_s35
_nextX35 (Int -> [String] -> [Decl] -> Bool -> String -> T_DeclBlocks_vIn34
T_DeclBlocks_vIn34 Int
_nextOblockNr [String]
_nextOlastExprVars [Decl]
_nextOnextVisitDecls Bool
_nextOoptCase String
_nextOprefix)
         _nextOblockNr :: Int
_nextOblockNr = Int -> Int
rule631 Int
_lhsIblockNr
         _lambdaName :: String
_lambdaName = Int -> String -> String
rule632 Int
_lhsIblockNr String
_lhsIprefix
         _pragmaDecl :: Decl
_pragmaDecl = String -> Decl
rule633 String
_lambdaName
         _lhsOcallExpr :: Expr
         _lhsOcallExpr :: Expr
_lhsOcallExpr = [String] -> String -> Expr
rule634 [String]
_freeVars String
_lambdaName
         _freeVars :: [String]
_freeVars = [String] -> [Decl] -> Decl -> [String]
rule635 [String]
_nextIfreeVars [Decl]
arg_defs_ Decl
arg_visit_
         _decl :: Decl
_decl = [String] -> String -> Bool -> Expr -> [Decl] -> Decl -> Decl
rule636 [String]
_freeVars String
_lambdaName Bool
_lhsIoptCase Expr
_nextIcallExpr [Decl]
arg_defs_ Decl
arg_visit_
         _lhsOdecls :: [Decl]
         _lhsOdecls :: [Decl]
_lhsOdecls = Decl -> Int -> [Decl] -> Decl -> [Decl]
rule637 Decl
_decl Int
_lhsIblockNr [Decl]
_nextIdecls Decl
_pragmaDecl
         _lhsOfreeVars :: [String]
         _lhsOfreeVars :: [String]
_lhsOfreeVars = forall a. a -> a
rule638 [String]
_freeVars
         _nextOlastExprVars :: [String]
_nextOlastExprVars = [String] -> [String]
rule639 [String]
_lhsIlastExprVars
         _nextOnextVisitDecls :: [Decl]
_nextOnextVisitDecls = [Decl] -> [Decl]
rule640 [Decl]
_lhsInextVisitDecls
         _nextOoptCase :: Bool
_nextOoptCase = Bool -> Bool
rule641 Bool
_lhsIoptCase
         _nextOprefix :: String
_nextOprefix = String -> String
rule642 String
_lhsIprefix
         __result_ :: T_DeclBlocks_vOut34
__result_ = Expr -> [Decl] -> [String] -> T_DeclBlocks_vOut34
T_DeclBlocks_vOut34 Expr
_lhsOcallExpr [Decl]
_lhsOdecls [String]
_lhsOfreeVars
         in T_DeclBlocks_vOut34
__result_ )
     in T_DeclBlocks_v34 -> T_DeclBlocks_s35
C_DeclBlocks_s35 T_DeclBlocks_v34
v34
   {-# INLINE rule631 #-}
   {-# LINE 671 "src-ag/GenerateCode.ag" #-}
   rule631 = \ ((_lhsIblockNr) :: Int) ->
                       {-# LINE 671 "src-ag/GenerateCode.ag" #-}
                       _lhsIblockNr + 1
                       {-# LINE 4365 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule632 #-}
   {-# LINE 676 "src-ag/GenerateCode.ag" #-}
   rule632 = \ ((_lhsIblockNr) :: Int) ((_lhsIprefix) :: String) ->
                         {-# LINE 676 "src-ag/GenerateCode.ag" #-}
                         _lhsIprefix ++ "_block" ++ show _lhsIblockNr
                         {-# LINE 4371 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule633 #-}
   {-# LINE 677 "src-ag/GenerateCode.ag" #-}
   rule633 = \ _lambdaName ->
                         {-# LINE 677 "src-ag/GenerateCode.ag" #-}
                         PragmaDecl ("NOINLINE " ++ _lambdaName    )
                         {-# LINE 4377 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule634 #-}
   {-# LINE 678 "src-ag/GenerateCode.ag" #-}
   rule634 = \ _freeVars _lambdaName ->
                       {-# LINE 678 "src-ag/GenerateCode.ag" #-}
                       App _lambdaName     (map SimpleExpr _freeVars    )
                       {-# LINE 4383 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule635 #-}
   {-# LINE 682 "src-ag/GenerateCode.ag" #-}
   rule635 = \ ((_nextIfreeVars) :: [String]) defs_ visit_ ->
                       {-# LINE 682 "src-ag/GenerateCode.ag" #-}
                       freevars _nextIfreeVars (visit_ : defs_)
                       {-# LINE 4389 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule636 #-}
   {-# LINE 689 "src-ag/GenerateCode.ag" #-}
   rule636 = \ _freeVars _lambdaName ((_lhsIoptCase) :: Bool) ((_nextIcallExpr) :: Expr) defs_ visit_ ->
                   {-# LINE 689 "src-ag/GenerateCode.ag" #-}
                   mkBlockLambda _lhsIoptCase _lambdaName     _freeVars     (defs_ ++ [visit_]) _nextIcallExpr
                   {-# LINE 4395 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule637 #-}
   {-# LINE 690 "src-ag/GenerateCode.ag" #-}
   rule637 = \ _decl ((_lhsIblockNr) :: Int) ((_nextIdecls) :: [Decl]) _pragmaDecl ->
                    {-# LINE 690 "src-ag/GenerateCode.ag" #-}
                    (if _lhsIblockNr > 1 then [_pragmaDecl    ] else []) ++ [_decl    ] ++ _nextIdecls
                    {-# LINE 4401 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule638 #-}
   rule638 = \ _freeVars ->
     _freeVars
   {-# INLINE rule639 #-}
   rule639 = \ ((_lhsIlastExprVars) :: [String]) ->
     _lhsIlastExprVars
   {-# INLINE rule640 #-}
   rule640 = \ ((_lhsInextVisitDecls) :: [Decl]) ->
     _lhsInextVisitDecls
   {-# INLINE rule641 #-}
   rule641 = \ ((_lhsIoptCase) :: Bool) ->
     _lhsIoptCase
   {-# INLINE rule642 #-}
   rule642 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
{-# NOINLINE sem_DeclBlocks_DeclTerminator #-}
sem_DeclBlocks_DeclTerminator :: ([Decl]) -> (Expr) -> T_DeclBlocks 
sem_DeclBlocks_DeclTerminator :: [Decl] -> Expr -> T_DeclBlocks
sem_DeclBlocks_DeclTerminator [Decl]
arg_defs_ Expr
arg_result_ = Identity T_DeclBlocks_s35 -> T_DeclBlocks
T_DeclBlocks (forall (m :: * -> *) a. Monad m => a -> m a
return T_DeclBlocks_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_DeclBlocks_s35
st35 = let
      v34 :: T_DeclBlocks_v34 
      v34 :: T_DeclBlocks_v34
v34 = \ (T_DeclBlocks_vIn34 Int
_lhsIblockNr [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix) -> ( let
         _lambdaName :: String
_lambdaName = Int -> String -> String
rule643 Int
_lhsIblockNr String
_lhsIprefix
         _pragmaDecl :: Decl
_pragmaDecl = String -> Decl
rule644 String
_lambdaName
         _lhsOcallExpr :: Expr
         _lhsOcallExpr :: Expr
_lhsOcallExpr = [String] -> String -> Expr
rule645 [String]
_freeVars String
_lambdaName
         _freeVars :: [String]
_freeVars = [String] -> [Decl] -> [Decl] -> [String]
rule646 [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls [Decl]
arg_defs_
         _lhsOdecls :: [Decl]
         _lhsOdecls :: [Decl]
_lhsOdecls = [String] -> String -> [Decl] -> Bool -> [Decl] -> Expr -> [Decl]
rule647 [String]
_freeVars String
_lambdaName [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase [Decl]
arg_defs_ Expr
arg_result_
         _lhsOfreeVars :: [String]
         _lhsOfreeVars :: [String]
_lhsOfreeVars = forall a. a -> a
rule648 [String]
_freeVars
         __result_ :: T_DeclBlocks_vOut34
__result_ = Expr -> [Decl] -> [String] -> T_DeclBlocks_vOut34
T_DeclBlocks_vOut34 Expr
_lhsOcallExpr [Decl]
_lhsOdecls [String]
_lhsOfreeVars
         in T_DeclBlocks_vOut34
__result_ )
     in T_DeclBlocks_v34 -> T_DeclBlocks_s35
C_DeclBlocks_s35 T_DeclBlocks_v34
v34
   {-# INLINE rule643 #-}
   {-# LINE 676 "src-ag/GenerateCode.ag" #-}
   rule643 = \ ((_lhsIblockNr) :: Int) ((_lhsIprefix) :: String) ->
                         {-# LINE 676 "src-ag/GenerateCode.ag" #-}
                         _lhsIprefix ++ "_block" ++ show _lhsIblockNr
                         {-# LINE 4441 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule644 #-}
   {-# LINE 677 "src-ag/GenerateCode.ag" #-}
   rule644 = \ _lambdaName ->
                         {-# LINE 677 "src-ag/GenerateCode.ag" #-}
                         PragmaDecl ("NOINLINE " ++ _lambdaName    )
                         {-# LINE 4447 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule645 #-}
   {-# LINE 678 "src-ag/GenerateCode.ag" #-}
   rule645 = \ _freeVars _lambdaName ->
                       {-# LINE 678 "src-ag/GenerateCode.ag" #-}
                       App _lambdaName     (map SimpleExpr _freeVars    )
                       {-# LINE 4453 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule646 #-}
   {-# LINE 680 "src-ag/GenerateCode.ag" #-}
   rule646 = \ ((_lhsIlastExprVars) :: [String]) ((_lhsInextVisitDecls) :: [Decl]) defs_ ->
                       {-# LINE 680 "src-ag/GenerateCode.ag" #-}
                       freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)
                       {-# LINE 4459 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule647 #-}
   {-# LINE 687 "src-ag/GenerateCode.ag" #-}
   rule647 = \ _freeVars _lambdaName ((_lhsInextVisitDecls) :: [Decl]) ((_lhsIoptCase) :: Bool) defs_ result_ ->
                    {-# LINE 687 "src-ag/GenerateCode.ag" #-}
                    [ mkBlockLambda _lhsIoptCase _lambdaName     _freeVars     (defs_ ++ _lhsInextVisitDecls) result_ ]
                    {-# LINE 4465 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule648 #-}
   rule648 = \ _freeVars ->
     _freeVars

-- DeclBlocksRoot ----------------------------------------------
-- wrapper
data Inh_DeclBlocksRoot  = Inh_DeclBlocksRoot { Inh_DeclBlocksRoot -> [String]
lastExprVars_Inh_DeclBlocksRoot :: ([String]), Inh_DeclBlocksRoot -> [Decl]
nextVisitDecls_Inh_DeclBlocksRoot :: ([Decl]), Inh_DeclBlocksRoot -> Bool
optCase_Inh_DeclBlocksRoot :: (Bool), Inh_DeclBlocksRoot -> String
prefix_Inh_DeclBlocksRoot :: (String) }
data Syn_DeclBlocksRoot  = Syn_DeclBlocksRoot { Syn_DeclBlocksRoot -> Expr
firstCall_Syn_DeclBlocksRoot :: (Expr), Syn_DeclBlocksRoot -> [Decl]
lambdas_Syn_DeclBlocksRoot :: ([Decl]) }
{-# INLINABLE wrap_DeclBlocksRoot #-}
wrap_DeclBlocksRoot :: T_DeclBlocksRoot  -> Inh_DeclBlocksRoot  -> (Syn_DeclBlocksRoot )
wrap_DeclBlocksRoot :: T_DeclBlocksRoot -> Inh_DeclBlocksRoot -> Syn_DeclBlocksRoot
wrap_DeclBlocksRoot (T_DeclBlocksRoot Identity T_DeclBlocksRoot_s38
act) (Inh_DeclBlocksRoot [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_DeclBlocksRoot_s38
sem <- Identity T_DeclBlocksRoot_s38
act
        let arg37 :: T_DeclBlocksRoot_vIn37
arg37 = [String] -> [Decl] -> Bool -> String -> T_DeclBlocksRoot_vIn37
T_DeclBlocksRoot_vIn37 [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix
        (T_DeclBlocksRoot_vOut37 Expr
_lhsOfirstCall [Decl]
_lhsOlambdas) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_DeclBlocksRoot_s38 -> T_DeclBlocksRoot_v37
inv_DeclBlocksRoot_s38 T_DeclBlocksRoot_s38
sem T_DeclBlocksRoot_vIn37
arg37)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Expr -> [Decl] -> Syn_DeclBlocksRoot
Syn_DeclBlocksRoot Expr
_lhsOfirstCall [Decl]
_lhsOlambdas)
   )

-- cata
{-# INLINE sem_DeclBlocksRoot #-}
sem_DeclBlocksRoot :: DeclBlocksRoot  -> T_DeclBlocksRoot 
sem_DeclBlocksRoot :: DeclBlocksRoot -> T_DeclBlocksRoot
sem_DeclBlocksRoot ( DeclBlocksRoot DeclBlocks
blocks_ ) = T_DeclBlocks -> T_DeclBlocksRoot
sem_DeclBlocksRoot_DeclBlocksRoot ( DeclBlocks -> T_DeclBlocks
sem_DeclBlocks DeclBlocks
blocks_ )

-- semantic domain
newtype T_DeclBlocksRoot  = T_DeclBlocksRoot {
                                             T_DeclBlocksRoot -> Identity T_DeclBlocksRoot_s38
attach_T_DeclBlocksRoot :: Identity (T_DeclBlocksRoot_s38 )
                                             }
newtype T_DeclBlocksRoot_s38  = C_DeclBlocksRoot_s38 {
                                                     T_DeclBlocksRoot_s38 -> T_DeclBlocksRoot_v37
inv_DeclBlocksRoot_s38 :: (T_DeclBlocksRoot_v37 )
                                                     }
data T_DeclBlocksRoot_s39  = C_DeclBlocksRoot_s39
type T_DeclBlocksRoot_v37  = (T_DeclBlocksRoot_vIn37 ) -> (T_DeclBlocksRoot_vOut37 )
data T_DeclBlocksRoot_vIn37  = T_DeclBlocksRoot_vIn37 ([String]) ([Decl]) (Bool) (String)
data T_DeclBlocksRoot_vOut37  = T_DeclBlocksRoot_vOut37 (Expr) ([Decl])
{-# NOINLINE sem_DeclBlocksRoot_DeclBlocksRoot #-}
sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks  -> T_DeclBlocksRoot 
sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks -> T_DeclBlocksRoot
sem_DeclBlocksRoot_DeclBlocksRoot T_DeclBlocks
arg_blocks_ = Identity T_DeclBlocksRoot_s38 -> T_DeclBlocksRoot
T_DeclBlocksRoot (forall (m :: * -> *) a. Monad m => a -> m a
return T_DeclBlocksRoot_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_DeclBlocksRoot_s38
st38 = let
      v37 :: T_DeclBlocksRoot_v37 
      v37 :: T_DeclBlocksRoot_v37
v37 = \ (T_DeclBlocksRoot_vIn37 [String]
_lhsIlastExprVars [Decl]
_lhsInextVisitDecls Bool
_lhsIoptCase String
_lhsIprefix) -> ( let
         _blocksX35 :: T_DeclBlocks_s35
_blocksX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_DeclBlocks -> Identity T_DeclBlocks_s35
attach_T_DeclBlocks (T_DeclBlocks
arg_blocks_))
         (T_DeclBlocks_vOut34 Expr
_blocksIcallExpr [Decl]
_blocksIdecls [String]
_blocksIfreeVars) = T_DeclBlocks_s35 -> T_DeclBlocks_v34
inv_DeclBlocks_s35 T_DeclBlocks_s35
_blocksX35 (Int -> [String] -> [Decl] -> Bool -> String -> T_DeclBlocks_vIn34
T_DeclBlocks_vIn34 Int
_blocksOblockNr [String]
_blocksOlastExprVars [Decl]
_blocksOnextVisitDecls Bool
_blocksOoptCase String
_blocksOprefix)
         _lhsOlambdas :: [Decl]
         _lhsOlambdas :: [Decl]
_lhsOlambdas = [Decl] -> [Decl]
rule649 [Decl]
_blocksIdecls
         _lhsOfirstCall :: Expr
         _lhsOfirstCall :: Expr
_lhsOfirstCall = Expr -> Expr
rule650 Expr
_blocksIcallExpr
         _blocksOblockNr :: Int
_blocksOblockNr = () -> Int
rule651  ()
         _blocksOlastExprVars :: [String]
_blocksOlastExprVars = [String] -> [String]
rule652 [String]
_lhsIlastExprVars
         _blocksOnextVisitDecls :: [Decl]
_blocksOnextVisitDecls = [Decl] -> [Decl]
rule653 [Decl]
_lhsInextVisitDecls
         _blocksOoptCase :: Bool
_blocksOoptCase = Bool -> Bool
rule654 Bool
_lhsIoptCase
         _blocksOprefix :: String
_blocksOprefix = String -> String
rule655 String
_lhsIprefix
         __result_ :: T_DeclBlocksRoot_vOut37
__result_ = Expr -> [Decl] -> T_DeclBlocksRoot_vOut37
T_DeclBlocksRoot_vOut37 Expr
_lhsOfirstCall [Decl]
_lhsOlambdas
         in T_DeclBlocksRoot_vOut37
__result_ )
     in T_DeclBlocksRoot_v37 -> T_DeclBlocksRoot_s38
C_DeclBlocksRoot_s38 T_DeclBlocksRoot_v37
v37
   {-# INLINE rule649 #-}
   {-# LINE 662 "src-ag/GenerateCode.ag" #-}
   rule649 = \ ((_blocksIdecls) :: [Decl]) ->
                       {-# LINE 662 "src-ag/GenerateCode.ag" #-}
                       _blocksIdecls
                       {-# LINE 4526 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule650 #-}
   {-# LINE 663 "src-ag/GenerateCode.ag" #-}
   rule650 = \ ((_blocksIcallExpr) :: Expr) ->
                        {-# LINE 663 "src-ag/GenerateCode.ag" #-}
                        _blocksIcallExpr
                        {-# LINE 4532 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule651 #-}
   {-# LINE 668 "src-ag/GenerateCode.ag" #-}
   rule651 = \  (_ :: ()) ->
                         {-# LINE 668 "src-ag/GenerateCode.ag" #-}
                         1
                         {-# LINE 4538 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule652 #-}
   rule652 = \ ((_lhsIlastExprVars) :: [String]) ->
     _lhsIlastExprVars
   {-# INLINE rule653 #-}
   rule653 = \ ((_lhsInextVisitDecls) :: [Decl]) ->
     _lhsInextVisitDecls
   {-# INLINE rule654 #-}
   rule654 = \ ((_lhsIoptCase) :: Bool) ->
     _lhsIoptCase
   {-# INLINE rule655 #-}
   rule655 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern {  }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> [NontermIdent]
definedInsts_Syn_Pattern :: ([Identifier]), Syn_Pattern -> [(NontermIdent, NontermIdent)]
patternAttributes_Syn_Pattern :: ([(Identifier, Identifier)]) }
{-# 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_s41
act) (Inh_Pattern
Inh_Pattern ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Pattern_s41
sem <- Identity T_Pattern_s41
act
        let arg40 :: T_Pattern_vIn40
arg40 = T_Pattern_vIn40
T_Pattern_vIn40 
        (T_Pattern_vOut40 Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
sem T_Pattern_vIn40
arg40)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern
-> [NontermIdent] -> [(NontermIdent, NontermIdent)] -> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes)
   )

-- cata
{-# NOINLINE sem_Pattern #-}
sem_Pattern :: Pattern  -> T_Pattern 
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Constr NontermIdent
name_ Patterns
pats_ ) = NontermIdent -> T_Patterns -> T_Pattern
sem_Pattern_Constr NontermIdent
name_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Product Pos
pos_ Patterns
pats_ ) = Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
pos_ ( Patterns -> T_Patterns
sem_Patterns Patterns
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_s41
attach_T_Pattern :: Identity (T_Pattern_s41 )
                               }
newtype T_Pattern_s41  = C_Pattern_s41 {
                                       T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 :: (T_Pattern_v40 )
                                       }
data T_Pattern_s42  = C_Pattern_s42
type T_Pattern_v40  = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )
data T_Pattern_vIn40  = T_Pattern_vIn40 
data T_Pattern_vOut40  = T_Pattern_vOut40 (Pattern) ([Identifier]) ([(Identifier, Identifier)])
{-# 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_s41 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40
T_Pattern_vIn40 ) -> ( let
         _patsX44 :: T_Patterns_s44
_patsX44 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut43 Patterns
_patsIcopy [NontermIdent]
_patsIdefinedInsts [(NontermIdent, NontermIdent)]
_patsIpatternAttributes) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (T_Patterns_vIn43
T_Patterns_vIn43 )
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule656 [NontermIdent]
_patsIdefinedInsts
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule657 [(NontermIdent, NontermIdent)]
_patsIpatternAttributes
         _copy :: Pattern
_copy = Patterns -> NontermIdent -> Pattern
rule658 Patterns
_patsIcopy NontermIdent
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall a. a -> a
rule659 Pattern
_copy
         __result_ :: T_Pattern_vOut40
__result_ = Pattern
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule656 #-}
   rule656 :: [NontermIdent] -> [NontermIdent]
rule656 = \ (([NontermIdent]
_patsIdefinedInsts) :: [Identifier]) ->
     [NontermIdent]
_patsIdefinedInsts
   {-# INLINE rule657 #-}
   rule657 :: [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule657 = \ (([(NontermIdent, NontermIdent)]
_patsIpatternAttributes) :: [(Identifier, Identifier)]) ->
     [(NontermIdent, NontermIdent)]
_patsIpatternAttributes
   {-# INLINE rule658 #-}
   rule658 :: Patterns -> NontermIdent -> Pattern
rule658 = \ ((Patterns
_patsIcopy) :: Patterns) NontermIdent
name_ ->
     NontermIdent -> Patterns -> Pattern
Constr NontermIdent
name_ Patterns
_patsIcopy
   {-# INLINE rule659 #-}
   rule659 :: p -> p
rule659 = \ p
_copy ->
     p
_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_s41 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40
T_Pattern_vIn40 ) -> ( let
         _patsX44 :: T_Patterns_s44
_patsX44 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut43 Patterns
_patsIcopy [NontermIdent]
_patsIdefinedInsts [(NontermIdent, NontermIdent)]
_patsIpatternAttributes) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (T_Patterns_vIn43
T_Patterns_vIn43 )
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule660 [NontermIdent]
_patsIdefinedInsts
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule661 [(NontermIdent, NontermIdent)]
_patsIpatternAttributes
         _copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule662 Patterns
_patsIcopy Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall a. a -> a
rule663 Pattern
_copy
         __result_ :: T_Pattern_vOut40
__result_ = Pattern
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule660 #-}
   rule660 :: [NontermIdent] -> [NontermIdent]
rule660 = \ (([NontermIdent]
_patsIdefinedInsts) :: [Identifier]) ->
     [NontermIdent]
_patsIdefinedInsts
   {-# INLINE rule661 #-}
   rule661 :: [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule661 = \ (([(NontermIdent, NontermIdent)]
_patsIpatternAttributes) :: [(Identifier, Identifier)]) ->
     [(NontermIdent, NontermIdent)]
_patsIpatternAttributes
   {-# INLINE rule662 #-}
   rule662 :: Patterns -> Pos -> Pattern
rule662 = \ ((Patterns
_patsIcopy) :: Patterns) Pos
pos_ ->
     Pos -> Patterns -> Pattern
Product Pos
pos_ Patterns
_patsIcopy
   {-# INLINE rule663 #-}
   rule663 :: p -> p
rule663 = \ p
_copy ->
     p
_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_s41 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40
T_Pattern_vIn40 ) -> ( let
         _patX41 :: T_Pattern_s41
_patX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut40 Pattern
_patIcopy [NontermIdent]
_patIdefinedInsts [(NontermIdent, NontermIdent)]
_patIpatternAttributes) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (T_Pattern_vIn40
T_Pattern_vIn40 )
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> NontermIdent -> NontermIdent -> [NontermIdent]
rule664 [NontermIdent]
_patIdefinedInsts NontermIdent
arg_attr_ NontermIdent
arg_field_
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = [(NontermIdent, NontermIdent)]
-> NontermIdent -> NontermIdent -> [(NontermIdent, NontermIdent)]
rule665 [(NontermIdent, NontermIdent)]
_patIpatternAttributes NontermIdent
arg_attr_ NontermIdent
arg_field_
         _copy :: Pattern
_copy = Pattern -> NontermIdent -> NontermIdent -> Pattern
rule666 Pattern
_patIcopy NontermIdent
arg_attr_ NontermIdent
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall a. a -> a
rule667 Pattern
_copy
         __result_ :: T_Pattern_vOut40
__result_ = Pattern
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule664 #-}
   {-# LINE 266 "src-ag/GenerateCode.ag" #-}
   rule664 = \ ((_patIdefinedInsts) :: [Identifier]) attr_ field_ ->
                               {-# LINE 266 "src-ag/GenerateCode.ag" #-}
                               (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts
                               {-# LINE 4672 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule665 #-}
   {-# LINE 274 "src-ag/GenerateCode.ag" #-}
   rule665 = \ ((_patIpatternAttributes) :: [(Identifier, Identifier)]) attr_ field_ ->
                                {-# LINE 274 "src-ag/GenerateCode.ag" #-}
                                (field_,attr_) : _patIpatternAttributes
                                {-# LINE 4678 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule666 #-}
   rule666 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule667 #-}
   rule667 = \ _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_s41 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40
T_Pattern_vIn40 ) -> ( let
         _patX41 :: T_Pattern_s41
_patX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut40 Pattern
_patIcopy [NontermIdent]
_patIdefinedInsts [(NontermIdent, NontermIdent)]
_patIpatternAttributes) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (T_Pattern_vIn40
T_Pattern_vIn40 )
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent]
rule668 [NontermIdent]
_patIdefinedInsts
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule669 [(NontermIdent, NontermIdent)]
_patIpatternAttributes
         _copy :: Pattern
_copy = Pattern -> Pattern
rule670 Pattern
_patIcopy
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall a. a -> a
rule671 Pattern
_copy
         __result_ :: T_Pattern_vOut40
__result_ = Pattern
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule668 #-}
   rule668 :: [NontermIdent] -> [NontermIdent]
rule668 = \ (([NontermIdent]
_patIdefinedInsts) :: [Identifier]) ->
     [NontermIdent]
_patIdefinedInsts
   {-# INLINE rule669 #-}
   rule669 :: [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule669 = \ (([(NontermIdent, NontermIdent)]
_patIpatternAttributes) :: [(Identifier, Identifier)]) ->
     [(NontermIdent, NontermIdent)]
_patIpatternAttributes
   {-# INLINE rule670 #-}
   rule670 :: Pattern -> Pattern
rule670 = \ ((Pattern
_patIcopy) :: Pattern) ->
     Pattern -> Pattern
Irrefutable Pattern
_patIcopy
   {-# INLINE rule671 #-}
   rule671 :: p -> p
rule671 = \ p
_copy ->
     p
_copy
{-# 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_s41 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Pattern_s41
st41 = let
      v40 :: T_Pattern_v40 
      v40 :: T_Pattern_v40
v40 = \ (T_Pattern_vIn40
T_Pattern_vIn40 ) -> ( let
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = forall {a}. () -> [a]
rule672  ()
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = forall {a}. () -> [a]
rule673  ()
         _copy :: Pattern
_copy = Pos -> Pattern
rule674 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall a. a -> a
rule675 Pattern
_copy
         __result_ :: T_Pattern_vOut40
__result_ = Pattern
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Pattern_vOut40
T_Pattern_vOut40 Pattern
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule672 #-}
   rule672 :: () -> [a]
rule672 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule673 #-}
   rule673 :: () -> [a]
rule673 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule674 #-}
   rule674 :: Pos -> Pattern
rule674 = \ Pos
pos_ ->
     Pos -> Pattern
Underscore Pos
pos_
   {-# INLINE rule675 #-}
   rule675 :: p -> p
rule675 = \ p
_copy ->
     p
_copy

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns {  }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> [NontermIdent]
definedInsts_Syn_Patterns :: ([Identifier]), Syn_Patterns -> [(NontermIdent, NontermIdent)]
patternAttributes_Syn_Patterns :: ([(Identifier, Identifier)]) }
{-# 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_s44
act) (Inh_Patterns
Inh_Patterns ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Patterns_s44
sem <- Identity T_Patterns_s44
act
        let arg43 :: T_Patterns_vIn43
arg43 = T_Patterns_vIn43
T_Patterns_vIn43 
        (T_Patterns_vOut43 Patterns
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
sem T_Patterns_vIn43
arg43)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns
-> [NontermIdent] -> [(NontermIdent, NontermIdent)] -> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes)
   )

-- cata
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns  -> T_Patterns 
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns Patterns
list = 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 (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Pattern -> T_Pattern
sem_Pattern Patterns
list)

-- semantic domain
newtype T_Patterns  = T_Patterns {
                                 T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns :: Identity (T_Patterns_s44 )
                                 }
newtype T_Patterns_s44  = C_Patterns_s44 {
                                         T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 :: (T_Patterns_v43 )
                                         }
data T_Patterns_s45  = C_Patterns_s45
type T_Patterns_v43  = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )
data T_Patterns_vIn43  = T_Patterns_vIn43 
data T_Patterns_vOut43  = T_Patterns_vOut43 (Patterns) ([Identifier]) ([(Identifier, Identifier)])
{-# 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_s44 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_Patterns_s44
st44 = let
      v43 :: T_Patterns_v43 
      v43 :: T_Patterns_v43
v43 = \ (T_Patterns_vIn43
T_Patterns_vIn43 ) -> ( let
         _hdX41 :: T_Pattern_s41
_hdX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_hd_))
         _tlX44 :: T_Patterns_s44
_tlX44 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s44
attach_T_Patterns (T_Patterns
arg_tl_))
         (T_Pattern_vOut40 Pattern
_hdIcopy [NontermIdent]
_hdIdefinedInsts [(NontermIdent, NontermIdent)]
_hdIpatternAttributes) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_hdX41 (T_Pattern_vIn40
T_Pattern_vIn40 )
         (T_Patterns_vOut43 Patterns
_tlIcopy [NontermIdent]
_tlIdefinedInsts [(NontermIdent, NontermIdent)]
_tlIpatternAttributes) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_tlX44 (T_Patterns_vIn43
T_Patterns_vIn43 )
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule676 [NontermIdent]
_hdIdefinedInsts [NontermIdent]
_tlIdefinedInsts
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = [(NontermIdent, NontermIdent)]
-> [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule677 [(NontermIdent, NontermIdent)]
_hdIpatternAttributes [(NontermIdent, NontermIdent)]
_tlIpatternAttributes
         _copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule678 Pattern
_hdIcopy Patterns
_tlIcopy
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall a. a -> a
rule679 Patterns
_copy
         __result_ :: T_Patterns_vOut43
__result_ = Patterns
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Patterns_vOut43
T_Patterns_vOut43 Patterns
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Patterns_vOut43
__result_ )
     in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
   {-# INLINE rule676 #-}
   rule676 :: [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule676 = \ (([NontermIdent]
_hdIdefinedInsts) :: [Identifier]) (([NontermIdent]
_tlIdefinedInsts) :: [Identifier]) ->
     [NontermIdent]
_hdIdefinedInsts forall a. [a] -> [a] -> [a]
++ [NontermIdent]
_tlIdefinedInsts
   {-# INLINE rule677 #-}
   rule677 :: [(NontermIdent, NontermIdent)]
-> [(NontermIdent, NontermIdent)] -> [(NontermIdent, NontermIdent)]
rule677 = \ (([(NontermIdent, NontermIdent)]
_hdIpatternAttributes) :: [(Identifier, Identifier)]) (([(NontermIdent, NontermIdent)]
_tlIpatternAttributes) :: [(Identifier, Identifier)]) ->
     [(NontermIdent, NontermIdent)]
_hdIpatternAttributes forall a. [a] -> [a] -> [a]
++ [(NontermIdent, NontermIdent)]
_tlIpatternAttributes
   {-# INLINE rule678 #-}
   rule678 :: Pattern -> Patterns -> Patterns
rule678 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
     (:) Pattern
_hdIcopy Patterns
_tlIcopy
   {-# INLINE rule679 #-}
   rule679 :: p -> p
rule679 = \ p
_copy ->
     p
_copy
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil ::  T_Patterns 
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil  = Identity T_Patterns_s44 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s44
st44) where
   {-# NOINLINE st44 #-}
   st44 :: T_Patterns_s44
st44 = let
      v43 :: T_Patterns_v43 
      v43 :: T_Patterns_v43
v43 = \ (T_Patterns_vIn43
T_Patterns_vIn43 ) -> ( let
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = forall {a}. () -> [a]
rule680  ()
         _lhsOpatternAttributes :: [(Identifier, Identifier)]
         _lhsOpatternAttributes :: [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes = forall {a}. () -> [a]
rule681  ()
         _copy :: [a]
_copy = forall {a}. () -> [a]
rule682  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall a. a -> a
rule683 forall a. [a]
_copy
         __result_ :: T_Patterns_vOut43
__result_ = Patterns
-> [NontermIdent]
-> [(NontermIdent, NontermIdent)]
-> T_Patterns_vOut43
T_Patterns_vOut43 Patterns
_lhsOcopy [NontermIdent]
_lhsOdefinedInsts [(NontermIdent, NontermIdent)]
_lhsOpatternAttributes
         in T_Patterns_vOut43
__result_ )
     in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
   {-# INLINE rule680 #-}
   rule680 :: () -> [a]
rule680 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule681 #-}
   rule681 :: () -> [a]
rule681 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule682 #-}
   rule682 :: () -> [a]
rule682 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule683 #-}
   rule683 :: p -> p
rule683 = \ p
_copy ->
     p
_copy

-- Sequence ----------------------------------------------------
-- wrapper
data Inh_Sequence  = Inh_Sequence { Inh_Sequence -> Set NontermIdent
allNts_Inh_Sequence :: (Set NontermIdent), Inh_Sequence -> Set NontermIdent
aroundMap_Inh_Sequence :: (Set Identifier), Inh_Sequence -> [(NontermIdent, Type, ChildKind)]
children_Inh_Sequence :: ([(Identifier,Type,ChildKind)]), Inh_Sequence -> NontermIdent
con_Inh_Sequence :: (ConstructorIdent), Inh_Sequence -> [Decl]
declsAbove_Inh_Sequence :: ([Decl]), Inh_Sequence -> Map NontermIdent Type
inh_Inh_Sequence :: (Attributes), Inh_Sequence -> Map NontermIdent Int
instVisitNrs_Inh_Sequence :: (Map Identifier Int), Inh_Sequence -> Expr
lastExpr_Inh_Sequence :: (Expr), Inh_Sequence -> Map NontermIdent (NontermIdent, [NontermIdent])
mergeMap_Inh_Sequence :: (Map Identifier (Identifier, [Identifier])), Inh_Sequence -> Int
nr_Inh_Sequence :: (Int), Inh_Sequence -> NontermIdent
nt_Inh_Sequence :: (NontermIdent), Inh_Sequence -> Bool
o_case_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_cata_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_clean_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_costcentre_Inh_Sequence :: (Bool), Inh_Sequence -> Maybe Bool
o_data_Inh_Sequence :: (Maybe Bool), Inh_Sequence -> Bool
o_linePragmas_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_monadic_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_newtypes_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_pretty_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_rename_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_sem_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_sig_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_splitsems_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_strictwrap_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_traces_Inh_Sequence :: (Bool), Inh_Sequence -> Bool
o_unbox_Inh_Sequence :: (Bool), Inh_Sequence -> Options
options_Inh_Sequence :: (Options), Inh_Sequence -> Map NontermIdent (NontermIdent, [String])
paramInstMap_Inh_Sequence :: (Map Identifier (NontermIdent, [String])), Inh_Sequence -> ParamMap
paramMap_Inh_Sequence :: (ParamMap), Inh_Sequence -> String
prefix_Inh_Sequence :: (String), Inh_Sequence -> Map NontermIdent Type
syn_Inh_Sequence :: (Attributes), Inh_Sequence -> [NontermIdent]
terminals_Inh_Sequence :: ([Identifier]), Inh_Sequence -> NontermIdent -> Int -> [String] -> Type
unfoldSemDom_Inh_Sequence :: (NontermIdent -> Int -> [String] -> Code.Type), Inh_Sequence -> Set NontermIdent
visitedSet_Inh_Sequence :: (Set Identifier), Inh_Sequence -> String
what_Inh_Sequence :: (String) }
data Syn_Sequence  = Syn_Sequence { Syn_Sequence -> Bool
allTpsFound_Syn_Sequence :: (Bool), Syn_Sequence -> DeclBlocks
blockDecls_Syn_Sequence :: (DeclBlocks), Syn_Sequence -> [String]
comments_Syn_Sequence :: ([String]), Syn_Sequence -> [Decl]
decls_Syn_Sequence :: (Decls), Syn_Sequence -> [Decl]
declsAbove_Syn_Sequence :: ([Decl]), Syn_Sequence -> [NontermIdent]
definedInsts_Syn_Sequence :: ([Identifier]), Syn_Sequence -> Exprs
exprs_Syn_Sequence :: (Exprs), Syn_Sequence -> [Decl]
tSigs_Syn_Sequence :: ([Decl]), Syn_Sequence -> [Type]
tps_Syn_Sequence :: ([Type]), Syn_Sequence -> Set String
usedVars_Syn_Sequence :: (Set String), Syn_Sequence -> Set NontermIdent
visitedSet_Syn_Sequence :: (Set Identifier) }
{-# INLINABLE wrap_Sequence #-}
wrap_Sequence :: T_Sequence  -> Inh_Sequence  -> (Syn_Sequence )
wrap_Sequence :: T_Sequence -> Inh_Sequence -> Syn_Sequence
wrap_Sequence (T_Sequence Identity T_Sequence_s47
act) (Inh_Sequence Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Expr
_lhsIlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Sequence_s47
sem <- Identity T_Sequence_s47
act
        let arg46 :: T_Sequence_vIn46
arg46 = Set NontermIdent
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Expr
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> String
-> T_Sequence_vIn46
T_Sequence_vIn46 Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Expr
_lhsIlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat
        (T_Sequence_vOut46 Bool
_lhsOallTpsFound DeclBlocks
_lhsOblockDecls [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Sequence_s47 -> T_Sequence_v46
inv_Sequence_s47 T_Sequence_s47
sem T_Sequence_vIn46
arg46)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
-> DeclBlocks
-> [String]
-> [Decl]
-> [Decl]
-> [NontermIdent]
-> Exprs
-> [Decl]
-> [Type]
-> Set String
-> Set NontermIdent
-> Syn_Sequence
Syn_Sequence Bool
_lhsOallTpsFound DeclBlocks
_lhsOblockDecls [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet)
   )

-- cata
{-# NOINLINE sem_Sequence #-}
sem_Sequence :: Sequence  -> T_Sequence 
sem_Sequence :: Sequence -> T_Sequence
sem_Sequence Sequence
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_CRule -> T_Sequence -> T_Sequence
sem_Sequence_Cons T_Sequence
sem_Sequence_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map CRule -> T_CRule
sem_CRule Sequence
list)

-- semantic domain
newtype T_Sequence  = T_Sequence {
                                 T_Sequence -> Identity T_Sequence_s47
attach_T_Sequence :: Identity (T_Sequence_s47 )
                                 }
newtype T_Sequence_s47  = C_Sequence_s47 {
                                         T_Sequence_s47 -> T_Sequence_v46
inv_Sequence_s47 :: (T_Sequence_v46 )
                                         }
data T_Sequence_s48  = C_Sequence_s48
type T_Sequence_v46  = (T_Sequence_vIn46 ) -> (T_Sequence_vOut46 )
data T_Sequence_vIn46  = T_Sequence_vIn46 (Set NontermIdent) (Set Identifier) ([(Identifier,Type,ChildKind)]) (ConstructorIdent) ([Decl]) (Attributes) (Map Identifier Int) (Expr) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (String)
data T_Sequence_vOut46  = T_Sequence_vOut46 (Bool) (DeclBlocks) ([String]) (Decls) ([Decl]) ([Identifier]) (Exprs) ([Decl]) ([Type]) (Set String) (Set Identifier)
{-# NOINLINE sem_Sequence_Cons #-}
sem_Sequence_Cons :: T_CRule  -> T_Sequence  -> T_Sequence 
sem_Sequence_Cons :: T_CRule -> T_Sequence -> T_Sequence
sem_Sequence_Cons T_CRule
arg_hd_ T_Sequence
arg_tl_ = Identity T_Sequence_s47 -> T_Sequence
T_Sequence (forall (m :: * -> *) a. Monad m => a -> m a
return T_Sequence_s47
st47) where
   {-# NOINLINE st47 #-}
   st47 :: T_Sequence_s47
st47 = let
      v46 :: T_Sequence_v46 
      v46 :: T_Sequence_v46
v46 = \ (T_Sequence_vIn46 Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Expr
_lhsIlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat) -> ( let
         _hdX20 :: T_CRule_s20
_hdX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CRule -> Identity T_CRule_s20
attach_T_CRule (T_CRule
arg_hd_))
         _tlX47 :: T_Sequence_s47
_tlX47 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Sequence -> Identity T_Sequence_s47
attach_T_Sequence (T_Sequence
arg_tl_))
         (T_CRule_vOut19 Bool
_hdIallTpsFound DeclBlocks -> DeclBlocks
_hdIbldBlocksFun [String]
_hdIcomments [Decl]
_hdIdecls [Decl]
_hdIdeclsAbove [NontermIdent]
_hdIdefinedInsts Exprs
_hdIexprs [Decl]
_hdItSigs [Type]
_hdItps Set String
_hdIusedVars Set NontermIdent
_hdIvisitedSet) = T_CRule_s20 -> T_CRule_v19
inv_CRule_s20 T_CRule_s20
_hdX20 (Set NontermIdent
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> String
-> T_CRule_vIn19
T_CRule_vIn19 Set NontermIdent
_hdOallNts Set NontermIdent
_hdOaroundMap [(NontermIdent, Type, ChildKind)]
_hdOchildren NontermIdent
_hdOcon [Decl]
_hdOdeclsAbove Map NontermIdent Type
_hdOinh Map NontermIdent Int
_hdOinstVisitNrs Map NontermIdent (NontermIdent, [NontermIdent])
_hdOmergeMap Int
_hdOnr NontermIdent
_hdOnt Bool
_hdOo_case Bool
_hdOo_cata Bool
_hdOo_clean Bool
_hdOo_costcentre Maybe Bool
_hdOo_data Bool
_hdOo_linePragmas Bool
_hdOo_monadic Bool
_hdOo_newtypes Bool
_hdOo_pretty Bool
_hdOo_rename Bool
_hdOo_sem Bool
_hdOo_sig Bool
_hdOo_splitsems Bool
_hdOo_strictwrap Bool
_hdOo_traces Bool
_hdOo_unbox Options
_hdOoptions Map NontermIdent (NontermIdent, [String])
_hdOparamInstMap ParamMap
_hdOparamMap String
_hdOprefix Map NontermIdent Type
_hdOsyn [NontermIdent]
_hdOterminals NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom Set NontermIdent
_hdOvisitedSet String
_hdOwhat)
         (T_Sequence_vOut46 Bool
_tlIallTpsFound DeclBlocks
_tlIblockDecls [String]
_tlIcomments [Decl]
_tlIdecls [Decl]
_tlIdeclsAbove [NontermIdent]
_tlIdefinedInsts Exprs
_tlIexprs [Decl]
_tlItSigs [Type]
_tlItps Set String
_tlIusedVars Set NontermIdent
_tlIvisitedSet) = T_Sequence_s47 -> T_Sequence_v46
inv_Sequence_s47 T_Sequence_s47
_tlX47 (Set NontermIdent
-> Set NontermIdent
-> [(NontermIdent, Type, ChildKind)]
-> NontermIdent
-> [Decl]
-> Map NontermIdent Type
-> Map NontermIdent Int
-> Expr
-> Map NontermIdent (NontermIdent, [NontermIdent])
-> Int
-> NontermIdent
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Bool
-> Options
-> Map NontermIdent (NontermIdent, [String])
-> ParamMap
-> String
-> Map NontermIdent Type
-> [NontermIdent]
-> (NontermIdent -> Int -> [String] -> Type)
-> Set NontermIdent
-> String
-> T_Sequence_vIn46
T_Sequence_vIn46 Set NontermIdent
_tlOallNts Set NontermIdent
_tlOaroundMap [(NontermIdent, Type, ChildKind)]
_tlOchildren NontermIdent
_tlOcon [Decl]
_tlOdeclsAbove Map NontermIdent Type
_tlOinh Map NontermIdent Int
_tlOinstVisitNrs Expr
_tlOlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_tlOmergeMap Int
_tlOnr NontermIdent
_tlOnt Bool
_tlOo_case Bool
_tlOo_cata Bool
_tlOo_clean Bool
_tlOo_costcentre Maybe Bool
_tlOo_data Bool
_tlOo_linePragmas Bool
_tlOo_monadic Bool
_tlOo_newtypes Bool
_tlOo_pretty Bool
_tlOo_rename Bool
_tlOo_sem Bool
_tlOo_sig Bool
_tlOo_splitsems Bool
_tlOo_strictwrap Bool
_tlOo_traces Bool
_tlOo_unbox Options
_tlOoptions Map NontermIdent (NontermIdent, [String])
_tlOparamInstMap ParamMap
_tlOparamMap String
_tlOprefix Map NontermIdent Type
_tlOsyn [NontermIdent]
_tlOterminals NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom Set NontermIdent
_tlOvisitedSet String
_tlOwhat)
         _lhsOblockDecls :: DeclBlocks
         _lhsOblockDecls :: DeclBlocks
_lhsOblockDecls = (DeclBlocks -> DeclBlocks) -> DeclBlocks -> DeclBlocks
rule684 DeclBlocks -> DeclBlocks
_hdIbldBlocksFun DeclBlocks
_tlIblockDecls
         _lhsOallTpsFound :: Bool
         _lhsOallTpsFound :: Bool
_lhsOallTpsFound = Bool -> Bool -> Bool
rule685 Bool
_hdIallTpsFound Bool
_tlIallTpsFound
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = [String] -> [String] -> [String]
rule686 [String]
_hdIcomments [String]
_tlIcomments
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = [Decl] -> [Decl] -> [Decl]
rule687 [Decl]
_hdIdecls [Decl]
_tlIdecls
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = [NontermIdent] -> [NontermIdent] -> [NontermIdent]
rule688 [NontermIdent]
_hdIdefinedInsts [NontermIdent]
_tlIdefinedInsts
         _lhsOexprs :: Exprs
         _lhsOexprs :: Exprs
_lhsOexprs = Exprs -> Exprs -> Exprs
rule689 Exprs
_hdIexprs Exprs
_tlIexprs
         _lhsOtSigs :: [Decl]
         _lhsOtSigs :: [Decl]
_lhsOtSigs = [Decl] -> [Decl] -> [Decl]
rule690 [Decl]
_hdItSigs [Decl]
_tlItSigs
         _lhsOtps :: [Type]
         _lhsOtps :: [Type]
_lhsOtps = [Type] -> [Type] -> [Type]
rule691 [Type]
_hdItps [Type]
_tlItps
         _lhsOusedVars :: Set String
         _lhsOusedVars :: Set String
_lhsOusedVars = Set String -> Set String -> Set String
rule692 Set String
_hdIusedVars Set String
_tlIusedVars
         _lhsOdeclsAbove :: [Decl]
         _lhsOdeclsAbove :: [Decl]
_lhsOdeclsAbove = [Decl] -> [Decl]
rule693 [Decl]
_tlIdeclsAbove
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = Set NontermIdent -> Set NontermIdent
rule694 Set NontermIdent
_tlIvisitedSet
         _hdOallNts :: Set NontermIdent
_hdOallNts = Set NontermIdent -> Set NontermIdent
rule695 Set NontermIdent
_lhsIallNts
         _hdOaroundMap :: Set NontermIdent
_hdOaroundMap = Set NontermIdent -> Set NontermIdent
rule696 Set NontermIdent
_lhsIaroundMap
         _hdOchildren :: [(NontermIdent, Type, ChildKind)]
_hdOchildren = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule697 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _hdOcon :: NontermIdent
_hdOcon = NontermIdent -> NontermIdent
rule698 NontermIdent
_lhsIcon
         _hdOdeclsAbove :: [Decl]
_hdOdeclsAbove = [Decl] -> [Decl]
rule699 [Decl]
_lhsIdeclsAbove
         _hdOinh :: Map NontermIdent Type
_hdOinh = Map NontermIdent Type -> Map NontermIdent Type
rule700 Map NontermIdent Type
_lhsIinh
         _hdOinstVisitNrs :: Map NontermIdent Int
_hdOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule701 Map NontermIdent Int
_lhsIinstVisitNrs
         _hdOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_hdOmergeMap = Map NontermIdent (NontermIdent, [NontermIdent])
-> Map NontermIdent (NontermIdent, [NontermIdent])
rule702 Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap
         _hdOnr :: Int
_hdOnr = Int -> Int
rule703 Int
_lhsInr
         _hdOnt :: NontermIdent
_hdOnt = NontermIdent -> NontermIdent
rule704 NontermIdent
_lhsInt
         _hdOo_case :: Bool
_hdOo_case = Bool -> Bool
rule705 Bool
_lhsIo_case
         _hdOo_cata :: Bool
_hdOo_cata = Bool -> Bool
rule706 Bool
_lhsIo_cata
         _hdOo_clean :: Bool
_hdOo_clean = Bool -> Bool
rule707 Bool
_lhsIo_clean
         _hdOo_costcentre :: Bool
_hdOo_costcentre = Bool -> Bool
rule708 Bool
_lhsIo_costcentre
         _hdOo_data :: Maybe Bool
_hdOo_data = Maybe Bool -> Maybe Bool
rule709 Maybe Bool
_lhsIo_data
         _hdOo_linePragmas :: Bool
_hdOo_linePragmas = Bool -> Bool
rule710 Bool
_lhsIo_linePragmas
         _hdOo_monadic :: Bool
_hdOo_monadic = Bool -> Bool
rule711 Bool
_lhsIo_monadic
         _hdOo_newtypes :: Bool
_hdOo_newtypes = Bool -> Bool
rule712 Bool
_lhsIo_newtypes
         _hdOo_pretty :: Bool
_hdOo_pretty = Bool -> Bool
rule713 Bool
_lhsIo_pretty
         _hdOo_rename :: Bool
_hdOo_rename = Bool -> Bool
rule714 Bool
_lhsIo_rename
         _hdOo_sem :: Bool
_hdOo_sem = Bool -> Bool
rule715 Bool
_lhsIo_sem
         _hdOo_sig :: Bool
_hdOo_sig = Bool -> Bool
rule716 Bool
_lhsIo_sig
         _hdOo_splitsems :: Bool
_hdOo_splitsems = Bool -> Bool
rule717 Bool
_lhsIo_splitsems
         _hdOo_strictwrap :: Bool
_hdOo_strictwrap = Bool -> Bool
rule718 Bool
_lhsIo_strictwrap
         _hdOo_traces :: Bool
_hdOo_traces = Bool -> Bool
rule719 Bool
_lhsIo_traces
         _hdOo_unbox :: Bool
_hdOo_unbox = Bool -> Bool
rule720 Bool
_lhsIo_unbox
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule721 Options
_lhsIoptions
         _hdOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_hdOparamInstMap = Map NontermIdent (NontermIdent, [String])
-> Map NontermIdent (NontermIdent, [String])
rule722 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap
         _hdOparamMap :: ParamMap
_hdOparamMap = ParamMap -> ParamMap
rule723 ParamMap
_lhsIparamMap
         _hdOprefix :: String
_hdOprefix = String -> String
rule724 String
_lhsIprefix
         _hdOsyn :: Map NontermIdent Type
_hdOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule725 Map NontermIdent Type
_lhsIsyn
         _hdOterminals :: [NontermIdent]
_hdOterminals = [NontermIdent] -> [NontermIdent]
rule726 [NontermIdent]
_lhsIterminals
         _hdOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_hdOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule727 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _hdOvisitedSet :: Set NontermIdent
_hdOvisitedSet = Set NontermIdent -> Set NontermIdent
rule728 Set NontermIdent
_lhsIvisitedSet
         _hdOwhat :: String
_hdOwhat = String -> String
rule729 String
_lhsIwhat
         _tlOallNts :: Set NontermIdent
_tlOallNts = Set NontermIdent -> Set NontermIdent
rule730 Set NontermIdent
_lhsIallNts
         _tlOaroundMap :: Set NontermIdent
_tlOaroundMap = Set NontermIdent -> Set NontermIdent
rule731 Set NontermIdent
_lhsIaroundMap
         _tlOchildren :: [(NontermIdent, Type, ChildKind)]
_tlOchildren = [(NontermIdent, Type, ChildKind)]
-> [(NontermIdent, Type, ChildKind)]
rule732 [(NontermIdent, Type, ChildKind)]
_lhsIchildren
         _tlOcon :: NontermIdent
_tlOcon = NontermIdent -> NontermIdent
rule733 NontermIdent
_lhsIcon
         _tlOdeclsAbove :: [Decl]
_tlOdeclsAbove = [Decl] -> [Decl]
rule734 [Decl]
_hdIdeclsAbove
         _tlOinh :: Map NontermIdent Type
_tlOinh = Map NontermIdent Type -> Map NontermIdent Type
rule735 Map NontermIdent Type
_lhsIinh
         _tlOinstVisitNrs :: Map NontermIdent Int
_tlOinstVisitNrs = Map NontermIdent Int -> Map NontermIdent Int
rule736 Map NontermIdent Int
_lhsIinstVisitNrs
         _tlOlastExpr :: Expr
_tlOlastExpr = Expr -> Expr
rule737 Expr
_lhsIlastExpr
         _tlOmergeMap :: Map NontermIdent (NontermIdent, [NontermIdent])
_tlOmergeMap = Map NontermIdent (NontermIdent, [NontermIdent])
-> Map NontermIdent (NontermIdent, [NontermIdent])
rule738 Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap
         _tlOnr :: Int
_tlOnr = Int -> Int
rule739 Int
_lhsInr
         _tlOnt :: NontermIdent
_tlOnt = NontermIdent -> NontermIdent
rule740 NontermIdent
_lhsInt
         _tlOo_case :: Bool
_tlOo_case = Bool -> Bool
rule741 Bool
_lhsIo_case
         _tlOo_cata :: Bool
_tlOo_cata = Bool -> Bool
rule742 Bool
_lhsIo_cata
         _tlOo_clean :: Bool
_tlOo_clean = Bool -> Bool
rule743 Bool
_lhsIo_clean
         _tlOo_costcentre :: Bool
_tlOo_costcentre = Bool -> Bool
rule744 Bool
_lhsIo_costcentre
         _tlOo_data :: Maybe Bool
_tlOo_data = Maybe Bool -> Maybe Bool
rule745 Maybe Bool
_lhsIo_data
         _tlOo_linePragmas :: Bool
_tlOo_linePragmas = Bool -> Bool
rule746 Bool
_lhsIo_linePragmas
         _tlOo_monadic :: Bool
_tlOo_monadic = Bool -> Bool
rule747 Bool
_lhsIo_monadic
         _tlOo_newtypes :: Bool
_tlOo_newtypes = Bool -> Bool
rule748 Bool
_lhsIo_newtypes
         _tlOo_pretty :: Bool
_tlOo_pretty = Bool -> Bool
rule749 Bool
_lhsIo_pretty
         _tlOo_rename :: Bool
_tlOo_rename = Bool -> Bool
rule750 Bool
_lhsIo_rename
         _tlOo_sem :: Bool
_tlOo_sem = Bool -> Bool
rule751 Bool
_lhsIo_sem
         _tlOo_sig :: Bool
_tlOo_sig = Bool -> Bool
rule752 Bool
_lhsIo_sig
         _tlOo_splitsems :: Bool
_tlOo_splitsems = Bool -> Bool
rule753 Bool
_lhsIo_splitsems
         _tlOo_strictwrap :: Bool
_tlOo_strictwrap = Bool -> Bool
rule754 Bool
_lhsIo_strictwrap
         _tlOo_traces :: Bool
_tlOo_traces = Bool -> Bool
rule755 Bool
_lhsIo_traces
         _tlOo_unbox :: Bool
_tlOo_unbox = Bool -> Bool
rule756 Bool
_lhsIo_unbox
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule757 Options
_lhsIoptions
         _tlOparamInstMap :: Map NontermIdent (NontermIdent, [String])
_tlOparamInstMap = Map NontermIdent (NontermIdent, [String])
-> Map NontermIdent (NontermIdent, [String])
rule758 Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap
         _tlOparamMap :: ParamMap
_tlOparamMap = ParamMap -> ParamMap
rule759 ParamMap
_lhsIparamMap
         _tlOprefix :: String
_tlOprefix = String -> String
rule760 String
_lhsIprefix
         _tlOsyn :: Map NontermIdent Type
_tlOsyn = Map NontermIdent Type -> Map NontermIdent Type
rule761 Map NontermIdent Type
_lhsIsyn
         _tlOterminals :: [NontermIdent]
_tlOterminals = [NontermIdent] -> [NontermIdent]
rule762 [NontermIdent]
_lhsIterminals
         _tlOunfoldSemDom :: NontermIdent -> Int -> [String] -> Type
_tlOunfoldSemDom = (NontermIdent -> Int -> [String] -> Type)
-> NontermIdent -> Int -> [String] -> Type
rule763 NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom
         _tlOvisitedSet :: Set NontermIdent
_tlOvisitedSet = Set NontermIdent -> Set NontermIdent
rule764 Set NontermIdent
_hdIvisitedSet
         _tlOwhat :: String
_tlOwhat = String -> String
rule765 String
_lhsIwhat
         __result_ :: T_Sequence_vOut46
__result_ = Bool
-> DeclBlocks
-> [String]
-> [Decl]
-> [Decl]
-> [NontermIdent]
-> Exprs
-> [Decl]
-> [Type]
-> Set String
-> Set NontermIdent
-> T_Sequence_vOut46
T_Sequence_vOut46 Bool
_lhsOallTpsFound DeclBlocks
_lhsOblockDecls [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet
         in T_Sequence_vOut46
__result_ )
     in T_Sequence_v46 -> T_Sequence_s47
C_Sequence_s47 T_Sequence_v46
v46
   {-# INLINE rule684 #-}
   {-# LINE 631 "src-ag/GenerateCode.ag" #-}
   rule684 = \ ((_hdIbldBlocksFun) :: DeclBlocks -> DeclBlocks) ((_tlIblockDecls) :: DeclBlocks) ->
                         {-# LINE 631 "src-ag/GenerateCode.ag" #-}
                         _hdIbldBlocksFun _tlIblockDecls
                         {-# LINE 4981 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule685 #-}
   rule685 = \ ((_hdIallTpsFound) :: Bool) ((_tlIallTpsFound) :: Bool) ->
     _hdIallTpsFound && _tlIallTpsFound
   {-# INLINE rule686 #-}
   rule686 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->
     _hdIcomments ++ _tlIcomments
   {-# INLINE rule687 #-}
   rule687 = \ ((_hdIdecls) :: Decls) ((_tlIdecls) :: Decls) ->
     _hdIdecls ++ _tlIdecls
   {-# INLINE rule688 #-}
   rule688 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->
     _hdIdefinedInsts ++ _tlIdefinedInsts
   {-# INLINE rule689 #-}
   rule689 = \ ((_hdIexprs) :: Exprs) ((_tlIexprs) :: Exprs) ->
     _hdIexprs ++ _tlIexprs
   {-# INLINE rule690 #-}
   rule690 = \ ((_hdItSigs) :: [Decl]) ((_tlItSigs) :: [Decl]) ->
     _hdItSigs ++ _tlItSigs
   {-# INLINE rule691 #-}
   rule691 = \ ((_hdItps) :: [Type]) ((_tlItps) :: [Type]) ->
     _hdItps ++ _tlItps
   {-# INLINE rule692 #-}
   rule692 = \ ((_hdIusedVars) :: Set String) ((_tlIusedVars) :: Set String) ->
     _hdIusedVars `Set.union` _tlIusedVars
   {-# INLINE rule693 #-}
   rule693 = \ ((_tlIdeclsAbove) :: [Decl]) ->
     _tlIdeclsAbove
   {-# INLINE rule694 #-}
   rule694 = \ ((_tlIvisitedSet) :: Set Identifier) ->
     _tlIvisitedSet
   {-# INLINE rule695 #-}
   rule695 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule696 #-}
   rule696 = \ ((_lhsIaroundMap) :: Set Identifier) ->
     _lhsIaroundMap
   {-# INLINE rule697 #-}
   rule697 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIchildren
   {-# INLINE rule698 #-}
   rule698 = \ ((_lhsIcon) :: ConstructorIdent) ->
     _lhsIcon
   {-# INLINE rule699 #-}
   rule699 = \ ((_lhsIdeclsAbove) :: [Decl]) ->
     _lhsIdeclsAbove
   {-# INLINE rule700 #-}
   rule700 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule701 #-}
   rule701 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->
     _lhsIinstVisitNrs
   {-# INLINE rule702 #-}
   rule702 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule703 #-}
   rule703 = \ ((_lhsInr) :: Int) ->
     _lhsInr
   {-# INLINE rule704 #-}
   rule704 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule705 #-}
   rule705 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule706 #-}
   rule706 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule707 #-}
   rule707 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule708 #-}
   rule708 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule709 #-}
   rule709 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule710 #-}
   rule710 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule711 #-}
   rule711 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule712 #-}
   rule712 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule713 #-}
   rule713 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule714 #-}
   rule714 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule715 #-}
   rule715 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule716 #-}
   rule716 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule717 #-}
   rule717 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule718 #-}
   rule718 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule719 #-}
   rule719 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule720 #-}
   rule720 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule721 #-}
   rule721 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule722 #-}
   rule722 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->
     _lhsIparamInstMap
   {-# INLINE rule723 #-}
   rule723 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule724 #-}
   rule724 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule725 #-}
   rule725 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule726 #-}
   rule726 = \ ((_lhsIterminals) :: [Identifier]) ->
     _lhsIterminals
   {-# INLINE rule727 #-}
   rule727 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule728 #-}
   rule728 = \ ((_lhsIvisitedSet) :: Set Identifier) ->
     _lhsIvisitedSet
   {-# INLINE rule729 #-}
   rule729 = \ ((_lhsIwhat) :: String) ->
     _lhsIwhat
   {-# INLINE rule730 #-}
   rule730 = \ ((_lhsIallNts) :: Set NontermIdent) ->
     _lhsIallNts
   {-# INLINE rule731 #-}
   rule731 = \ ((_lhsIaroundMap) :: Set Identifier) ->
     _lhsIaroundMap
   {-# INLINE rule732 #-}
   rule732 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIchildren
   {-# INLINE rule733 #-}
   rule733 = \ ((_lhsIcon) :: ConstructorIdent) ->
     _lhsIcon
   {-# INLINE rule734 #-}
   rule734 = \ ((_hdIdeclsAbove) :: [Decl]) ->
     _hdIdeclsAbove
   {-# INLINE rule735 #-}
   rule735 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule736 #-}
   rule736 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->
     _lhsIinstVisitNrs
   {-# INLINE rule737 #-}
   rule737 = \ ((_lhsIlastExpr) :: Expr) ->
     _lhsIlastExpr
   {-# INLINE rule738 #-}
   rule738 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule739 #-}
   rule739 = \ ((_lhsInr) :: Int) ->
     _lhsInr
   {-# INLINE rule740 #-}
   rule740 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule741 #-}
   rule741 = \ ((_lhsIo_case) :: Bool) ->
     _lhsIo_case
   {-# INLINE rule742 #-}
   rule742 = \ ((_lhsIo_cata) :: Bool) ->
     _lhsIo_cata
   {-# INLINE rule743 #-}
   rule743 = \ ((_lhsIo_clean) :: Bool) ->
     _lhsIo_clean
   {-# INLINE rule744 #-}
   rule744 = \ ((_lhsIo_costcentre) :: Bool) ->
     _lhsIo_costcentre
   {-# INLINE rule745 #-}
   rule745 = \ ((_lhsIo_data) :: Maybe Bool) ->
     _lhsIo_data
   {-# INLINE rule746 #-}
   rule746 = \ ((_lhsIo_linePragmas) :: Bool) ->
     _lhsIo_linePragmas
   {-# INLINE rule747 #-}
   rule747 = \ ((_lhsIo_monadic) :: Bool) ->
     _lhsIo_monadic
   {-# INLINE rule748 #-}
   rule748 = \ ((_lhsIo_newtypes) :: Bool) ->
     _lhsIo_newtypes
   {-# INLINE rule749 #-}
   rule749 = \ ((_lhsIo_pretty) :: Bool) ->
     _lhsIo_pretty
   {-# INLINE rule750 #-}
   rule750 = \ ((_lhsIo_rename) :: Bool) ->
     _lhsIo_rename
   {-# INLINE rule751 #-}
   rule751 = \ ((_lhsIo_sem) :: Bool) ->
     _lhsIo_sem
   {-# INLINE rule752 #-}
   rule752 = \ ((_lhsIo_sig) :: Bool) ->
     _lhsIo_sig
   {-# INLINE rule753 #-}
   rule753 = \ ((_lhsIo_splitsems) :: Bool) ->
     _lhsIo_splitsems
   {-# INLINE rule754 #-}
   rule754 = \ ((_lhsIo_strictwrap) :: Bool) ->
     _lhsIo_strictwrap
   {-# INLINE rule755 #-}
   rule755 = \ ((_lhsIo_traces) :: Bool) ->
     _lhsIo_traces
   {-# INLINE rule756 #-}
   rule756 = \ ((_lhsIo_unbox) :: Bool) ->
     _lhsIo_unbox
   {-# INLINE rule757 #-}
   rule757 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule758 #-}
   rule758 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->
     _lhsIparamInstMap
   {-# INLINE rule759 #-}
   rule759 = \ ((_lhsIparamMap) :: ParamMap) ->
     _lhsIparamMap
   {-# INLINE rule760 #-}
   rule760 = \ ((_lhsIprefix) :: String) ->
     _lhsIprefix
   {-# INLINE rule761 #-}
   rule761 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule762 #-}
   rule762 = \ ((_lhsIterminals) :: [Identifier]) ->
     _lhsIterminals
   {-# INLINE rule763 #-}
   rule763 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->
     _lhsIunfoldSemDom
   {-# INLINE rule764 #-}
   rule764 = \ ((_hdIvisitedSet) :: Set Identifier) ->
     _hdIvisitedSet
   {-# INLINE rule765 #-}
   rule765 = \ ((_lhsIwhat) :: String) ->
     _lhsIwhat
{-# NOINLINE sem_Sequence_Nil #-}
sem_Sequence_Nil ::  T_Sequence 
sem_Sequence_Nil :: T_Sequence
sem_Sequence_Nil  = Identity T_Sequence_s47 -> T_Sequence
T_Sequence (forall (m :: * -> *) a. Monad m => a -> m a
return T_Sequence_s47
st47) where
   {-# NOINLINE st47 #-}
   st47 :: T_Sequence_s47
st47 = let
      v46 :: T_Sequence_v46 
      v46 :: T_Sequence_v46
v46 = \ (T_Sequence_vIn46 Set NontermIdent
_lhsIallNts Set NontermIdent
_lhsIaroundMap [(NontermIdent, Type, ChildKind)]
_lhsIchildren NontermIdent
_lhsIcon [Decl]
_lhsIdeclsAbove Map NontermIdent Type
_lhsIinh Map NontermIdent Int
_lhsIinstVisitNrs Expr
_lhsIlastExpr Map NontermIdent (NontermIdent, [NontermIdent])
_lhsImergeMap Int
_lhsInr NontermIdent
_lhsInt Bool
_lhsIo_case Bool
_lhsIo_cata Bool
_lhsIo_clean Bool
_lhsIo_costcentre Maybe Bool
_lhsIo_data Bool
_lhsIo_linePragmas Bool
_lhsIo_monadic Bool
_lhsIo_newtypes Bool
_lhsIo_pretty Bool
_lhsIo_rename Bool
_lhsIo_sem Bool
_lhsIo_sig Bool
_lhsIo_splitsems Bool
_lhsIo_strictwrap Bool
_lhsIo_traces Bool
_lhsIo_unbox Options
_lhsIoptions Map NontermIdent (NontermIdent, [String])
_lhsIparamInstMap ParamMap
_lhsIparamMap String
_lhsIprefix Map NontermIdent Type
_lhsIsyn [NontermIdent]
_lhsIterminals NontermIdent -> Int -> [String] -> Type
_lhsIunfoldSemDom Set NontermIdent
_lhsIvisitedSet String
_lhsIwhat) -> ( let
         _lhsOblockDecls :: DeclBlocks
         _lhsOblockDecls :: DeclBlocks
_lhsOblockDecls = [Decl] -> Expr -> DeclBlocks
rule766 [Decl]
_lhsIdeclsAbove Expr
_lhsIlastExpr
         _lhsOallTpsFound :: Bool
         _lhsOallTpsFound :: Bool
_lhsOallTpsFound = () -> Bool
rule767  ()
         _lhsOcomments :: [String]
         _lhsOcomments :: [String]
_lhsOcomments = forall {a}. () -> [a]
rule768  ()
         _lhsOdecls :: Decls
         _lhsOdecls :: [Decl]
_lhsOdecls = forall {a}. () -> [a]
rule769  ()
         _lhsOdefinedInsts :: [Identifier]
         _lhsOdefinedInsts :: [NontermIdent]
_lhsOdefinedInsts = forall {a}. () -> [a]
rule770  ()
         _lhsOexprs :: Exprs
         _lhsOexprs :: Exprs
_lhsOexprs = forall {a}. () -> [a]
rule771  ()
         _lhsOtSigs :: [Decl]
         _lhsOtSigs :: [Decl]
_lhsOtSigs = forall {a}. () -> [a]
rule772  ()
         _lhsOtps :: [Type]
         _lhsOtps :: [Type]
_lhsOtps = forall {a}. () -> [a]
rule773  ()
         _lhsOusedVars :: Set String
         _lhsOusedVars :: Set String
_lhsOusedVars = forall {a}. () -> Set a
rule774  ()
         _lhsOdeclsAbove :: [Decl]
         _lhsOdeclsAbove :: [Decl]
_lhsOdeclsAbove = [Decl] -> [Decl]
rule775 [Decl]
_lhsIdeclsAbove
         _lhsOvisitedSet :: Set Identifier
         _lhsOvisitedSet :: Set NontermIdent
_lhsOvisitedSet = Set NontermIdent -> Set NontermIdent
rule776 Set NontermIdent
_lhsIvisitedSet
         __result_ :: T_Sequence_vOut46
__result_ = Bool
-> DeclBlocks
-> [String]
-> [Decl]
-> [Decl]
-> [NontermIdent]
-> Exprs
-> [Decl]
-> [Type]
-> Set String
-> Set NontermIdent
-> T_Sequence_vOut46
T_Sequence_vOut46 Bool
_lhsOallTpsFound DeclBlocks
_lhsOblockDecls [String]
_lhsOcomments [Decl]
_lhsOdecls [Decl]
_lhsOdeclsAbove [NontermIdent]
_lhsOdefinedInsts Exprs
_lhsOexprs [Decl]
_lhsOtSigs [Type]
_lhsOtps Set String
_lhsOusedVars Set NontermIdent
_lhsOvisitedSet
         in T_Sequence_vOut46
__result_ )
     in T_Sequence_v46 -> T_Sequence_s47
C_Sequence_s47 T_Sequence_v46
v46
   {-# INLINE rule766 #-}
   {-# LINE 633 "src-ag/GenerateCode.ag" #-}
   rule766 = \ ((_lhsIdeclsAbove) :: [Decl]) ((_lhsIlastExpr) :: Expr) ->
                         {-# LINE 633 "src-ag/GenerateCode.ag" #-}
                         DeclTerminator _lhsIdeclsAbove _lhsIlastExpr
                         {-# LINE 5262 "src-generated/GenerateCode.hs" #-}
   {-# INLINE rule767 #-}
   rule767 = \  (_ :: ()) ->
     True
   {-# INLINE rule768 #-}
   rule768 = \  (_ :: ()) ->
     []
   {-# INLINE rule769 #-}
   rule769 = \  (_ :: ()) ->
     []
   {-# INLINE rule770 #-}
   rule770 = \  (_ :: ()) ->
     []
   {-# INLINE rule771 #-}
   rule771 = \  (_ :: ()) ->
     []
   {-# INLINE rule772 #-}
   rule772 = \  (_ :: ()) ->
     []
   {-# INLINE rule773 #-}
   rule773 = \  (_ :: ()) ->
     []
   {-# INLINE rule774 #-}
   rule774 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule775 #-}
   rule775 = \ ((_lhsIdeclsAbove) :: [Decl]) ->
     _lhsIdeclsAbove
   {-# INLINE rule776 #-}
   rule776 = \ ((_lhsIvisitedSet) :: Set Identifier) ->
     _lhsIvisitedSet