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

module ExecutionPlan2Hs where
{-# LINE 2 "src-ag/HsToken.ag" #-}

import CommonTypes
import UU.Scanner.Position(Pos)
{-# LINE 10 "src-generated/ExecutionPlan2Hs.hs" #-}

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

import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 16 "src-generated/ExecutionPlan2Hs.hs" #-}

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

-- Patterns.ag imports

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

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

-- VisitSyntax.ag imports

import Patterns    (Pattern(..),Patterns)
import Expression  (Expression(..))
import CommonTypes
import ErrorMessages

import qualified Data.Set as Set
import Data.Set(Set)
import qualified Data.Map as Map
import Data.Map(Map)
{-# LINE 37 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 7 "src-ag/ExecutionPlan2Hs.ag" #-}

import ExecutionPlan
import Pretty
import PPUtil
import Options
import Data.Monoid(mappend,mempty)
import Data.Maybe
import Debug.Trace
import System.IO
import System.Directory
import System.FilePath
import UU.Scanner.Position

import TokenDef
import HsToken
import ErrorMessages

import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Sequence(Seq)
import qualified Data.Sequence as Seq
import Data.Foldable(toList)
{-# LINE 64 "src-generated/ExecutionPlan2Hs.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 163 "src-ag/ExecutionPlan2Hs.ag" #-}

classCtxsToDocs :: ClassContext -> [PP_Doc]
classCtxsToDocs = map toDoc where
  toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))

classConstrsToDocs :: [Type] -> [PP_Doc]
classConstrsToDocs = map ppTp

ppClasses :: [PP_Doc] -> PP_Doc
ppClasses [] = empty
ppClasses xs = pp_block "(" ")" "," xs >#< "=>"

ppQuants :: [Identifier] -> PP_Doc
ppQuants [] = empty
ppQuants ps = "forall" >#< ppSpaced ps >#< "."
{-# LINE 83 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 192 "src-ag/ExecutionPlan2Hs.ag" #-}

-- first parameter indicates: generate a record or not

ppConFields :: Bool -> [PP_Doc] -> PP_Doc
ppConFields True  flds = ppListSep "{" "}" ", " $ filter (not . isEmpty) flds
ppConFields False flds = ppSpaced flds
{-# LINE 91 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 218 "src-ag/ExecutionPlan2Hs.ag" #-}

ppTp :: Type -> PP_Doc
ppTp = text . typeToHaskellString Nothing []
{-# LINE 97 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 332 "src-ag/ExecutionPlan2Hs.ag" #-}
type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)
{-# LINE 101 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 428 "src-ag/ExecutionPlan2Hs.ag" #-}

conNmTVisit nt vId      = "T_" >|< nt >|< "_v"    >|< vId
conNmTVisitIn nt vId    = "T_" >|< nt >|< "_vIn"  >|< vId
conNmTVisitOut nt vId   = "T_" >|< nt >|< "_vOut" >|< vId
conNmTNextVisit nt stId = "T_" >|< nt >|< "_s"    >|< stId

ppMonadType :: Options -> PP_Doc
ppMonadType opts
  | parallelInvoke opts = text "IO"
  | otherwise           = text "Identity"
{-# LINE 114 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 589 "src-ag/ExecutionPlan2Hs.ag" #-}

ppDefor :: Type -> PP_Doc
ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)
ppDefor (Haskell s)    = text s
{-# LINE 121 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 713 "src-ag/ExecutionPlan2Hs.ag" #-}

mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc
mklet prefix defs body =
  prefix >#< "let"
  >-< indent 3 defs
  >-< indent 2 "in" >#< body
{-# LINE 130 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 779 "src-ag/ExecutionPlan2Hs.ag" #-}

resultValName :: String
resultValName = "__result_"

nextStName :: String
nextStName = "__st_"
{-# LINE 139 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 850 "src-ag/ExecutionPlan2Hs.ag" #-}

parResultName :: String
parResultName = "__outcome_"

fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc
fmtDecl declPure fmt decl = case fmt of
  FormatLetDecl -> pp decl
  FormatLetLine -> "let" >#< decl >#< "in"
  FormatDo | declPure  -> "let" >#< decl
           | otherwise -> pp decl
{-# LINE 152 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 976 "src-ag/ExecutionPlan2Hs.ag" #-}

stname :: Identifier -> Int -> String
stname child st = "_" ++ getName child ++ "X" ++ show st

-- should actually return some conversion info

compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool
compatibleAttach _ _ _ = True

unMon :: Options -> PP_Doc
unMon options
  | parallelInvoke options = text "System.IO.Unsafe.unsafePerformIO"    -- IO monad

  | otherwise              = text "Control.Monad.Identity.runIdentity"  -- identity monad

{-# LINE 167 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1084 "src-ag/ExecutionPlan2Hs.ag" #-}

dummyPat :: Options -> Bool -> PP_Doc
dummyPat opts noArgs
  | not noArgs && tupleAsDummyToken opts = empty  -- no unnecessary tuples

  | tupleAsDummyToken opts = if strictDummyToken opts
                             then text "()"
                             else text "(_ :: ())"
  | otherwise              = let match | strictDummyToken opts = "!_"
                                       | otherwise             = "_"
                             in pp_parens (match >#< "::" >#< dummyType opts noArgs)
  where match | strictDummyToken opts = "(!_)"
              | otherwise             = "_"

dummyArg :: Options -> Bool -> PP_Doc
dummyArg opts noArgs
  | not noArgs && tupleAsDummyToken opts = empty    -- no unnecessary tuples

  | tupleAsDummyToken opts = text "()"
  | otherwise              = text "GHC.Prim.realWorld#"

dummyType :: Options -> Bool -> PP_Doc
dummyType opts noArgs
  | not noArgs && tupleAsDummyToken opts = empty     -- no unnecessary tuples

  | tupleAsDummyToken opts = text "()"
  | otherwise              = text "(GHC.Prim.State# GHC.Prim.RealWorld)"
{-# LINE 194 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1110 "src-ag/ExecutionPlan2Hs.ag" #-}

-- rules are "deinlined" to prevent needless code duplication.

-- if there is only a bit of duplication, we allow ghc to decide if it is worth it.

-- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.

ruleInlineThresholdSoft :: Int
ruleInlineThresholdSoft = 3

ruleInlineThresholdHard :: Int
ruleInlineThresholdHard = 5

reallyOftenUsedThreshold :: Int
reallyOftenUsedThreshold = 12
{-# LINE 209 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1176 "src-ag/ExecutionPlan2Hs.ag" #-}

data NonLocalAttr
  = AttrInh Identifier Identifier
  | AttrSyn Identifier Identifier deriving Show

mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr
mkNonLocalAttr True  = AttrInh  -- True: inherited attr

mkNonLocalAttr False = AttrSyn

lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc
lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs
lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns

-- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that

-- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.

-- However, for now we simply decide to return Nothing in this case, which skips the type annotation.

lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc
lookupType child name attrMp childMp
  | noParameters childTp = Just ppDoc
  | otherwise            = Nothing
  where
    attrTp     = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs
    childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp
    nonterm    = extractNonterminal childTp
    childTp    = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp
    ppDoc      = ppTp attrTp

noParameters :: Type -> Bool
noParameters (Haskell _)   = True
noParameters (NT _ args _) = null args
{-# LINE 242 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1263 "src-ag/ExecutionPlan2Hs.ag" #-}

-- a `compatibleKind` b  means: can kind b be invoked from a

compatibleKind :: VisitKind -> VisitKind -> Bool
compatibleKind _              _             = True

compatibleRule :: VisitKind -> Bool -> Bool
compatibleRule (VisitPure _) False = False
compatibleRule _             _     = True
{-# LINE 253 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1285 "src-ag/ExecutionPlan2Hs.ag" #-}

unionWithSum = Map.unionWith (+)
{-# LINE 258 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1308 "src-ag/ExecutionPlan2Hs.ag" #-}

uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)
uwSetUnion = Map.unionWith Set.union

uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)
uwMapUnion = Map.unionWith Map.union
{-# LINE 267 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1525 "src-ag/ExecutionPlan2Hs.ag" #-}

renderDocs :: [PP_Doc] -> String
renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""

writeModule :: FilePath -> [PP_Doc] -> IO ()
writeModule path docs
  = do bExists <- doesFileExist path
       if bExists
        then do input <- readFile path
                seq (length input) (return ())
                if input /= output
                 then dumpIt
                 else return ()
        else dumpIt
  where
    output = renderDocs docs
    dumpIt = writeFile path output
{-# LINE 287 "src-generated/ExecutionPlan2Hs.hs" #-}

{-# LINE 1672 "src-ag/ExecutionPlan2Hs.ag" #-}

ppNoInline :: PP a => a -> PP_Doc
ppNoInline = ppPragmaBinding "NOINLINE"

ppInline :: PP a => a -> PP_Doc
ppInline = ppPragmaBinding "INLINE"

ppInlinable :: PP a => a -> PP_Doc
ppInlinable = ppPragmaBinding "INLINABLE"

ppPragmaBinding :: (PP a, PP b) => a -> b -> PP_Doc
ppPragmaBinding pragma nm = "{-#" >#< pragma >#< nm >#< "#-}"

ppCostCentre :: PP a => a -> PP_Doc
ppCostCentre nm = "{-#" >#< "SCC" >#< "\"" >|< nm >|< "\"" >#< "#-}"

warrenFlagsPP :: Options -> PP_Doc
warrenFlagsPP options = vlist
  [ pp "{-# LANGUAGE Rank2Types, GADTs #-}"
  , if bangpats options
    then pp "{-# LANGUAGE BangPatterns #-}"
    else empty
  , if noPerRuleTypeSigs options && noPerStateTypeSigs options
    then empty
    else pp "{-# LANGUAGE ScopedTypeVariables #-}"
  , if tupleAsDummyToken options
    then empty
    else pp "{-# LANGUAGE ScopedTypeVariables, MagicHash #-}"
  , -- not that the meaning of "unbox" is here that strict fields in data types may be

    -- unboxed if possible. This may affect user-defined data types declared in the module.

    -- Unfortunately, we cannot turn it on for only the AG generated data types without

    -- causing a zillion of warnings.

    if unbox options && bangpats options
        then pp $ "{-# OPTIONS_GHC -funbox-strict-fields -fstrictness #-}"
        else empty
  , if parallelInvoke options && not (noEagerBlackholing options)
    then pp $ "{-# OPTIONS_GHC -feager-blackholing #-}"
    else empty
  ]
{-# LINE 329 "src-generated/ExecutionPlan2Hs.hs" #-}
-- EChild ------------------------------------------------------
-- wrapper
data Inh_EChild  = Inh_EChild { Inh_EChild -> Map Identifier Int
allInitStates_Inh_EChild :: (Map NontermIdent Int), Inh_EChild -> Identifier
con_Inh_EChild :: (ConstructorIdent), Inh_EChild -> PP_Doc
importBlocks_Inh_EChild :: (PP_Doc), Inh_EChild -> [Char]
mainFile_Inh_EChild :: (String), Inh_EChild -> [Char]
mainName_Inh_EChild :: (String), Inh_EChild -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String), Inh_EChild -> Identifier
nt_Inh_EChild :: (NontermIdent), Inh_EChild -> Options
options_Inh_EChild :: (Options), Inh_EChild -> [Char]
pragmaBlocks_Inh_EChild :: (String), Inh_EChild -> PP_Doc
textBlocks_Inh_EChild :: (PP_Doc) }
data Syn_EChild  = Syn_EChild { Syn_EChild -> PP_Doc
argnamesw_Syn_EChild :: ( PP_Doc ), Syn_EChild -> PP_Doc
argpats_Syn_EChild :: (  PP_Doc  ), Syn_EChild -> PP_Doc
argtps_Syn_EChild :: (  PP_Doc  ), Syn_EChild -> Attributes
childTypes_Syn_EChild :: (Map Identifier Type), Syn_EChild
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Syn_EChild -> PP_Doc
datatype_Syn_EChild :: (PP_Doc), Syn_EChild -> Set [Char]
terminaldefs_Syn_EChild :: (Set String), Syn_EChild -> Set [Char]
usedArgs_Syn_EChild :: (Set String) }
{-# INLINABLE wrap_EChild #-}
wrap_EChild :: T_EChild  -> Inh_EChild  -> (Syn_EChild )
wrap_EChild :: T_EChild -> Inh_EChild -> Syn_EChild
wrap_EChild (T_EChild Identity T_EChild_s2
act) (Inh_EChild Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks) =
   Identity Syn_EChild -> Syn_EChild
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_EChild_s2
sem <- Identity T_EChild_s2
act
        let arg1 :: T_EChild_vIn1
arg1 = Map Identifier Int
-> Identifier
-> PP_Doc
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> PP_Doc
-> T_EChild_vIn1
T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks
        (T_EChild_vOut1 PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs) <- T_EChild_vOut1 -> Identity T_EChild_vOut1
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 T_EChild_s2
sem T_EChild_vIn1
arg1)
        Syn_EChild -> Identity Syn_EChild
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc
-> PP_Doc
-> PP_Doc
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Set [Char]
-> Set [Char]
-> Syn_EChild
Syn_EChild PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs)
   )

-- cata
{-# NOINLINE sem_EChild #-}
sem_EChild :: EChild  -> T_EChild 
sem_EChild :: EChild -> T_EChild
sem_EChild ( EChild Identifier
name_ Type
tp_ ChildKind
kind_ Bool
hasAround_ Maybe [Identifier]
merges_ Bool
isMerged_ ) = Identifier
-> Type
-> ChildKind
-> Bool
-> Maybe [Identifier]
-> Bool
-> T_EChild
sem_EChild_EChild Identifier
name_ Type
tp_ ChildKind
kind_ Bool
hasAround_ Maybe [Identifier]
merges_ Bool
isMerged_
sem_EChild ( ETerm Identifier
name_ Type
tp_ ) = Identifier -> Type -> T_EChild
sem_EChild_ETerm Identifier
name_ Type
tp_

-- semantic domain
newtype T_EChild  = T_EChild {
                             T_EChild -> Identity T_EChild_s2
attach_T_EChild :: Identity (T_EChild_s2 )
                             }
newtype T_EChild_s2  = C_EChild_s2 {
                                   T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 :: (T_EChild_v1 )
                                   }
data T_EChild_s3  = C_EChild_s3
type T_EChild_v1  = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )
data T_EChild_vIn1  = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (PP_Doc)
data T_EChild_vOut1  = T_EChild_vOut1 ( PP_Doc ) (  PP_Doc  ) (  PP_Doc  ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Set String) (Set String)
{-# NOINLINE sem_EChild_EChild #-}
sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild 
sem_EChild_EChild :: Identifier
-> Type
-> ChildKind
-> Bool
-> Maybe [Identifier]
-> Bool
-> T_EChild
sem_EChild_EChild Identifier
arg_name_ Type
arg_tp_ ChildKind
arg_kind_ Bool
arg_hasAround_ Maybe [Identifier]
_ Bool
_ = Identity T_EChild_s2 -> T_EChild
T_EChild (T_EChild_s2 -> Identity T_EChild_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChild_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_EChild_s2
st2 = let
      v1 :: T_EChild_v1 
      v1 :: T_EChild_v1
v1 = \ (T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks) -> ( let
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = (Set [Char] -> Set [Char]) -> Set [Char] -> Set [Char]
forall a. (a -> a) -> a -> a
rule0 Set [Char] -> Set [Char]
_usedArgs_augmented_f1 Set [Char]
forall a. Set a
_usedArgs_augmented_syn
         _usedArgs_augmented_f1 :: Set [Char] -> Set [Char]
_usedArgs_augmented_f1 = ChildKind -> Identifier -> Set [Char] -> Set [Char]
rule1 ChildKind
arg_kind_ Identifier
arg_name_
         _tpDoc :: PP_Doc
_tpDoc = (PP_Doc -> PP_Doc) -> Type -> PP_Doc
forall t. (PP_Doc -> t) -> Type -> t
rule2 PP_Doc -> PP_Doc
_addStrict Type
arg_tp_
         _strNm :: [Char]
_strNm = Identifier -> Identifier -> Identifier -> [Char]
rule3 Identifier
_lhsIcon Identifier
_lhsInt Identifier
arg_name_
         _field :: PP_Doc
_field = Options -> [Char] -> PP_Doc -> PP_Doc
rule4 Options
_lhsIoptions [Char]
_strNm PP_Doc
_tpDoc
         _addStrict :: PP_Doc -> PP_Doc
_addStrict = Options -> PP_Doc -> PP_Doc
rule5 Options
_lhsIoptions
         _lhsOdatatype :: PP_Doc
         _lhsOdatatype :: PP_Doc
_lhsOdatatype = PP_Doc -> ChildKind -> PP_Doc
rule6 PP_Doc
_field ChildKind
arg_kind_
         _lhsOargnamesw ::  PP_Doc 
         _lhsOargnamesw :: PP_Doc
_lhsOargnamesw = Identifier -> ChildKind -> Identifier -> PP_Doc
rule7 Identifier
_nt ChildKind
arg_kind_ Identifier
arg_name_
         _lhsOargtps ::   PP_Doc  
         _lhsOargtps :: PP_Doc
_lhsOargtps = ChildKind -> Type -> PP_Doc
rule8 ChildKind
arg_kind_ Type
arg_tp_
         _argpats :: PP_Doc
_argpats = ChildKind -> Identifier -> PP_Doc
rule9 ChildKind
arg_kind_ Identifier
arg_name_
         _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
         _lhsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = (VisitKind
 -> FormatMode
 -> Either
      Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall a k. a -> k -> Map k a
rule10 VisitKind
-> FormatMode
-> Either
     Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_introcode Identifier
arg_name_
         _isDefor :: Bool
_isDefor = Type -> Bool
rule11 Type
arg_tp_
         _valcode :: PP_Doc
_valcode = Bool -> Options -> Identifier -> ChildKind -> Identifier -> PP_Doc
rule12 Bool
_isDefor Options
_lhsIoptions Identifier
_nt ChildKind
arg_kind_ Identifier
arg_name_
         _aroundcode :: PP_Doc
_aroundcode = Options -> Bool -> Identifier -> PP_Doc
rule13 Options
_lhsIoptions Bool
arg_hasAround_ Identifier
arg_name_
         _introcode :: VisitKind
-> FormatMode
-> Either
     Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_introcode = (PP_Doc -> PP_Doc)
-> PP_Doc
-> Int
-> Bool
-> Options
-> Identifier
-> PP_Doc
-> Bool
-> ChildKind
-> Identifier
-> VisitKind
-> FormatMode
-> Either
     Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
rule14 PP_Doc -> PP_Doc
_addbang PP_Doc
_aroundcode Int
_initSt Bool
_isDefor Options
_lhsIoptions Identifier
_nt PP_Doc
_valcode Bool
arg_hasAround_ ChildKind
arg_kind_ Identifier
arg_name_
         _nt :: Identifier
_nt = Type -> Identifier
rule15 Type
arg_tp_
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule16 Options
_lhsIoptions
         _lhsOchildTypes :: Map Identifier Type
         _lhsOchildTypes :: Attributes
_lhsOchildTypes = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule17 Identifier
arg_name_ Type
arg_tp_
         _initSt :: Int
_initSt = Map Identifier Int -> Identifier -> Int
rule18 Map Identifier Int
_lhsIallInitStates Identifier
_nt
         _lhsOterminaldefs :: Set String
         _lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = () -> Set [Char]
forall a. () -> Set a
rule19  ()
         _usedArgs_augmented_syn :: Set a
_usedArgs_augmented_syn = () -> Set a
forall a. () -> Set a
rule20  ()
         _lhsOargpats ::   PP_Doc  
         _lhsOargpats :: PP_Doc
_lhsOargpats = PP_Doc -> PP_Doc
forall a. a -> a
rule21 PP_Doc
_argpats
         __result_ :: T_EChild_vOut1
__result_ = PP_Doc
-> PP_Doc
-> PP_Doc
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Set [Char]
-> Set [Char]
-> T_EChild_vOut1
T_EChild_vOut1 PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs
         in T_EChild_vOut1
__result_ )
     in T_EChild_v1 -> T_EChild_s2
C_EChild_s2 T_EChild_v1
v1
   {-# INLINE rule0 #-}
   rule0 :: (a -> a) -> a -> a
rule0 = \ a -> a
_usedArgs_augmented_f1 a
_usedArgs_augmented_syn ->
     ((a -> a) -> a -> a) -> a -> [a -> a] -> a
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (a -> a) -> a -> a
forall a b. (a -> b) -> a -> b
($) a
_usedArgs_augmented_syn [a -> a
_usedArgs_augmented_f1]
   {-# INLINE rule1 #-}
   rule1 :: ChildKind -> Identifier -> Set [Char] -> Set [Char]
rule1 = \ ChildKind
kind_ Identifier
name_ ->
                         \Set [Char]
s -> case ChildKind
kind_ of
                               ChildKind
ChildSyntax -> [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => a -> Set a -> Set a
Set.insert ([Char]
"arg_" [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ Identifier -> [Char]
forall a. Show a => a -> [Char]
show Identifier
name_ [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
"_") Set [Char]
s
                               ChildKind
_           -> Set [Char]
s
   {-# INLINE rule2 #-}
   {-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule2 = \ _addStrict tp_ ->
                     {-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}
                     _addStrict     $ pp_parens $ ppTp $ removeDeforested tp_
                     {-# LINE 414 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule3 #-}
   {-# LINE 207 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule3 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->
                     {-# LINE 207 "src-ag/ExecutionPlan2Hs.ag" #-}
                     recordFieldname _lhsInt _lhsIcon name_
                     {-# LINE 420 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule4 #-}
   {-# LINE 208 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule4 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->
                     {-# LINE 208 "src-ag/ExecutionPlan2Hs.ag" #-}
                     if dataRecords _lhsIoptions
                     then _strNm     >#< "::" >#< _tpDoc
                     else _tpDoc
                     {-# LINE 428 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule5 #-}
   {-# LINE 211 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule5 = \ ((_lhsIoptions) :: Options) ->
                        {-# LINE 211 "src-ag/ExecutionPlan2Hs.ag" #-}
                        \x -> if strictData _lhsIoptions then "!" >|< x else x
                        {-# LINE 434 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule6 #-}
   {-# LINE 212 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule6 = \ _field kind_ ->
                             {-# LINE 212 "src-ag/ExecutionPlan2Hs.ag" #-}
                             case kind_ of
                               ChildAttr -> empty
                               _         -> _field
                             {-# LINE 442 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule7 #-}
   {-# LINE 300 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule7 = \ _nt kind_ name_ ->
                             {-# LINE 300 "src-ag/ExecutionPlan2Hs.ag" #-}
                             case kind_ of
                               ChildSyntax     -> "(" >#< "sem_" >|< _nt     >#< name_ >|< "_" >#< ")"
                               ChildAttr       -> empty
                               ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"
                             {-# LINE 451 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule8 #-}
   {-# LINE 578 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule8 = \ kind_ tp_ ->
                            {-# LINE 578 "src-ag/ExecutionPlan2Hs.ag" #-}
                            case kind_ of
                              ChildSyntax     -> ppDefor tp_ >#< "->"
                              ChildReplace tp -> ppDefor tp >#< "->"
                              _               -> empty
                            {-# LINE 460 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule9 #-}
   {-# LINE 582 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule9 = \ kind_ name_ ->
                           {-# LINE 582 "src-ag/ExecutionPlan2Hs.ag" #-}
                           case kind_ of
                             ChildSyntax    -> name_ >|< "_"
                             ChildReplace _ -> name_ >|< "_"
                             _              -> empty
                           {-# LINE 469 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule10 #-}
   {-# LINE 930 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule10 = \ _introcode name_ ->
                               {-# LINE 930 "src-ag/ExecutionPlan2Hs.ag" #-}
                               Map.singleton name_ _introcode
                               {-# LINE 475 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule11 #-}
   {-# LINE 931 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule11 = \ tp_ ->
                               {-# LINE 931 "src-ag/ExecutionPlan2Hs.ag" #-}
                               case tp_ of
                                 NT _ _ defor -> defor
                                 _            -> False
                               {-# LINE 483 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule12 #-}
   {-# LINE 934 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule12 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->
                               {-# LINE 934 "src-ag/ExecutionPlan2Hs.ag" #-}
                               case kind_ of
                                 ChildSyntax -> "arg_" >|< name_ >|< "_"
                                 ChildAttr   ->
                                                let prefix | not _isDefor     = if lateHigherOrderBinding _lhsIoptions
                                                                                then lateSemNtLabel _nt     >#< lhsname _lhsIoptions True idLateBindingAttr
                                                                                else "sem_" >|< _nt
                                                           | otherwise        = empty
                                                in pp_parens (prefix >#< instname name_)
                                 ChildReplace _ ->
                                                   pp_parens (instname name_ >#< name_ >|< "_")
                               {-# LINE 498 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule13 #-}
   {-# LINE 945 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule13 = \ ((_lhsIoptions) :: Options) hasAround_ name_ ->
                               {-# LINE 945 "src-ag/ExecutionPlan2Hs.ag" #-}
                               if hasAround_
                               then locname _lhsIoptions name_ >|< "_around"
                               else empty
                               {-# LINE 506 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule14 #-}
   {-# LINE 948 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule14 = \ _addbang _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->
                               {-# LINE 948 "src-ag/ExecutionPlan2Hs.ag" #-}
                               \kind fmtMode ->
                                        let pat       = text $ stname name_ _initSt
                                            patStrict = _addbang     pat
                                            attach    = "attach_T_" >|< _nt     >#< pp_parens (_aroundcode     >#< _valcode    )
                                            runAttach = unMon _lhsIoptions >#< pp_parens attach
                                            decl      = case kind of
                                                          VisitPure False -> pat >#< "=" >#< runAttach
                                                          VisitPure True  -> patStrict >#< "=" >#< runAttach
                                                          VisitMonadic    -> patStrict >#< "<-" >#< attach
                                        in if compatibleAttach kind _nt     _lhsIoptions
                                           then Right ( fmtDecl False fmtMode decl
                                                      , Set.singleton (stname name_ _initSt    )
                                                      , case kind_ of
                                                          ChildAttr   -> Map.insert (instname name_) Nothing $
                                                                           ( if _isDefor     || not (lateHigherOrderBinding _lhsIoptions)
                                                                             then id
                                                                             else Map.insert (lhsname _lhsIoptions True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)
                                                                           ) $
                                                                           ( if hasAround_
                                                                             then Map.insert (locname _lhsIoptions (name_) ++ "_around") Nothing
                                                                             else id
                                                                           ) $ Map.empty
                                                          ChildReplace _ -> Map.singleton (instname name_) Nothing
                                                          ChildSyntax    -> Map.empty
                                                      )
                                           else Left $ IncompatibleAttachKind name_ kind
                               {-# LINE 537 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule15 #-}
   {-# LINE 974 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule15 = \ tp_ ->
                            {-# LINE 974 "src-ag/ExecutionPlan2Hs.ag" #-}
                            extractNonterminal tp_
                            {-# LINE 543 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule16 #-}
   {-# LINE 1553 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule16 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1553 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 549 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule17 #-}
   {-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule17 = \ name_ tp_ ->
                     {-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}
                     Map.singleton name_ tp_
                     {-# LINE 555 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule18 #-}
   {-# LINE 1649 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule18 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->
                 {-# LINE 1649 "src-ag/ExecutionPlan2Hs.ag" #-}
                 Map.findWithDefault (error "nonterminal not in allInitStates map") _nt     _lhsIallInitStates
                 {-# LINE 561 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule19 #-}
   rule19 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule20 #-}
   rule20 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule21 #-}
   rule21 = \ _argpats ->
     _argpats
{-# NOINLINE sem_EChild_ETerm #-}
sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild 
sem_EChild_ETerm :: Identifier -> Type -> T_EChild
sem_EChild_ETerm Identifier
arg_name_ Type
arg_tp_ = Identity T_EChild_s2 -> T_EChild
T_EChild (T_EChild_s2 -> Identity T_EChild_s2
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChild_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_EChild_s2
st2 = let
      v1 :: T_EChild_v1 
      v1 :: T_EChild_v1
v1 = \ (T_EChild_vIn1 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks) -> ( let
         _tpDoc :: PP_Doc
_tpDoc = (PP_Doc -> PP_Doc) -> Type -> PP_Doc
forall t. (PP_Doc -> t) -> Type -> t
rule22 PP_Doc -> PP_Doc
_addStrict Type
arg_tp_
         _strNm :: [Char]
_strNm = Identifier -> Identifier -> Identifier -> [Char]
rule23 Identifier
_lhsIcon Identifier
_lhsInt Identifier
arg_name_
         _field :: PP_Doc
_field = Options -> [Char] -> PP_Doc -> PP_Doc
rule24 Options
_lhsIoptions [Char]
_strNm PP_Doc
_tpDoc
         _addStrict :: PP_Doc -> PP_Doc
_addStrict = Options -> PP_Doc -> PP_Doc
rule25 Options
_lhsIoptions
         _lhsOdatatype :: PP_Doc
         _lhsOdatatype :: PP_Doc
_lhsOdatatype = PP_Doc -> PP_Doc
forall a. a -> a
rule26 PP_Doc
_field
         _lhsOargnamesw ::  PP_Doc 
         _lhsOargnamesw :: PP_Doc
_lhsOargnamesw = Identifier -> PP_Doc
rule27 Identifier
arg_name_
         _lhsOargtps ::   PP_Doc  
         _lhsOargtps :: PP_Doc
_lhsOargtps = Type -> PP_Doc
rule28 Type
arg_tp_
         _argpats :: PP_Doc
_argpats = (PP_Doc -> PP_Doc) -> Identifier -> PP_Doc
forall t. (PP_Doc -> t) -> Identifier -> t
rule29 PP_Doc -> PP_Doc
_addbang Identifier
arg_name_
         _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
         _lhsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = Identifier
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall k p p a a k a.
k -> Map k (p -> p -> Either a (PP_Doc, Set a, Map k a))
rule30 Identifier
arg_name_
         _lhsOterminaldefs :: Set String
         _lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = Identifier -> Set [Char]
rule31 Identifier
arg_name_
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule32 Options
_lhsIoptions
         _lhsOchildTypes :: Map Identifier Type
         _lhsOchildTypes :: Attributes
_lhsOchildTypes = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule33 Identifier
arg_name_ Type
arg_tp_
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule34  ()
         _lhsOargpats ::   PP_Doc  
         _lhsOargpats :: PP_Doc
_lhsOargpats = PP_Doc -> PP_Doc
forall a. a -> a
rule35 PP_Doc
_argpats
         __result_ :: T_EChild_vOut1
__result_ = PP_Doc
-> PP_Doc
-> PP_Doc
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> PP_Doc
-> Set [Char]
-> Set [Char]
-> T_EChild_vOut1
T_EChild_vOut1 PP_Doc
_lhsOargnamesw PP_Doc
_lhsOargpats PP_Doc
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros PP_Doc
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs
         in T_EChild_vOut1
__result_ )
     in T_EChild_v1 -> T_EChild_s2
C_EChild_s2 T_EChild_v1
v1
   {-# INLINE rule22 #-}
   {-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule22 = \ _addStrict tp_ ->
                     {-# LINE 206 "src-ag/ExecutionPlan2Hs.ag" #-}
                     _addStrict     $ pp_parens $ ppTp $ removeDeforested tp_
                     {-# LINE 608 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule23 #-}
   {-# LINE 207 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule23 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->
                     {-# LINE 207 "src-ag/ExecutionPlan2Hs.ag" #-}
                     recordFieldname _lhsInt _lhsIcon name_
                     {-# LINE 614 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule24 #-}
   {-# LINE 208 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule24 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->
                     {-# LINE 208 "src-ag/ExecutionPlan2Hs.ag" #-}
                     if dataRecords _lhsIoptions
                     then _strNm     >#< "::" >#< _tpDoc
                     else _tpDoc
                     {-# LINE 622 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule25 #-}
   {-# LINE 211 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule25 = \ ((_lhsIoptions) :: Options) ->
                        {-# LINE 211 "src-ag/ExecutionPlan2Hs.ag" #-}
                        \x -> if strictData _lhsIoptions then "!" >|< x else x
                        {-# LINE 628 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule26 #-}
   {-# LINE 216 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule26 = \ _field ->
                             {-# LINE 216 "src-ag/ExecutionPlan2Hs.ag" #-}
                             _field
                             {-# LINE 634 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule27 #-}
   {-# LINE 304 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule27 = \ name_ ->
                             {-# LINE 304 "src-ag/ExecutionPlan2Hs.ag" #-}
                             text $ fieldname name_
                             {-# LINE 640 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule28 #-}
   {-# LINE 586 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule28 = \ tp_ ->
                           {-# LINE 586 "src-ag/ExecutionPlan2Hs.ag" #-}
                           (pp_parens $ show tp_) >#< "->"
                           {-# LINE 646 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule29 #-}
   {-# LINE 587 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule29 = \ _addbang name_ ->
                           {-# LINE 587 "src-ag/ExecutionPlan2Hs.ag" #-}
                           _addbang     $ text $ fieldname name_
                           {-# LINE 652 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule30 #-}
   {-# LINE 929 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule30 = \ name_ ->
                               {-# LINE 929 "src-ag/ExecutionPlan2Hs.ag" #-}
                               Map.singleton name_ (\_ _ -> Right (empty, Set.empty, Map.empty))
                               {-# LINE 658 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule31 #-}
   {-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule31 = \ name_ ->
                       {-# LINE 1322 "src-ag/ExecutionPlan2Hs.ag" #-}
                       Set.singleton $ fieldname name_
                       {-# LINE 664 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule32 #-}
   {-# LINE 1554 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule32 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1554 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 670 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule33 #-}
   {-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule33 = \ name_ tp_ ->
                     {-# LINE 1605 "src-ag/ExecutionPlan2Hs.ag" #-}
                     Map.singleton name_ tp_
                     {-# LINE 676 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule34 #-}
   rule34 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule35 #-}
   rule35 = \ _argpats ->
     _argpats

-- EChildren ---------------------------------------------------
-- wrapper
data Inh_EChildren  = Inh_EChildren { Inh_EChildren -> Map Identifier Int
allInitStates_Inh_EChildren :: (Map NontermIdent Int), Inh_EChildren -> Identifier
con_Inh_EChildren :: (ConstructorIdent), Inh_EChildren -> PP_Doc
importBlocks_Inh_EChildren :: (PP_Doc), Inh_EChildren -> [Char]
mainFile_Inh_EChildren :: (String), Inh_EChildren -> [Char]
mainName_Inh_EChildren :: (String), Inh_EChildren -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String), Inh_EChildren -> Identifier
nt_Inh_EChildren :: (NontermIdent), Inh_EChildren -> Options
options_Inh_EChildren :: (Options), Inh_EChildren -> [Char]
pragmaBlocks_Inh_EChildren :: (String), Inh_EChildren -> PP_Doc
textBlocks_Inh_EChildren :: (PP_Doc) }
data Syn_EChildren  = Syn_EChildren { Syn_EChildren -> [PP_Doc]
argnamesw_Syn_EChildren :: ([PP_Doc]), Syn_EChildren -> [PP_Doc]
argpats_Syn_EChildren :: ( [PP_Doc] ), Syn_EChildren -> [PP_Doc]
argtps_Syn_EChildren :: ( [PP_Doc] ), Syn_EChildren -> Attributes
childTypes_Syn_EChildren :: (Map Identifier Type), Syn_EChildren
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Syn_EChildren -> [PP_Doc]
datatype_Syn_EChildren :: ([PP_Doc]), Syn_EChildren -> Set [Char]
terminaldefs_Syn_EChildren :: (Set String), Syn_EChildren -> Set [Char]
usedArgs_Syn_EChildren :: (Set String) }
{-# INLINABLE wrap_EChildren #-}
wrap_EChildren :: T_EChildren  -> Inh_EChildren  -> (Syn_EChildren )
wrap_EChildren :: T_EChildren -> Inh_EChildren -> Syn_EChildren
wrap_EChildren (T_EChildren Identity T_EChildren_s5
act) (Inh_EChildren Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks) =
   Identity Syn_EChildren -> Syn_EChildren
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_EChildren_s5
sem <- Identity T_EChildren_s5
act
        let arg4 :: T_EChildren_vIn4
arg4 = Map Identifier Int
-> Identifier
-> PP_Doc
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> PP_Doc
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks
        (T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs) <- T_EChildren_vOut4 -> Identity T_EChildren_vOut4
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
sem T_EChildren_vIn4
arg4)
        Syn_EChildren -> Identity Syn_EChildren
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [PP_Doc]
-> Set [Char]
-> Set [Char]
-> Syn_EChildren
Syn_EChildren [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs)
   )

-- cata
{-# NOINLINE sem_EChildren #-}
sem_EChildren :: EChildren  -> T_EChildren 
sem_EChildren :: EChildren -> T_EChildren
sem_EChildren EChildren
list = (T_EChild -> T_EChildren -> T_EChildren)
-> T_EChildren -> [T_EChild] -> T_EChildren
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_EChild -> T_EChildren -> T_EChildren
sem_EChildren_Cons T_EChildren
sem_EChildren_Nil ((EChild -> T_EChild) -> EChildren -> [T_EChild]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map EChild -> T_EChild
sem_EChild EChildren
list)

-- semantic domain
newtype T_EChildren  = T_EChildren {
                                   T_EChildren -> Identity T_EChildren_s5
attach_T_EChildren :: Identity (T_EChildren_s5 )
                                   }
newtype T_EChildren_s5  = C_EChildren_s5 {
                                         T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 :: (T_EChildren_v4 )
                                         }
data T_EChildren_s6  = C_EChildren_s6
type T_EChildren_v4  = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )
data T_EChildren_vIn4  = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (PP_Doc)
data T_EChildren_vOut4  = T_EChildren_vOut4 ([PP_Doc]) ( [PP_Doc] ) ( [PP_Doc] ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([PP_Doc]) (Set String) (Set String)
{-# NOINLINE sem_EChildren_Cons #-}
sem_EChildren_Cons :: T_EChild  -> T_EChildren  -> T_EChildren 
sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren
sem_EChildren_Cons T_EChild
arg_hd_ T_EChildren
arg_tl_ = Identity T_EChildren_s5 -> T_EChildren
T_EChildren (T_EChildren_s5 -> Identity T_EChildren_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChildren_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_EChildren_s5
st5 = let
      v4 :: T_EChildren_v4 
      v4 :: T_EChildren_v4
v4 = \ (T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks) -> ( let
         _hdX2 :: T_EChild_s2
_hdX2 = Identity T_EChild_s2 -> T_EChild_s2
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EChild -> Identity T_EChild_s2
attach_T_EChild (T_EChild
arg_hd_))
         _tlX5 :: T_EChildren_s5
_tlX5 = Identity T_EChildren_s5 -> T_EChildren_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EChildren -> Identity T_EChildren_s5
attach_T_EChildren (T_EChildren
arg_tl_))
         (T_EChild_vOut1 PP_Doc
_hdIargnamesw PP_Doc
_hdIargpats PP_Doc
_hdIargtps Attributes
_hdIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros PP_Doc
_hdIdatatype Set [Char]
_hdIterminaldefs Set [Char]
_hdIusedArgs) = T_EChild_s2 -> T_EChild_v1
inv_EChild_s2 T_EChild_s2
_hdX2 (Map Identifier Int
-> Identifier
-> PP_Doc
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> PP_Doc
-> T_EChild_vIn1
T_EChild_vIn1 Map Identifier Int
_hdOallInitStates Identifier
_hdOcon PP_Doc
_hdOimportBlocks [Char]
_hdOmainFile [Char]
_hdOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader Identifier
_hdOnt Options
_hdOoptions [Char]
_hdOpragmaBlocks PP_Doc
_hdOtextBlocks)
         (T_EChildren_vOut4 [PP_Doc]
_tlIargnamesw [PP_Doc]
_tlIargpats [PP_Doc]
_tlIargtps Attributes
_tlIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros [PP_Doc]
_tlIdatatype Set [Char]
_tlIterminaldefs Set [Char]
_tlIusedArgs) = T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
_tlX5 (Map Identifier Int
-> Identifier
-> PP_Doc
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> PP_Doc
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_tlOallInitStates Identifier
_tlOcon PP_Doc
_tlOimportBlocks [Char]
_tlOmainFile [Char]
_tlOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader Identifier
_tlOnt Options
_tlOoptions [Char]
_tlOpragmaBlocks PP_Doc
_tlOtextBlocks)
         _lhsOargnamesw :: [PP_Doc]
         _lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule36 PP_Doc
_hdIargnamesw [PP_Doc]
_tlIargnamesw
         _lhsOargpats ::  [PP_Doc] 
         _lhsOargpats :: [PP_Doc]
_lhsOargpats = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule37 PP_Doc
_hdIargpats [PP_Doc]
_tlIargpats
         _lhsOargtps ::  [PP_Doc] 
         _lhsOargtps :: [PP_Doc]
_lhsOargtps = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule38 PP_Doc
_hdIargtps [PP_Doc]
_tlIargtps
         _lhsOchildTypes :: Map Identifier Type
         _lhsOchildTypes :: Attributes
_lhsOchildTypes = Attributes -> Attributes -> Attributes
rule39 Attributes
_hdIchildTypes Attributes
_tlIchildTypes
         _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
         _lhsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule40 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros
         _lhsOdatatype :: [PP_Doc]
         _lhsOdatatype :: [PP_Doc]
_lhsOdatatype = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule41 PP_Doc
_hdIdatatype [PP_Doc]
_tlIdatatype
         _lhsOterminaldefs :: Set String
         _lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = Set [Char] -> Set [Char] -> Set [Char]
rule42 Set [Char]
_hdIterminaldefs Set [Char]
_tlIterminaldefs
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char] -> Set [Char]
rule43 Set [Char]
_hdIusedArgs Set [Char]
_tlIusedArgs
         _hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule44 Map Identifier Int
_lhsIallInitStates
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule45 Identifier
_lhsIcon
         _hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule46 PP_Doc
_lhsIimportBlocks
         _hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule47 [Char]
_lhsImainFile
         _hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule48 [Char]
_lhsImainName
         _hdOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule49 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule50 Identifier
_lhsInt
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule51 Options
_lhsIoptions
         _hdOpragmaBlocks :: [Char]
_hdOpragmaBlocks = [Char] -> [Char]
rule52 [Char]
_lhsIpragmaBlocks
         _hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule53 PP_Doc
_lhsItextBlocks
         _tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule54 Map Identifier Int
_lhsIallInitStates
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule55 Identifier
_lhsIcon
         _tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule56 PP_Doc
_lhsIimportBlocks
         _tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule57 [Char]
_lhsImainFile
         _tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule58 [Char]
_lhsImainName
         _tlOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule59 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule60 Identifier
_lhsInt
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule61 Options
_lhsIoptions
         _tlOpragmaBlocks :: [Char]
_tlOpragmaBlocks = [Char] -> [Char]
rule62 [Char]
_lhsIpragmaBlocks
         _tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule63 PP_Doc
_lhsItextBlocks
         __result_ :: T_EChildren_vOut4
__result_ = [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [PP_Doc]
-> Set [Char]
-> Set [Char]
-> T_EChildren_vOut4
T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs
         in T_EChildren_vOut4
__result_ )
     in T_EChildren_v4 -> T_EChildren_s5
C_EChildren_s5 T_EChildren_v4
v4
   {-# INLINE rule36 #-}
   rule36 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule36 = \ ((PP_Doc
_hdIargnamesw) ::  PP_Doc ) (([PP_Doc]
_tlIargnamesw) :: [PP_Doc]) ->
     PP_Doc
_hdIargnamesw PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIargnamesw
   {-# INLINE rule37 #-}
   rule37 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule37 = \ ((PP_Doc
_hdIargpats) ::   PP_Doc  ) (([PP_Doc]
_tlIargpats) ::  [PP_Doc] ) ->
     PP_Doc
_hdIargpats PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIargpats
   {-# INLINE rule38 #-}
   rule38 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule38 = \ ((PP_Doc
_hdIargtps) ::   PP_Doc  ) (([PP_Doc]
_tlIargtps) ::  [PP_Doc] ) ->
     PP_Doc
_hdIargtps PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIargtps
   {-# INLINE rule39 #-}
   rule39 :: Attributes -> Attributes -> Attributes
rule39 = \ ((Attributes
_hdIchildTypes) :: Map Identifier Type) ((Attributes
_tlIchildTypes) :: Map Identifier Type) ->
     Attributes
_hdIchildTypes Attributes -> Attributes -> Attributes
forall a. Monoid a => a -> a -> a
`mappend` Attributes
_tlIchildTypes
   {-# INLINE rule40 #-}
   rule40 :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule40 = \ ((Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdIchildintros Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlIchildintros
   {-# INLINE rule41 #-}
   rule41 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule41 = \ ((PP_Doc
_hdIdatatype) :: PP_Doc) (([PP_Doc]
_tlIdatatype) :: [PP_Doc]) ->
     PP_Doc
_hdIdatatype PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIdatatype
   {-# INLINE rule42 #-}
   rule42 :: Set [Char] -> Set [Char] -> Set [Char]
rule42 = \ ((Set [Char]
_hdIterminaldefs) :: Set String) ((Set [Char]
_tlIterminaldefs) :: Set String) ->
     Set [Char]
_hdIterminaldefs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIterminaldefs
   {-# INLINE rule43 #-}
   rule43 :: Set [Char] -> Set [Char] -> Set [Char]
rule43 = \ ((Set [Char]
_hdIusedArgs) :: Set String) ((Set [Char]
_tlIusedArgs) :: Set String) ->
     Set [Char]
_hdIusedArgs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIusedArgs
   {-# INLINE rule44 #-}
   rule44 :: Map Identifier Int -> Map Identifier Int
rule44 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_lhsIallInitStates
   {-# INLINE rule45 #-}
   rule45 :: Identifier -> Identifier
rule45 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
     Identifier
_lhsIcon
   {-# INLINE rule46 #-}
   rule46 :: PP_Doc -> PP_Doc
rule46 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
     PP_Doc
_lhsIimportBlocks
   {-# INLINE rule47 #-}
   rule47 :: [Char] -> [Char]
rule47 = \ (([Char]
_lhsImainFile) :: String) ->
     [Char]
_lhsImainFile
   {-# INLINE rule48 #-}
   rule48 :: [Char] -> [Char]
rule48 = \ (([Char]
_lhsImainName) :: String) ->
     [Char]
_lhsImainName
   {-# INLINE rule49 #-}
   rule49 :: ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule49 = \ (([Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
   {-# INLINE rule50 #-}
   rule50 :: Identifier -> Identifier
rule50 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
     Identifier
_lhsInt
   {-# INLINE rule51 #-}
   rule51 :: Options -> Options
rule51 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule52 #-}
   rule52 :: [Char] -> [Char]
rule52 = \ (([Char]
_lhsIpragmaBlocks) :: String) ->
     [Char]
_lhsIpragmaBlocks
   {-# INLINE rule53 #-}
   rule53 :: PP_Doc -> PP_Doc
rule53 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
     PP_Doc
_lhsItextBlocks
   {-# INLINE rule54 #-}
   rule54 :: Map Identifier Int -> Map Identifier Int
rule54 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_lhsIallInitStates
   {-# INLINE rule55 #-}
   rule55 :: Identifier -> Identifier
rule55 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
     Identifier
_lhsIcon
   {-# INLINE rule56 #-}
   rule56 :: PP_Doc -> PP_Doc
rule56 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
     PP_Doc
_lhsIimportBlocks
   {-# INLINE rule57 #-}
   rule57 :: [Char] -> [Char]
rule57 = \ (([Char]
_lhsImainFile) :: String) ->
     [Char]
_lhsImainFile
   {-# INLINE rule58 #-}
   rule58 :: [Char] -> [Char]
rule58 = \ (([Char]
_lhsImainName) :: String) ->
     [Char]
_lhsImainName
   {-# INLINE rule59 #-}
   rule59 :: ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule59 = \ (([Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
   {-# INLINE rule60 #-}
   rule60 :: Identifier -> Identifier
rule60 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
     Identifier
_lhsInt
   {-# INLINE rule61 #-}
   rule61 :: Options -> Options
rule61 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule62 #-}
   rule62 :: [Char] -> [Char]
rule62 = \ (([Char]
_lhsIpragmaBlocks) :: String) ->
     [Char]
_lhsIpragmaBlocks
   {-# INLINE rule63 #-}
   rule63 :: PP_Doc -> PP_Doc
rule63 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
     PP_Doc
_lhsItextBlocks
{-# NOINLINE sem_EChildren_Nil #-}
sem_EChildren_Nil ::  T_EChildren 
sem_EChildren_Nil :: T_EChildren
sem_EChildren_Nil  = Identity T_EChildren_s5 -> T_EChildren
T_EChildren (T_EChildren_s5 -> Identity T_EChildren_s5
forall (m :: * -> *) a. Monad m => a -> m a
return T_EChildren_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_EChildren_s5
st5 = let
      v4 :: T_EChildren_v4 
      v4 :: T_EChildren_v4
v4 = \ (T_EChildren_vIn4 Map Identifier Int
_lhsIallInitStates Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks) -> ( let
         _lhsOargnamesw :: [PP_Doc]
         _lhsOargnamesw :: [PP_Doc]
_lhsOargnamesw = () -> [PP_Doc]
forall a. () -> [a]
rule64  ()
         _lhsOargpats ::  [PP_Doc] 
         _lhsOargpats :: [PP_Doc]
_lhsOargpats = () -> [PP_Doc]
forall a. () -> [a]
rule65  ()
         _lhsOargtps ::  [PP_Doc] 
         _lhsOargtps :: [PP_Doc]
_lhsOargtps = () -> [PP_Doc]
forall a. () -> [a]
rule66  ()
         _lhsOchildTypes :: Map Identifier Type
         _lhsOchildTypes :: Attributes
_lhsOchildTypes = () -> Attributes
rule67  ()
         _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))
         _lhsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros = ()
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
forall k a. () -> Map k a
rule68  ()
         _lhsOdatatype :: [PP_Doc]
         _lhsOdatatype :: [PP_Doc]
_lhsOdatatype = () -> [PP_Doc]
forall a. () -> [a]
rule69  ()
         _lhsOterminaldefs :: Set String
         _lhsOterminaldefs :: Set [Char]
_lhsOterminaldefs = () -> Set [Char]
forall a. () -> Set a
rule70  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule71  ()
         __result_ :: T_EChildren_vOut4
__result_ = [PP_Doc]
-> [PP_Doc]
-> [PP_Doc]
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> [PP_Doc]
-> Set [Char]
-> Set [Char]
-> T_EChildren_vOut4
T_EChildren_vOut4 [PP_Doc]
_lhsOargnamesw [PP_Doc]
_lhsOargpats [PP_Doc]
_lhsOargtps Attributes
_lhsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsOchildintros [PP_Doc]
_lhsOdatatype Set [Char]
_lhsOterminaldefs Set [Char]
_lhsOusedArgs
         in T_EChildren_vOut4
__result_ )
     in T_EChildren_v4 -> T_EChildren_s5
C_EChildren_s5 T_EChildren_v4
v4
   {-# INLINE rule64 #-}
   rule64 :: () -> [a]
rule64 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule65 #-}
   rule65 :: () -> [a]
rule65 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule66 #-}
   rule66 :: () -> [a]
rule66 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule67 #-}
   rule67 :: () -> Attributes
rule67 = \  (()
_ :: ()) ->
     Attributes
forall a. Monoid a => a
mempty
   {-# INLINE rule68 #-}
   rule68 :: () -> Map k a
rule68 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule69 #-}
   rule69 :: () -> [a]
rule69 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule70 #-}
   rule70 :: () -> Set a
rule70 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule71 #-}
   rule71 :: () -> Set a
rule71 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty

-- ENonterminal ------------------------------------------------
-- wrapper
data Inh_ENonterminal  = Inh_ENonterminal { Inh_ENonterminal -> Map Int (Int, Int)
allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), Inh_ENonterminal -> Map Identifier Int
allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), Inh_ENonterminal -> Map Int VisitKind
allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), Inh_ENonterminal
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_ENonterminal -> Map Int (Set Identifier)
avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminal -> Map Int (Set Identifier)
avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminal -> Derivings
derivings_Inh_ENonterminal :: (Derivings), Inh_ENonterminal -> PP_Doc
importBlocks_Inh_ENonterminal :: (PP_Doc), Inh_ENonterminal -> Map Identifier Attributes
inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), Inh_ENonterminal -> Map Identifier (Map Identifier Attributes)
localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), Inh_ENonterminal -> [Char]
mainFile_Inh_ENonterminal :: (String), Inh_ENonterminal -> [Char]
mainName_Inh_ENonterminal :: (String), Inh_ENonterminal -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String), Inh_ENonterminal -> Options
options_Inh_ENonterminal :: (Options), Inh_ENonterminal -> [Char]
pragmaBlocks_Inh_ENonterminal :: (String), Inh_ENonterminal -> Map Identifier Attributes
synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), Inh_ENonterminal -> PP_Doc
textBlocks_Inh_ENonterminal :: (PP_Doc), Inh_ENonterminal -> TypeSyns
typeSyns_Inh_ENonterminal :: (TypeSyns), Inh_ENonterminal -> Set Identifier
wrappers_Inh_ENonterminal :: (Set NontermIdent) }
data Syn_ENonterminal  = Syn_ENonterminal { Syn_ENonterminal -> PP_Doc
appendCommon_Syn_ENonterminal :: ( PP_Doc ), Syn_ENonterminal -> PP_Doc
appendMain_Syn_ENonterminal :: ( PP_Doc ), Syn_ENonterminal
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_ENonterminal -> Seq Error
errors_Syn_ENonterminal :: (Seq Error), Syn_ENonterminal -> Map Int (Int, Int)
fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), Syn_ENonterminal -> IO ()
genProdIO_Syn_ENonterminal :: (IO ()), Syn_ENonterminal -> [PP_Doc]
imports_Syn_ENonterminal :: ([PP_Doc]), Syn_ENonterminal -> Map Identifier Int
initStates_Syn_ENonterminal :: (Map NontermIdent Int), Syn_ENonterminal -> PP_Doc
output_Syn_ENonterminal :: (PP_Doc), Syn_ENonterminal -> Seq PP_Doc
semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), Syn_ENonterminal -> Seq PP_Doc
semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), Syn_ENonterminal -> Map Int VisitKind
visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), Syn_ENonterminal -> Map Int (Set Identifier)
visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), Syn_ENonterminal -> Map Int (Set Identifier)
visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_ENonterminal #-}
wrap_ENonterminal :: T_ENonterminal  -> Inh_ENonterminal  -> (Syn_ENonterminal )
wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> Syn_ENonterminal
wrap_ENonterminal (T_ENonterminal Identity T_ENonterminal_s8
act) (Inh_ENonterminal Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) =
   Identity Syn_ENonterminal -> Syn_ENonterminal
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_ENonterminal_s8
sem <- Identity T_ENonterminal_s8
act
        let arg7 :: T_ENonterminal_vIn7
arg7 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Derivings
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminal_vIn7
T_ENonterminal_vIn7 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers
        (T_ENonterminal_vOut7 PP_Doc
_lhsOappendCommon PP_Doc
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_ENonterminal_vOut7 -> Identity T_ENonterminal_vOut7
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ENonterminal_s8 -> T_ENonterminal_v7
inv_ENonterminal_s8 T_ENonterminal_s8
sem T_ENonterminal_vIn7
arg7)
        Syn_ENonterminal -> Identity Syn_ENonterminal
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc
-> PP_Doc
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_ENonterminal
Syn_ENonterminal PP_Doc
_lhsOappendCommon PP_Doc
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
   )

-- cata
{-# INLINE sem_ENonterminal #-}
sem_ENonterminal :: ENonterminal  -> T_ENonterminal 
sem_ENonterminal :: ENonterminal -> T_ENonterminal
sem_ENonterminal ( ENonterminal Identifier
nt_ [Identifier]
params_ ClassContext
classCtxs_ Int
initial_ [Int]
initialv_ Map Int StateCtx
nextVisits_ Map Int StateCtx
prevVisits_ EProductions
prods_ Bool
recursive_ HigherOrderInfo
hoInfo_ ) = Identifier
-> [Identifier]
-> ClassContext
-> Int
-> [Int]
-> Map Int StateCtx
-> Map Int StateCtx
-> T_EProductions
-> Bool
-> HigherOrderInfo
-> T_ENonterminal
sem_ENonterminal_ENonterminal Identifier
nt_ [Identifier]
params_ ClassContext
classCtxs_ Int
initial_ [Int]
initialv_ Map Int StateCtx
nextVisits_ Map Int StateCtx
prevVisits_ ( EProductions -> T_EProductions
sem_EProductions EProductions
prods_ ) Bool
recursive_ HigherOrderInfo
hoInfo_

-- semantic domain
newtype T_ENonterminal  = T_ENonterminal {
                                         T_ENonterminal -> Identity T_ENonterminal_s8
attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )
                                         }
newtype T_ENonterminal_s8  = C_ENonterminal_s8 {
                                               T_ENonterminal_s8 -> T_ENonterminal_v7
inv_ENonterminal_s8 :: (T_ENonterminal_v7 )
                                               }
data T_ENonterminal_s9  = C_ENonterminal_s9
type T_ENonterminal_v7  = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )
data T_ENonterminal_vIn7  = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Derivings) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)
data T_ENonterminal_vOut7  = T_ENonterminal_vOut7 ( PP_Doc ) ( PP_Doc ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_ENonterminal_ENonterminal #-}
sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> ([VisitIdentifier]) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions  -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal 
sem_ENonterminal_ENonterminal :: Identifier
-> [Identifier]
-> ClassContext
-> Int
-> [Int]
-> Map Int StateCtx
-> Map Int StateCtx
-> T_EProductions
-> Bool
-> HigherOrderInfo
-> T_ENonterminal
sem_ENonterminal_ENonterminal Identifier
arg_nt_ [Identifier]
arg_params_ ClassContext
arg_classCtxs_ Int
arg_initial_ [Int]
arg_initialv_ Map Int StateCtx
arg_nextVisits_ Map Int StateCtx
arg_prevVisits_ T_EProductions
arg_prods_ Bool
arg_recursive_ HigherOrderInfo
_ = Identity T_ENonterminal_s8 -> T_ENonterminal
T_ENonterminal (T_ENonterminal_s8 -> Identity T_ENonterminal_s8
forall (m :: * -> *) a. Monad m => a -> m a
return T_ENonterminal_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_ENonterminal_s8
st8 = let
      v7 :: T_ENonterminal_v7 
      v7 :: T_ENonterminal_v7
v7 = \ (T_ENonterminal_vIn7 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
         _prodsX17 :: T_EProductions_s17
_prodsX17 = Identity T_EProductions_s17 -> T_EProductions_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EProductions -> Identity T_EProductions_s17
attach_T_EProductions (T_EProductions
arg_prods_))
         (T_EProductions_vOut16 [VisitStateState]
_prodsIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsIchildvisit Int
_prodsIcount [PP_Doc]
_prodsIdatatype Seq Error
_prodsIerrors Map Int (Int, Int)
_prodsIfromToStates IO ()
_prodsIgenProdIO [PP_Doc]
_prodsIimports Seq PP_Doc
_prodsIsemFunBndDefs Seq PP_Doc
_prodsIsemFunBndTps PP_Doc
_prodsIsem_nt PP_Doc
_prodsIsem_prod PP_Doc
_prodsIt_visits Map Int VisitKind
_prodsIvisitKinds Map Int (Set Identifier)
_prodsIvisitdefs Map Int (Set Identifier)
_prodsIvisituses) = T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 T_EProductions_s17
_prodsX17 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> [Char]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProductions_vIn16
T_EProductions_vIn16 Map Int (Int, Int)
_prodsOallFromToStates Map Identifier Attributes
_prodsOallInhmap Map Identifier Int
_prodsOallInitStates Map Identifier Attributes
_prodsOallSynmap Map Int VisitKind
_prodsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsOallchildvisit Set Int
_prodsOallstates Map Int (Set Identifier)
_prodsOavisitdefs Map Int (Set Identifier)
_prodsOavisituses ClassContext
_prodsOclassCtxs PP_Doc
_prodsOimportBlocks Attributes
_prodsOinhmap Int
_prodsOinitial Map Identifier Attributes
_prodsOlocalAttrTypes [Char]
_prodsOmainFile [Char]
_prodsOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_prodsOmoduleHeader Map Int StateCtx
_prodsOnextVisits Identifier
_prodsOnt Type
_prodsOntType Options
_prodsOoptions [Identifier]
_prodsOparams [Char]
_prodsOpragmaBlocks Map Int StateCtx
_prodsOprevVisits Bool
_prodsOrename Attributes
_prodsOsynmap PP_Doc
_prodsOtextBlocks)
         _prodsOrename :: Bool
_prodsOrename = Options -> Bool
rule72 Options
_lhsIoptions
         _prodsOnt :: Identifier
_prodsOnt = Identifier -> Identifier
forall a. a -> a
rule73 Identifier
arg_nt_
         _prodsOparams :: [Identifier]
_prodsOparams = [Identifier] -> [Identifier]
forall a. a -> a
rule74 [Identifier]
arg_params_
         _prodsOclassCtxs :: ClassContext
_prodsOclassCtxs = ClassContext -> ClassContext
forall a. a -> a
rule75 ClassContext
arg_classCtxs_
         _lhsOoutput :: PP_Doc
         _lhsOoutput :: PP_Doc
_lhsOoutput = PP_Doc
-> Bool
-> PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Identifier
-> PP_Doc
rule76 PP_Doc
_datatype Bool
_hasWrapper PP_Doc
_k_states Options
_lhsIoptions PP_Doc
_prodsIsem_prod PP_Doc
_prodsIt_visits PP_Doc
_sem_nt PP_Doc
_t_init PP_Doc
_t_states PP_Doc
_wr_inh PP_Doc
_wr_syn PP_Doc
_wrapper Identifier
arg_nt_
         _hasWrapper :: Bool
_hasWrapper = Set Identifier -> Identifier -> Bool
rule77 Set Identifier
_lhsIwrappers Identifier
arg_nt_
         _classPP :: PP_Doc
_classPP = ClassContext -> PP_Doc
rule78 ClassContext
arg_classCtxs_
         _aliasPre :: PP_Doc
_aliasPre = PP_Doc -> PP_Doc -> Identifier -> PP_Doc
rule79 PP_Doc
_classPP PP_Doc
_t_params Identifier
arg_nt_
         _datatype :: PP_Doc
_datatype = PP_Doc
-> PP_Doc
-> PP_Doc
-> TypeSyns
-> [PP_Doc]
-> PP_Doc
-> Identifier
-> PP_Doc
rule80 PP_Doc
_aliasPre PP_Doc
_classPP PP_Doc
_derivings TypeSyns
_lhsItypeSyns [PP_Doc]
_prodsIdatatype PP_Doc
_t_params Identifier
arg_nt_
         _derivings :: PP_Doc
_derivings = Derivings -> Identifier -> PP_Doc
rule81 Derivings
_lhsIderivings Identifier
arg_nt_
         _fsemname :: Identifier -> [Char]
_fsemname = () -> Identifier -> [Char]
rule82  ()
         _semname :: [Char]
_semname = (Identifier -> [Char]) -> Identifier -> [Char]
forall t t. (t -> t) -> t -> t
rule83 Identifier -> [Char]
_fsemname Identifier
arg_nt_
         _frecarg :: Type -> [Char] -> PP_Doc
_frecarg = (Identifier -> [Char]) -> Type -> [Char] -> PP_Doc
rule84 Identifier -> [Char]
_fsemname
         _sem_tp :: PP_Doc
_sem_tp = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc -> Identifier -> PP_Doc
rule85 PP_Doc
_classPP PP_Doc
_quantPP PP_Doc
_t_params PP_Doc
_t_type Identifier
arg_nt_
         _quantPP :: PP_Doc
_quantPP = [Identifier] -> PP_Doc
rule86 [Identifier]
arg_params_
         _sem_nt :: PP_Doc
_sem_nt = (Type -> [Char] -> PP_Doc)
-> (Identifier -> [Char])
-> TypeSyns
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> [Char]
-> Identifier
-> PP_Doc
rule87 Type -> [Char] -> PP_Doc
_frecarg Identifier -> [Char]
_fsemname TypeSyns
_lhsItypeSyns PP_Doc
_prodsIsem_nt PP_Doc
_semPragma PP_Doc
_sem_tp [Char]
_semname Identifier
arg_nt_
         _inlineNt :: Bool
_inlineNt = Bool -> Options -> Int -> Bool -> Bool
rule88 Bool
_hasWrapper Options
_lhsIoptions Int
_prodsIcount Bool
arg_recursive_
         _semPragma :: PP_Doc
_semPragma = Bool -> Options -> [Char] -> PP_Doc
rule89 Bool
_inlineNt Options
_lhsIoptions [Char]
_semname
         (Just Attributes
_prodsOinhmap) = Map Identifier Attributes -> Identifier -> Maybe Attributes
rule90 Map Identifier Attributes
_lhsIinhmap Identifier
arg_nt_
         (Just Attributes
_prodsOsynmap) = Map Identifier Attributes -> Identifier -> Maybe Attributes
rule91 Map Identifier Attributes
_lhsIsynmap Identifier
arg_nt_
         _prodsOallInhmap :: Map Identifier Attributes
_prodsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule92 Map Identifier Attributes
_lhsIinhmap
         _prodsOallSynmap :: Map Identifier Attributes
_prodsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule93 Map Identifier Attributes
_lhsIsynmap
         _outedges :: Set Int
_outedges = [VisitStateState] -> Set Int
rule94 [VisitStateState]
_prodsIallvisits
         _inedges :: Set Int
_inedges = [VisitStateState] -> Set Int
rule95 [VisitStateState]
_prodsIallvisits
         _allstates :: Set Int
_allstates = Set Int -> Set Int -> Int -> Set Int
rule96 Set Int
_inedges Set Int
_outedges Int
arg_initial_
         _stvisits :: Int -> [VisitStateState]
_stvisits = [VisitStateState] -> Int -> [VisitStateState]
rule97 [VisitStateState]
_prodsIallvisits
         _t_type :: PP_Doc
_t_type = Identifier -> PP_Doc
rule98 Identifier
arg_nt_
         _t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule99 [Identifier]
arg_params_
         _t_init :: PP_Doc
_t_init = Options -> PP_Doc -> PP_Doc -> Int -> PP_Doc
rule100 Options
_lhsIoptions PP_Doc
_t_params PP_Doc
_t_type Int
arg_initial_
         _t_states :: PP_Doc
_t_states = Set Int -> PP_Doc -> Map Int StateCtx -> Identifier -> PP_Doc
rule101 Set Int
_allstates PP_Doc
_t_params Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
         _k_type :: [Char]
_k_type = Identifier -> [Char]
rule102 Identifier
arg_nt_
         _k_states :: PP_Doc
_k_states = Set Int
-> [Char]
-> [VisitStateState]
-> PP_Doc
-> PP_Doc
-> Map Int StateCtx
-> Identifier
-> PP_Doc
rule103 Set Int
_allstates [Char]
_k_type [VisitStateState]
_prodsIallvisits PP_Doc
_t_params PP_Doc
_t_type Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
         _wr_inh :: PP_Doc
_wr_inh = ([Char] -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. ([Char] -> t -> t) -> t -> t
rule104 [Char] -> [(Identifier, Type)] -> PP_Doc
_genwrap [(Identifier, Type)]
_wr_inhs
         _wr_syn :: PP_Doc
_wr_syn = ([Char] -> [(Identifier, Type)] -> PP_Doc)
-> [(Identifier, Type)] -> PP_Doc
forall t t. ([Char] -> t -> t) -> t -> t
rule105 [Char] -> [(Identifier, Type)] -> PP_Doc
_genwrap [(Identifier, Type)]
_wr_syns
         _genwrap :: [Char] -> [(Identifier, Type)] -> PP_Doc
_genwrap = (PP_Doc -> PP_Doc)
-> PP_Doc -> Identifier -> [Char] -> [(Identifier, Type)] -> PP_Doc
rule106 PP_Doc -> PP_Doc
_addbang PP_Doc
_t_params Identifier
arg_nt_
         _synAttrs :: Attributes
_synAttrs = Map Identifier Attributes -> Identifier -> Attributes
rule107 Map Identifier Attributes
_lhsIinhmap Identifier
arg_nt_
         _wr_inhs :: [(Identifier, Type)]
_wr_inhs = Attributes -> (Attributes -> Attributes) -> [(Identifier, Type)]
forall t k a. t -> (t -> Map k a) -> [(k, a)]
rule108 Attributes
_synAttrs Attributes -> Attributes
_wr_filter
         _wr_inhs1 :: [(Identifier, Type)]
_wr_inhs1 = Attributes -> [(Identifier, Type)]
forall k a. Map k a -> [(k, a)]
rule109 Attributes
_synAttrs
         _wr_filter :: Attributes -> Attributes
_wr_filter = Options -> Attributes -> Attributes
forall a. Options -> Map Identifier a -> Map Identifier a
rule110 Options
_lhsIoptions
         _wr_syns :: [(Identifier, Type)]
_wr_syns = Map Identifier Attributes -> Identifier -> [(Identifier, Type)]
rule111 Map Identifier Attributes
_lhsIsynmap Identifier
arg_nt_
         _inhlist :: [[Char]]
_inhlist = Options -> [(Identifier, Type)] -> [[Char]]
forall b. Options -> [(Identifier, b)] -> [[Char]]
rule112 Options
_lhsIoptions [(Identifier, Type)]
_wr_inhs
         _inhlist1 :: [[Char]]
_inhlist1 = Options -> [(Identifier, Type)] -> [[Char]]
forall b. Options -> [(Identifier, b)] -> [[Char]]
rule113 Options
_lhsIoptions [(Identifier, Type)]
_wr_inhs1
         _synlist :: [[Char]]
_synlist = Options -> [(Identifier, Type)] -> [[Char]]
forall b. Options -> [(Identifier, b)] -> [[Char]]
rule114 Options
_lhsIoptions [(Identifier, Type)]
_wr_syns
         _wrapname :: [Char]
_wrapname = Identifier -> [Char]
rule115 Identifier
arg_nt_
         _inhname :: [Char]
_inhname = Identifier -> [Char]
rule116 Identifier
arg_nt_
         _synname :: [Char]
_synname = Identifier -> [Char]
rule117 Identifier
arg_nt_
         _firstVisitInfo :: StateCtx
_firstVisitInfo = Int -> Map Int StateCtx -> StateCtx
rule118 Int
arg_initial_ Map Int StateCtx
arg_nextVisits_
         _wrapper :: PP_Doc
_wrapper = (PP_Doc -> PP_Doc)
-> (PP_Doc -> PP_Doc)
-> PP_Doc
-> [[Char]]
-> [Char]
-> [Char]
-> Map Int VisitKind
-> [Char]
-> Options
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> PP_Doc
-> [[Char]]
-> [Char]
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> [Char]
-> Int
-> [Int]
-> Map Int StateCtx
-> Identifier
-> PP_Doc
rule119 PP_Doc -> PP_Doc
_addbang PP_Doc -> PP_Doc
forall a. a -> a
_addbangWrap PP_Doc
_classPP [[Char]]
_inhlist [Char]
_inhname [Char]
_k_type Map Int VisitKind
_lhsIallVisitKinds [Char]
_lhsImainName Options
_lhsIoptions Map Int (Set Identifier)
_prodsIvisitdefs Map Int (Set Identifier)
_prodsIvisituses PP_Doc
_quantPP [[Char]]
_synlist [Char]
_synname PP_Doc
_t_params PP_Doc
_t_type PP_Doc
_wrapPragma [Char]
_wrapname Int
arg_initial_ [Int]
arg_initialv_ Map Int StateCtx
arg_nextVisits_ Identifier
arg_nt_
         _wrapPragma :: PP_Doc
_wrapPragma = Options -> [Char] -> PP_Doc
rule120 Options
_lhsIoptions [Char]
_wrapname
         _lhsOsemFunBndDefs :: Seq PP_Doc
         _lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> PP_Doc -> Seq PP_Doc
rule121 Seq PP_Doc
_prodsIsemFunBndDefs PP_Doc
_semFunBndDef
         _lhsOsemFunBndTps :: Seq PP_Doc
         _lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> PP_Doc -> Seq PP_Doc
rule122 Seq PP_Doc
_prodsIsemFunBndTps PP_Doc
_semFunBndTp
         _semFunBndDef :: PP_Doc
_semFunBndDef = [Char] -> [Char] -> PP_Doc
rule123 [Char]
_semFunBndNm [Char]
_semname
         _semFunBndTp :: PP_Doc
_semFunBndTp = [Char] -> PP_Doc -> PP_Doc
rule124 [Char]
_semFunBndNm PP_Doc
_sem_tp
         _semFunBndNm :: [Char]
_semFunBndNm = Identifier -> [Char]
rule125 Identifier
arg_nt_
         _prodsOinitial :: Int
_prodsOinitial = Int -> Int
forall a. a -> a
rule126 Int
arg_initial_
         _prodsOallstates :: Set Int
_prodsOallstates = Set Int -> Set Int
forall a. a -> a
rule127 Set Int
_allstates
         _lhsOappendMain ::  PP_Doc 
         _lhsOappendMain :: PP_Doc
_lhsOappendMain = Set Identifier
-> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc -> Identifier -> PP_Doc
rule128 Set Identifier
_lhsIwrappers PP_Doc
_sem_nt PP_Doc
_wr_inh PP_Doc
_wr_syn PP_Doc
_wrapper Identifier
arg_nt_
         _lhsOappendCommon ::  PP_Doc 
         _lhsOappendCommon :: PP_Doc
_lhsOappendCommon = PP_Doc -> PP_Doc -> Options -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule129 PP_Doc
_datatype PP_Doc
_k_states Options
_lhsIoptions PP_Doc
_prodsIt_visits PP_Doc
_t_init PP_Doc
_t_states
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule130 Options
_lhsIoptions
         _addbangWrap :: a -> a
_addbangWrap = () -> a -> a
forall a. () -> a -> a
rule131  ()
         _prodsOnextVisits :: Map Int StateCtx
_prodsOnextVisits = Map Int StateCtx -> Map Int StateCtx
forall a. a -> a
rule132 Map Int StateCtx
arg_nextVisits_
         _prodsOprevVisits :: Map Int StateCtx
_prodsOprevVisits = Map Int StateCtx -> Map Int StateCtx
forall a. a -> a
rule133 Map Int StateCtx
arg_prevVisits_
         _prodsOlocalAttrTypes :: Map Identifier Attributes
_prodsOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Identifier -> Map Identifier Attributes
rule134 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes Identifier
arg_nt_
         _lhsOinitStates :: Map NontermIdent Int
         _lhsOinitStates :: Map Identifier Int
_lhsOinitStates = Int -> Identifier -> Map Identifier Int
forall a k. a -> k -> Map k a
rule135 Int
arg_initial_ Identifier
arg_nt_
         _ntType :: Type
_ntType = Identifier -> [Identifier] -> Type
rule136 Identifier
arg_nt_ [Identifier]
arg_params_
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule137 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsIchildvisit
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule138 Seq Error
_prodsIerrors
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule139 Map Int (Int, Int)
_prodsIfromToStates
         _lhsOgenProdIO :: IO ()
         _lhsOgenProdIO :: IO ()
_lhsOgenProdIO = IO () -> IO ()
rule140 IO ()
_prodsIgenProdIO
         _lhsOimports :: [PP_Doc]
         _lhsOimports :: [PP_Doc]
_lhsOimports = [PP_Doc] -> [PP_Doc]
rule141 [PP_Doc]
_prodsIimports
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule142 Map Int VisitKind
_prodsIvisitKinds
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule143 Map Int (Set Identifier)
_prodsIvisitdefs
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule144 Map Int (Set Identifier)
_prodsIvisituses
         _prodsOallFromToStates :: Map Int (Int, Int)
_prodsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule145 Map Int (Int, Int)
_lhsIallFromToStates
         _prodsOallInitStates :: Map Identifier Int
_prodsOallInitStates = Map Identifier Int -> Map Identifier Int
rule146 Map Identifier Int
_lhsIallInitStates
         _prodsOallVisitKinds :: Map Int VisitKind
_prodsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule147 Map Int VisitKind
_lhsIallVisitKinds
         _prodsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_prodsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule148 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _prodsOavisitdefs :: Map Int (Set Identifier)
_prodsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule149 Map Int (Set Identifier)
_lhsIavisitdefs
         _prodsOavisituses :: Map Int (Set Identifier)
_prodsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule150 Map Int (Set Identifier)
_lhsIavisituses
         _prodsOimportBlocks :: PP_Doc
_prodsOimportBlocks = PP_Doc -> PP_Doc
rule151 PP_Doc
_lhsIimportBlocks
         _prodsOmainFile :: [Char]
_prodsOmainFile = [Char] -> [Char]
rule152 [Char]
_lhsImainFile
         _prodsOmainName :: [Char]
_prodsOmainName = [Char] -> [Char]
rule153 [Char]
_lhsImainName
         _prodsOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_prodsOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule154 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _prodsOntType :: Type
_prodsOntType = Type -> Type
forall a. a -> a
rule155 Type
_ntType
         _prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule156 Options
_lhsIoptions
         _prodsOpragmaBlocks :: [Char]
_prodsOpragmaBlocks = [Char] -> [Char]
rule157 [Char]
_lhsIpragmaBlocks
         _prodsOtextBlocks :: PP_Doc
_prodsOtextBlocks = PP_Doc -> PP_Doc
rule158 PP_Doc
_lhsItextBlocks
         __result_ :: T_ENonterminal_vOut7
__result_ = PP_Doc
-> PP_Doc
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_ENonterminal_vOut7
T_ENonterminal_vOut7 PP_Doc
_lhsOappendCommon PP_Doc
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_ENonterminal_vOut7
__result_ )
     in T_ENonterminal_v7 -> T_ENonterminal_s8
C_ENonterminal_s8 T_ENonterminal_v7
v7
   {-# INLINE rule72 #-}
   {-# LINE 57 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule72 = \ ((_lhsIoptions) :: Options) ->
                                  {-# LINE 57 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  rename _lhsIoptions
                                  {-# LINE 1047 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule73 #-}
   {-# LINE 65 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule73 = \ nt_ ->
                              {-# LINE 65 "src-ag/ExecutionPlan2Hs.ag" #-}
                              nt_
                              {-# LINE 1053 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule74 #-}
   {-# LINE 77 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule74 = \ params_ ->
                   {-# LINE 77 "src-ag/ExecutionPlan2Hs.ag" #-}
                   params_
                   {-# LINE 1059 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule75 #-}
   {-# LINE 81 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule75 = \ classCtxs_ ->
                      {-# LINE 81 "src-ag/ExecutionPlan2Hs.ag" #-}
                      classCtxs_
                      {-# LINE 1065 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule76 #-}
   {-# LINE 98 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule76 = \ _datatype _hasWrapper _k_states ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) ((_prodsIt_visits) :: PP_Doc) _sem_nt _t_init _t_states _wr_inh _wr_syn _wrapper nt_ ->
                                {-# LINE 98 "src-ag/ExecutionPlan2Hs.ag" #-}
                                ("-- " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')
                                >-< (if dataTypes _lhsIoptions
                                     then "-- data"
                                          >-< _datatype
                                          >-< ""
                                     else empty)
                                >-< (if _hasWrapper
                                     then "-- wrapper"
                                          >-< _wr_inh
                                          >-< _wr_syn
                                          >-< _wrapper
                                          >-< ""
                                     else empty)
                                >-< (if   folds _lhsIoptions
                                     then "-- cata"
                                          >-< _sem_nt
                                          >-< ""
                                     else empty)
                                >-< (if   semfuns _lhsIoptions
                                     then "-- semantic domain"
                                          >-< _t_init
                                          >-< _t_states
                                          >-< _k_states
                                          >-< _prodsIt_visits
                                          >-< _prodsIsem_prod
                                          >-< ""
                                     else empty)
                                {-# LINE 1097 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule77 #-}
   {-# LINE 125 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule77 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->
                                    {-# LINE 125 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    nt_ `Set.member` _lhsIwrappers
                                    {-# LINE 1103 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule78 #-}
   {-# LINE 138 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule78 = \ classCtxs_ ->
                                  {-# LINE 138 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  ppClasses $ classCtxsToDocs classCtxs_
                                  {-# LINE 1109 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule79 #-}
   {-# LINE 139 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule79 = \ _classPP _t_params nt_ ->
                                  {-# LINE 139 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  "type" >#< _classPP     >#< nt_ >#< _t_params     >#< "="
                                  {-# LINE 1115 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule80 #-}
   {-# LINE 140 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule80 = \ _aliasPre _classPP _derivings ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) _t_params nt_ ->
                                  {-# LINE 140 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  case lookup nt_ _lhsItypeSyns of
                                     Nothing -> "data" >#< _classPP     >#< nt_ >#< _t_params
                                                >-< ( if null _prodsIdatatype
                                                      then empty
                                                      else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)
                                                                              : (map ("|" >#<) $ tail _prodsIdatatype))
                                                    )
                                                >-< indent 2 _derivings
                                     Just (List t)     -> _aliasPre     >#< "[" >#< show t >#< "]"
                                     Just (Maybe t)    -> _aliasPre     >#< "Maybe" >#< pp_parens (show t)
                                     Just (Tuple ts)   -> _aliasPre     >#< pp_parens (ppCommas $ map (show . snd) ts)
                                     Just (Either l r) -> _aliasPre     >#< "Either" >#< pp_parens (show l) >#< pp_parens (show r)
                                     Just (Map k v)    -> _aliasPre     >#< "Data.Map" >#< pp_parens (show k) >#< pp_parens (show v)
                                     Just (IntMap t)   -> _aliasPre     >#< "Data.IntMap.IntMap" >#< pp_parens (show t)
                                     Just (OrdSet t)   -> _aliasPre     >#< "Data.Set.Set" >#< pp_parens (show t)
                                     Just IntSet       -> _aliasPre     >#< "Data.IntSet.IntSet"
                                  {-# LINE 1136 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule81 #-}
   {-# LINE 157 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule81 = \ ((_lhsIderivings) :: Derivings) nt_ ->
                                   {-# LINE 157 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   case Map.lookup nt_ _lhsIderivings of
                                      Nothing -> empty
                                      Just s  -> if   Set.null s
                                                 then empty
                                                 else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)
                                   {-# LINE 1146 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule82 #-}
   {-# LINE 227 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule82 = \  (_ :: ()) ->
                                  {-# LINE 227 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  \x -> "sem_" ++ show x
                                  {-# LINE 1152 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule83 #-}
   {-# LINE 228 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule83 = \ _fsemname nt_ ->
                                 {-# LINE 228 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _fsemname     nt_
                                 {-# LINE 1158 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule84 #-}
   {-# LINE 229 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule84 = \ _fsemname ->
                                 {-# LINE 229 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 \t x -> case t of
                                            NT nt _ _ -> pp_parens (_fsemname nt >#< x)
                                            _         -> pp x
                                 {-# LINE 1166 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule85 #-}
   {-# LINE 235 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule85 = \ _classPP _quantPP _t_params _t_type nt_ ->
                                 {-# LINE 235 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _quantPP     >#< _classPP     >#< nt_ >#< _t_params     >#< "->" >#< _t_type     >#< _t_params
                                 {-# LINE 1172 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule86 #-}
   {-# LINE 236 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule86 = \ params_ ->
                                 {-# LINE 236 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 ppQuants params_
                                 {-# LINE 1178 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule87 #-}
   {-# LINE 237 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule87 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) ((_prodsIsem_nt) :: PP_Doc) _semPragma _sem_tp _semname nt_ ->
                                 {-# LINE 237 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _semPragma
                                 >-< _semname     >#< "::" >#< _sem_tp
                                 >-< case lookup nt_ _lhsItypeSyns of
                                        Nothing -> _prodsIsem_nt
                                        Just (List t) -> _semname     >#< "list" >#< "=" >#< "Prelude.foldr" >#< _semname     >|< "_Cons"
                                                         >#< _semname     >|< "_Nil"
                                                         >#< case t of
                                                                NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt >#< "list")
                                                                _         -> pp "list"
                                        Just (Maybe t) -> _semname     >#< "Prelude.Nothing" >#< "=" >#< _semname     >|< "_Nothing"
                                                          >-< _semname     >#< pp_parens ("Prelude.Just just") >#< "="
                                                          >#< _semname     >|< "_Just" >#< _frecarg t "just"
                                        Just (Tuple ts) -> _semname     >#< pp_parens (ppCommas $ map fst ts) >#< "="
                                                           >#< _semname     >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)
                                        Just (Either l r) -> _semname     >#< "(Prelude.Left left)" >#< "=" >#< _semname     >|< "_Left" >#< _frecarg l "left"
                                                             >-< _semname     >#< "(Prelude.Right right)" >#< "=" >#< _semname     >|< "_Right" >#< _frecarg r "right"
                                        Just (Map k v) -> _semname     >#< "m" >#< "=" >#< "Data.Map.foldrWithKey"
                                                          >#< _semname     >|< "_Entry" >#< _semname     >|< "_Nil"
                                                          >#< case v of
                                                                 NT nt _ _ -> pp_parens ("Data.Map.map" >#< _fsemname nt >#< "m")
                                                                 _         -> pp "m"
                                        Just (IntMap v) -> _semname     >#< "m" >#< "=" >#< "Data.IntMap.foldWithKey"
                                                           >#< _semname     >|< "_Entry" >#< _semname     >|< "_Nil"
                                                           >#< case v of
                                                                  NT nt _ _ -> pp_parens ("Data.IntMap.map" >#< _fsemname nt >#< "m")
                                                                  _         -> pp "m"
                                        Just (OrdSet t) -> _semname     >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname     >|< "_Entry"
                                                           >#< _semname     >|< "_Nil"
                                                           >#< pp_parens (
                                                                 ( case t of
                                                                     NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt)
                                                                     _         -> empty
                                                                 ) >#< pp_parens ("Data.IntSet.elems" >#< "s")
                                                               )
                                        Just IntSet     -> _semname     >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname     >|< "_Entry"
                                                           >#< _semname     >|< "_Nil"
                                                           >#< pp_parens ("Data.IntSet.elems" >#< "s")
                                 {-# LINE 1220 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule88 #-}
   {-# LINE 277 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule88 = \ _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIcount) :: Int) recursive_ ->
                                  {-# LINE 277 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  not (lateHigherOrderBinding _lhsIoptions) && not recursive_ && (_prodsIcount == 1 || (aggressiveInlinePragmas _lhsIoptions && not _hasWrapper    ))
                                  {-# LINE 1226 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule89 #-}
   {-# LINE 278 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule89 = \ _inlineNt ((_lhsIoptions) :: Options) _semname ->
                                  {-# LINE 278 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  if noInlinePragmas _lhsIoptions
                                  then empty
                                  else if _inlineNt
                                       then ppInline _semname
                                       else if helpInlining _lhsIoptions && not (lateHigherOrderBinding _lhsIoptions)
                                            then ppInlinable _semname
                                            else ppNoInline _semname
                                  {-# LINE 1238 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule90 #-}
   {-# LINE 324 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule90 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->
                                         {-# LINE 324 "src-ag/ExecutionPlan2Hs.ag" #-}
                                         Map.lookup nt_ _lhsIinhmap
                                         {-# LINE 1244 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule91 #-}
   {-# LINE 325 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule91 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->
                                         {-# LINE 325 "src-ag/ExecutionPlan2Hs.ag" #-}
                                         Map.lookup nt_ _lhsIsynmap
                                         {-# LINE 1250 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule92 #-}
   {-# LINE 326 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule92 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->
                                     {-# LINE 326 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     _lhsIinhmap
                                     {-# LINE 1256 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule93 #-}
   {-# LINE 327 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule93 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->
                                     {-# LINE 327 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     _lhsIsynmap
                                     {-# LINE 1262 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule94 #-}
   {-# LINE 348 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule94 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
                                   {-# LINE 348 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits
                                   {-# LINE 1268 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule95 #-}
   {-# LINE 349 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule95 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
                                   {-# LINE 349 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits
                                   {-# LINE 1274 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule96 #-}
   {-# LINE 350 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule96 = \ _inedges _outedges initial_ ->
                                   {-# LINE 350 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   Set.insert initial_ $ _inedges     `Set.union` _outedges
                                   {-# LINE 1280 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule97 #-}
   {-# LINE 351 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule97 = \ ((_prodsIallvisits) :: [VisitStateState]) ->
                                   {-# LINE 351 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits
                                   {-# LINE 1286 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule98 #-}
   {-# LINE 352 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule98 = \ nt_ ->
                                   {-# LINE 352 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   "T_" >|< nt_
                                   {-# LINE 1292 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule99 #-}
   {-# LINE 353 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule99 = \ params_ ->
                                   {-# LINE 353 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   ppSpaced params_
                                   {-# LINE 1298 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule100 #-}
   {-# LINE 354 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule100 = \ ((_lhsIoptions) :: Options) _t_params _t_type initial_ ->
                                   {-# LINE 354 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   "newtype" >#< _t_type     >#< _t_params     >#< "=" >#< _t_type     >#<
                                     pp_braces (
                                       "attach_">|< _t_type     >#< "::"
                                         >#< ppMonadType _lhsIoptions >#< pp_parens (_t_type     >|< "_s" >|< initial_ >#< _t_params    ))
                                   {-# LINE 1307 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule101 #-}
   {-# LINE 358 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule101 = \ _allstates _t_params nextVisits_ nt_ ->
                                   {-# LINE 358 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   vlist $ map (\st ->
                                      let nt_st = nt_ >|< "_s" >|< st
                                          t_st  = "T_" >|< nt_st
                                          k_st  = "K_" >|< nt_st
                                          c_st  = "C_" >|< nt_st
                                          inv_st  = "inv_" >|< nt_st
                                          nextVisit = Map.findWithDefault ManyVis st nextVisits_
                                      in  case nextVisit of
                                            NoneVis    -> "data" >#< t_st >#< _t_params     >#< "=" >#< c_st
                                            OneVis vId -> "newtype" >#< t_st >#< _t_params     >#< "=" >#< c_st
                                                           >#< (pp_braces $ inv_st >#< "::" >#< pp_parens (conNmTVisit nt_ vId >#< _t_params    ))
                                            ManyVis    -> "data" >#< t_st >#< _t_params     >#< "where" >#< c_st >#< "::"
                                                            >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("forall t." >#< k_st >#< _t_params     >#< "t" >#< "->" >#< "t"))
                                                            >#< "->" >#< t_st >#< _t_params
                                          ) $ Set.toList _allstates
                                   {-# LINE 1327 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule102 #-}
   {-# LINE 376 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule102 = \ nt_ ->
                                  {-# LINE 376 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  "K_" ++ show nt_
                                  {-# LINE 1333 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule103 #-}
   {-# LINE 377 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule103 = \ _allstates _k_type ((_prodsIallvisits) :: [VisitStateState]) _t_params _t_type nextVisits_ nt_ ->
                                  {-# LINE 377 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  vlist $ map (\st ->
                                     let nt_st = nt_ >|< "_s" >|< st
                                         k_st  = "K_" >|< nt_st
                                         outg  = filter (\(v,f,t) -> f == st) _prodsIallvisits
                                         visitlist = vlist $ map (\(v,f,t) ->
                                             _k_type     >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params     >#< pp_parens (_t_type     >|< "_v" >|< v >#< _t_params    )
                                              ) outg
                                         nextVisit = Map.findWithDefault ManyVis st nextVisits_
                                         decl = "data" >#< k_st >#< "k" >#< _t_params     >#< "where" >-< indent 3 visitlist
                                     in  case nextVisit of
                                           NoneVis  -> empty
                                           OneVis _ -> empty
                                           ManyVis  -> decl
                                     ) $ Set.toList _allstates
                                  {-# LINE 1352 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule104 #-}
   {-# LINE 444 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule104 = \ _genwrap _wr_inhs ->
                                  {-# LINE 444 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _genwrap     "Inh" _wr_inhs
                                  {-# LINE 1358 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule105 #-}
   {-# LINE 445 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule105 = \ _genwrap _wr_syns ->
                                  {-# LINE 445 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _genwrap     "Syn" _wr_syns
                                  {-# LINE 1364 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule106 #-}
   {-# LINE 446 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule106 = \ _addbang _t_params nt_ ->
                                  {-# LINE 446 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  \nm attr -> "data" >#< nm >|< "_" >|< nt_ >#< _t_params     >#< "=" >#< nm >|< "_" >|< nt_ >#< "{"
                                              >#< (ppCommas $ map (\(i,t) -> i >|< "_" >|< nm >|< "_" >|< nt_ >#< "::"
                                              >#< (_addbang     $ pp_parens $ typeToHaskellString (Just nt_) [] t)) attr) >#< "}"
                                  {-# LINE 1372 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule107 #-}
   {-# LINE 449 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule107 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->
                                  {-# LINE 449 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  fromJust $ Map.lookup nt_ _lhsIinhmap
                                  {-# LINE 1378 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule108 #-}
   {-# LINE 450 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule108 = \ _synAttrs _wr_filter ->
                                  {-# LINE 450 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  Map.toList $ _wr_filter     $ _synAttrs
                                  {-# LINE 1384 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule109 #-}
   {-# LINE 451 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule109 = \ _synAttrs ->
                                  {-# LINE 451 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  Map.toList _synAttrs
                                  {-# LINE 1390 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule110 #-}
   {-# LINE 452 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule110 = \ ((_lhsIoptions) :: Options) ->
                                   {-# LINE 452 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   if lateHigherOrderBinding _lhsIoptions
                                   then Map.delete idLateBindingAttr
                                   else id
                                   {-# LINE 1398 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule111 #-}
   {-# LINE 455 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule111 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->
                                  {-# LINE 455 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap
                                  {-# LINE 1404 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule112 #-}
   {-# LINE 456 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule112 = \ ((_lhsIoptions) :: Options) _wr_inhs ->
                                  {-# LINE 456 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  map (lhsname _lhsIoptions True . fst) _wr_inhs
                                  {-# LINE 1410 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule113 #-}
   {-# LINE 457 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule113 = \ ((_lhsIoptions) :: Options) _wr_inhs1 ->
                                  {-# LINE 457 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  map (lhsname _lhsIoptions True . fst) _wr_inhs1
                                  {-# LINE 1416 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule114 #-}
   {-# LINE 458 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule114 = \ ((_lhsIoptions) :: Options) _wr_syns ->
                                  {-# LINE 458 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  map (lhsname _lhsIoptions False . fst) _wr_syns
                                  {-# LINE 1422 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule115 #-}
   {-# LINE 459 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule115 = \ nt_ ->
                                  {-# LINE 459 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  "wrap_" ++ show nt_
                                  {-# LINE 1428 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule116 #-}
   {-# LINE 460 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule116 = \ nt_ ->
                                  {-# LINE 460 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  "Inh_" ++ show nt_
                                  {-# LINE 1434 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule117 #-}
   {-# LINE 461 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule117 = \ nt_ ->
                                  {-# LINE 461 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  "Syn_" ++ show nt_
                                  {-# LINE 1440 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule118 #-}
   {-# LINE 462 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule118 = \ initial_ nextVisits_ ->
                                        {-# LINE 462 "src-ag/ExecutionPlan2Hs.ag" #-}
                                        Map.findWithDefault ManyVis initial_ nextVisits_
                                        {-# LINE 1446 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule119 #-}
   {-# LINE 463 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule119 = \ _addbang _addbangWrap _classPP _inhlist _inhname _k_type ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) _quantPP _synlist _synname _t_params _t_type _wrapPragma _wrapname initial_ initialv_ nextVisits_ nt_ ->
                                  {-# LINE 463 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _wrapPragma
                                  >-< (_wrapname     >#< "::" >#< _quantPP     >#< _classPP     >#< _t_type     >#< _t_params     >#< "->"
                                        >#< _inhname     >#< _t_params     >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname     >#< _t_params    ))
                                  >-< (_wrapname     >#< (_addbang     $ pp_parens (_t_type     >#< pp "act"))
                                      >#< (_addbang     $ pp_parens (_inhname
                                             >#< (ppSpaced $ map (_addbangWrap     . pp) _inhlist    )) >#< "="))
                                  >-<
                                  indent 3 (case initialv_ of
                                    [] -> _synname     >#< " { }"
                                    initvs@(initv:_) ->
                                      let extra  = if dummyTokenVisit _lhsIoptions
                                                   then pp $ dummyArg _lhsIoptions True
                                                   else empty
                                          unMonad | monadicWrappers _lhsIoptions = empty
                                                  | otherwise                    = unMon _lhsIoptions
                                          genSteps _      []           = []
                                          genSteps curst (curv:nextvs) = setarg : dovis : genSteps nextst nextvs where
                                            inCon = conNmTVisitIn nt_ curv
                                            outCon = conNmTVisitOut nt_ curv
                                            pat    = _addbang     $ pp_parens $ pat0
                                            pat0   = outCon >#< ppSpaced (map (lhsname _lhsIoptions False) syns) >#< cont
                                            cont   | null nextvs = empty
                                                   | otherwise   = pp "sem"
                                            inhs = Set.toList $ Map.findWithDefault Set.empty curv _prodsIvisituses
                                            syns = Set.toList $ Map.findWithDefault Set.empty curv _prodsIvisitdefs
                                            arg = inCon >#< ppSpaced (map (lhsname _lhsIoptions True) inhs)
                                            setarg = "let" >#< _addbangWrap     (pp "arg" >|< curv) >#< "=" >#< arg
                                            ind    = case Map.findWithDefault ManyVis curst nextVisits_ of
                                                     NoneVis  -> error "wrapper: initial state should have a next visit but it has none"
                                                     OneVis _ -> empty
                                                     ManyVis  -> _k_type     >|< "_v" >|< initv
                                            nextst = curst + 1
                                            convert = case Map.lookup curv _lhsIallVisitKinds of
                                                        Just kind -> case kind of
                                                           VisitPure _  -> text "return"
                                                           VisitMonadic -> empty
                                            dovis  = pat >#< "<-" >#< convert >#< pp_parens
                                              ("inv_" >|< nt_ >|< "_s" >|< curst >#< "sem" >#< ind
                                              >#< "arg" >|< curv >#< extra)
                                      in unMonad >#< "("
                                         >-< indent 2 (
                                                "do" >#< ( _addbang     (pp "sem") >#< "<-" >#< "act"
                                                         >-< vlist (genSteps initial_ initvs)
                                                         >-< "return" >#< pp_parens (_synname     >#< ppSpaced _synlist    )
                                                         )
                                              )
                                         >-< ")" )
                                  >-< if lateHigherOrderBinding _lhsIoptions
                                      then indent 2 ("where" >#< lhsname _lhsIoptions True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)
                                      else empty
                                  {-# LINE 1501 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule120 #-}
   {-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule120 = \ ((_lhsIoptions) :: Options) _wrapname ->
                                    {-# LINE 515 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    if parallelInvoke _lhsIoptions && not (monadicWrappers _lhsIoptions)
                                    then ppNoInline _wrapname
                                    else if noInlinePragmas _lhsIoptions
                                         then empty
                                         else ppInlinable _wrapname
                                    {-# LINE 1511 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule121 #-}
   {-# LINE 527 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule121 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->
                        {-# LINE 527 "src-ag/ExecutionPlan2Hs.ag" #-}
                        _semFunBndDef     Seq.<| _prodsIsemFunBndDefs
                        {-# LINE 1517 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule122 #-}
   {-# LINE 528 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule122 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->
                        {-# LINE 528 "src-ag/ExecutionPlan2Hs.ag" #-}
                        _semFunBndTp     Seq.<| _prodsIsemFunBndTps
                        {-# LINE 1523 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule123 #-}
   {-# LINE 529 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule123 = \ _semFunBndNm _semname ->
                        {-# LINE 529 "src-ag/ExecutionPlan2Hs.ag" #-}
                        _semFunBndNm     >#< "=" >#< _semname
                        {-# LINE 1529 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule124 #-}
   {-# LINE 530 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule124 = \ _semFunBndNm _sem_tp ->
                        {-# LINE 530 "src-ag/ExecutionPlan2Hs.ag" #-}
                        _semFunBndNm     >#< "::" >#< _sem_tp
                        {-# LINE 1535 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule125 #-}
   {-# LINE 531 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule125 = \ nt_ ->
                        {-# LINE 531 "src-ag/ExecutionPlan2Hs.ag" #-}
                        lateSemNtLabel nt_
                        {-# LINE 1541 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule126 #-}
   {-# LINE 569 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule126 = \ initial_ ->
                                     {-# LINE 569 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     initial_
                                     {-# LINE 1547 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule127 #-}
   {-# LINE 570 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule127 = \ _allstates ->
                                     {-# LINE 570 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     _allstates
                                     {-# LINE 1553 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule128 #-}
   {-# LINE 1485 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule128 = \ ((_lhsIwrappers) :: Set NontermIdent) _sem_nt _wr_inh _wr_syn _wrapper nt_ ->
                                      {-# LINE 1485 "src-ag/ExecutionPlan2Hs.ag" #-}
                                      (if nt_ `Set.member` _lhsIwrappers
                                       then     _wr_inh
                                            >-< _wr_syn
                                            >-< _wrapper
                                       else empty)
                                      >-< _sem_nt
                                      {-# LINE 1564 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule129 #-}
   {-# LINE 1491 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule129 = \ _datatype _k_states ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init _t_states ->
                                      {-# LINE 1491 "src-ag/ExecutionPlan2Hs.ag" #-}
                                      (if dataTypes _lhsIoptions then _datatype     else empty)
                                      >-< _t_init
                                      >-< _t_states
                                      >-< _k_states
                                      >-< _prodsIt_visits
                                      {-# LINE 1574 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule130 #-}
   {-# LINE 1551 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule130 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1551 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 1580 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule131 #-}
   {-# LINE 1559 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule131 = \  (_ :: ()) ->
                                                        {-# LINE 1559 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                        id
                                                        {-# LINE 1586 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule132 #-}
   {-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule132 = \ nextVisits_ ->
                       {-# LINE 1571 "src-ag/ExecutionPlan2Hs.ag" #-}
                       nextVisits_
                       {-# LINE 1592 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule133 #-}
   {-# LINE 1572 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule133 = \ prevVisits_ ->
                       {-# LINE 1572 "src-ag/ExecutionPlan2Hs.ag" #-}
                       prevVisits_
                       {-# LINE 1598 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule134 #-}
   {-# LINE 1616 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule134 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->
                           {-# LINE 1616 "src-ag/ExecutionPlan2Hs.ag" #-}
                           Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes
                           {-# LINE 1604 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule135 #-}
   {-# LINE 1643 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule135 = \ initial_ nt_ ->
                     {-# LINE 1643 "src-ag/ExecutionPlan2Hs.ag" #-}
                     Map.singleton nt_ initial_
                     {-# LINE 1610 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule136 #-}
   {-# LINE 1657 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule136 = \ nt_ params_ ->
                 {-# LINE 1657 "src-ag/ExecutionPlan2Hs.ag" #-}
                 NT nt_ (map show params_) False
                 {-# LINE 1616 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule137 #-}
   rule137 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _prodsIchildvisit
   {-# INLINE rule138 #-}
   rule138 = \ ((_prodsIerrors) :: Seq Error) ->
     _prodsIerrors
   {-# INLINE rule139 #-}
   rule139 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _prodsIfromToStates
   {-# INLINE rule140 #-}
   rule140 = \ ((_prodsIgenProdIO) :: IO ()) ->
     _prodsIgenProdIO
   {-# INLINE rule141 #-}
   rule141 = \ ((_prodsIimports) :: [PP_Doc]) ->
     _prodsIimports
   {-# INLINE rule142 #-}
   rule142 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     _prodsIvisitKinds
   {-# INLINE rule143 #-}
   rule143 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _prodsIvisitdefs
   {-# INLINE rule144 #-}
   rule144 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _prodsIvisituses
   {-# INLINE rule145 #-}
   rule145 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule146 #-}
   rule146 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule147 #-}
   rule147 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule148 #-}
   rule148 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule149 #-}
   rule149 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule150 #-}
   rule150 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule151 #-}
   rule151 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule152 #-}
   rule152 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule153 #-}
   rule153 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule154 #-}
   rule154 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule155 #-}
   rule155 = \ _ntType ->
     _ntType
   {-# INLINE rule156 #-}
   rule156 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule157 #-}
   rule157 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule158 #-}
   rule158 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks

-- ENonterminals -----------------------------------------------
-- wrapper
data Inh_ENonterminals  = Inh_ENonterminals { Inh_ENonterminals -> Map Int (Int, Int)
allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), Inh_ENonterminals -> Map Identifier Int
allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), Inh_ENonterminals -> Map Int VisitKind
allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), Inh_ENonterminals
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_ENonterminals -> Map Int (Set Identifier)
avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminals -> Map Int (Set Identifier)
avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), Inh_ENonterminals -> Derivings
derivings_Inh_ENonterminals :: (Derivings), Inh_ENonterminals -> PP_Doc
importBlocks_Inh_ENonterminals :: (PP_Doc), Inh_ENonterminals -> Map Identifier Attributes
inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), Inh_ENonterminals -> Map Identifier (Map Identifier Attributes)
localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), Inh_ENonterminals -> [Char]
mainFile_Inh_ENonterminals :: (String), Inh_ENonterminals -> [Char]
mainName_Inh_ENonterminals :: (String), Inh_ENonterminals -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String), Inh_ENonterminals -> Options
options_Inh_ENonterminals :: (Options), Inh_ENonterminals -> [Char]
pragmaBlocks_Inh_ENonterminals :: (String), Inh_ENonterminals -> Map Identifier Attributes
synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), Inh_ENonterminals -> PP_Doc
textBlocks_Inh_ENonterminals :: (PP_Doc), Inh_ENonterminals -> TypeSyns
typeSyns_Inh_ENonterminals :: (TypeSyns), Inh_ENonterminals -> Set Identifier
wrappers_Inh_ENonterminals :: (Set NontermIdent) }
data Syn_ENonterminals  = Syn_ENonterminals { Syn_ENonterminals -> [PP_Doc]
appendCommon_Syn_ENonterminals :: ([PP_Doc]), Syn_ENonterminals -> [PP_Doc]
appendMain_Syn_ENonterminals :: ([PP_Doc]), Syn_ENonterminals
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_ENonterminals -> Seq Error
errors_Syn_ENonterminals :: (Seq Error), Syn_ENonterminals -> Map Int (Int, Int)
fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), Syn_ENonterminals -> IO ()
genProdIO_Syn_ENonterminals :: (IO ()), Syn_ENonterminals -> [PP_Doc]
imports_Syn_ENonterminals :: ([PP_Doc]), Syn_ENonterminals -> Map Identifier Int
initStates_Syn_ENonterminals :: (Map NontermIdent Int), Syn_ENonterminals -> PP_Doc
output_Syn_ENonterminals :: (PP_Doc), Syn_ENonterminals -> Seq PP_Doc
semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), Syn_ENonterminals -> Seq PP_Doc
semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), Syn_ENonterminals -> Map Int VisitKind
visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), Syn_ENonterminals -> Map Int (Set Identifier)
visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), Syn_ENonterminals -> Map Int (Set Identifier)
visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_ENonterminals #-}
wrap_ENonterminals :: T_ENonterminals  -> Inh_ENonterminals  -> (Syn_ENonterminals )
wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> Syn_ENonterminals
wrap_ENonterminals (T_ENonterminals Identity T_ENonterminals_s11
act) (Inh_ENonterminals Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) =
   Identity Syn_ENonterminals -> Syn_ENonterminals
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_ENonterminals_s11
sem <- Identity T_ENonterminals_s11
act
        let arg10 :: T_ENonterminals_vIn10
arg10 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Derivings
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminals_vIn10
T_ENonterminals_vIn10 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers
        (T_ENonterminals_vOut10 [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_ENonterminals_vOut10 -> Identity T_ENonterminals_vOut10
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 T_ENonterminals_s11
sem T_ENonterminals_vIn10
arg10)
        Syn_ENonterminals -> Identity Syn_ENonterminals
forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc]
-> [PP_Doc]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_ENonterminals
Syn_ENonterminals [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
   )

-- cata
{-# NOINLINE sem_ENonterminals #-}
sem_ENonterminals :: ENonterminals  -> T_ENonterminals 
sem_ENonterminals :: ENonterminals -> T_ENonterminals
sem_ENonterminals ENonterminals
list = (T_ENonterminal -> T_ENonterminals -> T_ENonterminals)
-> T_ENonterminals -> [T_ENonterminal] -> T_ENonterminals
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_ENonterminal -> T_ENonterminals -> T_ENonterminals
sem_ENonterminals_Cons T_ENonterminals
sem_ENonterminals_Nil ((ENonterminal -> T_ENonterminal)
-> ENonterminals -> [T_ENonterminal]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map ENonterminal -> T_ENonterminal
sem_ENonterminal ENonterminals
list)

-- semantic domain
newtype T_ENonterminals  = T_ENonterminals {
                                           T_ENonterminals -> Identity T_ENonterminals_s11
attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )
                                           }
newtype T_ENonterminals_s11  = C_ENonterminals_s11 {
                                                   T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 :: (T_ENonterminals_v10 )
                                                   }
data T_ENonterminals_s12  = C_ENonterminals_s12
type T_ENonterminals_v10  = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )
data T_ENonterminals_vIn10  = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Derivings) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)
data T_ENonterminals_vOut10  = T_ENonterminals_vOut10 ([PP_Doc]) ([PP_Doc]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_ENonterminals_Cons #-}
sem_ENonterminals_Cons :: T_ENonterminal  -> T_ENonterminals  -> T_ENonterminals 
sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals
sem_ENonterminals_Cons T_ENonterminal
arg_hd_ T_ENonterminals
arg_tl_ = Identity T_ENonterminals_s11 -> T_ENonterminals
T_ENonterminals (T_ENonterminals_s11 -> Identity T_ENonterminals_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_ENonterminals_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_ENonterminals_s11
st11 = let
      v10 :: T_ENonterminals_v10 
      v10 :: T_ENonterminals_v10
v10 = \ (T_ENonterminals_vIn10 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
         _hdX8 :: T_ENonterminal_s8
_hdX8 = Identity T_ENonterminal_s8 -> T_ENonterminal_s8
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ENonterminal -> Identity T_ENonterminal_s8
attach_T_ENonterminal (T_ENonterminal
arg_hd_))
         _tlX11 :: T_ENonterminals_s11
_tlX11 = Identity T_ENonterminals_s11 -> T_ENonterminals_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ENonterminals -> Identity T_ENonterminals_s11
attach_T_ENonterminals (T_ENonterminals
arg_tl_))
         (T_ENonterminal_vOut7 PP_Doc
_hdIappendCommon PP_Doc
_hdIappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates IO ()
_hdIgenProdIO [PP_Doc]
_hdIimports Map Identifier Int
_hdIinitStates PP_Doc
_hdIoutput Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_hdIsemFunBndTps Map Int VisitKind
_hdIvisitKinds Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_hdIvisituses) = T_ENonterminal_s8 -> T_ENonterminal_v7
inv_ENonterminal_s8 T_ENonterminal_s8
_hdX8 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Derivings
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminal_vIn7
T_ENonterminal_vIn7 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Int
_hdOallInitStates Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Derivings
_hdOderivings PP_Doc
_hdOimportBlocks Map Identifier Attributes
_hdOinhmap Map Identifier (Map Identifier Attributes)
_hdOlocalAttrTypes [Char]
_hdOmainFile [Char]
_hdOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader Options
_hdOoptions [Char]
_hdOpragmaBlocks Map Identifier Attributes
_hdOsynmap PP_Doc
_hdOtextBlocks TypeSyns
_hdOtypeSyns Set Identifier
_hdOwrappers)
         (T_ENonterminals_vOut10 [PP_Doc]
_tlIappendCommon [PP_Doc]
_tlIappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates IO ()
_tlIgenProdIO [PP_Doc]
_tlIimports Map Identifier Int
_tlIinitStates PP_Doc
_tlIoutput Seq PP_Doc
_tlIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndTps Map Int VisitKind
_tlIvisitKinds Map Int (Set Identifier)
_tlIvisitdefs Map Int (Set Identifier)
_tlIvisituses) = T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 T_ENonterminals_s11
_tlX11 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Derivings
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminals_vIn10
T_ENonterminals_vIn10 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Int
_tlOallInitStates Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Derivings
_tlOderivings PP_Doc
_tlOimportBlocks Map Identifier Attributes
_tlOinhmap Map Identifier (Map Identifier Attributes)
_tlOlocalAttrTypes [Char]
_tlOmainFile [Char]
_tlOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader Options
_tlOoptions [Char]
_tlOpragmaBlocks Map Identifier Attributes
_tlOsynmap PP_Doc
_tlOtextBlocks TypeSyns
_tlOtypeSyns Set Identifier
_tlOwrappers)
         _lhsOappendCommon :: [PP_Doc]
         _lhsOappendCommon :: [PP_Doc]
_lhsOappendCommon = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule159 PP_Doc
_hdIappendCommon [PP_Doc]
_tlIappendCommon
         _lhsOappendMain :: [PP_Doc]
         _lhsOappendMain :: [PP_Doc]
_lhsOappendMain = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule160 PP_Doc
_hdIappendMain [PP_Doc]
_tlIappendMain
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule161 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule162 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule163 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
         _lhsOgenProdIO :: IO ()
         _lhsOgenProdIO :: IO ()
_lhsOgenProdIO = IO () -> IO () -> IO ()
rule164 IO ()
_hdIgenProdIO IO ()
_tlIgenProdIO
         _lhsOimports :: [PP_Doc]
         _lhsOimports :: [PP_Doc]
_lhsOimports = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule165 [PP_Doc]
_hdIimports [PP_Doc]
_tlIimports
         _lhsOinitStates :: Map NontermIdent Int
         _lhsOinitStates :: Map Identifier Int
_lhsOinitStates = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule166 Map Identifier Int
_hdIinitStates Map Identifier Int
_tlIinitStates
         _lhsOoutput :: PP_Doc
         _lhsOoutput :: PP_Doc
_lhsOoutput = PP_Doc -> PP_Doc -> PP_Doc
rule167 PP_Doc
_hdIoutput PP_Doc
_tlIoutput
         _lhsOsemFunBndDefs :: Seq PP_Doc
         _lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule168 Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndDefs
         _lhsOsemFunBndTps :: Seq PP_Doc
         _lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule169 Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc
_tlIsemFunBndTps
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule170 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule171 Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_tlIvisitdefs
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule172 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
         _hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule173 Map Int (Int, Int)
_lhsIallFromToStates
         _hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule174 Map Identifier Int
_lhsIallInitStates
         _hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule175 Map Int VisitKind
_lhsIallVisitKinds
         _hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule176 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule177 Map Int (Set Identifier)
_lhsIavisitdefs
         _hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule178 Map Int (Set Identifier)
_lhsIavisituses
         _hdOderivings :: Derivings
_hdOderivings = Derivings -> Derivings
rule179 Derivings
_lhsIderivings
         _hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule180 PP_Doc
_lhsIimportBlocks
         _hdOinhmap :: Map Identifier Attributes
_hdOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule181 Map Identifier Attributes
_lhsIinhmap
         _hdOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_hdOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule182 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
         _hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule183 [Char]
_lhsImainFile
         _hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule184 [Char]
_lhsImainName
         _hdOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule185 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule186 Options
_lhsIoptions
         _hdOpragmaBlocks :: [Char]
_hdOpragmaBlocks = [Char] -> [Char]
rule187 [Char]
_lhsIpragmaBlocks
         _hdOsynmap :: Map Identifier Attributes
_hdOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule188 Map Identifier Attributes
_lhsIsynmap
         _hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule189 PP_Doc
_lhsItextBlocks
         _hdOtypeSyns :: TypeSyns
_hdOtypeSyns = TypeSyns -> TypeSyns
rule190 TypeSyns
_lhsItypeSyns
         _hdOwrappers :: Set Identifier
_hdOwrappers = Set Identifier -> Set Identifier
rule191 Set Identifier
_lhsIwrappers
         _tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule192 Map Int (Int, Int)
_lhsIallFromToStates
         _tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule193 Map Identifier Int
_lhsIallInitStates
         _tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule194 Map Int VisitKind
_lhsIallVisitKinds
         _tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule195 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule196 Map Int (Set Identifier)
_lhsIavisitdefs
         _tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule197 Map Int (Set Identifier)
_lhsIavisituses
         _tlOderivings :: Derivings
_tlOderivings = Derivings -> Derivings
rule198 Derivings
_lhsIderivings
         _tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule199 PP_Doc
_lhsIimportBlocks
         _tlOinhmap :: Map Identifier Attributes
_tlOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule200 Map Identifier Attributes
_lhsIinhmap
         _tlOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_tlOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule201 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
         _tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule202 [Char]
_lhsImainFile
         _tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule203 [Char]
_lhsImainName
         _tlOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule204 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule205 Options
_lhsIoptions
         _tlOpragmaBlocks :: [Char]
_tlOpragmaBlocks = [Char] -> [Char]
rule206 [Char]
_lhsIpragmaBlocks
         _tlOsynmap :: Map Identifier Attributes
_tlOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule207 Map Identifier Attributes
_lhsIsynmap
         _tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule208 PP_Doc
_lhsItextBlocks
         _tlOtypeSyns :: TypeSyns
_tlOtypeSyns = TypeSyns -> TypeSyns
rule209 TypeSyns
_lhsItypeSyns
         _tlOwrappers :: Set Identifier
_tlOwrappers = Set Identifier -> Set Identifier
rule210 Set Identifier
_lhsIwrappers
         __result_ :: T_ENonterminals_vOut10
__result_ = [PP_Doc]
-> [PP_Doc]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_ENonterminals_vOut10
T_ENonterminals_vOut10 [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_ENonterminals_vOut10
__result_ )
     in T_ENonterminals_v10 -> T_ENonterminals_s11
C_ENonterminals_s11 T_ENonterminals_v10
v10
   {-# INLINE rule159 #-}
   rule159 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule159 = \ ((PP_Doc
_hdIappendCommon) ::  PP_Doc ) (([PP_Doc]
_tlIappendCommon) :: [PP_Doc]) ->
     PP_Doc
_hdIappendCommon PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIappendCommon
   {-# INLINE rule160 #-}
   rule160 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule160 = \ ((PP_Doc
_hdIappendMain) ::  PP_Doc ) (([PP_Doc]
_tlIappendMain) :: [PP_Doc]) ->
     PP_Doc
_hdIappendMain PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIappendMain
   {-# INLINE rule161 #-}
   rule161 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule161 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
   {-# INLINE rule162 #-}
   rule162 :: Seq Error -> Seq Error -> Seq Error
rule162 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule163 #-}
   rule163 :: Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule163 = \ ((Map Int (Int, Int)
_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((Map Int (Int, Int)
_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
     Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
forall a. Monoid a => a -> a -> a
`mappend` Map Int (Int, Int)
_tlIfromToStates
   {-# INLINE rule164 #-}
   rule164 :: IO () -> IO () -> IO ()
rule164 = \ ((IO ()
_hdIgenProdIO) :: IO ()) ((IO ()
_tlIgenProdIO) :: IO ()) ->
     IO ()
_hdIgenProdIO IO () -> IO () -> IO ()
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> IO ()
_tlIgenProdIO
   {-# INLINE rule165 #-}
   rule165 :: [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule165 = \ (([PP_Doc]
_hdIimports) :: [PP_Doc]) (([PP_Doc]
_tlIimports) :: [PP_Doc]) ->
     [PP_Doc]
_hdIimports [PP_Doc] -> [PP_Doc] -> [PP_Doc]
forall a. [a] -> [a] -> [a]
++ [PP_Doc]
_tlIimports
   {-# INLINE rule166 #-}
   rule166 :: Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule166 = \ ((Map Identifier Int
_hdIinitStates) :: Map NontermIdent Int) ((Map Identifier Int
_tlIinitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_hdIinitStates Map Identifier Int -> Map Identifier Int -> Map Identifier Int
forall a. Monoid a => a -> a -> a
`mappend` Map Identifier Int
_tlIinitStates
   {-# INLINE rule167 #-}
   rule167 :: PP_Doc -> PP_Doc -> PP_Doc
rule167 = \ ((PP_Doc
_hdIoutput) :: PP_Doc) ((PP_Doc
_tlIoutput) :: PP_Doc) ->
     PP_Doc
_hdIoutput PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIoutput
   {-# INLINE rule168 #-}
   rule168 :: Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule168 = \ ((Seq PP_Doc
_hdIsemFunBndDefs) :: Seq PP_Doc) ((Seq PP_Doc
_tlIsemFunBndDefs) :: Seq PP_Doc) ->
     Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq PP_Doc
_tlIsemFunBndDefs
   {-# INLINE rule169 #-}
   rule169 :: Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule169 = \ ((Seq PP_Doc
_hdIsemFunBndTps) :: Seq PP_Doc) ((Seq PP_Doc
_tlIsemFunBndTps) :: Seq PP_Doc) ->
     Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq PP_Doc
_tlIsemFunBndTps
   {-# INLINE rule170 #-}
   rule170 :: Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule170 = \ ((Map Int VisitKind
_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((Map Int VisitKind
_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     Map Int VisitKind
_hdIvisitKinds Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
forall a. Monoid a => a -> a -> a
`mappend` Map Int VisitKind
_tlIvisitKinds
   {-# INLINE rule171 #-}
   rule171 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule171 = \ ((Map Int (Set Identifier)
_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisitdefs
   {-# INLINE rule172 #-}
   rule172 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule172 = \ ((Map Int (Set Identifier)
_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisituses
   {-# INLINE rule173 #-}
   rule173 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule173 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     Map Int (Int, Int)
_lhsIallFromToStates
   {-# INLINE rule174 #-}
   rule174 :: Map Identifier Int -> Map Identifier Int
rule174 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_lhsIallInitStates
   {-# INLINE rule175 #-}
   rule175 :: Map Int VisitKind -> Map Int VisitKind
rule175 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     Map Int VisitKind
_lhsIallVisitKinds
   {-# INLINE rule176 #-}
   rule176 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule176 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
   {-# INLINE rule177 #-}
   rule177 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule177 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisitdefs
   {-# INLINE rule178 #-}
   rule178 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule178 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisituses
   {-# INLINE rule179 #-}
   rule179 :: Derivings -> Derivings
rule179 = \ ((Derivings
_lhsIderivings) :: Derivings) ->
     Derivings
_lhsIderivings
   {-# INLINE rule180 #-}
   rule180 :: PP_Doc -> PP_Doc
rule180 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
     PP_Doc
_lhsIimportBlocks
   {-# INLINE rule181 #-}
   rule181 :: Map Identifier Attributes -> Map Identifier Attributes
rule181 = \ ((Map Identifier Attributes
_lhsIinhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIinhmap
   {-# INLINE rule182 #-}
   rule182 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule182 = \ ((Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
     Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
   {-# INLINE rule183 #-}
   rule183 :: [Char] -> [Char]
rule183 = \ (([Char]
_lhsImainFile) :: String) ->
     [Char]
_lhsImainFile
   {-# INLINE rule184 #-}
   rule184 :: [Char] -> [Char]
rule184 = \ (([Char]
_lhsImainName) :: String) ->
     [Char]
_lhsImainName
   {-# INLINE rule185 #-}
   rule185 :: ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule185 = \ (([Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
   {-# INLINE rule186 #-}
   rule186 :: Options -> Options
rule186 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule187 #-}
   rule187 :: [Char] -> [Char]
rule187 = \ (([Char]
_lhsIpragmaBlocks) :: String) ->
     [Char]
_lhsIpragmaBlocks
   {-# INLINE rule188 #-}
   rule188 :: Map Identifier Attributes -> Map Identifier Attributes
rule188 = \ ((Map Identifier Attributes
_lhsIsynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIsynmap
   {-# INLINE rule189 #-}
   rule189 :: PP_Doc -> PP_Doc
rule189 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
     PP_Doc
_lhsItextBlocks
   {-# INLINE rule190 #-}
   rule190 :: TypeSyns -> TypeSyns
rule190 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
     TypeSyns
_lhsItypeSyns
   {-# INLINE rule191 #-}
   rule191 :: Set Identifier -> Set Identifier
rule191 = \ ((Set Identifier
_lhsIwrappers) :: Set NontermIdent) ->
     Set Identifier
_lhsIwrappers
   {-# INLINE rule192 #-}
   rule192 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule192 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     Map Int (Int, Int)
_lhsIallFromToStates
   {-# INLINE rule193 #-}
   rule193 :: Map Identifier Int -> Map Identifier Int
rule193 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_lhsIallInitStates
   {-# INLINE rule194 #-}
   rule194 :: Map Int VisitKind -> Map Int VisitKind
rule194 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     Map Int VisitKind
_lhsIallVisitKinds
   {-# INLINE rule195 #-}
   rule195 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule195 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
   {-# INLINE rule196 #-}
   rule196 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule196 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisitdefs
   {-# INLINE rule197 #-}
   rule197 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule197 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisituses
   {-# INLINE rule198 #-}
   rule198 :: Derivings -> Derivings
rule198 = \ ((Derivings
_lhsIderivings) :: Derivings) ->
     Derivings
_lhsIderivings
   {-# INLINE rule199 #-}
   rule199 :: PP_Doc -> PP_Doc
rule199 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
     PP_Doc
_lhsIimportBlocks
   {-# INLINE rule200 #-}
   rule200 :: Map Identifier Attributes -> Map Identifier Attributes
rule200 = \ ((Map Identifier Attributes
_lhsIinhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIinhmap
   {-# INLINE rule201 #-}
   rule201 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule201 = \ ((Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
     Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
   {-# INLINE rule202 #-}
   rule202 :: [Char] -> [Char]
rule202 = \ (([Char]
_lhsImainFile) :: String) ->
     [Char]
_lhsImainFile
   {-# INLINE rule203 #-}
   rule203 :: [Char] -> [Char]
rule203 = \ (([Char]
_lhsImainName) :: String) ->
     [Char]
_lhsImainName
   {-# INLINE rule204 #-}
   rule204 :: ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule204 = \ (([Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
   {-# INLINE rule205 #-}
   rule205 :: Options -> Options
rule205 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule206 #-}
   rule206 :: [Char] -> [Char]
rule206 = \ (([Char]
_lhsIpragmaBlocks) :: String) ->
     [Char]
_lhsIpragmaBlocks
   {-# INLINE rule207 #-}
   rule207 :: Map Identifier Attributes -> Map Identifier Attributes
rule207 = \ ((Map Identifier Attributes
_lhsIsynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIsynmap
   {-# INLINE rule208 #-}
   rule208 :: PP_Doc -> PP_Doc
rule208 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
     PP_Doc
_lhsItextBlocks
   {-# INLINE rule209 #-}
   rule209 :: TypeSyns -> TypeSyns
rule209 = \ ((TypeSyns
_lhsItypeSyns) :: TypeSyns) ->
     TypeSyns
_lhsItypeSyns
   {-# INLINE rule210 #-}
   rule210 :: Set Identifier -> Set Identifier
rule210 = \ ((Set Identifier
_lhsIwrappers) :: Set NontermIdent) ->
     Set Identifier
_lhsIwrappers
{-# NOINLINE sem_ENonterminals_Nil #-}
sem_ENonterminals_Nil ::  T_ENonterminals 
sem_ENonterminals_Nil :: T_ENonterminals
sem_ENonterminals_Nil  = Identity T_ENonterminals_s11 -> T_ENonterminals
T_ENonterminals (T_ENonterminals_s11 -> Identity T_ENonterminals_s11
forall (m :: * -> *) a. Monad m => a -> m a
return T_ENonterminals_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_ENonterminals_s11
st11 = let
      v10 :: T_ENonterminals_v10 
      v10 :: T_ENonterminals_v10
v10 = \ (T_ENonterminals_vIn10 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Derivings
_lhsIderivings PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks TypeSyns
_lhsItypeSyns Set Identifier
_lhsIwrappers) -> ( let
         _lhsOappendCommon :: [PP_Doc]
         _lhsOappendCommon :: [PP_Doc]
_lhsOappendCommon = () -> [PP_Doc]
forall a. () -> [a]
rule211  ()
         _lhsOappendMain :: [PP_Doc]
         _lhsOappendMain :: [PP_Doc]
_lhsOappendMain = () -> [PP_Doc]
forall a. () -> [a]
rule212  ()
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = ()
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. () -> Map k a
rule213  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule214  ()
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule215  ()
         _lhsOgenProdIO :: IO ()
         _lhsOgenProdIO :: IO ()
_lhsOgenProdIO = () -> IO ()
rule216  ()
         _lhsOimports :: [PP_Doc]
         _lhsOimports :: [PP_Doc]
_lhsOimports = () -> [PP_Doc]
forall a. () -> [a]
rule217  ()
         _lhsOinitStates :: Map NontermIdent Int
         _lhsOinitStates :: Map Identifier Int
_lhsOinitStates = () -> Map Identifier Int
rule218  ()
         _lhsOoutput :: PP_Doc
         _lhsOoutput :: PP_Doc
_lhsOoutput = () -> PP_Doc
rule219  ()
         _lhsOsemFunBndDefs :: Seq PP_Doc
         _lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = () -> Seq PP_Doc
forall a. () -> Seq a
rule220  ()
         _lhsOsemFunBndTps :: Seq PP_Doc
         _lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = () -> Seq PP_Doc
forall a. () -> Seq a
rule221  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule222  ()
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule223  ()
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule224  ()
         __result_ :: T_ENonterminals_vOut10
__result_ = [PP_Doc]
-> [PP_Doc]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Map Identifier Int
-> PP_Doc
-> Seq PP_Doc
-> Seq PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_ENonterminals_vOut10
T_ENonterminals_vOut10 [PP_Doc]
_lhsOappendCommon [PP_Doc]
_lhsOappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Map Identifier Int
_lhsOinitStates PP_Doc
_lhsOoutput Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_ENonterminals_vOut10
__result_ )
     in T_ENonterminals_v10 -> T_ENonterminals_s11
C_ENonterminals_s11 T_ENonterminals_v10
v10
   {-# INLINE rule211 #-}
   rule211 :: () -> [a]
rule211 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule212 #-}
   rule212 :: () -> [a]
rule212 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule213 #-}
   rule213 :: () -> Map k a
rule213 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule214 #-}
   rule214 :: () -> Seq a
rule214 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule215 #-}
   rule215 :: () -> Map Int (Int, Int)
rule215 = \  (()
_ :: ()) ->
     Map Int (Int, Int)
forall a. Monoid a => a
mempty
   {-# INLINE rule216 #-}
   rule216 :: () -> IO ()
rule216 = \  (()
_ :: ()) ->
     () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
   {-# INLINE rule217 #-}
   rule217 :: () -> [a]
rule217 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule218 #-}
   rule218 :: () -> Map Identifier Int
rule218 = \  (()
_ :: ()) ->
     Map Identifier Int
forall a. Monoid a => a
mempty
   {-# INLINE rule219 #-}
   rule219 :: () -> PP_Doc
rule219 = \  (()
_ :: ()) ->
     PP_Doc
empty
   {-# INLINE rule220 #-}
   rule220 :: () -> Seq a
rule220 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule221 #-}
   rule221 :: () -> Seq a
rule221 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule222 #-}
   rule222 :: () -> Map Int VisitKind
rule222 = \  (()
_ :: ()) ->
     Map Int VisitKind
forall a. Monoid a => a
mempty
   {-# INLINE rule223 #-}
   rule223 :: () -> Map k a
rule223 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule224 #-}
   rule224 :: () -> Map k a
rule224 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty

-- EProduction -------------------------------------------------
-- wrapper
data Inh_EProduction  = Inh_EProduction { Inh_EProduction -> Map Int (Int, Int)
allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), Inh_EProduction -> Map Identifier Attributes
allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), Inh_EProduction -> Map Identifier Int
allInitStates_Inh_EProduction :: (Map NontermIdent Int), Inh_EProduction -> Map Identifier Attributes
allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), Inh_EProduction -> Map Int VisitKind
allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), Inh_EProduction
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_EProduction -> Set Int
allstates_Inh_EProduction :: (Set StateIdentifier), Inh_EProduction -> Map Int (Set Identifier)
avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), Inh_EProduction -> Map Int (Set Identifier)
avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), Inh_EProduction -> ClassContext
classCtxs_Inh_EProduction :: (ClassContext), Inh_EProduction -> PP_Doc
importBlocks_Inh_EProduction :: (PP_Doc), Inh_EProduction -> Attributes
inhmap_Inh_EProduction :: (Attributes), Inh_EProduction -> Int
initial_Inh_EProduction :: (StateIdentifier), Inh_EProduction -> Map Identifier Attributes
localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), Inh_EProduction -> [Char]
mainFile_Inh_EProduction :: (String), Inh_EProduction -> [Char]
mainName_Inh_EProduction :: (String), Inh_EProduction -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String), Inh_EProduction -> Map Int StateCtx
nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), Inh_EProduction -> Identifier
nt_Inh_EProduction :: (NontermIdent), Inh_EProduction -> Type
ntType_Inh_EProduction :: (Type), Inh_EProduction -> Options
options_Inh_EProduction :: (Options), Inh_EProduction -> [Identifier]
params_Inh_EProduction :: ([Identifier]), Inh_EProduction -> [Char]
pragmaBlocks_Inh_EProduction :: (String), Inh_EProduction -> Map Int StateCtx
prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), Inh_EProduction -> Bool
rename_Inh_EProduction :: (Bool), Inh_EProduction -> Attributes
synmap_Inh_EProduction :: (Attributes), Inh_EProduction -> PP_Doc
textBlocks_Inh_EProduction :: (PP_Doc) }
data Syn_EProduction  = Syn_EProduction { Syn_EProduction -> [VisitStateState]
allvisits_Syn_EProduction :: ([VisitStateState]), Syn_EProduction
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_EProduction -> Int
count_Syn_EProduction :: (Int), Syn_EProduction -> PP_Doc
datatype_Syn_EProduction :: (PP_Doc), Syn_EProduction -> Seq Error
errors_Syn_EProduction :: (Seq Error), Syn_EProduction -> Map Int (Int, Int)
fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), Syn_EProduction -> IO ()
genProdIO_Syn_EProduction :: (IO ()), Syn_EProduction -> [PP_Doc]
imports_Syn_EProduction :: ([PP_Doc]), Syn_EProduction -> Seq PP_Doc
semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), Syn_EProduction -> Seq PP_Doc
semFunBndTps_Syn_EProduction :: (Seq PP_Doc), Syn_EProduction -> PP_Doc
sem_nt_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
sem_prod_Syn_EProduction :: (PP_Doc), Syn_EProduction -> PP_Doc
t_visits_Syn_EProduction :: (PP_Doc), Syn_EProduction -> Map Int VisitKind
visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), Syn_EProduction -> Map Int (Set Identifier)
visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), Syn_EProduction -> Map Int (Set Identifier)
visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_EProduction #-}
wrap_EProduction :: T_EProduction  -> Inh_EProduction  -> (Syn_EProduction )
wrap_EProduction :: T_EProduction -> Inh_EProduction -> Syn_EProduction
wrap_EProduction (T_EProduction Identity T_EProduction_s14
act) (Inh_EProduction Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) =
   Identity Syn_EProduction -> Syn_EProduction
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_EProduction_s14
sem <- Identity T_EProduction_s14
act
        let arg13 :: T_EProduction_vIn13
arg13 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> [Char]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProduction_vIn13
T_EProduction_vIn13 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks
        (T_EProduction_vOut13 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_EProduction_vOut13 -> Identity T_EProduction_vOut13
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EProduction_s14 -> T_EProduction_v13
inv_EProduction_s14 T_EProduction_s14
sem T_EProduction_vIn13
arg13)
        Syn_EProduction -> Identity Syn_EProduction
forall (m :: * -> *) a. Monad m => a -> m a
return ([VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_EProduction
Syn_EProduction [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
   )

-- cata
{-# INLINE sem_EProduction #-}
sem_EProduction :: EProduction  -> T_EProduction 
sem_EProduction :: EProduction -> T_EProduction
sem_EProduction ( EProduction Identifier
con_ [Identifier]
params_ [Type]
constraints_ ERules
rules_ EChildren
children_ Visits
visits_ ) = Identifier
-> [Identifier]
-> [Type]
-> T_ERules
-> T_EChildren
-> T_Visits
-> T_EProduction
sem_EProduction_EProduction Identifier
con_ [Identifier]
params_ [Type]
constraints_ ( ERules -> T_ERules
sem_ERules ERules
rules_ ) ( EChildren -> T_EChildren
sem_EChildren EChildren
children_ ) ( Visits -> T_Visits
sem_Visits Visits
visits_ )

-- semantic domain
newtype T_EProduction  = T_EProduction {
                                       T_EProduction -> Identity T_EProduction_s14
attach_T_EProduction :: Identity (T_EProduction_s14 )
                                       }
newtype T_EProduction_s14  = C_EProduction_s14 {
                                               T_EProduction_s14 -> T_EProduction_v13
inv_EProduction_s14 :: (T_EProduction_v13 )
                                               }
data T_EProduction_s15  = C_EProduction_s15
type T_EProduction_v13  = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )
data T_EProduction_vIn13  = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (String -> String -> String -> Bool -> String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (String) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)
data T_EProduction_vOut13  = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_EProduction_EProduction #-}
sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules  -> T_EChildren  -> T_Visits  -> T_EProduction 
sem_EProduction_EProduction :: Identifier
-> [Identifier]
-> [Type]
-> T_ERules
-> T_EChildren
-> T_Visits
-> T_EProduction
sem_EProduction_EProduction Identifier
arg_con_ [Identifier]
arg_params_ [Type]
arg_constraints_ T_ERules
arg_rules_ T_EChildren
arg_children_ T_Visits
arg_visits_ = Identity T_EProduction_s14 -> T_EProduction
T_EProduction (T_EProduction_s14 -> Identity T_EProduction_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_EProduction_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_EProduction_s14
st14 = let
      v13 :: T_EProduction_v13 
      v13 :: T_EProduction_v13
v13 = \ (T_EProduction_vIn13 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) -> ( let
         _rulesX23 :: T_ERules_s23
_rulesX23 = Identity T_ERules_s23 -> T_ERules_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ERules -> Identity T_ERules_s23
attach_T_ERules (T_ERules
arg_rules_))
         _childrenX5 :: T_EChildren_s5
_childrenX5 = Identity T_EChildren_s5 -> T_EChildren_s5
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EChildren -> Identity T_EChildren_s5
attach_T_EChildren (T_EChildren
arg_children_))
         _visitsX56 :: T_Visits_s56
_visitsX56 = Identity T_Visits_s56 -> T_Visits_s56
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Visits -> Identity T_Visits_s56
attach_T_Visits (T_Visits
arg_visits_))
         (T_ERules_vOut22 Seq Error
_rulesIerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_rulesImrules Map Identifier (Set [Char])
_rulesIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_rulesIruleuses PP_Doc
_rulesIsem_rules Set [Char]
_rulesIusedArgs) = T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
_rulesX23 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> PP_Doc
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_rulesOallInhmap Map Identifier Attributes
_rulesOallSynmap Attributes
_rulesOchildTypes Identifier
_rulesOcon PP_Doc
_rulesOimportBlocks Attributes
_rulesOinhmap Set [Char]
_rulesOlazyIntras Attributes
_rulesOlocalAttrTypes [Char]
_rulesOmainFile [Char]
_rulesOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_rulesOmoduleHeader Identifier
_rulesOnt Options
_rulesOoptions [Char]
_rulesOpragmaBlocks Map Identifier (Set VisitKind)
_rulesOruleKinds Attributes
_rulesOsynmap PP_Doc
_rulesOtextBlocks Map Identifier Int
_rulesOusageInfo)
         (T_EChildren_vOut4 [PP_Doc]
_childrenIargnamesw [PP_Doc]
_childrenIargpats [PP_Doc]
_childrenIargtps Attributes
_childrenIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_childrenIchildintros [PP_Doc]
_childrenIdatatype Set [Char]
_childrenIterminaldefs Set [Char]
_childrenIusedArgs) = T_EChildren_s5 -> T_EChildren_v4
inv_EChildren_s5 T_EChildren_s5
_childrenX5 (Map Identifier Int
-> Identifier
-> PP_Doc
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> PP_Doc
-> T_EChildren_vIn4
T_EChildren_vIn4 Map Identifier Int
_childrenOallInitStates Identifier
_childrenOcon PP_Doc
_childrenOimportBlocks [Char]
_childrenOmainFile [Char]
_childrenOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_childrenOmoduleHeader Identifier
_childrenOnt Options
_childrenOoptions [Char]
_childrenOpragmaBlocks PP_Doc
_childrenOtextBlocks)
         (T_Visits_vOut55 [VisitStateState]
_visitsIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsIchildvisit Seq Error
_visitsIerrors Map Int (Int, Int)
_visitsIfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsIintramap Set [Char]
_visitsIlazyIntras Map Identifier (Set VisitKind)
_visitsIruleKinds Map Identifier Int
_visitsIruleUsage [(Int, Bool -> PP_Doc)]
_visitsIsem_visit PP_Doc
_visitsIt_visits Set [Char]
_visitsIusedArgs Map Int VisitKind
_visitsIvisitKinds Map Int (Set Identifier)
_visitsIvisitdefs Map Int (Set Identifier)
_visitsIvisituses) = T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 T_Visits_s56
_visitsX56 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> T_Visits_vIn55
T_Visits_vIn55 Map Int (Int, Int)
_visitsOallFromToStates Map Identifier Attributes
_visitsOallInhmap Map Identifier Int
_visitsOallInitStates Map Identifier Attributes
_visitsOallSynmap Map Int VisitKind
_visitsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsOallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsOallintramap Map Int (Set Identifier)
_visitsOavisitdefs Map Int (Set Identifier)
_visitsOavisituses Attributes
_visitsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_visitsOchildintros Identifier
_visitsOcon Attributes
_visitsOinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_visitsOmrules Map Int StateCtx
_visitsOnextVisits Identifier
_visitsOnt Options
_visitsOoptions [Identifier]
_visitsOparams Map Int StateCtx
_visitsOprevVisits Map Identifier (Set [Char])
_visitsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_visitsOruleuses Attributes
_visitsOsynmap Set [Char]
_visitsOterminaldefs)
         _childrenOcon :: Identifier
_childrenOcon = Identifier -> Identifier
forall a. a -> a
rule225 Identifier
arg_con_
         _rulesOcon :: Identifier
_rulesOcon = Identifier -> Identifier
forall a. a -> a
rule226 Identifier
arg_con_
         _visitsOcon :: Identifier
_visitsOcon = Identifier -> Identifier
forall a. a -> a
rule227 Identifier
arg_con_
         _lhsOdatatype :: PP_Doc
         _lhsOdatatype :: PP_Doc
_lhsOdatatype = [PP_Doc]
-> PP_Doc
-> Identifier
-> Options
-> Bool
-> PP_Doc
-> Identifier
-> PP_Doc
rule228 [PP_Doc]
_childrenIdatatype PP_Doc
_classPP1 Identifier
_lhsInt Options
_lhsIoptions Bool
_lhsIrename PP_Doc
_quantPP1 Identifier
arg_con_
         _classPP1 :: PP_Doc
_classPP1 = [Type] -> PP_Doc
rule229 [Type]
arg_constraints_
         _quantPP1 :: PP_Doc
_quantPP1 = [Identifier] -> PP_Doc
rule230 [Identifier]
arg_params_
         _lhsOcount :: Int
         _lhsOcount :: Int
_lhsOcount = () -> Int
rule231  ()
         _lhsOsem_nt :: PP_Doc
         _lhsOsem_nt :: PP_Doc
_lhsOsem_nt = [PP_Doc] -> [PP_Doc] -> Identifier -> Bool -> Identifier -> PP_Doc
rule232 [PP_Doc]
_childrenIargnamesw [PP_Doc]
_childrenIargpats Identifier
_lhsInt Bool
_lhsIrename Identifier
arg_con_
         _lhsOsemFunBndDefs :: Seq PP_Doc
         _lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = PP_Doc -> Seq PP_Doc
forall a. a -> Seq a
rule233 PP_Doc
_semFunBndDef
         _lhsOsemFunBndTps :: Seq PP_Doc
         _lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = PP_Doc -> Seq PP_Doc
forall a. a -> Seq a
rule234 PP_Doc
_semFunBndTp
         _semFunBndDef :: PP_Doc
_semFunBndDef = [Char] -> [Char] -> PP_Doc
rule235 [Char]
_semFunBndNm [Char]
_semname
         _semFunBndTp :: PP_Doc
_semFunBndTp = [Char] -> PP_Doc -> PP_Doc
rule236 [Char]
_semFunBndNm PP_Doc
_sem_tp
         _semFunBndNm :: [Char]
_semFunBndNm = Identifier -> Identifier -> [Char]
rule237 Identifier
_lhsInt Identifier
arg_con_
         _t_type :: PP_Doc
_t_type = Identifier -> PP_Doc
rule238 Identifier
_lhsInt
         _t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule239 [Identifier]
_lhsIparams
         _usedArgs :: Set [Char]
_usedArgs = Set [Char] -> Set [Char] -> Set [Char] -> Set [Char]
rule240 Set [Char]
_childrenIusedArgs Set [Char]
_rulesIusedArgs Set [Char]
_visitsIusedArgs
         _args :: [PP_Doc]
_args = [PP_Doc] -> Set [Char] -> [PP_Doc]
rule241 [PP_Doc]
_childrenIargpats Set [Char]
_usedArgs
         _semname :: [Char]
_semname = Identifier -> Identifier -> [Char]
rule242 Identifier
_lhsInt Identifier
arg_con_
         _sem_tp :: PP_Doc
_sem_tp = [PP_Doc] -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule243 [PP_Doc]
_childrenIargtps PP_Doc
_classPP2 PP_Doc
_quantPP2 PP_Doc
_t_params PP_Doc
_t_type
         _classPP2 :: PP_Doc
_classPP2 = ClassContext -> [Type] -> PP_Doc
rule244 ClassContext
_lhsIclassCtxs [Type]
arg_constraints_
         _quantPP2 :: PP_Doc
_quantPP2 = [Identifier] -> [Identifier] -> PP_Doc
rule245 [Identifier]
_lhsIparams [Identifier]
arg_params_
         _sem_prod :: PP_Doc
_sem_prod = [PP_Doc]
-> Int
-> Maybe PP_Doc
-> (PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc)
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> [Char]
-> PP_Doc
-> PP_Doc
forall t t.
[PP_Doc]
-> Int
-> t
-> (PP_Doc -> t -> t -> PP_Doc -> PP_Doc)
-> t
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> [Char]
-> PP_Doc
-> PP_Doc
rule246 [PP_Doc]
_args Int
_lhsIinitial Maybe PP_Doc
_mbInitializer PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
_mkSemBody PP_Doc
_outerlet PP_Doc
_scc PP_Doc
_semInlinePragma PP_Doc
_sem_tp [Char]
_semname PP_Doc
_t_type
         _mkSemBody :: PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
_mkSemBody = () -> PP_Doc -> Maybe PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule247  ()
         _mbInitializer :: Maybe PP_Doc
_mbInitializer = Options -> Maybe PP_Doc
rule248 Options
_lhsIoptions
         _scc :: PP_Doc
_scc = Options -> [Char] -> PP_Doc
rule249 Options
_lhsIoptions [Char]
_semname
         _semInlinePragma :: PP_Doc
_semInlinePragma = Options -> [Char] -> PP_Doc
rule250 Options
_lhsIoptions [Char]
_semname
         _outerlet :: PP_Doc
_outerlet = PP_Doc -> [PP_Doc] -> PP_Doc
rule251 PP_Doc
_rulesIsem_rules [PP_Doc]
_statefns
         _statefns :: [PP_Doc]
_statefns = (Int -> PP_Doc) -> Set Int -> [PP_Doc]
forall b. (Int -> b) -> Set Int -> [b]
rule252 Int -> PP_Doc
_genstfn Set Int
_lhsIallstates
         _genstfn :: Int -> PP_Doc
_genstfn = (PP_Doc -> PP_Doc)
-> Int
-> Map Int StateCtx
-> Identifier
-> Options
-> Map Int StateCtx
-> (Int -> PP_Doc)
-> (Int -> PP_Doc)
-> (Int -> Bool -> PP_Doc)
-> Int
-> PP_Doc
rule253 PP_Doc -> PP_Doc
_addbang Int
_lhsIinitial Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions Map Int StateCtx
_lhsIprevVisits Int -> PP_Doc
_stargs Int -> PP_Doc
_stks Int -> Bool -> PP_Doc
_stvs
         _stargs :: Int -> PP_Doc
_stargs = (PP_Doc -> PP_Doc)
-> Attributes
-> Set [Char]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Options
-> Attributes
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Int
-> PP_Doc
rule254 PP_Doc -> PP_Doc
_addbang Attributes
_childTypes Set [Char]
_lazyIntras Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Options
_lhsIoptions Attributes
_localAttrTypes Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsIintramap
         _stks :: Int -> PP_Doc
_stks = Identifier
-> Options -> (Int -> [VisitStateState]) -> PP_Doc -> Int -> PP_Doc
forall b c.
Identifier
-> Options -> (Int -> [(Int, b, c)]) -> PP_Doc -> Int -> PP_Doc
rule255 Identifier
_lhsInt Options
_lhsIoptions Int -> [VisitStateState]
_stvisits PP_Doc
_t_params
         _stvisits :: Int -> [VisitStateState]
_stvisits = [VisitStateState] -> Int -> [VisitStateState]
rule256 [VisitStateState]
_visitsIallvisits
         _stvs :: Int -> Bool -> PP_Doc
_stvs = [(Int, Bool -> PP_Doc)] -> Int -> Bool -> PP_Doc
rule257 [(Int, Bool -> PP_Doc)]
_visitsIsem_visit
         _visitsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_visitsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule258 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_rulesImrules
         _visitsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_visitsOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule259 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_childrenIchildintros
         _rulesOusageInfo :: Map Identifier Int
_rulesOusageInfo = Map Identifier Int -> Map Identifier Int
rule260 Map Identifier Int
_visitsIruleUsage
         _rulesOruleKinds :: Map Identifier (Set VisitKind)
_rulesOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule261 Map Identifier (Set VisitKind)
_visitsIruleKinds
         _visitsOallintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsOallintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule262 Map Int (Map [Char] (Maybe NonLocalAttr))
_visitsIintramap
         _visitsOterminaldefs :: Set [Char]
_visitsOterminaldefs = Set [Char] -> Set [Char]
rule263 Set [Char]
_childrenIterminaldefs
         _visitsOruledefs :: Map Identifier (Set [Char])
_visitsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule264 Map Identifier (Set [Char])
_rulesIruledefs
         _visitsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_visitsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule265 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_rulesIruleuses
         _lazyIntras :: Set [Char]
_lazyIntras = Set [Char] -> Set [Char]
rule266 Set [Char]
_visitsIlazyIntras
         _lhsOimports :: [PP_Doc]
         _lhsOimports :: [PP_Doc]
_lhsOimports = [Char] -> [PP_Doc]
rule267 [Char]
_moduleName
         _moduleName :: [Char]
_moduleName = [Char] -> [Char] -> [Char]
rule268 [Char]
_lhsImainName [Char]
_suffix
         _suffix :: [Char]
_suffix = Identifier -> Identifier -> [Char]
rule269 Identifier
_lhsInt Identifier
arg_con_
         _outputfile :: [Char]
_outputfile = [Char] -> [Char] -> [Char]
rule270 [Char]
_lhsImainFile [Char]
_suffix
         _ppMonadImports :: PP_Doc
_ppMonadImports = Options -> PP_Doc
rule271 Options
_lhsIoptions
         _lhsOgenProdIO :: IO ()
         _lhsOgenProdIO :: IO ()
_lhsOgenProdIO = PP_Doc
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> [Char]
-> PP_Doc
-> PP_Doc
-> [Char]
-> [Char]
-> IO ()
rule272 PP_Doc
_lhsIimportBlocks [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks [Char]
_outputfile PP_Doc
_ppMonadImports PP_Doc
_sem_prod [Char]
_semname [Char]
_suffix
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule273 Options
_lhsIoptions
         _childTypes :: Attributes
_childTypes = Attributes -> Type -> Attributes
rule274 Attributes
_childrenIchildTypes Type
_lhsIntType
         _localAttrTypes :: Attributes
_localAttrTypes = Map Identifier Attributes -> Identifier -> Attributes
rule275 Map Identifier Attributes
_lhsIlocalAttrTypes Identifier
arg_con_
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule276 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsIchildvisit
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule277 Seq Error
_rulesIerrors Seq Error
_visitsIerrors
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule278 Map Int (Int, Int)
_visitsIfromToStates
         _lhsOt_visits :: PP_Doc
         _lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc
rule279 PP_Doc
_visitsIt_visits
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule280 Map Int VisitKind
_visitsIvisitKinds
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule281 Map Int (Set Identifier)
_visitsIvisitdefs
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule282 Map Int (Set Identifier)
_visitsIvisituses
         _lhsOallvisits :: [VisitStateState]
         _lhsOallvisits :: [VisitStateState]
_lhsOallvisits = [VisitStateState] -> [VisitStateState]
rule283 [VisitStateState]
_visitsIallvisits
         _lhsOsem_prod :: PP_Doc
         _lhsOsem_prod :: PP_Doc
_lhsOsem_prod = PP_Doc -> PP_Doc
forall a. a -> a
rule284 PP_Doc
_sem_prod
         _rulesOallInhmap :: Map Identifier Attributes
_rulesOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule285 Map Identifier Attributes
_lhsIallInhmap
         _rulesOallSynmap :: Map Identifier Attributes
_rulesOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule286 Map Identifier Attributes
_lhsIallSynmap
         _rulesOchildTypes :: Attributes
_rulesOchildTypes = Attributes -> Attributes
forall a. a -> a
rule287 Attributes
_childTypes
         _rulesOimportBlocks :: PP_Doc
_rulesOimportBlocks = PP_Doc -> PP_Doc
rule288 PP_Doc
_lhsIimportBlocks
         _rulesOinhmap :: Attributes
_rulesOinhmap = Attributes -> Attributes
rule289 Attributes
_lhsIinhmap
         _rulesOlazyIntras :: Set [Char]
_rulesOlazyIntras = Set [Char] -> Set [Char]
forall a. a -> a
rule290 Set [Char]
_lazyIntras
         _rulesOlocalAttrTypes :: Attributes
_rulesOlocalAttrTypes = Attributes -> Attributes
forall a. a -> a
rule291 Attributes
_localAttrTypes
         _rulesOmainFile :: [Char]
_rulesOmainFile = [Char] -> [Char]
rule292 [Char]
_lhsImainFile
         _rulesOmainName :: [Char]
_rulesOmainName = [Char] -> [Char]
rule293 [Char]
_lhsImainName
         _rulesOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_rulesOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule294 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _rulesOnt :: Identifier
_rulesOnt = Identifier -> Identifier
rule295 Identifier
_lhsInt
         _rulesOoptions :: Options
_rulesOoptions = Options -> Options
rule296 Options
_lhsIoptions
         _rulesOpragmaBlocks :: [Char]
_rulesOpragmaBlocks = [Char] -> [Char]
rule297 [Char]
_lhsIpragmaBlocks
         _rulesOsynmap :: Attributes
_rulesOsynmap = Attributes -> Attributes
rule298 Attributes
_lhsIsynmap
         _rulesOtextBlocks :: PP_Doc
_rulesOtextBlocks = PP_Doc -> PP_Doc
rule299 PP_Doc
_lhsItextBlocks
         _childrenOallInitStates :: Map Identifier Int
_childrenOallInitStates = Map Identifier Int -> Map Identifier Int
rule300 Map Identifier Int
_lhsIallInitStates
         _childrenOimportBlocks :: PP_Doc
_childrenOimportBlocks = PP_Doc -> PP_Doc
rule301 PP_Doc
_lhsIimportBlocks
         _childrenOmainFile :: [Char]
_childrenOmainFile = [Char] -> [Char]
rule302 [Char]
_lhsImainFile
         _childrenOmainName :: [Char]
_childrenOmainName = [Char] -> [Char]
rule303 [Char]
_lhsImainName
         _childrenOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_childrenOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule304 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _childrenOnt :: Identifier
_childrenOnt = Identifier -> Identifier
rule305 Identifier
_lhsInt
         _childrenOoptions :: Options
_childrenOoptions = Options -> Options
rule306 Options
_lhsIoptions
         _childrenOpragmaBlocks :: [Char]
_childrenOpragmaBlocks = [Char] -> [Char]
rule307 [Char]
_lhsIpragmaBlocks
         _childrenOtextBlocks :: PP_Doc
_childrenOtextBlocks = PP_Doc -> PP_Doc
rule308 PP_Doc
_lhsItextBlocks
         _visitsOallFromToStates :: Map Int (Int, Int)
_visitsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule309 Map Int (Int, Int)
_lhsIallFromToStates
         _visitsOallInhmap :: Map Identifier Attributes
_visitsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule310 Map Identifier Attributes
_lhsIallInhmap
         _visitsOallInitStates :: Map Identifier Int
_visitsOallInitStates = Map Identifier Int -> Map Identifier Int
rule311 Map Identifier Int
_lhsIallInitStates
         _visitsOallSynmap :: Map Identifier Attributes
_visitsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule312 Map Identifier Attributes
_lhsIallSynmap
         _visitsOallVisitKinds :: Map Int VisitKind
_visitsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule313 Map Int VisitKind
_lhsIallVisitKinds
         _visitsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_visitsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule314 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _visitsOavisitdefs :: Map Int (Set Identifier)
_visitsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule315 Map Int (Set Identifier)
_lhsIavisitdefs
         _visitsOavisituses :: Map Int (Set Identifier)
_visitsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule316 Map Int (Set Identifier)
_lhsIavisituses
         _visitsOchildTypes :: Attributes
_visitsOchildTypes = Attributes -> Attributes
forall a. a -> a
rule317 Attributes
_childTypes
         _visitsOinhmap :: Attributes
_visitsOinhmap = Attributes -> Attributes
rule318 Attributes
_lhsIinhmap
         _visitsOnextVisits :: Map Int StateCtx
_visitsOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule319 Map Int StateCtx
_lhsInextVisits
         _visitsOnt :: Identifier
_visitsOnt = Identifier -> Identifier
rule320 Identifier
_lhsInt
         _visitsOoptions :: Options
_visitsOoptions = Options -> Options
rule321 Options
_lhsIoptions
         _visitsOparams :: [Identifier]
_visitsOparams = [Identifier] -> [Identifier]
rule322 [Identifier]
_lhsIparams
         _visitsOprevVisits :: Map Int StateCtx
_visitsOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule323 Map Int StateCtx
_lhsIprevVisits
         _visitsOsynmap :: Attributes
_visitsOsynmap = Attributes -> Attributes
rule324 Attributes
_lhsIsynmap
         __result_ :: T_EProduction_vOut13
__result_ = [VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> PP_Doc
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_EProduction_vOut13
T_EProduction_vOut13 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount PP_Doc
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_EProduction_vOut13
__result_ )
     in T_EProduction_v13 -> T_EProduction_s14
C_EProduction_s14 T_EProduction_v13
v13
   {-# INLINE rule225 #-}
   {-# LINE 71 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule225 = \ con_ ->
                                 {-# LINE 71 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 con_
                                 {-# LINE 2198 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule226 #-}
   {-# LINE 72 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule226 = \ con_ ->
                                 {-# LINE 72 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 con_
                                 {-# LINE 2204 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule227 #-}
   {-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule227 = \ con_ ->
                                 {-# LINE 73 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 con_
                                 {-# LINE 2210 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule228 #-}
   {-# LINE 186 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule228 = \ ((_childrenIdatatype) :: [PP_Doc]) _classPP1 ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _quantPP1 con_ ->
                                 {-# LINE 186 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _quantPP1     >#< _classPP1
                                 >#< conname _lhsIrename _lhsInt con_
                                 >#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype
                                 {-# LINE 2218 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule229 #-}
   {-# LINE 189 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule229 = \ constraints_ ->
                                 {-# LINE 189 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 ppClasses (classConstrsToDocs constraints_)
                                 {-# LINE 2224 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule230 #-}
   {-# LINE 190 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule230 = \ params_ ->
                                 {-# LINE 190 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 ppQuants params_
                                 {-# LINE 2230 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule231 #-}
   {-# LINE 288 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule231 = \  (_ :: ()) ->
                                              {-# LINE 288 "src-ag/ExecutionPlan2Hs.ag" #-}
                                              1
                                              {-# LINE 2236 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule232 #-}
   {-# LINE 293 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule232 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIargpats) ::  [PP_Doc] ) ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->
                               {-# LINE 293 "src-ag/ExecutionPlan2Hs.ag" #-}
                               "sem_" >|< _lhsInt >#< "(" >#< conname _lhsIrename _lhsInt con_ >#< ppSpaced _childrenIargpats >#< ")"
                               >#< "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw
                               {-# LINE 2243 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule233 #-}
   {-# LINE 534 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule233 = \ _semFunBndDef ->
                        {-# LINE 534 "src-ag/ExecutionPlan2Hs.ag" #-}
                        Seq.singleton _semFunBndDef
                        {-# LINE 2249 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule234 #-}
   {-# LINE 535 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule234 = \ _semFunBndTp ->
                        {-# LINE 535 "src-ag/ExecutionPlan2Hs.ag" #-}
                        Seq.singleton _semFunBndTp
                        {-# LINE 2255 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule235 #-}
   {-# LINE 536 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule235 = \ _semFunBndNm _semname ->
                        {-# LINE 536 "src-ag/ExecutionPlan2Hs.ag" #-}
                        _semFunBndNm     >#< "=" >#< _semname
                        {-# LINE 2261 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule236 #-}
   {-# LINE 537 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule236 = \ _semFunBndNm _sem_tp ->
                        {-# LINE 537 "src-ag/ExecutionPlan2Hs.ag" #-}
                        _semFunBndNm     >#< "::" >#< _sem_tp
                        {-# LINE 2267 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule237 #-}
   {-# LINE 538 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule237 = \ ((_lhsInt) :: NontermIdent) con_ ->
                        {-# LINE 538 "src-ag/ExecutionPlan2Hs.ag" #-}
                        lateSemConLabel _lhsInt con_
                        {-# LINE 2273 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule238 #-}
   {-# LINE 596 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule238 = \ ((_lhsInt) :: NontermIdent) ->
                                 {-# LINE 596 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 "T_" >|< _lhsInt
                                 {-# LINE 2279 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule239 #-}
   {-# LINE 597 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule239 = \ ((_lhsIparams) :: [Identifier]) ->
                                 {-# LINE 597 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 ppSpaced _lhsIparams
                                 {-# LINE 2285 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule240 #-}
   {-# LINE 598 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule240 = \ ((_childrenIusedArgs) :: Set String) ((_rulesIusedArgs) :: Set String) ((_visitsIusedArgs) :: Set String) ->
                                 {-# LINE 598 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _childrenIusedArgs `Set.union` _visitsIusedArgs `Set.union` _rulesIusedArgs
                                 {-# LINE 2291 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule241 #-}
   {-# LINE 601 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule241 = \ ((_childrenIargpats) ::  [PP_Doc] ) _usedArgs ->
                                 {-# LINE 601 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 map (\x -> let (name,arg) = case show x of
                                                         ""       -> ("", empty)
                                                         '!':name -> ("arg_" ++ name, "!arg_" >|< name)
                                                         name     -> ("arg_" ++ name, "arg_"  >|< name)
                                            in  if null name || name `Set.member` _usedArgs
                                                then arg
                                                else text "_") _childrenIargpats
                                 {-# LINE 2303 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule242 #-}
   {-# LINE 608 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule242 = \ ((_lhsInt) :: NontermIdent) con_ ->
                                 {-# LINE 608 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 "sem_" ++ show _lhsInt ++ "_" ++ show con_
                                 {-# LINE 2309 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule243 #-}
   {-# LINE 609 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule243 = \ ((_childrenIargtps) ::  [PP_Doc] ) _classPP2 _quantPP2 _t_params _t_type ->
                                 {-# LINE 609 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _quantPP2     >#< _classPP2     >#< ppSpaced _childrenIargtps >#< _t_type     >#< _t_params
                                 {-# LINE 2315 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule244 #-}
   {-# LINE 610 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule244 = \ ((_lhsIclassCtxs) :: ClassContext) constraints_ ->
                                 {-# LINE 610 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)
                                 {-# LINE 2321 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule245 #-}
   {-# LINE 611 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule245 = \ ((_lhsIparams) :: [Identifier]) params_ ->
                                 {-# LINE 611 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 ppQuants (_lhsIparams ++ params_)
                                 {-# LINE 2327 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule246 #-}
   {-# LINE 612 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule246 = \ _args ((_lhsIinitial) :: StateIdentifier) _mbInitializer _mkSemBody _outerlet _scc _semInlinePragma _sem_tp _semname _t_type ->
                                 {-# LINE 612 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _semInlinePragma
                                 >-< _semname     >#< "::" >#< _sem_tp
                                 >-< _mkSemBody     (_semname     >#< ppSpaced _args     >#< "=" >#< _scc     >#< _t_type    )
                                                    _mbInitializer     _outerlet     ("return" >#< "st" >|< _lhsIinitial)
                                 {-# LINE 2336 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule247 #-}
   {-# LINE 616 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule247 = \  (_ :: ()) ->
                                  {-# LINE 616 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  \prefix mbInit outerlet ret ->
                                    case mbInit of
                                      Nothing -> prefix >#< pp_parens ret >#< "where"
                                                 >-< indent 3 outerlet
                                      Just m  -> prefix >#< "(" >#< "do"
                                                 >-< indent 1 (
                                                       m
                                                       >-< "let"
                                                       >-< indent 2 outerlet
                                                       >-< ret )
                                                 >-< indent 1 ")"
                                  {-# LINE 2352 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule248 #-}
   {-# LINE 628 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule248 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 628 "src-ag/ExecutionPlan2Hs.ag" #-}
                                        if parallelInvoke _lhsIoptions
                                        then (Nothing :: Maybe PP_Doc)
                                        else Nothing
                                        {-# LINE 2360 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule249 #-}
   {-# LINE 634 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule249 = \ ((_lhsIoptions) :: Options) _semname ->
                                        {-# LINE 634 "src-ag/ExecutionPlan2Hs.ag" #-}
                                        if genCostCentres _lhsIoptions
                                        then ppCostCentre _semname
                                        else empty
                                        {-# LINE 2368 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule250 #-}
   {-# LINE 637 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule250 = \ ((_lhsIoptions) :: Options) _semname ->
                                        {-# LINE 637 "src-ag/ExecutionPlan2Hs.ag" #-}
                                        if noInlinePragmas _lhsIoptions
                                        then empty
                                        else ppNoInline _semname
                                        {-# LINE 2376 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule251 #-}
   {-# LINE 640 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule251 = \ ((_rulesIsem_rules) :: PP_Doc) _statefns ->
                                 {-# LINE 640 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 vlist _statefns     >-< _rulesIsem_rules
                                 {-# LINE 2382 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule252 #-}
   {-# LINE 641 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule252 = \ _genstfn ((_lhsIallstates) :: Set StateIdentifier) ->
                                 {-# LINE 641 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 map _genstfn     $ Set.toList _lhsIallstates
                                 {-# LINE 2388 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule253 #-}
   {-# LINE 642 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule253 = \ _addbang ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) _stargs _stks _stvs ->
                                 {-# LINE 642 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits
                                            prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits
                                            stNm = "st" >|< st
                                            lhs  = pragma >-< bang stNm >#< "=" >#<
                                                   (
                                                     if st == _lhsIinitial
                                                     then empty
                                                     else "\\" >#< _stargs     st >#< "->"
                                                   )
                                            pragma = if noInlinePragmas _lhsIoptions
                                                     then empty
                                                     else if helpInlining _lhsIoptions
                                                          then case prevVisitInfo of
                                                                 ManyVis  -> ppNoInline stNm
                                                                 OneVis _ -> if aggressiveInlinePragmas _lhsIoptions
                                                                             then ppInline stNm
                                                                             else ppInlinable stNm
                                                                 NoneVis  -> if st /= _lhsIinitial
                                                                             then error ("State " ++ show st ++ " is not reachable from the initial state.")
                                                                             else if aggressiveInlinePragmas _lhsIoptions
                                                                                  then ppInline stNm
                                                                                  else ppInlinable stNm
                                                          else ppNoInline stNm
                                            cCon = "C_" >|< _lhsInt >|< "_s" >|< st
                                            bang | st == _lhsIinitial = _addbang
                                                 | otherwise          = id
                                        in case nextVisitInfo of
                                             NoneVis    ->
                                                           if st == _lhsIinitial
                                                           then lhs >#< cCon
                                                           else empty
                                             OneVis vId -> mklet lhs (_stvs     st False) (cCon >#< "v" >|< vId)
                                             ManyVis    -> mklet lhs (_stks     st >-< _stvs     st True) (cCon >#< "k" >|< st)
                                 {-# LINE 2426 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule254 #-}
   {-# LINE 684 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule254 = \ _addbang _childTypes _lazyIntras ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
                                 {-# LINE 684 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap
                                        in ppSpaced [ let match | str `Set.member` _lazyIntras     = pp str
                                                                | otherwise                        = _addbang     (pp str)
                                                      in case mbAttr of
                                                           Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->
                                                             case Map.lookup nm _localAttrTypes     of
                                                               Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)
                                                               Nothing -> match
                                                           Just attr | not (noPerStateTypeSigs _lhsIoptions) ->
                                                             case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes     of
                                                               Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)
                                                               Nothing    -> match
                                                           _ -> match
                                                   | (str,mbAttr) <- Map.assocs attrs
                                                   ] >#< dummyPat _lhsIoptions (Map.null attrs)
                                 {-# LINE 2446 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule255 #-}
   {-# LINE 700 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule255 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _stvisits _t_params ->
                                 {-# LINE 700 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 \st -> if null (_stvisits     st)
                                        then empty
                                        else ( if not (noInlinePragmas _lhsIoptions) && helpInlining _lhsIoptions
                                               then ppNoInline ("k" >|< st)
                                               else empty
                                             )
                                             >-< "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< _t_params     >#< "t" >#< "->" >#< "t"
                                             >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="
                                                                    >#< "v" >|< v) $ _stvisits     st)
                                 {-# LINE 2460 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule256 #-}
   {-# LINE 709 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule256 = \ ((_visitsIallvisits) :: [VisitStateState]) ->
                                 {-# LINE 709 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 \st -> filter (\(v,f,t) -> f == st) _visitsIallvisits
                                 {-# LINE 2466 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule257 #-}
   {-# LINE 710 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule257 = \ ((_visitsIsem_visit) ::  [(StateIdentifier,Bool -> PP_Doc)] ) ->
                                 {-# LINE 710 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]
                                 {-# LINE 2472 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule258 #-}
   {-# LINE 711 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule258 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
                                  {-# LINE 711 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _rulesImrules
                                  {-# LINE 2478 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule259 #-}
   {-# LINE 926 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule259 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
                                       {-# LINE 926 "src-ag/ExecutionPlan2Hs.ag" #-}
                                       _childrenIchildintros
                                       {-# LINE 2484 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule260 #-}
   {-# LINE 1281 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule260 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->
                                                   {-# LINE 1281 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                   _visitsIruleUsage
                                                   {-# LINE 2490 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule261 #-}
   {-# LINE 1296 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule261 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->
                      {-# LINE 1296 "src-ag/ExecutionPlan2Hs.ag" #-}
                      _visitsIruleKinds
                      {-# LINE 2496 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule262 #-}
   {-# LINE 1325 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule262 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
                          {-# LINE 1325 "src-ag/ExecutionPlan2Hs.ag" #-}
                          _visitsIintramap
                          {-# LINE 2502 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule263 #-}
   {-# LINE 1326 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule263 = \ ((_childrenIterminaldefs) :: Set String) ->
                          {-# LINE 1326 "src-ag/ExecutionPlan2Hs.ag" #-}
                          _childrenIterminaldefs
                          {-# LINE 2508 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule264 #-}
   {-# LINE 1350 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule264 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->
                                    {-# LINE 1350 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    _rulesIruledefs
                                    {-# LINE 2514 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule265 #-}
   {-# LINE 1351 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule265 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
                                    {-# LINE 1351 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    _rulesIruleuses
                                    {-# LINE 2520 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule266 #-}
   {-# LINE 1405 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule266 = \ ((_visitsIlazyIntras) :: Set String) ->
                     {-# LINE 1405 "src-ag/ExecutionPlan2Hs.ag" #-}
                     _visitsIlazyIntras
                     {-# LINE 2526 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule267 #-}
   {-# LINE 1502 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule267 = \ _moduleName ->
                                   {-# LINE 1502 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   [pp $ "import " ++ _moduleName    ]
                                   {-# LINE 2532 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule268 #-}
   {-# LINE 1503 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule268 = \ ((_lhsImainName) :: String) _suffix ->
                                   {-# LINE 1503 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   _lhsImainName ++ _suffix
                                   {-# LINE 2538 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule269 #-}
   {-# LINE 1504 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule269 = \ ((_lhsInt) :: NontermIdent) con_ ->
                                   {-# LINE 1504 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   "_" ++ show _lhsInt ++ "_" ++ show con_
                                   {-# LINE 2544 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule270 #-}
   {-# LINE 1505 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule270 = \ ((_lhsImainFile) :: String) _suffix ->
                                   {-# LINE 1505 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix    )
                                   {-# LINE 2550 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule271 #-}
   {-# LINE 1506 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule271 = \ ((_lhsIoptions) :: Options) ->
                                        {-# LINE 1506 "src-ag/ExecutionPlan2Hs.ag" #-}
                                        if parallelInvoke _lhsIoptions
                                        then pp "import qualified System.IO.Unsafe(unsafePerformIO)"
                                             >-< pp "import System.IO(IO)"
                                             >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"
                                        else pp "import Control.Monad.Identity"
                                        {-# LINE 2560 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule272 #-}
   {-# LINE 1511 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule272 = \ ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptions) :: Options) ((_lhsIpragmaBlocks) :: String) _outputfile _ppMonadImports _sem_prod _semname _suffix ->
                                   {-# LINE 1511 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   writeModule _outputfile
                                       [ warrenFlagsPP _lhsIoptions
                                       , pp $ _lhsIpragmaBlocks
                                       , pp $ _lhsImoduleHeader _lhsImainName _suffix     _semname     True
                                       , _lhsIimportBlocks
                                       , _ppMonadImports
                                       , ( if tupleAsDummyToken _lhsIoptions
                                              then empty
                                              else pp "import GHC.Prim"
                                        )
                                       , pp $ "import " ++ _lhsImainName ++ "_common"
                                       , _sem_prod
                                       ]
                                   {-# LINE 2578 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule273 #-}
   {-# LINE 1552 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule273 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1552 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 2584 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule274 #-}
   {-# LINE 1602 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule274 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->
                     {-# LINE 1602 "src-ag/ExecutionPlan2Hs.ag" #-}
                     Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes
                     {-# LINE 2590 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule275 #-}
   {-# LINE 1619 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule275 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->
                           {-# LINE 1619 "src-ag/ExecutionPlan2Hs.ag" #-}
                           Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes
                           {-# LINE 2596 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule276 #-}
   rule276 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _visitsIchildvisit
   {-# INLINE rule277 #-}
   rule277 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->
     _rulesIerrors Seq.>< _visitsIerrors
   {-# INLINE rule278 #-}
   rule278 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _visitsIfromToStates
   {-# INLINE rule279 #-}
   rule279 = \ ((_visitsIt_visits) :: PP_Doc) ->
     _visitsIt_visits
   {-# INLINE rule280 #-}
   rule280 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     _visitsIvisitKinds
   {-# INLINE rule281 #-}
   rule281 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _visitsIvisitdefs
   {-# INLINE rule282 #-}
   rule282 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _visitsIvisituses
   {-# INLINE rule283 #-}
   rule283 = \ ((_visitsIallvisits) :: [VisitStateState]) ->
     _visitsIallvisits
   {-# INLINE rule284 #-}
   rule284 = \ _sem_prod ->
     _sem_prod
   {-# INLINE rule285 #-}
   rule285 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule286 #-}
   rule286 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule287 #-}
   rule287 = \ _childTypes ->
     _childTypes
   {-# INLINE rule288 #-}
   rule288 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule289 #-}
   rule289 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule290 #-}
   rule290 = \ _lazyIntras ->
     _lazyIntras
   {-# INLINE rule291 #-}
   rule291 = \ _localAttrTypes ->
     _localAttrTypes
   {-# INLINE rule292 #-}
   rule292 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule293 #-}
   rule293 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule294 #-}
   rule294 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule295 #-}
   rule295 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule296 #-}
   rule296 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule297 #-}
   rule297 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule298 #-}
   rule298 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
   {-# INLINE rule299 #-}
   rule299 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks
   {-# INLINE rule300 #-}
   rule300 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule301 #-}
   rule301 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule302 #-}
   rule302 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule303 #-}
   rule303 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule304 #-}
   rule304 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule305 #-}
   rule305 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule306 #-}
   rule306 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule307 #-}
   rule307 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule308 #-}
   rule308 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks
   {-# INLINE rule309 #-}
   rule309 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule310 #-}
   rule310 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule311 #-}
   rule311 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule312 #-}
   rule312 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule313 #-}
   rule313 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule314 #-}
   rule314 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule315 #-}
   rule315 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule316 #-}
   rule316 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule317 #-}
   rule317 = \ _childTypes ->
     _childTypes
   {-# INLINE rule318 #-}
   rule318 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule319 #-}
   rule319 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
     _lhsInextVisits
   {-# INLINE rule320 #-}
   rule320 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule321 #-}
   rule321 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule322 #-}
   rule322 = \ ((_lhsIparams) :: [Identifier]) ->
     _lhsIparams
   {-# INLINE rule323 #-}
   rule323 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
     _lhsIprevVisits
   {-# INLINE rule324 #-}
   rule324 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap

-- EProductions ------------------------------------------------
-- wrapper
data Inh_EProductions  = Inh_EProductions { Inh_EProductions -> Map Int (Int, Int)
allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), Inh_EProductions -> Map Identifier Attributes
allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), Inh_EProductions -> Map Identifier Int
allInitStates_Inh_EProductions :: (Map NontermIdent Int), Inh_EProductions -> Map Identifier Attributes
allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), Inh_EProductions -> Map Int VisitKind
allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), Inh_EProductions
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_EProductions -> Set Int
allstates_Inh_EProductions :: (Set StateIdentifier), Inh_EProductions -> Map Int (Set Identifier)
avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), Inh_EProductions -> Map Int (Set Identifier)
avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), Inh_EProductions -> ClassContext
classCtxs_Inh_EProductions :: (ClassContext), Inh_EProductions -> PP_Doc
importBlocks_Inh_EProductions :: (PP_Doc), Inh_EProductions -> Attributes
inhmap_Inh_EProductions :: (Attributes), Inh_EProductions -> Int
initial_Inh_EProductions :: (StateIdentifier), Inh_EProductions -> Map Identifier Attributes
localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), Inh_EProductions -> [Char]
mainFile_Inh_EProductions :: (String), Inh_EProductions -> [Char]
mainName_Inh_EProductions :: (String), Inh_EProductions -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String), Inh_EProductions -> Map Int StateCtx
nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), Inh_EProductions -> Identifier
nt_Inh_EProductions :: (NontermIdent), Inh_EProductions -> Type
ntType_Inh_EProductions :: (Type), Inh_EProductions -> Options
options_Inh_EProductions :: (Options), Inh_EProductions -> [Identifier]
params_Inh_EProductions :: ([Identifier]), Inh_EProductions -> [Char]
pragmaBlocks_Inh_EProductions :: (String), Inh_EProductions -> Map Int StateCtx
prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), Inh_EProductions -> Bool
rename_Inh_EProductions :: (Bool), Inh_EProductions -> Attributes
synmap_Inh_EProductions :: (Attributes), Inh_EProductions -> PP_Doc
textBlocks_Inh_EProductions :: (PP_Doc) }
data Syn_EProductions  = Syn_EProductions { Syn_EProductions -> [VisitStateState]
allvisits_Syn_EProductions :: ([VisitStateState]), Syn_EProductions
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_EProductions -> Int
count_Syn_EProductions :: (Int), Syn_EProductions -> [PP_Doc]
datatype_Syn_EProductions :: ([PP_Doc]), Syn_EProductions -> Seq Error
errors_Syn_EProductions :: (Seq Error), Syn_EProductions -> Map Int (Int, Int)
fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), Syn_EProductions -> IO ()
genProdIO_Syn_EProductions :: (IO ()), Syn_EProductions -> [PP_Doc]
imports_Syn_EProductions :: ([PP_Doc]), Syn_EProductions -> Seq PP_Doc
semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), Syn_EProductions -> Seq PP_Doc
semFunBndTps_Syn_EProductions :: (Seq PP_Doc), Syn_EProductions -> PP_Doc
sem_nt_Syn_EProductions :: (PP_Doc), Syn_EProductions -> PP_Doc
sem_prod_Syn_EProductions :: (PP_Doc), Syn_EProductions -> PP_Doc
t_visits_Syn_EProductions :: (PP_Doc), Syn_EProductions -> Map Int VisitKind
visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), Syn_EProductions -> Map Int (Set Identifier)
visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), Syn_EProductions -> Map Int (Set Identifier)
visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_EProductions #-}
wrap_EProductions :: T_EProductions  -> Inh_EProductions  -> (Syn_EProductions )
wrap_EProductions :: T_EProductions -> Inh_EProductions -> Syn_EProductions
wrap_EProductions (T_EProductions Identity T_EProductions_s17
act) (Inh_EProductions Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) =
   Identity Syn_EProductions -> Syn_EProductions
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_EProductions_s17
sem <- Identity T_EProductions_s17
act
        let arg16 :: T_EProductions_vIn16
arg16 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> [Char]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProductions_vIn16
T_EProductions_vIn16 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks
        (T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_EProductions_vOut16 -> Identity T_EProductions_vOut16
forall (m :: * -> *) a. Monad m => a -> m a
return (T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 T_EProductions_s17
sem T_EProductions_vIn16
arg16)
        Syn_EProductions -> Identity Syn_EProductions
forall (m :: * -> *) a. Monad m => a -> m a
return ([VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_EProductions
Syn_EProductions [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
   )

-- cata
{-# NOINLINE sem_EProductions #-}
sem_EProductions :: EProductions  -> T_EProductions 
sem_EProductions :: EProductions -> T_EProductions
sem_EProductions EProductions
list = (T_EProduction -> T_EProductions -> T_EProductions)
-> T_EProductions -> [T_EProduction] -> T_EProductions
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_EProduction -> T_EProductions -> T_EProductions
sem_EProductions_Cons T_EProductions
sem_EProductions_Nil ((EProduction -> T_EProduction) -> EProductions -> [T_EProduction]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map EProduction -> T_EProduction
sem_EProduction EProductions
list)

-- semantic domain
newtype T_EProductions  = T_EProductions {
                                         T_EProductions -> Identity T_EProductions_s17
attach_T_EProductions :: Identity (T_EProductions_s17 )
                                         }
newtype T_EProductions_s17  = C_EProductions_s17 {
                                                 T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 :: (T_EProductions_v16 )
                                                 }
data T_EProductions_s18  = C_EProductions_s18
type T_EProductions_v16  = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )
data T_EProductions_vIn16  = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (String -> String -> String -> Bool -> String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (String) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)
data T_EProductions_vOut16  = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_EProductions_Cons #-}
sem_EProductions_Cons :: T_EProduction  -> T_EProductions  -> T_EProductions 
sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions
sem_EProductions_Cons T_EProduction
arg_hd_ T_EProductions
arg_tl_ = Identity T_EProductions_s17 -> T_EProductions
T_EProductions (T_EProductions_s17 -> Identity T_EProductions_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_EProductions_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_EProductions_s17
st17 = let
      v16 :: T_EProductions_v16 
      v16 :: T_EProductions_v16
v16 = \ (T_EProductions_vIn16 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) -> ( let
         _hdX14 :: T_EProduction_s14
_hdX14 = Identity T_EProduction_s14 -> T_EProduction_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EProduction -> Identity T_EProduction_s14
attach_T_EProduction (T_EProduction
arg_hd_))
         _tlX17 :: T_EProductions_s17
_tlX17 = Identity T_EProductions_s17 -> T_EProductions_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_EProductions -> Identity T_EProductions_s17
attach_T_EProductions (T_EProductions
arg_tl_))
         (T_EProduction_vOut13 [VisitStateState]
_hdIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Int
_hdIcount PP_Doc
_hdIdatatype Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates IO ()
_hdIgenProdIO [PP_Doc]
_hdIimports Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_hdIsemFunBndTps PP_Doc
_hdIsem_nt PP_Doc
_hdIsem_prod PP_Doc
_hdIt_visits Map Int VisitKind
_hdIvisitKinds Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_hdIvisituses) = T_EProduction_s14 -> T_EProduction_v13
inv_EProduction_s14 T_EProduction_s14
_hdX14 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> [Char]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProduction_vIn13
T_EProduction_vIn13 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Attributes
_hdOallInhmap Map Identifier Int
_hdOallInitStates Map Identifier Attributes
_hdOallSynmap Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Set Int
_hdOallstates Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses ClassContext
_hdOclassCtxs PP_Doc
_hdOimportBlocks Attributes
_hdOinhmap Int
_hdOinitial Map Identifier Attributes
_hdOlocalAttrTypes [Char]
_hdOmainFile [Char]
_hdOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader Map Int StateCtx
_hdOnextVisits Identifier
_hdOnt Type
_hdOntType Options
_hdOoptions [Identifier]
_hdOparams [Char]
_hdOpragmaBlocks Map Int StateCtx
_hdOprevVisits Bool
_hdOrename Attributes
_hdOsynmap PP_Doc
_hdOtextBlocks)
         (T_EProductions_vOut16 [VisitStateState]
_tlIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit Int
_tlIcount [PP_Doc]
_tlIdatatype Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates IO ()
_tlIgenProdIO [PP_Doc]
_tlIimports Seq PP_Doc
_tlIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndTps PP_Doc
_tlIsem_nt PP_Doc
_tlIsem_prod PP_Doc
_tlIt_visits Map Int VisitKind
_tlIvisitKinds Map Int (Set Identifier)
_tlIvisitdefs Map Int (Set Identifier)
_tlIvisituses) = T_EProductions_s17 -> T_EProductions_v16
inv_EProductions_s17 T_EProductions_s17
_tlX17 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Set Int
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> ClassContext
-> PP_Doc
-> Attributes
-> Int
-> Map Identifier Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Map Int StateCtx
-> Identifier
-> Type
-> Options
-> [Identifier]
-> [Char]
-> Map Int StateCtx
-> Bool
-> Attributes
-> PP_Doc
-> T_EProductions_vIn16
T_EProductions_vIn16 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Attributes
_tlOallInhmap Map Identifier Int
_tlOallInitStates Map Identifier Attributes
_tlOallSynmap Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Set Int
_tlOallstates Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses ClassContext
_tlOclassCtxs PP_Doc
_tlOimportBlocks Attributes
_tlOinhmap Int
_tlOinitial Map Identifier Attributes
_tlOlocalAttrTypes [Char]
_tlOmainFile [Char]
_tlOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader Map Int StateCtx
_tlOnextVisits Identifier
_tlOnt Type
_tlOntType Options
_tlOoptions [Identifier]
_tlOparams [Char]
_tlOpragmaBlocks Map Int StateCtx
_tlOprevVisits Bool
_tlOrename Attributes
_tlOsynmap PP_Doc
_tlOtextBlocks)
         _lhsOallvisits :: [VisitStateState]
         _lhsOallvisits :: [VisitStateState]
_lhsOallvisits = [VisitStateState] -> [VisitStateState]
rule325 [VisitStateState]
_hdIallvisits
         _lhsOt_visits :: PP_Doc
         _lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc
rule326 PP_Doc
_hdIt_visits
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule327 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
         _lhsOcount :: Int
         _lhsOcount :: Int
_lhsOcount = Int -> Int -> Int
rule328 Int
_hdIcount Int
_tlIcount
         _lhsOdatatype :: [PP_Doc]
         _lhsOdatatype :: [PP_Doc]
_lhsOdatatype = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule329 PP_Doc
_hdIdatatype [PP_Doc]
_tlIdatatype
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule330 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule331 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
         _lhsOgenProdIO :: IO ()
         _lhsOgenProdIO :: IO ()
_lhsOgenProdIO = IO () -> IO () -> IO ()
rule332 IO ()
_hdIgenProdIO IO ()
_tlIgenProdIO
         _lhsOimports :: [PP_Doc]
         _lhsOimports :: [PP_Doc]
_lhsOimports = [PP_Doc] -> [PP_Doc] -> [PP_Doc]
rule333 [PP_Doc]
_hdIimports [PP_Doc]
_tlIimports
         _lhsOsemFunBndDefs :: Seq PP_Doc
         _lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule334 Seq PP_Doc
_hdIsemFunBndDefs Seq PP_Doc
_tlIsemFunBndDefs
         _lhsOsemFunBndTps :: Seq PP_Doc
         _lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = Seq PP_Doc -> Seq PP_Doc -> Seq PP_Doc
rule335 Seq PP_Doc
_hdIsemFunBndTps Seq PP_Doc
_tlIsemFunBndTps
         _lhsOsem_nt :: PP_Doc
         _lhsOsem_nt :: PP_Doc
_lhsOsem_nt = PP_Doc -> PP_Doc -> PP_Doc
rule336 PP_Doc
_hdIsem_nt PP_Doc
_tlIsem_nt
         _lhsOsem_prod :: PP_Doc
         _lhsOsem_prod :: PP_Doc
_lhsOsem_prod = PP_Doc -> PP_Doc -> PP_Doc
rule337 PP_Doc
_hdIsem_prod PP_Doc
_tlIsem_prod
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule338 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule339 Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_tlIvisitdefs
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule340 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
         _hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule341 Map Int (Int, Int)
_lhsIallFromToStates
         _hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule342 Map Identifier Attributes
_lhsIallInhmap
         _hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule343 Map Identifier Int
_lhsIallInitStates
         _hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule344 Map Identifier Attributes
_lhsIallSynmap
         _hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule345 Map Int VisitKind
_lhsIallVisitKinds
         _hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule346 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _hdOallstates :: Set Int
_hdOallstates = Set Int -> Set Int
rule347 Set Int
_lhsIallstates
         _hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule348 Map Int (Set Identifier)
_lhsIavisitdefs
         _hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule349 Map Int (Set Identifier)
_lhsIavisituses
         _hdOclassCtxs :: ClassContext
_hdOclassCtxs = ClassContext -> ClassContext
rule350 ClassContext
_lhsIclassCtxs
         _hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule351 PP_Doc
_lhsIimportBlocks
         _hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule352 Attributes
_lhsIinhmap
         _hdOinitial :: Int
_hdOinitial = Int -> Int
rule353 Int
_lhsIinitial
         _hdOlocalAttrTypes :: Map Identifier Attributes
_hdOlocalAttrTypes = Map Identifier Attributes -> Map Identifier Attributes
rule354 Map Identifier Attributes
_lhsIlocalAttrTypes
         _hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule355 [Char]
_lhsImainFile
         _hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule356 [Char]
_lhsImainName
         _hdOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule357 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _hdOnextVisits :: Map Int StateCtx
_hdOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule358 Map Int StateCtx
_lhsInextVisits
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule359 Identifier
_lhsInt
         _hdOntType :: Type
_hdOntType = Type -> Type
rule360 Type
_lhsIntType
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule361 Options
_lhsIoptions
         _hdOparams :: [Identifier]
_hdOparams = [Identifier] -> [Identifier]
rule362 [Identifier]
_lhsIparams
         _hdOpragmaBlocks :: [Char]
_hdOpragmaBlocks = [Char] -> [Char]
rule363 [Char]
_lhsIpragmaBlocks
         _hdOprevVisits :: Map Int StateCtx
_hdOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule364 Map Int StateCtx
_lhsIprevVisits
         _hdOrename :: Bool
_hdOrename = Bool -> Bool
rule365 Bool
_lhsIrename
         _hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule366 Attributes
_lhsIsynmap
         _hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule367 PP_Doc
_lhsItextBlocks
         _tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule368 Map Int (Int, Int)
_lhsIallFromToStates
         _tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule369 Map Identifier Attributes
_lhsIallInhmap
         _tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule370 Map Identifier Int
_lhsIallInitStates
         _tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule371 Map Identifier Attributes
_lhsIallSynmap
         _tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule372 Map Int VisitKind
_lhsIallVisitKinds
         _tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule373 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _tlOallstates :: Set Int
_tlOallstates = Set Int -> Set Int
rule374 Set Int
_lhsIallstates
         _tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule375 Map Int (Set Identifier)
_lhsIavisitdefs
         _tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule376 Map Int (Set Identifier)
_lhsIavisituses
         _tlOclassCtxs :: ClassContext
_tlOclassCtxs = ClassContext -> ClassContext
rule377 ClassContext
_lhsIclassCtxs
         _tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule378 PP_Doc
_lhsIimportBlocks
         _tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule379 Attributes
_lhsIinhmap
         _tlOinitial :: Int
_tlOinitial = Int -> Int
rule380 Int
_lhsIinitial
         _tlOlocalAttrTypes :: Map Identifier Attributes
_tlOlocalAttrTypes = Map Identifier Attributes -> Map Identifier Attributes
rule381 Map Identifier Attributes
_lhsIlocalAttrTypes
         _tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule382 [Char]
_lhsImainFile
         _tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule383 [Char]
_lhsImainName
         _tlOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule384 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _tlOnextVisits :: Map Int StateCtx
_tlOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule385 Map Int StateCtx
_lhsInextVisits
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule386 Identifier
_lhsInt
         _tlOntType :: Type
_tlOntType = Type -> Type
rule387 Type
_lhsIntType
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule388 Options
_lhsIoptions
         _tlOparams :: [Identifier]
_tlOparams = [Identifier] -> [Identifier]
rule389 [Identifier]
_lhsIparams
         _tlOpragmaBlocks :: [Char]
_tlOpragmaBlocks = [Char] -> [Char]
rule390 [Char]
_lhsIpragmaBlocks
         _tlOprevVisits :: Map Int StateCtx
_tlOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule391 Map Int StateCtx
_lhsIprevVisits
         _tlOrename :: Bool
_tlOrename = Bool -> Bool
rule392 Bool
_lhsIrename
         _tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule393 Attributes
_lhsIsynmap
         _tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule394 PP_Doc
_lhsItextBlocks
         __result_ :: T_EProductions_vOut16
__result_ = [VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_EProductions_vOut16
T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_EProductions_vOut16
__result_ )
     in T_EProductions_v16 -> T_EProductions_s17
C_EProductions_s17 T_EProductions_v16
v16
   {-# INLINE rule325 #-}
   {-# LINE 343 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule325 = \ ((_hdIallvisits) :: [VisitStateState]) ->
                           {-# LINE 343 "src-ag/ExecutionPlan2Hs.ag" #-}
                           _hdIallvisits
                           {-# LINE 2880 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule326 #-}
   {-# LINE 396 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule326 = \ ((_hdIt_visits) :: PP_Doc) ->
                          {-# LINE 396 "src-ag/ExecutionPlan2Hs.ag" #-}
                          _hdIt_visits
                          {-# LINE 2886 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule327 #-}
   rule327 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _hdIchildvisit `Map.union` _tlIchildvisit
   {-# INLINE rule328 #-}
   rule328 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->
     _hdIcount + _tlIcount
   {-# INLINE rule329 #-}
   rule329 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->
     _hdIdatatype : _tlIdatatype
   {-# INLINE rule330 #-}
   rule330 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
     _hdIerrors Seq.>< _tlIerrors
   {-# INLINE rule331 #-}
   rule331 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _hdIfromToStates `mappend` _tlIfromToStates
   {-# INLINE rule332 #-}
   rule332 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->
     _hdIgenProdIO >> _tlIgenProdIO
   {-# INLINE rule333 #-}
   rule333 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->
     _hdIimports ++ _tlIimports
   {-# INLINE rule334 #-}
   rule334 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->
     _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs
   {-# INLINE rule335 #-}
   rule335 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->
     _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps
   {-# INLINE rule336 #-}
   rule336 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->
     _hdIsem_nt >-< _tlIsem_nt
   {-# INLINE rule337 #-}
   rule337 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->
     _hdIsem_prod >-< _tlIsem_prod
   {-# INLINE rule338 #-}
   rule338 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     _hdIvisitKinds `mappend` _tlIvisitKinds
   {-# INLINE rule339 #-}
   rule339 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _hdIvisitdefs `uwSetUnion` _tlIvisitdefs
   {-# INLINE rule340 #-}
   rule340 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _hdIvisituses `uwSetUnion` _tlIvisituses
   {-# INLINE rule341 #-}
   rule341 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule342 #-}
   rule342 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule343 #-}
   rule343 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule344 #-}
   rule344 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule345 #-}
   rule345 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule346 #-}
   rule346 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule347 #-}
   rule347 = \ ((_lhsIallstates) :: Set StateIdentifier) ->
     _lhsIallstates
   {-# INLINE rule348 #-}
   rule348 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule349 #-}
   rule349 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule350 #-}
   rule350 = \ ((_lhsIclassCtxs) :: ClassContext) ->
     _lhsIclassCtxs
   {-# INLINE rule351 #-}
   rule351 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule352 #-}
   rule352 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule353 #-}
   rule353 = \ ((_lhsIinitial) :: StateIdentifier) ->
     _lhsIinitial
   {-# INLINE rule354 #-}
   rule354 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule355 #-}
   rule355 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule356 #-}
   rule356 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule357 #-}
   rule357 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule358 #-}
   rule358 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
     _lhsInextVisits
   {-# INLINE rule359 #-}
   rule359 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule360 #-}
   rule360 = \ ((_lhsIntType) :: Type) ->
     _lhsIntType
   {-# INLINE rule361 #-}
   rule361 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule362 #-}
   rule362 = \ ((_lhsIparams) :: [Identifier]) ->
     _lhsIparams
   {-# INLINE rule363 #-}
   rule363 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule364 #-}
   rule364 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
     _lhsIprevVisits
   {-# INLINE rule365 #-}
   rule365 = \ ((_lhsIrename) :: Bool) ->
     _lhsIrename
   {-# INLINE rule366 #-}
   rule366 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
   {-# INLINE rule367 #-}
   rule367 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks
   {-# INLINE rule368 #-}
   rule368 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule369 #-}
   rule369 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule370 #-}
   rule370 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule371 #-}
   rule371 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule372 #-}
   rule372 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule373 #-}
   rule373 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule374 #-}
   rule374 = \ ((_lhsIallstates) :: Set StateIdentifier) ->
     _lhsIallstates
   {-# INLINE rule375 #-}
   rule375 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule376 #-}
   rule376 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule377 #-}
   rule377 = \ ((_lhsIclassCtxs) :: ClassContext) ->
     _lhsIclassCtxs
   {-# INLINE rule378 #-}
   rule378 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule379 #-}
   rule379 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule380 #-}
   rule380 = \ ((_lhsIinitial) :: StateIdentifier) ->
     _lhsIinitial
   {-# INLINE rule381 #-}
   rule381 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule382 #-}
   rule382 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule383 #-}
   rule383 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule384 #-}
   rule384 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule385 #-}
   rule385 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
     _lhsInextVisits
   {-# INLINE rule386 #-}
   rule386 = \ ((_lhsInt) :: NontermIdent) ->
     _lhsInt
   {-# INLINE rule387 #-}
   rule387 = \ ((_lhsIntType) :: Type) ->
     _lhsIntType
   {-# INLINE rule388 #-}
   rule388 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule389 #-}
   rule389 = \ ((_lhsIparams) :: [Identifier]) ->
     _lhsIparams
   {-# INLINE rule390 #-}
   rule390 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule391 #-}
   rule391 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
     _lhsIprevVisits
   {-# INLINE rule392 #-}
   rule392 = \ ((_lhsIrename) :: Bool) ->
     _lhsIrename
   {-# INLINE rule393 #-}
   rule393 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
   {-# INLINE rule394 #-}
   rule394 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks
{-# NOINLINE sem_EProductions_Nil #-}
sem_EProductions_Nil ::  T_EProductions 
sem_EProductions_Nil :: T_EProductions
sem_EProductions_Nil  = Identity T_EProductions_s17 -> T_EProductions
T_EProductions (T_EProductions_s17 -> Identity T_EProductions_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_EProductions_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_EProductions_s17
st17 = let
      v16 :: T_EProductions_v16 
      v16 :: T_EProductions_v16
v16 = \ (T_EProductions_vIn16 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Set Int
_lhsIallstates Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses ClassContext
_lhsIclassCtxs PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Int
_lhsIinitial Map Identifier Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Type
_lhsIntType Options
_lhsIoptions [Identifier]
_lhsIparams [Char]
_lhsIpragmaBlocks Map Int StateCtx
_lhsIprevVisits Bool
_lhsIrename Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks) -> ( let
         _lhsOallvisits :: [VisitStateState]
         _lhsOallvisits :: [VisitStateState]
_lhsOallvisits = () -> [VisitStateState]
forall a. () -> a
rule395  ()
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = ()
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. () -> Map k a
rule396  ()
         _lhsOcount :: Int
         _lhsOcount :: Int
_lhsOcount = () -> Int
rule397  ()
         _lhsOdatatype :: [PP_Doc]
         _lhsOdatatype :: [PP_Doc]
_lhsOdatatype = () -> [PP_Doc]
forall a. () -> [a]
rule398  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule399  ()
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule400  ()
         _lhsOgenProdIO :: IO ()
         _lhsOgenProdIO :: IO ()
_lhsOgenProdIO = () -> IO ()
rule401  ()
         _lhsOimports :: [PP_Doc]
         _lhsOimports :: [PP_Doc]
_lhsOimports = () -> [PP_Doc]
forall a. () -> [a]
rule402  ()
         _lhsOsemFunBndDefs :: Seq PP_Doc
         _lhsOsemFunBndDefs :: Seq PP_Doc
_lhsOsemFunBndDefs = () -> Seq PP_Doc
forall a. () -> Seq a
rule403  ()
         _lhsOsemFunBndTps :: Seq PP_Doc
         _lhsOsemFunBndTps :: Seq PP_Doc
_lhsOsemFunBndTps = () -> Seq PP_Doc
forall a. () -> Seq a
rule404  ()
         _lhsOsem_nt :: PP_Doc
         _lhsOsem_nt :: PP_Doc
_lhsOsem_nt = () -> PP_Doc
rule405  ()
         _lhsOsem_prod :: PP_Doc
         _lhsOsem_prod :: PP_Doc
_lhsOsem_prod = () -> PP_Doc
rule406  ()
         _lhsOt_visits :: PP_Doc
         _lhsOt_visits :: PP_Doc
_lhsOt_visits = () -> PP_Doc
rule407  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule408  ()
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule409  ()
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule410  ()
         __result_ :: T_EProductions_vOut16
__result_ = [VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> [PP_Doc]
-> Seq Error
-> Map Int (Int, Int)
-> IO ()
-> [PP_Doc]
-> Seq PP_Doc
-> Seq PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_EProductions_vOut16
T_EProductions_vOut16 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Int
_lhsOcount [PP_Doc]
_lhsOdatatype Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates IO ()
_lhsOgenProdIO [PP_Doc]
_lhsOimports Seq PP_Doc
_lhsOsemFunBndDefs Seq PP_Doc
_lhsOsemFunBndTps PP_Doc
_lhsOsem_nt PP_Doc
_lhsOsem_prod PP_Doc
_lhsOt_visits Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_EProductions_vOut16
__result_ )
     in T_EProductions_v16 -> T_EProductions_s17
C_EProductions_s17 T_EProductions_v16
v16
   {-# INLINE rule395 #-}
   {-# LINE 344 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule395 = \  (_ :: ()) ->
                           {-# LINE 344 "src-ag/ExecutionPlan2Hs.ag" #-}
                           error "Every nonterminal should have at least 1 production"
                           {-# LINE 3138 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule396 #-}
   rule396 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule397 #-}
   rule397 = \  (_ :: ()) ->
     0
   {-# INLINE rule398 #-}
   rule398 = \  (_ :: ()) ->
     []
   {-# INLINE rule399 #-}
   rule399 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule400 #-}
   rule400 = \  (_ :: ()) ->
     mempty
   {-# INLINE rule401 #-}
   rule401 = \  (_ :: ()) ->
     return ()
   {-# INLINE rule402 #-}
   rule402 = \  (_ :: ()) ->
     []
   {-# INLINE rule403 #-}
   rule403 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule404 #-}
   rule404 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule405 #-}
   rule405 = \  (_ :: ()) ->
     empty
   {-# INLINE rule406 #-}
   rule406 = \  (_ :: ()) ->
     empty
   {-# INLINE rule407 #-}
   rule407 = \  (_ :: ()) ->
     empty
   {-# INLINE rule408 #-}
   rule408 = \  (_ :: ()) ->
     mempty
   {-# INLINE rule409 #-}
   rule409 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule410 #-}
   rule410 = \  (_ :: ()) ->
     Map.empty

-- ERule -------------------------------------------------------
-- wrapper
data Inh_ERule  = Inh_ERule { Inh_ERule -> Map Identifier Attributes
allInhmap_Inh_ERule :: (Map NontermIdent Attributes), Inh_ERule -> Map Identifier Attributes
allSynmap_Inh_ERule :: (Map NontermIdent Attributes), Inh_ERule -> Attributes
childTypes_Inh_ERule :: (Map Identifier Type), Inh_ERule -> Identifier
con_Inh_ERule :: (ConstructorIdent), Inh_ERule -> PP_Doc
importBlocks_Inh_ERule :: (PP_Doc), Inh_ERule -> Attributes
inhmap_Inh_ERule :: (Attributes), Inh_ERule -> Set [Char]
lazyIntras_Inh_ERule :: (Set String), Inh_ERule -> Attributes
localAttrTypes_Inh_ERule :: (Map Identifier Type), Inh_ERule -> [Char]
mainFile_Inh_ERule :: (String), Inh_ERule -> [Char]
mainName_Inh_ERule :: (String), Inh_ERule -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String), Inh_ERule -> Identifier
nt_Inh_ERule :: (NontermIdent), Inh_ERule -> Options
options_Inh_ERule :: (Options), Inh_ERule -> [Char]
pragmaBlocks_Inh_ERule :: (String), Inh_ERule -> Map Identifier (Set VisitKind)
ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), Inh_ERule -> Attributes
synmap_Inh_ERule :: (Attributes), Inh_ERule -> PP_Doc
textBlocks_Inh_ERule :: (PP_Doc), Inh_ERule -> Map Identifier Int
usageInfo_Inh_ERule :: (Map Identifier Int) }
data Syn_ERule  = Syn_ERule { Syn_ERule -> Seq Error
errors_Syn_ERule :: (Seq Error), Syn_ERule
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Syn_ERule -> Map Identifier (Set [Char])
ruledefs_Syn_ERule :: (Map Identifier (Set String)), Syn_ERule -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), Syn_ERule -> PP_Doc
sem_rules_Syn_ERule :: (PP_Doc), Syn_ERule -> Set [Char]
usedArgs_Syn_ERule :: (Set String) }
{-# INLINABLE wrap_ERule #-}
wrap_ERule :: T_ERule  -> Inh_ERule  -> (Syn_ERule )
wrap_ERule :: T_ERule -> Inh_ERule -> Syn_ERule
wrap_ERule (T_ERule Identity T_ERule_s20
act) (Inh_ERule Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) =
   Identity Syn_ERule -> Syn_ERule
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_ERule_s20
sem <- Identity T_ERule_s20
act
        let arg19 :: T_ERule_vIn19
arg19 = Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> PP_Doc
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERule_vIn19
T_ERule_vIn19 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo
        (T_ERule_vOut19 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs) <- T_ERule_vOut19 -> Identity T_ERule_vOut19
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 T_ERule_s20
sem T_ERule_vIn19
arg19)
        Syn_ERule -> Identity Syn_ERule
forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Set [Char]
-> Syn_ERule
Syn_ERule Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs)
   )

-- cata
{-# INLINE sem_ERule #-}
sem_ERule :: ERule  -> T_ERule 
sem_ERule :: ERule -> T_ERule
sem_ERule ( ERule Identifier
name_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ [Char]
origin_ Bool
explicit_ Bool
pure_ Maybe Error
mbError_ ) = Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> [Char]
-> Bool
-> Bool
-> Maybe Error
-> T_ERule
sem_ERule_ERule Identifier
name_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pattern_ ) ( Expression -> T_Expression
sem_Expression Expression
rhs_ ) Bool
owrt_ [Char]
origin_ Bool
explicit_ Bool
pure_ Maybe Error
mbError_

-- semantic domain
newtype T_ERule  = T_ERule {
                           T_ERule -> Identity T_ERule_s20
attach_T_ERule :: Identity (T_ERule_s20 )
                           }
newtype T_ERule_s20  = C_ERule_s20 {
                                   T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 :: (T_ERule_v19 )
                                   }
data T_ERule_s21  = C_ERule_s21
type T_ERule_v19  = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )
data T_ERule_vIn19  = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)
data T_ERule_vOut19  = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)
{-# NOINLINE sem_ERule_ERule #-}
sem_ERule_ERule :: (Identifier) -> T_Pattern  -> T_Expression  -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule 
sem_ERule_ERule :: Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> [Char]
-> Bool
-> Bool
-> Maybe Error
-> T_ERule
sem_ERule_ERule Identifier
arg_name_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
_ [Char]
_ Bool
arg_explicit_ Bool
arg_pure_ Maybe Error
arg_mbError_ = Identity T_ERule_s20 -> T_ERule
T_ERule (T_ERule_s20 -> Identity T_ERule_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_ERule_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_ERule_s20
st20 = let
      v19 :: T_ERule_v19 
      v19 :: T_ERule_v19
v19 = \ (T_ERule_vIn19 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) -> ( let
         _patternX41 :: T_Pattern_s41
_patternX41 = Identity T_Pattern_s41 -> T_Pattern_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s41
attach_T_Pattern (T_Pattern
arg_pattern_))
         _rhsX29 :: T_Expression_s29
_rhsX29 = Identity T_Expression_s29 -> T_Expression_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expression -> Identity T_Expression_s29
attach_T_Expression (T_Expression
arg_rhs_))
         (T_Pattern_vOut40 PP_Doc
_patternIattrTypes Set [Char]
_patternIattrs Pattern
_patternIcopy Bool
_patternIisUnderscore PP_Doc
_patternIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patternX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_patternOallInhmap Map Identifier Attributes
_patternOallSynmap Bool
_patternOanyLazyKind Attributes
_patternOinhmap Attributes
_patternOlocalAttrTypes Options
_patternOoptions Attributes
_patternOsynmap)
         (T_Expression_vOut28 Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Pos
_rhsIpos PP_Doc
_rhsIsemfunc [HsToken]
_rhsItks) = T_Expression_s29 -> T_Expression_v28
inv_Expression_s29 T_Expression_s29
_rhsX29 (Options -> T_Expression_vIn28
T_Expression_vIn28 Options
_rhsOoptions)
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = (Set [Char] -> Set [Char]) -> Set [Char] -> Set [Char]
forall a. (a -> a) -> a -> a
rule411 Set [Char] -> Set [Char]
_usedArgs_augmented_f1 Set [Char]
forall a. Set a
_usedArgs_augmented_syn
         _usedArgs_augmented_f1 :: Set [Char] -> Set [Char]
_usedArgs_augmented_f1 = Map [Char] (Maybe NonLocalAttr) -> Set [Char] -> Set [Char]
rule412 Map [Char] (Maybe NonLocalAttr)
_rhsIattrs
         _lhsOsem_rules :: PP_Doc
         _lhsOsem_rules :: PP_Doc
_lhsOsem_rules = PP_Doc -> PP_Doc -> Int -> PP_Doc
rule413 PP_Doc
_rulePragma PP_Doc
_rulecode Int
_used
         _rulecode :: PP_Doc
_rulecode = PP_Doc
-> Bool -> PP_Doc -> PP_Doc -> Pos -> PP_Doc -> PP_Doc -> PP_Doc
rule414 PP_Doc
_endpragma Bool
_genpragma PP_Doc
_lambda PP_Doc
_pragma Pos
_rhsIpos PP_Doc
_rhsIsemfunc PP_Doc
_scc
         _rulePragma :: PP_Doc
_rulePragma = Options -> Int -> Bool -> Identifier -> PP_Doc
rule415 Options
_lhsIoptions Int
_used Bool
arg_explicit_ Identifier
arg_name_
         _scc :: PP_Doc
_scc = Identifier
-> Identifier
-> Options
-> Pos
-> Bool
-> Identifier
-> Bool
-> PP_Doc
rule416 Identifier
_lhsIcon Identifier
_lhsInt Options
_lhsIoptions Pos
_rhsIpos Bool
arg_explicit_ Identifier
arg_name_ Bool
arg_pure_
         _pragma :: PP_Doc
_pragma = Pos -> PP_Doc
rule417 Pos
_rhsIpos
         _endpragma :: PP_Doc
_endpragma = [Char] -> PP_Doc
rule418 [Char]
_lhsImainFile
         _genpragma :: Bool
_genpragma = Bool -> Options -> Bool -> Bool
rule419 Bool
_haspos Options
_lhsIoptions Bool
arg_explicit_
         _haspos :: Bool
_haspos = Pos -> Bool
rule420 Pos
_rhsIpos
         _lambda :: PP_Doc
_lambda = PP_Doc
-> Options
-> Map [Char] (Maybe NonLocalAttr)
-> Identifier
-> PP_Doc
rule421 PP_Doc
_argPats Options
_lhsIoptions Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_
         _argPats :: PP_Doc
_argPats = (PP_Doc -> PP_Doc)
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Set [Char]
-> Attributes
-> Options
-> Map [Char] (Maybe NonLocalAttr)
-> PP_Doc
rule422 PP_Doc -> PP_Doc
_addbang1 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Map [Char] (Maybe NonLocalAttr)
_rhsIattrs
         _argExprs :: PP_Doc
_argExprs = Map [Char] (Maybe NonLocalAttr) -> PP_Doc
rule423 Map [Char] (Maybe NonLocalAttr)
_rhsIattrs
         _stepcode :: VisitKind -> FormatMode -> Either Error PP_Doc
_stepcode = PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> Map [Char] (Maybe NonLocalAttr)
-> Identifier
-> Bool
-> VisitKind
-> FormatMode
-> Either Error PP_Doc
rule424 PP_Doc
_argExprs Options
_lhsIoptions PP_Doc
_patternIattrTypes PP_Doc
_patternIsem_lhs Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_ Bool
arg_pure_
         _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
         _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules = (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Identifier
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
forall a k. a -> k -> Map k a
rule425 VisitKind -> FormatMode -> Either Error PP_Doc
_stepcode Identifier
arg_name_
         _used :: Int
_used = Map Identifier Int -> Identifier -> Int
rule426 Map Identifier Int
_lhsIusageInfo Identifier
arg_name_
         _kinds :: Set VisitKind
_kinds = Map Identifier (Set VisitKind) -> Identifier -> Set VisitKind
rule427 Map Identifier (Set VisitKind)
_lhsIruleKinds Identifier
arg_name_
         _anyLazyKind :: Bool
_anyLazyKind = Set VisitKind -> Bool
rule428 Set VisitKind
_kinds
         _lhsOruledefs :: Map Identifier (Set String)
         _lhsOruledefs :: Map Identifier (Set [Char])
_lhsOruledefs = Set [Char] -> Identifier -> Map Identifier (Set [Char])
forall k. Set [Char] -> k -> Map k (Set [Char])
rule429 Set [Char]
_patternIattrs Identifier
arg_name_
         _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
         _lhsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses = Map [Char] (Maybe NonLocalAttr)
-> Identifier -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
forall k.
Map [Char] (Maybe NonLocalAttr)
-> k -> Map k (Map [Char] (Maybe NonLocalAttr))
rule430 Map [Char] (Maybe NonLocalAttr)
_rhsIattrs Identifier
arg_name_
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule431 Options
_lhsIoptions
         _addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule432 PP_Doc -> PP_Doc
_addbang Bool
_anyLazyKind
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Int -> Maybe Error -> Seq Error
forall a. Int -> Maybe a -> Seq a
rule433 Int
_used Maybe Error
arg_mbError_
         _usedArgs_augmented_syn :: Set a
_usedArgs_augmented_syn = () -> Set a
forall a. () -> Set a
rule434  ()
         _patternOallInhmap :: Map Identifier Attributes
_patternOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule435 Map Identifier Attributes
_lhsIallInhmap
         _patternOallSynmap :: Map Identifier Attributes
_patternOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule436 Map Identifier Attributes
_lhsIallSynmap
         _patternOanyLazyKind :: Bool
_patternOanyLazyKind = Bool -> Bool
forall a. a -> a
rule437 Bool
_anyLazyKind
         _patternOinhmap :: Attributes
_patternOinhmap = Attributes -> Attributes
rule438 Attributes
_lhsIinhmap
         _patternOlocalAttrTypes :: Attributes
_patternOlocalAttrTypes = Attributes -> Attributes
rule439 Attributes
_lhsIlocalAttrTypes
         _patternOoptions :: Options
_patternOoptions = Options -> Options
rule440 Options
_lhsIoptions
         _patternOsynmap :: Attributes
_patternOsynmap = Attributes -> Attributes
rule441 Attributes
_lhsIsynmap
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule442 Options
_lhsIoptions
         __result_ :: T_ERule_vOut19
__result_ = Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Set [Char]
-> T_ERule_vOut19
T_ERule_vOut19 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs
         in T_ERule_vOut19
__result_ )
     in T_ERule_v19 -> T_ERule_s20
C_ERule_s20 T_ERule_v19
v19
   {-# INLINE rule411 #-}
   rule411 :: (a -> a) -> a -> a
rule411 = \ a -> a
_usedArgs_augmented_f1 a
_usedArgs_augmented_syn ->
     ((a -> a) -> a -> a) -> a -> [a -> a] -> a
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr (a -> a) -> a -> a
forall a b. (a -> b) -> a -> b
($) a
_usedArgs_augmented_syn [a -> a
_usedArgs_augmented_f1]
   {-# INLINE rule412 #-}
   rule412 :: Map [Char] (Maybe NonLocalAttr) -> Set [Char] -> Set [Char]
rule412 = \ ((Map [Char] (Maybe NonLocalAttr)
_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
                        Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
Set.union (Set [Char] -> Set [Char] -> Set [Char])
-> Set [Char] -> Set [Char] -> Set [Char]
forall a b. (a -> b) -> a -> b
$ Map [Char] (Maybe NonLocalAttr) -> Set [Char]
forall k a. Map k a -> Set k
Map.keysSet (Map [Char] (Maybe NonLocalAttr) -> Set [Char])
-> Map [Char] (Maybe NonLocalAttr) -> Set [Char]
forall a b. (a -> b) -> a -> b
$ ([Char] -> [Char])
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
forall k2 k1 a. Ord k2 => (k1 -> k2) -> Map k1 a -> Map k2 a
Map.mapKeys (\[Char]
a -> [Char]
"arg_" [Char] -> [Char] -> [Char]
forall a. [a] -> [a] -> [a]
++ [Char]
a) (Map [Char] (Maybe NonLocalAttr)
 -> Map [Char] (Maybe NonLocalAttr))
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
forall a b. (a -> b) -> a -> b
$ (Maybe NonLocalAttr -> Bool)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
forall a k. (a -> Bool) -> Map k a -> Map k a
Map.filter Maybe NonLocalAttr -> Bool
forall a. Maybe a -> Bool
isNothing Map [Char] (Maybe NonLocalAttr)
_rhsIattrs
   {-# INLINE rule413 #-}
   {-# LINE 995 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule413 = \ _rulePragma _rulecode _used ->
                          {-# LINE 995 "src-ag/ExecutionPlan2Hs.ag" #-}
                          if _used     == 0
                          then empty
                          else _rulePragma     >-< _rulecode
                          {-# LINE 3280 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule414 #-}
   {-# LINE 998 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule414 = \ _endpragma _genpragma _lambda _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) _scc ->
                          {-# LINE 998 "src-ag/ExecutionPlan2Hs.ag" #-}
                          ( if _genpragma
                            then _pragma
                            else empty
                          )
                          >-< _lambda     >#< _scc
                          >-< indent ((column _rhsIpos - 2) `max` 2)
                                ( if _genpragma
                                  then _pragma     >-< _rhsIsemfunc >-< _endpragma
                                  else _rhsIsemfunc
                                )
                          {-# LINE 3295 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule415 #-}
   {-# LINE 1010 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule415 = \ ((_lhsIoptions) :: Options) _used explicit_ name_ ->
                           {-# LINE 1010 "src-ag/ExecutionPlan2Hs.ag" #-}
                           ( let reallyInlineStr   = "INLINE"
                                 reallyNoInlineStr = "NOINLINE"
                             in  if noInlinePragmas _lhsIoptions
                                 then empty
                                 else if _used     == 1
                                      then ppPragmaBinding reallyInlineStr name_
                                      else if helpInlining _lhsIoptions
                                           then if not explicit_ && _used     <= reallyOftenUsedThreshold
                                                then ppPragmaBinding "INLINE[1]" name_
                                                else if _used     > ruleInlineThresholdSoft && explicit_
                                                     then if _used     > ruleInlineThresholdHard
                                                          then ppPragmaBinding reallyNoInlineStr name_
                                                          else if aggressiveInlinePragmas _lhsIoptions
                                                               then ppPragmaBinding "NOINLINE[2]" name_
                                                               else ppNoInline name_
                                                     else if aggressiveInlinePragmas _lhsIoptions
                                                          then ppPragmaBinding "NOINLINE[1]" name_
                                                          else ppNoInline name_
                                           else if not explicit_ || _used     <= ruleInlineThresholdSoft
                                                then ppPragmaBinding "NOINLINE[1]" name_
                                                else ppNoInline name_
                               )
                           {-# LINE 3322 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule416 #-}
   {-# LINE 1032 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule416 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_rhsIpos) :: Pos) explicit_ name_ pure_ ->
                           {-# LINE 1032 "src-ag/ExecutionPlan2Hs.ag" #-}
                           if genCostCentres _lhsIoptions && explicit_ && pure_ && not (noPerRuleCostCentres _lhsIoptions)
                           then ppCostCentre (name_ >|< "_" >|< line _rhsIpos >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)
                           else empty
                           {-# LINE 3330 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule417 #-}
   {-# LINE 1035 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule417 = \ ((_rhsIpos) :: Pos) ->
                           {-# LINE 1035 "src-ag/ExecutionPlan2Hs.ag" #-}
                           "{-# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#-}"
                           {-# LINE 3336 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule418 #-}
   {-# LINE 1036 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule418 = \ ((_lhsImainFile) :: String) ->
                           {-# LINE 1036 "src-ag/ExecutionPlan2Hs.ag" #-}
                           ppWithLineNr (\ln -> "{-# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#-}")
                           {-# LINE 3342 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule419 #-}
   {-# LINE 1037 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule419 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->
                           {-# LINE 1037 "src-ag/ExecutionPlan2Hs.ag" #-}
                           genLinePragmas _lhsIoptions && explicit_ && _haspos
                           {-# LINE 3348 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule420 #-}
   {-# LINE 1038 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule420 = \ ((_rhsIpos) :: Pos) ->
                           {-# LINE 1038 "src-ag/ExecutionPlan2Hs.ag" #-}
                           line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))
                           {-# LINE 3354 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule421 #-}
   {-# LINE 1047 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule421 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->
                           {-# LINE 1047 "src-ag/ExecutionPlan2Hs.ag" #-}
                           name_ >#< "=" >#< "\\" >#< _argPats     >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "->"
                           {-# LINE 3360 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule422 #-}
   {-# LINE 1049 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule422 = \ _addbang1 ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlazyIntras) :: Set String) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
                           {-# LINE 1049 "src-ag/ExecutionPlan2Hs.ag" #-}
                           ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str
                                                | otherwise                        = _addbang1     (pp str)
                                      in case mbAttr of
                                           Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->
                                             case Map.lookup nm _lhsIlocalAttrTypes of
                                               Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)
                                               Nothing -> match
                                           Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->
                                             case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of
                                               Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)
                                               Nothing    -> match
                                           _ -> match
                                    | (str,mbAttr) <- Map.assocs _rhsIattrs
                                    ]
                           {-# LINE 3379 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule423 #-}
   {-# LINE 1063 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule423 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->
                           {-# LINE 1063 "src-ag/ExecutionPlan2Hs.ag" #-}
                           ppSpaced [ case mbAttr of
                                         Nothing -> "arg_" >|< str
                                         _       -> text str
                                    | (str,mbAttr) <- Map.assocs _rhsIattrs
                                    ]
                           {-# LINE 3389 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule424 #-}
   {-# LINE 1068 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule424 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIattrTypes) :: PP_Doc) ((_patternIsem_lhs) ::  PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->
                           {-# LINE 1068 "src-ag/ExecutionPlan2Hs.ag" #-}
                           \kind fmtMode -> if kind `compatibleRule` pure_
                                            then Right $ let oper | pure_     = "="
                                                                  | otherwise = "<-"
                                                             decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs     >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)
                                                             tp   = if pure_ && not (noPerRuleTypeSigs _lhsIoptions)
                                                                    then _patternIattrTypes
                                                                    else empty
                                                         in fmtDecl pure_ fmtMode (tp >-< decl)
                                            else Left $ IncompatibleRuleKind name_ kind
                           {-# LINE 3403 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule425 #-}
   {-# LINE 1078 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule425 = \ _stepcode name_ ->
                           {-# LINE 1078 "src-ag/ExecutionPlan2Hs.ag" #-}
                           Map.singleton name_ _stepcode
                           {-# LINE 3409 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule426 #-}
   {-# LINE 1283 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule426 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->
                                                 {-# LINE 1283 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                 Map.findWithDefault 0 name_ _lhsIusageInfo
                                                 {-# LINE 3415 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule427 #-}
   {-# LINE 1299 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule427 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->
                {-# LINE 1299 "src-ag/ExecutionPlan2Hs.ag" #-}
                Map.findWithDefault Set.empty name_ _lhsIruleKinds
                {-# LINE 3421 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule428 #-}
   {-# LINE 1300 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule428 = \ _kinds ->
                      {-# LINE 1300 "src-ag/ExecutionPlan2Hs.ag" #-}
                      Set.fold (\k r -> isLazyKind k || r) False _kinds
                      {-# LINE 3427 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule429 #-}
   {-# LINE 1346 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule429 = \ ((_patternIattrs) :: Set String) name_ ->
                           {-# LINE 1346 "src-ag/ExecutionPlan2Hs.ag" #-}
                           Map.singleton name_ _patternIattrs
                           {-# LINE 3433 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule430 #-}
   {-# LINE 1347 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule430 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->
                           {-# LINE 1347 "src-ag/ExecutionPlan2Hs.ag" #-}
                           Map.singleton name_ _rhsIattrs
                           {-# LINE 3439 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule431 #-}
   {-# LINE 1549 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule431 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1549 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 3445 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule432 #-}
   {-# LINE 1560 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule432 = \ _addbang _anyLazyKind ->
                                                     {-# LINE 1560 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     if _anyLazyKind     then id else _addbang
                                                     {-# LINE 3451 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule433 #-}
   {-# LINE 1666 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule433 = \ _used mbError_ ->
                 {-# LINE 1666 "src-ag/ExecutionPlan2Hs.ag" #-}
                 case mbError_ of
                   Just e | _used     > 0 -> Seq.singleton e
                   _                      -> Seq.empty
                 {-# LINE 3459 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule434 #-}
   rule434 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule435 #-}
   rule435 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule436 #-}
   rule436 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule437 #-}
   rule437 = \ _anyLazyKind ->
     _anyLazyKind
   {-# INLINE rule438 #-}
   rule438 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule439 #-}
   rule439 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule440 #-}
   rule440 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule441 #-}
   rule441 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
   {-# INLINE rule442 #-}
   rule442 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions

-- ERules ------------------------------------------------------
-- wrapper
data Inh_ERules  = Inh_ERules { Inh_ERules -> Map Identifier Attributes
allInhmap_Inh_ERules :: (Map NontermIdent Attributes), Inh_ERules -> Map Identifier Attributes
allSynmap_Inh_ERules :: (Map NontermIdent Attributes), Inh_ERules -> Attributes
childTypes_Inh_ERules :: (Map Identifier Type), Inh_ERules -> Identifier
con_Inh_ERules :: (ConstructorIdent), Inh_ERules -> PP_Doc
importBlocks_Inh_ERules :: (PP_Doc), Inh_ERules -> Attributes
inhmap_Inh_ERules :: (Attributes), Inh_ERules -> Set [Char]
lazyIntras_Inh_ERules :: (Set String), Inh_ERules -> Attributes
localAttrTypes_Inh_ERules :: (Map Identifier Type), Inh_ERules -> [Char]
mainFile_Inh_ERules :: (String), Inh_ERules -> [Char]
mainName_Inh_ERules :: (String), Inh_ERules -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String), Inh_ERules -> Identifier
nt_Inh_ERules :: (NontermIdent), Inh_ERules -> Options
options_Inh_ERules :: (Options), Inh_ERules -> [Char]
pragmaBlocks_Inh_ERules :: (String), Inh_ERules -> Map Identifier (Set VisitKind)
ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), Inh_ERules -> Attributes
synmap_Inh_ERules :: (Attributes), Inh_ERules -> PP_Doc
textBlocks_Inh_ERules :: (PP_Doc), Inh_ERules -> Map Identifier Int
usageInfo_Inh_ERules :: (Map Identifier Int) }
data Syn_ERules  = Syn_ERules { Syn_ERules -> Seq Error
errors_Syn_ERules :: (Seq Error), Syn_ERules
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Syn_ERules -> Map Identifier (Set [Char])
ruledefs_Syn_ERules :: (Map Identifier (Set String)), Syn_ERules -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), Syn_ERules -> PP_Doc
sem_rules_Syn_ERules :: (PP_Doc), Syn_ERules -> Set [Char]
usedArgs_Syn_ERules :: (Set String) }
{-# INLINABLE wrap_ERules #-}
wrap_ERules :: T_ERules  -> Inh_ERules  -> (Syn_ERules )
wrap_ERules :: T_ERules -> Inh_ERules -> Syn_ERules
wrap_ERules (T_ERules Identity T_ERules_s23
act) (Inh_ERules Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) =
   Identity Syn_ERules -> Syn_ERules
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_ERules_s23
sem <- Identity T_ERules_s23
act
        let arg22 :: T_ERules_vIn22
arg22 = Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> PP_Doc
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo
        (T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs) <- T_ERules_vOut22 -> Identity T_ERules_vOut22
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
sem T_ERules_vIn22
arg22)
        Syn_ERules -> Identity Syn_ERules
forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Set [Char]
-> Syn_ERules
Syn_ERules Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs)
   )

-- cata
{-# NOINLINE sem_ERules #-}
sem_ERules :: ERules  -> T_ERules 
sem_ERules :: ERules -> T_ERules
sem_ERules ERules
list = (T_ERule -> T_ERules -> T_ERules)
-> T_ERules -> [T_ERule] -> T_ERules
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_ERule -> T_ERules -> T_ERules
sem_ERules_Cons T_ERules
sem_ERules_Nil ((ERule -> T_ERule) -> ERules -> [T_ERule]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map ERule -> T_ERule
sem_ERule ERules
list)

-- semantic domain
newtype T_ERules  = T_ERules {
                             T_ERules -> Identity T_ERules_s23
attach_T_ERules :: Identity (T_ERules_s23 )
                             }
newtype T_ERules_s23  = C_ERules_s23 {
                                     T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 :: (T_ERules_v22 )
                                     }
data T_ERules_s24  = C_ERules_s24
type T_ERules_v22  = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )
data T_ERules_vIn22  = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)
data T_ERules_vOut22  = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)
{-# NOINLINE sem_ERules_Cons #-}
sem_ERules_Cons :: T_ERule  -> T_ERules  -> T_ERules 
sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules
sem_ERules_Cons T_ERule
arg_hd_ T_ERules
arg_tl_ = Identity T_ERules_s23 -> T_ERules
T_ERules (T_ERules_s23 -> Identity T_ERules_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_ERules_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_ERules_s23
st23 = let
      v22 :: T_ERules_v22 
      v22 :: T_ERules_v22
v22 = \ (T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) -> ( let
         _hdX20 :: T_ERule_s20
_hdX20 = Identity T_ERule_s20 -> T_ERule_s20
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ERule -> Identity T_ERule_s20
attach_T_ERule (T_ERule
arg_hd_))
         _tlX23 :: T_ERules_s23
_tlX23 = Identity T_ERules_s23 -> T_ERules_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ERules -> Identity T_ERules_s23
attach_T_ERules (T_ERules
arg_tl_))
         (T_ERule_vOut19 Seq Error
_hdIerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules Map Identifier (Set [Char])
_hdIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses PP_Doc
_hdIsem_rules Set [Char]
_hdIusedArgs) = T_ERule_s20 -> T_ERule_v19
inv_ERule_s20 T_ERule_s20
_hdX20 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> PP_Doc
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERule_vIn19
T_ERule_vIn19 Map Identifier Attributes
_hdOallInhmap Map Identifier Attributes
_hdOallSynmap Attributes
_hdOchildTypes Identifier
_hdOcon PP_Doc
_hdOimportBlocks Attributes
_hdOinhmap Set [Char]
_hdOlazyIntras Attributes
_hdOlocalAttrTypes [Char]
_hdOmainFile [Char]
_hdOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader Identifier
_hdOnt Options
_hdOoptions [Char]
_hdOpragmaBlocks Map Identifier (Set VisitKind)
_hdOruleKinds Attributes
_hdOsynmap PP_Doc
_hdOtextBlocks Map Identifier Int
_hdOusageInfo)
         (T_ERules_vOut22 Seq Error
_tlIerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules Map Identifier (Set [Char])
_tlIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses PP_Doc
_tlIsem_rules Set [Char]
_tlIusedArgs) = T_ERules_s23 -> T_ERules_v22
inv_ERules_s23 T_ERules_s23
_tlX23 (Map Identifier Attributes
-> Map Identifier Attributes
-> Attributes
-> Identifier
-> PP_Doc
-> Attributes
-> Set [Char]
-> Attributes
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Identifier
-> Options
-> [Char]
-> Map Identifier (Set VisitKind)
-> Attributes
-> PP_Doc
-> Map Identifier Int
-> T_ERules_vIn22
T_ERules_vIn22 Map Identifier Attributes
_tlOallInhmap Map Identifier Attributes
_tlOallSynmap Attributes
_tlOchildTypes Identifier
_tlOcon PP_Doc
_tlOimportBlocks Attributes
_tlOinhmap Set [Char]
_tlOlazyIntras Attributes
_tlOlocalAttrTypes [Char]
_tlOmainFile [Char]
_tlOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader Identifier
_tlOnt Options
_tlOoptions [Char]
_tlOpragmaBlocks Map Identifier (Set VisitKind)
_tlOruleKinds Attributes
_tlOsynmap PP_Doc
_tlOtextBlocks Map Identifier Int
_tlOusageInfo)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule443 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
         _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule444 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules
         _lhsOruledefs :: Map Identifier (Set String)
         _lhsOruledefs :: Map Identifier (Set [Char])
_lhsOruledefs = Map Identifier (Set [Char])
-> Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule445 Map Identifier (Set [Char])
_hdIruledefs Map Identifier (Set [Char])
_tlIruledefs
         _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
         _lhsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule446 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses
         _lhsOsem_rules :: PP_Doc
         _lhsOsem_rules :: PP_Doc
_lhsOsem_rules = PP_Doc -> PP_Doc -> PP_Doc
rule447 PP_Doc
_hdIsem_rules PP_Doc
_tlIsem_rules
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char] -> Set [Char]
rule448 Set [Char]
_hdIusedArgs Set [Char]
_tlIusedArgs
         _hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule449 Map Identifier Attributes
_lhsIallInhmap
         _hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule450 Map Identifier Attributes
_lhsIallSynmap
         _hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule451 Attributes
_lhsIchildTypes
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule452 Identifier
_lhsIcon
         _hdOimportBlocks :: PP_Doc
_hdOimportBlocks = PP_Doc -> PP_Doc
rule453 PP_Doc
_lhsIimportBlocks
         _hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule454 Attributes
_lhsIinhmap
         _hdOlazyIntras :: Set [Char]
_hdOlazyIntras = Set [Char] -> Set [Char]
rule455 Set [Char]
_lhsIlazyIntras
         _hdOlocalAttrTypes :: Attributes
_hdOlocalAttrTypes = Attributes -> Attributes
rule456 Attributes
_lhsIlocalAttrTypes
         _hdOmainFile :: [Char]
_hdOmainFile = [Char] -> [Char]
rule457 [Char]
_lhsImainFile
         _hdOmainName :: [Char]
_hdOmainName = [Char] -> [Char]
rule458 [Char]
_lhsImainName
         _hdOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_hdOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule459 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule460 Identifier
_lhsInt
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule461 Options
_lhsIoptions
         _hdOpragmaBlocks :: [Char]
_hdOpragmaBlocks = [Char] -> [Char]
rule462 [Char]
_lhsIpragmaBlocks
         _hdOruleKinds :: Map Identifier (Set VisitKind)
_hdOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule463 Map Identifier (Set VisitKind)
_lhsIruleKinds
         _hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule464 Attributes
_lhsIsynmap
         _hdOtextBlocks :: PP_Doc
_hdOtextBlocks = PP_Doc -> PP_Doc
rule465 PP_Doc
_lhsItextBlocks
         _hdOusageInfo :: Map Identifier Int
_hdOusageInfo = Map Identifier Int -> Map Identifier Int
rule466 Map Identifier Int
_lhsIusageInfo
         _tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule467 Map Identifier Attributes
_lhsIallInhmap
         _tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule468 Map Identifier Attributes
_lhsIallSynmap
         _tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule469 Attributes
_lhsIchildTypes
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule470 Identifier
_lhsIcon
         _tlOimportBlocks :: PP_Doc
_tlOimportBlocks = PP_Doc -> PP_Doc
rule471 PP_Doc
_lhsIimportBlocks
         _tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule472 Attributes
_lhsIinhmap
         _tlOlazyIntras :: Set [Char]
_tlOlazyIntras = Set [Char] -> Set [Char]
rule473 Set [Char]
_lhsIlazyIntras
         _tlOlocalAttrTypes :: Attributes
_tlOlocalAttrTypes = Attributes -> Attributes
rule474 Attributes
_lhsIlocalAttrTypes
         _tlOmainFile :: [Char]
_tlOmainFile = [Char] -> [Char]
rule475 [Char]
_lhsImainFile
         _tlOmainName :: [Char]
_tlOmainName = [Char] -> [Char]
rule476 [Char]
_lhsImainName
         _tlOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_tlOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule477 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule478 Identifier
_lhsInt
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule479 Options
_lhsIoptions
         _tlOpragmaBlocks :: [Char]
_tlOpragmaBlocks = [Char] -> [Char]
rule480 [Char]
_lhsIpragmaBlocks
         _tlOruleKinds :: Map Identifier (Set VisitKind)
_tlOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule481 Map Identifier (Set VisitKind)
_lhsIruleKinds
         _tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule482 Attributes
_lhsIsynmap
         _tlOtextBlocks :: PP_Doc
_tlOtextBlocks = PP_Doc -> PP_Doc
rule483 PP_Doc
_lhsItextBlocks
         _tlOusageInfo :: Map Identifier Int
_tlOusageInfo = Map Identifier Int -> Map Identifier Int
rule484 Map Identifier Int
_lhsIusageInfo
         __result_ :: T_ERules_vOut22
__result_ = Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Set [Char]
-> T_ERules_vOut22
T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs
         in T_ERules_vOut22
__result_ )
     in T_ERules_v22 -> T_ERules_s23
C_ERules_s23 T_ERules_v22
v22
   {-# INLINE rule443 #-}
   rule443 :: Seq Error -> Seq Error -> Seq Error
rule443 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule444 #-}
   rule444 :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule444 = \ ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdImrules Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlImrules
   {-# INLINE rule445 #-}
   rule445 :: Map Identifier (Set [Char])
-> Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule445 = \ ((Map Identifier (Set [Char])
_hdIruledefs) :: Map Identifier (Set String)) ((Map Identifier (Set [Char])
_tlIruledefs) :: Map Identifier (Set String)) ->
     Map Identifier (Set [Char])
_hdIruledefs Map Identifier (Set [Char])
-> Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Identifier (Set [Char])
_tlIruledefs
   {-# INLINE rule446 #-}
   rule446 :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule446 = \ ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdIruleuses Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
forall a b c.
(Ord a, Ord b) =>
Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)
`uwMapUnion` Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlIruleuses
   {-# INLINE rule447 #-}
   rule447 :: PP_Doc -> PP_Doc -> PP_Doc
rule447 = \ ((PP_Doc
_hdIsem_rules) :: PP_Doc) ((PP_Doc
_tlIsem_rules) :: PP_Doc) ->
     PP_Doc
_hdIsem_rules PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIsem_rules
   {-# INLINE rule448 #-}
   rule448 :: Set [Char] -> Set [Char] -> Set [Char]
rule448 = \ ((Set [Char]
_hdIusedArgs) :: Set String) ((Set [Char]
_tlIusedArgs) :: Set String) ->
     Set [Char]
_hdIusedArgs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIusedArgs
   {-# INLINE rule449 #-}
   rule449 :: Map Identifier Attributes -> Map Identifier Attributes
rule449 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallInhmap
   {-# INLINE rule450 #-}
   rule450 :: Map Identifier Attributes -> Map Identifier Attributes
rule450 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallSynmap
   {-# INLINE rule451 #-}
   rule451 :: Attributes -> Attributes
rule451 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
     Attributes
_lhsIchildTypes
   {-# INLINE rule452 #-}
   rule452 :: Identifier -> Identifier
rule452 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
     Identifier
_lhsIcon
   {-# INLINE rule453 #-}
   rule453 :: PP_Doc -> PP_Doc
rule453 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
     PP_Doc
_lhsIimportBlocks
   {-# INLINE rule454 #-}
   rule454 :: Attributes -> Attributes
rule454 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
     Attributes
_lhsIinhmap
   {-# INLINE rule455 #-}
   rule455 :: Set [Char] -> Set [Char]
rule455 = \ ((Set [Char]
_lhsIlazyIntras) :: Set String) ->
     Set [Char]
_lhsIlazyIntras
   {-# INLINE rule456 #-}
   rule456 :: Attributes -> Attributes
rule456 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     Attributes
_lhsIlocalAttrTypes
   {-# INLINE rule457 #-}
   rule457 :: [Char] -> [Char]
rule457 = \ (([Char]
_lhsImainFile) :: String) ->
     [Char]
_lhsImainFile
   {-# INLINE rule458 #-}
   rule458 :: [Char] -> [Char]
rule458 = \ (([Char]
_lhsImainName) :: String) ->
     [Char]
_lhsImainName
   {-# INLINE rule459 #-}
   rule459 :: ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule459 = \ (([Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
   {-# INLINE rule460 #-}
   rule460 :: Identifier -> Identifier
rule460 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
     Identifier
_lhsInt
   {-# INLINE rule461 #-}
   rule461 :: Options -> Options
rule461 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule462 #-}
   rule462 :: [Char] -> [Char]
rule462 = \ (([Char]
_lhsIpragmaBlocks) :: String) ->
     [Char]
_lhsIpragmaBlocks
   {-# INLINE rule463 #-}
   rule463 :: Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule463 = \ ((Map Identifier (Set VisitKind)
_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->
     Map Identifier (Set VisitKind)
_lhsIruleKinds
   {-# INLINE rule464 #-}
   rule464 :: Attributes -> Attributes
rule464 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
     Attributes
_lhsIsynmap
   {-# INLINE rule465 #-}
   rule465 :: PP_Doc -> PP_Doc
rule465 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
     PP_Doc
_lhsItextBlocks
   {-# INLINE rule466 #-}
   rule466 :: Map Identifier Int -> Map Identifier Int
rule466 = \ ((Map Identifier Int
_lhsIusageInfo) :: Map Identifier Int) ->
     Map Identifier Int
_lhsIusageInfo
   {-# INLINE rule467 #-}
   rule467 :: Map Identifier Attributes -> Map Identifier Attributes
rule467 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallInhmap
   {-# INLINE rule468 #-}
   rule468 :: Map Identifier Attributes -> Map Identifier Attributes
rule468 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallSynmap
   {-# INLINE rule469 #-}
   rule469 :: Attributes -> Attributes
rule469 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
     Attributes
_lhsIchildTypes
   {-# INLINE rule470 #-}
   rule470 :: Identifier -> Identifier
rule470 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
     Identifier
_lhsIcon
   {-# INLINE rule471 #-}
   rule471 :: PP_Doc -> PP_Doc
rule471 = \ ((PP_Doc
_lhsIimportBlocks) :: PP_Doc) ->
     PP_Doc
_lhsIimportBlocks
   {-# INLINE rule472 #-}
   rule472 :: Attributes -> Attributes
rule472 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
     Attributes
_lhsIinhmap
   {-# INLINE rule473 #-}
   rule473 :: Set [Char] -> Set [Char]
rule473 = \ ((Set [Char]
_lhsIlazyIntras) :: Set String) ->
     Set [Char]
_lhsIlazyIntras
   {-# INLINE rule474 #-}
   rule474 :: Attributes -> Attributes
rule474 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     Attributes
_lhsIlocalAttrTypes
   {-# INLINE rule475 #-}
   rule475 :: [Char] -> [Char]
rule475 = \ (([Char]
_lhsImainFile) :: String) ->
     [Char]
_lhsImainFile
   {-# INLINE rule476 #-}
   rule476 :: [Char] -> [Char]
rule476 = \ (([Char]
_lhsImainName) :: String) ->
     [Char]
_lhsImainName
   {-# INLINE rule477 #-}
   rule477 :: ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule477 = \ (([Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
   {-# INLINE rule478 #-}
   rule478 :: Identifier -> Identifier
rule478 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
     Identifier
_lhsInt
   {-# INLINE rule479 #-}
   rule479 :: Options -> Options
rule479 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule480 #-}
   rule480 :: [Char] -> [Char]
rule480 = \ (([Char]
_lhsIpragmaBlocks) :: String) ->
     [Char]
_lhsIpragmaBlocks
   {-# INLINE rule481 #-}
   rule481 :: Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule481 = \ ((Map Identifier (Set VisitKind)
_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->
     Map Identifier (Set VisitKind)
_lhsIruleKinds
   {-# INLINE rule482 #-}
   rule482 :: Attributes -> Attributes
rule482 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
     Attributes
_lhsIsynmap
   {-# INLINE rule483 #-}
   rule483 :: PP_Doc -> PP_Doc
rule483 = \ ((PP_Doc
_lhsItextBlocks) :: PP_Doc) ->
     PP_Doc
_lhsItextBlocks
   {-# INLINE rule484 #-}
   rule484 :: Map Identifier Int -> Map Identifier Int
rule484 = \ ((Map Identifier Int
_lhsIusageInfo) :: Map Identifier Int) ->
     Map Identifier Int
_lhsIusageInfo
{-# NOINLINE sem_ERules_Nil #-}
sem_ERules_Nil ::  T_ERules 
sem_ERules_Nil :: T_ERules
sem_ERules_Nil  = Identity T_ERules_s23 -> T_ERules
T_ERules (T_ERules_s23 -> Identity T_ERules_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_ERules_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_ERules_s23
st23 = let
      v22 :: T_ERules_v22 
      v22 :: T_ERules_v22
v22 = \ (T_ERules_vIn22 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Attributes
_lhsIchildTypes Identifier
_lhsIcon PP_Doc
_lhsIimportBlocks Attributes
_lhsIinhmap Set [Char]
_lhsIlazyIntras Attributes
_lhsIlocalAttrTypes [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Identifier
_lhsInt Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier (Set VisitKind)
_lhsIruleKinds Attributes
_lhsIsynmap PP_Doc
_lhsItextBlocks Map Identifier Int
_lhsIusageInfo) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule485  ()
         _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
         _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules = ()
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
forall k a. () -> Map k a
rule486  ()
         _lhsOruledefs :: Map Identifier (Set String)
         _lhsOruledefs :: Map Identifier (Set [Char])
_lhsOruledefs = () -> Map Identifier (Set [Char])
forall k a. () -> Map k a
rule487  ()
         _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))
         _lhsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses = () -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
forall k a. () -> Map k a
rule488  ()
         _lhsOsem_rules :: PP_Doc
         _lhsOsem_rules :: PP_Doc
_lhsOsem_rules = () -> PP_Doc
rule489  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule490  ()
         __result_ :: T_ERules_vOut22
__result_ = Seq Error
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> PP_Doc
-> Set [Char]
-> T_ERules_vOut22
T_ERules_vOut22 Seq Error
_lhsOerrors Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsOmrules Map Identifier (Set [Char])
_lhsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsOruleuses PP_Doc
_lhsOsem_rules Set [Char]
_lhsOusedArgs
         in T_ERules_vOut22
__result_ )
     in T_ERules_v22 -> T_ERules_s23
C_ERules_s23 T_ERules_v22
v22
   {-# INLINE rule485 #-}
   rule485 :: () -> Seq a
rule485 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule486 #-}
   rule486 :: () -> Map k a
rule486 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule487 #-}
   rule487 :: () -> Map k a
rule487 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule488 #-}
   rule488 :: () -> Map k a
rule488 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule489 #-}
   rule489 :: () -> PP_Doc
rule489 = \  (()
_ :: ()) ->
     PP_Doc
empty
   {-# INLINE rule490 #-}
   rule490 :: () -> Set a
rule490 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty

-- ExecutionPlan -----------------------------------------------
-- wrapper
data Inh_ExecutionPlan  = Inh_ExecutionPlan { Inh_ExecutionPlan -> PP_Doc
importBlocks_Inh_ExecutionPlan :: (PP_Doc), Inh_ExecutionPlan -> Map Identifier Attributes
inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), Inh_ExecutionPlan -> Map Identifier (Map Identifier Attributes)
localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), Inh_ExecutionPlan -> PP_Doc
mainBlocksDoc_Inh_ExecutionPlan :: (PP_Doc), Inh_ExecutionPlan -> [Char]
mainFile_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> [Char]
mainName_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> [Char] -> [Char] -> [Char] -> Bool -> [Char]
moduleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String), Inh_ExecutionPlan -> Options
options_Inh_ExecutionPlan :: (Options), Inh_ExecutionPlan -> [Char]
pragmaBlocks_Inh_ExecutionPlan :: (String), Inh_ExecutionPlan -> Map Identifier Attributes
synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), Inh_ExecutionPlan -> Map BlockInfo PP_Doc
textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc), Inh_ExecutionPlan -> PP_Doc
textBlocks_Inh_ExecutionPlan :: (PP_Doc) }
data Syn_ExecutionPlan  = Syn_ExecutionPlan { Syn_ExecutionPlan -> Seq Error
errors_Syn_ExecutionPlan :: (Seq Error), Syn_ExecutionPlan -> IO ()
genIO_Syn_ExecutionPlan :: (IO ()), Syn_ExecutionPlan -> PP_Doc
output_Syn_ExecutionPlan :: (PP_Doc) }
{-# INLINABLE wrap_ExecutionPlan #-}
wrap_ExecutionPlan :: T_ExecutionPlan  -> Inh_ExecutionPlan  -> (Syn_ExecutionPlan )
wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> Syn_ExecutionPlan
wrap_ExecutionPlan (T_ExecutionPlan Identity T_ExecutionPlan_s26
act) (Inh_ExecutionPlan PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes PP_Doc
_lhsImainBlocksDoc [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) =
   Identity Syn_ExecutionPlan -> Syn_ExecutionPlan
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_ExecutionPlan_s26
sem <- Identity T_ExecutionPlan_s26
act
        let arg25 :: T_ExecutionPlan_vIn25
arg25 = PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> PP_Doc
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> Map Identifier Attributes
-> Map BlockInfo PP_Doc
-> PP_Doc
-> T_ExecutionPlan_vIn25
T_ExecutionPlan_vIn25 PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes PP_Doc
_lhsImainBlocksDoc [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks
        (T_ExecutionPlan_vOut25 Seq Error
_lhsOerrors IO ()
_lhsOgenIO PP_Doc
_lhsOoutput) <- T_ExecutionPlan_vOut25 -> Identity T_ExecutionPlan_vOut25
forall (m :: * -> *) a. Monad m => a -> m a
return (T_ExecutionPlan_s26 -> T_ExecutionPlan_v25
inv_ExecutionPlan_s26 T_ExecutionPlan_s26
sem T_ExecutionPlan_vIn25
arg25)
        Syn_ExecutionPlan -> Identity Syn_ExecutionPlan
forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> IO () -> PP_Doc -> Syn_ExecutionPlan
Syn_ExecutionPlan Seq Error
_lhsOerrors IO ()
_lhsOgenIO PP_Doc
_lhsOoutput)
   )

-- cata
{-# INLINE sem_ExecutionPlan #-}
sem_ExecutionPlan :: ExecutionPlan  -> T_ExecutionPlan 
sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan
sem_ExecutionPlan ( ExecutionPlan ENonterminals
nonts_ TypeSyns
typeSyns_ Set Identifier
wrappers_ Derivings
derivings_ ) = T_ENonterminals
-> TypeSyns -> Set Identifier -> Derivings -> T_ExecutionPlan
sem_ExecutionPlan_ExecutionPlan ( ENonterminals -> T_ENonterminals
sem_ENonterminals ENonterminals
nonts_ ) TypeSyns
typeSyns_ Set Identifier
wrappers_ Derivings
derivings_

-- semantic domain
newtype T_ExecutionPlan  = T_ExecutionPlan {
                                           T_ExecutionPlan -> Identity T_ExecutionPlan_s26
attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )
                                           }
newtype T_ExecutionPlan_s26  = C_ExecutionPlan_s26 {
                                                   T_ExecutionPlan_s26 -> T_ExecutionPlan_v25
inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )
                                                   }
data T_ExecutionPlan_s27  = C_ExecutionPlan_s27
type T_ExecutionPlan_v25  = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )
data T_ExecutionPlan_vIn25  = T_ExecutionPlan_vIn25 (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (Map BlockInfo PP_Doc) (PP_Doc)
data T_ExecutionPlan_vOut25  = T_ExecutionPlan_vOut25 (Seq Error) (IO ()) (PP_Doc)
{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}
sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals  -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan 
sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals
-> TypeSyns -> Set Identifier -> Derivings -> T_ExecutionPlan
sem_ExecutionPlan_ExecutionPlan T_ENonterminals
arg_nonts_ TypeSyns
arg_typeSyns_ Set Identifier
arg_wrappers_ Derivings
arg_derivings_ = Identity T_ExecutionPlan_s26 -> T_ExecutionPlan
T_ExecutionPlan (T_ExecutionPlan_s26 -> Identity T_ExecutionPlan_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_ExecutionPlan_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_ExecutionPlan_s26
st26 = let
      v25 :: T_ExecutionPlan_v25 
      v25 :: T_ExecutionPlan_v25
v25 = \ (T_ExecutionPlan_vIn25 PP_Doc
_lhsIimportBlocks Map Identifier Attributes
_lhsIinhmap Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes PP_Doc
_lhsImainBlocksDoc [Char]
_lhsImainFile [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks Map Identifier Attributes
_lhsIsynmap Map BlockInfo PP_Doc
_lhsItextBlockMap PP_Doc
_lhsItextBlocks) -> ( let
         _nontsX11 :: T_ENonterminals_s11
_nontsX11 = Identity T_ENonterminals_s11 -> T_ENonterminals_s11
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_ENonterminals -> Identity T_ENonterminals_s11
attach_T_ENonterminals (T_ENonterminals
arg_nonts_))
         (T_ENonterminals_vOut10 [PP_Doc]
_nontsIappendCommon [PP_Doc]
_nontsIappendMain Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsIchildvisit Seq Error
_nontsIerrors Map Int (Int, Int)
_nontsIfromToStates IO ()
_nontsIgenProdIO [PP_Doc]
_nontsIimports Map Identifier Int
_nontsIinitStates PP_Doc
_nontsIoutput Seq PP_Doc
_nontsIsemFunBndDefs Seq PP_Doc
_nontsIsemFunBndTps Map Int VisitKind
_nontsIvisitKinds Map Int (Set Identifier)
_nontsIvisitdefs Map Int (Set Identifier)
_nontsIvisituses) = T_ENonterminals_s11 -> T_ENonterminals_v10
inv_ENonterminals_s11 T_ENonterminals_s11
_nontsX11 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Derivings
-> PP_Doc
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> [Char]
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> Map Identifier Attributes
-> PP_Doc
-> TypeSyns
-> Set Identifier
-> T_ENonterminals_vIn10
T_ENonterminals_vIn10 Map Int (Int, Int)
_nontsOallFromToStates Map Identifier Int
_nontsOallInitStates Map Int VisitKind
_nontsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsOallchildvisit Map Int (Set Identifier)
_nontsOavisitdefs Map Int (Set Identifier)
_nontsOavisituses Derivings
_nontsOderivings PP_Doc
_nontsOimportBlocks Map Identifier Attributes
_nontsOinhmap Map Identifier (Map Identifier Attributes)
_nontsOlocalAttrTypes [Char]
_nontsOmainFile [Char]
_nontsOmainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_nontsOmoduleHeader Options
_nontsOoptions [Char]
_nontsOpragmaBlocks Map Identifier Attributes
_nontsOsynmap PP_Doc
_nontsOtextBlocks TypeSyns
_nontsOtypeSyns Set Identifier
_nontsOwrappers)
         _lhsOoutput :: PP_Doc
         _lhsOoutput :: PP_Doc
_lhsOoutput = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule491 PP_Doc
_commonExtra PP_Doc
_nontsIoutput PP_Doc
_wrappersExtra
         _nontsOwrappers :: Set Identifier
_nontsOwrappers = Set Identifier -> Set Identifier
forall a. a -> a
rule492 Set Identifier
arg_wrappers_
         _nontsOtypeSyns :: TypeSyns
_nontsOtypeSyns = TypeSyns -> TypeSyns
forall a. a -> a
rule493 TypeSyns
arg_typeSyns_
         _nontsOderivings :: Derivings
_nontsOderivings = Derivings -> Derivings
forall a. a -> a
rule494 Derivings
arg_derivings_
         _wrappersExtra :: PP_Doc
_wrappersExtra = PP_Doc -> Options -> PP_Doc
rule495 PP_Doc
_lateSemBndDef Options
_lhsIoptions
         _commonExtra :: PP_Doc
_commonExtra = PP_Doc -> Options -> PP_Doc
rule496 PP_Doc
_lateSemBndTp Options
_lhsIoptions
         _lateSemBndTp :: PP_Doc
_lateSemBndTp = [Char] -> Seq PP_Doc -> PP_Doc
rule497 [Char]
_lhsImainName Seq PP_Doc
_nontsIsemFunBndTps
         _lateSemBndDef :: PP_Doc
_lateSemBndDef = [Char] -> Options -> Seq PP_Doc -> Set Identifier -> PP_Doc
forall a. [Char] -> Options -> Seq PP_Doc -> Set a -> PP_Doc
rule498 [Char]
_lhsImainName Options
_lhsIoptions Seq PP_Doc
_nontsIsemFunBndDefs Set Identifier
arg_wrappers_
         _nontsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule499 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_nontsIchildvisit
         _nontsOavisitdefs :: Map Int (Set Identifier)
_nontsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule500 Map Int (Set Identifier)
_nontsIvisitdefs
         _nontsOavisituses :: Map Int (Set Identifier)
_nontsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule501 Map Int (Set Identifier)
_nontsIvisituses
         _lhsOgenIO :: IO ()
         _lhsOgenIO :: IO ()
_lhsOgenIO = IO () -> IO () -> IO () -> IO ()
forall a a. IO a -> IO a -> IO () -> IO ()
rule502 IO ()
_genCommonModule IO ()
_genMainModule IO ()
_nontsIgenProdIO
         _mainModuleFile :: [Char]
_mainModuleFile = [Char] -> [Char]
rule503 [Char]
_lhsImainFile
         _ppMonadImports :: PP_Doc
_ppMonadImports = Options -> PP_Doc
rule504 Options
_lhsIoptions
         _genMainModule :: IO ()
_genMainModule = PP_Doc
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> Options
-> [Char]
-> [Char]
-> [PP_Doc]
-> [PP_Doc]
-> PP_Doc
-> PP_Doc
-> IO ()
rule505 PP_Doc
_lhsImainBlocksDoc [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader Options
_lhsIoptions [Char]
_lhsIpragmaBlocks [Char]
_mainModuleFile [PP_Doc]
_nontsIappendMain [PP_Doc]
_nontsIimports PP_Doc
_ppMonadImports PP_Doc
_wrappersExtra
         _commonFile :: [Char]
_commonFile = [Char] -> [Char]
rule506 [Char]
_lhsImainFile
         _genCommonModule :: IO ()
_genCommonModule = PP_Doc
-> [Char]
-> PP_Doc
-> [Char]
-> ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char]
-> PP_Doc
-> [PP_Doc]
-> PP_Doc
-> IO ()
rule507 PP_Doc
_commonExtra [Char]
_commonFile PP_Doc
_lhsIimportBlocks [Char]
_lhsImainName [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader [Char]
_lhsIpragmaBlocks PP_Doc
_lhsItextBlocks [PP_Doc]
_nontsIappendCommon PP_Doc
_ppMonadImports
         _nontsOallFromToStates :: Map Int (Int, Int)
_nontsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule508 Map Int (Int, Int)
_nontsIfromToStates
         _nontsOallVisitKinds :: Map Int VisitKind
_nontsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule509 Map Int VisitKind
_nontsIvisitKinds
         _nontsOallInitStates :: Map Identifier Int
_nontsOallInitStates = Map Identifier Int -> Map Identifier Int
rule510 Map Identifier Int
_nontsIinitStates
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule511 Seq Error
_nontsIerrors
         _nontsOimportBlocks :: PP_Doc
_nontsOimportBlocks = PP_Doc -> PP_Doc
rule512 PP_Doc
_lhsIimportBlocks
         _nontsOinhmap :: Map Identifier Attributes
_nontsOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule513 Map Identifier Attributes
_lhsIinhmap
         _nontsOlocalAttrTypes :: Map Identifier (Map Identifier Attributes)
_nontsOlocalAttrTypes = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule514 Map Identifier (Map Identifier Attributes)
_lhsIlocalAttrTypes
         _nontsOmainFile :: [Char]
_nontsOmainFile = [Char] -> [Char]
rule515 [Char]
_lhsImainFile
         _nontsOmainName :: [Char]
_nontsOmainName = [Char] -> [Char]
rule516 [Char]
_lhsImainName
         _nontsOmoduleHeader :: [Char] -> [Char] -> [Char] -> Bool -> [Char]
_nontsOmoduleHeader = ([Char] -> [Char] -> [Char] -> Bool -> [Char])
-> [Char] -> [Char] -> [Char] -> Bool -> [Char]
rule517 [Char] -> [Char] -> [Char] -> Bool -> [Char]
_lhsImoduleHeader
         _nontsOoptions :: Options
_nontsOoptions = Options -> Options
rule518 Options
_lhsIoptions
         _nontsOpragmaBlocks :: [Char]
_nontsOpragmaBlocks = [Char] -> [Char]
rule519 [Char]
_lhsIpragmaBlocks
         _nontsOsynmap :: Map Identifier Attributes
_nontsOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule520 Map Identifier Attributes
_lhsIsynmap
         _nontsOtextBlocks :: PP_Doc
_nontsOtextBlocks = PP_Doc -> PP_Doc
rule521 PP_Doc
_lhsItextBlocks
         __result_ :: T_ExecutionPlan_vOut25
__result_ = Seq Error -> IO () -> PP_Doc -> T_ExecutionPlan_vOut25
T_ExecutionPlan_vOut25 Seq Error
_lhsOerrors IO ()
_lhsOgenIO PP_Doc
_lhsOoutput
         in T_ExecutionPlan_vOut25
__result_ )
     in T_ExecutionPlan_v25 -> T_ExecutionPlan_s26
C_ExecutionPlan_s26 T_ExecutionPlan_v25
v25
   {-# INLINE rule491 #-}
   {-# LINE 89 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule491 = \ _commonExtra ((_nontsIoutput) :: PP_Doc) _wrappersExtra ->
                                 {-# LINE 89 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _nontsIoutput >-< _commonExtra     >-< _wrappersExtra
                                 {-# LINE 3828 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule492 #-}
   {-# LINE 95 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule492 = \ wrappers_ ->
                                     {-# LINE 95 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     wrappers_
                                     {-# LINE 3834 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule493 #-}
   {-# LINE 134 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule493 = \ typeSyns_ ->
                                     {-# LINE 134 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     typeSyns_
                                     {-# LINE 3840 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule494 #-}
   {-# LINE 135 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule494 = \ derivings_ ->
                                      {-# LINE 135 "src-ag/ExecutionPlan2Hs.ag" #-}
                                      derivings_
                                      {-# LINE 3846 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule495 #-}
   {-# LINE 542 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule495 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->
                        {-# LINE 542 "src-ag/ExecutionPlan2Hs.ag" #-}
                        if lateHigherOrderBinding _lhsIoptions
                        then _lateSemBndDef
                        else empty
                        {-# LINE 3854 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule496 #-}
   {-# LINE 545 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule496 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->
                        {-# LINE 545 "src-ag/ExecutionPlan2Hs.ag" #-}
                        if lateHigherOrderBinding _lhsIoptions
                        then _lateSemBndTp
                        else empty
                        {-# LINE 3862 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule497 #-}
   {-# LINE 548 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule497 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->
                       {-# LINE 548 "src-ag/ExecutionPlan2Hs.ag" #-}
                       "data" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName
                        >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)
                       {-# LINE 3869 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule498 #-}
   {-# LINE 550 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule498 = \ ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) wrappers_ ->
                        {-# LINE 550 "src-ag/ExecutionPlan2Hs.ag" #-}
                        ( if noInlinePragmas _lhsIoptions
                          then empty
                          else if helpInlining _lhsIoptions && Set.size wrappers_ == 1
                               then ppInline $ lateBindingFieldNm _lhsImainName
                               else ppNoInline $ lateBindingFieldNm _lhsImainName
                        )
                        >-< lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName
                        >-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName
                        >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )
                        {-# LINE 3883 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule499 #-}
   {-# LINE 1227 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule499 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
                                          {-# LINE 1227 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          _nontsIchildvisit
                                          {-# LINE 3889 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule500 #-}
   {-# LINE 1371 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule500 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
                                       {-# LINE 1371 "src-ag/ExecutionPlan2Hs.ag" #-}
                                       _nontsIvisitdefs
                                       {-# LINE 3895 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule501 #-}
   {-# LINE 1372 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule501 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
                                       {-# LINE 1372 "src-ag/ExecutionPlan2Hs.ag" #-}
                                       _nontsIvisituses
                                       {-# LINE 3901 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule502 #-}
   {-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule502 = \ _genCommonModule _genMainModule ((_nontsIgenProdIO) :: IO ()) ->
                                          {-# LINE 1443 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          do _genMainModule
                                             _genCommonModule
                                             _nontsIgenProdIO
                                          {-# LINE 3909 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule503 #-}
   {-# LINE 1446 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule503 = \ ((_lhsImainFile) :: String) ->
                                          {-# LINE 1446 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          _lhsImainFile
                                          {-# LINE 3915 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule504 #-}
   {-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule504 = \ ((_lhsIoptions) :: Options) ->
                                          {-# LINE 1447 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          ( if tupleAsDummyToken _lhsIoptions
                                            then empty
                                            else pp "import GHC.Prim"
                                          )
                                          >-< if parallelInvoke _lhsIoptions
                                              then pp "import qualified System.IO.Unsafe(unsafePerformIO)"
                                                   >-< pp "import System.IO(IO)"
                                                   >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"
                                              else pp "import Control.Monad.Identity"
                                          {-# LINE 3929 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule505 #-}
   {-# LINE 1456 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule505 = \ ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptions) :: Options) ((_lhsIpragmaBlocks) :: String) _mainModuleFile ((_nontsIappendMain) :: [PP_Doc]) ((_nontsIimports) :: [PP_Doc]) _ppMonadImports _wrappersExtra ->
                                          {-# LINE 1456 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          writeModule _mainModuleFile
                                            ( [ warrenFlagsPP _lhsIoptions
                                              , pp $ _lhsIpragmaBlocks
                                              , pp $ _lhsImoduleHeader _lhsImainName "" "" False
                                              , _ppMonadImports
                                              , pp $ "import " ++ _lhsImainName ++ "_common"
                                              ]
                                              ++ _nontsIimports
                                              ++ [_lhsImainBlocksDoc]
                                              ++ [_wrappersExtra    ]
                                              ++ _nontsIappendMain
                                            )
                                          {-# LINE 3946 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule506 #-}
   {-# LINE 1468 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule506 = \ ((_lhsImainFile) :: String) ->
                                          {-# LINE 1468 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")
                                          {-# LINE 3952 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule507 #-}
   {-# LINE 1469 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule507 = \ _commonExtra _commonFile ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlocks) :: PP_Doc) ((_nontsIappendCommon) :: [PP_Doc]) _ppMonadImports ->
                                          {-# LINE 1469 "src-ag/ExecutionPlan2Hs.ag" #-}
                                          writeModule _commonFile
                                            ( [ pp $ "{-# LANGUAGE Rank2Types, GADTs #-}"
                                              , pp $ _lhsIpragmaBlocks
                                              , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True
                                              , _ppMonadImports
                                              , _lhsIimportBlocks
                                              , _lhsItextBlocks
                                              , _commonExtra
                                              ]
                                              ++ _nontsIappendCommon
                                            )
                                          {-# LINE 3968 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule508 #-}
   {-# LINE 1588 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule508 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
                            {-# LINE 1588 "src-ag/ExecutionPlan2Hs.ag" #-}
                            _nontsIfromToStates
                            {-# LINE 3974 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule509 #-}
   {-# LINE 1632 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule509 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
                          {-# LINE 1632 "src-ag/ExecutionPlan2Hs.ag" #-}
                          _nontsIvisitKinds
                          {-# LINE 3980 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule510 #-}
   {-# LINE 1646 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule510 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->
                          {-# LINE 1646 "src-ag/ExecutionPlan2Hs.ag" #-}
                          _nontsIinitStates
                          {-# LINE 3986 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule511 #-}
   rule511 = \ ((_nontsIerrors) :: Seq Error) ->
     _nontsIerrors
   {-# INLINE rule512 #-}
   rule512 = \ ((_lhsIimportBlocks) :: PP_Doc) ->
     _lhsIimportBlocks
   {-# INLINE rule513 #-}
   rule513 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->
     _lhsIinhmap
   {-# INLINE rule514 #-}
   rule514 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule515 #-}
   rule515 = \ ((_lhsImainFile) :: String) ->
     _lhsImainFile
   {-# INLINE rule516 #-}
   rule516 = \ ((_lhsImainName) :: String) ->
     _lhsImainName
   {-# INLINE rule517 #-}
   rule517 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->
     _lhsImoduleHeader
   {-# INLINE rule518 #-}
   rule518 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule519 #-}
   rule519 = \ ((_lhsIpragmaBlocks) :: String) ->
     _lhsIpragmaBlocks
   {-# INLINE rule520 #-}
   rule520 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->
     _lhsIsynmap
   {-# INLINE rule521 #-}
   rule521 = \ ((_lhsItextBlocks) :: PP_Doc) ->
     _lhsItextBlocks

-- Expression --------------------------------------------------
-- wrapper
data Inh_Expression  = Inh_Expression { Inh_Expression -> Options
options_Inh_Expression :: (Options) }
data Syn_Expression  = Syn_Expression { Syn_Expression -> Map [Char] (Maybe NonLocalAttr)
attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), Syn_Expression -> Pos
pos_Syn_Expression :: (Pos), Syn_Expression -> PP_Doc
semfunc_Syn_Expression :: (PP_Doc), Syn_Expression -> [HsToken]
tks_Syn_Expression :: ([HsToken]) }
{-# INLINABLE wrap_Expression #-}
wrap_Expression :: T_Expression  -> Inh_Expression  -> (Syn_Expression )
wrap_Expression :: T_Expression -> Inh_Expression -> Syn_Expression
wrap_Expression (T_Expression Identity T_Expression_s29
act) (Inh_Expression Options
_lhsIoptions) =
   Identity Syn_Expression -> Syn_Expression
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Expression_s29
sem <- Identity T_Expression_s29
act
        let arg28 :: T_Expression_vIn28
arg28 = Options -> T_Expression_vIn28
T_Expression_vIn28 Options
_lhsIoptions
        (T_Expression_vOut28 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs Pos
_lhsOpos PP_Doc
_lhsOsemfunc [HsToken]
_lhsOtks) <- T_Expression_vOut28 -> Identity T_Expression_vOut28
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Expression_s29 -> T_Expression_v28
inv_Expression_s29 T_Expression_s29
sem T_Expression_vIn28
arg28)
        Syn_Expression -> Identity Syn_Expression
forall (m :: * -> *) a. Monad m => a -> m a
return (Map [Char] (Maybe NonLocalAttr)
-> Pos -> PP_Doc -> [HsToken] -> Syn_Expression
Syn_Expression Map [Char] (Maybe NonLocalAttr)
_lhsOattrs Pos
_lhsOpos PP_Doc
_lhsOsemfunc [HsToken]
_lhsOtks)
   )

-- cata
{-# INLINE sem_Expression #-}
sem_Expression :: Expression  -> T_Expression 
sem_Expression :: Expression -> T_Expression
sem_Expression ( Expression Pos
pos_ [HsToken]
tks_ ) = Pos -> [HsToken] -> T_Expression
sem_Expression_Expression Pos
pos_ [HsToken]
tks_

-- semantic domain
newtype T_Expression  = T_Expression {
                                     T_Expression -> Identity T_Expression_s29
attach_T_Expression :: Identity (T_Expression_s29 )
                                     }
newtype T_Expression_s29  = C_Expression_s29 {
                                             T_Expression_s29 -> T_Expression_v28
inv_Expression_s29 :: (T_Expression_v28 )
                                             }
data T_Expression_s30  = C_Expression_s30
type T_Expression_v28  = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )
data T_Expression_vIn28  = T_Expression_vIn28 (Options)
data T_Expression_vOut28  = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])
{-# NOINLINE sem_Expression_Expression #-}
sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression 
sem_Expression_Expression :: Pos -> [HsToken] -> T_Expression
sem_Expression_Expression Pos
arg_pos_ [HsToken]
arg_tks_ = Identity T_Expression_s29 -> T_Expression
T_Expression (T_Expression_s29 -> Identity T_Expression_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Expression_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_Expression_s29
st29 = let
      v28 :: T_Expression_v28 
      v28 :: T_Expression_v28
v28 = \ (T_Expression_vIn28 Options
_lhsIoptions) -> ( let
         _lhsOtks :: [HsToken]
         _lhsOtks :: [HsToken]
_lhsOtks = [HsToken] -> [HsToken]
forall a. a -> a
rule522 [HsToken]
arg_tks_
         _lhsOpos :: Pos
         _lhsOpos :: Pos
_lhsOpos = Pos -> Pos
forall a. a -> a
rule523 Pos
arg_pos_
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = Inh_HsToken -> [HsToken] -> Map [Char] (Maybe NonLocalAttr)
rule524 Inh_HsToken
_inhhstoken [HsToken]
arg_tks_
         _lhsOsemfunc :: PP_Doc
         _lhsOsemfunc :: PP_Doc
_lhsOsemfunc = Inh_HsToken -> [HsToken] -> PP_Doc
rule525 Inh_HsToken
_inhhstoken [HsToken]
arg_tks_
         _inhhstoken :: Inh_HsToken
_inhhstoken = Options -> Inh_HsToken
rule526 Options
_lhsIoptions
         __result_ :: T_Expression_vOut28
__result_ = Map [Char] (Maybe NonLocalAttr)
-> Pos -> PP_Doc -> [HsToken] -> T_Expression_vOut28
T_Expression_vOut28 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs Pos
_lhsOpos PP_Doc
_lhsOsemfunc [HsToken]
_lhsOtks
         in T_Expression_vOut28
__result_ )
     in T_Expression_v28 -> T_Expression_s29
C_Expression_s29 T_Expression_v28
v28
   {-# INLINE rule522 #-}
   {-# LINE 1082 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule522 = \ tks_ ->
                           {-# LINE 1082 "src-ag/ExecutionPlan2Hs.ag" #-}
                           tks_
                           {-# LINE 4075 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule523 #-}
   {-# LINE 1125 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule523 = \ pos_ ->
                                        {-# LINE 1125 "src-ag/ExecutionPlan2Hs.ag" #-}
                                        pos_
                                        {-# LINE 4081 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule524 #-}
   {-# LINE 1211 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule524 = \ _inhhstoken tks_ ->
                               {-# LINE 1211 "src-ag/ExecutionPlan2Hs.ag" #-}
                               Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken    )) tks_
                               {-# LINE 4087 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule525 #-}
   {-# LINE 1212 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule525 = \ _inhhstoken tks_ ->
                               {-# LINE 1212 "src-ag/ExecutionPlan2Hs.ag" #-}
                               vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken    )) tks_
                               {-# LINE 4093 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule526 #-}
   {-# LINE 1213 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule526 = \ ((_lhsIoptions) :: Options) ->
                                  {-# LINE 1213 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  Inh_HsToken _lhsIoptions
                                  {-# LINE 4099 "src-generated/ExecutionPlan2Hs.hs" #-}

-- HsToken -----------------------------------------------------
-- wrapper
data Inh_HsToken  = Inh_HsToken { Inh_HsToken -> Options
options_Inh_HsToken :: (Options) }
data Syn_HsToken  = Syn_HsToken { Syn_HsToken -> Map [Char] (Maybe NonLocalAttr)
attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), Syn_HsToken -> (Pos, [Char])
tok_Syn_HsToken :: ((Pos,String)) }
{-# INLINABLE wrap_HsToken #-}
wrap_HsToken :: T_HsToken  -> Inh_HsToken  -> (Syn_HsToken )
wrap_HsToken :: T_HsToken -> Inh_HsToken -> Syn_HsToken
wrap_HsToken (T_HsToken Identity T_HsToken_s32
act) (Inh_HsToken Options
_lhsIoptions) =
   Identity Syn_HsToken -> Syn_HsToken
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_HsToken_s32
sem <- Identity T_HsToken_s32
act
        let arg31 :: T_HsToken_vIn31
arg31 = Options -> T_HsToken_vIn31
T_HsToken_vIn31 Options
_lhsIoptions
        (T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok) <- T_HsToken_vOut31 -> Identity T_HsToken_vOut31
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsToken_s32 -> T_HsToken_v31
inv_HsToken_s32 T_HsToken_s32
sem T_HsToken_vIn31
arg31)
        Syn_HsToken -> Identity Syn_HsToken
forall (m :: * -> *) a. Monad m => a -> m a
return (Map [Char] (Maybe NonLocalAttr) -> (Pos, [Char]) -> Syn_HsToken
Syn_HsToken Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok)
   )

-- cata
{-# NOINLINE sem_HsToken #-}
sem_HsToken :: HsToken  -> T_HsToken 
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken ( AGLocal Identifier
var_ Pos
pos_ Maybe [Char]
rdesc_ ) = Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGLocal Identifier
var_ Pos
pos_ Maybe [Char]
rdesc_
sem_HsToken ( AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe [Char]
rdesc_ ) = Identifier -> Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe [Char]
rdesc_
sem_HsToken ( HsToken [Char]
value_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_HsToken [Char]
value_ Pos
pos_
sem_HsToken ( CharToken [Char]
value_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_CharToken [Char]
value_ Pos
pos_
sem_HsToken ( StrToken [Char]
value_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_StrToken [Char]
value_ Pos
pos_
sem_HsToken ( Err [Char]
mesg_ Pos
pos_ ) = [Char] -> Pos -> T_HsToken
sem_HsToken_Err [Char]
mesg_ Pos
pos_

-- semantic domain
newtype T_HsToken  = T_HsToken {
                               T_HsToken -> Identity T_HsToken_s32
attach_T_HsToken :: Identity (T_HsToken_s32 )
                               }
newtype T_HsToken_s32  = C_HsToken_s32 {
                                       T_HsToken_s32 -> T_HsToken_v31
inv_HsToken_s32 :: (T_HsToken_v31 )
                                       }
data T_HsToken_s33  = C_HsToken_s33
type T_HsToken_v31  = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )
data T_HsToken_vIn31  = T_HsToken_vIn31 (Options)
data T_HsToken_vOut31  = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))
{-# NOINLINE sem_HsToken_AGLocal #-}
sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken 
sem_HsToken_AGLocal :: Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGLocal Identifier
arg_var_ Pos
arg_pos_ Maybe [Char]
_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_HsToken_s32
st32 = let
      v31 :: T_HsToken_v31 
      v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = Identifier -> Map [Char] (Maybe NonLocalAttr)
forall a. Identifier -> Map [Char] (Maybe a)
rule527 Identifier
arg_var_
         _tok :: (Pos, [Char])
_tok = Pos -> Identifier -> (Pos, [Char])
forall a. a -> Identifier -> (a, [Char])
rule528 Pos
arg_pos_ Identifier
arg_var_
         _lhsOtok :: (Pos,String)
         _lhsOtok :: (Pos, [Char])
_lhsOtok = (Pos, [Char]) -> (Pos, [Char])
forall a. a -> a
rule529 (Pos, [Char])
_tok
         __result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
         in T_HsToken_vOut31
__result_ )
     in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
   {-# INLINE rule527 #-}
   {-# LINE 1170 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule527 = \ var_ ->
                              {-# LINE 1170 "src-ag/ExecutionPlan2Hs.ag" #-}
                              Map.singleton (fieldname var_) Nothing
                              {-# LINE 4156 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule528 #-}
   {-# LINE 1416 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule528 = \ pos_ var_ ->
                          {-# LINE 1416 "src-ag/ExecutionPlan2Hs.ag" #-}
                          (pos_,fieldname var_)
                          {-# LINE 4162 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule529 #-}
   rule529 = \ _tok ->
     _tok
{-# NOINLINE sem_HsToken_AGField #-}
sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken 
sem_HsToken_AGField :: Identifier -> Identifier -> Pos -> Maybe [Char] -> T_HsToken
sem_HsToken_AGField Identifier
arg_field_ Identifier
arg_attr_ Pos
arg_pos_ Maybe [Char]
arg_rdesc_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_HsToken_s32
st32 = let
      v31 :: T_HsToken_v31 
      v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
         _mbAttr :: Maybe NonLocalAttr
_mbAttr = Identifier -> Identifier -> Maybe NonLocalAttr
rule530 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = Options
-> Maybe NonLocalAttr
-> Identifier
-> Identifier
-> Map [Char] (Maybe NonLocalAttr)
forall a. Options -> a -> Identifier -> Identifier -> Map [Char] a
rule531 Options
_lhsIoptions Maybe NonLocalAttr
_mbAttr Identifier
arg_attr_ Identifier
arg_field_
         _addTrace :: [Char] -> [Char]
_addTrace = Identifier -> Identifier -> Maybe [Char] -> [Char] -> [Char]
rule532 Identifier
arg_attr_ Identifier
arg_field_ Maybe [Char]
arg_rdesc_
         _lhsOtok :: (Pos,String)
         _lhsOtok :: (Pos, [Char])
_lhsOtok = ([Char] -> [Char])
-> Options -> Identifier -> Identifier -> Pos -> (Pos, [Char])
forall b a.
([Char] -> b) -> Options -> Identifier -> Identifier -> a -> (a, b)
rule533 [Char] -> [Char]
_addTrace Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_ Pos
arg_pos_
         __result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
         in T_HsToken_vOut31
__result_ )
     in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
   {-# INLINE rule530 #-}
   {-# LINE 1171 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule530 = \ attr_ field_ ->
                              {-# LINE 1171 "src-ag/ExecutionPlan2Hs.ag" #-}
                              if field_ == _INST || field_ == _FIELD || field_ == _INST'
                              then Nothing
                              else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_
                              {-# LINE 4189 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule531 #-}
   {-# LINE 1174 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule531 = \ ((_lhsIoptions) :: Options) _mbAttr attr_ field_ ->
                              {-# LINE 1174 "src-ag/ExecutionPlan2Hs.ag" #-}
                              Map.singleton (attrname _lhsIoptions True field_ attr_) _mbAttr
                              {-# LINE 4195 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule532 #-}
   {-# LINE 1420 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule532 = \ attr_ field_ rdesc_ ->
                        {-# LINE 1420 "src-ag/ExecutionPlan2Hs.ag" #-}
                        case rdesc_ of
                          Just d  -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"
                          Nothing -> id
                        {-# LINE 4203 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule533 #-}
   {-# LINE 1423 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule533 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->
                   {-# LINE 1423 "src-ag/ExecutionPlan2Hs.ag" #-}
                   (pos_, _addTrace     $ attrname _lhsIoptions True field_ attr_)
                   {-# LINE 4209 "src-generated/ExecutionPlan2Hs.hs" #-}
{-# NOINLINE sem_HsToken_HsToken #-}
sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken 
sem_HsToken_HsToken :: [Char] -> Pos -> T_HsToken
sem_HsToken_HsToken [Char]
arg_value_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_HsToken_s32
st32 = let
      v31 :: T_HsToken_v31 
      v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
         _lhsOtok :: (Pos,String)
         _lhsOtok :: (Pos, [Char])
_lhsOtok = Pos -> [Char] -> (Pos, [Char])
forall a b. a -> b -> (a, b)
rule534 Pos
arg_pos_ [Char]
arg_value_
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule535  ()
         __result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
         in T_HsToken_vOut31
__result_ )
     in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
   {-# INLINE rule534 #-}
   {-# LINE 1425 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule534 = \ pos_ value_ ->
                         {-# LINE 1425 "src-ag/ExecutionPlan2Hs.ag" #-}
                         (pos_, value_)
                         {-# LINE 4229 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule535 #-}
   rule535 = \  (_ :: ()) ->
     Map.empty
{-# NOINLINE sem_HsToken_CharToken #-}
sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken 
sem_HsToken_CharToken :: [Char] -> Pos -> T_HsToken
sem_HsToken_CharToken [Char]
arg_value_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_HsToken_s32
st32 = let
      v31 :: T_HsToken_v31 
      v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
         _lhsOtok :: (Pos,String)
         _lhsOtok :: (Pos, [Char])
_lhsOtok = Pos -> [Char] -> (Pos, [Char])
forall a. a -> [Char] -> (a, [Char])
rule536 Pos
arg_pos_ [Char]
arg_value_
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule537  ()
         __result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
         in T_HsToken_vOut31
__result_ )
     in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
   {-# INLINE rule536 #-}
   {-# LINE 1427 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule536 = \ pos_ value_ ->
                           {-# LINE 1427 "src-ag/ExecutionPlan2Hs.ag" #-}
                           (pos_, if null value_
                                     then ""
                                     else showCharShort (head value_)
                           )
                           {-# LINE 4255 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule537 #-}
   rule537 = \  (_ :: ()) ->
     Map.empty
{-# NOINLINE sem_HsToken_StrToken #-}
sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken 
sem_HsToken_StrToken :: [Char] -> Pos -> T_HsToken
sem_HsToken_StrToken [Char]
arg_value_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_HsToken_s32
st32 = let
      v31 :: T_HsToken_v31 
      v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
         _lhsOtok :: (Pos,String)
         _lhsOtok :: (Pos, [Char])
_lhsOtok = Pos -> [Char] -> (Pos, [Char])
forall a. a -> [Char] -> (a, [Char])
rule538 Pos
arg_pos_ [Char]
arg_value_
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule539  ()
         __result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
         in T_HsToken_vOut31
__result_ )
     in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
   {-# INLINE rule538 #-}
   {-# LINE 1432 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule538 = \ pos_ value_ ->
                           {-# LINE 1432 "src-ag/ExecutionPlan2Hs.ag" #-}
                           (pos_, showStrShort value_)
                           {-# LINE 4278 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule539 #-}
   rule539 = \  (_ :: ()) ->
     Map.empty
{-# NOINLINE sem_HsToken_Err #-}
sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken 
sem_HsToken_Err :: [Char] -> Pos -> T_HsToken
sem_HsToken_Err [Char]
_ Pos
arg_pos_ = Identity T_HsToken_s32 -> T_HsToken
T_HsToken (T_HsToken_s32 -> Identity T_HsToken_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_HsToken_s32
st32 = let
      v31 :: T_HsToken_v31 
      v31 :: T_HsToken_v31
v31 = \ (T_HsToken_vIn31 Options
_lhsIoptions) -> ( let
         _lhsOtok :: (Pos,String)
         _lhsOtok :: (Pos, [Char])
_lhsOtok = Pos -> (Pos, [Char])
forall a. a -> (a, [Char])
rule540 Pos
arg_pos_
         _lhsOattrs :: Map String (Maybe NonLocalAttr)
         _lhsOattrs :: Map [Char] (Maybe NonLocalAttr)
_lhsOattrs = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule541  ()
         __result_ :: T_HsToken_vOut31
__result_ = Map [Char] (Maybe NonLocalAttr)
-> (Pos, [Char]) -> T_HsToken_vOut31
T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_lhsOattrs (Pos, [Char])
_lhsOtok
         in T_HsToken_vOut31
__result_ )
     in T_HsToken_v31 -> T_HsToken_s32
C_HsToken_s32 T_HsToken_v31
v31
   {-# INLINE rule540 #-}
   {-# LINE 1433 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule540 = \ pos_ ->
                           {-# LINE 1433 "src-ag/ExecutionPlan2Hs.ag" #-}
                           (pos_, "")
                           {-# LINE 4301 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule541 #-}
   rule541 = \  (_ :: ()) ->
     Map.empty

-- HsTokens ----------------------------------------------------
-- wrapper
data Inh_HsTokens  = Inh_HsTokens { Inh_HsTokens -> Options
options_Inh_HsTokens :: (Options) }
data Syn_HsTokens  = Syn_HsTokens { Syn_HsTokens -> [(Pos, [Char])]
tks_Syn_HsTokens :: ([(Pos,String)]) }
{-# INLINABLE wrap_HsTokens #-}
wrap_HsTokens :: T_HsTokens  -> Inh_HsTokens  -> (Syn_HsTokens )
wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> Syn_HsTokens
wrap_HsTokens (T_HsTokens Identity T_HsTokens_s35
act) (Inh_HsTokens Options
_lhsIoptions) =
   Identity Syn_HsTokens -> Syn_HsTokens
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_HsTokens_s35
sem <- Identity T_HsTokens_s35
act
        let arg34 :: T_HsTokens_vIn34
arg34 = Options -> T_HsTokens_vIn34
T_HsTokens_vIn34 Options
_lhsIoptions
        (T_HsTokens_vOut34 [(Pos, [Char])]
_lhsOtks) <- T_HsTokens_vOut34 -> Identity T_HsTokens_vOut34
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 T_HsTokens_s35
sem T_HsTokens_vIn34
arg34)
        Syn_HsTokens -> Identity Syn_HsTokens
forall (m :: * -> *) a. Monad m => a -> m a
return ([(Pos, [Char])] -> Syn_HsTokens
Syn_HsTokens [(Pos, [Char])]
_lhsOtks)
   )

-- cata
{-# NOINLINE sem_HsTokens #-}
sem_HsTokens :: HsTokens  -> T_HsTokens 
sem_HsTokens :: [HsToken] -> T_HsTokens
sem_HsTokens [HsToken]
list = (T_HsToken -> T_HsTokens -> T_HsTokens)
-> T_HsTokens -> [T_HsToken] -> T_HsTokens
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons T_HsTokens
sem_HsTokens_Nil ((HsToken -> T_HsToken) -> [HsToken] -> [T_HsToken]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map HsToken -> T_HsToken
sem_HsToken [HsToken]
list)

-- semantic domain
newtype T_HsTokens  = T_HsTokens {
                                 T_HsTokens -> Identity T_HsTokens_s35
attach_T_HsTokens :: Identity (T_HsTokens_s35 )
                                 }
newtype T_HsTokens_s35  = C_HsTokens_s35 {
                                         T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 :: (T_HsTokens_v34 )
                                         }
data T_HsTokens_s36  = C_HsTokens_s36
type T_HsTokens_v34  = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )
data T_HsTokens_vIn34  = T_HsTokens_vIn34 (Options)
data T_HsTokens_vOut34  = T_HsTokens_vOut34 ([(Pos,String)])
{-# NOINLINE sem_HsTokens_Cons #-}
sem_HsTokens_Cons :: T_HsToken  -> T_HsTokens  -> T_HsTokens 
sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons T_HsToken
arg_hd_ T_HsTokens
arg_tl_ = Identity T_HsTokens_s35 -> T_HsTokens
T_HsTokens (T_HsTokens_s35 -> Identity T_HsTokens_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokens_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_HsTokens_s35
st35 = let
      v34 :: T_HsTokens_v34 
      v34 :: T_HsTokens_v34
v34 = \ (T_HsTokens_vIn34 Options
_lhsIoptions) -> ( let
         _hdX32 :: T_HsToken_s32
_hdX32 = Identity T_HsToken_s32 -> T_HsToken_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsToken -> Identity T_HsToken_s32
attach_T_HsToken (T_HsToken
arg_hd_))
         _tlX35 :: T_HsTokens_s35
_tlX35 = Identity T_HsTokens_s35 -> T_HsTokens_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsTokens -> Identity T_HsTokens_s35
attach_T_HsTokens (T_HsTokens
arg_tl_))
         (T_HsToken_vOut31 Map [Char] (Maybe NonLocalAttr)
_hdIattrs (Pos, [Char])
_hdItok) = T_HsToken_s32 -> T_HsToken_v31
inv_HsToken_s32 T_HsToken_s32
_hdX32 (Options -> T_HsToken_vIn31
T_HsToken_vIn31 Options
_hdOoptions)
         (T_HsTokens_vOut34 [(Pos, [Char])]
_tlItks) = T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 T_HsTokens_s35
_tlX35 (Options -> T_HsTokens_vIn34
T_HsTokens_vIn34 Options
_tlOoptions)
         _lhsOtks :: [(Pos,String)]
         _lhsOtks :: [(Pos, [Char])]
_lhsOtks = (Pos, [Char]) -> [(Pos, [Char])] -> [(Pos, [Char])]
rule542 (Pos, [Char])
_hdItok [(Pos, [Char])]
_tlItks
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule543 Options
_lhsIoptions
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule544 Options
_lhsIoptions
         __result_ :: T_HsTokens_vOut34
__result_ = [(Pos, [Char])] -> T_HsTokens_vOut34
T_HsTokens_vOut34 [(Pos, [Char])]
_lhsOtks
         in T_HsTokens_vOut34
__result_ )
     in T_HsTokens_v34 -> T_HsTokens_s35
C_HsTokens_s35 T_HsTokens_v34
v34
   {-# INLINE rule542 #-}
   {-# LINE 1412 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule542 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->
                     {-# LINE 1412 "src-ag/ExecutionPlan2Hs.ag" #-}
                     _hdItok : _tlItks
                     {-# LINE 4359 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule543 #-}
   rule543 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule544 #-}
   rule544 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
{-# NOINLINE sem_HsTokens_Nil #-}
sem_HsTokens_Nil ::  T_HsTokens 
sem_HsTokens_Nil :: T_HsTokens
sem_HsTokens_Nil  = Identity T_HsTokens_s35 -> T_HsTokens
T_HsTokens (T_HsTokens_s35 -> Identity T_HsTokens_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokens_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_HsTokens_s35
st35 = let
      v34 :: T_HsTokens_v34 
      v34 :: T_HsTokens_v34
v34 = \ (T_HsTokens_vIn34 Options
_lhsIoptions) -> ( let
         _lhsOtks :: [(Pos,String)]
         _lhsOtks :: [(Pos, [Char])]
_lhsOtks = () -> [(Pos, [Char])]
forall a. () -> [a]
rule545  ()
         __result_ :: T_HsTokens_vOut34
__result_ = [(Pos, [Char])] -> T_HsTokens_vOut34
T_HsTokens_vOut34 [(Pos, [Char])]
_lhsOtks
         in T_HsTokens_vOut34
__result_ )
     in T_HsTokens_v34 -> T_HsTokens_s35
C_HsTokens_s35 T_HsTokens_v34
v34
   {-# INLINE rule545 #-}
   {-# LINE 1413 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule545 = \  (_ :: ()) ->
                     {-# LINE 1413 "src-ag/ExecutionPlan2Hs.ag" #-}
                     []
                     {-# LINE 4383 "src-generated/ExecutionPlan2Hs.hs" #-}

-- HsTokensRoot ------------------------------------------------
-- wrapper
data Inh_HsTokensRoot  = Inh_HsTokensRoot { Inh_HsTokensRoot -> Options
options_Inh_HsTokensRoot :: (Options) }
data Syn_HsTokensRoot  = Syn_HsTokensRoot {  }
{-# INLINABLE wrap_HsTokensRoot #-}
wrap_HsTokensRoot :: T_HsTokensRoot  -> Inh_HsTokensRoot  -> (Syn_HsTokensRoot )
wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> Syn_HsTokensRoot
wrap_HsTokensRoot (T_HsTokensRoot Identity T_HsTokensRoot_s38
act) (Inh_HsTokensRoot Options
_lhsIoptions) =
   Identity Syn_HsTokensRoot -> Syn_HsTokensRoot
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_HsTokensRoot_s38
sem <- Identity T_HsTokensRoot_s38
act
        let arg37 :: T_HsTokensRoot_vIn37
arg37 = Options -> T_HsTokensRoot_vIn37
T_HsTokensRoot_vIn37 Options
_lhsIoptions
        (T_HsTokensRoot_vOut37
T_HsTokensRoot_vOut37 ) <- T_HsTokensRoot_vOut37 -> Identity T_HsTokensRoot_vOut37
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsTokensRoot_s38 -> T_HsTokensRoot_v37
inv_HsTokensRoot_s38 T_HsTokensRoot_s38
sem T_HsTokensRoot_vIn37
arg37)
        Syn_HsTokensRoot -> Identity Syn_HsTokensRoot
forall (m :: * -> *) a. Monad m => a -> m a
return (Syn_HsTokensRoot
Syn_HsTokensRoot )
   )

-- cata
{-# INLINE sem_HsTokensRoot #-}
sem_HsTokensRoot :: HsTokensRoot  -> T_HsTokensRoot 
sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot
sem_HsTokensRoot ( HsTokensRoot [HsToken]
tokens_ ) = T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot ( [HsToken] -> T_HsTokens
sem_HsTokens [HsToken]
tokens_ )

-- semantic domain
newtype T_HsTokensRoot  = T_HsTokensRoot {
                                         T_HsTokensRoot -> Identity T_HsTokensRoot_s38
attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )
                                         }
newtype T_HsTokensRoot_s38  = C_HsTokensRoot_s38 {
                                                 T_HsTokensRoot_s38 -> T_HsTokensRoot_v37
inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )
                                                 }
data T_HsTokensRoot_s39  = C_HsTokensRoot_s39
type T_HsTokensRoot_v37  = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )
data T_HsTokensRoot_vIn37  = T_HsTokensRoot_vIn37 (Options)
data T_HsTokensRoot_vOut37  = T_HsTokensRoot_vOut37 
{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}
sem_HsTokensRoot_HsTokensRoot :: T_HsTokens  -> T_HsTokensRoot 
sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot T_HsTokens
arg_tokens_ = Identity T_HsTokensRoot_s38 -> T_HsTokensRoot
T_HsTokensRoot (T_HsTokensRoot_s38 -> Identity T_HsTokensRoot_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokensRoot_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_HsTokensRoot_s38
st38 = let
      v37 :: T_HsTokensRoot_v37 
      v37 :: T_HsTokensRoot_v37
v37 = \ (T_HsTokensRoot_vIn37 Options
_lhsIoptions) -> ( let
         _tokensX35 :: T_HsTokens_s35
_tokensX35 = Identity T_HsTokens_s35 -> T_HsTokens_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsTokens -> Identity T_HsTokens_s35
attach_T_HsTokens (T_HsTokens
arg_tokens_))
         (T_HsTokens_vOut34 [(Pos, [Char])]
_tokensItks) = T_HsTokens_s35 -> T_HsTokens_v34
inv_HsTokens_s35 T_HsTokens_s35
_tokensX35 (Options -> T_HsTokens_vIn34
T_HsTokens_vIn34 Options
_tokensOoptions)
         _tokensOoptions :: Options
_tokensOoptions = Options -> Options
rule546 Options
_lhsIoptions
         __result_ :: T_HsTokensRoot_vOut37
__result_ = T_HsTokensRoot_vOut37
T_HsTokensRoot_vOut37 
         in T_HsTokensRoot_vOut37
__result_ )
     in T_HsTokensRoot_v37 -> T_HsTokensRoot_s38
C_HsTokensRoot_s38 T_HsTokensRoot_v37
v37
   {-# INLINE rule546 #-}
   rule546 :: Options -> Options
rule546 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern { Inh_Pattern -> Map Identifier Attributes
allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), Inh_Pattern -> Map Identifier Attributes
allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), Inh_Pattern -> Bool
anyLazyKind_Inh_Pattern :: (Bool), Inh_Pattern -> Attributes
inhmap_Inh_Pattern :: (Attributes), Inh_Pattern -> Attributes
localAttrTypes_Inh_Pattern :: (Map Identifier Type), Inh_Pattern -> Options
options_Inh_Pattern :: (Options), Inh_Pattern -> Attributes
synmap_Inh_Pattern :: (Attributes) }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> PP_Doc
attrTypes_Syn_Pattern :: (PP_Doc), Syn_Pattern -> Set [Char]
attrs_Syn_Pattern :: (Set String), Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> Bool
isUnderscore_Syn_Pattern :: (Bool), Syn_Pattern -> PP_Doc
sem_lhs_Syn_Pattern :: ( PP_Doc ) }
{-# 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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) =
   Identity Syn_Pattern -> Syn_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 = Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap
        (T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs) <- T_Pattern_vOut40 -> Identity T_Pattern_vOut40
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)
        Syn_Pattern -> Identity Syn_Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Set [Char] -> Pattern -> Bool -> PP_Doc -> Syn_Pattern
Syn_Pattern PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs)
   )

-- cata
{-# NOINLINE sem_Pattern #-}
sem_Pattern :: Pattern  -> T_Pattern 
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Constr Identifier
name_ Patterns
pats_ ) = Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr Identifier
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 Identifier
field_ Identifier
attr_ Pattern
pat_ ) = Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
field_ Identifier
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 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)
data T_Pattern_vOut40  = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) (Bool) ( PP_Doc )
{-# NOINLINE sem_Pattern_Constr #-}
sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns  -> T_Pattern 
sem_Pattern_Constr :: Identifier -> T_Patterns -> T_Pattern
sem_Pattern_Constr Identifier
arg_name_ T_Patterns
arg_pats_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _patsX44 :: T_Patterns_s44
_patsX44 = Identity T_Patterns_s44 -> T_Patterns_s44
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 PP_Doc
_patsIattrTypes Set [Char]
_patsIattrs Patterns
_patsIcopy [PP_Doc]
_patsIsem_lhs) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_patsOallInhmap Map Identifier Attributes
_patsOallSynmap Bool
_patsOanyLazyKind Attributes
_patsOinhmap Attributes
_patsOlocalAttrTypes Options
_patsOoptions Attributes
_patsOsynmap)
         _lhsOsem_lhs ::  PP_Doc 
         _lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = (PP_Doc -> PP_Doc) -> [PP_Doc] -> Identifier -> PP_Doc
forall t. (PP_Doc -> t) -> [PP_Doc] -> Identifier -> t
rule547 PP_Doc -> PP_Doc
_addbang1 [PP_Doc]
_patsIsem_lhs Identifier
arg_name_
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule548  ()
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule549 Options
_lhsIoptions
         _addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule550 PP_Doc -> PP_Doc
_addbang Bool
_lhsIanyLazyKind
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule551 PP_Doc
_patsIattrTypes
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char]
rule552 Set [Char]
_patsIattrs
         _copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule553 Patterns
_patsIcopy Identifier
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule554 Pattern
_copy
         _patsOallInhmap :: Map Identifier Attributes
_patsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule555 Map Identifier Attributes
_lhsIallInhmap
         _patsOallSynmap :: Map Identifier Attributes
_patsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule556 Map Identifier Attributes
_lhsIallSynmap
         _patsOanyLazyKind :: Bool
_patsOanyLazyKind = Bool -> Bool
rule557 Bool
_lhsIanyLazyKind
         _patsOinhmap :: Attributes
_patsOinhmap = Attributes -> Attributes
rule558 Attributes
_lhsIinhmap
         _patsOlocalAttrTypes :: Attributes
_patsOlocalAttrTypes = Attributes -> Attributes
rule559 Attributes
_lhsIlocalAttrTypes
         _patsOoptions :: Options
_patsOoptions = Options -> Options
rule560 Options
_lhsIoptions
         _patsOsynmap :: Attributes
_patsOsynmap = Attributes -> Attributes
rule561 Attributes
_lhsIsynmap
         __result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char] -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule547 #-}
   {-# LINE 1139 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule547 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) name_ ->
                                  {-# LINE 1139 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _addbang1     $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs
                                  {-# LINE 4503 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule548 #-}
   {-# LINE 1146 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule548 = \  (_ :: ()) ->
                                    {-# LINE 1146 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    False
                                    {-# LINE 4509 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule549 #-}
   {-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule549 = \ ((_lhsIoptions) :: Options) ->
                                                     {-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                     {-# LINE 4515 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule550 #-}
   {-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule550 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->
                                                     {-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     if _lhsIanyLazyKind then id else _addbang
                                                     {-# LINE 4521 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule551 #-}
   rule551 = \ ((_patsIattrTypes) :: PP_Doc) ->
     _patsIattrTypes
   {-# INLINE rule552 #-}
   rule552 = \ ((_patsIattrs) :: Set String) ->
     _patsIattrs
   {-# INLINE rule553 #-}
   rule553 = \ ((_patsIcopy) :: Patterns) name_ ->
     Constr name_ _patsIcopy
   {-# INLINE rule554 #-}
   rule554 = \ _copy ->
     _copy
   {-# INLINE rule555 #-}
   rule555 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule556 #-}
   rule556 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule557 #-}
   rule557 = \ ((_lhsIanyLazyKind) :: Bool) ->
     _lhsIanyLazyKind
   {-# INLINE rule558 #-}
   rule558 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule559 #-}
   rule559 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule560 #-}
   rule560 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule561 #-}
   rule561 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
{-# 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 (T_Pattern_s41 -> Identity T_Pattern_s41
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _patsX44 :: T_Patterns_s44
_patsX44 = Identity T_Patterns_s44 -> T_Patterns_s44
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 PP_Doc
_patsIattrTypes Set [Char]
_patsIattrs Patterns
_patsIcopy [PP_Doc]
_patsIsem_lhs) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_patsX44 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_patsOallInhmap Map Identifier Attributes
_patsOallSynmap Bool
_patsOanyLazyKind Attributes
_patsOinhmap Attributes
_patsOlocalAttrTypes Options
_patsOoptions Attributes
_patsOsynmap)
         _lhsOsem_lhs ::  PP_Doc 
         _lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = (PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc
forall t. (PP_Doc -> t) -> [PP_Doc] -> t
rule562 PP_Doc -> PP_Doc
_addbang1 [PP_Doc]
_patsIsem_lhs
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule563  ()
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule564 Options
_lhsIoptions
         _addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule565 PP_Doc -> PP_Doc
_addbang Bool
_lhsIanyLazyKind
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule566 PP_Doc
_patsIattrTypes
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char]
rule567 Set [Char]
_patsIattrs
         _copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule568 Patterns
_patsIcopy Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule569 Pattern
_copy
         _patsOallInhmap :: Map Identifier Attributes
_patsOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule570 Map Identifier Attributes
_lhsIallInhmap
         _patsOallSynmap :: Map Identifier Attributes
_patsOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule571 Map Identifier Attributes
_lhsIallSynmap
         _patsOanyLazyKind :: Bool
_patsOanyLazyKind = Bool -> Bool
rule572 Bool
_lhsIanyLazyKind
         _patsOinhmap :: Attributes
_patsOinhmap = Attributes -> Attributes
rule573 Attributes
_lhsIinhmap
         _patsOlocalAttrTypes :: Attributes
_patsOlocalAttrTypes = Attributes -> Attributes
rule574 Attributes
_lhsIlocalAttrTypes
         _patsOoptions :: Options
_patsOoptions = Options -> Options
rule575 Options
_lhsIoptions
         _patsOsynmap :: Attributes
_patsOsynmap = Attributes -> Attributes
rule576 Attributes
_lhsIsynmap
         __result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char] -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule562 #-}
   {-# LINE 1138 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule562 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) ->
                                  {-# LINE 1138 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _addbang1     $ pp_block "(" ")" "," _patsIsem_lhs
                                  {-# LINE 4592 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule563 #-}
   {-# LINE 1147 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule563 = \  (_ :: ()) ->
                                    {-# LINE 1147 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    False
                                    {-# LINE 4598 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule564 #-}
   {-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule564 = \ ((_lhsIoptions) :: Options) ->
                                                     {-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                     {-# LINE 4604 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule565 #-}
   {-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule565 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->
                                                     {-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     if _lhsIanyLazyKind then id else _addbang
                                                     {-# LINE 4610 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule566 #-}
   rule566 = \ ((_patsIattrTypes) :: PP_Doc) ->
     _patsIattrTypes
   {-# INLINE rule567 #-}
   rule567 = \ ((_patsIattrs) :: Set String) ->
     _patsIattrs
   {-# INLINE rule568 #-}
   rule568 = \ ((_patsIcopy) :: Patterns) pos_ ->
     Product pos_ _patsIcopy
   {-# INLINE rule569 #-}
   rule569 = \ _copy ->
     _copy
   {-# INLINE rule570 #-}
   rule570 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule571 #-}
   rule571 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule572 #-}
   rule572 = \ ((_lhsIanyLazyKind) :: Bool) ->
     _lhsIanyLazyKind
   {-# INLINE rule573 #-}
   rule573 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule574 #-}
   rule574 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule575 #-}
   rule575 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule576 #-}
   rule576 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
{-# NOINLINE sem_Pattern_Alias #-}
sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern  -> T_Pattern 
sem_Pattern_Alias :: Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
arg_field_ Identifier
arg_attr_ T_Pattern
arg_pat_ = Identity T_Pattern_s41 -> T_Pattern
T_Pattern (T_Pattern_s41 -> Identity T_Pattern_s41
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _patX41 :: T_Pattern_s41
_patX41 = Identity T_Pattern_s41 -> T_Pattern_s41
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 PP_Doc
_patIattrTypes Set [Char]
_patIattrs Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_patOallInhmap Map Identifier Attributes
_patOallSynmap Bool
_patOanyLazyKind Attributes
_patOinhmap Attributes
_patOlocalAttrTypes Options
_patOoptions Attributes
_patOsynmap)
         _varPat :: PP_Doc
_varPat = Options -> Identifier -> Identifier -> PP_Doc
rule577 Options
_lhsIoptions Identifier
arg_attr_ Identifier
arg_field_
         _patExpr :: PP_Doc
_patExpr = Bool -> PP_Doc -> PP_Doc -> PP_Doc
rule578 Bool
_patIisUnderscore PP_Doc
_patIsem_lhs PP_Doc
_varPat
         _lhsOsem_lhs ::  PP_Doc 
         _lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = (PP_Doc -> PP_Doc) -> PP_Doc -> PP_Doc
forall t t. (t -> t) -> t -> t
rule579 PP_Doc -> PP_Doc
_addbang1 PP_Doc
_patExpr
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule580  ()
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = Options -> Set [Char] -> Identifier -> Identifier -> Set [Char]
rule581 Options
_lhsIoptions Set [Char]
_patIattrs Identifier
arg_attr_ Identifier
arg_field_
         _mbTp :: Maybe Type
_mbTp = Attributes -> Attributes -> Identifier -> Identifier -> Maybe Type
rule582 Attributes
_lhsIlocalAttrTypes Attributes
_lhsIsynmap Identifier
arg_attr_ Identifier
arg_field_
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = Options
-> Maybe Type -> PP_Doc -> Identifier -> Identifier -> PP_Doc
rule583 Options
_lhsIoptions Maybe Type
_mbTp PP_Doc
_patIattrTypes Identifier
arg_attr_ Identifier
arg_field_
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule584 Options
_lhsIoptions
         _addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> Bool -> PP_Doc -> PP_Doc
forall a. (a -> a) -> Bool -> a -> a
rule585 PP_Doc -> PP_Doc
_addbang Bool
_lhsIanyLazyKind
         _copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule586 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule587 Pattern
_copy
         _patOallInhmap :: Map Identifier Attributes
_patOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule588 Map Identifier Attributes
_lhsIallInhmap
         _patOallSynmap :: Map Identifier Attributes
_patOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule589 Map Identifier Attributes
_lhsIallSynmap
         _patOanyLazyKind :: Bool
_patOanyLazyKind = Bool -> Bool
rule590 Bool
_lhsIanyLazyKind
         _patOinhmap :: Attributes
_patOinhmap = Attributes -> Attributes
rule591 Attributes
_lhsIinhmap
         _patOlocalAttrTypes :: Attributes
_patOlocalAttrTypes = Attributes -> Attributes
rule592 Attributes
_lhsIlocalAttrTypes
         _patOoptions :: Options
_patOoptions = Options -> Options
rule593 Options
_lhsIoptions
         _patOsynmap :: Attributes
_patOsynmap = Attributes -> Attributes
rule594 Attributes
_lhsIsynmap
         __result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char] -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule577 #-}
   {-# LINE 1133 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule577 = \ ((_lhsIoptions) :: Options) attr_ field_ ->
                                  {-# LINE 1133 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  text $ attrname _lhsIoptions False field_ attr_
                                  {-# LINE 4684 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule578 #-}
   {-# LINE 1134 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule578 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) ::  PP_Doc ) _varPat ->
                                  {-# LINE 1134 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  if _patIisUnderscore
                                  then _varPat
                                  else _varPat     >|< "@" >|< _patIsem_lhs
                                  {-# LINE 4692 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule579 #-}
   {-# LINE 1137 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule579 = \ _addbang1 _patExpr ->
                                  {-# LINE 1137 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  _addbang1     _patExpr
                                  {-# LINE 4698 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule580 #-}
   {-# LINE 1148 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule580 = \  (_ :: ()) ->
                                    {-# LINE 1148 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    False
                                    {-# LINE 4704 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule581 #-}
   {-# LINE 1154 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule581 = \ ((_lhsIoptions) :: Options) ((_patIattrs) :: Set String) attr_ field_ ->
                    {-# LINE 1154 "src-ag/ExecutionPlan2Hs.ag" #-}
                    Set.insert (attrname _lhsIoptions False field_ attr_) _patIattrs
                    {-# LINE 4710 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule582 #-}
   {-# LINE 1159 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule582 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->
                    {-# LINE 1159 "src-ag/ExecutionPlan2Hs.ag" #-}
                    if field_ == _LHS
                    then Map.lookup attr_ _lhsIsynmap
                    else if field_ == _LOC
                         then Map.lookup attr_ _lhsIlocalAttrTypes
                         else Nothing
                    {-# LINE 4720 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule583 #-}
   {-# LINE 1164 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule583 = \ ((_lhsIoptions) :: Options) _mbTp ((_patIattrTypes) :: PP_Doc) attr_ field_ ->
                    {-# LINE 1164 "src-ag/ExecutionPlan2Hs.ag" #-}
                    maybe empty (\tp -> (attrname _lhsIoptions False field_ attr_) >#< "::" >#< ppTp tp) _mbTp
                    >-< _patIattrTypes
                    {-# LINE 4727 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule584 #-}
   {-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule584 = \ ((_lhsIoptions) :: Options) ->
                                                     {-# LINE 1556 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                     {-# LINE 4733 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule585 #-}
   {-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule585 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->
                                                     {-# LINE 1561 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     if _lhsIanyLazyKind then id else _addbang
                                                     {-# LINE 4739 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule586 #-}
   rule586 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule587 #-}
   rule587 = \ _copy ->
     _copy
   {-# INLINE rule588 #-}
   rule588 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule589 #-}
   rule589 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule590 #-}
   rule590 = \ ((_lhsIanyLazyKind) :: Bool) ->
     _lhsIanyLazyKind
   {-# INLINE rule591 #-}
   rule591 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule592 #-}
   rule592 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule593 #-}
   rule593 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule594 #-}
   rule594 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
{-# 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 (T_Pattern_s41 -> Identity T_Pattern_s41
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _patX41 :: T_Pattern_s41
_patX41 = Identity T_Pattern_s41 -> T_Pattern_s41
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 PP_Doc
_patIattrTypes Set [Char]
_patIattrs Pattern
_patIcopy Bool
_patIisUnderscore PP_Doc
_patIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_patX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_patOallInhmap Map Identifier Attributes
_patOallSynmap Bool
_patOanyLazyKind Attributes
_patOinhmap Attributes
_patOlocalAttrTypes Options
_patOoptions Attributes
_patOsynmap)
         _lhsOsem_lhs ::  PP_Doc 
         _lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = PP_Doc -> PP_Doc
rule595 PP_Doc
_patIsem_lhs
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc
rule596 PP_Doc
_patIattrTypes
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char]
rule597 Set [Char]
_patIattrs
         _copy :: Pattern
_copy = Pattern -> Pattern
rule598 Pattern
_patIcopy
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule599 Pattern
_copy
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = Bool -> Bool
rule600 Bool
_patIisUnderscore
         _patOallInhmap :: Map Identifier Attributes
_patOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule601 Map Identifier Attributes
_lhsIallInhmap
         _patOallSynmap :: Map Identifier Attributes
_patOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule602 Map Identifier Attributes
_lhsIallSynmap
         _patOanyLazyKind :: Bool
_patOanyLazyKind = Bool -> Bool
rule603 Bool
_lhsIanyLazyKind
         _patOinhmap :: Attributes
_patOinhmap = Attributes -> Attributes
rule604 Attributes
_lhsIinhmap
         _patOlocalAttrTypes :: Attributes
_patOlocalAttrTypes = Attributes -> Attributes
rule605 Attributes
_lhsIlocalAttrTypes
         _patOoptions :: Options
_patOoptions = Options -> Options
rule606 Options
_lhsIoptions
         _patOsynmap :: Attributes
_patOsynmap = Attributes -> Attributes
rule607 Attributes
_lhsIsynmap
         __result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char] -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule595 #-}
   {-# LINE 1141 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule595 = \ ((_patIsem_lhs) ::  PP_Doc ) ->
                                  {-# LINE 1141 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  text "~" >|< pp_parens _patIsem_lhs
                                  {-# LINE 4802 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule596 #-}
   rule596 = \ ((_patIattrTypes) :: PP_Doc) ->
     _patIattrTypes
   {-# INLINE rule597 #-}
   rule597 = \ ((_patIattrs) :: Set String) ->
     _patIattrs
   {-# INLINE rule598 #-}
   rule598 = \ ((_patIcopy) :: Pattern) ->
     Irrefutable _patIcopy
   {-# INLINE rule599 #-}
   rule599 = \ _copy ->
     _copy
   {-# INLINE rule600 #-}
   rule600 = \ ((_patIisUnderscore) :: Bool) ->
     _patIisUnderscore
   {-# INLINE rule601 #-}
   rule601 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     _lhsIallInhmap
   {-# INLINE rule602 #-}
   rule602 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     _lhsIallSynmap
   {-# INLINE rule603 #-}
   rule603 = \ ((_lhsIanyLazyKind) :: Bool) ->
     _lhsIanyLazyKind
   {-# INLINE rule604 #-}
   rule604 = \ ((_lhsIinhmap) :: Attributes) ->
     _lhsIinhmap
   {-# INLINE rule605 #-}
   rule605 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     _lhsIlocalAttrTypes
   {-# INLINE rule606 #-}
   rule606 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule607 #-}
   rule607 = \ ((_lhsIsynmap) :: Attributes) ->
     _lhsIsynmap
{-# 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 (T_Pattern_s41 -> Identity T_Pattern_s41
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _lhsOsem_lhs ::  PP_Doc 
         _lhsOsem_lhs :: PP_Doc
_lhsOsem_lhs = () -> PP_Doc
rule608  ()
         _lhsOisUnderscore :: Bool
         _lhsOisUnderscore :: Bool
_lhsOisUnderscore = () -> Bool
rule609  ()
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = () -> PP_Doc
rule610  ()
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = () -> Set [Char]
forall a. () -> Set a
rule611  ()
         _copy :: Pattern
_copy = Pos -> Pattern
rule612 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule613 Pattern
_copy
         __result_ :: T_Pattern_vOut40
__result_ = PP_Doc
-> Set [Char] -> Pattern -> Bool -> PP_Doc -> T_Pattern_vOut40
T_Pattern_vOut40 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Pattern
_lhsOcopy Bool
_lhsOisUnderscore PP_Doc
_lhsOsem_lhs
         in T_Pattern_vOut40
__result_ )
     in T_Pattern_v40 -> T_Pattern_s41
C_Pattern_s41 T_Pattern_v40
v40
   {-# INLINE rule608 #-}
   {-# LINE 1140 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule608 = \  (_ :: ()) ->
                                  {-# LINE 1140 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  text "_"
                                  {-# LINE 4865 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule609 #-}
   {-# LINE 1149 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule609 = \  (_ :: ()) ->
                                    {-# LINE 1149 "src-ag/ExecutionPlan2Hs.ag" #-}
                                    True
                                    {-# LINE 4871 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule610 #-}
   rule610 = \  (_ :: ()) ->
     empty
   {-# INLINE rule611 #-}
   rule611 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule612 #-}
   rule612 = \ pos_ ->
     Underscore pos_
   {-# INLINE rule613 #-}
   rule613 = \ _copy ->
     _copy

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns { Inh_Patterns -> Map Identifier Attributes
allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), Inh_Patterns -> Map Identifier Attributes
allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), Inh_Patterns -> Bool
anyLazyKind_Inh_Patterns :: (Bool), Inh_Patterns -> Attributes
inhmap_Inh_Patterns :: (Attributes), Inh_Patterns -> Attributes
localAttrTypes_Inh_Patterns :: (Map Identifier Type), Inh_Patterns -> Options
options_Inh_Patterns :: (Options), Inh_Patterns -> Attributes
synmap_Inh_Patterns :: (Attributes) }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> PP_Doc
attrTypes_Syn_Patterns :: (PP_Doc), Syn_Patterns -> Set [Char]
attrs_Syn_Patterns :: (Set String), Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> [PP_Doc]
sem_lhs_Syn_Patterns :: ([PP_Doc]) }
{-# 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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) =
   Identity Syn_Patterns -> Syn_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 = Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap
        (T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs) <- T_Patterns_vOut43 -> Identity T_Patterns_vOut43
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)
        Syn_Patterns -> Identity Syn_Patterns
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Set [Char] -> Patterns -> [PP_Doc] -> Syn_Patterns
Syn_Patterns PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs)
   )

-- cata
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns  -> T_Patterns 
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns Patterns
list = (T_Pattern -> T_Patterns -> T_Patterns)
-> T_Patterns -> [T_Pattern] -> T_Patterns
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Patterns
sem_Patterns_Nil ((Pattern -> T_Pattern) -> Patterns -> [T_Pattern]
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 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)
data T_Patterns_vOut43  = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([PP_Doc])
{-# 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 (T_Patterns_s44 -> Identity T_Patterns_s44
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _hdX41 :: T_Pattern_s41
_hdX41 = Identity T_Pattern_s41 -> T_Pattern_s41
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 = Identity T_Patterns_s44 -> T_Patterns_s44
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 PP_Doc
_hdIattrTypes Set [Char]
_hdIattrs Pattern
_hdIcopy Bool
_hdIisUnderscore PP_Doc
_hdIsem_lhs) = T_Pattern_s41 -> T_Pattern_v40
inv_Pattern_s41 T_Pattern_s41
_hdX41 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Pattern_vIn40
T_Pattern_vIn40 Map Identifier Attributes
_hdOallInhmap Map Identifier Attributes
_hdOallSynmap Bool
_hdOanyLazyKind Attributes
_hdOinhmap Attributes
_hdOlocalAttrTypes Options
_hdOoptions Attributes
_hdOsynmap)
         (T_Patterns_vOut43 PP_Doc
_tlIattrTypes Set [Char]
_tlIattrs Patterns
_tlIcopy [PP_Doc]
_tlIsem_lhs) = T_Patterns_s44 -> T_Patterns_v43
inv_Patterns_s44 T_Patterns_s44
_tlX44 (Map Identifier Attributes
-> Map Identifier Attributes
-> Bool
-> Attributes
-> Attributes
-> Options
-> Attributes
-> T_Patterns_vIn43
T_Patterns_vIn43 Map Identifier Attributes
_tlOallInhmap Map Identifier Attributes
_tlOallSynmap Bool
_tlOanyLazyKind Attributes
_tlOinhmap Attributes
_tlOlocalAttrTypes Options
_tlOoptions Attributes
_tlOsynmap)
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = PP_Doc -> PP_Doc -> PP_Doc
rule614 PP_Doc
_hdIattrTypes PP_Doc
_tlIattrTypes
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = Set [Char] -> Set [Char] -> Set [Char]
rule615 Set [Char]
_hdIattrs Set [Char]
_tlIattrs
         _lhsOsem_lhs :: [PP_Doc]
         _lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule616 PP_Doc
_hdIsem_lhs [PP_Doc]
_tlIsem_lhs
         _copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule617 Pattern
_hdIcopy Patterns
_tlIcopy
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule618 Patterns
_copy
         _hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule619 Map Identifier Attributes
_lhsIallInhmap
         _hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule620 Map Identifier Attributes
_lhsIallSynmap
         _hdOanyLazyKind :: Bool
_hdOanyLazyKind = Bool -> Bool
rule621 Bool
_lhsIanyLazyKind
         _hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule622 Attributes
_lhsIinhmap
         _hdOlocalAttrTypes :: Attributes
_hdOlocalAttrTypes = Attributes -> Attributes
rule623 Attributes
_lhsIlocalAttrTypes
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule624 Options
_lhsIoptions
         _hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule625 Attributes
_lhsIsynmap
         _tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule626 Map Identifier Attributes
_lhsIallInhmap
         _tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule627 Map Identifier Attributes
_lhsIallSynmap
         _tlOanyLazyKind :: Bool
_tlOanyLazyKind = Bool -> Bool
rule628 Bool
_lhsIanyLazyKind
         _tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule629 Attributes
_lhsIinhmap
         _tlOlocalAttrTypes :: Attributes
_tlOlocalAttrTypes = Attributes -> Attributes
rule630 Attributes
_lhsIlocalAttrTypes
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule631 Options
_lhsIoptions
         _tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule632 Attributes
_lhsIsynmap
         __result_ :: T_Patterns_vOut43
__result_ = PP_Doc -> Set [Char] -> Patterns -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs
         in T_Patterns_vOut43
__result_ )
     in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
   {-# INLINE rule614 #-}
   rule614 :: PP_Doc -> PP_Doc -> PP_Doc
rule614 = \ ((PP_Doc
_hdIattrTypes) :: PP_Doc) ((PP_Doc
_tlIattrTypes) :: PP_Doc) ->
     PP_Doc
_hdIattrTypes PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIattrTypes
   {-# INLINE rule615 #-}
   rule615 :: Set [Char] -> Set [Char] -> Set [Char]
rule615 = \ ((Set [Char]
_hdIattrs) :: Set String) ((Set [Char]
_tlIattrs) :: Set String) ->
     Set [Char]
_hdIattrs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIattrs
   {-# INLINE rule616 #-}
   rule616 :: PP_Doc -> [PP_Doc] -> [PP_Doc]
rule616 = \ ((PP_Doc
_hdIsem_lhs) ::  PP_Doc ) (([PP_Doc]
_tlIsem_lhs) :: [PP_Doc]) ->
     PP_Doc
_hdIsem_lhs PP_Doc -> [PP_Doc] -> [PP_Doc]
forall a. a -> [a] -> [a]
: [PP_Doc]
_tlIsem_lhs
   {-# INLINE rule617 #-}
   rule617 :: Pattern -> Patterns -> Patterns
rule617 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
     (:) Pattern
_hdIcopy Patterns
_tlIcopy
   {-# INLINE rule618 #-}
   rule618 :: p -> p
rule618 = \ p
_copy ->
     p
_copy
   {-# INLINE rule619 #-}
   rule619 :: Map Identifier Attributes -> Map Identifier Attributes
rule619 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallInhmap
   {-# INLINE rule620 #-}
   rule620 :: Map Identifier Attributes -> Map Identifier Attributes
rule620 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallSynmap
   {-# INLINE rule621 #-}
   rule621 :: Bool -> Bool
rule621 = \ ((Bool
_lhsIanyLazyKind) :: Bool) ->
     Bool
_lhsIanyLazyKind
   {-# INLINE rule622 #-}
   rule622 :: Attributes -> Attributes
rule622 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
     Attributes
_lhsIinhmap
   {-# INLINE rule623 #-}
   rule623 :: Attributes -> Attributes
rule623 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     Attributes
_lhsIlocalAttrTypes
   {-# INLINE rule624 #-}
   rule624 :: Options -> Options
rule624 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule625 #-}
   rule625 :: Attributes -> Attributes
rule625 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
     Attributes
_lhsIsynmap
   {-# INLINE rule626 #-}
   rule626 :: Map Identifier Attributes -> Map Identifier Attributes
rule626 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallInhmap
   {-# INLINE rule627 #-}
   rule627 :: Map Identifier Attributes -> Map Identifier Attributes
rule627 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallSynmap
   {-# INLINE rule628 #-}
   rule628 :: Bool -> Bool
rule628 = \ ((Bool
_lhsIanyLazyKind) :: Bool) ->
     Bool
_lhsIanyLazyKind
   {-# INLINE rule629 #-}
   rule629 :: Attributes -> Attributes
rule629 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
     Attributes
_lhsIinhmap
   {-# INLINE rule630 #-}
   rule630 :: Attributes -> Attributes
rule630 = \ ((Attributes
_lhsIlocalAttrTypes) :: Map Identifier Type) ->
     Attributes
_lhsIlocalAttrTypes
   {-# INLINE rule631 #-}
   rule631 :: Options -> Options
rule631 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule632 #-}
   rule632 :: Attributes -> Attributes
rule632 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
     Attributes
_lhsIsynmap
{-# 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 (T_Patterns_s44 -> Identity T_Patterns_s44
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 Map Identifier Attributes
_lhsIallInhmap Map Identifier Attributes
_lhsIallSynmap Bool
_lhsIanyLazyKind Attributes
_lhsIinhmap Attributes
_lhsIlocalAttrTypes Options
_lhsIoptions Attributes
_lhsIsynmap) -> ( let
         _lhsOattrTypes :: PP_Doc
         _lhsOattrTypes :: PP_Doc
_lhsOattrTypes = () -> PP_Doc
rule633  ()
         _lhsOattrs :: Set String
         _lhsOattrs :: Set [Char]
_lhsOattrs = () -> Set [Char]
forall a. () -> Set a
rule634  ()
         _lhsOsem_lhs :: [PP_Doc]
         _lhsOsem_lhs :: [PP_Doc]
_lhsOsem_lhs = () -> [PP_Doc]
forall a. () -> [a]
rule635  ()
         _copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule636  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule637 Patterns
forall a. [a]
_copy
         __result_ :: T_Patterns_vOut43
__result_ = PP_Doc -> Set [Char] -> Patterns -> [PP_Doc] -> T_Patterns_vOut43
T_Patterns_vOut43 PP_Doc
_lhsOattrTypes Set [Char]
_lhsOattrs Patterns
_lhsOcopy [PP_Doc]
_lhsOsem_lhs
         in T_Patterns_vOut43
__result_ )
     in T_Patterns_v43 -> T_Patterns_s44
C_Patterns_s44 T_Patterns_v43
v43
   {-# INLINE rule633 #-}
   rule633 :: () -> PP_Doc
rule633 = \  (()
_ :: ()) ->
     PP_Doc
empty
   {-# INLINE rule634 #-}
   rule634 :: () -> Set a
rule634 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule635 #-}
   rule635 :: () -> [a]
rule635 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule636 #-}
   rule636 :: () -> [a]
rule636 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule637 #-}
   rule637 :: p -> p
rule637 = \ p
_copy ->
     p
_copy

-- Visit -------------------------------------------------------
-- wrapper
data Inh_Visit  = Inh_Visit { Inh_Visit -> Map Int (Int, Int)
allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), Inh_Visit -> Map Identifier Attributes
allInhmap_Inh_Visit :: (Map NontermIdent Attributes), Inh_Visit -> Map Identifier Int
allInitStates_Inh_Visit :: (Map NontermIdent Int), Inh_Visit -> Map Identifier Attributes
allSynmap_Inh_Visit :: (Map NontermIdent Attributes), Inh_Visit -> Map Int VisitKind
allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), Inh_Visit
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_Visit -> Map Int (Map [Char] (Maybe NonLocalAttr))
allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Inh_Visit -> Map Int (Set Identifier)
avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), Inh_Visit -> Map Int (Set Identifier)
avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), Inh_Visit -> Attributes
childTypes_Inh_Visit :: (Map Identifier Type), Inh_Visit
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_Visit -> Identifier
con_Inh_Visit :: (ConstructorIdent), Inh_Visit -> Attributes
inhmap_Inh_Visit :: (Attributes), Inh_Visit
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_Visit -> Map Int StateCtx
nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), Inh_Visit -> Identifier
nt_Inh_Visit :: (NontermIdent), Inh_Visit -> Options
options_Inh_Visit :: (Options), Inh_Visit -> [Identifier]
params_Inh_Visit :: ([Identifier]), Inh_Visit -> Map Int StateCtx
prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), Inh_Visit -> Map Identifier (Set [Char])
ruledefs_Inh_Visit :: (Map Identifier (Set String)), Inh_Visit -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_Visit -> Attributes
synmap_Inh_Visit :: (Attributes), Inh_Visit -> Set [Char]
terminaldefs_Inh_Visit :: (Set String) }
data Syn_Visit  = Syn_Visit { Syn_Visit -> VisitStateState
allvisits_Syn_Visit :: ( VisitStateState ), Syn_Visit
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_Visit -> Seq Error
errors_Syn_Visit :: (Seq Error), Syn_Visit -> Map Int (Int, Int)
fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), Syn_Visit -> Map Int (Map [Char] (Maybe NonLocalAttr))
intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Syn_Visit -> Set [Char]
lazyIntras_Syn_Visit :: (Set String), Syn_Visit -> Map Identifier (Set VisitKind)
ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), Syn_Visit -> Map Identifier Int
ruleUsage_Syn_Visit :: (Map Identifier Int), Syn_Visit -> (Int, Bool -> PP_Doc)
sem_visit_Syn_Visit :: (  (StateIdentifier,Bool -> PP_Doc)  ), Syn_Visit -> PP_Doc
t_visits_Syn_Visit :: (PP_Doc), Syn_Visit -> Set [Char]
usedArgs_Syn_Visit :: (Set String), Syn_Visit -> Map Int VisitKind
visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), Syn_Visit -> Map Int (Set Identifier)
visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), Syn_Visit -> Map Int (Set Identifier)
visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_Visit #-}
wrap_Visit :: T_Visit  -> Inh_Visit  -> (Syn_Visit )
wrap_Visit :: T_Visit -> Inh_Visit -> Syn_Visit
wrap_Visit (T_Visit Identity T_Visit_s47
act) (Inh_Visit Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs) =
   Identity Syn_Visit -> Syn_Visit
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Visit_s47
sem <- Identity T_Visit_s47
act
        let arg46 :: T_Visit_vIn46
arg46 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> T_Visit_vIn46
T_Visit_vIn46 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs
        (T_Visit_vOut46 VisitStateState
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, Bool -> PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_Visit_vOut46 -> Identity T_Visit_vOut46
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Visit_s47 -> T_Visit_v46
inv_Visit_s47 T_Visit_s47
sem T_Visit_vIn46
arg46)
        Syn_Visit -> Identity Syn_Visit
forall (m :: * -> *) a. Monad m => a -> m a
return (VisitStateState
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> (Int, Bool -> PP_Doc)
-> PP_Doc
-> Set [Char]
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_Visit
Syn_Visit VisitStateState
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, Bool -> PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
   )

-- cata
{-# INLINE sem_Visit #-}
sem_Visit :: Visit  -> T_Visit 
sem_Visit :: Visit -> T_Visit
sem_Visit ( Visit Int
ident_ Int
from_ Int
to_ Set Identifier
inh_ Set Identifier
syn_ VisitSteps
steps_ VisitKind
kind_ ) = Int
-> Int
-> Int
-> Set Identifier
-> Set Identifier
-> T_VisitSteps
-> VisitKind
-> T_Visit
sem_Visit_Visit Int
ident_ Int
from_ Int
to_ Set Identifier
inh_ Set Identifier
syn_ ( VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
steps_ ) VisitKind
kind_

-- semantic domain
newtype T_Visit  = T_Visit {
                           T_Visit -> Identity T_Visit_s47
attach_T_Visit :: Identity (T_Visit_s47 )
                           }
newtype T_Visit_s47  = C_Visit_s47 {
                                   T_Visit_s47 -> T_Visit_v46
inv_Visit_s47 :: (T_Visit_v46 )
                                   }
data T_Visit_s48  = C_Visit_s48
type T_Visit_v46  = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )
data T_Visit_vIn46  = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)
data T_Visit_vOut46  = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) (  (StateIdentifier,Bool -> PP_Doc)  ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_Visit_Visit #-}
sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps  -> (VisitKind) -> T_Visit 
sem_Visit_Visit :: Int
-> Int
-> Int
-> Set Identifier
-> Set Identifier
-> T_VisitSteps
-> VisitKind
-> T_Visit
sem_Visit_Visit Int
arg_ident_ Int
arg_from_ Int
arg_to_ Set Identifier
arg_inh_ Set Identifier
arg_syn_ T_VisitSteps
arg_steps_ VisitKind
arg_kind_ = Identity T_Visit_s47 -> T_Visit
T_Visit (T_Visit_s47 -> Identity T_Visit_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_Visit_s47
st47) where
   {-# NOINLINE st47 #-}
   st47 :: T_Visit_s47
st47 = let
      v46 :: T_Visit_v46 
      v46 :: T_Visit_v46
v46 = \ (T_Visit_vIn46 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs) -> ( let
         _stepsX53 :: T_VisitSteps_s53
_stepsX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_steps_))
         (T_VisitSteps_vOut52 Set [Char]
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set [Char]
_stepsIlazyIntras Int
_stepsIprevMaxSimRefs Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize PP_Doc
_stepsIsync_steps Set [Char]
_stepsIusedArgs Map [Char] (Maybe NonLocalAttr)
_stepsIuses Map Int VisitKind
_stepsIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_stepsX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros FormatMode
_stepsOfmtMode Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Int
_stepsOprevMaxSimRefs Map Identifier (Set [Char])
_stepsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses Bool
_stepsOuseParallel)
         _lhsOallvisits ::  VisitStateState 
         _lhsOallvisits :: VisitStateState
_lhsOallvisits = Int -> Int -> Int -> VisitStateState
forall b a c. b -> a -> c -> (a, b, c)
rule638 Int
arg_from_ Int
arg_ident_ Int
arg_to_
         _nameT_visit :: PP_Doc
_nameT_visit = Identifier -> Int -> PP_Doc
rule639 Identifier
_lhsInt Int
arg_ident_
         _nameTIn_visit :: PP_Doc
_nameTIn_visit = Identifier -> Int -> PP_Doc
rule640 Identifier
_lhsInt Int
arg_ident_
         _nameTOut_visit :: PP_Doc
_nameTOut_visit = Identifier -> Int -> PP_Doc
rule641 Identifier
_lhsInt Int
arg_ident_
         _nameTNext_visit :: PP_Doc
_nameTNext_visit = Identifier -> Int -> PP_Doc
rule642 Identifier
_lhsInt Int
arg_to_
         _nextVisitInfo :: StateCtx
_nextVisitInfo = Map Int StateCtx -> Int -> StateCtx
rule643 Map Int StateCtx
_lhsInextVisits Int
arg_to_
         _typecon :: PP_Doc
_typecon = Options -> VisitKind -> PP_Doc
rule644 Options
_lhsIoptions VisitKind
arg_kind_
         _t_params :: PP_Doc
_t_params = [Identifier] -> PP_Doc
rule645 [Identifier]
_lhsIparams
         _lhsOt_visits :: PP_Doc
         _lhsOt_visits :: PP_Doc
_lhsOt_visits = (PP_Doc -> PP_Doc)
-> PP_Doc
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> StateCtx
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
rule646 PP_Doc -> PP_Doc
_addbang1 PP_Doc
_inhpart Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_nameTNext_visit PP_Doc
_nameTOut_visit PP_Doc
_nameT_visit StateCtx
_nextVisitInfo PP_Doc
_synpart PP_Doc
_t_params PP_Doc
_typecon
         _inhpart :: PP_Doc
_inhpart = Attributes
-> (Set Identifier -> Attributes -> PP_Doc)
-> Set Identifier
-> PP_Doc
forall t t. Attributes -> (t -> Attributes -> t) -> t -> t
rule647 Attributes
_lhsIinhmap Set Identifier -> Attributes -> PP_Doc
_ppTypeList Set Identifier
arg_inh_
         _synpart :: PP_Doc
_synpart = Attributes
-> (Set Identifier -> Attributes -> PP_Doc)
-> Set Identifier
-> PP_Doc
forall t t. Attributes -> (t -> Attributes -> t) -> t -> t
rule648 Attributes
_lhsIsynmap Set Identifier -> Attributes -> PP_Doc
_ppTypeList Set Identifier
arg_syn_
         _ppTypeList :: Set Identifier -> Attributes -> PP_Doc
_ppTypeList = (PP_Doc -> PP_Doc) -> Set Identifier -> Attributes -> PP_Doc
rule649 PP_Doc -> PP_Doc
_addbang1
         _lhsOsem_visit ::   (StateIdentifier,Bool -> PP_Doc)  
         _lhsOsem_visit :: (Int, Bool -> PP_Doc)
_lhsOsem_visit = (PP_Doc -> PP_Doc)
-> PP_Doc
-> Identifier
-> Identifier
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> Int
-> Int
-> (Int, Bool -> PP_Doc)
forall a.
(PP_Doc -> PP_Doc)
-> PP_Doc
-> Identifier
-> Identifier
-> Options
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> PP_Doc
-> a
-> Int
-> (a, Bool -> PP_Doc)
rule650 PP_Doc -> PP_Doc
_addbang PP_Doc
_inhpats Identifier
_lhsIcon Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_nameT_visit PP_Doc
_stepsClosing PP_Doc
_stepsInitial PP_Doc
_stepsIsem_steps PP_Doc
_t_params PP_Doc
_vname Int
arg_from_ Int
arg_ident_
         _stepsInitial :: PP_Doc
_stepsInitial = VisitKind -> PP_Doc
rule651 VisitKind
arg_kind_
         _stepsClosing :: PP_Doc
_stepsClosing = (PP_Doc -> PP_Doc) -> PP_Doc -> PP_Doc -> VisitKind -> PP_Doc
rule652 PP_Doc -> PP_Doc
_addbang PP_Doc
_nextStBuild PP_Doc
_resultval VisitKind
arg_kind_
         _vname :: PP_Doc
_vname = Int -> PP_Doc
rule653 Int
arg_ident_
         _inhpats :: PP_Doc
_inhpats = Options -> Set Identifier -> PP_Doc
rule654 Options
_lhsIoptions Set Identifier
arg_inh_
         _inhargs :: Identifier -> PP_Doc
_inhargs = Options -> Set Identifier -> Identifier -> PP_Doc
rule655 Options
_lhsIoptions Set Identifier
arg_inh_
         _synargs :: PP_Doc
_synargs = Options -> Set Identifier -> PP_Doc
rule656 Options
_lhsIoptions Set Identifier
arg_syn_
         _nextargsMp :: Map [Char] (Maybe NonLocalAttr)
_nextargsMp = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Int -> Map [Char] (Maybe NonLocalAttr)
rule657 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Int
arg_to_
         _nextargs :: PP_Doc
_nextargs = Map [Char] (Maybe NonLocalAttr) -> PP_Doc
forall a. Map [Char] a -> PP_Doc
rule658 Map [Char] (Maybe NonLocalAttr)
_nextargsMp
         _nextst :: PP_Doc
_nextst = Options
-> PP_Doc -> Map [Char] (Maybe NonLocalAttr) -> Int -> PP_Doc
forall k a. Options -> PP_Doc -> Map k a -> Int -> PP_Doc
rule659 Options
_lhsIoptions PP_Doc
_nextargs Map [Char] (Maybe NonLocalAttr)
_nextargsMp Int
arg_to_
         _resultval :: PP_Doc
_resultval = PP_Doc -> PP_Doc -> PP_Doc -> PP_Doc
rule660 PP_Doc
_nameTOut_visit PP_Doc
_nextStRef PP_Doc
_synargs
         (PP_Doc
_nextStBuild,PP_Doc
_nextStRef) = (PP_Doc -> PP_Doc) -> StateCtx -> PP_Doc -> (PP_Doc, PP_Doc)
rule661 PP_Doc -> PP_Doc
_addbang StateCtx
_nextVisitInfo PP_Doc
_nextst
         _stepsOkind :: VisitKind
_stepsOkind = VisitKind -> VisitKind
forall a. a -> a
rule662 VisitKind
arg_kind_
         _stepsOfmtMode :: FormatMode
_stepsOfmtMode = VisitKind -> FormatMode
rule663 VisitKind
arg_kind_
         _stepsOindex :: Int
_stepsOindex = () -> Int
rule664  ()
         _stepsOprevMaxSimRefs :: Int
_stepsOprevMaxSimRefs = () -> Int
rule665  ()
         _stepsOuseParallel :: Bool
_stepsOuseParallel = () -> Bool
rule666  ()
         _prevVisitInfo :: StateCtx
_prevVisitInfo = Map Int StateCtx -> Int -> StateCtx
rule667 Map Int StateCtx
_lhsInextVisits Int
arg_from_
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall a k. a -> k -> Map k a
rule668 Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_invokecode Int
arg_ident_
         _invokecode :: Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_invokecode = (PP_Doc -> PP_Doc)
-> (Identifier -> PP_Doc)
-> Identifier
-> Options
-> PP_Doc
-> PP_Doc
-> StateCtx
-> StateCtx
-> Int
-> Int
-> VisitKind
-> Set Identifier
-> Int
-> Identifier
-> VisitKind
-> Either Error (PP_Doc, PP_Doc)
rule669 PP_Doc -> PP_Doc
_addbang Identifier -> PP_Doc
_inhargs Identifier
_lhsInt Options
_lhsIoptions PP_Doc
_nameTIn_visit PP_Doc
_nameTOut_visit StateCtx
_nextVisitInfo StateCtx
_prevVisitInfo Int
arg_from_ Int
arg_ident_ VisitKind
arg_kind_ Set Identifier
arg_syn_ Int
arg_to_
         _thisintra :: Map [Char] (Maybe NonLocalAttr)
_thisintra = Map [Char] (Maybe Any)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
forall b a.
Map [Char] b -> Map [Char] a -> Map [Char] a -> Map [Char] a
rule670 Map [Char] (Maybe Any)
_defsAsMap Map [Char] (Maybe NonLocalAttr)
_nextintra Map [Char] (Maybe NonLocalAttr)
_uses
         _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
         _lhsOintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap = Map [Char] (Maybe NonLocalAttr)
-> Int -> Map Int (Map [Char] (Maybe NonLocalAttr))
forall a k. a -> k -> Map k a
rule671 Map [Char] (Maybe NonLocalAttr)
_thisintra Int
arg_from_
         _nextintra :: Map [Char] (Maybe NonLocalAttr)
_nextintra = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Int -> Map [Char] (Maybe NonLocalAttr)
rule672 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Int
arg_to_
         _uses :: Map [Char] (Maybe NonLocalAttr)
_uses = Options
-> Map [Char] (Maybe NonLocalAttr)
-> Set Identifier
-> Map [Char] (Maybe NonLocalAttr)
rule673 Options
_lhsIoptions Map [Char] (Maybe NonLocalAttr)
_stepsIuses Set Identifier
arg_syn_
         _inhVarNms :: Set [Char]
_inhVarNms = Options -> Set Identifier -> Set [Char]
rule674 Options
_lhsIoptions Set Identifier
arg_inh_
         _defs :: Set [Char]
_defs = Set [Char] -> Set [Char] -> Set [Char] -> Set [Char]
rule675 Set [Char]
_inhVarNms Set [Char]
_lhsIterminaldefs Set [Char]
_stepsIdefs
         _defsAsMap :: Map [Char] (Maybe Any)
_defsAsMap = Set [Char] -> Map [Char] (Maybe Any)
forall a. Set [Char] -> Map [Char] (Maybe a)
rule676 Set [Char]
_defs
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Int -> Set Identifier -> Map Int (Set Identifier)
forall k a. k -> a -> Map k a
rule677 Int
arg_ident_ Set Identifier
arg_syn_
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Int -> Set Identifier -> Map Int (Set Identifier)
forall k a. k -> a -> Map k a
rule678 Int
arg_ident_ Set Identifier
arg_inh_
         _lazyIntrasInh :: Set [Char]
_lazyIntrasInh = Set [Char] -> Set [Char] -> VisitKind -> Set [Char]
rule679 Set [Char]
_inhVarNms Set [Char]
_stepsIdefs VisitKind
arg_kind_
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Set [Char]
rule680 Set [Char]
_lazyIntrasInh Set [Char]
_stepsIlazyIntras
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule681 Options
_lhsIoptions
         _addbang1 :: PP_Doc -> PP_Doc
_addbang1 = (PP_Doc -> PP_Doc) -> VisitKind -> PP_Doc -> PP_Doc
forall a. (a -> a) -> VisitKind -> a -> a
rule682 PP_Doc -> PP_Doc
_addbang VisitKind
arg_kind_
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Int -> Int -> Int -> Map Int (Int, Int)
forall a k b. a -> k -> b -> Map k (a, b)
rule683 Int
arg_from_ Int
arg_ident_ Int
arg_to_
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Int -> VisitKind -> Map Int VisitKind
forall k a. k -> a -> Map k a
rule684 Int
arg_ident_ VisitKind
arg_kind_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule685 Seq Error
_stepsIerrors
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule686 Map Identifier (Set VisitKind)
_stepsIruleKinds
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule687 Map Identifier Int
_stepsIruleUsage
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char]
rule688 Set [Char]
_stepsIusedArgs
         _stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule689 Map Int (Int, Int)
_lhsIallFromToStates
         _stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule690 Map Identifier Int
_lhsIallInitStates
         _stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule691 Map Int VisitKind
_lhsIallVisitKinds
         _stepsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule692 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule693 Map Int (Set Identifier)
_lhsIavisitdefs
         _stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule694 Map Int (Set Identifier)
_lhsIavisituses
         _stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule695 Attributes
_lhsIchildTypes
         _stepsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule696 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _stepsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule697 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule698 Options
_lhsIoptions
         _stepsOruledefs :: Map Identifier (Set [Char])
_stepsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule699 Map Identifier (Set [Char])
_lhsIruledefs
         _stepsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule700 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         __result_ :: T_Visit_vOut46
__result_ = VisitStateState
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> (Int, Bool -> PP_Doc)
-> PP_Doc
-> Set [Char]
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visit_vOut46
T_Visit_vOut46 VisitStateState
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage (Int, Bool -> PP_Doc)
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_Visit_vOut46
__result_ )
     in T_Visit_v46 -> T_Visit_s47
C_Visit_s47 T_Visit_v46
v46
   {-# INLINE rule638 #-}
   {-# LINE 340 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule638 = \ from_ ident_ to_ ->
                            {-# LINE 340 "src-ag/ExecutionPlan2Hs.ag" #-}
                            (ident_, from_, to_)
                            {-# LINE 5168 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule639 #-}
   {-# LINE 399 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule639 = \ ((_lhsInt) :: NontermIdent) ident_ ->
                                  {-# LINE 399 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  conNmTVisit _lhsInt ident_
                                  {-# LINE 5174 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule640 #-}
   {-# LINE 400 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule640 = \ ((_lhsInt) :: NontermIdent) ident_ ->
                                  {-# LINE 400 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  conNmTVisitIn _lhsInt ident_
                                  {-# LINE 5180 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule641 #-}
   {-# LINE 401 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule641 = \ ((_lhsInt) :: NontermIdent) ident_ ->
                                  {-# LINE 401 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  conNmTVisitOut _lhsInt ident_
                                  {-# LINE 5186 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule642 #-}
   {-# LINE 402 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule642 = \ ((_lhsInt) :: NontermIdent) to_ ->
                                  {-# LINE 402 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  conNmTNextVisit _lhsInt to_
                                  {-# LINE 5192 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule643 #-}
   {-# LINE 404 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule643 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->
                                  {-# LINE 404 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  Map.findWithDefault ManyVis to_ _lhsInextVisits
                                  {-# LINE 5198 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule644 #-}
   {-# LINE 405 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule644 = \ ((_lhsIoptions) :: Options) kind_ ->
                                  {-# LINE 405 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  case kind_ of
                                    VisitPure _  -> empty
                                    VisitMonadic -> ppMonadType _lhsIoptions
                                  {-# LINE 5206 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule645 #-}
   {-# LINE 409 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule645 = \ ((_lhsIparams) :: [Identifier]) ->
                            {-# LINE 409 "src-ag/ExecutionPlan2Hs.ag" #-}
                            ppSpaced _lhsIparams
                            {-# LINE 5212 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule646 #-}
   {-# LINE 410 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule646 = \ _addbang1 _inhpart ((_lhsIoptions) :: Options) _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon ->
                           {-# LINE 410 "src-ag/ExecutionPlan2Hs.ag" #-}
                           "type" >#< _nameT_visit     >#< _t_params     >#< "=" >#<
                             pp_parens (_nameTIn_visit     >#< _t_params    )
                               >#< ( if dummyTokenVisit _lhsIoptions
                                     then "->" >#< dummyType _lhsIoptions True
                                     else empty
                                   )
                               >#< "->" >#< _typecon     >#< pp_parens (_nameTOut_visit     >#< _t_params    )
                           >-< "data" >#< _nameTIn_visit     >#< _t_params     >#< "=" >#< _nameTIn_visit     >#<
                                _inhpart
                           >-< "data" >#< _nameTOut_visit     >#< _t_params     >#< "=" >#< _nameTOut_visit     >#<
                                _synpart     >#< case _nextVisitInfo     of
                                                   NoneVis    -> empty
                                                   _          -> _addbang1     $ pp_parens (_nameTNext_visit     >#< _t_params    )
                           {-# LINE 5230 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule647 #-}
   {-# LINE 423 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule647 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->
                            {-# LINE 423 "src-ag/ExecutionPlan2Hs.ag" #-}
                            _ppTypeList     inh_ _lhsIinhmap
                            {-# LINE 5236 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule648 #-}
   {-# LINE 424 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule648 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->
                            {-# LINE 424 "src-ag/ExecutionPlan2Hs.ag" #-}
                            _ppTypeList     syn_ _lhsIsynmap
                            {-# LINE 5242 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule649 #-}
   {-# LINE 425 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule649 = \ _addbang1 ->
                             {-# LINE 425 "src-ag/ExecutionPlan2Hs.ag" #-}
                             \s m -> ppSpaced $ map (\i -> _addbang1     $ pp_parens $ case Map.lookup i m of
                                                                                        Just tp -> ppTp tp ) $ Set.toList s
                             {-# LINE 5249 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule650 #-}
   {-# LINE 728 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule650 = \ _addbang _inhpats ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameT_visit _stepsClosing _stepsInitial ((_stepsIsem_steps) :: PP_Doc) _t_params _vname from_ ident_ ->
                            {-# LINE 728 "src-ag/ExecutionPlan2Hs.ag" #-}
                            ( from_
                            , \addInlinePragma ->
                                 ( if noInlinePragmas _lhsIoptions
                                   then empty
                                   else if addInlinePragma && aggressiveInlinePragmas _lhsIoptions
                                        then ppInline _vname
                                        else if helpInlining _lhsIoptions
                                             then ppNoInline _vname
                                             else empty
                                 )
                                 >-< "v" >|< ident_ >#< "::" >#< _nameT_visit     >#< _t_params
                                 >-< "v" >|< ident_ >#< "=" >#< "\\" >#< (_addbang     $ pp_parens (_nameTIn_visit     >#< _inhpats    ))
                                 >#< ( if dummyTokenVisit _lhsIoptions
                                       then pp $ dummyPat _lhsIoptions True
                                       else empty
                                     )
                                 >#< "->"
                                 >#< ( if genCostCentres _lhsIoptions
                                       then ppCostCentre (_vname     >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)
                                       else empty
                                     ) >#< "(" >#< _stepsInitial
                                 >-< indent 3 (_stepsIsem_steps >-< _stepsClosing     >#< ")")
                            )
                            {-# LINE 5277 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule651 #-}
   {-# LINE 753 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule651 = \ kind_ ->
                               {-# LINE 753 "src-ag/ExecutionPlan2Hs.ag" #-}
                               case kind_ of
                                 VisitPure False -> text "let"
                                 VisitPure True  -> empty
                                 VisitMonadic    -> text "do"
                               {-# LINE 5286 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule652 #-}
   {-# LINE 757 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule652 = \ _addbang _nextStBuild _resultval kind_ ->
                                {-# LINE 757 "src-ag/ExecutionPlan2Hs.ag" #-}
                                let decls =  _nextStBuild
                                             >-<  _addbang     (pp resultValName) >#< "=" >#< _resultval
                                in case kind_ of
                                     VisitPure False -> decls
                                                        >-< "in" >#< resultValName
                                     VisitPure True  -> "let" >#< decls
                                                        >-< indent 1 ("in" >#< resultValName)
                                     VisitMonadic    -> "let" >#< decls
                                                        >-< "return" >#< resultValName
                                {-# LINE 5300 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule653 #-}
   {-# LINE 766 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule653 = \ ident_ ->
                            {-# LINE 766 "src-ag/ExecutionPlan2Hs.ag" #-}
                            "v" >|< ident_
                            {-# LINE 5306 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule654 #-}
   {-# LINE 767 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule654 = \ ((_lhsIoptions) :: Options) inh_ ->
                            {-# LINE 767 "src-ag/ExecutionPlan2Hs.ag" #-}
                            ppSpaced $ map (\arg ->                    pp $ attrname _lhsIoptions True _LHS arg) $ Set.toList inh_
                            {-# LINE 5312 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule655 #-}
   {-# LINE 768 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule655 = \ ((_lhsIoptions) :: Options) inh_ ->
                            {-# LINE 768 "src-ag/ExecutionPlan2Hs.ag" #-}
                            \chn -> ppSpaced $ map (attrname _lhsIoptions False chn) $ Set.toList inh_
                            {-# LINE 5318 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule656 #-}
   {-# LINE 769 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule656 = \ ((_lhsIoptions) :: Options) syn_ ->
                            {-# LINE 769 "src-ag/ExecutionPlan2Hs.ag" #-}
                            ppSpaced $ map (\arg -> attrname _lhsIoptions False _LHS arg) $ Set.toList syn_
                            {-# LINE 5324 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule657 #-}
   {-# LINE 770 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule657 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->
                             {-# LINE 770 "src-ag/ExecutionPlan2Hs.ag" #-}
                             maybe Map.empty id $ Map.lookup to_ _lhsIallintramap
                             {-# LINE 5330 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule658 #-}
   {-# LINE 771 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule658 = \ _nextargsMp ->
                            {-# LINE 771 "src-ag/ExecutionPlan2Hs.ag" #-}
                            ppSpaced $ Map.keys $ _nextargsMp
                            {-# LINE 5336 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule659 #-}
   {-# LINE 772 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule659 = \ ((_lhsIoptions) :: Options) _nextargs _nextargsMp to_ ->
                            {-# LINE 772 "src-ag/ExecutionPlan2Hs.ag" #-}
                            "st" >|< to_ >#< _nextargs     >#< dummyArg _lhsIoptions (Map.null _nextargsMp    )
                            {-# LINE 5342 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule660 #-}
   {-# LINE 773 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule660 = \ _nameTOut_visit _nextStRef _synargs ->
                            {-# LINE 773 "src-ag/ExecutionPlan2Hs.ag" #-}
                            _nameTOut_visit     >#< _synargs     >#< _nextStRef
                            {-# LINE 5348 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule661 #-}
   {-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule661 = \ _addbang _nextVisitInfo _nextst ->
                {-# LINE 775 "src-ag/ExecutionPlan2Hs.ag" #-}
                case _nextVisitInfo     of
                  NoneVis  -> (empty, empty)
                  _        -> (_addbang     (pp nextStName) >#< "=" >#< _nextst    , pp nextStName)
                {-# LINE 5356 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule662 #-}
   {-# LINE 789 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule662 = \ kind_ ->
                                  {-# LINE 789 "src-ag/ExecutionPlan2Hs.ag" #-}
                                  kind_
                                  {-# LINE 5362 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule663 #-}
   {-# LINE 840 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule663 = \ kind_ ->
                    {-# LINE 840 "src-ag/ExecutionPlan2Hs.ag" #-}
                    case kind_ of
                      VisitPure False -> FormatLetDecl
                      VisitPure True  -> FormatLetLine
                      VisitMonadic    -> FormatDo
                    {-# LINE 5371 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule664 #-}
   {-# LINE 889 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule664 = \  (_ :: ()) ->
                                     {-# LINE 889 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     0
                                     {-# LINE 5377 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule665 #-}
   {-# LINE 896 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule665 = \  (_ :: ()) ->
                                              {-# LINE 896 "src-ag/ExecutionPlan2Hs.ag" #-}
                                              0
                                              {-# LINE 5383 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule666 #-}
   {-# LINE 912 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule666 = \  (_ :: ()) ->
                                           {-# LINE 912 "src-ag/ExecutionPlan2Hs.ag" #-}
                                           False
                                           {-# LINE 5389 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule667 #-}
   {-# LINE 1231 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule667 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->
                           {-# LINE 1231 "src-ag/ExecutionPlan2Hs.ag" #-}
                           Map.findWithDefault ManyVis from_ _lhsInextVisits
                           {-# LINE 5395 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule668 #-}
   {-# LINE 1232 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule668 = \ _invokecode ident_ ->
                        {-# LINE 1232 "src-ag/ExecutionPlan2Hs.ag" #-}
                        Map.singleton ident_ _invokecode
                        {-# LINE 5401 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule669 #-}
   {-# LINE 1233 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule669 = \ _addbang _inhargs ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo from_ ident_ kind_ syn_ to_ ->
                        {-# LINE 1233 "src-ag/ExecutionPlan2Hs.ag" #-}
                        \chn kind ->
                          if kind `compatibleKind` kind_
                          then Right $
                            let pat | isLazyKind kind_ = pat0
                                    | otherwise        = _addbang     pat0
                                pat0  = pp_parens pat1
                                pat1  = _nameTOut_visit     >#< (ppSpaced $ map (attrname _lhsIoptions True chn) $ Set.toList syn_)
                                                            >#< cont
                                cont  = case _nextVisitInfo     of
                                          NoneVis  -> empty
                                          _        -> ch1
                                ch0   = text $ stname chn from_
                                ch1   = text $ stname chn to_
                                expr  = case (kind, kind_) of
                                          (VisitPure _,  VisitPure _)  -> expr0
                                          (VisitPure _,  VisitMonadic) -> unMon _lhsIoptions >#< expr0
                                          (VisitMonadic, VisitPure _)  -> "return" >#< expr0
                                          (VisitMonadic, VisitMonadic) -> expr0
                                expr0 = case _prevVisitInfo     of
                                          NoneVis  -> error "error: invocation of a visit from a state that has no next visits"
                                          OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args
                                          ManyVis  -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0
                                                      >#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args
                                args  = pp_parens args0 >#< args1
                                args0 = _nameTIn_visit     >#< _inhargs     chn
                                args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True
                                      | otherwise                    = empty
                            in (pat, expr)
                          else Left $ IncompatibleVisitKind chn ident_ kind kind_
                        {-# LINE 5435 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule670 #-}
   {-# LINE 1329 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule670 = \ _defsAsMap _nextintra _uses ->
                            {-# LINE 1329 "src-ag/ExecutionPlan2Hs.ag" #-}
                            (_uses     `Map.union` _nextintra    ) `Map.difference` _defsAsMap
                            {-# LINE 5441 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule671 #-}
   {-# LINE 1330 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule671 = \ _thisintra from_ ->
                            {-# LINE 1330 "src-ag/ExecutionPlan2Hs.ag" #-}
                            Map.singleton from_ _thisintra
                            {-# LINE 5447 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule672 #-}
   {-# LINE 1331 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule672 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->
                            {-# LINE 1331 "src-ag/ExecutionPlan2Hs.ag" #-}
                            maybe Map.empty id $ Map.lookup to_ _lhsIallintramap
                            {-# LINE 5453 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule673 #-}
   {-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule673 = \ ((_lhsIoptions) :: Options) ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->
                            {-# LINE 1332 "src-ag/ExecutionPlan2Hs.ag" #-}
                            let mp1 = _stepsIuses
                                mp2 = Map.fromList [ (lhsname _lhsIoptions False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]
                            in mp1 `Map.union` mp2
                            {-# LINE 5461 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule674 #-}
   {-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule674 = \ ((_lhsIoptions) :: Options) inh_ ->
                            {-# LINE 1335 "src-ag/ExecutionPlan2Hs.ag" #-}
                            Set.map (lhsname _lhsIoptions True) inh_
                            {-# LINE 5467 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule675 #-}
   {-# LINE 1336 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule675 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->
                            {-# LINE 1336 "src-ag/ExecutionPlan2Hs.ag" #-}
                            _stepsIdefs `Set.union` _inhVarNms     `Set.union` _lhsIterminaldefs
                            {-# LINE 5473 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule676 #-}
   {-# LINE 1337 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule676 = \ _defs ->
                            {-# LINE 1337 "src-ag/ExecutionPlan2Hs.ag" #-}
                            Map.fromList [ (a, Nothing) | a <- Set.elems _defs     ]
                            {-# LINE 5479 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule677 #-}
   {-# LINE 1361 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule677 = \ ident_ syn_ ->
                            {-# LINE 1361 "src-ag/ExecutionPlan2Hs.ag" #-}
                            Map.singleton ident_ syn_
                            {-# LINE 5485 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule678 #-}
   {-# LINE 1362 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule678 = \ ident_ inh_ ->
                            {-# LINE 1362 "src-ag/ExecutionPlan2Hs.ag" #-}
                            Map.singleton ident_ inh_
                            {-# LINE 5491 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule679 #-}
   {-# LINE 1394 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule679 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->
                        {-# LINE 1394 "src-ag/ExecutionPlan2Hs.ag" #-}
                        case kind_ of
                          VisitPure False -> _inhVarNms     `Set.union` _stepsIdefs
                          _               -> Set.empty
                        {-# LINE 5499 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule680 #-}
   {-# LINE 1397 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule680 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->
                     {-# LINE 1397 "src-ag/ExecutionPlan2Hs.ag" #-}
                     _lazyIntrasInh     `Set.union` _stepsIlazyIntras
                     {-# LINE 5505 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule681 #-}
   {-# LINE 1550 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule681 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1550 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 5511 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule682 #-}
   {-# LINE 1558 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule682 = \ _addbang kind_ ->
                                                     {-# LINE 1558 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                     if isLazyKind kind_ then id else _addbang
                                                     {-# LINE 5517 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule683 #-}
   {-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule683 = \ from_ ident_ to_ ->
                       {-# LINE 1585 "src-ag/ExecutionPlan2Hs.ag" #-}
                       Map.singleton ident_ (from_, to_)
                       {-# LINE 5523 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule684 #-}
   {-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule684 = \ ident_ kind_ ->
                     {-# LINE 1629 "src-ag/ExecutionPlan2Hs.ag" #-}
                     Map.singleton ident_ kind_
                     {-# LINE 5529 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule685 #-}
   rule685 = \ ((_stepsIerrors) :: Seq Error) ->
     _stepsIerrors
   {-# INLINE rule686 #-}
   rule686 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
     _stepsIruleKinds
   {-# INLINE rule687 #-}
   rule687 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
     _stepsIruleUsage
   {-# INLINE rule688 #-}
   rule688 = \ ((_stepsIusedArgs) :: Set String) ->
     _stepsIusedArgs
   {-# INLINE rule689 #-}
   rule689 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule690 #-}
   rule690 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule691 #-}
   rule691 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule692 #-}
   rule692 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule693 #-}
   rule693 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule694 #-}
   rule694 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule695 #-}
   rule695 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
     _lhsIchildTypes
   {-# INLINE rule696 #-}
   rule696 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     _lhsIchildintros
   {-# INLINE rule697 #-}
   rule697 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     _lhsImrules
   {-# INLINE rule698 #-}
   rule698 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule699 #-}
   rule699 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
     _lhsIruledefs
   {-# INLINE rule700 #-}
   rule700 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     _lhsIruleuses

-- VisitStep ---------------------------------------------------
-- wrapper
data Inh_VisitStep  = Inh_VisitStep { Inh_VisitStep -> Map Int (Int, Int)
allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), Inh_VisitStep -> Map Identifier Int
allInitStates_Inh_VisitStep :: (Map NontermIdent Int), Inh_VisitStep -> Map Int VisitKind
allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), Inh_VisitStep
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_VisitStep -> Map Int (Set Identifier)
avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), Inh_VisitStep -> Map Int (Set Identifier)
avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), Inh_VisitStep -> Attributes
childTypes_Inh_VisitStep :: (Map Identifier Type), Inh_VisitStep
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_VisitStep -> FormatMode
fmtMode_Inh_VisitStep :: (FormatMode), Inh_VisitStep -> Int
index_Inh_VisitStep :: (Int), Inh_VisitStep -> Bool
isLast_Inh_VisitStep :: (Bool), Inh_VisitStep -> VisitKind
kind_Inh_VisitStep :: (VisitKind), Inh_VisitStep
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_VisitStep -> Options
options_Inh_VisitStep :: (Options), Inh_VisitStep -> Int
prevMaxSimRefs_Inh_VisitStep :: (Int), Inh_VisitStep -> Map Identifier (Set [Char])
ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), Inh_VisitStep -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_VisitStep -> Bool
useParallel_Inh_VisitStep :: (Bool) }
data Syn_VisitStep  = Syn_VisitStep { Syn_VisitStep -> Set [Char]
defs_Syn_VisitStep :: (Set String), Syn_VisitStep -> Seq Error
errors_Syn_VisitStep :: (Seq Error), Syn_VisitStep -> Int
index_Syn_VisitStep :: (Int), Syn_VisitStep -> Bool
isLast_Syn_VisitStep :: (Bool), Syn_VisitStep -> Set [Char]
lazyIntras_Syn_VisitStep :: (Set String), Syn_VisitStep -> Int
prevMaxSimRefs_Syn_VisitStep :: (Int), Syn_VisitStep -> Map Identifier (Set VisitKind)
ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), Syn_VisitStep -> Map Identifier Int
ruleUsage_Syn_VisitStep :: (Map Identifier Int), Syn_VisitStep -> PP_Doc
sem_steps_Syn_VisitStep :: (PP_Doc), Syn_VisitStep -> PP_Doc
sync_steps_Syn_VisitStep :: (PP_Doc), Syn_VisitStep -> Set [Char]
usedArgs_Syn_VisitStep :: (Set String), Syn_VisitStep -> Map [Char] (Maybe NonLocalAttr)
uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), Syn_VisitStep -> Map Int VisitKind
visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }
{-# INLINABLE wrap_VisitStep #-}
wrap_VisitStep :: T_VisitStep  -> Inh_VisitStep  -> (Syn_VisitStep )
wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> Syn_VisitStep
wrap_VisitStep (T_VisitStep Identity T_VisitStep_s50
act) (Inh_VisitStep Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) =
   Identity Syn_VisitStep -> Syn_VisitStep
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_VisitStep_s50
sem <- Identity T_VisitStep_s50
act
        let arg49 :: T_VisitStep_vIn49
arg49 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> Bool
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitStep_vIn49
T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel
        (T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds) <- T_VisitStep_vOut49 -> Identity T_VisitStep_vOut49
forall (m :: * -> *) a. Monad m => a -> m a
return (T_VisitStep_s50 -> T_VisitStep_v49
inv_VisitStep_s50 T_VisitStep_s50
sem T_VisitStep_vIn49
arg49)
        Syn_VisitStep -> Identity Syn_VisitStep
forall (m :: * -> *) a. Monad m => a -> m a
return (Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> Syn_VisitStep
Syn_VisitStep Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds)
   )

-- cata
{-# NOINLINE sem_VisitStep #-}
sem_VisitStep :: VisitStep  -> T_VisitStep 
sem_VisitStep :: VisitStep -> T_VisitStep
sem_VisitStep ( Sem Identifier
name_ ) = Identifier -> T_VisitStep
sem_VisitStep_Sem Identifier
name_
sem_VisitStep ( ChildVisit Identifier
child_ Identifier
nonterm_ Int
visit_ ) = Identifier -> Identifier -> Int -> T_VisitStep
sem_VisitStep_ChildVisit Identifier
child_ Identifier
nonterm_ Int
visit_
sem_VisitStep ( PureGroup VisitSteps
steps_ Bool
ordered_ ) = T_VisitSteps -> Bool -> T_VisitStep
sem_VisitStep_PureGroup ( VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
steps_ ) Bool
ordered_
sem_VisitStep ( Sim VisitSteps
steps_ ) = T_VisitSteps -> T_VisitStep
sem_VisitStep_Sim ( VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
steps_ )
sem_VisitStep ( ChildIntro Identifier
child_ ) = Identifier -> T_VisitStep
sem_VisitStep_ChildIntro Identifier
child_

-- semantic domain
newtype T_VisitStep  = T_VisitStep {
                                   T_VisitStep -> Identity T_VisitStep_s50
attach_T_VisitStep :: Identity (T_VisitStep_s50 )
                                   }
newtype T_VisitStep_s50  = C_VisitStep_s50 {
                                           T_VisitStep_s50 -> T_VisitStep_v49
inv_VisitStep_s50 :: (T_VisitStep_v49 )
                                           }
data T_VisitStep_s51  = C_VisitStep_s51
type T_VisitStep_v49  = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )
data T_VisitStep_vIn49  = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)
data T_VisitStep_vOut49  = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)
{-# NOINLINE sem_VisitStep_Sem #-}
sem_VisitStep_Sem :: (Identifier) -> T_VisitStep 
sem_VisitStep_Sem :: Identifier -> T_VisitStep
sem_VisitStep_Sem Identifier
arg_name_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
   {-# NOINLINE st50 #-}
   st50 :: T_VisitStep_s50
st50 = let
      v49 :: T_VisitStep_v49 
      v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _ruleItf :: VisitKind -> FormatMode -> Either Error PP_Doc
_ruleItf = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Identifier -> VisitKind -> FormatMode -> Either Error PP_Doc
rule701 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Identifier
arg_name_
         _lhsOerrors :: Seq Error
         (Seq Error
_lhsOerrors,PP_Doc
_sem_steps) = FormatMode
-> VisitKind
-> (VisitKind -> FormatMode -> Either Error PP_Doc)
-> (Seq Error, PP_Doc)
forall a.
FormatMode
-> VisitKind
-> (VisitKind -> FormatMode -> Either a PP_Doc)
-> (Seq a, PP_Doc)
rule702 FormatMode
_lhsIfmtMode VisitKind
_lhsIkind VisitKind -> FormatMode -> Either Error PP_Doc
_ruleItf
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Identifier -> Map Identifier Int
forall k. k -> Map k Int
rule703 Identifier
arg_name_
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = VisitKind -> Identifier -> Map Identifier (Set VisitKind)
forall k. VisitKind -> k -> Map k (Set VisitKind)
rule704 VisitKind
_lhsIkind Identifier
arg_name_
         _lhsOdefs :: Set String
         _lhsOdefs :: Set [Char]
_lhsOdefs = Map Identifier (Set [Char]) -> Identifier -> Set [Char]
rule705 Map Identifier (Set [Char])
_lhsIruledefs Identifier
arg_name_
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         _lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Identifier -> Map [Char] (Maybe NonLocalAttr)
rule706 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Identifier
arg_name_
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule707  ()
         _lhsOsem_steps :: PP_Doc
         _lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc
forall a. a -> a
rule708 PP_Doc
_sem_steps
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = () -> PP_Doc
rule709  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule710  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule711  ()
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule712 Int
_lhsIindex
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule713 Bool
_lhsIisLast
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule714 Int
_lhsIprevMaxSimRefs
         __result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitStep_vOut49
__result_ )
     in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
   {-# INLINE rule701 #-}
   {-# LINE 798 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule701 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) name_ ->
                               {-# LINE 798 "src-ag/ExecutionPlan2Hs.ag" #-}
                               Map.findWithDefault (error $ "Rule "  ++ show name_  ++ " not found") name_ _lhsImrules
                               {-# LINE 5655 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule702 #-}
   {-# LINE 799 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule702 = \ ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _ruleItf ->
                                               {-# LINE 799 "src-ag/ExecutionPlan2Hs.ag" #-}
                                               case _ruleItf     _lhsIkind _lhsIfmtMode of
                                                 Left e     -> (Seq.singleton e, empty)
                                                 Right stmt -> (Seq.empty, stmt)
                                               {-# LINE 5663 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule703 #-}
   {-# LINE 1282 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule703 = \ name_ ->
                                                 {-# LINE 1282 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                 Map.singleton name_ 1
                                                 {-# LINE 5669 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule704 #-}
   {-# LINE 1292 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule704 = \ ((_lhsIkind) :: VisitKind) name_ ->
                    {-# LINE 1292 "src-ag/ExecutionPlan2Hs.ag" #-}
                    Map.singleton name_ (Set.singleton _lhsIkind)
                    {-# LINE 5675 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule705 #-}
   {-# LINE 1377 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule705 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->
                            {-# LINE 1377 "src-ag/ExecutionPlan2Hs.ag" #-}
                            maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs
                            {-# LINE 5681 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule706 #-}
   {-# LINE 1378 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule706 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->
                            {-# LINE 1378 "src-ag/ExecutionPlan2Hs.ag" #-}
                            maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses
                            {-# LINE 5687 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule707 #-}
   rule707 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule708 #-}
   rule708 = \ _sem_steps ->
     _sem_steps
   {-# INLINE rule709 #-}
   rule709 = \  (_ :: ()) ->
     empty
   {-# INLINE rule710 #-}
   rule710 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule711 #-}
   rule711 = \  (_ :: ()) ->
     mempty
   {-# INLINE rule712 #-}
   rule712 = \ ((_lhsIindex) :: Int) ->
     _lhsIindex
   {-# INLINE rule713 #-}
   rule713 = \ ((_lhsIisLast) :: Bool) ->
     _lhsIisLast
   {-# INLINE rule714 #-}
   rule714 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs
{-# NOINLINE sem_VisitStep_ChildVisit #-}
sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep 
sem_VisitStep_ChildVisit :: Identifier -> Identifier -> Int -> T_VisitStep
sem_VisitStep_ChildVisit Identifier
arg_child_ Identifier
_ Int
arg_visit_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
   {-# NOINLINE st50 #-}
   st50 :: T_VisitStep_s50
st50 = let
      v49 :: T_VisitStep_v49 
      v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _visitItf :: Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_visitItf = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Int -> Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
rule715 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Int
arg_visit_
         _lhsOerrors :: Seq Error
         (Seq Error
_lhsOerrors,PP_Doc
_patPP,PP_Doc
_exprPP) = VisitKind
-> (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Identifier
-> (Seq Error, PP_Doc, PP_Doc)
forall t a.
VisitKind
-> (t -> VisitKind -> Either a (PP_Doc, PP_Doc))
-> t
-> (Seq a, PP_Doc, PP_Doc)
rule716 VisitKind
_lhsIkind Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc)
_visitItf Identifier
arg_child_
         _useParallel :: Bool
_useParallel = Bool -> Bool -> Bool
rule717 Bool
_lhsIisLast Bool
_lhsIuseParallel
         _lhsOsem_steps :: PP_Doc
         _lhsOsem_steps :: PP_Doc
_lhsOsem_steps = (PP_Doc -> PP_Doc)
-> PP_Doc
-> PP_Doc
-> FormatMode
-> Int
-> VisitKind
-> PP_Doc
-> Bool
-> PP_Doc
rule718 PP_Doc -> PP_Doc
_addbang PP_Doc
_convToMonad PP_Doc
_exprPP FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind PP_Doc
_patPP Bool
_useParallel
         _convToMonad :: PP_Doc
_convToMonad = VisitKind -> PP_Doc
rule719 VisitKind
_callKind
         _callKind :: VisitKind
_callKind = Map Int VisitKind -> Int -> VisitKind
rule720 Map Int VisitKind
_lhsIallVisitKinds Int
arg_visit_
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = Int -> PP_Doc -> Bool -> PP_Doc
rule721 Int
_lhsIindex PP_Doc
_patPP Bool
_useParallel
         _lhsOdefs :: Set String
         _lhsOdefs :: Set [Char]
_lhsOdefs = Map Int (Set Identifier)
-> Options -> Int -> Identifier -> Int -> Set [Char]
rule722 Map Int (Set Identifier)
_lhsIavisitdefs Options
_lhsIoptions Int
_to Identifier
arg_child_ Int
arg_visit_
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         _lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Int
-> Map Int (Set Identifier)
-> Options
-> Identifier
-> Int
-> Map [Char] (Maybe NonLocalAttr)
rule723 Int
_from Map Int (Set Identifier)
_lhsIavisituses Options
_lhsIoptions Identifier
arg_child_ Int
arg_visit_
         _addbang :: PP_Doc -> PP_Doc
_addbang = Options -> PP_Doc -> PP_Doc
rule724 Options
_lhsIoptions
         (Int
_from,Int
_to) = Map Int (Int, Int) -> Int -> (Int, Int)
rule725 Map Int (Int, Int)
_lhsIallFromToStates Int
arg_visit_
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule726  ()
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule727  ()
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule728  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule729  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule730  ()
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule731 Int
_lhsIindex
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule732 Bool
_lhsIisLast
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule733 Int
_lhsIprevMaxSimRefs
         __result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitStep_vOut49
__result_ )
     in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
   {-# INLINE rule715 #-}
   {-# LINE 807 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule715 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) visit_ ->
                                {-# LINE 807 "src-ag/ExecutionPlan2Hs.ag" #-}
                                Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit
                                {-# LINE 5759 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule716 #-}
   {-# LINE 808 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule716 = \ ((_lhsIkind) :: VisitKind) _visitItf child_ ->
                                                       {-# LINE 808 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                       case _visitItf     child_ _lhsIkind of
                                                         Left e           -> (Seq.singleton e, empty, empty)
                                                         Right (pat,expr) -> (Seq.empty, pat, expr)
                                                       {-# LINE 5767 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule717 #-}
   {-# LINE 812 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule717 = \ ((_lhsIisLast) :: Bool) ((_lhsIuseParallel) :: Bool) ->
                                   {-# LINE 812 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   _lhsIuseParallel && not _lhsIisLast
                                   {-# LINE 5773 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule718 #-}
   {-# LINE 813 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule718 = \ _addbang _convToMonad _exprPP ((_lhsIfmtMode) :: FormatMode) ((_lhsIindex) :: Int) ((_lhsIkind) :: VisitKind) _patPP _useParallel ->
                                 {-# LINE 813 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 if _useParallel
                                 then _addbang     ("sync_" >|< _lhsIindex) >#< "<- newEmptyMVar"
                                      >-< "forkIO" >#< pp_parens (_convToMonad     >#< pp_parens _exprPP     >#< ">>= \\" >#< _addbang     (pp parResultName) >#< " -> putMVar sync_" >|< _lhsIindex >#< parResultName)
                                 else let decl = case _lhsIkind of
                                                   VisitPure _  -> _patPP     >#< "=" >#< _exprPP
                                                   VisitMonadic -> _patPP     >#< "<-" >#< _exprPP
                                      in fmtDecl False _lhsIfmtMode decl
                                 {-# LINE 5785 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule719 #-}
   {-# LINE 820 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule719 = \ _callKind ->
                                   {-# LINE 820 "src-ag/ExecutionPlan2Hs.ag" #-}
                                   case _callKind     of
                                     VisitPure _  -> text "return"
                                     VisitMonadic -> empty
                                   {-# LINE 5793 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule720 #-}
   {-# LINE 823 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule720 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) visit_ ->
                                 {-# LINE 823 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds
                                 {-# LINE 5799 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule721 #-}
   {-# LINE 831 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule721 = \ ((_lhsIindex) :: Int) _patPP _useParallel ->
                     {-# LINE 831 "src-ag/ExecutionPlan2Hs.ag" #-}
                     if _useParallel
                     then _patPP     >#< "<-" >#< "takeMVar sync_" >|< _lhsIindex
                     else empty
                     {-# LINE 5807 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule722 #-}
   {-# LINE 1379 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule722 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) _to child_ visit_ ->
                            {-# LINE 1379 "src-ag/ExecutionPlan2Hs.ag" #-}
                            Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname _lhsIoptions True child_) $ Map.lookup visit_ _lhsIavisitdefs
                            {-# LINE 5813 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule723 #-}
   {-# LINE 1380 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule723 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) child_ visit_ ->
                            {-# LINE 1380 "src-ag/ExecutionPlan2Hs.ag" #-}
                            let convert attrs = Map.fromList [ (attrname _lhsIoptions False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]
                            in Map.insert (stname child_ _from) Nothing $ convert $
                                 maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses
                            {-# LINE 5821 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule724 #-}
   {-# LINE 1555 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule724 = \ ((_lhsIoptions) :: Options) ->
                                                    {-# LINE 1555 "src-ag/ExecutionPlan2Hs.ag" #-}
                                                    \x -> if bangpats _lhsIoptions then "!" >|< x else x
                                                    {-# LINE 5827 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule725 #-}
   {-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule725 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->
                         {-# LINE 1591 "src-ag/ExecutionPlan2Hs.ag" #-}
                         Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates
                         {-# LINE 5833 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule726 #-}
   rule726 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule727 #-}
   rule727 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule728 #-}
   rule728 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule729 #-}
   rule729 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule730 #-}
   rule730 = \  (_ :: ()) ->
     mempty
   {-# INLINE rule731 #-}
   rule731 = \ ((_lhsIindex) :: Int) ->
     _lhsIindex
   {-# INLINE rule732 #-}
   rule732 = \ ((_lhsIisLast) :: Bool) ->
     _lhsIisLast
   {-# INLINE rule733 #-}
   rule733 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs
{-# NOINLINE sem_VisitStep_PureGroup #-}
sem_VisitStep_PureGroup :: T_VisitSteps  -> (Bool) -> T_VisitStep 
sem_VisitStep_PureGroup :: T_VisitSteps -> Bool -> T_VisitStep
sem_VisitStep_PureGroup T_VisitSteps
arg_steps_ Bool
arg_ordered_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
   {-# NOINLINE st50 #-}
   st50 :: T_VisitStep_s50
st50 = let
      v49 :: T_VisitStep_v49 
      v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _stepsX53 :: T_VisitSteps_s53
_stepsX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_steps_))
         (T_VisitSteps_vOut52 Set [Char]
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set [Char]
_stepsIlazyIntras Int
_stepsIprevMaxSimRefs Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize PP_Doc
_stepsIsync_steps Set [Char]
_stepsIusedArgs Map [Char] (Maybe NonLocalAttr)
_stepsIuses Map Int VisitKind
_stepsIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_stepsX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros FormatMode
_stepsOfmtMode Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Int
_stepsOprevMaxSimRefs Map Identifier (Set [Char])
_stepsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses Bool
_stepsOuseParallel)
         _stepsOkind :: VisitKind
_stepsOkind = Bool -> VisitKind
rule734 Bool
arg_ordered_
         _lhsOsem_steps :: PP_Doc
         _lhsOsem_steps :: PP_Doc
_lhsOsem_steps = FormatMode -> PP_Doc -> PP_Doc
rule735 FormatMode
_lhsIfmtMode PP_Doc
_stepsIsem_steps
         _stepsOfmtMode :: FormatMode
_stepsOfmtMode = FormatMode -> FormatMode
rule736 FormatMode
_lhsIfmtMode
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Bool -> Set [Char]
rule737 Set [Char]
_stepsIdefs Set [Char]
_stepsIlazyIntras Bool
arg_ordered_
         _lhsOdefs :: Set String
         _lhsOdefs :: Set [Char]
_lhsOdefs = Set [Char] -> Set [Char]
rule738 Set [Char]
_stepsIdefs
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule739 Seq Error
_stepsIerrors
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule740 Map Identifier (Set VisitKind)
_stepsIruleKinds
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule741 Map Identifier Int
_stepsIruleUsage
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = PP_Doc -> PP_Doc
rule742 PP_Doc
_stepsIsync_steps
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char]
rule743 Set [Char]
_stepsIusedArgs
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         _lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map [Char] (Maybe NonLocalAttr) -> Map [Char] (Maybe NonLocalAttr)
rule744 Map [Char] (Maybe NonLocalAttr)
_stepsIuses
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule745 Map Int VisitKind
_stepsIvisitKinds
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule746 Int
_stepsIindex
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule747 Bool
_stepsIisLast
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule748 Int
_stepsIprevMaxSimRefs
         _stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule749 Map Int (Int, Int)
_lhsIallFromToStates
         _stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule750 Map Identifier Int
_lhsIallInitStates
         _stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule751 Map Int VisitKind
_lhsIallVisitKinds
         _stepsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule752 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule753 Map Int (Set Identifier)
_lhsIavisitdefs
         _stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule754 Map Int (Set Identifier)
_lhsIavisituses
         _stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule755 Attributes
_lhsIchildTypes
         _stepsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule756 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _stepsOindex :: Int
_stepsOindex = Int -> Int
rule757 Int
_lhsIindex
         _stepsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule758 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule759 Options
_lhsIoptions
         _stepsOprevMaxSimRefs :: Int
_stepsOprevMaxSimRefs = Int -> Int
rule760 Int
_lhsIprevMaxSimRefs
         _stepsOruledefs :: Map Identifier (Set [Char])
_stepsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule761 Map Identifier (Set [Char])
_lhsIruledefs
         _stepsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule762 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         _stepsOuseParallel :: Bool
_stepsOuseParallel = Bool -> Bool
rule763 Bool
_lhsIuseParallel
         __result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitStep_vOut49
__result_ )
     in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
   {-# INLINE rule734 #-}
   {-# LINE 793 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule734 = \ ordered_ ->
                 {-# LINE 793 "src-ag/ExecutionPlan2Hs.ag" #-}
                 VisitPure ordered_
                 {-# LINE 5918 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule735 #-}
   {-# LINE 825 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule735 = \ ((_lhsIfmtMode) :: FormatMode) ((_stepsIsem_steps) :: PP_Doc) ->
                                 {-# LINE 825 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 case _lhsIfmtMode of
                                   FormatDo -> "let" >#< _stepsIsem_steps
                                   _        -> _stepsIsem_steps
                                 {-# LINE 5926 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule736 #-}
   {-# LINE 846 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule736 = \ ((_lhsIfmtMode) :: FormatMode) ->
                    {-# LINE 846 "src-ag/ExecutionPlan2Hs.ag" #-}
                    case _lhsIfmtMode of
                      FormatDo      -> FormatLetDecl
                      mode          -> mode
                    {-# LINE 5934 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule737 #-}
   {-# LINE 1400 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule737 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->
                     {-# LINE 1400 "src-ag/ExecutionPlan2Hs.ag" #-}
                     if ordered_
                     then _stepsIlazyIntras
                     else _stepsIdefs
                     {-# LINE 5942 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule738 #-}
   rule738 = \ ((_stepsIdefs) :: Set String) ->
     _stepsIdefs
   {-# INLINE rule739 #-}
   rule739 = \ ((_stepsIerrors) :: Seq Error) ->
     _stepsIerrors
   {-# INLINE rule740 #-}
   rule740 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
     _stepsIruleKinds
   {-# INLINE rule741 #-}
   rule741 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
     _stepsIruleUsage
   {-# INLINE rule742 #-}
   rule742 = \ ((_stepsIsync_steps) :: PP_Doc) ->
     _stepsIsync_steps
   {-# INLINE rule743 #-}
   rule743 = \ ((_stepsIusedArgs) :: Set String) ->
     _stepsIusedArgs
   {-# INLINE rule744 #-}
   rule744 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->
     _stepsIuses
   {-# INLINE rule745 #-}
   rule745 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     _stepsIvisitKinds
   {-# INLINE rule746 #-}
   rule746 = \ ((_stepsIindex) :: Int) ->
     _stepsIindex
   {-# INLINE rule747 #-}
   rule747 = \ ((_stepsIisLast) :: Bool) ->
     _stepsIisLast
   {-# INLINE rule748 #-}
   rule748 = \ ((_stepsIprevMaxSimRefs) :: Int) ->
     _stepsIprevMaxSimRefs
   {-# INLINE rule749 #-}
   rule749 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule750 #-}
   rule750 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule751 #-}
   rule751 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule752 #-}
   rule752 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule753 #-}
   rule753 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule754 #-}
   rule754 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule755 #-}
   rule755 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
     _lhsIchildTypes
   {-# INLINE rule756 #-}
   rule756 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     _lhsIchildintros
   {-# INLINE rule757 #-}
   rule757 = \ ((_lhsIindex) :: Int) ->
     _lhsIindex
   {-# INLINE rule758 #-}
   rule758 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     _lhsImrules
   {-# INLINE rule759 #-}
   rule759 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule760 #-}
   rule760 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs
   {-# INLINE rule761 #-}
   rule761 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
     _lhsIruledefs
   {-# INLINE rule762 #-}
   rule762 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     _lhsIruleuses
   {-# INLINE rule763 #-}
   rule763 = \ ((_lhsIuseParallel) :: Bool) ->
     _lhsIuseParallel
{-# NOINLINE sem_VisitStep_Sim #-}
sem_VisitStep_Sim :: T_VisitSteps  -> T_VisitStep 
sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep
sem_VisitStep_Sim T_VisitSteps
arg_steps_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
   {-# NOINLINE st50 #-}
   st50 :: T_VisitStep_s50
st50 = let
      v49 :: T_VisitStep_v49 
      v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _stepsX53 :: T_VisitSteps_s53
_stepsX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_steps_))
         (T_VisitSteps_vOut52 Set [Char]
_stepsIdefs Seq Error
_stepsIerrors Int
_stepsIindex Bool
_stepsIisLast Set [Char]
_stepsIlazyIntras Int
_stepsIprevMaxSimRefs Map Identifier (Set VisitKind)
_stepsIruleKinds Map Identifier Int
_stepsIruleUsage PP_Doc
_stepsIsem_steps Int
_stepsIsize PP_Doc
_stepsIsync_steps Set [Char]
_stepsIusedArgs Map [Char] (Maybe NonLocalAttr)
_stepsIuses Map Int VisitKind
_stepsIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_stepsX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_stepsOallFromToStates Map Identifier Int
_stepsOallInitStates Map Int VisitKind
_stepsOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit Map Int (Set Identifier)
_stepsOavisitdefs Map Int (Set Identifier)
_stepsOavisituses Attributes
_stepsOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros FormatMode
_stepsOfmtMode Int
_stepsOindex VisitKind
_stepsOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules Options
_stepsOoptions Int
_stepsOprevMaxSimRefs Map Identifier (Set [Char])
_stepsOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses Bool
_stepsOuseParallel)
         _lhsOsem_steps :: PP_Doc
         _lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc -> PP_Doc
rule764 PP_Doc
_stepsIsem_steps PP_Doc
_stepsIsync_steps
         _stepsOindex :: Int
_stepsOindex = () -> Int
rule765  ()
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule766 Int
_lhsIindex
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int -> Bool -> Int
rule767 Int
_lhsIprevMaxSimRefs Int
_stepsIindex Bool
_useParallel
         _useParallel :: Bool
_useParallel = Bool -> Options -> Int -> Bool
rule768 Bool
_isMonadic Options
_lhsIoptions Int
_stepsIsize
         _isMonadic :: Bool
_isMonadic = VisitKind -> Bool
rule769 VisitKind
_lhsIkind
         _lhsOdefs :: Set String
         _lhsOdefs :: Set [Char]
_lhsOdefs = Set [Char] -> Set [Char]
rule770 Set [Char]
_stepsIdefs
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule771 Seq Error
_stepsIerrors
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char]
rule772 Set [Char]
_stepsIlazyIntras
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule773 Map Identifier (Set VisitKind)
_stepsIruleKinds
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int
rule774 Map Identifier Int
_stepsIruleUsage
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = PP_Doc -> PP_Doc
rule775 PP_Doc
_stepsIsync_steps
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char]
rule776 Set [Char]
_stepsIusedArgs
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         _lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map [Char] (Maybe NonLocalAttr) -> Map [Char] (Maybe NonLocalAttr)
rule777 Map [Char] (Maybe NonLocalAttr)
_stepsIuses
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind
rule778 Map Int VisitKind
_stepsIvisitKinds
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule779 Bool
_stepsIisLast
         _stepsOallFromToStates :: Map Int (Int, Int)
_stepsOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule780 Map Int (Int, Int)
_lhsIallFromToStates
         _stepsOallInitStates :: Map Identifier Int
_stepsOallInitStates = Map Identifier Int -> Map Identifier Int
rule781 Map Identifier Int
_lhsIallInitStates
         _stepsOallVisitKinds :: Map Int VisitKind
_stepsOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule782 Map Int VisitKind
_lhsIallVisitKinds
         _stepsOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_stepsOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule783 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _stepsOavisitdefs :: Map Int (Set Identifier)
_stepsOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule784 Map Int (Set Identifier)
_lhsIavisitdefs
         _stepsOavisituses :: Map Int (Set Identifier)
_stepsOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule785 Map Int (Set Identifier)
_lhsIavisituses
         _stepsOchildTypes :: Attributes
_stepsOchildTypes = Attributes -> Attributes
rule786 Attributes
_lhsIchildTypes
         _stepsOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_stepsOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule787 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _stepsOfmtMode :: FormatMode
_stepsOfmtMode = FormatMode -> FormatMode
rule788 FormatMode
_lhsIfmtMode
         _stepsOkind :: VisitKind
_stepsOkind = VisitKind -> VisitKind
rule789 VisitKind
_lhsIkind
         _stepsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_stepsOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule790 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _stepsOoptions :: Options
_stepsOoptions = Options -> Options
rule791 Options
_lhsIoptions
         _stepsOprevMaxSimRefs :: Int
_stepsOprevMaxSimRefs = Int -> Int
rule792 Int
_lhsIprevMaxSimRefs
         _stepsOruledefs :: Map Identifier (Set [Char])
_stepsOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule793 Map Identifier (Set [Char])
_lhsIruledefs
         _stepsOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_stepsOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule794 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         _stepsOuseParallel :: Bool
_stepsOuseParallel = Bool -> Bool
forall a. a -> a
rule795 Bool
_useParallel
         __result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitStep_vOut49
__result_ )
     in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
   {-# INLINE rule764 #-}
   {-# LINE 824 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule764 = \ ((_stepsIsem_steps) :: PP_Doc) ((_stepsIsync_steps) :: PP_Doc) ->
                                 {-# LINE 824 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 _stepsIsem_steps >-< _stepsIsync_steps
                                 {-# LINE 6083 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule765 #-}
   {-# LINE 890 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule765 = \  (_ :: ()) ->
                                     {-# LINE 890 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     0
                                     {-# LINE 6089 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule766 #-}
   {-# LINE 891 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule766 = \ ((_lhsIindex) :: Int) ->
                                     {-# LINE 891 "src-ag/ExecutionPlan2Hs.ag" #-}
                                     _lhsIindex
                                     {-# LINE 6095 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule767 #-}
   {-# LINE 898 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule767 = \ ((_lhsIprevMaxSimRefs) :: Int) ((_stepsIindex) :: Int) _useParallel ->
                         {-# LINE 898 "src-ag/ExecutionPlan2Hs.ag" #-}
                         if _useParallel
                         then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)
                         else _lhsIprevMaxSimRefs
                         {-# LINE 6103 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule768 #-}
   {-# LINE 913 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule768 = \ _isMonadic ((_lhsIoptions) :: Options) ((_stepsIsize) :: Int) ->
                                         {-# LINE 913 "src-ag/ExecutionPlan2Hs.ag" #-}
                                         parallelInvoke _lhsIoptions && _stepsIsize > 1 && _isMonadic
                                         {-# LINE 6109 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule769 #-}
   {-# LINE 914 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule769 = \ ((_lhsIkind) :: VisitKind) ->
                                         {-# LINE 914 "src-ag/ExecutionPlan2Hs.ag" #-}
                                         case _lhsIkind of
                                           VisitMonadic -> True
                                           _            -> False
                                         {-# LINE 6117 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule770 #-}
   rule770 = \ ((_stepsIdefs) :: Set String) ->
     _stepsIdefs
   {-# INLINE rule771 #-}
   rule771 = \ ((_stepsIerrors) :: Seq Error) ->
     _stepsIerrors
   {-# INLINE rule772 #-}
   rule772 = \ ((_stepsIlazyIntras) :: Set String) ->
     _stepsIlazyIntras
   {-# INLINE rule773 #-}
   rule773 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->
     _stepsIruleKinds
   {-# INLINE rule774 #-}
   rule774 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->
     _stepsIruleUsage
   {-# INLINE rule775 #-}
   rule775 = \ ((_stepsIsync_steps) :: PP_Doc) ->
     _stepsIsync_steps
   {-# INLINE rule776 #-}
   rule776 = \ ((_stepsIusedArgs) :: Set String) ->
     _stepsIusedArgs
   {-# INLINE rule777 #-}
   rule777 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->
     _stepsIuses
   {-# INLINE rule778 #-}
   rule778 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     _stepsIvisitKinds
   {-# INLINE rule779 #-}
   rule779 = \ ((_stepsIisLast) :: Bool) ->
     _stepsIisLast
   {-# INLINE rule780 #-}
   rule780 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule781 #-}
   rule781 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule782 #-}
   rule782 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule783 #-}
   rule783 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule784 #-}
   rule784 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule785 #-}
   rule785 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule786 #-}
   rule786 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
     _lhsIchildTypes
   {-# INLINE rule787 #-}
   rule787 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     _lhsIchildintros
   {-# INLINE rule788 #-}
   rule788 = \ ((_lhsIfmtMode) :: FormatMode) ->
     _lhsIfmtMode
   {-# INLINE rule789 #-}
   rule789 = \ ((_lhsIkind) :: VisitKind) ->
     _lhsIkind
   {-# INLINE rule790 #-}
   rule790 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     _lhsImrules
   {-# INLINE rule791 #-}
   rule791 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule792 #-}
   rule792 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs
   {-# INLINE rule793 #-}
   rule793 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
     _lhsIruledefs
   {-# INLINE rule794 #-}
   rule794 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     _lhsIruleuses
   {-# INLINE rule795 #-}
   rule795 = \ _useParallel ->
     _useParallel
{-# NOINLINE sem_VisitStep_ChildIntro #-}
sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep 
sem_VisitStep_ChildIntro :: Identifier -> T_VisitStep
sem_VisitStep_ChildIntro Identifier
arg_child_ = Identity T_VisitStep_s50 -> T_VisitStep
T_VisitStep (T_VisitStep_s50 -> Identity T_VisitStep_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitStep_s50
st50) where
   {-# NOINLINE st50 #-}
   st50 :: T_VisitStep_s50
st50 = let
      v49 :: T_VisitStep_v49 
      v49 :: T_VisitStep_v49
v49 = \ (T_VisitStep_vIn49 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex Bool
_lhsIisLast VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _attachItf :: VisitKind
-> FormatMode
-> Either
     Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_attachItf = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> VisitKind
-> FormatMode
-> Either
     Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
rule796 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
arg_child_
         _lhsOerrors :: Seq Error
         _lhsOsem_steps :: PP_Doc
         _lhsOdefs :: Set String
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         (Seq Error
_lhsOerrors,PP_Doc
_lhsOsem_steps,Set [Char]
_lhsOdefs,Map [Char] (Maybe NonLocalAttr)
_lhsOuses) = (VisitKind
 -> FormatMode
 -> Either
      Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> VisitKind
-> (Seq Error, PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
forall a a k a.
(VisitKind -> FormatMode -> Either a (PP_Doc, Set a, Map k a))
-> FormatMode -> VisitKind -> (Seq a, PP_Doc, Set a, Map k a)
rule797 VisitKind
-> FormatMode
-> Either
     Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr))
_attachItf FormatMode
_lhsIfmtMode VisitKind
_lhsIkind
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule798  ()
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule799  ()
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule800  ()
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = () -> PP_Doc
rule801  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule802  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule803  ()
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule804 Int
_lhsIindex
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = Bool -> Bool
rule805 Bool
_lhsIisLast
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule806 Int
_lhsIprevMaxSimRefs
         __result_ :: T_VisitStep_vOut49
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitStep_vOut49
T_VisitStep_vOut49 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitStep_vOut49
__result_ )
     in T_VisitStep_v49 -> T_VisitStep_s50
C_VisitStep_s50 T_VisitStep_v49
v49
   {-# INLINE rule796 #-}
   {-# LINE 802 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule796 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->
                                 {-# LINE 802 "src-ag/ExecutionPlan2Hs.ag" #-}
                                 Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros
                                 {-# LINE 6235 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule797 #-}
   {-# LINE 804 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule797 = \ _attachItf ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) ->
                     {-# LINE 804 "src-ag/ExecutionPlan2Hs.ag" #-}
                     case _attachItf     _lhsIkind _lhsIfmtMode of
                       Left e                   -> (Seq.singleton e, empty, Set.empty, Map.empty)
                       Right (code, defs, uses) -> (Seq.empty, code, defs, uses)
                     {-# LINE 6243 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule798 #-}
   rule798 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule799 #-}
   rule799 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule800 #-}
   rule800 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule801 #-}
   rule801 = \  (_ :: ()) ->
     empty
   {-# INLINE rule802 #-}
   rule802 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule803 #-}
   rule803 = \  (_ :: ()) ->
     mempty
   {-# INLINE rule804 #-}
   rule804 = \ ((_lhsIindex) :: Int) ->
     _lhsIindex
   {-# INLINE rule805 #-}
   rule805 = \ ((_lhsIisLast) :: Bool) ->
     _lhsIisLast
   {-# INLINE rule806 #-}
   rule806 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs

-- VisitSteps --------------------------------------------------
-- wrapper
data Inh_VisitSteps  = Inh_VisitSteps { Inh_VisitSteps -> Map Int (Int, Int)
allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), Inh_VisitSteps -> Map Identifier Int
allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), Inh_VisitSteps -> Map Int VisitKind
allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), Inh_VisitSteps
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_VisitSteps -> Map Int (Set Identifier)
avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), Inh_VisitSteps -> Map Int (Set Identifier)
avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), Inh_VisitSteps -> Attributes
childTypes_Inh_VisitSteps :: (Map Identifier Type), Inh_VisitSteps
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_VisitSteps -> FormatMode
fmtMode_Inh_VisitSteps :: (FormatMode), Inh_VisitSteps -> Int
index_Inh_VisitSteps :: (Int), Inh_VisitSteps -> VisitKind
kind_Inh_VisitSteps :: (VisitKind), Inh_VisitSteps
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_VisitSteps -> Options
options_Inh_VisitSteps :: (Options), Inh_VisitSteps -> Int
prevMaxSimRefs_Inh_VisitSteps :: (Int), Inh_VisitSteps -> Map Identifier (Set [Char])
ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), Inh_VisitSteps -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_VisitSteps -> Bool
useParallel_Inh_VisitSteps :: (Bool) }
data Syn_VisitSteps  = Syn_VisitSteps { Syn_VisitSteps -> Set [Char]
defs_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Seq Error
errors_Syn_VisitSteps :: (Seq Error), Syn_VisitSteps -> Int
index_Syn_VisitSteps :: (Int), Syn_VisitSteps -> Bool
isLast_Syn_VisitSteps :: (Bool), Syn_VisitSteps -> Set [Char]
lazyIntras_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Int
prevMaxSimRefs_Syn_VisitSteps :: (Int), Syn_VisitSteps -> Map Identifier (Set VisitKind)
ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), Syn_VisitSteps -> Map Identifier Int
ruleUsage_Syn_VisitSteps :: (Map Identifier Int), Syn_VisitSteps -> PP_Doc
sem_steps_Syn_VisitSteps :: (PP_Doc), Syn_VisitSteps -> Int
size_Syn_VisitSteps :: (Int), Syn_VisitSteps -> PP_Doc
sync_steps_Syn_VisitSteps :: (PP_Doc), Syn_VisitSteps -> Set [Char]
usedArgs_Syn_VisitSteps :: (Set String), Syn_VisitSteps -> Map [Char] (Maybe NonLocalAttr)
uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), Syn_VisitSteps -> Map Int VisitKind
visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }
{-# INLINABLE wrap_VisitSteps #-}
wrap_VisitSteps :: T_VisitSteps  -> Inh_VisitSteps  -> (Syn_VisitSteps )
wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> Syn_VisitSteps
wrap_VisitSteps (T_VisitSteps Identity T_VisitSteps_s53
act) (Inh_VisitSteps Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) =
   Identity Syn_VisitSteps -> Syn_VisitSteps
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_VisitSteps_s53
sem <- Identity T_VisitSteps_s53
act
        let arg52 :: T_VisitSteps_vIn52
arg52 = Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel
        (T_VisitSteps_vOut52 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds) <- T_VisitSteps_vOut52 -> Identity T_VisitSteps_vOut52
forall (m :: * -> *) a. Monad m => a -> m a
return (T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
sem T_VisitSteps_vIn52
arg52)
        Syn_VisitSteps -> Identity Syn_VisitSteps
forall (m :: * -> *) a. Monad m => a -> m a
return (Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> Syn_VisitSteps
Syn_VisitSteps Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds)
   )

-- cata
{-# NOINLINE sem_VisitSteps #-}
sem_VisitSteps :: VisitSteps  -> T_VisitSteps 
sem_VisitSteps :: VisitSteps -> T_VisitSteps
sem_VisitSteps VisitSteps
list = (T_VisitStep -> T_VisitSteps -> T_VisitSteps)
-> T_VisitSteps -> [T_VisitStep] -> T_VisitSteps
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_VisitStep -> T_VisitSteps -> T_VisitSteps
sem_VisitSteps_Cons T_VisitSteps
sem_VisitSteps_Nil ((VisitStep -> T_VisitStep) -> VisitSteps -> [T_VisitStep]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map VisitStep -> T_VisitStep
sem_VisitStep VisitSteps
list)

-- semantic domain
newtype T_VisitSteps  = T_VisitSteps {
                                     T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )
                                     }
newtype T_VisitSteps_s53  = C_VisitSteps_s53 {
                                             T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 :: (T_VisitSteps_v52 )
                                             }
data T_VisitSteps_s54  = C_VisitSteps_s54
type T_VisitSteps_v52  = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )
data T_VisitSteps_vIn52  = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)
data T_VisitSteps_vOut52  = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)
{-# NOINLINE sem_VisitSteps_Cons #-}
sem_VisitSteps_Cons :: T_VisitStep  -> T_VisitSteps  -> T_VisitSteps 
sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps
sem_VisitSteps_Cons T_VisitStep
arg_hd_ T_VisitSteps
arg_tl_ = Identity T_VisitSteps_s53 -> T_VisitSteps
T_VisitSteps (T_VisitSteps_s53 -> Identity T_VisitSteps_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitSteps_s53
st53) where
   {-# NOINLINE st53 #-}
   st53 :: T_VisitSteps_s53
st53 = let
      v52 :: T_VisitSteps_v52 
      v52 :: T_VisitSteps_v52
v52 = \ (T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _hdX50 :: T_VisitStep_s50
_hdX50 = Identity T_VisitStep_s50 -> T_VisitStep_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitStep -> Identity T_VisitStep_s50
attach_T_VisitStep (T_VisitStep
arg_hd_))
         _tlX53 :: T_VisitSteps_s53
_tlX53 = Identity T_VisitSteps_s53 -> T_VisitSteps_s53
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_VisitSteps -> Identity T_VisitSteps_s53
attach_T_VisitSteps (T_VisitSteps
arg_tl_))
         (T_VisitStep_vOut49 Set [Char]
_hdIdefs Seq Error
_hdIerrors Int
_hdIindex Bool
_hdIisLast Set [Char]
_hdIlazyIntras Int
_hdIprevMaxSimRefs Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier Int
_hdIruleUsage PP_Doc
_hdIsem_steps PP_Doc
_hdIsync_steps Set [Char]
_hdIusedArgs Map [Char] (Maybe NonLocalAttr)
_hdIuses Map Int VisitKind
_hdIvisitKinds) = T_VisitStep_s50 -> T_VisitStep_v49
inv_VisitStep_s50 T_VisitStep_s50
_hdX50 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> Bool
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitStep_vIn49
T_VisitStep_vIn49 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Int
_hdOallInitStates Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros FormatMode
_hdOfmtMode Int
_hdOindex Bool
_hdOisLast VisitKind
_hdOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules Options
_hdOoptions Int
_hdOprevMaxSimRefs Map Identifier (Set [Char])
_hdOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses Bool
_hdOuseParallel)
         (T_VisitSteps_vOut52 Set [Char]
_tlIdefs Seq Error
_tlIerrors Int
_tlIindex Bool
_tlIisLast Set [Char]
_tlIlazyIntras Int
_tlIprevMaxSimRefs Map Identifier (Set VisitKind)
_tlIruleKinds Map Identifier Int
_tlIruleUsage PP_Doc
_tlIsem_steps Int
_tlIsize PP_Doc
_tlIsync_steps Set [Char]
_tlIusedArgs Map [Char] (Maybe NonLocalAttr)
_tlIuses Map Int VisitKind
_tlIvisitKinds) = T_VisitSteps_s53 -> T_VisitSteps_v52
inv_VisitSteps_s53 T_VisitSteps_s53
_tlX53 (Map Int (Int, Int)
-> Map Identifier Int
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> FormatMode
-> Int
-> VisitKind
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Options
-> Int
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Bool
-> T_VisitSteps_vIn52
T_VisitSteps_vIn52 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Int
_tlOallInitStates Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros FormatMode
_tlOfmtMode Int
_tlOindex VisitKind
_tlOkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules Options
_tlOoptions Int
_tlOprevMaxSimRefs Map Identifier (Set [Char])
_tlOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses Bool
_tlOuseParallel)
         _lhsOsize :: Int
         _lhsOsize :: Int
_lhsOsize = Int -> Int
rule807 Int
_tlIsize
         _hdOindex :: Int
_hdOindex = Int -> Int
rule808 Int
_lhsIindex
         _tlOindex :: Int
_tlOindex = Int -> Int
rule809 Int
_lhsIindex
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule810 Int
_tlIindex
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = () -> Bool
rule811  ()
         _hdOisLast :: Bool
_hdOisLast = Bool -> Bool
rule812 Bool
_tlIisLast
         _lhsOdefs :: Set String
         _lhsOdefs :: Set [Char]
_lhsOdefs = Set [Char] -> Set [Char] -> Set [Char]
rule813 Set [Char]
_hdIdefs Set [Char]
_tlIdefs
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule814 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Set [Char]
rule815 Set [Char]
_hdIlazyIntras Set [Char]
_tlIlazyIntras
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule816 Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier (Set VisitKind)
_tlIruleKinds
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule817 Map Identifier Int
_hdIruleUsage Map Identifier Int
_tlIruleUsage
         _lhsOsem_steps :: PP_Doc
         _lhsOsem_steps :: PP_Doc
_lhsOsem_steps = PP_Doc -> PP_Doc -> PP_Doc
rule818 PP_Doc
_hdIsem_steps PP_Doc
_tlIsem_steps
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = PP_Doc -> PP_Doc -> PP_Doc
rule819 PP_Doc
_hdIsync_steps PP_Doc
_tlIsync_steps
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char] -> Set [Char]
rule820 Set [Char]
_hdIusedArgs Set [Char]
_tlIusedArgs
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         _lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
-> Map [Char] (Maybe NonLocalAttr)
rule821 Map [Char] (Maybe NonLocalAttr)
_hdIuses Map [Char] (Maybe NonLocalAttr)
_tlIuses
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule822 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule823 Int
_tlIprevMaxSimRefs
         _hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule824 Map Int (Int, Int)
_lhsIallFromToStates
         _hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule825 Map Identifier Int
_lhsIallInitStates
         _hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule826 Map Int VisitKind
_lhsIallVisitKinds
         _hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule827 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule828 Map Int (Set Identifier)
_lhsIavisitdefs
         _hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule829 Map Int (Set Identifier)
_lhsIavisituses
         _hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule830 Attributes
_lhsIchildTypes
         _hdOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule831 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _hdOfmtMode :: FormatMode
_hdOfmtMode = FormatMode -> FormatMode
rule832 FormatMode
_lhsIfmtMode
         _hdOkind :: VisitKind
_hdOkind = VisitKind -> VisitKind
rule833 VisitKind
_lhsIkind
         _hdOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule834 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule835 Options
_lhsIoptions
         _hdOprevMaxSimRefs :: Int
_hdOprevMaxSimRefs = Int -> Int
rule836 Int
_lhsIprevMaxSimRefs
         _hdOruledefs :: Map Identifier (Set [Char])
_hdOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule837 Map Identifier (Set [Char])
_lhsIruledefs
         _hdOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule838 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         _hdOuseParallel :: Bool
_hdOuseParallel = Bool -> Bool
rule839 Bool
_lhsIuseParallel
         _tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule840 Map Int (Int, Int)
_lhsIallFromToStates
         _tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule841 Map Identifier Int
_lhsIallInitStates
         _tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule842 Map Int VisitKind
_lhsIallVisitKinds
         _tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule843 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule844 Map Int (Set Identifier)
_lhsIavisitdefs
         _tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule845 Map Int (Set Identifier)
_lhsIavisituses
         _tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule846 Attributes
_lhsIchildTypes
         _tlOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule847 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _tlOfmtMode :: FormatMode
_tlOfmtMode = FormatMode -> FormatMode
rule848 FormatMode
_lhsIfmtMode
         _tlOkind :: VisitKind
_tlOkind = VisitKind -> VisitKind
rule849 VisitKind
_lhsIkind
         _tlOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule850 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule851 Options
_lhsIoptions
         _tlOprevMaxSimRefs :: Int
_tlOprevMaxSimRefs = Int -> Int
rule852 Int
_hdIprevMaxSimRefs
         _tlOruledefs :: Map Identifier (Set [Char])
_tlOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule853 Map Identifier (Set [Char])
_lhsIruledefs
         _tlOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule854 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         _tlOuseParallel :: Bool
_tlOuseParallel = Bool -> Bool
rule855 Bool
_lhsIuseParallel
         __result_ :: T_VisitSteps_vOut52
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitSteps_vOut52
T_VisitSteps_vOut52 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitSteps_vOut52
__result_ )
     in T_VisitSteps_v52 -> T_VisitSteps_s53
C_VisitSteps_s53 T_VisitSteps_v52
v52
   {-# INLINE rule807 #-}
   {-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule807 = \ ((_tlIsize) :: Int) ->
                      {-# LINE 881 "src-ag/ExecutionPlan2Hs.ag" #-}
                      1 + _tlIsize
                      {-# LINE 6384 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule808 #-}
   {-# LINE 886 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule808 = \ ((_lhsIindex) :: Int) ->
                {-# LINE 886 "src-ag/ExecutionPlan2Hs.ag" #-}
                _lhsIindex
                {-# LINE 6390 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule809 #-}
   {-# LINE 887 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule809 = \ ((_lhsIindex) :: Int) ->
                {-# LINE 887 "src-ag/ExecutionPlan2Hs.ag" #-}
                1 + _lhsIindex
                {-# LINE 6396 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule810 #-}
   {-# LINE 888 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule810 = \ ((_tlIindex) :: Int) ->
                {-# LINE 888 "src-ag/ExecutionPlan2Hs.ag" #-}
                _tlIindex
                {-# LINE 6402 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule811 #-}
   {-# LINE 907 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule811 = \  (_ :: ()) ->
                         {-# LINE 907 "src-ag/ExecutionPlan2Hs.ag" #-}
                         False
                         {-# LINE 6408 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule812 #-}
   {-# LINE 908 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule812 = \ ((_tlIisLast) :: Bool) ->
                         {-# LINE 908 "src-ag/ExecutionPlan2Hs.ag" #-}
                         _tlIisLast
                         {-# LINE 6414 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule813 #-}
   rule813 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->
     _hdIdefs `Set.union` _tlIdefs
   {-# INLINE rule814 #-}
   rule814 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->
     _hdIerrors Seq.>< _tlIerrors
   {-# INLINE rule815 #-}
   rule815 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->
     _hdIlazyIntras `Set.union` _tlIlazyIntras
   {-# INLINE rule816 #-}
   rule816 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->
     _hdIruleKinds `unionWithMappend` _tlIruleKinds
   {-# INLINE rule817 #-}
   rule817 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->
     _hdIruleUsage `unionWithSum` _tlIruleUsage
   {-# INLINE rule818 #-}
   rule818 = \ ((_hdIsem_steps) :: PP_Doc) ((_tlIsem_steps) :: PP_Doc) ->
     _hdIsem_steps >-< _tlIsem_steps
   {-# INLINE rule819 #-}
   rule819 = \ ((_hdIsync_steps) :: PP_Doc) ((_tlIsync_steps) :: PP_Doc) ->
     _hdIsync_steps >-< _tlIsync_steps
   {-# INLINE rule820 #-}
   rule820 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->
     _hdIusedArgs `Set.union` _tlIusedArgs
   {-# INLINE rule821 #-}
   rule821 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->
     _hdIuses `Map.union` _tlIuses
   {-# INLINE rule822 #-}
   rule822 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     _hdIvisitKinds `mappend` _tlIvisitKinds
   {-# INLINE rule823 #-}
   rule823 = \ ((_tlIprevMaxSimRefs) :: Int) ->
     _tlIprevMaxSimRefs
   {-# INLINE rule824 #-}
   rule824 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule825 #-}
   rule825 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule826 #-}
   rule826 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule827 #-}
   rule827 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule828 #-}
   rule828 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule829 #-}
   rule829 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule830 #-}
   rule830 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
     _lhsIchildTypes
   {-# INLINE rule831 #-}
   rule831 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     _lhsIchildintros
   {-# INLINE rule832 #-}
   rule832 = \ ((_lhsIfmtMode) :: FormatMode) ->
     _lhsIfmtMode
   {-# INLINE rule833 #-}
   rule833 = \ ((_lhsIkind) :: VisitKind) ->
     _lhsIkind
   {-# INLINE rule834 #-}
   rule834 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     _lhsImrules
   {-# INLINE rule835 #-}
   rule835 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule836 #-}
   rule836 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs
   {-# INLINE rule837 #-}
   rule837 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
     _lhsIruledefs
   {-# INLINE rule838 #-}
   rule838 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     _lhsIruleuses
   {-# INLINE rule839 #-}
   rule839 = \ ((_lhsIuseParallel) :: Bool) ->
     _lhsIuseParallel
   {-# INLINE rule840 #-}
   rule840 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     _lhsIallFromToStates
   {-# INLINE rule841 #-}
   rule841 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->
     _lhsIallInitStates
   {-# INLINE rule842 #-}
   rule842 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     _lhsIallVisitKinds
   {-# INLINE rule843 #-}
   rule843 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     _lhsIallchildvisit
   {-# INLINE rule844 #-}
   rule844 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisitdefs
   {-# INLINE rule845 #-}
   rule845 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     _lhsIavisituses
   {-# INLINE rule846 #-}
   rule846 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->
     _lhsIchildTypes
   {-# INLINE rule847 #-}
   rule847 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     _lhsIchildintros
   {-# INLINE rule848 #-}
   rule848 = \ ((_lhsIfmtMode) :: FormatMode) ->
     _lhsIfmtMode
   {-# INLINE rule849 #-}
   rule849 = \ ((_lhsIkind) :: VisitKind) ->
     _lhsIkind
   {-# INLINE rule850 #-}
   rule850 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     _lhsImrules
   {-# INLINE rule851 #-}
   rule851 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule852 #-}
   rule852 = \ ((_hdIprevMaxSimRefs) :: Int) ->
     _hdIprevMaxSimRefs
   {-# INLINE rule853 #-}
   rule853 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->
     _lhsIruledefs
   {-# INLINE rule854 #-}
   rule854 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     _lhsIruleuses
   {-# INLINE rule855 #-}
   rule855 = \ ((_lhsIuseParallel) :: Bool) ->
     _lhsIuseParallel
{-# NOINLINE sem_VisitSteps_Nil #-}
sem_VisitSteps_Nil ::  T_VisitSteps 
sem_VisitSteps_Nil :: T_VisitSteps
sem_VisitSteps_Nil  = Identity T_VisitSteps_s53 -> T_VisitSteps
T_VisitSteps (T_VisitSteps_s53 -> Identity T_VisitSteps_s53
forall (m :: * -> *) a. Monad m => a -> m a
return T_VisitSteps_s53
st53) where
   {-# NOINLINE st53 #-}
   st53 :: T_VisitSteps_s53
st53 = let
      v52 :: T_VisitSteps_v52 
      v52 :: T_VisitSteps_v52
v52 = \ (T_VisitSteps_vIn52 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Int
_lhsIallInitStates Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros FormatMode
_lhsIfmtMode Int
_lhsIindex VisitKind
_lhsIkind Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Options
_lhsIoptions Int
_lhsIprevMaxSimRefs Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Bool
_lhsIuseParallel) -> ( let
         _lhsOsize :: Int
         _lhsOsize :: Int
_lhsOsize = () -> Int
rule856  ()
         _lhsOisLast :: Bool
         _lhsOisLast :: Bool
_lhsOisLast = () -> Bool
rule857  ()
         _lhsOdefs :: Set String
         _lhsOdefs :: Set [Char]
_lhsOdefs = () -> Set [Char]
forall a. () -> Set a
rule858  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule859  ()
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule860  ()
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule861  ()
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule862  ()
         _lhsOsem_steps :: PP_Doc
         _lhsOsem_steps :: PP_Doc
_lhsOsem_steps = () -> PP_Doc
rule863  ()
         _lhsOsync_steps :: PP_Doc
         _lhsOsync_steps :: PP_Doc
_lhsOsync_steps = () -> PP_Doc
rule864  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule865  ()
         _lhsOuses :: Map String (Maybe NonLocalAttr)
         _lhsOuses :: Map [Char] (Maybe NonLocalAttr)
_lhsOuses = () -> Map [Char] (Maybe NonLocalAttr)
forall k a. () -> Map k a
rule866  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule867  ()
         _lhsOindex :: Int
         _lhsOindex :: Int
_lhsOindex = Int -> Int
rule868 Int
_lhsIindex
         _lhsOprevMaxSimRefs :: Int
         _lhsOprevMaxSimRefs :: Int
_lhsOprevMaxSimRefs = Int -> Int
rule869 Int
_lhsIprevMaxSimRefs
         __result_ :: T_VisitSteps_vOut52
__result_ = Set [Char]
-> Seq Error
-> Int
-> Bool
-> Set [Char]
-> Int
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> PP_Doc
-> Int
-> PP_Doc
-> Set [Char]
-> Map [Char] (Maybe NonLocalAttr)
-> Map Int VisitKind
-> T_VisitSteps_vOut52
T_VisitSteps_vOut52 Set [Char]
_lhsOdefs Seq Error
_lhsOerrors Int
_lhsOindex Bool
_lhsOisLast Set [Char]
_lhsOlazyIntras Int
_lhsOprevMaxSimRefs Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage PP_Doc
_lhsOsem_steps Int
_lhsOsize PP_Doc
_lhsOsync_steps Set [Char]
_lhsOusedArgs Map [Char] (Maybe NonLocalAttr)
_lhsOuses Map Int VisitKind
_lhsOvisitKinds
         in T_VisitSteps_vOut52
__result_ )
     in T_VisitSteps_v52 -> T_VisitSteps_s53
C_VisitSteps_s53 T_VisitSteps_v52
v52
   {-# INLINE rule856 #-}
   {-# LINE 880 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule856 = \  (_ :: ()) ->
                      {-# LINE 880 "src-ag/ExecutionPlan2Hs.ag" #-}
                      0
                      {-# LINE 6587 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule857 #-}
   {-# LINE 906 "src-ag/ExecutionPlan2Hs.ag" #-}
   rule857 = \  (_ :: ()) ->
                         {-# LINE 906 "src-ag/ExecutionPlan2Hs.ag" #-}
                         True
                         {-# LINE 6593 "src-generated/ExecutionPlan2Hs.hs" #-}
   {-# INLINE rule858 #-}
   rule858 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule859 #-}
   rule859 = \  (_ :: ()) ->
     Seq.empty
   {-# INLINE rule860 #-}
   rule860 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule861 #-}
   rule861 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule862 #-}
   rule862 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule863 #-}
   rule863 = \  (_ :: ()) ->
     empty
   {-# INLINE rule864 #-}
   rule864 = \  (_ :: ()) ->
     empty
   {-# INLINE rule865 #-}
   rule865 = \  (_ :: ()) ->
     Set.empty
   {-# INLINE rule866 #-}
   rule866 = \  (_ :: ()) ->
     Map.empty
   {-# INLINE rule867 #-}
   rule867 = \  (_ :: ()) ->
     mempty
   {-# INLINE rule868 #-}
   rule868 = \ ((_lhsIindex) :: Int) ->
     _lhsIindex
   {-# INLINE rule869 #-}
   rule869 = \ ((_lhsIprevMaxSimRefs) :: Int) ->
     _lhsIprevMaxSimRefs

-- Visits ------------------------------------------------------
-- wrapper
data Inh_Visits  = Inh_Visits { Inh_Visits -> Map Int (Int, Int)
allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), Inh_Visits -> Map Identifier Attributes
allInhmap_Inh_Visits :: (Map NontermIdent Attributes), Inh_Visits -> Map Identifier Int
allInitStates_Inh_Visits :: (Map NontermIdent Int), Inh_Visits -> Map Identifier Attributes
allSynmap_Inh_Visits :: (Map NontermIdent Attributes), Inh_Visits -> Map Int VisitKind
allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), Inh_Visits
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Inh_Visits -> Map Int (Map [Char] (Maybe NonLocalAttr))
allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Inh_Visits -> Map Int (Set Identifier)
avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), Inh_Visits -> Map Int (Set Identifier)
avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), Inh_Visits -> Attributes
childTypes_Inh_Visits :: (Map Identifier Type), Inh_Visits
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), Inh_Visits -> Identifier
con_Inh_Visits :: (ConstructorIdent), Inh_Visits -> Attributes
inhmap_Inh_Visits :: (Attributes), Inh_Visits
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), Inh_Visits -> Map Int StateCtx
nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), Inh_Visits -> Identifier
nt_Inh_Visits :: (NontermIdent), Inh_Visits -> Options
options_Inh_Visits :: (Options), Inh_Visits -> [Identifier]
params_Inh_Visits :: ([Identifier]), Inh_Visits -> Map Int StateCtx
prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), Inh_Visits -> Map Identifier (Set [Char])
ruledefs_Inh_Visits :: (Map Identifier (Set String)), Inh_Visits -> Map Identifier (Map [Char] (Maybe NonLocalAttr))
ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), Inh_Visits -> Attributes
synmap_Inh_Visits :: (Attributes), Inh_Visits -> Set [Char]
terminaldefs_Inh_Visits :: (Set String) }
data Syn_Visits  = Syn_Visits { Syn_Visits -> [VisitStateState]
allvisits_Syn_Visits :: ([VisitStateState]), Syn_Visits
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), Syn_Visits -> Seq Error
errors_Syn_Visits :: (Seq Error), Syn_Visits -> Map Int (Int, Int)
fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), Syn_Visits -> Map Int (Map [Char] (Maybe NonLocalAttr))
intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), Syn_Visits -> Set [Char]
lazyIntras_Syn_Visits :: (Set String), Syn_Visits -> Map Identifier (Set VisitKind)
ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), Syn_Visits -> Map Identifier Int
ruleUsage_Syn_Visits :: (Map Identifier Int), Syn_Visits -> [(Int, Bool -> PP_Doc)]
sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ), Syn_Visits -> PP_Doc
t_visits_Syn_Visits :: (PP_Doc), Syn_Visits -> Set [Char]
usedArgs_Syn_Visits :: (Set String), Syn_Visits -> Map Int VisitKind
visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), Syn_Visits -> Map Int (Set Identifier)
visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), Syn_Visits -> Map Int (Set Identifier)
visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }
{-# INLINABLE wrap_Visits #-}
wrap_Visits :: T_Visits  -> Inh_Visits  -> (Syn_Visits )
wrap_Visits :: T_Visits -> Inh_Visits -> Syn_Visits
wrap_Visits (T_Visits Identity T_Visits_s56
act) (Inh_Visits Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs) =
   Identity Syn_Visits -> Syn_Visits
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Visits_s56
sem <- Identity T_Visits_s56
act
        let arg55 :: T_Visits_vIn55
arg55 = Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> T_Visits_vIn55
T_Visits_vIn55 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs
        (T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses) <- T_Visits_vOut55 -> Identity T_Visits_vOut55
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 T_Visits_s56
sem T_Visits_vIn55
arg55)
        Syn_Visits -> Identity Syn_Visits
forall (m :: * -> *) a. Monad m => a -> m a
return ([VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, Bool -> PP_Doc)]
-> PP_Doc
-> Set [Char]
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Syn_Visits
Syn_Visits [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses)
   )

-- cata
{-# NOINLINE sem_Visits #-}
sem_Visits :: Visits  -> T_Visits 
sem_Visits :: Visits -> T_Visits
sem_Visits Visits
list = (T_Visit -> T_Visits -> T_Visits)
-> T_Visits -> [T_Visit] -> T_Visits
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Visit -> T_Visits -> T_Visits
sem_Visits_Cons T_Visits
sem_Visits_Nil ((Visit -> T_Visit) -> Visits -> [T_Visit]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Visit -> T_Visit
sem_Visit Visits
list)

-- semantic domain
newtype T_Visits  = T_Visits {
                             T_Visits -> Identity T_Visits_s56
attach_T_Visits :: Identity (T_Visits_s56 )
                             }
newtype T_Visits_s56  = C_Visits_s56 {
                                     T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 :: (T_Visits_v55 )
                                     }
data T_Visits_s57  = C_Visits_s57
type T_Visits_v55  = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )
data T_Visits_vIn55  = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)
data T_Visits_vOut55  = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,Bool -> PP_Doc)] ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))
{-# NOINLINE sem_Visits_Cons #-}
sem_Visits_Cons :: T_Visit  -> T_Visits  -> T_Visits 
sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits
sem_Visits_Cons T_Visit
arg_hd_ T_Visits
arg_tl_ = Identity T_Visits_s56 -> T_Visits
T_Visits (T_Visits_s56 -> Identity T_Visits_s56
forall (m :: * -> *) a. Monad m => a -> m a
return T_Visits_s56
st56) where
   {-# NOINLINE st56 #-}
   st56 :: T_Visits_s56
st56 = let
      v55 :: T_Visits_v55 
      v55 :: T_Visits_v55
v55 = \ (T_Visits_vIn55 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs) -> ( let
         _hdX47 :: T_Visit_s47
_hdX47 = Identity T_Visit_s47 -> T_Visit_s47
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Visit -> Identity T_Visit_s47
attach_T_Visit (T_Visit
arg_hd_))
         _tlX56 :: T_Visits_s56
_tlX56 = Identity T_Visits_s56 -> T_Visits_s56
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Visits -> Identity T_Visits_s56
attach_T_Visits (T_Visits
arg_tl_))
         (T_Visit_vOut46 VisitStateState
_hdIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Seq Error
_hdIerrors Map Int (Int, Int)
_hdIfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap Set [Char]
_hdIlazyIntras Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier Int
_hdIruleUsage (Int, Bool -> PP_Doc)
_hdIsem_visit PP_Doc
_hdIt_visits Set [Char]
_hdIusedArgs Map Int VisitKind
_hdIvisitKinds Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_hdIvisituses) = T_Visit_s47 -> T_Visit_v46
inv_Visit_s47 T_Visit_s47
_hdX47 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> T_Visit_vIn46
T_Visit_vIn46 Map Int (Int, Int)
_hdOallFromToStates Map Identifier Attributes
_hdOallInhmap Map Identifier Int
_hdOallInitStates Map Identifier Attributes
_hdOallSynmap Map Int VisitKind
_hdOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_hdOallintramap Map Int (Set Identifier)
_hdOavisitdefs Map Int (Set Identifier)
_hdOavisituses Attributes
_hdOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros Identifier
_hdOcon Attributes
_hdOinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules Map Int StateCtx
_hdOnextVisits Identifier
_hdOnt Options
_hdOoptions [Identifier]
_hdOparams Map Int StateCtx
_hdOprevVisits Map Identifier (Set [Char])
_hdOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses Attributes
_hdOsynmap Set [Char]
_hdOterminaldefs)
         (T_Visits_vOut55 [VisitStateState]
_tlIallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit Seq Error
_tlIerrors Map Int (Int, Int)
_tlIfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap Set [Char]
_tlIlazyIntras Map Identifier (Set VisitKind)
_tlIruleKinds Map Identifier Int
_tlIruleUsage [(Int, Bool -> PP_Doc)]
_tlIsem_visit PP_Doc
_tlIt_visits Set [Char]
_tlIusedArgs Map Int VisitKind
_tlIvisitKinds Map Int (Set Identifier)
_tlIvisitdefs Map Int (Set Identifier)
_tlIvisituses) = T_Visits_s56 -> T_Visits_v55
inv_Visits_s56 T_Visits_s56
_tlX56 (Map Int (Int, Int)
-> Map Identifier Attributes
-> Map Identifier Int
-> Map Identifier Attributes
-> Map Int VisitKind
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> Attributes
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Identifier
-> Attributes
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Int StateCtx
-> Identifier
-> Options
-> [Identifier]
-> Map Int StateCtx
-> Map Identifier (Set [Char])
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Attributes
-> Set [Char]
-> T_Visits_vIn55
T_Visits_vIn55 Map Int (Int, Int)
_tlOallFromToStates Map Identifier Attributes
_tlOallInhmap Map Identifier Int
_tlOallInitStates Map Identifier Attributes
_tlOallSynmap Map Int VisitKind
_tlOallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_tlOallintramap Map Int (Set Identifier)
_tlOavisitdefs Map Int (Set Identifier)
_tlOavisituses Attributes
_tlOchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros Identifier
_tlOcon Attributes
_tlOinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules Map Int StateCtx
_tlOnextVisits Identifier
_tlOnt Options
_tlOoptions [Identifier]
_tlOparams Map Int StateCtx
_tlOprevVisits Map Identifier (Set [Char])
_tlOruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses Attributes
_tlOsynmap Set [Char]
_tlOterminaldefs)
         _lhsOallvisits :: [VisitStateState]
         _lhsOallvisits :: [VisitStateState]
_lhsOallvisits = VisitStateState -> [VisitStateState] -> [VisitStateState]
rule870 VisitStateState
_hdIallvisits [VisitStateState]
_tlIallvisits
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule871 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule872 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule873 Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int)
_tlIfromToStates
         _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
         _lhsOintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule874 Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = Set [Char] -> Set [Char] -> Set [Char]
rule875 Set [Char]
_hdIlazyIntras Set [Char]
_tlIlazyIntras
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule876 Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier (Set VisitKind)
_tlIruleKinds
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule877 Map Identifier Int
_hdIruleUsage Map Identifier Int
_tlIruleUsage
         _lhsOsem_visit ::  [(StateIdentifier,Bool -> PP_Doc)] 
         _lhsOsem_visit :: [(Int, Bool -> PP_Doc)]
_lhsOsem_visit = (Int, Bool -> PP_Doc)
-> [(Int, Bool -> PP_Doc)] -> [(Int, Bool -> PP_Doc)]
rule878 (Int, Bool -> PP_Doc)
_hdIsem_visit [(Int, Bool -> PP_Doc)]
_tlIsem_visit
         _lhsOt_visits :: PP_Doc
         _lhsOt_visits :: PP_Doc
_lhsOt_visits = PP_Doc -> PP_Doc -> PP_Doc
rule879 PP_Doc
_hdIt_visits PP_Doc
_tlIt_visits
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = Set [Char] -> Set [Char] -> Set [Char]
rule880 Set [Char]
_hdIusedArgs Set [Char]
_tlIusedArgs
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule881 Map Int VisitKind
_hdIvisitKinds Map Int VisitKind
_tlIvisitKinds
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule882 Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
_tlIvisitdefs
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule883 Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
_tlIvisituses
         _hdOallFromToStates :: Map Int (Int, Int)
_hdOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule884 Map Int (Int, Int)
_lhsIallFromToStates
         _hdOallInhmap :: Map Identifier Attributes
_hdOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule885 Map Identifier Attributes
_lhsIallInhmap
         _hdOallInitStates :: Map Identifier Int
_hdOallInitStates = Map Identifier Int -> Map Identifier Int
rule886 Map Identifier Int
_lhsIallInitStates
         _hdOallSynmap :: Map Identifier Attributes
_hdOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule887 Map Identifier Attributes
_lhsIallSynmap
         _hdOallVisitKinds :: Map Int VisitKind
_hdOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule888 Map Int VisitKind
_lhsIallVisitKinds
         _hdOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule889 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _hdOallintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_hdOallintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule890 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
         _hdOavisitdefs :: Map Int (Set Identifier)
_hdOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule891 Map Int (Set Identifier)
_lhsIavisitdefs
         _hdOavisituses :: Map Int (Set Identifier)
_hdOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule892 Map Int (Set Identifier)
_lhsIavisituses
         _hdOchildTypes :: Attributes
_hdOchildTypes = Attributes -> Attributes
rule893 Attributes
_lhsIchildTypes
         _hdOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_hdOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule894 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule895 Identifier
_lhsIcon
         _hdOinhmap :: Attributes
_hdOinhmap = Attributes -> Attributes
rule896 Attributes
_lhsIinhmap
         _hdOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_hdOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule897 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _hdOnextVisits :: Map Int StateCtx
_hdOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule898 Map Int StateCtx
_lhsInextVisits
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule899 Identifier
_lhsInt
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule900 Options
_lhsIoptions
         _hdOparams :: [Identifier]
_hdOparams = [Identifier] -> [Identifier]
rule901 [Identifier]
_lhsIparams
         _hdOprevVisits :: Map Int StateCtx
_hdOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule902 Map Int StateCtx
_lhsIprevVisits
         _hdOruledefs :: Map Identifier (Set [Char])
_hdOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule903 Map Identifier (Set [Char])
_lhsIruledefs
         _hdOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_hdOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule904 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         _hdOsynmap :: Attributes
_hdOsynmap = Attributes -> Attributes
rule905 Attributes
_lhsIsynmap
         _hdOterminaldefs :: Set [Char]
_hdOterminaldefs = Set [Char] -> Set [Char]
rule906 Set [Char]
_lhsIterminaldefs
         _tlOallFromToStates :: Map Int (Int, Int)
_tlOallFromToStates = Map Int (Int, Int) -> Map Int (Int, Int)
rule907 Map Int (Int, Int)
_lhsIallFromToStates
         _tlOallInhmap :: Map Identifier Attributes
_tlOallInhmap = Map Identifier Attributes -> Map Identifier Attributes
rule908 Map Identifier Attributes
_lhsIallInhmap
         _tlOallInitStates :: Map Identifier Int
_tlOallInitStates = Map Identifier Int -> Map Identifier Int
rule909 Map Identifier Int
_lhsIallInitStates
         _tlOallSynmap :: Map Identifier Attributes
_tlOallSynmap = Map Identifier Attributes -> Map Identifier Attributes
rule910 Map Identifier Attributes
_lhsIallSynmap
         _tlOallVisitKinds :: Map Int VisitKind
_tlOallVisitKinds = Map Int VisitKind -> Map Int VisitKind
rule911 Map Int VisitKind
_lhsIallVisitKinds
         _tlOallchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlOallchildvisit = Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule912 Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
         _tlOallintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_tlOallintramap = Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule913 Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
         _tlOavisitdefs :: Map Int (Set Identifier)
_tlOavisitdefs = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule914 Map Int (Set Identifier)
_lhsIavisitdefs
         _tlOavisituses :: Map Int (Set Identifier)
_tlOavisituses = Map Int (Set Identifier) -> Map Int (Set Identifier)
rule915 Map Int (Set Identifier)
_lhsIavisituses
         _tlOchildTypes :: Attributes
_tlOchildTypes = Attributes -> Attributes
rule916 Attributes
_lhsIchildTypes
         _tlOchildintros :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_tlOchildintros = Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule917 Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule918 Identifier
_lhsIcon
         _tlOinhmap :: Attributes
_tlOinhmap = Attributes -> Attributes
rule919 Attributes
_lhsIinhmap
         _tlOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_tlOmrules = Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule920 Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
         _tlOnextVisits :: Map Int StateCtx
_tlOnextVisits = Map Int StateCtx -> Map Int StateCtx
rule921 Map Int StateCtx
_lhsInextVisits
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule922 Identifier
_lhsInt
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule923 Options
_lhsIoptions
         _tlOparams :: [Identifier]
_tlOparams = [Identifier] -> [Identifier]
rule924 [Identifier]
_lhsIparams
         _tlOprevVisits :: Map Int StateCtx
_tlOprevVisits = Map Int StateCtx -> Map Int StateCtx
rule925 Map Int StateCtx
_lhsIprevVisits
         _tlOruledefs :: Map Identifier (Set [Char])
_tlOruledefs = Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule926 Map Identifier (Set [Char])
_lhsIruledefs
         _tlOruleuses :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
_tlOruleuses = Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule927 Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
         _tlOsynmap :: Attributes
_tlOsynmap = Attributes -> Attributes
rule928 Attributes
_lhsIsynmap
         _tlOterminaldefs :: Set [Char]
_tlOterminaldefs = Set [Char] -> Set [Char]
rule929 Set [Char]
_lhsIterminaldefs
         __result_ :: T_Visits_vOut55
__result_ = [VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, Bool -> PP_Doc)]
-> PP_Doc
-> Set [Char]
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visits_vOut55
T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_Visits_vOut55
__result_ )
     in T_Visits_v55 -> T_Visits_s56
C_Visits_s56 T_Visits_v55
v55
   {-# INLINE rule870 #-}
   rule870 :: VisitStateState -> [VisitStateState] -> [VisitStateState]
rule870 = \ ((VisitStateState
_hdIallvisits) ::  VisitStateState ) (([VisitStateState]
_tlIallvisits) :: [VisitStateState]) ->
     VisitStateState
_hdIallvisits VisitStateState -> [VisitStateState] -> [VisitStateState]
forall a. a -> [a] -> [a]
: [VisitStateState]
_tlIallvisits
   {-# INLINE rule871 #-}
   rule871 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule871 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_hdIchildvisit Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_tlIchildvisit
   {-# INLINE rule872 #-}
   rule872 :: Seq Error -> Seq Error -> Seq Error
rule872 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors Seq Error -> Seq Error -> Seq Error
forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule873 #-}
   rule873 :: Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
rule873 = \ ((Map Int (Int, Int)
_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((Map Int (Int, Int)
_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->
     Map Int (Int, Int)
_hdIfromToStates Map Int (Int, Int) -> Map Int (Int, Int) -> Map Int (Int, Int)
forall a. Monoid a => a -> a -> a
`mappend` Map Int (Int, Int)
_tlIfromToStates
   {-# INLINE rule874 #-}
   rule874 :: Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule874 = \ ((Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
     Map Int (Map [Char] (Maybe NonLocalAttr))
_hdIintramap Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
forall a b c.
(Ord a, Ord b) =>
Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)
`uwMapUnion` Map Int (Map [Char] (Maybe NonLocalAttr))
_tlIintramap
   {-# INLINE rule875 #-}
   rule875 :: Set [Char] -> Set [Char] -> Set [Char]
rule875 = \ ((Set [Char]
_hdIlazyIntras) :: Set String) ((Set [Char]
_tlIlazyIntras) :: Set String) ->
     Set [Char]
_hdIlazyIntras Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIlazyIntras
   {-# INLINE rule876 #-}
   rule876 :: Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
rule876 = \ ((Map Identifier (Set VisitKind)
_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((Map Identifier (Set VisitKind)
_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->
     Map Identifier (Set VisitKind)
_hdIruleKinds Map Identifier (Set VisitKind)
-> Map Identifier (Set VisitKind) -> Map Identifier (Set VisitKind)
forall a k. (Monoid a, Ord k) => Map k a -> Map k a -> Map k a
`unionWithMappend` Map Identifier (Set VisitKind)
_tlIruleKinds
   {-# INLINE rule877 #-}
   rule877 :: Map Identifier Int -> Map Identifier Int -> Map Identifier Int
rule877 = \ ((Map Identifier Int
_hdIruleUsage) :: Map Identifier Int) ((Map Identifier Int
_tlIruleUsage) :: Map Identifier Int) ->
     Map Identifier Int
_hdIruleUsage Map Identifier Int -> Map Identifier Int -> Map Identifier Int
`unionWithSum` Map Identifier Int
_tlIruleUsage
   {-# INLINE rule878 #-}
   rule878 :: (Int, Bool -> PP_Doc)
-> [(Int, Bool -> PP_Doc)] -> [(Int, Bool -> PP_Doc)]
rule878 = \ (((Int, Bool -> PP_Doc)
_hdIsem_visit) ::   (StateIdentifier,Bool -> PP_Doc)  ) (([(Int, Bool -> PP_Doc)]
_tlIsem_visit) ::  [(StateIdentifier,Bool -> PP_Doc)] ) ->
     (Int, Bool -> PP_Doc)
_hdIsem_visit (Int, Bool -> PP_Doc)
-> [(Int, Bool -> PP_Doc)] -> [(Int, Bool -> PP_Doc)]
forall a. a -> [a] -> [a]
: [(Int, Bool -> PP_Doc)]
_tlIsem_visit
   {-# INLINE rule879 #-}
   rule879 :: PP_Doc -> PP_Doc -> PP_Doc
rule879 = \ ((PP_Doc
_hdIt_visits) :: PP_Doc) ((PP_Doc
_tlIt_visits) :: PP_Doc) ->
     PP_Doc
_hdIt_visits PP_Doc -> PP_Doc -> PP_Doc
forall a b. (PP a, PP b) => a -> b -> PP_Doc
>-< PP_Doc
_tlIt_visits
   {-# INLINE rule880 #-}
   rule880 :: Set [Char] -> Set [Char] -> Set [Char]
rule880 = \ ((Set [Char]
_hdIusedArgs) :: Set String) ((Set [Char]
_tlIusedArgs) :: Set String) ->
     Set [Char]
_hdIusedArgs Set [Char] -> Set [Char] -> Set [Char]
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set [Char]
_tlIusedArgs
   {-# INLINE rule881 #-}
   rule881 :: Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
rule881 = \ ((Map Int VisitKind
_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((Map Int VisitKind
_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->
     Map Int VisitKind
_hdIvisitKinds Map Int VisitKind -> Map Int VisitKind -> Map Int VisitKind
forall a. Monoid a => a -> a -> a
`mappend` Map Int VisitKind
_tlIvisitKinds
   {-# INLINE rule882 #-}
   rule882 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule882 = \ ((Map Int (Set Identifier)
_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_hdIvisitdefs Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisitdefs
   {-# INLINE rule883 #-}
   rule883 :: Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
rule883 = \ ((Map Int (Set Identifier)
_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((Map Int (Set Identifier)
_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_hdIvisituses Map Int (Set Identifier)
-> Map Int (Set Identifier) -> Map Int (Set Identifier)
forall a b.
(Ord a, Ord b) =>
Map a (Set b) -> Map a (Set b) -> Map a (Set b)
`uwSetUnion` Map Int (Set Identifier)
_tlIvisituses
   {-# INLINE rule884 #-}
   rule884 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule884 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     Map Int (Int, Int)
_lhsIallFromToStates
   {-# INLINE rule885 #-}
   rule885 :: Map Identifier Attributes -> Map Identifier Attributes
rule885 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallInhmap
   {-# INLINE rule886 #-}
   rule886 :: Map Identifier Int -> Map Identifier Int
rule886 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_lhsIallInitStates
   {-# INLINE rule887 #-}
   rule887 :: Map Identifier Attributes -> Map Identifier Attributes
rule887 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallSynmap
   {-# INLINE rule888 #-}
   rule888 :: Map Int VisitKind -> Map Int VisitKind
rule888 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     Map Int VisitKind
_lhsIallVisitKinds
   {-# INLINE rule889 #-}
   rule889 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule889 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
   {-# INLINE rule890 #-}
   rule890 :: Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule890 = \ ((Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
     Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
   {-# INLINE rule891 #-}
   rule891 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule891 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisitdefs
   {-# INLINE rule892 #-}
   rule892 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule892 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisituses
   {-# INLINE rule893 #-}
   rule893 :: Attributes -> Attributes
rule893 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
     Attributes
_lhsIchildTypes
   {-# INLINE rule894 #-}
   rule894 :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule894 = \ ((Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
   {-# INLINE rule895 #-}
   rule895 :: Identifier -> Identifier
rule895 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
     Identifier
_lhsIcon
   {-# INLINE rule896 #-}
   rule896 :: Attributes -> Attributes
rule896 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
     Attributes
_lhsIinhmap
   {-# INLINE rule897 #-}
   rule897 :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule897 = \ ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
   {-# INLINE rule898 #-}
   rule898 :: Map Int StateCtx -> Map Int StateCtx
rule898 = \ ((Map Int StateCtx
_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
     Map Int StateCtx
_lhsInextVisits
   {-# INLINE rule899 #-}
   rule899 :: Identifier -> Identifier
rule899 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
     Identifier
_lhsInt
   {-# INLINE rule900 #-}
   rule900 :: Options -> Options
rule900 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule901 #-}
   rule901 :: [Identifier] -> [Identifier]
rule901 = \ (([Identifier]
_lhsIparams) :: [Identifier]) ->
     [Identifier]
_lhsIparams
   {-# INLINE rule902 #-}
   rule902 :: Map Int StateCtx -> Map Int StateCtx
rule902 = \ ((Map Int StateCtx
_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
     Map Int StateCtx
_lhsIprevVisits
   {-# INLINE rule903 #-}
   rule903 :: Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule903 = \ ((Map Identifier (Set [Char])
_lhsIruledefs) :: Map Identifier (Set String)) ->
     Map Identifier (Set [Char])
_lhsIruledefs
   {-# INLINE rule904 #-}
   rule904 :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule904 = \ ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
   {-# INLINE rule905 #-}
   rule905 :: Attributes -> Attributes
rule905 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
     Attributes
_lhsIsynmap
   {-# INLINE rule906 #-}
   rule906 :: Set [Char] -> Set [Char]
rule906 = \ ((Set [Char]
_lhsIterminaldefs) :: Set String) ->
     Set [Char]
_lhsIterminaldefs
   {-# INLINE rule907 #-}
   rule907 :: Map Int (Int, Int) -> Map Int (Int, Int)
rule907 = \ ((Map Int (Int, Int)
_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->
     Map Int (Int, Int)
_lhsIallFromToStates
   {-# INLINE rule908 #-}
   rule908 :: Map Identifier Attributes -> Map Identifier Attributes
rule908 = \ ((Map Identifier Attributes
_lhsIallInhmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallInhmap
   {-# INLINE rule909 #-}
   rule909 :: Map Identifier Int -> Map Identifier Int
rule909 = \ ((Map Identifier Int
_lhsIallInitStates) :: Map NontermIdent Int) ->
     Map Identifier Int
_lhsIallInitStates
   {-# INLINE rule910 #-}
   rule910 :: Map Identifier Attributes -> Map Identifier Attributes
rule910 = \ ((Map Identifier Attributes
_lhsIallSynmap) :: Map NontermIdent Attributes) ->
     Map Identifier Attributes
_lhsIallSynmap
   {-# INLINE rule911 #-}
   rule911 :: Map Int VisitKind -> Map Int VisitKind
rule911 = \ ((Map Int VisitKind
_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->
     Map Int VisitKind
_lhsIallVisitKinds
   {-# INLINE rule912 #-}
   rule912 :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
rule912 = \ ((Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->
     Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit
   {-# INLINE rule913 #-}
   rule913 :: Map Int (Map [Char] (Maybe NonLocalAttr))
-> Map Int (Map [Char] (Maybe NonLocalAttr))
rule913 = \ ((Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->
     Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap
   {-# INLINE rule914 #-}
   rule914 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule914 = \ ((Map Int (Set Identifier)
_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisitdefs
   {-# INLINE rule915 #-}
   rule915 :: Map Int (Set Identifier) -> Map Int (Set Identifier)
rule915 = \ ((Map Int (Set Identifier)
_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->
     Map Int (Set Identifier)
_lhsIavisituses
   {-# INLINE rule916 #-}
   rule916 :: Attributes -> Attributes
rule916 = \ ((Attributes
_lhsIchildTypes) :: Map Identifier Type) ->
     Attributes
_lhsIchildTypes
   {-# INLINE rule917 #-}
   rule917 :: Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
-> Map
     Identifier
     (VisitKind
      -> FormatMode
      -> Either
           Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
rule917 = \ ((Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->
     Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros
   {-# INLINE rule918 #-}
   rule918 :: Identifier -> Identifier
rule918 = \ ((Identifier
_lhsIcon) :: ConstructorIdent) ->
     Identifier
_lhsIcon
   {-# INLINE rule919 #-}
   rule919 :: Attributes -> Attributes
rule919 = \ ((Attributes
_lhsIinhmap) :: Attributes) ->
     Attributes
_lhsIinhmap
   {-# INLINE rule920 #-}
   rule920 :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
-> Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
rule920 = \ ((Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->
     Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules
   {-# INLINE rule921 #-}
   rule921 :: Map Int StateCtx -> Map Int StateCtx
rule921 = \ ((Map Int StateCtx
_lhsInextVisits) :: Map StateIdentifier StateCtx) ->
     Map Int StateCtx
_lhsInextVisits
   {-# INLINE rule922 #-}
   rule922 :: Identifier -> Identifier
rule922 = \ ((Identifier
_lhsInt) :: NontermIdent) ->
     Identifier
_lhsInt
   {-# INLINE rule923 #-}
   rule923 :: Options -> Options
rule923 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule924 #-}
   rule924 :: [Identifier] -> [Identifier]
rule924 = \ (([Identifier]
_lhsIparams) :: [Identifier]) ->
     [Identifier]
_lhsIparams
   {-# INLINE rule925 #-}
   rule925 :: Map Int StateCtx -> Map Int StateCtx
rule925 = \ ((Map Int StateCtx
_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->
     Map Int StateCtx
_lhsIprevVisits
   {-# INLINE rule926 #-}
   rule926 :: Map Identifier (Set [Char]) -> Map Identifier (Set [Char])
rule926 = \ ((Map Identifier (Set [Char])
_lhsIruledefs) :: Map Identifier (Set String)) ->
     Map Identifier (Set [Char])
_lhsIruledefs
   {-# INLINE rule927 #-}
   rule927 :: Map Identifier (Map [Char] (Maybe NonLocalAttr))
-> Map Identifier (Map [Char] (Maybe NonLocalAttr))
rule927 = \ ((Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->
     Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses
   {-# INLINE rule928 #-}
   rule928 :: Attributes -> Attributes
rule928 = \ ((Attributes
_lhsIsynmap) :: Attributes) ->
     Attributes
_lhsIsynmap
   {-# INLINE rule929 #-}
   rule929 :: Set [Char] -> Set [Char]
rule929 = \ ((Set [Char]
_lhsIterminaldefs) :: Set String) ->
     Set [Char]
_lhsIterminaldefs
{-# NOINLINE sem_Visits_Nil #-}
sem_Visits_Nil ::  T_Visits 
sem_Visits_Nil :: T_Visits
sem_Visits_Nil  = Identity T_Visits_s56 -> T_Visits
T_Visits (T_Visits_s56 -> Identity T_Visits_s56
forall (m :: * -> *) a. Monad m => a -> m a
return T_Visits_s56
st56) where
   {-# NOINLINE st56 #-}
   st56 :: T_Visits_s56
st56 = let
      v55 :: T_Visits_v55 
      v55 :: T_Visits_v55
v55 = \ (T_Visits_vIn55 Map Int (Int, Int)
_lhsIallFromToStates Map Identifier Attributes
_lhsIallInhmap Map Identifier Int
_lhsIallInitStates Map Identifier Attributes
_lhsIallSynmap Map Int VisitKind
_lhsIallVisitKinds Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsIallchildvisit Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsIallintramap Map Int (Set Identifier)
_lhsIavisitdefs Map Int (Set Identifier)
_lhsIavisituses Attributes
_lhsIchildTypes Map
  Identifier
  (VisitKind
   -> FormatMode
   -> Either
        Error (PP_Doc, Set [Char], Map [Char] (Maybe NonLocalAttr)))
_lhsIchildintros Identifier
_lhsIcon Attributes
_lhsIinhmap Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)
_lhsImrules Map Int StateCtx
_lhsInextVisits Identifier
_lhsInt Options
_lhsIoptions [Identifier]
_lhsIparams Map Int StateCtx
_lhsIprevVisits Map Identifier (Set [Char])
_lhsIruledefs Map Identifier (Map [Char] (Maybe NonLocalAttr))
_lhsIruleuses Attributes
_lhsIsynmap Set [Char]
_lhsIterminaldefs) -> ( let
         _lhsOallvisits :: [VisitStateState]
         _lhsOallvisits :: [VisitStateState]
_lhsOallvisits = () -> [VisitStateState]
forall a. () -> [a]
rule930  ()
         _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
         _lhsOchildvisit :: Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit = ()
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
forall k a. () -> Map k a
rule931  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = () -> Seq Error
forall a. () -> Seq a
rule932  ()
         _lhsOfromToStates :: Map VisitIdentifier (Int,Int)
         _lhsOfromToStates :: Map Int (Int, Int)
_lhsOfromToStates = () -> Map Int (Int, Int)
rule933  ()
         _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))
         _lhsOintramap :: Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap = () -> Map Int (Map [Char] (Maybe NonLocalAttr))
forall k a. () -> Map k a
rule934  ()
         _lhsOlazyIntras :: Set String
         _lhsOlazyIntras :: Set [Char]
_lhsOlazyIntras = () -> Set [Char]
forall a. () -> Set a
rule935  ()
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
         _lhsOruleKinds :: Map Identifier (Set VisitKind)
_lhsOruleKinds = () -> Map Identifier (Set VisitKind)
forall k a. () -> Map k a
rule936  ()
         _lhsOruleUsage :: Map Identifier Int
         _lhsOruleUsage :: Map Identifier Int
_lhsOruleUsage = () -> Map Identifier Int
forall k a. () -> Map k a
rule937  ()
         _lhsOsem_visit ::  [(StateIdentifier,Bool -> PP_Doc)] 
         _lhsOsem_visit :: [(Int, Bool -> PP_Doc)]
_lhsOsem_visit = () -> [(Int, Bool -> PP_Doc)]
forall a. () -> [a]
rule938  ()
         _lhsOt_visits :: PP_Doc
         _lhsOt_visits :: PP_Doc
_lhsOt_visits = () -> PP_Doc
rule939  ()
         _lhsOusedArgs :: Set String
         _lhsOusedArgs :: Set [Char]
_lhsOusedArgs = () -> Set [Char]
forall a. () -> Set a
rule940  ()
         _lhsOvisitKinds :: Map VisitIdentifier VisitKind
         _lhsOvisitKinds :: Map Int VisitKind
_lhsOvisitKinds = () -> Map Int VisitKind
rule941  ()
         _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)
         _lhsOvisitdefs :: Map Int (Set Identifier)
_lhsOvisitdefs = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule942  ()
         _lhsOvisituses :: Map VisitIdentifier (Set Identifier)
         _lhsOvisituses :: Map Int (Set Identifier)
_lhsOvisituses = () -> Map Int (Set Identifier)
forall k a. () -> Map k a
rule943  ()
         __result_ :: T_Visits_vOut55
__result_ = [VisitStateState]
-> Map
     Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
-> Seq Error
-> Map Int (Int, Int)
-> Map Int (Map [Char] (Maybe NonLocalAttr))
-> Set [Char]
-> Map Identifier (Set VisitKind)
-> Map Identifier Int
-> [(Int, Bool -> PP_Doc)]
-> PP_Doc
-> Set [Char]
-> Map Int VisitKind
-> Map Int (Set Identifier)
-> Map Int (Set Identifier)
-> T_Visits_vOut55
T_Visits_vOut55 [VisitStateState]
_lhsOallvisits Map Int (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))
_lhsOchildvisit Seq Error
_lhsOerrors Map Int (Int, Int)
_lhsOfromToStates Map Int (Map [Char] (Maybe NonLocalAttr))
_lhsOintramap Set [Char]
_lhsOlazyIntras Map Identifier (Set VisitKind)
_lhsOruleKinds Map Identifier Int
_lhsOruleUsage [(Int, Bool -> PP_Doc)]
_lhsOsem_visit PP_Doc
_lhsOt_visits Set [Char]
_lhsOusedArgs Map Int VisitKind
_lhsOvisitKinds Map Int (Set Identifier)
_lhsOvisitdefs Map Int (Set Identifier)
_lhsOvisituses
         in T_Visits_vOut55
__result_ )
     in T_Visits_v55 -> T_Visits_s56
C_Visits_s56 T_Visits_v55
v55
   {-# INLINE rule930 #-}
   rule930 :: () -> [a]
rule930 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule931 #-}
   rule931 :: () -> Map k a
rule931 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule932 #-}
   rule932 :: () -> Seq a
rule932 = \  (()
_ :: ()) ->
     Seq a
forall a. Seq a
Seq.empty
   {-# INLINE rule933 #-}
   rule933 :: () -> Map Int (Int, Int)
rule933 = \  (()
_ :: ()) ->
     Map Int (Int, Int)
forall a. Monoid a => a
mempty
   {-# INLINE rule934 #-}
   rule934 :: () -> Map k a
rule934 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule935 #-}
   rule935 :: () -> Set a
rule935 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule936 #-}
   rule936 :: () -> Map k a
rule936 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule937 #-}
   rule937 :: () -> Map k a
rule937 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule938 #-}
   rule938 :: () -> [a]
rule938 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule939 #-}
   rule939 :: () -> PP_Doc
rule939 = \  (()
_ :: ()) ->
     PP_Doc
empty
   {-# INLINE rule940 #-}
   rule940 :: () -> Set a
rule940 = \  (()
_ :: ()) ->
     Set a
forall a. Set a
Set.empty
   {-# INLINE rule941 #-}
   rule941 :: () -> Map Int VisitKind
rule941 = \  (()
_ :: ()) ->
     Map Int VisitKind
forall a. Monoid a => a
mempty
   {-# INLINE rule942 #-}
   rule942 :: () -> Map k a
rule942 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty
   {-# INLINE rule943 #-}
   rule943 :: () -> Map k a
rule943 = \  (()
_ :: ()) ->
     Map k a
forall k a. Map k a
Map.empty