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

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

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

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

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

{-# LINE 5 "src-ag/CodeSyntaxDump.ag" #-}

import Data.List
import qualified Data.Map as Map

import Pretty
import PPUtil

import CodeSyntax
{-# LINE 30 "src-generated/CodeSyntaxDump.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 15 "src-ag/CodeSyntaxDump.ag" #-}

ppChild :: (Identifier,Type,ChildKind) -> PP_Doc
ppChild (nm,tp,_)
  = pp nm >#< "::" >#< pp (show tp)

ppVertexMap :: Map Int (Identifier,Identifier,Maybe Type) -> PP_Doc
ppVertexMap m
  = ppVList [ ppF (show k) $ ppAttr v | (k,v) <- Map.toList m ]

ppAttr :: (Identifier,Identifier,Maybe Type) -> PP_Doc
ppAttr (fld,nm,mTp)
  = pp fld >|< "." >|< pp nm >#<
    case mTp of
      Just tp -> pp "::" >#< show tp
      Nothing -> empty

ppBool :: Bool -> PP_Doc
ppBool True  = pp "T"
ppBool False = pp "F"

ppMaybeShow :: Show a => Maybe a -> PP_Doc
ppMaybeShow (Just x) = pp (show x)
ppMaybeShow Nothing  = pp "_"

ppStrings :: [String] -> PP_Doc
ppStrings = vlist
{-# LINE 60 "src-generated/CodeSyntaxDump.hs" #-}
-- CGrammar ----------------------------------------------------
-- wrapper
data Inh_CGrammar  = Inh_CGrammar {  }
data Syn_CGrammar  = Syn_CGrammar { Syn_CGrammar -> PP_Doc
pp_Syn_CGrammar :: (PP_Doc) }
{-# INLINABLE wrap_CGrammar #-}
wrap_CGrammar :: T_CGrammar  -> Inh_CGrammar  -> (Syn_CGrammar )
wrap_CGrammar :: T_CGrammar -> Inh_CGrammar -> Syn_CGrammar
wrap_CGrammar (T_CGrammar Identity T_CGrammar_s2
act) (Inh_CGrammar
Inh_CGrammar ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CGrammar_s2
sem <- Identity T_CGrammar_s2
act
        let arg1 :: T_CGrammar_vIn1
arg1 = T_CGrammar_vIn1
T_CGrammar_vIn1 
        (T_CGrammar_vOut1 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CGrammar_s2 -> T_CGrammar_v1
inv_CGrammar_s2 T_CGrammar_s2
sem T_CGrammar_vIn1
arg1)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CGrammar
Syn_CGrammar PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CGrammar  = T_CGrammar {
                                 T_CGrammar -> Identity T_CGrammar_s2
attach_T_CGrammar :: Identity (T_CGrammar_s2 )
                                 }
newtype T_CGrammar_s2  = C_CGrammar_s2 {
                                       T_CGrammar_s2 -> T_CGrammar_v1
inv_CGrammar_s2 :: (T_CGrammar_v1 )
                                       }
data T_CGrammar_s3  = C_CGrammar_s3
type T_CGrammar_v1  = (T_CGrammar_vIn1 ) -> (T_CGrammar_vOut1 )
data T_CGrammar_vIn1  = T_CGrammar_vIn1 
data T_CGrammar_vOut1  = T_CGrammar_vOut1 (PP_Doc)
{-# NOINLINE sem_CGrammar_CGrammar #-}
sem_CGrammar_CGrammar :: (TypeSyns) -> (Derivings) -> (Set NontermIdent) -> T_CNonterminals  -> (PragmaMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (Map NontermIdent (Map ConstructorIdent (Set Identifier))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) -> (Bool) -> T_CGrammar 
sem_CGrammar_CGrammar :: [(Identifier, ComplexType)]
-> Map Identifier (Set Identifier)
-> Set Identifier
-> T_CNonterminals
-> PragmaMap
-> ParamMap
-> ContextMap
-> QuantMap
-> PragmaMap
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Bool
-> T_CGrammar
sem_CGrammar_CGrammar [(Identifier, ComplexType)]
arg_typeSyns_ Map Identifier (Set Identifier)
arg_derivings_ Set Identifier
_ T_CNonterminals
arg_nonts_ PragmaMap
_ ParamMap
_ ContextMap
_ QuantMap
_ PragmaMap
_ Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_ Bool
_ = Identity T_CGrammar_s2 -> T_CGrammar
T_CGrammar (forall (m :: * -> *) a. Monad m => a -> m a
return T_CGrammar_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_CGrammar_s2
st2 = let
      v1 :: T_CGrammar_v1 
      v1 :: T_CGrammar_v1
v1 = \ (T_CGrammar_vIn1
T_CGrammar_vIn1 ) -> ( let
         _nontsX11 :: T_CNonterminals_s11
_nontsX11 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CNonterminals -> Identity T_CNonterminals_s11
attach_T_CNonterminals (T_CNonterminals
arg_nonts_))
         (T_CNonterminals_vOut10 PP_Doc
_nontsIpp [PP_Doc]
_nontsIppL) = T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 T_CNonterminals_s11
_nontsX11 (T_CNonterminals_vIn10
T_CNonterminals_vIn10 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc]
-> Map Identifier (Set Identifier)
-> [(Identifier, ComplexType)]
-> PP_Doc
rule0 [PP_Doc]
_nontsIppL Map Identifier (Set Identifier)
arg_derivings_ [(Identifier, ComplexType)]
arg_typeSyns_
         __result_ :: T_CGrammar_vOut1
__result_ = PP_Doc -> T_CGrammar_vOut1
T_CGrammar_vOut1 PP_Doc
_lhsOpp
         in T_CGrammar_vOut1
__result_ )
     in T_CGrammar_v1 -> T_CGrammar_s2
C_CGrammar_s2 T_CGrammar_v1
v1
   {-# INLINE rule0 #-}
   {-# LINE 47 "src-ag/CodeSyntaxDump.ag" #-}
   rule0 = \ ((_nontsIppL) :: [PP_Doc]) derivings_ typeSyns_ ->
                                              {-# LINE 47 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["CGrammar","CGrammar"] []
                                                         [ ppF "typeSyns"  $ ppAssocL typeSyns_
                                                         , ppF "derivings" $ ppMap $ derivings_
                                                         , ppF "nonts"     $ ppVList _nontsIppL
                                                         ] []
                                              {-# LINE 114 "src-generated/CodeSyntaxDump.hs" #-}

-- CInterface --------------------------------------------------
-- wrapper
data Inh_CInterface  = Inh_CInterface {  }
data Syn_CInterface  = Syn_CInterface { Syn_CInterface -> PP_Doc
pp_Syn_CInterface :: (PP_Doc) }
{-# INLINABLE wrap_CInterface #-}
wrap_CInterface :: T_CInterface  -> Inh_CInterface  -> (Syn_CInterface )
wrap_CInterface :: T_CInterface -> Inh_CInterface -> Syn_CInterface
wrap_CInterface (T_CInterface Identity T_CInterface_s5
act) (Inh_CInterface
Inh_CInterface ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CInterface_s5
sem <- Identity T_CInterface_s5
act
        let arg4 :: T_CInterface_vIn4
arg4 = T_CInterface_vIn4
T_CInterface_vIn4 
        (T_CInterface_vOut4 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CInterface_s5 -> T_CInterface_v4
inv_CInterface_s5 T_CInterface_s5
sem T_CInterface_vIn4
arg4)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CInterface
Syn_CInterface PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CInterface  = T_CInterface {
                                     T_CInterface -> Identity T_CInterface_s5
attach_T_CInterface :: Identity (T_CInterface_s5 )
                                     }
newtype T_CInterface_s5  = C_CInterface_s5 {
                                           T_CInterface_s5 -> T_CInterface_v4
inv_CInterface_s5 :: (T_CInterface_v4 )
                                           }
data T_CInterface_s6  = C_CInterface_s6
type T_CInterface_v4  = (T_CInterface_vIn4 ) -> (T_CInterface_vOut4 )
data T_CInterface_vIn4  = T_CInterface_vIn4 
data T_CInterface_vOut4  = T_CInterface_vOut4 (PP_Doc)
{-# NOINLINE sem_CInterface_CInterface #-}
sem_CInterface_CInterface :: T_CSegments  -> T_CInterface 
sem_CInterface_CInterface :: T_CSegments -> T_CInterface
sem_CInterface_CInterface T_CSegments
arg_seg_ = Identity T_CInterface_s5 -> T_CInterface
T_CInterface (forall (m :: * -> *) a. Monad m => a -> m a
return T_CInterface_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_CInterface_s5
st5 = let
      v4 :: T_CInterface_v4 
      v4 :: T_CInterface_v4
v4 = \ (T_CInterface_vIn4
T_CInterface_vIn4 ) -> ( let
         _segX26 :: T_CSegments_s26
_segX26 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CSegments -> Identity T_CSegments_s26
attach_T_CSegments (T_CSegments
arg_seg_))
         (T_CSegments_vOut25 PP_Doc
_segIpp [PP_Doc]
_segIppL) = T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 T_CSegments_s26
_segX26 (T_CSegments_vIn25
T_CSegments_vIn25 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> PP_Doc
rule1 [PP_Doc]
_segIppL
         __result_ :: T_CInterface_vOut4
__result_ = PP_Doc -> T_CInterface_vOut4
T_CInterface_vOut4 PP_Doc
_lhsOpp
         in T_CInterface_vOut4
__result_ )
     in T_CInterface_v4 -> T_CInterface_s5
C_CInterface_s5 T_CInterface_v4
v4
   {-# INLINE rule1 #-}
   {-# LINE 57 "src-ag/CodeSyntaxDump.ag" #-}
   rule1 = \ ((_segIppL) :: [PP_Doc]) ->
                                              {-# LINE 57 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["CInterface","CInterface"] [] [ppF "seg" $ ppVList _segIppL] []
                                              {-# LINE 165 "src-generated/CodeSyntaxDump.hs" #-}

-- CNonterminal ------------------------------------------------
-- wrapper
data Inh_CNonterminal  = Inh_CNonterminal {  }
data Syn_CNonterminal  = Syn_CNonterminal { Syn_CNonterminal -> PP_Doc
pp_Syn_CNonterminal :: (PP_Doc) }
{-# INLINABLE wrap_CNonterminal #-}
wrap_CNonterminal :: T_CNonterminal  -> Inh_CNonterminal  -> (Syn_CNonterminal )
wrap_CNonterminal :: T_CNonterminal -> Inh_CNonterminal -> Syn_CNonterminal
wrap_CNonterminal (T_CNonterminal Identity T_CNonterminal_s8
act) (Inh_CNonterminal
Inh_CNonterminal ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CNonterminal_s8
sem <- Identity T_CNonterminal_s8
act
        let arg7 :: T_CNonterminal_vIn7
arg7 = T_CNonterminal_vIn7
T_CNonterminal_vIn7 
        (T_CNonterminal_vOut7 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CNonterminal_s8 -> T_CNonterminal_v7
inv_CNonterminal_s8 T_CNonterminal_s8
sem T_CNonterminal_vIn7
arg7)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CNonterminal
Syn_CNonterminal PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CNonterminal  = T_CNonterminal {
                                         T_CNonterminal -> Identity T_CNonterminal_s8
attach_T_CNonterminal :: Identity (T_CNonterminal_s8 )
                                         }
newtype T_CNonterminal_s8  = C_CNonterminal_s8 {
                                               T_CNonterminal_s8 -> T_CNonterminal_v7
inv_CNonterminal_s8 :: (T_CNonterminal_v7 )
                                               }
data T_CNonterminal_s9  = C_CNonterminal_s9
type T_CNonterminal_v7  = (T_CNonterminal_vIn7 ) -> (T_CNonterminal_vOut7 )
data T_CNonterminal_vIn7  = T_CNonterminal_vIn7 
data T_CNonterminal_vOut7  = T_CNonterminal_vOut7 (PP_Doc)
{-# NOINLINE sem_CNonterminal_CNonterminal #-}
sem_CNonterminal_CNonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_CProductions  -> T_CInterface  -> T_CNonterminal 
sem_CNonterminal_CNonterminal :: Identifier
-> [Identifier]
-> Map Identifier Type
-> Map Identifier Type
-> T_CProductions
-> T_CInterface
-> T_CNonterminal
sem_CNonterminal_CNonterminal Identifier
arg_nt_ [Identifier]
arg_params_ Map Identifier Type
arg_inh_ Map Identifier Type
arg_syn_ T_CProductions
arg_prods_ T_CInterface
arg_inter_ = Identity T_CNonterminal_s8 -> T_CNonterminal
T_CNonterminal (forall (m :: * -> *) a. Monad m => a -> m a
return T_CNonterminal_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_CNonterminal_s8
st8 = let
      v7 :: T_CNonterminal_v7 
      v7 :: T_CNonterminal_v7
v7 = \ (T_CNonterminal_vIn7
T_CNonterminal_vIn7 ) -> ( let
         _prodsX17 :: T_CProductions_s17
_prodsX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CProductions -> Identity T_CProductions_s17
attach_T_CProductions (T_CProductions
arg_prods_))
         _interX5 :: T_CInterface_s5
_interX5 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CInterface -> Identity T_CInterface_s5
attach_T_CInterface (T_CInterface
arg_inter_))
         (T_CProductions_vOut16 PP_Doc
_prodsIpp [PP_Doc]
_prodsIppL) = T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 T_CProductions_s17
_prodsX17 (T_CProductions_vIn16
T_CProductions_vIn16 )
         (T_CInterface_vOut4 PP_Doc
_interIpp) = T_CInterface_s5 -> T_CInterface_v4
inv_CInterface_s5 T_CInterface_s5
_interX5 (T_CInterface_vIn4
T_CInterface_vIn4 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc
-> [PP_Doc]
-> Map Identifier Type
-> Identifier
-> [Identifier]
-> Map Identifier Type
-> PP_Doc
rule2 PP_Doc
_interIpp [PP_Doc]
_prodsIppL Map Identifier Type
arg_inh_ Identifier
arg_nt_ [Identifier]
arg_params_ Map Identifier Type
arg_syn_
         __result_ :: T_CNonterminal_vOut7
__result_ = PP_Doc -> T_CNonterminal_vOut7
T_CNonterminal_vOut7 PP_Doc
_lhsOpp
         in T_CNonterminal_vOut7
__result_ )
     in T_CNonterminal_v7 -> T_CNonterminal_s8
C_CNonterminal_s8 T_CNonterminal_v7
v7
   {-# INLINE rule2 #-}
   {-# LINE 54 "src-ag/CodeSyntaxDump.ag" #-}
   rule2 = \ ((_interIpp) :: PP_Doc) ((_prodsIppL) :: [PP_Doc]) inh_ nt_ params_ syn_ ->
                                                  {-# LINE 54 "src-ag/CodeSyntaxDump.ag" #-}
                                                  ppNestInfo ["CNonterminal","CNonterminal"] (pp nt_ : map pp params_) [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "prods" $ ppVList _prodsIppL, ppF "inter" _interIpp] []
                                                  {-# LINE 218 "src-generated/CodeSyntaxDump.hs" #-}

-- CNonterminals -----------------------------------------------
-- wrapper
data Inh_CNonterminals  = Inh_CNonterminals {  }
data Syn_CNonterminals  = Syn_CNonterminals { Syn_CNonterminals -> PP_Doc
pp_Syn_CNonterminals :: (PP_Doc), Syn_CNonterminals -> [PP_Doc]
ppL_Syn_CNonterminals :: ([PP_Doc]) }
{-# INLINABLE wrap_CNonterminals #-}
wrap_CNonterminals :: T_CNonterminals  -> Inh_CNonterminals  -> (Syn_CNonterminals )
wrap_CNonterminals :: T_CNonterminals -> Inh_CNonterminals -> Syn_CNonterminals
wrap_CNonterminals (T_CNonterminals Identity T_CNonterminals_s11
act) (Inh_CNonterminals
Inh_CNonterminals ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CNonterminals_s11
sem <- Identity T_CNonterminals_s11
act
        let arg10 :: T_CNonterminals_vIn10
arg10 = T_CNonterminals_vIn10
T_CNonterminals_vIn10 
        (T_CNonterminals_vOut10 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 T_CNonterminals_s11
sem T_CNonterminals_vIn10
arg10)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_CNonterminals
Syn_CNonterminals PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
   )

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

-- semantic domain
newtype T_CNonterminals  = T_CNonterminals {
                                           T_CNonterminals -> Identity T_CNonterminals_s11
attach_T_CNonterminals :: Identity (T_CNonterminals_s11 )
                                           }
newtype T_CNonterminals_s11  = C_CNonterminals_s11 {
                                                   T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 :: (T_CNonterminals_v10 )
                                                   }
data T_CNonterminals_s12  = C_CNonterminals_s12
type T_CNonterminals_v10  = (T_CNonterminals_vIn10 ) -> (T_CNonterminals_vOut10 )
data T_CNonterminals_vIn10  = T_CNonterminals_vIn10 
data T_CNonterminals_vOut10  = T_CNonterminals_vOut10 (PP_Doc) ([PP_Doc])
{-# NOINLINE sem_CNonterminals_Cons #-}
sem_CNonterminals_Cons :: T_CNonterminal  -> T_CNonterminals  -> T_CNonterminals 
sem_CNonterminals_Cons :: T_CNonterminal -> T_CNonterminals -> T_CNonterminals
sem_CNonterminals_Cons T_CNonterminal
arg_hd_ T_CNonterminals
arg_tl_ = Identity T_CNonterminals_s11 -> T_CNonterminals
T_CNonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_CNonterminals_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_CNonterminals_s11
st11 = let
      v10 :: T_CNonterminals_v10 
      v10 :: T_CNonterminals_v10
v10 = \ (T_CNonterminals_vIn10
T_CNonterminals_vIn10 ) -> ( let
         _hdX8 :: T_CNonterminal_s8
_hdX8 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CNonterminal -> Identity T_CNonterminal_s8
attach_T_CNonterminal (T_CNonterminal
arg_hd_))
         _tlX11 :: T_CNonterminals_s11
_tlX11 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CNonterminals -> Identity T_CNonterminals_s11
attach_T_CNonterminals (T_CNonterminals
arg_tl_))
         (T_CNonterminal_vOut7 PP_Doc
_hdIpp) = T_CNonterminal_s8 -> T_CNonterminal_v7
inv_CNonterminal_s8 T_CNonterminal_s8
_hdX8 (T_CNonterminal_vIn7
T_CNonterminal_vIn7 )
         (T_CNonterminals_vOut10 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_CNonterminals_s11 -> T_CNonterminals_v10
inv_CNonterminals_s11 T_CNonterminals_s11
_tlX11 (T_CNonterminals_vIn10
T_CNonterminals_vIn10 )
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule3 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule4 PP_Doc
_hdIpp PP_Doc
_tlIpp
         __result_ :: T_CNonterminals_vOut10
__result_ = PP_Doc -> [PP_Doc] -> T_CNonterminals_vOut10
T_CNonterminals_vOut10 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CNonterminals_vOut10
__result_ )
     in T_CNonterminals_v10 -> T_CNonterminals_s11
C_CNonterminals_s11 T_CNonterminals_v10
v10
   {-# INLINE rule3 #-}
   {-# LINE 102 "src-ag/CodeSyntaxDump.ag" #-}
   rule3 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
                                              {-# LINE 102 "src-ag/CodeSyntaxDump.ag" #-}
                                              _hdIpp : _tlIppL
                                              {-# LINE 273 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule4 #-}
   rule4 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
     _hdIpp >-< _tlIpp
{-# NOINLINE sem_CNonterminals_Nil #-}
sem_CNonterminals_Nil ::  T_CNonterminals 
sem_CNonterminals_Nil :: T_CNonterminals
sem_CNonterminals_Nil  = Identity T_CNonterminals_s11 -> T_CNonterminals
T_CNonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_CNonterminals_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_CNonterminals_s11
st11 = let
      v10 :: T_CNonterminals_v10 
      v10 :: T_CNonterminals_v10
v10 = \ (T_CNonterminals_vIn10
T_CNonterminals_vIn10 ) -> ( let
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = forall {a}. () -> [a]
rule5  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule6  ()
         __result_ :: T_CNonterminals_vOut10
__result_ = PP_Doc -> [PP_Doc] -> T_CNonterminals_vOut10
T_CNonterminals_vOut10 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CNonterminals_vOut10
__result_ )
     in T_CNonterminals_v10 -> T_CNonterminals_s11
C_CNonterminals_s11 T_CNonterminals_v10
v10
   {-# INLINE rule5 #-}
   {-# LINE 103 "src-ag/CodeSyntaxDump.ag" #-}
   rule5 = \  (_ :: ()) ->
                                              {-# LINE 103 "src-ag/CodeSyntaxDump.ag" #-}
                                              []
                                              {-# LINE 296 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule6 #-}
   rule6 = \  (_ :: ()) ->
     empty

-- CProduction -------------------------------------------------
-- wrapper
data Inh_CProduction  = Inh_CProduction {  }
data Syn_CProduction  = Syn_CProduction { Syn_CProduction -> PP_Doc
pp_Syn_CProduction :: (PP_Doc) }
{-# INLINABLE wrap_CProduction #-}
wrap_CProduction :: T_CProduction  -> Inh_CProduction  -> (Syn_CProduction )
wrap_CProduction :: T_CProduction -> Inh_CProduction -> Syn_CProduction
wrap_CProduction (T_CProduction Identity T_CProduction_s14
act) (Inh_CProduction
Inh_CProduction ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CProduction_s14
sem <- Identity T_CProduction_s14
act
        let arg13 :: T_CProduction_vIn13
arg13 = T_CProduction_vIn13
T_CProduction_vIn13 
        (T_CProduction_vOut13 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CProduction_s14 -> T_CProduction_v13
inv_CProduction_s14 T_CProduction_s14
sem T_CProduction_vIn13
arg13)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CProduction
Syn_CProduction PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CProduction  = T_CProduction {
                                       T_CProduction -> Identity T_CProduction_s14
attach_T_CProduction :: Identity (T_CProduction_s14 )
                                       }
newtype T_CProduction_s14  = C_CProduction_s14 {
                                               T_CProduction_s14 -> T_CProduction_v13
inv_CProduction_s14 :: (T_CProduction_v13 )
                                               }
data T_CProduction_s15  = C_CProduction_s15
type T_CProduction_v13  = (T_CProduction_vIn13 ) -> (T_CProduction_vOut13 )
data T_CProduction_vIn13  = T_CProduction_vIn13 
data T_CProduction_vOut13  = T_CProduction_vOut13 (PP_Doc)
{-# NOINLINE sem_CProduction_CProduction #-}
sem_CProduction_CProduction :: (ConstructorIdent) -> T_CVisits  -> ([(Identifier,Type,ChildKind)]) -> ([Identifier]) -> T_CProduction 
sem_CProduction_CProduction :: Identifier
-> T_CVisits
-> [(Identifier, Type, ChildKind)]
-> [Identifier]
-> T_CProduction
sem_CProduction_CProduction Identifier
arg_con_ T_CVisits
arg_visits_ [(Identifier, Type, ChildKind)]
arg_children_ [Identifier]
arg_terminals_ = Identity T_CProduction_s14 -> T_CProduction
T_CProduction (forall (m :: * -> *) a. Monad m => a -> m a
return T_CProduction_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_CProduction_s14
st14 = let
      v13 :: T_CProduction_v13 
      v13 :: T_CProduction_v13
v13 = \ (T_CProduction_vIn13
T_CProduction_vIn13 ) -> ( let
         _visitsX32 :: T_CVisits_s32
_visitsX32 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CVisits -> Identity T_CVisits_s32
attach_T_CVisits (T_CVisits
arg_visits_))
         (T_CVisits_vOut31 PP_Doc
_visitsIpp [PP_Doc]
_visitsIppL) = T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 T_CVisits_s32
_visitsX32 (T_CVisits_vIn31
T_CVisits_vIn31 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc]
-> [(Identifier, Type, ChildKind)]
-> Identifier
-> [Identifier]
-> PP_Doc
rule7 [PP_Doc]
_visitsIppL [(Identifier, Type, ChildKind)]
arg_children_ Identifier
arg_con_ [Identifier]
arg_terminals_
         __result_ :: T_CProduction_vOut13
__result_ = PP_Doc -> T_CProduction_vOut13
T_CProduction_vOut13 PP_Doc
_lhsOpp
         in T_CProduction_vOut13
__result_ )
     in T_CProduction_v13 -> T_CProduction_s14
C_CProduction_s14 T_CProduction_v13
v13
   {-# INLINE rule7 #-}
   {-# LINE 63 "src-ag/CodeSyntaxDump.ag" #-}
   rule7 = \ ((_visitsIppL) :: [PP_Doc]) children_ con_ terminals_ ->
                                          {-# LINE 63 "src-ag/CodeSyntaxDump.ag" #-}
                                          ppNestInfo ["CProduction","CProduction"] [pp con_] [ppF "visits" $ ppVList _visitsIppL, ppF "children" $ ppVList (map ppChild children_),ppF "terminals" $ ppVList (map ppShow terminals_)] []
                                          {-# LINE 350 "src-generated/CodeSyntaxDump.hs" #-}

-- CProductions ------------------------------------------------
-- wrapper
data Inh_CProductions  = Inh_CProductions {  }
data Syn_CProductions  = Syn_CProductions { Syn_CProductions -> PP_Doc
pp_Syn_CProductions :: (PP_Doc), Syn_CProductions -> [PP_Doc]
ppL_Syn_CProductions :: ([PP_Doc]) }
{-# INLINABLE wrap_CProductions #-}
wrap_CProductions :: T_CProductions  -> Inh_CProductions  -> (Syn_CProductions )
wrap_CProductions :: T_CProductions -> Inh_CProductions -> Syn_CProductions
wrap_CProductions (T_CProductions Identity T_CProductions_s17
act) (Inh_CProductions
Inh_CProductions ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CProductions_s17
sem <- Identity T_CProductions_s17
act
        let arg16 :: T_CProductions_vIn16
arg16 = T_CProductions_vIn16
T_CProductions_vIn16 
        (T_CProductions_vOut16 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 T_CProductions_s17
sem T_CProductions_vIn16
arg16)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_CProductions
Syn_CProductions PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
   )

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

-- semantic domain
newtype T_CProductions  = T_CProductions {
                                         T_CProductions -> Identity T_CProductions_s17
attach_T_CProductions :: Identity (T_CProductions_s17 )
                                         }
newtype T_CProductions_s17  = C_CProductions_s17 {
                                                 T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 :: (T_CProductions_v16 )
                                                 }
data T_CProductions_s18  = C_CProductions_s18
type T_CProductions_v16  = (T_CProductions_vIn16 ) -> (T_CProductions_vOut16 )
data T_CProductions_vIn16  = T_CProductions_vIn16 
data T_CProductions_vOut16  = T_CProductions_vOut16 (PP_Doc) ([PP_Doc])
{-# NOINLINE sem_CProductions_Cons #-}
sem_CProductions_Cons :: T_CProduction  -> T_CProductions  -> T_CProductions 
sem_CProductions_Cons :: T_CProduction -> T_CProductions -> T_CProductions
sem_CProductions_Cons T_CProduction
arg_hd_ T_CProductions
arg_tl_ = Identity T_CProductions_s17 -> T_CProductions
T_CProductions (forall (m :: * -> *) a. Monad m => a -> m a
return T_CProductions_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_CProductions_s17
st17 = let
      v16 :: T_CProductions_v16 
      v16 :: T_CProductions_v16
v16 = \ (T_CProductions_vIn16
T_CProductions_vIn16 ) -> ( let
         _hdX14 :: T_CProduction_s14
_hdX14 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CProduction -> Identity T_CProduction_s14
attach_T_CProduction (T_CProduction
arg_hd_))
         _tlX17 :: T_CProductions_s17
_tlX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CProductions -> Identity T_CProductions_s17
attach_T_CProductions (T_CProductions
arg_tl_))
         (T_CProduction_vOut13 PP_Doc
_hdIpp) = T_CProduction_s14 -> T_CProduction_v13
inv_CProduction_s14 T_CProduction_s14
_hdX14 (T_CProduction_vIn13
T_CProduction_vIn13 )
         (T_CProductions_vOut16 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_CProductions_s17 -> T_CProductions_v16
inv_CProductions_s17 T_CProductions_s17
_tlX17 (T_CProductions_vIn16
T_CProductions_vIn16 )
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule8 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule9 PP_Doc
_hdIpp PP_Doc
_tlIpp
         __result_ :: T_CProductions_vOut16
__result_ = PP_Doc -> [PP_Doc] -> T_CProductions_vOut16
T_CProductions_vOut16 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CProductions_vOut16
__result_ )
     in T_CProductions_v16 -> T_CProductions_s17
C_CProductions_s17 T_CProductions_v16
v16
   {-# INLINE rule8 #-}
   {-# LINE 94 "src-ag/CodeSyntaxDump.ag" #-}
   rule8 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
                                              {-# LINE 94 "src-ag/CodeSyntaxDump.ag" #-}
                                              _hdIpp : _tlIppL
                                              {-# LINE 405 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule9 #-}
   rule9 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
     _hdIpp >-< _tlIpp
{-# NOINLINE sem_CProductions_Nil #-}
sem_CProductions_Nil ::  T_CProductions 
sem_CProductions_Nil :: T_CProductions
sem_CProductions_Nil  = Identity T_CProductions_s17 -> T_CProductions
T_CProductions (forall (m :: * -> *) a. Monad m => a -> m a
return T_CProductions_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_CProductions_s17
st17 = let
      v16 :: T_CProductions_v16 
      v16 :: T_CProductions_v16
v16 = \ (T_CProductions_vIn16
T_CProductions_vIn16 ) -> ( let
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = forall {a}. () -> [a]
rule10  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule11  ()
         __result_ :: T_CProductions_vOut16
__result_ = PP_Doc -> [PP_Doc] -> T_CProductions_vOut16
T_CProductions_vOut16 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CProductions_vOut16
__result_ )
     in T_CProductions_v16 -> T_CProductions_s17
C_CProductions_s17 T_CProductions_v16
v16
   {-# INLINE rule10 #-}
   {-# LINE 95 "src-ag/CodeSyntaxDump.ag" #-}
   rule10 = \  (_ :: ()) ->
                                              {-# LINE 95 "src-ag/CodeSyntaxDump.ag" #-}
                                              []
                                              {-# LINE 428 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule11 #-}
   rule11 = \  (_ :: ()) ->
     empty

-- CRule -------------------------------------------------------
-- wrapper
data Inh_CRule  = Inh_CRule {  }
data Syn_CRule  = Syn_CRule { Syn_CRule -> PP_Doc
pp_Syn_CRule :: (PP_Doc) }
{-# INLINABLE wrap_CRule #-}
wrap_CRule :: T_CRule  -> Inh_CRule  -> (Syn_CRule )
wrap_CRule :: T_CRule -> Inh_CRule -> Syn_CRule
wrap_CRule (T_CRule Identity T_CRule_s20
act) (Inh_CRule
Inh_CRule ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CRule_s20
sem <- Identity T_CRule_s20
act
        let arg19 :: T_CRule_vIn19
arg19 = T_CRule_vIn19
T_CRule_vIn19 
        (T_CRule_vOut19 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CRule_s20 -> T_CRule_v19
inv_CRule_s20 T_CRule_s20
sem T_CRule_vIn19
arg19)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CRule
Syn_CRule PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CRule  = T_CRule {
                           T_CRule -> Identity T_CRule_s20
attach_T_CRule :: Identity (T_CRule_s20 )
                           }
newtype T_CRule_s20  = C_CRule_s20 {
                                   T_CRule_s20 -> T_CRule_v19
inv_CRule_s20 :: (T_CRule_v19 )
                                   }
data T_CRule_s21  = C_CRule_s21
type T_CRule_v19  = (T_CRule_vIn19 ) -> (T_CRule_vOut19 )
data T_CRule_vIn19  = T_CRule_vIn19 
data T_CRule_vOut19  = T_CRule_vOut19 (PP_Doc)
{-# NOINLINE sem_CRule_CRule #-}
sem_CRule_CRule :: (Identifier) -> (Bool) -> (Bool) -> (NontermIdent) -> (ConstructorIdent) -> (Identifier) -> (Maybe NontermIdent) -> (Maybe Type) -> T_Pattern  -> ([String]) -> (Map Int (Identifier,Identifier,Maybe Type)) -> (Bool) -> (String) -> (Set (Identifier, Identifier)) -> (Bool) -> (Maybe Identifier) -> T_CRule 
sem_CRule_CRule :: Identifier
-> Bool
-> Bool
-> Identifier
-> Identifier
-> Identifier
-> Maybe Identifier
-> Maybe Type
-> T_Pattern
-> [String]
-> Map Int (Identifier, Identifier, Maybe Type)
-> Bool
-> String
-> Set (Identifier, Identifier)
-> Bool
-> Maybe Identifier
-> T_CRule
sem_CRule_CRule Identifier
arg_name_ Bool
arg_isIn_ Bool
arg_hasCode_ Identifier
arg_nt_ Identifier
arg_con_ Identifier
arg_field_ Maybe Identifier
arg_childnt_ Maybe Type
arg_tp_ T_Pattern
arg_pattern_ [String]
arg_rhs_ Map Int (Identifier, Identifier, Maybe Type)
arg_defines_ Bool
arg_owrt_ String
arg_origin_ Set (Identifier, Identifier)
_ Bool
_ Maybe Identifier
_ = Identity T_CRule_s20 -> T_CRule
T_CRule (forall (m :: * -> *) a. Monad m => a -> m a
return T_CRule_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_CRule_s20
st20 = let
      v19 :: T_CRule_v19 
      v19 :: T_CRule_v19
v19 = \ (T_CRule_vIn19
T_CRule_vIn19 ) -> ( let
         _patternX35 :: T_Pattern_s35
_patternX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s35
attach_T_Pattern (T_Pattern
arg_pattern_))
         (T_Pattern_vOut34 Pattern
_patternIcopy PP_Doc
_patternIpp) = T_Pattern_s35 -> T_Pattern_v34
inv_Pattern_s35 T_Pattern_s35
_patternX35 (T_Pattern_vIn34
T_Pattern_vIn34 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc
-> Maybe Identifier
-> Identifier
-> Map Int (Identifier, Identifier, Maybe Type)
-> Identifier
-> Bool
-> Bool
-> Identifier
-> Identifier
-> String
-> Bool
-> [String]
-> Maybe Type
-> PP_Doc
rule12 PP_Doc
_patternIpp Maybe Identifier
arg_childnt_ Identifier
arg_con_ Map Int (Identifier, Identifier, Maybe Type)
arg_defines_ Identifier
arg_field_ Bool
arg_hasCode_ Bool
arg_isIn_ Identifier
arg_name_ Identifier
arg_nt_ String
arg_origin_ Bool
arg_owrt_ [String]
arg_rhs_ Maybe Type
arg_tp_
         __result_ :: T_CRule_vOut19
__result_ = PP_Doc -> T_CRule_vOut19
T_CRule_vOut19 PP_Doc
_lhsOpp
         in T_CRule_vOut19
__result_ )
     in T_CRule_v19 -> T_CRule_s20
C_CRule_s20 T_CRule_v19
v19
   {-# INLINE rule12 #-}
   {-# LINE 69 "src-ag/CodeSyntaxDump.ag" #-}
   rule12 = \ ((_patternIpp) :: PP_Doc) childnt_ con_ defines_ field_ hasCode_ isIn_ name_ nt_ origin_ owrt_ rhs_ tp_ ->
                                              {-# LINE 69 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["CRule","CRule"] [pp name_] [ppF "isIn" $ ppBool isIn_, ppF "hasCode" $ ppBool hasCode_, ppF "nt" $ pp nt_, ppF "con" $ pp con_, ppF "field" $ pp field_, ppF "childnt" $ ppMaybeShow childnt_, ppF "tp" $ ppMaybeShow tp_, ppF "pattern" $ if isIn_ then pp "<no pat because In>" else _patternIpp, ppF "rhs" $ ppStrings rhs_, ppF "defines" $ ppVertexMap defines_, ppF "owrt" $ ppBool owrt_, ppF "origin" $ pp origin_] []
                                              {-# LINE 483 "src-generated/CodeSyntaxDump.hs" #-}
{-# NOINLINE sem_CRule_CChildVisit #-}
sem_CRule_CChildVisit :: (Identifier) -> (NontermIdent) -> (Int) -> (Attributes) -> (Attributes) -> (Bool) -> T_CRule 
sem_CRule_CChildVisit :: Identifier
-> Identifier
-> Int
-> Map Identifier Type
-> Map Identifier Type
-> Bool
-> T_CRule
sem_CRule_CChildVisit Identifier
arg_name_ Identifier
arg_nt_ Int
arg_nr_ Map Identifier Type
arg_inh_ Map Identifier Type
arg_syn_ Bool
arg_isLast_ = Identity T_CRule_s20 -> T_CRule
T_CRule (forall (m :: * -> *) a. Monad m => a -> m a
return T_CRule_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_CRule_s20
st20 = let
      v19 :: T_CRule_v19 
      v19 :: T_CRule_v19
v19 = \ (T_CRule_vIn19
T_CRule_vIn19 ) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = Map Identifier Type
-> Bool
-> Identifier
-> Int
-> Identifier
-> Map Identifier Type
-> PP_Doc
rule13 Map Identifier Type
arg_inh_ Bool
arg_isLast_ Identifier
arg_name_ Int
arg_nr_ Identifier
arg_nt_ Map Identifier Type
arg_syn_
         __result_ :: T_CRule_vOut19
__result_ = PP_Doc -> T_CRule_vOut19
T_CRule_vOut19 PP_Doc
_lhsOpp
         in T_CRule_vOut19
__result_ )
     in T_CRule_v19 -> T_CRule_s20
C_CRule_s20 T_CRule_v19
v19
   {-# INLINE rule13 #-}
   {-# LINE 70 "src-ag/CodeSyntaxDump.ag" #-}
   rule13 = \ inh_ isLast_ name_ nr_ nt_ syn_ ->
                                              {-# LINE 70 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["CRule","CChildVisit"] [pp name_] [ppF "nt" $ pp nt_, ppF "nr" $ ppShow nr_, ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "last" $ ppBool isLast_] []
                                              {-# LINE 501 "src-generated/CodeSyntaxDump.hs" #-}

-- CSegment ----------------------------------------------------
-- wrapper
data Inh_CSegment  = Inh_CSegment {  }
data Syn_CSegment  = Syn_CSegment { Syn_CSegment -> PP_Doc
pp_Syn_CSegment :: (PP_Doc) }
{-# INLINABLE wrap_CSegment #-}
wrap_CSegment :: T_CSegment  -> Inh_CSegment  -> (Syn_CSegment )
wrap_CSegment :: T_CSegment -> Inh_CSegment -> Syn_CSegment
wrap_CSegment (T_CSegment Identity T_CSegment_s23
act) (Inh_CSegment
Inh_CSegment ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CSegment_s23
sem <- Identity T_CSegment_s23
act
        let arg22 :: T_CSegment_vIn22
arg22 = T_CSegment_vIn22
T_CSegment_vIn22 
        (T_CSegment_vOut22 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CSegment_s23 -> T_CSegment_v22
inv_CSegment_s23 T_CSegment_s23
sem T_CSegment_vIn22
arg22)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CSegment
Syn_CSegment PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CSegment  = T_CSegment {
                                 T_CSegment -> Identity T_CSegment_s23
attach_T_CSegment :: Identity (T_CSegment_s23 )
                                 }
newtype T_CSegment_s23  = C_CSegment_s23 {
                                         T_CSegment_s23 -> T_CSegment_v22
inv_CSegment_s23 :: (T_CSegment_v22 )
                                         }
data T_CSegment_s24  = C_CSegment_s24
type T_CSegment_v22  = (T_CSegment_vIn22 ) -> (T_CSegment_vOut22 )
data T_CSegment_vIn22  = T_CSegment_vIn22 
data T_CSegment_vOut22  = T_CSegment_vOut22 (PP_Doc)
{-# NOINLINE sem_CSegment_CSegment #-}
sem_CSegment_CSegment :: (Attributes) -> (Attributes) -> T_CSegment 
sem_CSegment_CSegment :: Map Identifier Type -> Map Identifier Type -> T_CSegment
sem_CSegment_CSegment Map Identifier Type
arg_inh_ Map Identifier Type
arg_syn_ = Identity T_CSegment_s23 -> T_CSegment
T_CSegment (forall (m :: * -> *) a. Monad m => a -> m a
return T_CSegment_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_CSegment_s23
st23 = let
      v22 :: T_CSegment_v22 
      v22 :: T_CSegment_v22
v22 = \ (T_CSegment_vIn22
T_CSegment_vIn22 ) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = Map Identifier Type -> Map Identifier Type -> PP_Doc
rule14 Map Identifier Type
arg_inh_ Map Identifier Type
arg_syn_
         __result_ :: T_CSegment_vOut22
__result_ = PP_Doc -> T_CSegment_vOut22
T_CSegment_vOut22 PP_Doc
_lhsOpp
         in T_CSegment_vOut22
__result_ )
     in T_CSegment_v22 -> T_CSegment_s23
C_CSegment_s23 T_CSegment_v22
v22
   {-# INLINE rule14 #-}
   {-# LINE 60 "src-ag/CodeSyntaxDump.ag" #-}
   rule14 = \ inh_ syn_ ->
                                              {-# LINE 60 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["CSegment","CSegment"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_] []
                                              {-# LINE 550 "src-generated/CodeSyntaxDump.hs" #-}

-- CSegments ---------------------------------------------------
-- wrapper
data Inh_CSegments  = Inh_CSegments {  }
data Syn_CSegments  = Syn_CSegments { Syn_CSegments -> PP_Doc
pp_Syn_CSegments :: (PP_Doc), Syn_CSegments -> [PP_Doc]
ppL_Syn_CSegments :: ([PP_Doc]) }
{-# INLINABLE wrap_CSegments #-}
wrap_CSegments :: T_CSegments  -> Inh_CSegments  -> (Syn_CSegments )
wrap_CSegments :: T_CSegments -> Inh_CSegments -> Syn_CSegments
wrap_CSegments (T_CSegments Identity T_CSegments_s26
act) (Inh_CSegments
Inh_CSegments ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CSegments_s26
sem <- Identity T_CSegments_s26
act
        let arg25 :: T_CSegments_vIn25
arg25 = T_CSegments_vIn25
T_CSegments_vIn25 
        (T_CSegments_vOut25 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 T_CSegments_s26
sem T_CSegments_vIn25
arg25)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_CSegments
Syn_CSegments PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
   )

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

-- semantic domain
newtype T_CSegments  = T_CSegments {
                                   T_CSegments -> Identity T_CSegments_s26
attach_T_CSegments :: Identity (T_CSegments_s26 )
                                   }
newtype T_CSegments_s26  = C_CSegments_s26 {
                                           T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 :: (T_CSegments_v25 )
                                           }
data T_CSegments_s27  = C_CSegments_s27
type T_CSegments_v25  = (T_CSegments_vIn25 ) -> (T_CSegments_vOut25 )
data T_CSegments_vIn25  = T_CSegments_vIn25 
data T_CSegments_vOut25  = T_CSegments_vOut25 (PP_Doc) ([PP_Doc])
{-# NOINLINE sem_CSegments_Cons #-}
sem_CSegments_Cons :: T_CSegment  -> T_CSegments  -> T_CSegments 
sem_CSegments_Cons :: T_CSegment -> T_CSegments -> T_CSegments
sem_CSegments_Cons T_CSegment
arg_hd_ T_CSegments
arg_tl_ = Identity T_CSegments_s26 -> T_CSegments
T_CSegments (forall (m :: * -> *) a. Monad m => a -> m a
return T_CSegments_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_CSegments_s26
st26 = let
      v25 :: T_CSegments_v25 
      v25 :: T_CSegments_v25
v25 = \ (T_CSegments_vIn25
T_CSegments_vIn25 ) -> ( let
         _hdX23 :: T_CSegment_s23
_hdX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CSegment -> Identity T_CSegment_s23
attach_T_CSegment (T_CSegment
arg_hd_))
         _tlX26 :: T_CSegments_s26
_tlX26 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CSegments -> Identity T_CSegments_s26
attach_T_CSegments (T_CSegments
arg_tl_))
         (T_CSegment_vOut22 PP_Doc
_hdIpp) = T_CSegment_s23 -> T_CSegment_v22
inv_CSegment_s23 T_CSegment_s23
_hdX23 (T_CSegment_vIn22
T_CSegment_vIn22 )
         (T_CSegments_vOut25 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_CSegments_s26 -> T_CSegments_v25
inv_CSegments_s26 T_CSegments_s26
_tlX26 (T_CSegments_vIn25
T_CSegments_vIn25 )
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule15 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule16 PP_Doc
_hdIpp PP_Doc
_tlIpp
         __result_ :: T_CSegments_vOut25
__result_ = PP_Doc -> [PP_Doc] -> T_CSegments_vOut25
T_CSegments_vOut25 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CSegments_vOut25
__result_ )
     in T_CSegments_v25 -> T_CSegments_s26
C_CSegments_s26 T_CSegments_v25
v25
   {-# INLINE rule15 #-}
   {-# LINE 98 "src-ag/CodeSyntaxDump.ag" #-}
   rule15 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
                                              {-# LINE 98 "src-ag/CodeSyntaxDump.ag" #-}
                                              _hdIpp : _tlIppL
                                              {-# LINE 605 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule16 #-}
   rule16 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
     _hdIpp >-< _tlIpp
{-# NOINLINE sem_CSegments_Nil #-}
sem_CSegments_Nil ::  T_CSegments 
sem_CSegments_Nil :: T_CSegments
sem_CSegments_Nil  = Identity T_CSegments_s26 -> T_CSegments
T_CSegments (forall (m :: * -> *) a. Monad m => a -> m a
return T_CSegments_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_CSegments_s26
st26 = let
      v25 :: T_CSegments_v25 
      v25 :: T_CSegments_v25
v25 = \ (T_CSegments_vIn25
T_CSegments_vIn25 ) -> ( let
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = forall {a}. () -> [a]
rule17  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule18  ()
         __result_ :: T_CSegments_vOut25
__result_ = PP_Doc -> [PP_Doc] -> T_CSegments_vOut25
T_CSegments_vOut25 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CSegments_vOut25
__result_ )
     in T_CSegments_v25 -> T_CSegments_s26
C_CSegments_s26 T_CSegments_v25
v25
   {-# INLINE rule17 #-}
   {-# LINE 99 "src-ag/CodeSyntaxDump.ag" #-}
   rule17 = \  (_ :: ()) ->
                                              {-# LINE 99 "src-ag/CodeSyntaxDump.ag" #-}
                                              []
                                              {-# LINE 628 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule18 #-}
   rule18 = \  (_ :: ()) ->
     empty

-- CVisit ------------------------------------------------------
-- wrapper
data Inh_CVisit  = Inh_CVisit {  }
data Syn_CVisit  = Syn_CVisit { Syn_CVisit -> PP_Doc
pp_Syn_CVisit :: (PP_Doc) }
{-# INLINABLE wrap_CVisit #-}
wrap_CVisit :: T_CVisit  -> Inh_CVisit  -> (Syn_CVisit )
wrap_CVisit :: T_CVisit -> Inh_CVisit -> Syn_CVisit
wrap_CVisit (T_CVisit Identity T_CVisit_s29
act) (Inh_CVisit
Inh_CVisit ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CVisit_s29
sem <- Identity T_CVisit_s29
act
        let arg28 :: T_CVisit_vIn28
arg28 = T_CVisit_vIn28
T_CVisit_vIn28 
        (T_CVisit_vOut28 PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CVisit_s29 -> T_CVisit_v28
inv_CVisit_s29 T_CVisit_s29
sem T_CVisit_vIn28
arg28)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_CVisit
Syn_CVisit PP_Doc
_lhsOpp)
   )

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

-- semantic domain
newtype T_CVisit  = T_CVisit {
                             T_CVisit -> Identity T_CVisit_s29
attach_T_CVisit :: Identity (T_CVisit_s29 )
                             }
newtype T_CVisit_s29  = C_CVisit_s29 {
                                     T_CVisit_s29 -> T_CVisit_v28
inv_CVisit_s29 :: (T_CVisit_v28 )
                                     }
data T_CVisit_s30  = C_CVisit_s30
type T_CVisit_v28  = (T_CVisit_vIn28 ) -> (T_CVisit_vOut28 )
data T_CVisit_vIn28  = T_CVisit_vIn28 
data T_CVisit_vOut28  = T_CVisit_vOut28 (PP_Doc)
{-# NOINLINE sem_CVisit_CVisit #-}
sem_CVisit_CVisit :: (Attributes) -> (Attributes) -> T_Sequence  -> T_Sequence  -> (Bool) -> T_CVisit 
sem_CVisit_CVisit :: Map Identifier Type
-> Map Identifier Type
-> T_Sequence
-> T_Sequence
-> Bool
-> T_CVisit
sem_CVisit_CVisit Map Identifier Type
arg_inh_ Map Identifier Type
arg_syn_ T_Sequence
arg_vss_ T_Sequence
arg_intra_ Bool
arg_ordered_ = Identity T_CVisit_s29 -> T_CVisit
T_CVisit (forall (m :: * -> *) a. Monad m => a -> m a
return T_CVisit_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_CVisit_s29
st29 = let
      v28 :: T_CVisit_v28 
      v28 :: T_CVisit_v28
v28 = \ (T_CVisit_vIn28
T_CVisit_vIn28 ) -> ( let
         _vssX41 :: T_Sequence_s41
_vssX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Sequence -> Identity T_Sequence_s41
attach_T_Sequence (T_Sequence
arg_vss_))
         _intraX41 :: T_Sequence_s41
_intraX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Sequence -> Identity T_Sequence_s41
attach_T_Sequence (T_Sequence
arg_intra_))
         (T_Sequence_vOut40 [PP_Doc]
_vssIppL) = T_Sequence_s41 -> T_Sequence_v40
inv_Sequence_s41 T_Sequence_s41
_vssX41 (T_Sequence_vIn40
T_Sequence_vIn40 )
         (T_Sequence_vOut40 [PP_Doc]
_intraIppL) = T_Sequence_s41 -> T_Sequence_v40
inv_Sequence_s41 T_Sequence_s41
_intraX41 (T_Sequence_vIn40
T_Sequence_vIn40 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc]
-> [PP_Doc]
-> Map Identifier Type
-> Bool
-> Map Identifier Type
-> PP_Doc
rule19 [PP_Doc]
_intraIppL [PP_Doc]
_vssIppL Map Identifier Type
arg_inh_ Bool
arg_ordered_ Map Identifier Type
arg_syn_
         __result_ :: T_CVisit_vOut28
__result_ = PP_Doc -> T_CVisit_vOut28
T_CVisit_vOut28 PP_Doc
_lhsOpp
         in T_CVisit_vOut28
__result_ )
     in T_CVisit_v28 -> T_CVisit_s29
C_CVisit_s29 T_CVisit_v28
v28
   {-# INLINE rule19 #-}
   {-# LINE 66 "src-ag/CodeSyntaxDump.ag" #-}
   rule19 = \ ((_intraIppL) :: [PP_Doc]) ((_vssIppL) :: [PP_Doc]) inh_ ordered_ syn_ ->
                                              {-# LINE 66 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["CVisit","CVisit"] [] [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "sequence" $ ppVList _vssIppL, ppF "intra" $ ppVList _intraIppL, ppF "ordered" $ ppBool ordered_] []
                                              {-# LINE 684 "src-generated/CodeSyntaxDump.hs" #-}

-- CVisits -----------------------------------------------------
-- wrapper
data Inh_CVisits  = Inh_CVisits {  }
data Syn_CVisits  = Syn_CVisits { Syn_CVisits -> PP_Doc
pp_Syn_CVisits :: (PP_Doc), Syn_CVisits -> [PP_Doc]
ppL_Syn_CVisits :: ([PP_Doc]) }
{-# INLINABLE wrap_CVisits #-}
wrap_CVisits :: T_CVisits  -> Inh_CVisits  -> (Syn_CVisits )
wrap_CVisits :: T_CVisits -> Inh_CVisits -> Syn_CVisits
wrap_CVisits (T_CVisits Identity T_CVisits_s32
act) (Inh_CVisits
Inh_CVisits ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_CVisits_s32
sem <- Identity T_CVisits_s32
act
        let arg31 :: T_CVisits_vIn31
arg31 = T_CVisits_vIn31
T_CVisits_vIn31 
        (T_CVisits_vOut31 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 T_CVisits_s32
sem T_CVisits_vIn31
arg31)
        forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_CVisits
Syn_CVisits PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
   )

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

-- semantic domain
newtype T_CVisits  = T_CVisits {
                               T_CVisits -> Identity T_CVisits_s32
attach_T_CVisits :: Identity (T_CVisits_s32 )
                               }
newtype T_CVisits_s32  = C_CVisits_s32 {
                                       T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 :: (T_CVisits_v31 )
                                       }
data T_CVisits_s33  = C_CVisits_s33
type T_CVisits_v31  = (T_CVisits_vIn31 ) -> (T_CVisits_vOut31 )
data T_CVisits_vIn31  = T_CVisits_vIn31 
data T_CVisits_vOut31  = T_CVisits_vOut31 (PP_Doc) ([PP_Doc])
{-# NOINLINE sem_CVisits_Cons #-}
sem_CVisits_Cons :: T_CVisit  -> T_CVisits  -> T_CVisits 
sem_CVisits_Cons :: T_CVisit -> T_CVisits -> T_CVisits
sem_CVisits_Cons T_CVisit
arg_hd_ T_CVisits
arg_tl_ = Identity T_CVisits_s32 -> T_CVisits
T_CVisits (forall (m :: * -> *) a. Monad m => a -> m a
return T_CVisits_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_CVisits_s32
st32 = let
      v31 :: T_CVisits_v31 
      v31 :: T_CVisits_v31
v31 = \ (T_CVisits_vIn31
T_CVisits_vIn31 ) -> ( let
         _hdX29 :: T_CVisit_s29
_hdX29 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CVisit -> Identity T_CVisit_s29
attach_T_CVisit (T_CVisit
arg_hd_))
         _tlX32 :: T_CVisits_s32
_tlX32 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CVisits -> Identity T_CVisits_s32
attach_T_CVisits (T_CVisits
arg_tl_))
         (T_CVisit_vOut28 PP_Doc
_hdIpp) = T_CVisit_s29 -> T_CVisit_v28
inv_CVisit_s29 T_CVisit_s29
_hdX29 (T_CVisit_vIn28
T_CVisit_vIn28 )
         (T_CVisits_vOut31 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_CVisits_s32 -> T_CVisits_v31
inv_CVisits_s32 T_CVisits_s32
_tlX32 (T_CVisits_vIn31
T_CVisits_vIn31 )
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule20 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule21 PP_Doc
_hdIpp PP_Doc
_tlIpp
         __result_ :: T_CVisits_vOut31
__result_ = PP_Doc -> [PP_Doc] -> T_CVisits_vOut31
T_CVisits_vOut31 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CVisits_vOut31
__result_ )
     in T_CVisits_v31 -> T_CVisits_s32
C_CVisits_s32 T_CVisits_v31
v31
   {-# INLINE rule20 #-}
   {-# LINE 90 "src-ag/CodeSyntaxDump.ag" #-}
   rule20 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
                                              {-# LINE 90 "src-ag/CodeSyntaxDump.ag" #-}
                                              _hdIpp : _tlIppL
                                              {-# LINE 739 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule21 #-}
   rule21 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
     _hdIpp >-< _tlIpp
{-# NOINLINE sem_CVisits_Nil #-}
sem_CVisits_Nil ::  T_CVisits 
sem_CVisits_Nil :: T_CVisits
sem_CVisits_Nil  = Identity T_CVisits_s32 -> T_CVisits
T_CVisits (forall (m :: * -> *) a. Monad m => a -> m a
return T_CVisits_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_CVisits_s32
st32 = let
      v31 :: T_CVisits_v31 
      v31 :: T_CVisits_v31
v31 = \ (T_CVisits_vIn31
T_CVisits_vIn31 ) -> ( let
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = forall {a}. () -> [a]
rule22  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule23  ()
         __result_ :: T_CVisits_vOut31
__result_ = PP_Doc -> [PP_Doc] -> T_CVisits_vOut31
T_CVisits_vOut31 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_CVisits_vOut31
__result_ )
     in T_CVisits_v31 -> T_CVisits_s32
C_CVisits_s32 T_CVisits_v31
v31
   {-# INLINE rule22 #-}
   {-# LINE 91 "src-ag/CodeSyntaxDump.ag" #-}
   rule22 = \  (_ :: ()) ->
                                              {-# LINE 91 "src-ag/CodeSyntaxDump.ag" #-}
                                              []
                                              {-# LINE 762 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule23 #-}
   rule23 = \  (_ :: ()) ->
     empty

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern {  }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> PP_Doc
pp_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_s35
act) (Inh_Pattern
Inh_Pattern ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Pattern_s35
sem <- Identity T_Pattern_s35
act
        let arg34 :: T_Pattern_vIn34
arg34 = T_Pattern_vIn34
T_Pattern_vIn34 
        (T_Pattern_vOut34 Pattern
_lhsOcopy PP_Doc
_lhsOpp) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s35 -> T_Pattern_v34
inv_Pattern_s35 T_Pattern_s35
sem T_Pattern_vIn34
arg34)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern -> PP_Doc -> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy PP_Doc
_lhsOpp)
   )

-- 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_s35
attach_T_Pattern :: Identity (T_Pattern_s35 )
                               }
newtype T_Pattern_s35  = C_Pattern_s35 {
                                       T_Pattern_s35 -> T_Pattern_v34
inv_Pattern_s35 :: (T_Pattern_v34 )
                                       }
data T_Pattern_s36  = C_Pattern_s36
type T_Pattern_v34  = (T_Pattern_vIn34 ) -> (T_Pattern_vOut34 )
data T_Pattern_vIn34  = T_Pattern_vIn34 
data T_Pattern_vOut34  = T_Pattern_vOut34 (Pattern) (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_s35 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Pattern_s35
st35 = let
      v34 :: T_Pattern_v34 
      v34 :: T_Pattern_v34
v34 = \ (T_Pattern_vIn34
T_Pattern_vIn34 ) -> ( let
         _patsX38 :: T_Patterns_s38
_patsX38 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s38
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut37 Patterns
_patsIcopy PP_Doc
_patsIpp [PP_Doc]
_patsIppL) = T_Patterns_s38 -> T_Patterns_v37
inv_Patterns_s38 T_Patterns_s38
_patsX38 (T_Patterns_vIn37
T_Patterns_vIn37 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> Identifier -> PP_Doc
rule24 [PP_Doc]
_patsIppL Identifier
arg_name_
         _copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule25 Patterns
_patsIcopy Identifier
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule26 Pattern
_copy
         __result_ :: T_Pattern_vOut34
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut34
T_Pattern_vOut34 Pattern
_lhsOcopy PP_Doc
_lhsOpp
         in T_Pattern_vOut34
__result_ )
     in T_Pattern_v34 -> T_Pattern_s35
C_Pattern_s35 T_Pattern_v34
v34
   {-# INLINE rule24 #-}
   {-# LINE 73 "src-ag/CodeSyntaxDump.ag" #-}
   rule24 = \ ((_patsIppL) :: [PP_Doc]) name_ ->
                                              {-# LINE 73 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []
                                              {-# LINE 823 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule25 #-}
   rule25 = \ ((_patsIcopy) :: Patterns) name_ ->
     Constr name_ _patsIcopy
   {-# INLINE rule26 #-}
   rule26 = \ _copy ->
     _copy
{-# NOINLINE sem_Pattern_Product #-}
sem_Pattern_Product :: (Pos) -> T_Patterns  -> T_Pattern 
sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
arg_pos_ T_Patterns
arg_pats_ = Identity T_Pattern_s35 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Pattern_s35
st35 = let
      v34 :: T_Pattern_v34 
      v34 :: T_Pattern_v34
v34 = \ (T_Pattern_vIn34
T_Pattern_vIn34 ) -> ( let
         _patsX38 :: T_Patterns_s38
_patsX38 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s38
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut37 Patterns
_patsIcopy PP_Doc
_patsIpp [PP_Doc]
_patsIppL) = T_Patterns_s38 -> T_Patterns_v37
inv_Patterns_s38 T_Patterns_s38
_patsX38 (T_Patterns_vIn37
T_Patterns_vIn37 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> Pos -> PP_Doc
rule27 [PP_Doc]
_patsIppL Pos
arg_pos_
         _copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule28 Patterns
_patsIcopy Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule29 Pattern
_copy
         __result_ :: T_Pattern_vOut34
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut34
T_Pattern_vOut34 Pattern
_lhsOcopy PP_Doc
_lhsOpp
         in T_Pattern_vOut34
__result_ )
     in T_Pattern_v34 -> T_Pattern_s35
C_Pattern_s35 T_Pattern_v34
v34
   {-# INLINE rule27 #-}
   {-# LINE 74 "src-ag/CodeSyntaxDump.ag" #-}
   rule27 = \ ((_patsIppL) :: [PP_Doc]) pos_ ->
                                              {-# LINE 74 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []
                                              {-# LINE 852 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule28 #-}
   rule28 = \ ((_patsIcopy) :: Patterns) pos_ ->
     Product pos_ _patsIcopy
   {-# INLINE rule29 #-}
   rule29 = \ _copy ->
     _copy
{-# 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_s35 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Pattern_s35
st35 = let
      v34 :: T_Pattern_v34 
      v34 :: T_Pattern_v34
v34 = \ (T_Pattern_vIn34
T_Pattern_vIn34 ) -> ( let
         _patX35 :: T_Pattern_s35
_patX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s35
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut34 Pattern
_patIcopy PP_Doc
_patIpp) = T_Pattern_s35 -> T_Pattern_v34
inv_Pattern_s35 T_Pattern_s35
_patX35 (T_Pattern_vIn34
T_Pattern_vIn34 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> Identifier -> Identifier -> PP_Doc
rule30 PP_Doc
_patIpp Identifier
arg_attr_ Identifier
arg_field_
         _copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule31 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule32 Pattern
_copy
         __result_ :: T_Pattern_vOut34
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut34
T_Pattern_vOut34 Pattern
_lhsOcopy PP_Doc
_lhsOpp
         in T_Pattern_vOut34
__result_ )
     in T_Pattern_v34 -> T_Pattern_s35
C_Pattern_s35 T_Pattern_v34
v34
   {-# INLINE rule30 #-}
   {-# LINE 75 "src-ag/CodeSyntaxDump.ag" #-}
   rule30 = \ ((_patIpp) :: PP_Doc) attr_ field_ ->
                                              {-# LINE 75 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []
                                              {-# LINE 881 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule31 #-}
   rule31 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule32 #-}
   rule32 = \ _copy ->
     _copy
{-# NOINLINE sem_Pattern_Irrefutable #-}
sem_Pattern_Irrefutable :: T_Pattern  -> T_Pattern 
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable T_Pattern
arg_pat_ = Identity T_Pattern_s35 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Pattern_s35
st35 = let
      v34 :: T_Pattern_v34 
      v34 :: T_Pattern_v34
v34 = \ (T_Pattern_vIn34
T_Pattern_vIn34 ) -> ( let
         _patX35 :: T_Pattern_s35
_patX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s35
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut34 Pattern
_patIcopy PP_Doc
_patIpp) = T_Pattern_s35 -> T_Pattern_v34
inv_Pattern_s35 T_Pattern_s35
_patX35 (T_Pattern_vIn34
T_Pattern_vIn34 )
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule33 PP_Doc
_patIpp
         _copy :: Pattern
_copy = Pattern -> Pattern
rule34 Pattern
_patIcopy
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule35 Pattern
_copy
         __result_ :: T_Pattern_vOut34
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut34
T_Pattern_vOut34 Pattern
_lhsOcopy PP_Doc
_lhsOpp
         in T_Pattern_vOut34
__result_ )
     in T_Pattern_v34 -> T_Pattern_s35
C_Pattern_s35 T_Pattern_v34
v34
   {-# INLINE rule33 #-}
   rule33 :: PP_Doc -> PP_Doc
rule33 = \ ((PP_Doc
_patIpp) :: PP_Doc) ->
     PP_Doc
_patIpp
   {-# INLINE rule34 #-}
   rule34 :: Pattern -> Pattern
rule34 = \ ((Pattern
_patIcopy) :: Pattern) ->
     Pattern -> Pattern
Irrefutable Pattern
_patIcopy
   {-# INLINE rule35 #-}
   rule35 :: p -> p
rule35 = \ p
_copy ->
     p
_copy
{-# NOINLINE sem_Pattern_Underscore #-}
sem_Pattern_Underscore :: (Pos) -> T_Pattern 
sem_Pattern_Underscore :: Pos -> T_Pattern
sem_Pattern_Underscore Pos
arg_pos_ = Identity T_Pattern_s35 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Pattern_s35
st35 = let
      v34 :: T_Pattern_v34 
      v34 :: T_Pattern_v34
v34 = \ (T_Pattern_vIn34
T_Pattern_vIn34 ) -> ( let
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = Pos -> PP_Doc
rule36 Pos
arg_pos_
         _copy :: Pattern
_copy = Pos -> Pattern
rule37 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule38 Pattern
_copy
         __result_ :: T_Pattern_vOut34
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut34
T_Pattern_vOut34 Pattern
_lhsOcopy PP_Doc
_lhsOpp
         in T_Pattern_vOut34
__result_ )
     in T_Pattern_v34 -> T_Pattern_s35
C_Pattern_s35 T_Pattern_v34
v34
   {-# INLINE rule36 #-}
   {-# LINE 76 "src-ag/CodeSyntaxDump.ag" #-}
   rule36 = \ pos_ ->
                                              {-# LINE 76 "src-ag/CodeSyntaxDump.ag" #-}
                                              ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []
                                              {-# LINE 934 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule37 #-}
   rule37 = \ pos_ ->
     Underscore pos_
   {-# INLINE rule38 #-}
   rule38 = \ _copy ->
     _copy

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns {  }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> PP_Doc
pp_Syn_Patterns :: (PP_Doc), Syn_Patterns -> [PP_Doc]
ppL_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_s38
act) (Inh_Patterns
Inh_Patterns ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Patterns_s38
sem <- Identity T_Patterns_s38
act
        let arg37 :: T_Patterns_vIn37
arg37 = T_Patterns_vIn37
T_Patterns_vIn37 
        (T_Patterns_vOut37 Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s38 -> T_Patterns_v37
inv_Patterns_s38 T_Patterns_s38
sem T_Patterns_vIn37
arg37)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns -> PP_Doc -> [PP_Doc] -> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
   )

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

-- semantic domain
newtype T_Patterns  = T_Patterns {
                                 T_Patterns -> Identity T_Patterns_s38
attach_T_Patterns :: Identity (T_Patterns_s38 )
                                 }
newtype T_Patterns_s38  = C_Patterns_s38 {
                                         T_Patterns_s38 -> T_Patterns_v37
inv_Patterns_s38 :: (T_Patterns_v37 )
                                         }
data T_Patterns_s39  = C_Patterns_s39
type T_Patterns_v37  = (T_Patterns_vIn37 ) -> (T_Patterns_vOut37 )
data T_Patterns_vIn37  = T_Patterns_vIn37 
data T_Patterns_vOut37  = T_Patterns_vOut37 (Patterns) (PP_Doc) ([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_s38 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_Patterns_s38
st38 = let
      v37 :: T_Patterns_v37 
      v37 :: T_Patterns_v37
v37 = \ (T_Patterns_vIn37
T_Patterns_vIn37 ) -> ( let
         _hdX35 :: T_Pattern_s35
_hdX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s35
attach_T_Pattern (T_Pattern
arg_hd_))
         _tlX38 :: T_Patterns_s38
_tlX38 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s38
attach_T_Patterns (T_Patterns
arg_tl_))
         (T_Pattern_vOut34 Pattern
_hdIcopy PP_Doc
_hdIpp) = T_Pattern_s35 -> T_Pattern_v34
inv_Pattern_s35 T_Pattern_s35
_hdX35 (T_Pattern_vIn34
T_Pattern_vIn34 )
         (T_Patterns_vOut37 Patterns
_tlIcopy PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_Patterns_s38 -> T_Patterns_v37
inv_Patterns_s38 T_Patterns_s38
_tlX38 (T_Patterns_vIn37
T_Patterns_vIn37 )
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule39 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule40 PP_Doc
_hdIpp PP_Doc
_tlIpp
         _copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule41 Pattern
_hdIcopy Patterns
_tlIcopy
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall {p}. p -> p
rule42 Patterns
_copy
         __result_ :: T_Patterns_vOut37
__result_ = Patterns -> PP_Doc -> [PP_Doc] -> T_Patterns_vOut37
T_Patterns_vOut37 Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_Patterns_vOut37
__result_ )
     in T_Patterns_v37 -> T_Patterns_s38
C_Patterns_s38 T_Patterns_v37
v37
   {-# INLINE rule39 #-}
   {-# LINE 82 "src-ag/CodeSyntaxDump.ag" #-}
   rule39 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
                                              {-# LINE 82 "src-ag/CodeSyntaxDump.ag" #-}
                                              _hdIpp : _tlIppL
                                              {-# LINE 998 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule40 #-}
   rule40 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
     _hdIpp >-< _tlIpp
   {-# INLINE rule41 #-}
   rule41 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->
     (:) _hdIcopy _tlIcopy
   {-# INLINE rule42 #-}
   rule42 = \ _copy ->
     _copy
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil ::  T_Patterns 
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil  = Identity T_Patterns_s38 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_Patterns_s38
st38 = let
      v37 :: T_Patterns_v37 
      v37 :: T_Patterns_v37
v37 = \ (T_Patterns_vIn37
T_Patterns_vIn37 ) -> ( let
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = forall {a}. () -> [a]
rule43  ()
         _lhsOpp :: PP_Doc
         _lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule44  ()
         _copy :: [a]
_copy = forall {a}. () -> [a]
rule45  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall {p}. p -> p
rule46 forall a. [a]
_copy
         __result_ :: T_Patterns_vOut37
__result_ = Patterns -> PP_Doc -> [PP_Doc] -> T_Patterns_vOut37
T_Patterns_vOut37 Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
         in T_Patterns_vOut37
__result_ )
     in T_Patterns_v37 -> T_Patterns_s38
C_Patterns_s38 T_Patterns_v37
v37
   {-# INLINE rule43 #-}
   {-# LINE 83 "src-ag/CodeSyntaxDump.ag" #-}
   rule43 = \  (_ :: ()) ->
                                              {-# LINE 83 "src-ag/CodeSyntaxDump.ag" #-}
                                              []
                                              {-# LINE 1030 "src-generated/CodeSyntaxDump.hs" #-}
   {-# INLINE rule44 #-}
   rule44 = \  (_ :: ()) ->
     empty
   {-# INLINE rule45 #-}
   rule45 = \  (_ :: ()) ->
     []
   {-# INLINE rule46 #-}
   rule46 = \ _copy ->
     _copy

-- Sequence ----------------------------------------------------
-- wrapper
data Inh_Sequence  = Inh_Sequence {  }
data Syn_Sequence  = Syn_Sequence { Syn_Sequence -> [PP_Doc]
ppL_Syn_Sequence :: ([PP_Doc]) }
{-# INLINABLE wrap_Sequence #-}
wrap_Sequence :: T_Sequence  -> Inh_Sequence  -> (Syn_Sequence )
wrap_Sequence :: T_Sequence -> Inh_Sequence -> Syn_Sequence
wrap_Sequence (T_Sequence Identity T_Sequence_s41
act) (Inh_Sequence
Inh_Sequence ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Sequence_s41
sem <- Identity T_Sequence_s41
act
        let arg40 :: T_Sequence_vIn40
arg40 = T_Sequence_vIn40
T_Sequence_vIn40 
        (T_Sequence_vOut40 [PP_Doc]
_lhsOppL) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Sequence_s41 -> T_Sequence_v40
inv_Sequence_s41 T_Sequence_s41
sem T_Sequence_vIn40
arg40)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([PP_Doc] -> Syn_Sequence
Syn_Sequence [PP_Doc]
_lhsOppL)
   )

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

-- semantic domain
newtype T_Sequence  = T_Sequence {
                                 T_Sequence -> Identity T_Sequence_s41
attach_T_Sequence :: Identity (T_Sequence_s41 )
                                 }
newtype T_Sequence_s41  = C_Sequence_s41 {
                                         T_Sequence_s41 -> T_Sequence_v40
inv_Sequence_s41 :: (T_Sequence_v40 )
                                         }
data T_Sequence_s42  = C_Sequence_s42
type T_Sequence_v40  = (T_Sequence_vIn40 ) -> (T_Sequence_vOut40 )
data T_Sequence_vIn40  = T_Sequence_vIn40 
data T_Sequence_vOut40  = T_Sequence_vOut40 ([PP_Doc])
{-# NOINLINE sem_Sequence_Cons #-}
sem_Sequence_Cons :: T_CRule  -> T_Sequence  -> T_Sequence 
sem_Sequence_Cons :: T_CRule -> T_Sequence -> T_Sequence
sem_Sequence_Cons T_CRule
arg_hd_ T_Sequence
arg_tl_ = Identity T_Sequence_s41 -> T_Sequence
T_Sequence (forall (m :: * -> *) a. Monad m => a -> m a
return T_Sequence_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Sequence_s41
st41 = let
      v40 :: T_Sequence_v40 
      v40 :: T_Sequence_v40
v40 = \ (T_Sequence_vIn40
T_Sequence_vIn40 ) -> ( let
         _hdX20 :: T_CRule_s20
_hdX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_CRule -> Identity T_CRule_s20
attach_T_CRule (T_CRule
arg_hd_))
         _tlX41 :: T_Sequence_s41
_tlX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Sequence -> Identity T_Sequence_s41
attach_T_Sequence (T_Sequence
arg_tl_))
         (T_CRule_vOut19 PP_Doc
_hdIpp) = T_CRule_s20 -> T_CRule_v19
inv_CRule_s20 T_CRule_s20
_hdX20 (T_CRule_vIn19
T_CRule_vIn19 )
         (T_Sequence_vOut40 [PP_Doc]
_tlIppL) = T_Sequence_s41 -> T_Sequence_v40
inv_Sequence_s41 T_Sequence_s41
_tlX41 (T_Sequence_vIn40
T_Sequence_vIn40 )
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule47 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
         __result_ :: T_Sequence_vOut40
__result_ = [PP_Doc] -> T_Sequence_vOut40
T_Sequence_vOut40 [PP_Doc]
_lhsOppL
         in T_Sequence_vOut40
__result_ )
     in T_Sequence_v40 -> T_Sequence_s41
C_Sequence_s41 T_Sequence_v40
v40
   {-# INLINE rule47 #-}
   {-# LINE 86 "src-ag/CodeSyntaxDump.ag" #-}
   rule47 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
                                              {-# LINE 86 "src-ag/CodeSyntaxDump.ag" #-}
                                              _hdIpp : _tlIppL
                                              {-# LINE 1092 "src-generated/CodeSyntaxDump.hs" #-}
{-# NOINLINE sem_Sequence_Nil #-}
sem_Sequence_Nil ::  T_Sequence 
sem_Sequence_Nil :: T_Sequence
sem_Sequence_Nil  = Identity T_Sequence_s41 -> T_Sequence
T_Sequence (forall (m :: * -> *) a. Monad m => a -> m a
return T_Sequence_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_Sequence_s41
st41 = let
      v40 :: T_Sequence_v40 
      v40 :: T_Sequence_v40
v40 = \ (T_Sequence_vIn40
T_Sequence_vIn40 ) -> ( let
         _lhsOppL :: [PP_Doc]
         _lhsOppL :: [PP_Doc]
_lhsOppL = forall {a}. () -> [a]
rule48  ()
         __result_ :: T_Sequence_vOut40
__result_ = [PP_Doc] -> T_Sequence_vOut40
T_Sequence_vOut40 [PP_Doc]
_lhsOppL
         in T_Sequence_vOut40
__result_ )
     in T_Sequence_v40 -> T_Sequence_s41
C_Sequence_s41 T_Sequence_v40
v40
   {-# INLINE rule48 #-}
   {-# LINE 87 "src-ag/CodeSyntaxDump.ag" #-}
   rule48 = \  (_ :: ()) ->
                                              {-# LINE 87 "src-ag/CodeSyntaxDump.ag" #-}
                                              []
                                              {-# LINE 1110 "src-generated/CodeSyntaxDump.hs" #-}