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

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

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

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

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

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

-- AbstractSyntax.ag imports
import Data.Set(Set)
import Data.Map(Map)
import Patterns    (Pattern(..),Patterns)
import Expression  (Expression(..))
import Macro --marcos
import CommonTypes
import ErrorMessages
{-# LINE 29 "src-generated/ResolveLocals.hs" #-}

{-# LINE 15 "src-ag/ResolveLocals.ag" #-}

import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Map(Map)
import qualified Data.Sequence as Seq
import Data.Sequence(Seq,(><))
import CommonTypes
import Patterns
import ErrorMessages
import AbstractSyntax
import Expression
import Options
import HsToken(HsTokensRoot(HsTokensRoot))
import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))
import Data.Maybe
{-# LINE 47 "src-generated/ResolveLocals.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
-- Child -------------------------------------------------------
-- wrapper
data Inh_Child  = Inh_Child { Inh_Child -> [(Identifier, Type, ChildKind)]
allfields_Inh_Child :: ([(Identifier,Type,ChildKind)]), Inh_Child -> [Identifier]
allnts_Inh_Child :: ([Identifier]), Inh_Child -> [(Identifier, Identifier)]
attrs_Inh_Child :: ([(Identifier,Identifier)]), Inh_Child -> Identifier
con_Inh_Child :: (Identifier), Inh_Child -> Attributes
inh_Inh_Child :: (Attributes), Inh_Child -> Map Identifier Attributes
inhMap_Inh_Child :: (Map Identifier Attributes), Inh_Child -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Child :: (Map Identifier (Identifier,[Identifier])), Inh_Child -> Identifier
nt_Inh_Child :: (Identifier), Inh_Child -> Attributes
syn_Inh_Child :: (Attributes), Inh_Child -> Map Identifier Attributes
synMap_Inh_Child :: (Map Identifier Attributes) }
data Syn_Child  = Syn_Child { Syn_Child -> [(Identifier, Attributes, Attributes)]
attributes_Syn_Child :: ([(Identifier,Attributes,Attributes)]), Syn_Child -> (Identifier, Type, ChildKind)
field_Syn_Child :: ((Identifier,Type,ChildKind)), Syn_Child -> Child
output_Syn_Child :: (Child) }
{-# INLINABLE wrap_Child #-}
wrap_Child :: T_Child  -> Inh_Child  -> (Syn_Child )
wrap_Child :: T_Child -> Inh_Child -> Syn_Child
wrap_Child (T_Child Identity T_Child_s2
act) (Inh_Child [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Child_s2
sem <- Identity T_Child_s2
act
        let arg1 :: T_Child_vIn1
arg1 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> T_Child_vIn1
T_Child_vIn1 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap
        (T_Child_vOut1 [(Identifier, Attributes, Attributes)]
_lhsOattributes (Identifier, Type, ChildKind)
_lhsOfield Child
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
sem T_Child_vIn1
arg1)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([(Identifier, Attributes, Attributes)]
-> (Identifier, Type, ChildKind) -> Child -> Syn_Child
Syn_Child [(Identifier, Attributes, Attributes)]
_lhsOattributes (Identifier, Type, ChildKind)
_lhsOfield Child
_lhsOoutput)
   )

-- cata
{-# INLINE sem_Child #-}
sem_Child :: Child  -> T_Child 
sem_Child :: Child -> T_Child
sem_Child ( Child Identifier
name_ Type
tp_ ChildKind
kind_ ) = Identifier -> Type -> ChildKind -> T_Child
sem_Child_Child Identifier
name_ Type
tp_ ChildKind
kind_

-- semantic domain
newtype T_Child  = T_Child {
                           T_Child -> Identity T_Child_s2
attach_T_Child :: Identity (T_Child_s2 )
                           }
newtype T_Child_s2  = C_Child_s2 {
                                 T_Child_s2 -> T_Child_v1
inv_Child_s2 :: (T_Child_v1 )
                                 }
data T_Child_s3  = C_Child_s3
type T_Child_v1  = (T_Child_vIn1 ) -> (T_Child_vOut1 )
data T_Child_vIn1  = T_Child_vIn1 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Attributes) (Map Identifier Attributes)
data T_Child_vOut1  = T_Child_vOut1 ([(Identifier,Attributes,Attributes)]) ((Identifier,Type,ChildKind)) (Child)
{-# NOINLINE sem_Child_Child #-}
sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child 
sem_Child_Child :: Identifier -> Type -> ChildKind -> T_Child
sem_Child_Child Identifier
arg_name_ Type
arg_tp_ ChildKind
arg_kind_ = Identity T_Child_s2 -> T_Child
T_Child (forall (m :: * -> *) a. Monad m => a -> m a
return T_Child_s2
st2) where
   {-# NOINLINE st2 #-}
   st2 :: T_Child_s2
st2 = let
      v1 :: T_Child_v1 
      v1 :: T_Child_v1
v1 = \ (T_Child_vIn1 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _chnt :: Identifier
_chnt = Identifier -> Type -> Identifier
rule0 Identifier
arg_name_ Type
arg_tp_
         _inh :: Attributes
_inh = Identifier -> Map Identifier Attributes -> Attributes
rule1 Identifier
_chnt Map Identifier Attributes
_lhsIinhMap
         _syn :: Attributes
_syn = Identifier -> Map Identifier Attributes -> Attributes
rule2 Identifier
_chnt Map Identifier Attributes
_lhsIsynMap
         _lhsOattributes :: [(Identifier,Attributes,Attributes)]
         _lhsOattributes :: [(Identifier, Attributes, Attributes)]
_lhsOattributes = forall {b} {c} {a}. b -> c -> a -> [(a, b, c)]
rule3 Attributes
_inh Attributes
_syn Identifier
arg_name_
         _lhsOfield :: (Identifier,Type,ChildKind)
         _lhsOfield :: (Identifier, Type, ChildKind)
_lhsOfield = forall {c} {a} {b}. c -> a -> b -> (a, b, c)
rule4 ChildKind
arg_kind_ Identifier
arg_name_ Type
arg_tp_
         _output :: Child
_output = ChildKind -> Identifier -> Type -> Child
rule5 ChildKind
arg_kind_ Identifier
arg_name_ Type
arg_tp_
         _lhsOoutput :: Child
         _lhsOoutput :: Child
_lhsOoutput = forall {p}. p -> p
rule6 Child
_output
         __result_ :: T_Child_vOut1
__result_ = [(Identifier, Attributes, Attributes)]
-> (Identifier, Type, ChildKind) -> Child -> T_Child_vOut1
T_Child_vOut1 [(Identifier, Attributes, Attributes)]
_lhsOattributes (Identifier, Type, ChildKind)
_lhsOfield Child
_lhsOoutput
         in T_Child_vOut1
__result_ )
     in T_Child_v1 -> T_Child_s2
C_Child_s2 T_Child_v1
v1
   {-# INLINE rule0 #-}
   {-# LINE 19 "src-ag/DistChildAttr.ag" #-}
   rule0 = \ name_ tp_ ->
                       {-# LINE 19 "src-ag/DistChildAttr.ag" #-}
                       case tp_ of
                         NT nt _ _ -> nt
                         Self      -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")
                         Haskell t -> identifier ""
                       {-# LINE 108 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule1 #-}
   {-# LINE 23 "src-ag/DistChildAttr.ag" #-}
   rule1 = \ _chnt ((_lhsIinhMap) :: Map Identifier Attributes) ->
                      {-# LINE 23 "src-ag/DistChildAttr.ag" #-}
                      Map.findWithDefault Map.empty _chnt     _lhsIinhMap
                      {-# LINE 114 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule2 #-}
   {-# LINE 24 "src-ag/DistChildAttr.ag" #-}
   rule2 = \ _chnt ((_lhsIsynMap) :: Map Identifier Attributes) ->
                      {-# LINE 24 "src-ag/DistChildAttr.ag" #-}
                      Map.findWithDefault Map.empty _chnt     _lhsIsynMap
                      {-# LINE 120 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule3 #-}
   {-# LINE 83 "src-ag/ResolveLocals.ag" #-}
   rule3 = \ _inh _syn name_ ->
                             {-# LINE 83 "src-ag/ResolveLocals.ag" #-}
                             [(name_, _inh    , _syn    )]
                             {-# LINE 126 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule4 #-}
   {-# LINE 86 "src-ag/ResolveLocals.ag" #-}
   rule4 = \ kind_ name_ tp_ ->
                        {-# LINE 86 "src-ag/ResolveLocals.ag" #-}
                        (name_, tp_, kind_)
                        {-# LINE 132 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule5 #-}
   rule5 = \ kind_ name_ tp_ ->
     Child name_ tp_ kind_
   {-# INLINE rule6 #-}
   rule6 = \ _output ->
     _output

-- Children ----------------------------------------------------
-- wrapper
data Inh_Children  = Inh_Children { Inh_Children -> [(Identifier, Type, ChildKind)]
allfields_Inh_Children :: ([(Identifier,Type,ChildKind)]), Inh_Children -> [Identifier]
allnts_Inh_Children :: ([Identifier]), Inh_Children -> [(Identifier, Identifier)]
attrs_Inh_Children :: ([(Identifier,Identifier)]), Inh_Children -> Identifier
con_Inh_Children :: (Identifier), Inh_Children -> Attributes
inh_Inh_Children :: (Attributes), Inh_Children -> Map Identifier Attributes
inhMap_Inh_Children :: (Map Identifier Attributes), Inh_Children -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Children :: (Map Identifier (Identifier,[Identifier])), Inh_Children -> Identifier
nt_Inh_Children :: (Identifier), Inh_Children -> Attributes
syn_Inh_Children :: (Attributes), Inh_Children -> Map Identifier Attributes
synMap_Inh_Children :: (Map Identifier Attributes) }
data Syn_Children  = Syn_Children { Syn_Children -> [(Identifier, Attributes, Attributes)]
attributes_Syn_Children :: ([(Identifier,Attributes,Attributes)]), Syn_Children -> [(Identifier, Type, ChildKind)]
fields_Syn_Children :: ([(Identifier,Type,ChildKind)]), Syn_Children -> Children
output_Syn_Children :: (Children) }
{-# INLINABLE wrap_Children #-}
wrap_Children :: T_Children  -> Inh_Children  -> (Syn_Children )
wrap_Children :: T_Children -> Inh_Children -> Syn_Children
wrap_Children (T_Children Identity T_Children_s5
act) (Inh_Children [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Children_s5
sem <- Identity T_Children_s5
act
        let arg4 :: T_Children_vIn4
arg4 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap
        (T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_lhsOattributes [(Identifier, Type, ChildKind)]
_lhsOfields Children
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
sem T_Children_vIn4
arg4)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([(Identifier, Attributes, Attributes)]
-> [(Identifier, Type, ChildKind)] -> Children -> Syn_Children
Syn_Children [(Identifier, Attributes, Attributes)]
_lhsOattributes [(Identifier, Type, ChildKind)]
_lhsOfields Children
_lhsOoutput)
   )

-- cata
{-# NOINLINE sem_Children #-}
sem_Children :: Children  -> T_Children 
sem_Children :: Children -> T_Children
sem_Children Children
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Child -> T_Children -> T_Children
sem_Children_Cons T_Children
sem_Children_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Child -> T_Child
sem_Child Children
list)

-- semantic domain
newtype T_Children  = T_Children {
                                 T_Children -> Identity T_Children_s5
attach_T_Children :: Identity (T_Children_s5 )
                                 }
newtype T_Children_s5  = C_Children_s5 {
                                       T_Children_s5 -> T_Children_v4
inv_Children_s5 :: (T_Children_v4 )
                                       }
data T_Children_s6  = C_Children_s6
type T_Children_v4  = (T_Children_vIn4 ) -> (T_Children_vOut4 )
data T_Children_vIn4  = T_Children_vIn4 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Attributes) (Map Identifier Attributes)
data T_Children_vOut4  = T_Children_vOut4 ([(Identifier,Attributes,Attributes)]) ([(Identifier,Type,ChildKind)]) (Children)
{-# NOINLINE sem_Children_Cons #-}
sem_Children_Cons :: T_Child  -> T_Children  -> T_Children 
sem_Children_Cons :: T_Child -> T_Children -> T_Children
sem_Children_Cons T_Child
arg_hd_ T_Children
arg_tl_ = Identity T_Children_s5 -> T_Children
T_Children (forall (m :: * -> *) a. Monad m => a -> m a
return T_Children_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_Children_s5
st5 = let
      v4 :: T_Children_v4 
      v4 :: T_Children_v4
v4 = \ (T_Children_vIn4 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _hdX2 :: T_Child_s2
_hdX2 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Child -> Identity T_Child_s2
attach_T_Child (T_Child
arg_hd_))
         _tlX5 :: T_Children_s5
_tlX5 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Children -> Identity T_Children_s5
attach_T_Children (T_Children
arg_tl_))
         (T_Child_vOut1 [(Identifier, Attributes, Attributes)]
_hdIattributes (Identifier, Type, ChildKind)
_hdIfield Child
_hdIoutput) = T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
_hdX2 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> T_Child_vIn1
T_Child_vIn1 [(Identifier, Type, ChildKind)]
_hdOallfields [Identifier]
_hdOallnts [(Identifier, Identifier)]
_hdOattrs Identifier
_hdOcon Attributes
_hdOinh Map Identifier Attributes
_hdOinhMap Map Identifier (Identifier, [Identifier])
_hdOmergeMap Identifier
_hdOnt Attributes
_hdOsyn Map Identifier Attributes
_hdOsynMap)
         (T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_tlIattributes [(Identifier, Type, ChildKind)]
_tlIfields Children
_tlIoutput) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_tlX5 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 [(Identifier, Type, ChildKind)]
_tlOallfields [Identifier]
_tlOallnts [(Identifier, Identifier)]
_tlOattrs Identifier
_tlOcon Attributes
_tlOinh Map Identifier Attributes
_tlOinhMap Map Identifier (Identifier, [Identifier])
_tlOmergeMap Identifier
_tlOnt Attributes
_tlOsyn Map Identifier Attributes
_tlOsynMap)
         _lhsOfields :: [(Identifier,Type,ChildKind)]
         _lhsOfields :: [(Identifier, Type, ChildKind)]
_lhsOfields = (Identifier, Type, ChildKind)
-> [(Identifier, Type, ChildKind)]
-> [(Identifier, Type, ChildKind)]
rule7 (Identifier, Type, ChildKind)
_hdIfield [(Identifier, Type, ChildKind)]
_tlIfields
         _lhsOattributes :: [(Identifier,Attributes,Attributes)]
         _lhsOattributes :: [(Identifier, Attributes, Attributes)]
_lhsOattributes = [(Identifier, Attributes, Attributes)]
-> [(Identifier, Attributes, Attributes)]
-> [(Identifier, Attributes, Attributes)]
rule8 [(Identifier, Attributes, Attributes)]
_hdIattributes [(Identifier, Attributes, Attributes)]
_tlIattributes
         _output :: Children
_output = Child -> Children -> Children
rule9 Child
_hdIoutput Children
_tlIoutput
         _lhsOoutput :: Children
         _lhsOoutput :: Children
_lhsOoutput = forall {p}. p -> p
rule10 Children
_output
         _hdOallfields :: [(Identifier, Type, ChildKind)]
_hdOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule11 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule12 [Identifier]
_lhsIallnts
         _hdOattrs :: [(Identifier, Identifier)]
_hdOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule13 [(Identifier, Identifier)]
_lhsIattrs
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule14 Identifier
_lhsIcon
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule15 Attributes
_lhsIinh
         _hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule16 Map Identifier Attributes
_lhsIinhMap
         _hdOmergeMap :: Map Identifier (Identifier, [Identifier])
_hdOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule17 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule18 Identifier
_lhsInt
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule19 Attributes
_lhsIsyn
         _hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule20 Map Identifier Attributes
_lhsIsynMap
         _tlOallfields :: [(Identifier, Type, ChildKind)]
_tlOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule21 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule22 [Identifier]
_lhsIallnts
         _tlOattrs :: [(Identifier, Identifier)]
_tlOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule23 [(Identifier, Identifier)]
_lhsIattrs
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule24 Identifier
_lhsIcon
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule25 Attributes
_lhsIinh
         _tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule26 Map Identifier Attributes
_lhsIinhMap
         _tlOmergeMap :: Map Identifier (Identifier, [Identifier])
_tlOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule27 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule28 Identifier
_lhsInt
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule29 Attributes
_lhsIsyn
         _tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule30 Map Identifier Attributes
_lhsIsynMap
         __result_ :: T_Children_vOut4
__result_ = [(Identifier, Attributes, Attributes)]
-> [(Identifier, Type, ChildKind)] -> Children -> T_Children_vOut4
T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_lhsOattributes [(Identifier, Type, ChildKind)]
_lhsOfields Children
_lhsOoutput
         in T_Children_vOut4
__result_ )
     in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
   {-# INLINE rule7 #-}
   {-# LINE 89 "src-ag/ResolveLocals.ag" #-}
   rule7 = \ ((_hdIfield) :: (Identifier,Type,ChildKind)) ((_tlIfields) :: [(Identifier,Type,ChildKind)]) ->
                         {-# LINE 89 "src-ag/ResolveLocals.ag" #-}
                         _hdIfield : _tlIfields
                         {-# LINE 216 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule8 #-}
   rule8 = \ ((_hdIattributes) :: [(Identifier,Attributes,Attributes)]) ((_tlIattributes) :: [(Identifier,Attributes,Attributes)]) ->
     _hdIattributes ++ _tlIattributes
   {-# INLINE rule9 #-}
   rule9 = \ ((_hdIoutput) :: Child) ((_tlIoutput) :: Children) ->
     (:) _hdIoutput _tlIoutput
   {-# INLINE rule10 #-}
   rule10 = \ _output ->
     _output
   {-# INLINE rule11 #-}
   rule11 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIallfields
   {-# INLINE rule12 #-}
   rule12 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule13 #-}
   rule13 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->
     _lhsIattrs
   {-# INLINE rule14 #-}
   rule14 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule15 #-}
   rule15 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule16 #-}
   rule16 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule17 #-}
   rule17 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule18 #-}
   rule18 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule19 #-}
   rule19 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule20 #-}
   rule20 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule21 #-}
   rule21 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     _lhsIallfields
   {-# INLINE rule22 #-}
   rule22 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule23 #-}
   rule23 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->
     _lhsIattrs
   {-# INLINE rule24 #-}
   rule24 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule25 #-}
   rule25 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule26 #-}
   rule26 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule27 #-}
   rule27 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     _lhsImergeMap
   {-# INLINE rule28 #-}
   rule28 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule29 #-}
   rule29 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule30 #-}
   rule30 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
{-# NOINLINE sem_Children_Nil #-}
sem_Children_Nil ::  T_Children 
sem_Children_Nil :: T_Children
sem_Children_Nil  = Identity T_Children_s5 -> T_Children
T_Children (forall (m :: * -> *) a. Monad m => a -> m a
return T_Children_s5
st5) where
   {-# NOINLINE st5 #-}
   st5 :: T_Children_s5
st5 = let
      v4 :: T_Children_v4 
      v4 :: T_Children_v4
v4 = \ (T_Children_vIn4 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _lhsOfields :: [(Identifier,Type,ChildKind)]
         _lhsOfields :: [(Identifier, Type, ChildKind)]
_lhsOfields = forall {a}. () -> [a]
rule31  ()
         _lhsOattributes :: [(Identifier,Attributes,Attributes)]
         _lhsOattributes :: [(Identifier, Attributes, Attributes)]
_lhsOattributes = forall {a}. () -> [a]
rule32  ()
         _output :: [a]
_output = forall {a}. () -> [a]
rule33  ()
         _lhsOoutput :: Children
         _lhsOoutput :: Children
_lhsOoutput = forall {p}. p -> p
rule34 forall a. [a]
_output
         __result_ :: T_Children_vOut4
__result_ = [(Identifier, Attributes, Attributes)]
-> [(Identifier, Type, ChildKind)] -> Children -> T_Children_vOut4
T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_lhsOattributes [(Identifier, Type, ChildKind)]
_lhsOfields Children
_lhsOoutput
         in T_Children_vOut4
__result_ )
     in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
   {-# INLINE rule31 #-}
   {-# LINE 90 "src-ag/ResolveLocals.ag" #-}
   rule31 = \  (_ :: ()) ->
                         {-# LINE 90 "src-ag/ResolveLocals.ag" #-}
                         []
                         {-# LINE 308 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule32 #-}
   rule32 = \  (_ :: ()) ->
     []
   {-# INLINE rule33 #-}
   rule33 = \  (_ :: ()) ->
     []
   {-# INLINE rule34 #-}
   rule34 = \ _output ->
     _output

-- Expression --------------------------------------------------
-- wrapper
data Inh_Expression  = Inh_Expression { Inh_Expression -> [(Identifier, Type, ChildKind)]
allfields_Inh_Expression :: ([(Identifier,Type,ChildKind)]), Inh_Expression -> [Identifier]
allnts_Inh_Expression :: ([Identifier]), Inh_Expression -> [(Identifier, Identifier)]
attrs_Inh_Expression :: ([(Identifier,Identifier)]), Inh_Expression -> Identifier
con_Inh_Expression :: (Identifier), Inh_Expression -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Expression :: (Map Identifier (Identifier,[Identifier])), Inh_Expression -> Identifier
nt_Inh_Expression :: (Identifier), Inh_Expression -> Options
options_Inh_Expression :: (Options) }
data Syn_Expression  = Syn_Expression { Syn_Expression -> Seq Error
errors_Syn_Expression :: (Seq Error), Syn_Expression -> Expression
output_Syn_Expression :: (Expression) }
{-# 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_s8
act) (Inh_Expression [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Expression_s8
sem <- Identity T_Expression_s8
act
        let arg7 :: T_Expression_vIn7
arg7 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> T_Expression_vIn7
T_Expression_vIn7 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions
        (T_Expression_vOut7 Seq Error
_lhsOerrors Expression
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
sem T_Expression_vIn7
arg7)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> Expression -> Syn_Expression
Syn_Expression Seq Error
_lhsOerrors Expression
_lhsOoutput)
   )

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

-- semantic domain
newtype T_Expression  = T_Expression {
                                     T_Expression -> Identity T_Expression_s8
attach_T_Expression :: Identity (T_Expression_s8 )
                                     }
newtype T_Expression_s8  = C_Expression_s8 {
                                           T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 :: (T_Expression_v7 )
                                           }
data T_Expression_s9  = C_Expression_s9
type T_Expression_v7  = (T_Expression_vIn7 ) -> (T_Expression_vOut7 )
data T_Expression_vIn7  = T_Expression_vIn7 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Map Identifier (Identifier,[Identifier])) (Identifier) (Options)
data T_Expression_vOut7  = T_Expression_vOut7 (Seq Error) (Expression)
{-# NOINLINE sem_Expression_Expression #-}
sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression 
sem_Expression_Expression :: Pos -> HsTokens -> T_Expression
sem_Expression_Expression Pos
arg_pos_ HsTokens
arg_tks_ = Identity T_Expression_s8 -> T_Expression
T_Expression (forall (m :: * -> *) a. Monad m => a -> m a
return T_Expression_s8
st8) where
   {-# NOINLINE st8 #-}
   st8 :: T_Expression_s8
st8 = let
      v7 :: T_Expression_v7 
      v7 :: T_Expression_v7
v7 = \ (T_Expression_vIn7 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions) -> ( let
         (Seq Error
_errors,HsTokens
_newTks) = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> HsTokens
-> (Seq Error, HsTokens)
rule35 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions HsTokens
arg_tks_
         _lhsOoutput :: Expression
         _lhsOoutput :: Expression
_lhsOoutput = HsTokens -> Pos -> Expression
rule36 HsTokens
_newTks Pos
arg_pos_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {p}. p -> p
rule37 Seq Error
_errors
         _output :: Expression
_output = Pos -> HsTokens -> Expression
rule38 Pos
arg_pos_ HsTokens
arg_tks_
         __result_ :: T_Expression_vOut7
__result_ = Seq Error -> Expression -> T_Expression_vOut7
T_Expression_vOut7 Seq Error
_lhsOerrors Expression
_lhsOoutput
         in T_Expression_vOut7
__result_ )
     in T_Expression_v7 -> T_Expression_s8
C_Expression_s8 T_Expression_v7
v7
   {-# INLINE rule35 #-}
   {-# LINE 145 "src-ag/ResolveLocals.ag" #-}
   rule35 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ((_lhsInt) :: Identifier) ((_lhsIoptions) :: Options) tks_ ->
                                {-# LINE 145 "src-ag/ResolveLocals.ag" #-}
                                let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]
                                    attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs
                                    inherited = Inh_HsTokensRoot
                                                { attrs_Inh_HsTokensRoot      = attrsIn
                                                , con_Inh_HsTokensRoot        = _lhsIcon
                                                , allfields_Inh_HsTokensRoot  = _lhsIallfields
                                                , allnts_Inh_HsTokensRoot     = _lhsIallnts
                                                , nt_Inh_HsTokensRoot         = _lhsInt
                                                , options_Inh_HsTokensRoot    = _lhsIoptions
                                                }
                                    synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited
                                in (errors_Syn_HsTokensRoot synthesized, output_Syn_HsTokensRoot synthesized)
                                {-# LINE 381 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule36 #-}
   {-# LINE 157 "src-ag/ResolveLocals.ag" #-}
   rule36 = \ _newTks pos_ ->
                               {-# LINE 157 "src-ag/ResolveLocals.ag" #-}
                               Expression pos_ _newTks
                               {-# LINE 387 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule37 #-}
   rule37 = \ _errors ->
     _errors
   {-# INLINE rule38 #-}
   rule38 = \ pos_ tks_ ->
     Expression pos_ tks_

-- Grammar -----------------------------------------------------
-- wrapper
data Inh_Grammar  = Inh_Grammar { Inh_Grammar -> Options
options_Inh_Grammar :: (Options) }
data Syn_Grammar  = Syn_Grammar { Syn_Grammar -> Seq Error
errors_Syn_Grammar :: (Seq Error), Syn_Grammar -> Grammar
output_Syn_Grammar :: (Grammar) }
{-# INLINABLE wrap_Grammar #-}
wrap_Grammar :: T_Grammar  -> Inh_Grammar  -> (Syn_Grammar )
wrap_Grammar :: T_Grammar -> Inh_Grammar -> Syn_Grammar
wrap_Grammar (T_Grammar Identity T_Grammar_s11
act) (Inh_Grammar Options
_lhsIoptions) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Grammar_s11
sem <- Identity T_Grammar_s11
act
        let arg10 :: T_Grammar_vIn10
arg10 = Options -> T_Grammar_vIn10
T_Grammar_vIn10 Options
_lhsIoptions
        (T_Grammar_vOut10 Seq Error
_lhsOerrors Grammar
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Grammar_s11 -> T_Grammar_v10
inv_Grammar_s11 T_Grammar_s11
sem T_Grammar_vIn10
arg10)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> Grammar -> Syn_Grammar
Syn_Grammar Seq Error
_lhsOerrors Grammar
_lhsOoutput)
   )

-- cata
{-# INLINE sem_Grammar #-}
sem_Grammar :: Grammar  -> T_Grammar 
sem_Grammar :: Grammar -> T_Grammar
sem_Grammar ( Grammar TypeSyns
typeSyns_ UseMap
useMap_ Derivings
derivings_ Set Identifier
wrappers_ Nonterminals
nonts_ PragmaMap
pragmas_ AttrOrderMap
manualAttrOrderMap_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ UniqueMap
uniqueMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
augmentsMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundsMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
mergeMap_ ) = TypeSyns
-> UseMap
-> Derivings
-> Set Identifier
-> T_Nonterminals
-> PragmaMap
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map
     Identifier
     (Map
        Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> T_Grammar
sem_Grammar_Grammar TypeSyns
typeSyns_ UseMap
useMap_ Derivings
derivings_ Set Identifier
wrappers_ ( Nonterminals -> T_Nonterminals
sem_Nonterminals Nonterminals
nonts_ ) PragmaMap
pragmas_ AttrOrderMap
manualAttrOrderMap_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ UniqueMap
uniqueMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
augmentsMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundsMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
mergeMap_

-- semantic domain
newtype T_Grammar  = T_Grammar {
                               T_Grammar -> Identity T_Grammar_s11
attach_T_Grammar :: Identity (T_Grammar_s11 )
                               }
newtype T_Grammar_s11  = C_Grammar_s11 {
                                       T_Grammar_s11 -> T_Grammar_v10
inv_Grammar_s11 :: (T_Grammar_v10 )
                                       }
data T_Grammar_s12  = C_Grammar_s12
type T_Grammar_v10  = (T_Grammar_vIn10 ) -> (T_Grammar_vOut10 )
data T_Grammar_vIn10  = T_Grammar_vIn10 (Options)
data T_Grammar_vOut10  = T_Grammar_vOut10 (Seq Error) (Grammar)
{-# NOINLINE sem_Grammar_Grammar #-}
sem_Grammar_Grammar :: (TypeSyns) -> (UseMap) -> (Derivings) -> (Set NontermIdent) -> T_Nonterminals  -> (PragmaMap) -> (AttrOrderMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (UniqueMap) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) -> T_Grammar 
sem_Grammar_Grammar :: TypeSyns
-> UseMap
-> Derivings
-> Set Identifier
-> T_Nonterminals
-> PragmaMap
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map
     Identifier
     (Map
        Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> T_Grammar
sem_Grammar_Grammar TypeSyns
arg_typeSyns_ UseMap
arg_useMap_ Derivings
arg_derivings_ Set Identifier
arg_wrappers_ T_Nonterminals
arg_nonts_ PragmaMap
arg_pragmas_ AttrOrderMap
arg_manualAttrOrderMap_ ParamMap
arg_paramMap_ ContextMap
arg_contextMap_ QuantMap
arg_quantMap_ UniqueMap
arg_uniqueMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_augmentsMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_ = Identity T_Grammar_s11 -> T_Grammar
T_Grammar (forall (m :: * -> *) a. Monad m => a -> m a
return T_Grammar_s11
st11) where
   {-# NOINLINE st11 #-}
   st11 :: T_Grammar_s11
st11 = let
      v10 :: T_Grammar_v10 
      v10 :: T_Grammar_v10
v10 = \ (T_Grammar_vIn10 Options
_lhsIoptions) -> ( let
         _nontsX17 :: T_Nonterminals_s17
_nontsX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminals -> Identity T_Nonterminals_s17
attach_T_Nonterminals (T_Nonterminals
arg_nonts_))
         (T_Nonterminals_vOut16 Seq Error
_nontsIerrors Map Identifier Attributes
_nontsIinhMap' [(Identifier, [Identifier])]
_nontsInonts Nonterminals
_nontsIoutput Map Identifier Attributes
_nontsIsynMap') = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_nontsX17 ([Identifier]
-> Map Identifier Attributes
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Options
-> Map Identifier Attributes
-> T_Nonterminals_vIn16
T_Nonterminals_vIn16 [Identifier]
_nontsOallnts Map Identifier Attributes
_nontsOinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_nontsOmergeMap Options
_nontsOoptions Map Identifier Attributes
_nontsOsynMap)
         _nontsOinhMap :: Map Identifier Attributes
_nontsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule39 Map Identifier Attributes
_nontsIinhMap'
         _nontsOsynMap :: Map Identifier Attributes
_nontsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule40 Map Identifier Attributes
_nontsIsynMap'
         _nontsOallnts :: [Identifier]
_nontsOallnts = [(Identifier, [Identifier])] -> [Identifier]
rule41 [(Identifier, [Identifier])]
_nontsInonts
         _nontsOmergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_nontsOmergeMap = forall {k} {k} {k} {a} {b} {c}.
Map k (Map k (Map k (a, b, c))) -> Map k (Map k (Map k (a, b)))
rule42 Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule43 Seq Error
_nontsIerrors
         _output :: Grammar
_output = Nonterminals
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> ContextMap
-> Derivings
-> AttrOrderMap
-> Map
     Identifier
     (Map
        Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> ParamMap
-> PragmaMap
-> QuantMap
-> TypeSyns
-> UniqueMap
-> UseMap
-> Set Identifier
-> Grammar
rule44 Nonterminals
_nontsIoutput Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_ Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_augmentsMap_ ContextMap
arg_contextMap_ Derivings
arg_derivings_ AttrOrderMap
arg_manualAttrOrderMap_ Map
  Identifier
  (Map
     Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_ ParamMap
arg_paramMap_ PragmaMap
arg_pragmas_ QuantMap
arg_quantMap_ TypeSyns
arg_typeSyns_ UniqueMap
arg_uniqueMap_ UseMap
arg_useMap_ Set Identifier
arg_wrappers_
         _lhsOoutput :: Grammar
         _lhsOoutput :: Grammar
_lhsOoutput = forall {p}. p -> p
rule45 Grammar
_output
         _nontsOoptions :: Options
_nontsOoptions = Options -> Options
rule46 Options
_lhsIoptions
         __result_ :: T_Grammar_vOut10
__result_ = Seq Error -> Grammar -> T_Grammar_vOut10
T_Grammar_vOut10 Seq Error
_lhsOerrors Grammar
_lhsOoutput
         in T_Grammar_vOut10
__result_ )
     in T_Grammar_v10 -> T_Grammar_s11
C_Grammar_s11 T_Grammar_v10
v10
   {-# INLINE rule39 #-}
   {-# LINE 15 "src-ag/DistChildAttr.ag" #-}
   rule39 = \ ((_nontsIinhMap') :: Map Identifier Attributes) ->
                             {-# LINE 15 "src-ag/DistChildAttr.ag" #-}
                             _nontsIinhMap'
                             {-# LINE 452 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule40 #-}
   {-# LINE 16 "src-ag/DistChildAttr.ag" #-}
   rule40 = \ ((_nontsIsynMap') :: Map Identifier Attributes) ->
                             {-# LINE 16 "src-ag/DistChildAttr.ag" #-}
                             _nontsIsynMap'
                             {-# LINE 458 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule41 #-}
   {-# LINE 59 "src-ag/ResolveLocals.ag" #-}
   rule41 = \ ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ->
                             {-# LINE 59 "src-ag/ResolveLocals.ag" #-}
                             map fst (_nontsInonts)
                             {-# LINE 464 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule42 #-}
   {-# LINE 119 "src-ag/ResolveLocals.ag" #-}
   rule42 = \ mergeMap_ ->
                                 {-# LINE 119 "src-ag/ResolveLocals.ag" #-}
                                 Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_
                                 {-# LINE 470 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule43 #-}
   rule43 = \ ((_nontsIerrors) :: Seq Error) ->
     _nontsIerrors
   {-# INLINE rule44 #-}
   rule44 = \ ((_nontsIoutput) :: Nonterminals) aroundsMap_ augmentsMap_ contextMap_ derivings_ manualAttrOrderMap_ mergeMap_ paramMap_ pragmas_ quantMap_ typeSyns_ uniqueMap_ useMap_ wrappers_ ->
     Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_
   {-# INLINE rule45 #-}
   rule45 = \ _output ->
     _output
   {-# INLINE rule46 #-}
   rule46 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions

-- Nonterminal -------------------------------------------------
-- wrapper
data Inh_Nonterminal  = Inh_Nonterminal { Inh_Nonterminal -> [Identifier]
allnts_Inh_Nonterminal :: ([Identifier]), Inh_Nonterminal -> Map Identifier Attributes
inhMap_Inh_Nonterminal :: (Map Identifier Attributes), Inh_Nonterminal
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), Inh_Nonterminal -> Options
options_Inh_Nonterminal :: (Options), Inh_Nonterminal -> Map Identifier Attributes
synMap_Inh_Nonterminal :: (Map Identifier Attributes) }
data Syn_Nonterminal  = Syn_Nonterminal { Syn_Nonterminal -> Seq Error
errors_Syn_Nonterminal :: (Seq Error), Syn_Nonterminal -> Map Identifier Attributes
inhMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> [(Identifier, [Identifier])]
nonts_Syn_Nonterminal :: ([(NontermIdent,[ConstructorIdent])]), Syn_Nonterminal -> Nonterminal
output_Syn_Nonterminal :: (Nonterminal), Syn_Nonterminal -> Map Identifier Attributes
synMap'_Syn_Nonterminal :: (Map Identifier Attributes) }
{-# INLINABLE wrap_Nonterminal #-}
wrap_Nonterminal :: T_Nonterminal  -> Inh_Nonterminal  -> (Syn_Nonterminal )
wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> Syn_Nonterminal
wrap_Nonterminal (T_Nonterminal Identity T_Nonterminal_s14
act) (Inh_Nonterminal [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Nonterminal_s14
sem <- Identity T_Nonterminal_s14
act
        let arg13 :: T_Nonterminal_vIn13
arg13 = [Identifier]
-> Map Identifier Attributes
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Options
-> Map Identifier Attributes
-> T_Nonterminal_vIn13
T_Nonterminal_vIn13 [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap
        (T_Nonterminal_vOut13 Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminal
_lhsOoutput Map Identifier Attributes
_lhsOsynMap') <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 T_Nonterminal_s14
sem T_Nonterminal_vIn13
arg13)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error
-> Map Identifier Attributes
-> [(Identifier, [Identifier])]
-> Nonterminal
-> Map Identifier Attributes
-> Syn_Nonterminal
Syn_Nonterminal Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminal
_lhsOoutput Map Identifier Attributes
_lhsOsynMap')
   )

-- cata
{-# INLINE sem_Nonterminal #-}
sem_Nonterminal :: Nonterminal  -> T_Nonterminal 
sem_Nonterminal :: Nonterminal -> T_Nonterminal
sem_Nonterminal ( Nonterminal Identifier
nt_ [Identifier]
params_ Attributes
inh_ Attributes
syn_ Productions
prods_ ) = Identifier
-> [Identifier]
-> Attributes
-> Attributes
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal Identifier
nt_ [Identifier]
params_ Attributes
inh_ Attributes
syn_ ( Productions -> T_Productions
sem_Productions Productions
prods_ )

-- semantic domain
newtype T_Nonterminal  = T_Nonterminal {
                                       T_Nonterminal -> Identity T_Nonterminal_s14
attach_T_Nonterminal :: Identity (T_Nonterminal_s14 )
                                       }
newtype T_Nonterminal_s14  = C_Nonterminal_s14 {
                                               T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 :: (T_Nonterminal_v13 )
                                               }
data T_Nonterminal_s15  = C_Nonterminal_s15
type T_Nonterminal_v13  = (T_Nonterminal_vIn13 ) -> (T_Nonterminal_vOut13 )
data T_Nonterminal_vIn13  = T_Nonterminal_vIn13 ([Identifier]) (Map Identifier Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Options) (Map Identifier Attributes)
data T_Nonterminal_vOut13  = T_Nonterminal_vOut13 (Seq Error) (Map Identifier Attributes) ([(NontermIdent,[ConstructorIdent])]) (Nonterminal) (Map Identifier Attributes)
{-# NOINLINE sem_Nonterminal_Nonterminal #-}
sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions  -> T_Nonterminal 
sem_Nonterminal_Nonterminal :: Identifier
-> [Identifier]
-> Attributes
-> Attributes
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal Identifier
arg_nt_ [Identifier]
arg_params_ Attributes
arg_inh_ Attributes
arg_syn_ T_Productions
arg_prods_ = Identity T_Nonterminal_s14 -> T_Nonterminal
T_Nonterminal (forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminal_s14
st14) where
   {-# NOINLINE st14 #-}
   st14 :: T_Nonterminal_s14
st14 = let
      v13 :: T_Nonterminal_v13 
      v13 :: T_Nonterminal_v13
v13 = \ (T_Nonterminal_vIn13 [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) -> ( let
         _prodsX29 :: T_Productions_s29
_prodsX29 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Productions -> Identity T_Productions_s29
attach_T_Productions (T_Productions
arg_prods_))
         (T_Productions_vOut28 [Identifier]
_prodsIcons Seq Error
_prodsIerrors Productions
_prodsIoutput) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_prodsX29 ([Identifier]
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Options
-> Attributes
-> Map Identifier Attributes
-> T_Productions_vIn28
T_Productions_vIn28 [Identifier]
_prodsOallnts Attributes
_prodsOinh Map Identifier Attributes
_prodsOinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_prodsOmergeMap Identifier
_prodsOnt Options
_prodsOoptions Attributes
_prodsOsyn Map Identifier Attributes
_prodsOsynMap)
         _lhsOinhMap' :: Map Identifier Attributes
         _lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = forall {a} {k}. a -> k -> Map k a
rule47 Attributes
arg_inh_ Identifier
arg_nt_
         _lhsOsynMap' :: Map Identifier Attributes
         _lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = forall k a. k -> a -> Map k a
rule48 Identifier
arg_nt_ Attributes
arg_syn_
         _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]
         _lhsOnonts :: [(Identifier, [Identifier])]
_lhsOnonts = forall {a}. [Identifier] -> a -> [(a, [Identifier])]
rule49 [Identifier]
_prodsIcons Identifier
arg_nt_
         _prodsOnt :: Identifier
_prodsOnt = forall {p}. p -> p
rule50 Identifier
arg_nt_
         _prodsOinh :: Attributes
_prodsOinh = forall {p}. p -> p
rule51 Attributes
arg_inh_
         _prodsOsyn :: Attributes
_prodsOsyn = forall {p}. p -> p
rule52 Attributes
arg_syn_
         _mergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_mergeMap = Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Identifier
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule53 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Identifier
arg_nt_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule54 Seq Error
_prodsIerrors
         _output :: Nonterminal
_output = Productions
-> Attributes
-> Identifier
-> [Identifier]
-> Attributes
-> Nonterminal
rule55 Productions
_prodsIoutput Attributes
arg_inh_ Identifier
arg_nt_ [Identifier]
arg_params_ Attributes
arg_syn_
         _lhsOoutput :: Nonterminal
         _lhsOoutput :: Nonterminal
_lhsOoutput = forall {p}. p -> p
rule56 Nonterminal
_output
         _prodsOallnts :: [Identifier]
_prodsOallnts = [Identifier] -> [Identifier]
rule57 [Identifier]
_lhsIallnts
         _prodsOinhMap :: Map Identifier Attributes
_prodsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule58 Map Identifier Attributes
_lhsIinhMap
         _prodsOmergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_prodsOmergeMap = forall {p}. p -> p
rule59 Map Identifier (Map Identifier (Identifier, [Identifier]))
_mergeMap
         _prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule60 Options
_lhsIoptions
         _prodsOsynMap :: Map Identifier Attributes
_prodsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule61 Map Identifier Attributes
_lhsIsynMap
         __result_ :: T_Nonterminal_vOut13
__result_ = Seq Error
-> Map Identifier Attributes
-> [(Identifier, [Identifier])]
-> Nonterminal
-> Map Identifier Attributes
-> T_Nonterminal_vOut13
T_Nonterminal_vOut13 Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminal
_lhsOoutput Map Identifier Attributes
_lhsOsynMap'
         in T_Nonterminal_vOut13
__result_ )
     in T_Nonterminal_v13 -> T_Nonterminal_s14
C_Nonterminal_s14 T_Nonterminal_v13
v13
   {-# INLINE rule47 #-}
   {-# LINE 7 "src-ag/DistChildAttr.ag" #-}
   rule47 = \ inh_ nt_ ->
                                 {-# LINE 7 "src-ag/DistChildAttr.ag" #-}
                                 Map.singleton nt_ inh_
                                 {-# LINE 551 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule48 #-}
   {-# LINE 8 "src-ag/DistChildAttr.ag" #-}
   rule48 = \ nt_ syn_ ->
                                 {-# LINE 8 "src-ag/DistChildAttr.ag" #-}
                                 Map.singleton nt_ syn_
                                 {-# LINE 557 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule49 #-}
   {-# LINE 63 "src-ag/ResolveLocals.ag" #-}
   rule49 = \ ((_prodsIcons) :: [ConstructorIdent]) nt_ ->
                                {-# LINE 63 "src-ag/ResolveLocals.ag" #-}
                                [(nt_,_prodsIcons)]
                                {-# LINE 563 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule50 #-}
   {-# LINE 111 "src-ag/ResolveLocals.ag" #-}
   rule50 = \ nt_ ->
                               {-# LINE 111 "src-ag/ResolveLocals.ag" #-}
                               nt_
                               {-# LINE 569 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule51 #-}
   {-# LINE 114 "src-ag/ResolveLocals.ag" #-}
   rule51 = \ inh_ ->
                               {-# LINE 114 "src-ag/ResolveLocals.ag" #-}
                               inh_
                               {-# LINE 575 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule52 #-}
   {-# LINE 115 "src-ag/ResolveLocals.ag" #-}
   rule52 = \ syn_ ->
                               {-# LINE 115 "src-ag/ResolveLocals.ag" #-}
                               syn_
                               {-# LINE 581 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule53 #-}
   {-# LINE 127 "src-ag/ResolveLocals.ag" #-}
   rule53 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) nt_ ->
                                                {-# LINE 127 "src-ag/ResolveLocals.ag" #-}
                                                Map.findWithDefault Map.empty nt_ _lhsImergeMap
                                                {-# LINE 587 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule54 #-}
   rule54 = \ ((_prodsIerrors) :: Seq Error) ->
     _prodsIerrors
   {-# INLINE rule55 #-}
   rule55 = \ ((_prodsIoutput) :: Productions) inh_ nt_ params_ syn_ ->
     Nonterminal nt_ params_ inh_ syn_ _prodsIoutput
   {-# INLINE rule56 #-}
   rule56 = \ _output ->
     _output
   {-# INLINE rule57 #-}
   rule57 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule58 #-}
   rule58 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule59 #-}
   rule59 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule60 #-}
   rule60 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule61 #-}
   rule61 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap

-- Nonterminals ------------------------------------------------
-- wrapper
data Inh_Nonterminals  = Inh_Nonterminals { Inh_Nonterminals -> [Identifier]
allnts_Inh_Nonterminals :: ([Identifier]), Inh_Nonterminals -> Map Identifier Attributes
inhMap_Inh_Nonterminals :: (Map Identifier Attributes), Inh_Nonterminals
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), Inh_Nonterminals -> Options
options_Inh_Nonterminals :: (Options), Inh_Nonterminals -> Map Identifier Attributes
synMap_Inh_Nonterminals :: (Map Identifier Attributes) }
data Syn_Nonterminals  = Syn_Nonterminals { Syn_Nonterminals -> Seq Error
errors_Syn_Nonterminals :: (Seq Error), Syn_Nonterminals -> Map Identifier Attributes
inhMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> [(Identifier, [Identifier])]
nonts_Syn_Nonterminals :: ([(NontermIdent,[ConstructorIdent])]), Syn_Nonterminals -> Nonterminals
output_Syn_Nonterminals :: (Nonterminals), Syn_Nonterminals -> Map Identifier Attributes
synMap'_Syn_Nonterminals :: (Map Identifier Attributes) }
{-# INLINABLE wrap_Nonterminals #-}
wrap_Nonterminals :: T_Nonterminals  -> Inh_Nonterminals  -> (Syn_Nonterminals )
wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals
wrap_Nonterminals (T_Nonterminals Identity T_Nonterminals_s17
act) (Inh_Nonterminals [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Nonterminals_s17
sem <- Identity T_Nonterminals_s17
act
        let arg16 :: T_Nonterminals_vIn16
arg16 = [Identifier]
-> Map Identifier Attributes
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Options
-> Map Identifier Attributes
-> T_Nonterminals_vIn16
T_Nonterminals_vIn16 [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap
        (T_Nonterminals_vOut16 Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminals
_lhsOoutput Map Identifier Attributes
_lhsOsynMap') <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
sem T_Nonterminals_vIn16
arg16)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error
-> Map Identifier Attributes
-> [(Identifier, [Identifier])]
-> Nonterminals
-> Map Identifier Attributes
-> Syn_Nonterminals
Syn_Nonterminals Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminals
_lhsOoutput Map Identifier Attributes
_lhsOsynMap')
   )

-- cata
{-# NOINLINE sem_Nonterminals #-}
sem_Nonterminals :: Nonterminals  -> T_Nonterminals 
sem_Nonterminals :: Nonterminals -> T_Nonterminals
sem_Nonterminals Nonterminals
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Nonterminal -> T_Nonterminals -> T_Nonterminals
sem_Nonterminals_Cons T_Nonterminals
sem_Nonterminals_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Nonterminal -> T_Nonterminal
sem_Nonterminal Nonterminals
list)

-- semantic domain
newtype T_Nonterminals  = T_Nonterminals {
                                         T_Nonterminals -> Identity T_Nonterminals_s17
attach_T_Nonterminals :: Identity (T_Nonterminals_s17 )
                                         }
newtype T_Nonterminals_s17  = C_Nonterminals_s17 {
                                                 T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 :: (T_Nonterminals_v16 )
                                                 }
data T_Nonterminals_s18  = C_Nonterminals_s18
type T_Nonterminals_v16  = (T_Nonterminals_vIn16 ) -> (T_Nonterminals_vOut16 )
data T_Nonterminals_vIn16  = T_Nonterminals_vIn16 ([Identifier]) (Map Identifier Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Options) (Map Identifier Attributes)
data T_Nonterminals_vOut16  = T_Nonterminals_vOut16 (Seq Error) (Map Identifier Attributes) ([(NontermIdent,[ConstructorIdent])]) (Nonterminals) (Map Identifier Attributes)
{-# NOINLINE sem_Nonterminals_Cons #-}
sem_Nonterminals_Cons :: T_Nonterminal  -> T_Nonterminals  -> T_Nonterminals 
sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals
sem_Nonterminals_Cons T_Nonterminal
arg_hd_ T_Nonterminals
arg_tl_ = Identity T_Nonterminals_s17 -> T_Nonterminals
T_Nonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminals_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Nonterminals_s17
st17 = let
      v16 :: T_Nonterminals_v16 
      v16 :: T_Nonterminals_v16
v16 = \ (T_Nonterminals_vIn16 [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) -> ( let
         _hdX14 :: T_Nonterminal_s14
_hdX14 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminal -> Identity T_Nonterminal_s14
attach_T_Nonterminal (T_Nonterminal
arg_hd_))
         _tlX17 :: T_Nonterminals_s17
_tlX17 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminals -> Identity T_Nonterminals_s17
attach_T_Nonterminals (T_Nonterminals
arg_tl_))
         (T_Nonterminal_vOut13 Seq Error
_hdIerrors Map Identifier Attributes
_hdIinhMap' [(Identifier, [Identifier])]
_hdInonts Nonterminal
_hdIoutput Map Identifier Attributes
_hdIsynMap') = T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 T_Nonterminal_s14
_hdX14 ([Identifier]
-> Map Identifier Attributes
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Options
-> Map Identifier Attributes
-> T_Nonterminal_vIn13
T_Nonterminal_vIn13 [Identifier]
_hdOallnts Map Identifier Attributes
_hdOinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_hdOmergeMap Options
_hdOoptions Map Identifier Attributes
_hdOsynMap)
         (T_Nonterminals_vOut16 Seq Error
_tlIerrors Map Identifier Attributes
_tlIinhMap' [(Identifier, [Identifier])]
_tlInonts Nonterminals
_tlIoutput Map Identifier Attributes
_tlIsynMap') = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_tlX17 ([Identifier]
-> Map Identifier Attributes
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Options
-> Map Identifier Attributes
-> T_Nonterminals_vIn16
T_Nonterminals_vIn16 [Identifier]
_tlOallnts Map Identifier Attributes
_tlOinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_tlOmergeMap Options
_tlOoptions Map Identifier Attributes
_tlOsynMap)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule62 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOinhMap' :: Map Identifier Attributes
         _lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule63 Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
_tlIinhMap'
         _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]
         _lhsOnonts :: [(Identifier, [Identifier])]
_lhsOnonts = [(Identifier, [Identifier])]
-> [(Identifier, [Identifier])] -> [(Identifier, [Identifier])]
rule64 [(Identifier, [Identifier])]
_hdInonts [(Identifier, [Identifier])]
_tlInonts
         _lhsOsynMap' :: Map Identifier Attributes
         _lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule65 Map Identifier Attributes
_hdIsynMap' Map Identifier Attributes
_tlIsynMap'
         _output :: Nonterminals
_output = Nonterminal -> Nonterminals -> Nonterminals
rule66 Nonterminal
_hdIoutput Nonterminals
_tlIoutput
         _lhsOoutput :: Nonterminals
         _lhsOoutput :: Nonterminals
_lhsOoutput = forall {p}. p -> p
rule67 Nonterminals
_output
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule68 [Identifier]
_lhsIallnts
         _hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule69 Map Identifier Attributes
_lhsIinhMap
         _hdOmergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_hdOmergeMap = Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
rule70 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule71 Options
_lhsIoptions
         _hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule72 Map Identifier Attributes
_lhsIsynMap
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule73 [Identifier]
_lhsIallnts
         _tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule74 Map Identifier Attributes
_lhsIinhMap
         _tlOmergeMap :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_tlOmergeMap = Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
rule75 Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule76 Options
_lhsIoptions
         _tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule77 Map Identifier Attributes
_lhsIsynMap
         __result_ :: T_Nonterminals_vOut16
__result_ = Seq Error
-> Map Identifier Attributes
-> [(Identifier, [Identifier])]
-> Nonterminals
-> Map Identifier Attributes
-> T_Nonterminals_vOut16
T_Nonterminals_vOut16 Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminals
_lhsOoutput Map Identifier Attributes
_lhsOsynMap'
         in T_Nonterminals_vOut16
__result_ )
     in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
   {-# INLINE rule62 #-}
   rule62 :: Seq Error -> Seq Error -> Seq Error
rule62 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule63 #-}
   rule63 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule63 = \ ((Map Identifier Attributes
_hdIinhMap') :: Map Identifier Attributes) ((Map Identifier Attributes
_tlIinhMap') :: Map Identifier Attributes) ->
     Map Identifier Attributes
_hdIinhMap' forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIinhMap'
   {-# INLINE rule64 #-}
   rule64 :: [(Identifier, [Identifier])]
-> [(Identifier, [Identifier])] -> [(Identifier, [Identifier])]
rule64 = \ (([(Identifier, [Identifier])]
_hdInonts) :: [(NontermIdent,[ConstructorIdent])]) (([(Identifier, [Identifier])]
_tlInonts) :: [(NontermIdent,[ConstructorIdent])]) ->
     [(Identifier, [Identifier])]
_hdInonts forall a. [a] -> [a] -> [a]
++ [(Identifier, [Identifier])]
_tlInonts
   {-# INLINE rule65 #-}
   rule65 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule65 = \ ((Map Identifier Attributes
_hdIsynMap') :: Map Identifier Attributes) ((Map Identifier Attributes
_tlIsynMap') :: Map Identifier Attributes) ->
     Map Identifier Attributes
_hdIsynMap' forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIsynMap'
   {-# INLINE rule66 #-}
   rule66 :: Nonterminal -> Nonterminals -> Nonterminals
rule66 = \ ((Nonterminal
_hdIoutput) :: Nonterminal) ((Nonterminals
_tlIoutput) :: Nonterminals) ->
     (:) Nonterminal
_hdIoutput Nonterminals
_tlIoutput
   {-# INLINE rule67 #-}
   rule67 :: p -> p
rule67 = \ p
_output ->
     p
_output
   {-# INLINE rule68 #-}
   rule68 :: [Identifier] -> [Identifier]
rule68 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule69 #-}
   rule69 :: Map Identifier Attributes -> Map Identifier Attributes
rule69 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIinhMap
   {-# INLINE rule70 #-}
   rule70 :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
rule70 = \ ((Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->
     Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap
   {-# INLINE rule71 #-}
   rule71 :: Options -> Options
rule71 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule72 #-}
   rule72 :: Map Identifier Attributes -> Map Identifier Attributes
rule72 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIsynMap
   {-# INLINE rule73 #-}
   rule73 :: [Identifier] -> [Identifier]
rule73 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule74 #-}
   rule74 :: Map Identifier Attributes -> Map Identifier Attributes
rule74 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIinhMap
   {-# INLINE rule75 #-}
   rule75 :: Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
-> Map
     Identifier
     (Map Identifier (Map Identifier (Identifier, [Identifier])))
rule75 = \ ((Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->
     Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap
   {-# INLINE rule76 #-}
   rule76 :: Options -> Options
rule76 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule77 #-}
   rule77 :: Map Identifier Attributes -> Map Identifier Attributes
rule77 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIsynMap
{-# NOINLINE sem_Nonterminals_Nil #-}
sem_Nonterminals_Nil ::  T_Nonterminals 
sem_Nonterminals_Nil :: T_Nonterminals
sem_Nonterminals_Nil  = Identity T_Nonterminals_s17 -> T_Nonterminals
T_Nonterminals (forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminals_s17
st17) where
   {-# NOINLINE st17 #-}
   st17 :: T_Nonterminals_s17
st17 = let
      v16 :: T_Nonterminals_v16 
      v16 :: T_Nonterminals_v16
v16 = \ (T_Nonterminals_vIn16 [Identifier]
_lhsIallnts Map Identifier Attributes
_lhsIinhMap Map
  Identifier
  (Map Identifier (Map Identifier (Identifier, [Identifier])))
_lhsImergeMap Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule78  ()
         _lhsOinhMap' :: Map Identifier Attributes
         _lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = forall {k} {a}. () -> Map k a
rule79  ()
         _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]
         _lhsOnonts :: [(Identifier, [Identifier])]
_lhsOnonts = forall {a}. () -> [a]
rule80  ()
         _lhsOsynMap' :: Map Identifier Attributes
         _lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = forall {k} {a}. () -> Map k a
rule81  ()
         _output :: [a]
_output = forall {a}. () -> [a]
rule82  ()
         _lhsOoutput :: Nonterminals
         _lhsOoutput :: Nonterminals
_lhsOoutput = forall {p}. p -> p
rule83 forall a. [a]
_output
         __result_ :: T_Nonterminals_vOut16
__result_ = Seq Error
-> Map Identifier Attributes
-> [(Identifier, [Identifier])]
-> Nonterminals
-> Map Identifier Attributes
-> T_Nonterminals_vOut16
T_Nonterminals_vOut16 Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhMap' [(Identifier, [Identifier])]
_lhsOnonts Nonterminals
_lhsOoutput Map Identifier Attributes
_lhsOsynMap'
         in T_Nonterminals_vOut16
__result_ )
     in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
   {-# INLINE rule78 #-}
   rule78 :: () -> Seq a
rule78 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule79 #-}
   rule79 :: () -> Map k a
rule79 = \  (()
_ :: ()) ->
     forall k a. Map k a
Map.empty
   {-# INLINE rule80 #-}
   rule80 :: () -> [a]
rule80 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule81 #-}
   rule81 :: () -> Map k a
rule81 = \  (()
_ :: ()) ->
     forall k a. Map k a
Map.empty
   {-# INLINE rule82 #-}
   rule82 :: () -> [a]
rule82 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule83 #-}
   rule83 :: p -> p
rule83 = \ p
_output ->
     p
_output

-- Pattern -----------------------------------------------------
-- wrapper
data Inh_Pattern  = Inh_Pattern { Inh_Pattern -> Identifier
con_Inh_Pattern :: (Identifier), Inh_Pattern -> Attributes
inh_Inh_Pattern :: (Attributes), Inh_Pattern -> Identifier
nt_Inh_Pattern :: (Identifier), Inh_Pattern -> Attributes
syn_Inh_Pattern :: (Attributes) }
data Syn_Pattern  = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> Seq Error
errors_Syn_Pattern :: (Seq Error), Syn_Pattern -> [Identifier]
instVars_Syn_Pattern :: ([Identifier]), Syn_Pattern -> [Identifier]
locVars_Syn_Pattern :: ([Identifier]), Syn_Pattern -> Pattern
output_Syn_Pattern :: (Pattern) }
{-# 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_s20
act) (Inh_Pattern Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Pattern_s20
sem <- Identity T_Pattern_s20
act
        let arg19 :: T_Pattern_vIn19
arg19 = Identifier
-> Attributes -> Identifier -> Attributes -> T_Pattern_vIn19
T_Pattern_vIn19 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn
        (T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
sem T_Pattern_vIn19
arg19)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Pattern
-> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput)
   )

-- 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_s20
attach_T_Pattern :: Identity (T_Pattern_s20 )
                               }
newtype T_Pattern_s20  = C_Pattern_s20 {
                                       T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 :: (T_Pattern_v19 )
                                       }
data T_Pattern_s21  = C_Pattern_s21
type T_Pattern_v19  = (T_Pattern_vIn19 ) -> (T_Pattern_vOut19 )
data T_Pattern_vIn19  = T_Pattern_vIn19 (Identifier) (Attributes) (Identifier) (Attributes)
data T_Pattern_vOut19  = T_Pattern_vOut19 (Pattern) (Seq Error) ([Identifier]) ([Identifier]) (Pattern)
{-# 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_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patsX23 :: T_Patterns_s23
_patsX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut22 Patterns
_patsIcopy Seq Error
_patsIerrors [Identifier]
_patsIinstVars [Identifier]
_patsIlocVars Patterns
_patsIoutput) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Patterns_vIn22
T_Patterns_vIn22 Identifier
_patsOcon Attributes
_patsOinh Identifier
_patsOnt Attributes
_patsOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule84 Seq Error
_patsIerrors
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule85 [Identifier]
_patsIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule86 [Identifier]
_patsIlocVars
         _copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule87 Patterns
_patsIcopy Identifier
arg_name_
         _output :: Pattern
_output = Patterns -> Identifier -> Pattern
rule88 Patterns
_patsIoutput Identifier
arg_name_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule89 Pattern
_copy
         _lhsOoutput :: Pattern
         _lhsOoutput :: Pattern
_lhsOoutput = forall {p}. p -> p
rule90 Pattern
_output
         _patsOcon :: Identifier
_patsOcon = Identifier -> Identifier
rule91 Identifier
_lhsIcon
         _patsOinh :: Attributes
_patsOinh = Attributes -> Attributes
rule92 Attributes
_lhsIinh
         _patsOnt :: Identifier
_patsOnt = Identifier -> Identifier
rule93 Identifier
_lhsInt
         _patsOsyn :: Attributes
_patsOsyn = Attributes -> Attributes
rule94 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Pattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule84 #-}
   rule84 :: Seq Error -> Seq Error
rule84 = \ ((Seq Error
_patsIerrors) :: Seq Error) ->
     Seq Error
_patsIerrors
   {-# INLINE rule85 #-}
   rule85 :: [Identifier] -> [Identifier]
rule85 = \ (([Identifier]
_patsIinstVars) :: [Identifier]) ->
     [Identifier]
_patsIinstVars
   {-# INLINE rule86 #-}
   rule86 :: [Identifier] -> [Identifier]
rule86 = \ (([Identifier]
_patsIlocVars) :: [Identifier]) ->
     [Identifier]
_patsIlocVars
   {-# INLINE rule87 #-}
   rule87 :: Patterns -> Identifier -> Pattern
rule87 = \ ((Patterns
_patsIcopy) :: Patterns) Identifier
name_ ->
     Identifier -> Patterns -> Pattern
Constr Identifier
name_ Patterns
_patsIcopy
   {-# INLINE rule88 #-}
   rule88 :: Patterns -> Identifier -> Pattern
rule88 = \ ((Patterns
_patsIoutput) :: Patterns) Identifier
name_ ->
     Identifier -> Patterns -> Pattern
Constr Identifier
name_ Patterns
_patsIoutput
   {-# INLINE rule89 #-}
   rule89 :: p -> p
rule89 = \ p
_copy ->
     p
_copy
   {-# INLINE rule90 #-}
   rule90 :: p -> p
rule90 = \ p
_output ->
     p
_output
   {-# INLINE rule91 #-}
   rule91 :: Identifier -> Identifier
rule91 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule92 #-}
   rule92 :: Attributes -> Attributes
rule92 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule93 #-}
   rule93 :: Identifier -> Identifier
rule93 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule94 #-}
   rule94 :: Attributes -> Attributes
rule94 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# 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_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patsX23 :: T_Patterns_s23
_patsX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns (T_Patterns
arg_pats_))
         (T_Patterns_vOut22 Patterns
_patsIcopy Seq Error
_patsIerrors [Identifier]
_patsIinstVars [Identifier]
_patsIlocVars Patterns
_patsIoutput) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Patterns_vIn22
T_Patterns_vIn22 Identifier
_patsOcon Attributes
_patsOinh Identifier
_patsOnt Attributes
_patsOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule95 Seq Error
_patsIerrors
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule96 [Identifier]
_patsIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule97 [Identifier]
_patsIlocVars
         _copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule98 Patterns
_patsIcopy Pos
arg_pos_
         _output :: Pattern
_output = Patterns -> Pos -> Pattern
rule99 Patterns
_patsIoutput Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule100 Pattern
_copy
         _lhsOoutput :: Pattern
         _lhsOoutput :: Pattern
_lhsOoutput = forall {p}. p -> p
rule101 Pattern
_output
         _patsOcon :: Identifier
_patsOcon = Identifier -> Identifier
rule102 Identifier
_lhsIcon
         _patsOinh :: Attributes
_patsOinh = Attributes -> Attributes
rule103 Attributes
_lhsIinh
         _patsOnt :: Identifier
_patsOnt = Identifier -> Identifier
rule104 Identifier
_lhsInt
         _patsOsyn :: Attributes
_patsOsyn = Attributes -> Attributes
rule105 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Pattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule95 #-}
   rule95 :: Seq Error -> Seq Error
rule95 = \ ((Seq Error
_patsIerrors) :: Seq Error) ->
     Seq Error
_patsIerrors
   {-# INLINE rule96 #-}
   rule96 :: [Identifier] -> [Identifier]
rule96 = \ (([Identifier]
_patsIinstVars) :: [Identifier]) ->
     [Identifier]
_patsIinstVars
   {-# INLINE rule97 #-}
   rule97 :: [Identifier] -> [Identifier]
rule97 = \ (([Identifier]
_patsIlocVars) :: [Identifier]) ->
     [Identifier]
_patsIlocVars
   {-# INLINE rule98 #-}
   rule98 :: Patterns -> Pos -> Pattern
rule98 = \ ((Patterns
_patsIcopy) :: Patterns) Pos
pos_ ->
     Pos -> Patterns -> Pattern
Product Pos
pos_ Patterns
_patsIcopy
   {-# INLINE rule99 #-}
   rule99 :: Patterns -> Pos -> Pattern
rule99 = \ ((Patterns
_patsIoutput) :: Patterns) Pos
pos_ ->
     Pos -> Patterns -> Pattern
Product Pos
pos_ Patterns
_patsIoutput
   {-# INLINE rule100 #-}
   rule100 :: p -> p
rule100 = \ p
_copy ->
     p
_copy
   {-# INLINE rule101 #-}
   rule101 :: p -> p
rule101 = \ p
_output ->
     p
_output
   {-# INLINE rule102 #-}
   rule102 :: Identifier -> Identifier
rule102 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule103 #-}
   rule103 :: Attributes -> Attributes
rule103 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule104 #-}
   rule104 :: Identifier -> Identifier
rule104 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule105 #-}
   rule105 :: Attributes -> Attributes
rule105 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# 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_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patX20 :: T_Pattern_s20
_patX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut19 Pattern
_patIcopy Seq Error
_patIerrors [Identifier]
_patIinstVars [Identifier]
_patIlocVars Pattern
_patIoutput) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Pattern_vIn19
T_Pattern_vIn19 Identifier
_patOcon Attributes
_patOinh Identifier
_patOnt Attributes
_patOsyn)
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. a -> Identifier -> [a]
rule106 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. a -> Identifier -> [a]
rule107 Identifier
arg_attr_ Identifier
arg_field_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule108 Seq Error
_patIerrors
         _copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule109 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
         _output :: Pattern
_output = Pattern -> Identifier -> Identifier -> Pattern
rule110 Pattern
_patIoutput Identifier
arg_attr_ Identifier
arg_field_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule111 Pattern
_copy
         _lhsOoutput :: Pattern
         _lhsOoutput :: Pattern
_lhsOoutput = forall {p}. p -> p
rule112 Pattern
_output
         _patOcon :: Identifier
_patOcon = Identifier -> Identifier
rule113 Identifier
_lhsIcon
         _patOinh :: Attributes
_patOinh = Attributes -> Attributes
rule114 Attributes
_lhsIinh
         _patOnt :: Identifier
_patOnt = Identifier -> Identifier
rule115 Identifier
_lhsInt
         _patOsyn :: Attributes
_patOsyn = Attributes -> Attributes
rule116 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Pattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule106 #-}
   {-# LINE 95 "src-ag/ResolveLocals.ag" #-}
   rule106 = \ attr_ field_ ->
                               {-# LINE 95 "src-ag/ResolveLocals.ag" #-}
                               if field_ == _LOC
                                  then [attr_]
                                  else []
                               {-# LINE 957 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule107 #-}
   {-# LINE 98 "src-ag/ResolveLocals.ag" #-}
   rule107 = \ attr_ field_ ->
                               {-# LINE 98 "src-ag/ResolveLocals.ag" #-}
                               if field_ == _INST
                                  then [attr_]
                                  else []
                               {-# LINE 965 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule108 #-}
   rule108 = \ ((_patIerrors) :: Seq Error) ->
     _patIerrors
   {-# INLINE rule109 #-}
   rule109 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIcopy
   {-# INLINE rule110 #-}
   rule110 = \ ((_patIoutput) :: Pattern) attr_ field_ ->
     Alias field_ attr_ _patIoutput
   {-# INLINE rule111 #-}
   rule111 = \ _copy ->
     _copy
   {-# INLINE rule112 #-}
   rule112 = \ _output ->
     _output
   {-# INLINE rule113 #-}
   rule113 = \ ((_lhsIcon) :: Identifier) ->
     _lhsIcon
   {-# INLINE rule114 #-}
   rule114 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule115 #-}
   rule115 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule116 #-}
   rule116 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
{-# 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_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _patX20 :: T_Pattern_s20
_patX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_pat_))
         (T_Pattern_vOut19 Pattern
_patIcopy Seq Error
_patIerrors [Identifier]
_patIinstVars [Identifier]
_patIlocVars Pattern
_patIoutput) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Pattern_vIn19
T_Pattern_vIn19 Identifier
_patOcon Attributes
_patOinh Identifier
_patOnt Attributes
_patOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule117 Seq Error
_patIerrors
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule118 [Identifier]
_patIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule119 [Identifier]
_patIlocVars
         _copy :: Pattern
_copy = Pattern -> Pattern
rule120 Pattern
_patIcopy
         _output :: Pattern
_output = Pattern -> Pattern
rule121 Pattern
_patIoutput
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule122 Pattern
_copy
         _lhsOoutput :: Pattern
         _lhsOoutput :: Pattern
_lhsOoutput = forall {p}. p -> p
rule123 Pattern
_output
         _patOcon :: Identifier
_patOcon = Identifier -> Identifier
rule124 Identifier
_lhsIcon
         _patOinh :: Attributes
_patOinh = Attributes -> Attributes
rule125 Attributes
_lhsIinh
         _patOnt :: Identifier
_patOnt = Identifier -> Identifier
rule126 Identifier
_lhsInt
         _patOsyn :: Attributes
_patOsyn = Attributes -> Attributes
rule127 Attributes
_lhsIsyn
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Pattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule117 #-}
   rule117 :: Seq Error -> Seq Error
rule117 = \ ((Seq Error
_patIerrors) :: Seq Error) ->
     Seq Error
_patIerrors
   {-# INLINE rule118 #-}
   rule118 :: [Identifier] -> [Identifier]
rule118 = \ (([Identifier]
_patIinstVars) :: [Identifier]) ->
     [Identifier]
_patIinstVars
   {-# INLINE rule119 #-}
   rule119 :: [Identifier] -> [Identifier]
rule119 = \ (([Identifier]
_patIlocVars) :: [Identifier]) ->
     [Identifier]
_patIlocVars
   {-# INLINE rule120 #-}
   rule120 :: Pattern -> Pattern
rule120 = \ ((Pattern
_patIcopy) :: Pattern) ->
     Pattern -> Pattern
Irrefutable Pattern
_patIcopy
   {-# INLINE rule121 #-}
   rule121 :: Pattern -> Pattern
rule121 = \ ((Pattern
_patIoutput) :: Pattern) ->
     Pattern -> Pattern
Irrefutable Pattern
_patIoutput
   {-# INLINE rule122 #-}
   rule122 :: p -> p
rule122 = \ p
_copy ->
     p
_copy
   {-# INLINE rule123 #-}
   rule123 :: p -> p
rule123 = \ p
_output ->
     p
_output
   {-# INLINE rule124 #-}
   rule124 :: Identifier -> Identifier
rule124 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule125 #-}
   rule125 :: Attributes -> Attributes
rule125 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule126 #-}
   rule126 :: Identifier -> Identifier
rule126 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule127 #-}
   rule127 :: Attributes -> Attributes
rule127 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# 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_s20 -> T_Pattern
T_Pattern (forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s20
st20) where
   {-# NOINLINE st20 #-}
   st20 :: T_Pattern_s20
st20 = let
      v19 :: T_Pattern_v19 
      v19 :: T_Pattern_v19
v19 = \ (T_Pattern_vIn19 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule128  ()
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. () -> [a]
rule129  ()
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. () -> [a]
rule130  ()
         _copy :: Pattern
_copy = Pos -> Pattern
rule131 Pos
arg_pos_
         _output :: Pattern
_output = Pos -> Pattern
rule132 Pos
arg_pos_
         _lhsOcopy :: Pattern
         _lhsOcopy :: Pattern
_lhsOcopy = forall {p}. p -> p
rule133 Pattern
_copy
         _lhsOoutput :: Pattern
         _lhsOoutput :: Pattern
_lhsOoutput = forall {p}. p -> p
rule134 Pattern
_output
         __result_ :: T_Pattern_vOut19
__result_ = Pattern
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Pattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Pattern
_lhsOoutput
         in T_Pattern_vOut19
__result_ )
     in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
   {-# INLINE rule128 #-}
   rule128 :: () -> Seq a
rule128 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule129 #-}
   rule129 :: () -> [a]
rule129 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule130 #-}
   rule130 :: () -> [a]
rule130 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule131 #-}
   rule131 :: Pos -> Pattern
rule131 = \ Pos
pos_ ->
     Pos -> Pattern
Underscore Pos
pos_
   {-# INLINE rule132 #-}
   rule132 :: Pos -> Pattern
rule132 = \ Pos
pos_ ->
     Pos -> Pattern
Underscore Pos
pos_
   {-# INLINE rule133 #-}
   rule133 :: p -> p
rule133 = \ p
_copy ->
     p
_copy
   {-# INLINE rule134 #-}
   rule134 :: p -> p
rule134 = \ p
_output ->
     p
_output

-- Patterns ----------------------------------------------------
-- wrapper
data Inh_Patterns  = Inh_Patterns { Inh_Patterns -> Identifier
con_Inh_Patterns :: (Identifier), Inh_Patterns -> Attributes
inh_Inh_Patterns :: (Attributes), Inh_Patterns -> Identifier
nt_Inh_Patterns :: (Identifier), Inh_Patterns -> Attributes
syn_Inh_Patterns :: (Attributes) }
data Syn_Patterns  = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> Seq Error
errors_Syn_Patterns :: (Seq Error), Syn_Patterns -> [Identifier]
instVars_Syn_Patterns :: ([Identifier]), Syn_Patterns -> [Identifier]
locVars_Syn_Patterns :: ([Identifier]), Syn_Patterns -> Patterns
output_Syn_Patterns :: (Patterns) }
{-# INLINABLE wrap_Patterns #-}
wrap_Patterns :: T_Patterns  -> Inh_Patterns  -> (Syn_Patterns )
wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns
wrap_Patterns (T_Patterns Identity T_Patterns_s23
act) (Inh_Patterns Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Patterns_s23
sem <- Identity T_Patterns_s23
act
        let arg22 :: T_Patterns_vIn22
arg22 = Identifier
-> Attributes -> Identifier -> Attributes -> T_Patterns_vIn22
T_Patterns_vIn22 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn
        (T_Patterns_vOut22 Patterns
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Patterns
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
sem T_Patterns_vIn22
arg22)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Patterns
-> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Patterns
_lhsOoutput)
   )

-- 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_s23
attach_T_Patterns :: Identity (T_Patterns_s23 )
                                 }
newtype T_Patterns_s23  = C_Patterns_s23 {
                                         T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 :: (T_Patterns_v22 )
                                         }
data T_Patterns_s24  = C_Patterns_s24
type T_Patterns_v22  = (T_Patterns_vIn22 ) -> (T_Patterns_vOut22 )
data T_Patterns_vIn22  = T_Patterns_vIn22 (Identifier) (Attributes) (Identifier) (Attributes)
data T_Patterns_vOut22  = T_Patterns_vOut22 (Patterns) (Seq Error) ([Identifier]) ([Identifier]) (Patterns)
{-# NOINLINE sem_Patterns_Cons #-}
sem_Patterns_Cons :: T_Pattern  -> T_Patterns  -> T_Patterns 
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Pattern
arg_hd_ T_Patterns
arg_tl_ = Identity T_Patterns_s23 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_Patterns_s23
st23 = let
      v22 :: T_Patterns_v22 
      v22 :: T_Patterns_v22
v22 = \ (T_Patterns_vIn22 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _hdX20 :: T_Pattern_s20
_hdX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_hd_))
         _tlX23 :: T_Patterns_s23
_tlX23 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s23
attach_T_Patterns (T_Patterns
arg_tl_))
         (T_Pattern_vOut19 Pattern
_hdIcopy Seq Error
_hdIerrors [Identifier]
_hdIinstVars [Identifier]
_hdIlocVars Pattern
_hdIoutput) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_hdX20 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Pattern_vIn19
T_Pattern_vIn19 Identifier
_hdOcon Attributes
_hdOinh Identifier
_hdOnt Attributes
_hdOsyn)
         (T_Patterns_vOut22 Patterns
_tlIcopy Seq Error
_tlIerrors [Identifier]
_tlIinstVars [Identifier]
_tlIlocVars Patterns
_tlIoutput) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_tlX23 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Patterns_vIn22
T_Patterns_vIn22 Identifier
_tlOcon Attributes
_tlOinh Identifier
_tlOnt Attributes
_tlOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule135 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier] -> [Identifier]
rule136 [Identifier]
_hdIinstVars [Identifier]
_tlIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier] -> [Identifier]
rule137 [Identifier]
_hdIlocVars [Identifier]
_tlIlocVars
         _copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule138 Pattern
_hdIcopy Patterns
_tlIcopy
         _output :: Patterns
_output = Pattern -> Patterns -> Patterns
rule139 Pattern
_hdIoutput Patterns
_tlIoutput
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall {p}. p -> p
rule140 Patterns
_copy
         _lhsOoutput :: Patterns
         _lhsOoutput :: Patterns
_lhsOoutput = forall {p}. p -> p
rule141 Patterns
_output
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule142 Identifier
_lhsIcon
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule143 Attributes
_lhsIinh
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule144 Identifier
_lhsInt
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule145 Attributes
_lhsIsyn
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule146 Identifier
_lhsIcon
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule147 Attributes
_lhsIinh
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule148 Identifier
_lhsInt
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule149 Attributes
_lhsIsyn
         __result_ :: T_Patterns_vOut22
__result_ = Patterns
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Patterns
-> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Patterns
_lhsOoutput
         in T_Patterns_vOut22
__result_ )
     in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
   {-# INLINE rule135 #-}
   rule135 :: Seq Error -> Seq Error -> Seq Error
rule135 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule136 #-}
   rule136 :: [Identifier] -> [Identifier] -> [Identifier]
rule136 = \ (([Identifier]
_hdIinstVars) :: [Identifier]) (([Identifier]
_tlIinstVars) :: [Identifier]) ->
     [Identifier]
_hdIinstVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIinstVars
   {-# INLINE rule137 #-}
   rule137 :: [Identifier] -> [Identifier] -> [Identifier]
rule137 = \ (([Identifier]
_hdIlocVars) :: [Identifier]) (([Identifier]
_tlIlocVars) :: [Identifier]) ->
     [Identifier]
_hdIlocVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIlocVars
   {-# INLINE rule138 #-}
   rule138 :: Pattern -> Patterns -> Patterns
rule138 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
     (:) Pattern
_hdIcopy Patterns
_tlIcopy
   {-# INLINE rule139 #-}
   rule139 :: Pattern -> Patterns -> Patterns
rule139 = \ ((Pattern
_hdIoutput) :: Pattern) ((Patterns
_tlIoutput) :: Patterns) ->
     (:) Pattern
_hdIoutput Patterns
_tlIoutput
   {-# INLINE rule140 #-}
   rule140 :: p -> p
rule140 = \ p
_copy ->
     p
_copy
   {-# INLINE rule141 #-}
   rule141 :: p -> p
rule141 = \ p
_output ->
     p
_output
   {-# INLINE rule142 #-}
   rule142 :: Identifier -> Identifier
rule142 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule143 #-}
   rule143 :: Attributes -> Attributes
rule143 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule144 #-}
   rule144 :: Identifier -> Identifier
rule144 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule145 #-}
   rule145 :: Attributes -> Attributes
rule145 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule146 #-}
   rule146 :: Identifier -> Identifier
rule146 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule147 #-}
   rule147 :: Attributes -> Attributes
rule147 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule148 #-}
   rule148 :: Identifier -> Identifier
rule148 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule149 #-}
   rule149 :: Attributes -> Attributes
rule149 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil ::  T_Patterns 
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil  = Identity T_Patterns_s23 -> T_Patterns
T_Patterns (forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s23
st23) where
   {-# NOINLINE st23 #-}
   st23 :: T_Patterns_s23
st23 = let
      v22 :: T_Patterns_v22 
      v22 :: T_Patterns_v22
v22 = \ (T_Patterns_vIn22 Identifier
_lhsIcon Attributes
_lhsIinh Identifier
_lhsInt Attributes
_lhsIsyn) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule150  ()
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. () -> [a]
rule151  ()
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. () -> [a]
rule152  ()
         _copy :: [a]
_copy = forall {a}. () -> [a]
rule153  ()
         _output :: [a]
_output = forall {a}. () -> [a]
rule154  ()
         _lhsOcopy :: Patterns
         _lhsOcopy :: Patterns
_lhsOcopy = forall {p}. p -> p
rule155 forall a. [a]
_copy
         _lhsOoutput :: Patterns
         _lhsOoutput :: Patterns
_lhsOoutput = forall {p}. p -> p
rule156 forall a. [a]
_output
         __result_ :: T_Patterns_vOut22
__result_ = Patterns
-> Seq Error
-> [Identifier]
-> [Identifier]
-> Patterns
-> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Patterns
_lhsOoutput
         in T_Patterns_vOut22
__result_ )
     in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
   {-# INLINE rule150 #-}
   rule150 :: () -> Seq a
rule150 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule151 #-}
   rule151 :: () -> [a]
rule151 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule152 #-}
   rule152 :: () -> [a]
rule152 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule153 #-}
   rule153 :: () -> [a]
rule153 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule154 #-}
   rule154 :: () -> [a]
rule154 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule155 #-}
   rule155 :: p -> p
rule155 = \ p
_copy ->
     p
_copy
   {-# INLINE rule156 #-}
   rule156 :: p -> p
rule156 = \ p
_output ->
     p
_output

-- Production --------------------------------------------------
-- wrapper
data Inh_Production  = Inh_Production { Inh_Production -> [Identifier]
allnts_Inh_Production :: ([Identifier]), Inh_Production -> Attributes
inh_Inh_Production :: (Attributes), Inh_Production -> Map Identifier Attributes
inhMap_Inh_Production :: (Map Identifier Attributes), Inh_Production
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), Inh_Production -> Identifier
nt_Inh_Production :: (Identifier), Inh_Production -> Options
options_Inh_Production :: (Options), Inh_Production -> Attributes
syn_Inh_Production :: (Attributes), Inh_Production -> Map Identifier Attributes
synMap_Inh_Production :: (Map Identifier Attributes) }
data Syn_Production  = Syn_Production { Syn_Production -> [Identifier]
cons_Syn_Production :: ([ConstructorIdent]), Syn_Production -> Seq Error
errors_Syn_Production :: (Seq Error), Syn_Production -> Production
output_Syn_Production :: (Production) }
{-# INLINABLE wrap_Production #-}
wrap_Production :: T_Production  -> Inh_Production  -> (Syn_Production )
wrap_Production :: T_Production -> Inh_Production -> Syn_Production
wrap_Production (T_Production Identity T_Production_s26
act) (Inh_Production [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Production_s26
sem <- Identity T_Production_s26
act
        let arg25 :: T_Production_vIn25
arg25 = [Identifier]
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Options
-> Attributes
-> Map Identifier Attributes
-> T_Production_vIn25
T_Production_vIn25 [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap
        (T_Production_vOut25 [Identifier]
_lhsOcons Seq Error
_lhsOerrors Production
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Production_s26 -> T_Production_v25
inv_Production_s26 T_Production_s26
sem T_Production_vIn25
arg25)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([Identifier] -> Seq Error -> Production -> Syn_Production
Syn_Production [Identifier]
_lhsOcons Seq Error
_lhsOerrors Production
_lhsOoutput)
   )

-- cata
{-# INLINE sem_Production #-}
sem_Production :: Production  -> T_Production 
sem_Production :: Production -> T_Production
sem_Production ( Production Identifier
con_ [Identifier]
params_ [Type]
constraints_ Children
children_ Rules
rules_ TypeSigs
typeSigs_ MaybeMacro
macro_ ) = Identifier
-> [Identifier]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production Identifier
con_ [Identifier]
params_ [Type]
constraints_ ( Children -> T_Children
sem_Children Children
children_ ) ( Rules -> T_Rules
sem_Rules Rules
rules_ ) ( TypeSigs -> T_TypeSigs
sem_TypeSigs TypeSigs
typeSigs_ ) MaybeMacro
macro_

-- semantic domain
newtype T_Production  = T_Production {
                                     T_Production -> Identity T_Production_s26
attach_T_Production :: Identity (T_Production_s26 )
                                     }
newtype T_Production_s26  = C_Production_s26 {
                                             T_Production_s26 -> T_Production_v25
inv_Production_s26 :: (T_Production_v25 )
                                             }
data T_Production_s27  = C_Production_s27
type T_Production_v25  = (T_Production_vIn25 ) -> (T_Production_vOut25 )
data T_Production_vIn25  = T_Production_vIn25 ([Identifier]) (Attributes) (Map Identifier Attributes) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Options) (Attributes) (Map Identifier Attributes)
data T_Production_vOut25  = T_Production_vOut25 ([ConstructorIdent]) (Seq Error) (Production)
{-# NOINLINE sem_Production_Production #-}
sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children  -> T_Rules  -> T_TypeSigs  -> (MaybeMacro) -> T_Production 
sem_Production_Production :: Identifier
-> [Identifier]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production Identifier
arg_con_ [Identifier]
arg_params_ [Type]
arg_constraints_ T_Children
arg_children_ T_Rules
arg_rules_ T_TypeSigs
arg_typeSigs_ MaybeMacro
arg_macro_ = Identity T_Production_s26 -> T_Production
T_Production (forall (m :: * -> *) a. Monad m => a -> m a
return T_Production_s26
st26) where
   {-# NOINLINE st26 #-}
   st26 :: T_Production_s26
st26 = let
      v25 :: T_Production_v25 
      v25 :: T_Production_v25
v25 = \ (T_Production_vIn25 [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _childrenX5 :: T_Children_s5
_childrenX5 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Children -> Identity T_Children_s5
attach_T_Children (T_Children
arg_children_))
         _rulesX35 :: T_Rules_s35
_rulesX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rules -> Identity T_Rules_s35
attach_T_Rules (T_Rules
arg_rules_))
         _typeSigsX41 :: T_TypeSigs_s41
_typeSigsX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSigs -> Identity T_TypeSigs_s41
attach_T_TypeSigs (T_TypeSigs
arg_typeSigs_))
         (T_Children_vOut4 [(Identifier, Attributes, Attributes)]
_childrenIattributes [(Identifier, Type, ChildKind)]
_childrenIfields Children
_childrenIoutput) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_childrenX5 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Attributes
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 [(Identifier, Type, ChildKind)]
_childrenOallfields [Identifier]
_childrenOallnts [(Identifier, Identifier)]
_childrenOattrs Identifier
_childrenOcon Attributes
_childrenOinh Map Identifier Attributes
_childrenOinhMap Map Identifier (Identifier, [Identifier])
_childrenOmergeMap Identifier
_childrenOnt Attributes
_childrenOsyn Map Identifier Attributes
_childrenOsynMap)
         (T_Rules_vOut34 Seq Error
_rulesIerrors [Identifier]
_rulesIinstVars [Identifier]
_rulesIlocVars Rules
_rulesIoutput) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_rulesX35 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> Attributes
-> T_Rules_vIn34
T_Rules_vIn34 [(Identifier, Type, ChildKind)]
_rulesOallfields [Identifier]
_rulesOallnts [(Identifier, Identifier)]
_rulesOattrs Identifier
_rulesOcon Attributes
_rulesOinh Map Identifier (Identifier, [Identifier])
_rulesOmergeMap Identifier
_rulesOnt Options
_rulesOoptions Attributes
_rulesOsyn)
         (T_TypeSigs_vOut40 TypeSigs
_typeSigsIoutput) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_typeSigsX41 (T_TypeSigs_vIn40
T_TypeSigs_vIn40 )
         _lhsOcons :: [ConstructorIdent]
         _lhsOcons :: [Identifier]
_lhsOcons = forall {a}. a -> [a]
rule157 Identifier
arg_con_
         _allfields :: [(Identifier, Type, ChildKind)]
_allfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule158 [(Identifier, Type, ChildKind)]
_childrenIfields
         _attrs :: [(Identifier, Identifier)]
_attrs = [(Identifier, Attributes, Attributes)]
-> [Identifier]
-> [Identifier]
-> [Identifier]
-> [(Identifier, Identifier)]
rule159 [(Identifier, Attributes, Attributes)]
_childrenIattributes [Identifier]
_inhnames [Identifier]
_rulesIinstVars [Identifier]
_rulesIlocVars
         _inhnames :: [Identifier]
_inhnames = Attributes -> [Identifier]
rule160 Attributes
_lhsIinh
         _synnames :: [Identifier]
_synnames = Attributes -> [Identifier]
rule161 Attributes
_lhsIsyn
         _childrenOcon :: Identifier
_childrenOcon = forall {p}. p -> p
rule162 Identifier
arg_con_
         _rulesOcon :: Identifier
_rulesOcon = forall {p}. p -> p
rule163 Identifier
arg_con_
         _mergeMap :: Map Identifier (Identifier, [Identifier])
_mergeMap = Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier -> Map Identifier (Identifier, [Identifier])
rule164 Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
arg_con_
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error
rule165 Seq Error
_rulesIerrors
         _output :: Production
_output = Children
-> Rules
-> TypeSigs
-> Identifier
-> [Type]
-> MaybeMacro
-> [Identifier]
-> Production
rule166 Children
_childrenIoutput Rules
_rulesIoutput TypeSigs
_typeSigsIoutput Identifier
arg_con_ [Type]
arg_constraints_ MaybeMacro
arg_macro_ [Identifier]
arg_params_
         _lhsOoutput :: Production
         _lhsOoutput :: Production
_lhsOoutput = forall {p}. p -> p
rule167 Production
_output
         _childrenOallfields :: [(Identifier, Type, ChildKind)]
_childrenOallfields = forall {p}. p -> p
rule168 [(Identifier, Type, ChildKind)]
_allfields
         _childrenOallnts :: [Identifier]
_childrenOallnts = [Identifier] -> [Identifier]
rule169 [Identifier]
_lhsIallnts
         _childrenOattrs :: [(Identifier, Identifier)]
_childrenOattrs = forall {p}. p -> p
rule170 [(Identifier, Identifier)]
_attrs
         _childrenOinh :: Attributes
_childrenOinh = Attributes -> Attributes
rule171 Attributes
_lhsIinh
         _childrenOinhMap :: Map Identifier Attributes
_childrenOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule172 Map Identifier Attributes
_lhsIinhMap
         _childrenOmergeMap :: Map Identifier (Identifier, [Identifier])
_childrenOmergeMap = forall {p}. p -> p
rule173 Map Identifier (Identifier, [Identifier])
_mergeMap
         _childrenOnt :: Identifier
_childrenOnt = Identifier -> Identifier
rule174 Identifier
_lhsInt
         _childrenOsyn :: Attributes
_childrenOsyn = Attributes -> Attributes
rule175 Attributes
_lhsIsyn
         _childrenOsynMap :: Map Identifier Attributes
_childrenOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule176 Map Identifier Attributes
_lhsIsynMap
         _rulesOallfields :: [(Identifier, Type, ChildKind)]
_rulesOallfields = forall {p}. p -> p
rule177 [(Identifier, Type, ChildKind)]
_allfields
         _rulesOallnts :: [Identifier]
_rulesOallnts = [Identifier] -> [Identifier]
rule178 [Identifier]
_lhsIallnts
         _rulesOattrs :: [(Identifier, Identifier)]
_rulesOattrs = forall {p}. p -> p
rule179 [(Identifier, Identifier)]
_attrs
         _rulesOinh :: Attributes
_rulesOinh = Attributes -> Attributes
rule180 Attributes
_lhsIinh
         _rulesOmergeMap :: Map Identifier (Identifier, [Identifier])
_rulesOmergeMap = forall {p}. p -> p
rule181 Map Identifier (Identifier, [Identifier])
_mergeMap
         _rulesOnt :: Identifier
_rulesOnt = Identifier -> Identifier
rule182 Identifier
_lhsInt
         _rulesOoptions :: Options
_rulesOoptions = Options -> Options
rule183 Options
_lhsIoptions
         _rulesOsyn :: Attributes
_rulesOsyn = Attributes -> Attributes
rule184 Attributes
_lhsIsyn
         __result_ :: T_Production_vOut25
__result_ = [Identifier] -> Seq Error -> Production -> T_Production_vOut25
T_Production_vOut25 [Identifier]
_lhsOcons Seq Error
_lhsOerrors Production
_lhsOoutput
         in T_Production_vOut25
__result_ )
     in T_Production_v25 -> T_Production_s26
C_Production_s26 T_Production_v25
v25
   {-# INLINE rule157 #-}
   {-# LINE 66 "src-ag/ResolveLocals.ag" #-}
   rule157 = \ con_ ->
                              {-# LINE 66 "src-ag/ResolveLocals.ag" #-}
                              [con_]
                              {-# LINE 1333 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule158 #-}
   {-# LINE 73 "src-ag/ResolveLocals.ag" #-}
   rule158 = \ ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ->
                                  {-# LINE 73 "src-ag/ResolveLocals.ag" #-}
                                  _childrenIfields
                                  {-# LINE 1339 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule159 #-}
   {-# LINE 74 "src-ag/ResolveLocals.ag" #-}
   rule159 = \ ((_childrenIattributes) :: [(Identifier,Attributes,Attributes)]) _inhnames ((_rulesIinstVars) :: [Identifier]) ((_rulesIlocVars) :: [Identifier]) ->
                                   {-# LINE 74 "src-ag/ResolveLocals.ag" #-}
                                   map ((,) _LOC)  _rulesIlocVars ++
                                   map ((,) _INST) _rulesIinstVars ++
                                   map ((,) _LHS)  _inhnames ++
                                   concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]
                                   {-# LINE 1348 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule160 #-}
   {-# LINE 78 "src-ag/ResolveLocals.ag" #-}
   rule160 = \ ((_lhsIinh) :: Attributes) ->
                                   {-# LINE 78 "src-ag/ResolveLocals.ag" #-}
                                   Map.keys _lhsIinh
                                   {-# LINE 1354 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule161 #-}
   {-# LINE 79 "src-ag/ResolveLocals.ag" #-}
   rule161 = \ ((_lhsIsyn) :: Attributes) ->
                                   {-# LINE 79 "src-ag/ResolveLocals.ag" #-}
                                   Map.keys _lhsIsyn
                                   {-# LINE 1360 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule162 #-}
   {-# LINE 107 "src-ag/ResolveLocals.ag" #-}
   rule162 = \ con_ ->
                                  {-# LINE 107 "src-ag/ResolveLocals.ag" #-}
                                  con_
                                  {-# LINE 1366 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule163 #-}
   {-# LINE 109 "src-ag/ResolveLocals.ag" #-}
   rule163 = \ con_ ->
                               {-# LINE 109 "src-ag/ResolveLocals.ag" #-}
                               con_
                               {-# LINE 1372 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule164 #-}
   {-# LINE 128 "src-ag/ResolveLocals.ag" #-}
   rule164 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) con_ ->
                                                {-# LINE 128 "src-ag/ResolveLocals.ag" #-}
                                                Map.findWithDefault Map.empty con_ _lhsImergeMap
                                                {-# LINE 1378 "src-generated/ResolveLocals.hs" #-}
   {-# INLINE rule165 #-}
   rule165 = \ ((_rulesIerrors) :: Seq Error) ->
     _rulesIerrors
   {-# INLINE rule166 #-}
   rule166 = \ ((_childrenIoutput) :: Children) ((_rulesIoutput) :: Rules) ((_typeSigsIoutput) :: TypeSigs) con_ constraints_ macro_ params_ ->
     Production con_ params_ constraints_ _childrenIoutput _rulesIoutput _typeSigsIoutput macro_
   {-# INLINE rule167 #-}
   rule167 = \ _output ->
     _output
   {-# INLINE rule168 #-}
   rule168 = \ _allfields ->
     _allfields
   {-# INLINE rule169 #-}
   rule169 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule170 #-}
   rule170 = \ _attrs ->
     _attrs
   {-# INLINE rule171 #-}
   rule171 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule172 #-}
   rule172 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
     _lhsIinhMap
   {-# INLINE rule173 #-}
   rule173 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule174 #-}
   rule174 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule175 #-}
   rule175 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn
   {-# INLINE rule176 #-}
   rule176 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
     _lhsIsynMap
   {-# INLINE rule177 #-}
   rule177 = \ _allfields ->
     _allfields
   {-# INLINE rule178 #-}
   rule178 = \ ((_lhsIallnts) :: [Identifier]) ->
     _lhsIallnts
   {-# INLINE rule179 #-}
   rule179 = \ _attrs ->
     _attrs
   {-# INLINE rule180 #-}
   rule180 = \ ((_lhsIinh) :: Attributes) ->
     _lhsIinh
   {-# INLINE rule181 #-}
   rule181 = \ _mergeMap ->
     _mergeMap
   {-# INLINE rule182 #-}
   rule182 = \ ((_lhsInt) :: Identifier) ->
     _lhsInt
   {-# INLINE rule183 #-}
   rule183 = \ ((_lhsIoptions) :: Options) ->
     _lhsIoptions
   {-# INLINE rule184 #-}
   rule184 = \ ((_lhsIsyn) :: Attributes) ->
     _lhsIsyn

-- Productions -------------------------------------------------
-- wrapper
data Inh_Productions  = Inh_Productions { Inh_Productions -> [Identifier]
allnts_Inh_Productions :: ([Identifier]), Inh_Productions -> Attributes
inh_Inh_Productions :: (Attributes), Inh_Productions -> Map Identifier Attributes
inhMap_Inh_Productions :: (Map Identifier Attributes), Inh_Productions
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), Inh_Productions -> Identifier
nt_Inh_Productions :: (Identifier), Inh_Productions -> Options
options_Inh_Productions :: (Options), Inh_Productions -> Attributes
syn_Inh_Productions :: (Attributes), Inh_Productions -> Map Identifier Attributes
synMap_Inh_Productions :: (Map Identifier Attributes) }
data Syn_Productions  = Syn_Productions { Syn_Productions -> [Identifier]
cons_Syn_Productions :: ([ConstructorIdent]), Syn_Productions -> Seq Error
errors_Syn_Productions :: (Seq Error), Syn_Productions -> Productions
output_Syn_Productions :: (Productions) }
{-# INLINABLE wrap_Productions #-}
wrap_Productions :: T_Productions  -> Inh_Productions  -> (Syn_Productions )
wrap_Productions :: T_Productions -> Inh_Productions -> Syn_Productions
wrap_Productions (T_Productions Identity T_Productions_s29
act) (Inh_Productions [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Productions_s29
sem <- Identity T_Productions_s29
act
        let arg28 :: T_Productions_vIn28
arg28 = [Identifier]
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Options
-> Attributes
-> Map Identifier Attributes
-> T_Productions_vIn28
T_Productions_vIn28 [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap
        (T_Productions_vOut28 [Identifier]
_lhsOcons Seq Error
_lhsOerrors Productions
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
sem T_Productions_vIn28
arg28)
        forall (m :: * -> *) a. Monad m => a -> m a
return ([Identifier] -> Seq Error -> Productions -> Syn_Productions
Syn_Productions [Identifier]
_lhsOcons Seq Error
_lhsOerrors Productions
_lhsOoutput)
   )

-- cata
{-# NOINLINE sem_Productions #-}
sem_Productions :: Productions  -> T_Productions 
sem_Productions :: Productions -> T_Productions
sem_Productions Productions
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Production -> T_Productions -> T_Productions
sem_Productions_Cons T_Productions
sem_Productions_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Production -> T_Production
sem_Production Productions
list)

-- semantic domain
newtype T_Productions  = T_Productions {
                                       T_Productions -> Identity T_Productions_s29
attach_T_Productions :: Identity (T_Productions_s29 )
                                       }
newtype T_Productions_s29  = C_Productions_s29 {
                                               T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 :: (T_Productions_v28 )
                                               }
data T_Productions_s30  = C_Productions_s30
type T_Productions_v28  = (T_Productions_vIn28 ) -> (T_Productions_vOut28 )
data T_Productions_vIn28  = T_Productions_vIn28 ([Identifier]) (Attributes) (Map Identifier Attributes) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Options) (Attributes) (Map Identifier Attributes)
data T_Productions_vOut28  = T_Productions_vOut28 ([ConstructorIdent]) (Seq Error) (Productions)
{-# NOINLINE sem_Productions_Cons #-}
sem_Productions_Cons :: T_Production  -> T_Productions  -> T_Productions 
sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions
sem_Productions_Cons T_Production
arg_hd_ T_Productions
arg_tl_ = Identity T_Productions_s29 -> T_Productions
T_Productions (forall (m :: * -> *) a. Monad m => a -> m a
return T_Productions_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_Productions_s29
st29 = let
      v28 :: T_Productions_v28 
      v28 :: T_Productions_v28
v28 = \ (T_Productions_vIn28 [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _hdX26 :: T_Production_s26
_hdX26 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Production -> Identity T_Production_s26
attach_T_Production (T_Production
arg_hd_))
         _tlX29 :: T_Productions_s29
_tlX29 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Productions -> Identity T_Productions_s29
attach_T_Productions (T_Productions
arg_tl_))
         (T_Production_vOut25 [Identifier]
_hdIcons Seq Error
_hdIerrors Production
_hdIoutput) = T_Production_s26 -> T_Production_v25
inv_Production_s26 T_Production_s26
_hdX26 ([Identifier]
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Options
-> Attributes
-> Map Identifier Attributes
-> T_Production_vIn25
T_Production_vIn25 [Identifier]
_hdOallnts Attributes
_hdOinh Map Identifier Attributes
_hdOinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_hdOmergeMap Identifier
_hdOnt Options
_hdOoptions Attributes
_hdOsyn Map Identifier Attributes
_hdOsynMap)
         (T_Productions_vOut28 [Identifier]
_tlIcons Seq Error
_tlIerrors Productions
_tlIoutput) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_tlX29 ([Identifier]
-> Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Identifier
-> Options
-> Attributes
-> Map Identifier Attributes
-> T_Productions_vIn28
T_Productions_vIn28 [Identifier]
_tlOallnts Attributes
_tlOinh Map Identifier Attributes
_tlOinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_tlOmergeMap Identifier
_tlOnt Options
_tlOoptions Attributes
_tlOsyn Map Identifier Attributes
_tlOsynMap)
         _lhsOcons :: [ConstructorIdent]
         _lhsOcons :: [Identifier]
_lhsOcons = [Identifier] -> [Identifier] -> [Identifier]
rule185 [Identifier]
_hdIcons [Identifier]
_tlIcons
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule186 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _output :: Productions
_output = Production -> Productions -> Productions
rule187 Production
_hdIoutput Productions
_tlIoutput
         _lhsOoutput :: Productions
         _lhsOoutput :: Productions
_lhsOoutput = forall {p}. p -> p
rule188 Productions
_output
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule189 [Identifier]
_lhsIallnts
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule190 Attributes
_lhsIinh
         _hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule191 Map Identifier Attributes
_lhsIinhMap
         _hdOmergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_hdOmergeMap = Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule192 Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule193 Identifier
_lhsInt
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule194 Options
_lhsIoptions
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule195 Attributes
_lhsIsyn
         _hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule196 Map Identifier Attributes
_lhsIsynMap
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule197 [Identifier]
_lhsIallnts
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule198 Attributes
_lhsIinh
         _tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule199 Map Identifier Attributes
_lhsIinhMap
         _tlOmergeMap :: Map Identifier (Map Identifier (Identifier, [Identifier]))
_tlOmergeMap = Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule200 Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule201 Identifier
_lhsInt
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule202 Options
_lhsIoptions
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule203 Attributes
_lhsIsyn
         _tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule204 Map Identifier Attributes
_lhsIsynMap
         __result_ :: T_Productions_vOut28
__result_ = [Identifier] -> Seq Error -> Productions -> T_Productions_vOut28
T_Productions_vOut28 [Identifier]
_lhsOcons Seq Error
_lhsOerrors Productions
_lhsOoutput
         in T_Productions_vOut28
__result_ )
     in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
   {-# INLINE rule185 #-}
   rule185 :: [Identifier] -> [Identifier] -> [Identifier]
rule185 = \ (([Identifier]
_hdIcons) :: [ConstructorIdent]) (([Identifier]
_tlIcons) :: [ConstructorIdent]) ->
     [Identifier]
_hdIcons forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIcons
   {-# INLINE rule186 #-}
   rule186 :: Seq Error -> Seq Error -> Seq Error
rule186 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule187 #-}
   rule187 :: Production -> Productions -> Productions
rule187 = \ ((Production
_hdIoutput) :: Production) ((Productions
_tlIoutput) :: Productions) ->
     (:) Production
_hdIoutput Productions
_tlIoutput
   {-# INLINE rule188 #-}
   rule188 :: p -> p
rule188 = \ p
_output ->
     p
_output
   {-# INLINE rule189 #-}
   rule189 :: [Identifier] -> [Identifier]
rule189 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule190 #-}
   rule190 :: Attributes -> Attributes
rule190 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule191 #-}
   rule191 :: Map Identifier Attributes -> Map Identifier Attributes
rule191 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIinhMap
   {-# INLINE rule192 #-}
   rule192 :: Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule192 = \ ((Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->
     Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap
   {-# INLINE rule193 #-}
   rule193 :: Identifier -> Identifier
rule193 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule194 #-}
   rule194 :: Options -> Options
rule194 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule195 #-}
   rule195 :: Attributes -> Attributes
rule195 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule196 #-}
   rule196 :: Map Identifier Attributes -> Map Identifier Attributes
rule196 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIsynMap
   {-# INLINE rule197 #-}
   rule197 :: [Identifier] -> [Identifier]
rule197 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule198 #-}
   rule198 :: Attributes -> Attributes
rule198 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule199 #-}
   rule199 :: Map Identifier Attributes -> Map Identifier Attributes
rule199 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIinhMap
   {-# INLINE rule200 #-}
   rule200 :: Map Identifier (Map Identifier (Identifier, [Identifier]))
-> Map Identifier (Map Identifier (Identifier, [Identifier]))
rule200 = \ ((Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->
     Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap
   {-# INLINE rule201 #-}
   rule201 :: Identifier -> Identifier
rule201 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule202 #-}
   rule202 :: Options -> Options
rule202 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule203 #-}
   rule203 :: Attributes -> Attributes
rule203 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule204 #-}
   rule204 :: Map Identifier Attributes -> Map Identifier Attributes
rule204 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
     Map Identifier Attributes
_lhsIsynMap
{-# NOINLINE sem_Productions_Nil #-}
sem_Productions_Nil ::  T_Productions 
sem_Productions_Nil :: T_Productions
sem_Productions_Nil  = Identity T_Productions_s29 -> T_Productions
T_Productions (forall (m :: * -> *) a. Monad m => a -> m a
return T_Productions_s29
st29) where
   {-# NOINLINE st29 #-}
   st29 :: T_Productions_s29
st29 = let
      v28 :: T_Productions_v28 
      v28 :: T_Productions_v28
v28 = \ (T_Productions_vIn28 [Identifier]
_lhsIallnts Attributes
_lhsIinh Map Identifier Attributes
_lhsIinhMap Map Identifier (Map Identifier (Identifier, [Identifier]))
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn Map Identifier Attributes
_lhsIsynMap) -> ( let
         _lhsOcons :: [ConstructorIdent]
         _lhsOcons :: [Identifier]
_lhsOcons = forall {a}. () -> [a]
rule205  ()
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule206  ()
         _output :: [a]
_output = forall {a}. () -> [a]
rule207  ()
         _lhsOoutput :: Productions
         _lhsOoutput :: Productions
_lhsOoutput = forall {p}. p -> p
rule208 forall a. [a]
_output
         __result_ :: T_Productions_vOut28
__result_ = [Identifier] -> Seq Error -> Productions -> T_Productions_vOut28
T_Productions_vOut28 [Identifier]
_lhsOcons Seq Error
_lhsOerrors Productions
_lhsOoutput
         in T_Productions_vOut28
__result_ )
     in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
   {-# INLINE rule205 #-}
   rule205 :: () -> [a]
rule205 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule206 #-}
   rule206 :: () -> Seq a
rule206 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule207 #-}
   rule207 :: () -> [a]
rule207 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule208 #-}
   rule208 :: p -> p
rule208 = \ p
_output ->
     p
_output

-- Rule --------------------------------------------------------
-- wrapper
data Inh_Rule  = Inh_Rule { Inh_Rule -> [(Identifier, Type, ChildKind)]
allfields_Inh_Rule :: ([(Identifier,Type,ChildKind)]), Inh_Rule -> [Identifier]
allnts_Inh_Rule :: ([Identifier]), Inh_Rule -> [(Identifier, Identifier)]
attrs_Inh_Rule :: ([(Identifier,Identifier)]), Inh_Rule -> Identifier
con_Inh_Rule :: (Identifier), Inh_Rule -> Attributes
inh_Inh_Rule :: (Attributes), Inh_Rule -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Rule :: (Map Identifier (Identifier,[Identifier])), Inh_Rule -> Identifier
nt_Inh_Rule :: (Identifier), Inh_Rule -> Options
options_Inh_Rule :: (Options), Inh_Rule -> Attributes
syn_Inh_Rule :: (Attributes) }
data Syn_Rule  = Syn_Rule { Syn_Rule -> Seq Error
errors_Syn_Rule :: (Seq Error), Syn_Rule -> [Identifier]
instVars_Syn_Rule :: ([Identifier]), Syn_Rule -> [Identifier]
locVars_Syn_Rule :: ([Identifier]), Syn_Rule -> Rule
output_Syn_Rule :: (Rule) }
{-# INLINABLE wrap_Rule #-}
wrap_Rule :: T_Rule  -> Inh_Rule  -> (Syn_Rule )
wrap_Rule :: T_Rule -> Inh_Rule -> Syn_Rule
wrap_Rule (T_Rule Identity T_Rule_s32
act) (Inh_Rule [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Rule_s32
sem <- Identity T_Rule_s32
act
        let arg31 :: T_Rule_vIn31
arg31 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> Attributes
-> T_Rule_vIn31
T_Rule_vIn31 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn
        (T_Rule_vOut31 Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rule
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 T_Rule_s32
sem T_Rule_vIn31
arg31)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> [Identifier] -> [Identifier] -> Rule -> Syn_Rule
Syn_Rule Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rule
_lhsOoutput)
   )

-- cata
{-# INLINE sem_Rule #-}
sem_Rule :: Rule  -> T_Rule 
sem_Rule :: Rule -> T_Rule
sem_Rule ( Rule Maybe Identifier
mbName_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Bool
identity_ Maybe Error
mbError_ Bool
eager_ ) = Maybe Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe Identifier
mbName_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pattern_ ) ( Expression -> T_Expression
sem_Expression Expression
rhs_ ) Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Bool
identity_ Maybe Error
mbError_ Bool
eager_

-- semantic domain
newtype T_Rule  = T_Rule {
                         T_Rule -> Identity T_Rule_s32
attach_T_Rule :: Identity (T_Rule_s32 )
                         }
newtype T_Rule_s32  = C_Rule_s32 {
                                 T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 :: (T_Rule_v31 )
                                 }
data T_Rule_s33  = C_Rule_s33
type T_Rule_v31  = (T_Rule_vIn31 ) -> (T_Rule_vOut31 )
data T_Rule_vIn31  = T_Rule_vIn31 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Options) (Attributes)
data T_Rule_vOut31  = T_Rule_vOut31 (Seq Error) ([Identifier]) ([Identifier]) (Rule)
{-# NOINLINE sem_Rule_Rule #-}
sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern  -> T_Expression  -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Bool) -> (Maybe Error) -> (Bool) -> T_Rule 
sem_Rule_Rule :: Maybe Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe Identifier
arg_mbName_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
arg_owrt_ String
arg_origin_ Bool
arg_explicit_ Bool
arg_pure_ Bool
arg_identity_ Maybe Error
arg_mbError_ Bool
arg_eager_ = Identity T_Rule_s32 -> T_Rule
T_Rule (forall (m :: * -> *) a. Monad m => a -> m a
return T_Rule_s32
st32) where
   {-# NOINLINE st32 #-}
   st32 :: T_Rule_s32
st32 = let
      v31 :: T_Rule_v31 
      v31 :: T_Rule_v31
v31 = \ (T_Rule_vIn31 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn) -> ( let
         _patternX20 :: T_Pattern_s20
_patternX20 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s20
attach_T_Pattern (T_Pattern
arg_pattern_))
         _rhsX8 :: T_Expression_s8
_rhsX8 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Expression -> Identity T_Expression_s8
attach_T_Expression (T_Expression
arg_rhs_))
         (T_Pattern_vOut19 Pattern
_patternIcopy Seq Error
_patternIerrors [Identifier]
_patternIinstVars [Identifier]
_patternIlocVars Pattern
_patternIoutput) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patternX20 (Identifier
-> Attributes -> Identifier -> Attributes -> T_Pattern_vIn19
T_Pattern_vIn19 Identifier
_patternOcon Attributes
_patternOinh Identifier
_patternOnt Attributes
_patternOsyn)
         (T_Expression_vOut7 Seq Error
_rhsIerrors Expression
_rhsIoutput) = T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
_rhsX8 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> T_Expression_vIn7
T_Expression_vIn7 [(Identifier, Type, ChildKind)]
_rhsOallfields [Identifier]
_rhsOallnts [(Identifier, Identifier)]
_rhsOattrs Identifier
_rhsOcon Map Identifier (Identifier, [Identifier])
_rhsOmergeMap Identifier
_rhsOnt Options
_rhsOoptions)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule209 Seq Error
_patternIerrors Seq Error
_rhsIerrors
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier]
rule210 [Identifier]
_patternIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier]
rule211 [Identifier]
_patternIlocVars
         _output :: Rule
_output = Pattern
-> Expression
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Maybe Identifier
-> String
-> Bool
-> Bool
-> Rule
rule212 Pattern
_patternIoutput Expression
_rhsIoutput Bool
arg_eager_ Bool
arg_explicit_ Bool
arg_identity_ Maybe Error
arg_mbError_ Maybe Identifier
arg_mbName_ String
arg_origin_ Bool
arg_owrt_ Bool
arg_pure_
         _lhsOoutput :: Rule
         _lhsOoutput :: Rule
_lhsOoutput = forall {p}. p -> p
rule213 Rule
_output
         _patternOcon :: Identifier
_patternOcon = Identifier -> Identifier
rule214 Identifier
_lhsIcon
         _patternOinh :: Attributes
_patternOinh = Attributes -> Attributes
rule215 Attributes
_lhsIinh
         _patternOnt :: Identifier
_patternOnt = Identifier -> Identifier
rule216 Identifier
_lhsInt
         _patternOsyn :: Attributes
_patternOsyn = Attributes -> Attributes
rule217 Attributes
_lhsIsyn
         _rhsOallfields :: [(Identifier, Type, ChildKind)]
_rhsOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule218 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _rhsOallnts :: [Identifier]
_rhsOallnts = [Identifier] -> [Identifier]
rule219 [Identifier]
_lhsIallnts
         _rhsOattrs :: [(Identifier, Identifier)]
_rhsOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule220 [(Identifier, Identifier)]
_lhsIattrs
         _rhsOcon :: Identifier
_rhsOcon = Identifier -> Identifier
rule221 Identifier
_lhsIcon
         _rhsOmergeMap :: Map Identifier (Identifier, [Identifier])
_rhsOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule222 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _rhsOnt :: Identifier
_rhsOnt = Identifier -> Identifier
rule223 Identifier
_lhsInt
         _rhsOoptions :: Options
_rhsOoptions = Options -> Options
rule224 Options
_lhsIoptions
         __result_ :: T_Rule_vOut31
__result_ = Seq Error -> [Identifier] -> [Identifier] -> Rule -> T_Rule_vOut31
T_Rule_vOut31 Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rule
_lhsOoutput
         in T_Rule_vOut31
__result_ )
     in T_Rule_v31 -> T_Rule_s32
C_Rule_s32 T_Rule_v31
v31
   {-# INLINE rule209 #-}
   rule209 :: Seq Error -> Seq Error -> Seq Error
rule209 = \ ((Seq Error
_patternIerrors) :: Seq Error) ((Seq Error
_rhsIerrors) :: Seq Error) ->
     Seq Error
_patternIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_rhsIerrors
   {-# INLINE rule210 #-}
   rule210 :: [Identifier] -> [Identifier]
rule210 = \ (([Identifier]
_patternIinstVars) :: [Identifier]) ->
     [Identifier]
_patternIinstVars
   {-# INLINE rule211 #-}
   rule211 :: [Identifier] -> [Identifier]
rule211 = \ (([Identifier]
_patternIlocVars) :: [Identifier]) ->
     [Identifier]
_patternIlocVars
   {-# INLINE rule212 #-}
   rule212 :: Pattern
-> Expression
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Maybe Identifier
-> String
-> Bool
-> Bool
-> Rule
rule212 = \ ((Pattern
_patternIoutput) :: Pattern) ((Expression
_rhsIoutput) :: Expression) Bool
eager_ Bool
explicit_ Bool
identity_ Maybe Error
mbError_ Maybe Identifier
mbName_ String
origin_ Bool
owrt_ Bool
pure_ ->
     Maybe Identifier
-> Pattern
-> Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> Rule
Rule Maybe Identifier
mbName_ Pattern
_patternIoutput Expression
_rhsIoutput Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Bool
identity_ Maybe Error
mbError_ Bool
eager_
   {-# INLINE rule213 #-}
   rule213 :: p -> p
rule213 = \ p
_output ->
     p
_output
   {-# INLINE rule214 #-}
   rule214 :: Identifier -> Identifier
rule214 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule215 #-}
   rule215 :: Attributes -> Attributes
rule215 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule216 #-}
   rule216 :: Identifier -> Identifier
rule216 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule217 #-}
   rule217 :: Attributes -> Attributes
rule217 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule218 #-}
   rule218 :: [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule218 = \ (([(Identifier, Type, ChildKind)]
_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     [(Identifier, Type, ChildKind)]
_lhsIallfields
   {-# INLINE rule219 #-}
   rule219 :: [Identifier] -> [Identifier]
rule219 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule220 #-}
   rule220 :: [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule220 = \ (([(Identifier, Identifier)]
_lhsIattrs) :: [(Identifier,Identifier)]) ->
     [(Identifier, Identifier)]
_lhsIattrs
   {-# INLINE rule221 #-}
   rule221 :: Identifier -> Identifier
rule221 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule222 #-}
   rule222 :: Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule222 = \ ((Map Identifier (Identifier, [Identifier])
_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     Map Identifier (Identifier, [Identifier])
_lhsImergeMap
   {-# INLINE rule223 #-}
   rule223 :: Identifier -> Identifier
rule223 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule224 #-}
   rule224 :: Options -> Options
rule224 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions

-- Rules -------------------------------------------------------
-- wrapper
data Inh_Rules  = Inh_Rules { Inh_Rules -> [(Identifier, Type, ChildKind)]
allfields_Inh_Rules :: ([(Identifier,Type,ChildKind)]), Inh_Rules -> [Identifier]
allnts_Inh_Rules :: ([Identifier]), Inh_Rules -> [(Identifier, Identifier)]
attrs_Inh_Rules :: ([(Identifier,Identifier)]), Inh_Rules -> Identifier
con_Inh_Rules :: (Identifier), Inh_Rules -> Attributes
inh_Inh_Rules :: (Attributes), Inh_Rules -> Map Identifier (Identifier, [Identifier])
mergeMap_Inh_Rules :: (Map Identifier (Identifier,[Identifier])), Inh_Rules -> Identifier
nt_Inh_Rules :: (Identifier), Inh_Rules -> Options
options_Inh_Rules :: (Options), Inh_Rules -> Attributes
syn_Inh_Rules :: (Attributes) }
data Syn_Rules  = Syn_Rules { Syn_Rules -> Seq Error
errors_Syn_Rules :: (Seq Error), Syn_Rules -> [Identifier]
instVars_Syn_Rules :: ([Identifier]), Syn_Rules -> [Identifier]
locVars_Syn_Rules :: ([Identifier]), Syn_Rules -> Rules
output_Syn_Rules :: (Rules) }
{-# INLINABLE wrap_Rules #-}
wrap_Rules :: T_Rules  -> Inh_Rules  -> (Syn_Rules )
wrap_Rules :: T_Rules -> Inh_Rules -> Syn_Rules
wrap_Rules (T_Rules Identity T_Rules_s35
act) (Inh_Rules [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_Rules_s35
sem <- Identity T_Rules_s35
act
        let arg34 :: T_Rules_vIn34
arg34 = [(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> Attributes
-> T_Rules_vIn34
T_Rules_vIn34 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn
        (T_Rules_vOut34 Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rules
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
sem T_Rules_vIn34
arg34)
        forall (m :: * -> *) a. Monad m => a -> m a
return (Seq Error -> [Identifier] -> [Identifier] -> Rules -> Syn_Rules
Syn_Rules Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rules
_lhsOoutput)
   )

-- cata
{-# NOINLINE sem_Rules #-}
sem_Rules :: Rules  -> T_Rules 
sem_Rules :: Rules -> T_Rules
sem_Rules Rules
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Rule -> T_Rules -> T_Rules
sem_Rules_Cons T_Rules
sem_Rules_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map Rule -> T_Rule
sem_Rule Rules
list)

-- semantic domain
newtype T_Rules  = T_Rules {
                           T_Rules -> Identity T_Rules_s35
attach_T_Rules :: Identity (T_Rules_s35 )
                           }
newtype T_Rules_s35  = C_Rules_s35 {
                                   T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 :: (T_Rules_v34 )
                                   }
data T_Rules_s36  = C_Rules_s36
type T_Rules_v34  = (T_Rules_vIn34 ) -> (T_Rules_vOut34 )
data T_Rules_vIn34  = T_Rules_vIn34 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Options) (Attributes)
data T_Rules_vOut34  = T_Rules_vOut34 (Seq Error) ([Identifier]) ([Identifier]) (Rules)
{-# NOINLINE sem_Rules_Cons #-}
sem_Rules_Cons :: T_Rule  -> T_Rules  -> T_Rules 
sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules
sem_Rules_Cons T_Rule
arg_hd_ T_Rules
arg_tl_ = Identity T_Rules_s35 -> T_Rules
T_Rules (forall (m :: * -> *) a. Monad m => a -> m a
return T_Rules_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Rules_s35
st35 = let
      v34 :: T_Rules_v34 
      v34 :: T_Rules_v34
v34 = \ (T_Rules_vIn34 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn) -> ( let
         _hdX32 :: T_Rule_s32
_hdX32 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rule -> Identity T_Rule_s32
attach_T_Rule (T_Rule
arg_hd_))
         _tlX35 :: T_Rules_s35
_tlX35 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rules -> Identity T_Rules_s35
attach_T_Rules (T_Rules
arg_tl_))
         (T_Rule_vOut31 Seq Error
_hdIerrors [Identifier]
_hdIinstVars [Identifier]
_hdIlocVars Rule
_hdIoutput) = T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 T_Rule_s32
_hdX32 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> Attributes
-> T_Rule_vIn31
T_Rule_vIn31 [(Identifier, Type, ChildKind)]
_hdOallfields [Identifier]
_hdOallnts [(Identifier, Identifier)]
_hdOattrs Identifier
_hdOcon Attributes
_hdOinh Map Identifier (Identifier, [Identifier])
_hdOmergeMap Identifier
_hdOnt Options
_hdOoptions Attributes
_hdOsyn)
         (T_Rules_vOut34 Seq Error
_tlIerrors [Identifier]
_tlIinstVars [Identifier]
_tlIlocVars Rules
_tlIoutput) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_tlX35 ([(Identifier, Type, ChildKind)]
-> [Identifier]
-> [(Identifier, Identifier)]
-> Identifier
-> Attributes
-> Map Identifier (Identifier, [Identifier])
-> Identifier
-> Options
-> Attributes
-> T_Rules_vIn34
T_Rules_vIn34 [(Identifier, Type, ChildKind)]
_tlOallfields [Identifier]
_tlOallnts [(Identifier, Identifier)]
_tlOattrs Identifier
_tlOcon Attributes
_tlOinh Map Identifier (Identifier, [Identifier])
_tlOmergeMap Identifier
_tlOnt Options
_tlOoptions Attributes
_tlOsyn)
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = Seq Error -> Seq Error -> Seq Error
rule225 Seq Error
_hdIerrors Seq Error
_tlIerrors
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = [Identifier] -> [Identifier] -> [Identifier]
rule226 [Identifier]
_hdIinstVars [Identifier]
_tlIinstVars
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = [Identifier] -> [Identifier] -> [Identifier]
rule227 [Identifier]
_hdIlocVars [Identifier]
_tlIlocVars
         _output :: Rules
_output = Rule -> Rules -> Rules
rule228 Rule
_hdIoutput Rules
_tlIoutput
         _lhsOoutput :: Rules
         _lhsOoutput :: Rules
_lhsOoutput = forall {p}. p -> p
rule229 Rules
_output
         _hdOallfields :: [(Identifier, Type, ChildKind)]
_hdOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule230 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _hdOallnts :: [Identifier]
_hdOallnts = [Identifier] -> [Identifier]
rule231 [Identifier]
_lhsIallnts
         _hdOattrs :: [(Identifier, Identifier)]
_hdOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule232 [(Identifier, Identifier)]
_lhsIattrs
         _hdOcon :: Identifier
_hdOcon = Identifier -> Identifier
rule233 Identifier
_lhsIcon
         _hdOinh :: Attributes
_hdOinh = Attributes -> Attributes
rule234 Attributes
_lhsIinh
         _hdOmergeMap :: Map Identifier (Identifier, [Identifier])
_hdOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule235 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _hdOnt :: Identifier
_hdOnt = Identifier -> Identifier
rule236 Identifier
_lhsInt
         _hdOoptions :: Options
_hdOoptions = Options -> Options
rule237 Options
_lhsIoptions
         _hdOsyn :: Attributes
_hdOsyn = Attributes -> Attributes
rule238 Attributes
_lhsIsyn
         _tlOallfields :: [(Identifier, Type, ChildKind)]
_tlOallfields = [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule239 [(Identifier, Type, ChildKind)]
_lhsIallfields
         _tlOallnts :: [Identifier]
_tlOallnts = [Identifier] -> [Identifier]
rule240 [Identifier]
_lhsIallnts
         _tlOattrs :: [(Identifier, Identifier)]
_tlOattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule241 [(Identifier, Identifier)]
_lhsIattrs
         _tlOcon :: Identifier
_tlOcon = Identifier -> Identifier
rule242 Identifier
_lhsIcon
         _tlOinh :: Attributes
_tlOinh = Attributes -> Attributes
rule243 Attributes
_lhsIinh
         _tlOmergeMap :: Map Identifier (Identifier, [Identifier])
_tlOmergeMap = Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule244 Map Identifier (Identifier, [Identifier])
_lhsImergeMap
         _tlOnt :: Identifier
_tlOnt = Identifier -> Identifier
rule245 Identifier
_lhsInt
         _tlOoptions :: Options
_tlOoptions = Options -> Options
rule246 Options
_lhsIoptions
         _tlOsyn :: Attributes
_tlOsyn = Attributes -> Attributes
rule247 Attributes
_lhsIsyn
         __result_ :: T_Rules_vOut34
__result_ = Seq Error
-> [Identifier] -> [Identifier] -> Rules -> T_Rules_vOut34
T_Rules_vOut34 Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rules
_lhsOoutput
         in T_Rules_vOut34
__result_ )
     in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
   {-# INLINE rule225 #-}
   rule225 :: Seq Error -> Seq Error -> Seq Error
rule225 = \ ((Seq Error
_hdIerrors) :: Seq Error) ((Seq Error
_tlIerrors) :: Seq Error) ->
     Seq Error
_hdIerrors forall a. Seq a -> Seq a -> Seq a
Seq.>< Seq Error
_tlIerrors
   {-# INLINE rule226 #-}
   rule226 :: [Identifier] -> [Identifier] -> [Identifier]
rule226 = \ (([Identifier]
_hdIinstVars) :: [Identifier]) (([Identifier]
_tlIinstVars) :: [Identifier]) ->
     [Identifier]
_hdIinstVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIinstVars
   {-# INLINE rule227 #-}
   rule227 :: [Identifier] -> [Identifier] -> [Identifier]
rule227 = \ (([Identifier]
_hdIlocVars) :: [Identifier]) (([Identifier]
_tlIlocVars) :: [Identifier]) ->
     [Identifier]
_hdIlocVars forall a. [a] -> [a] -> [a]
++ [Identifier]
_tlIlocVars
   {-# INLINE rule228 #-}
   rule228 :: Rule -> Rules -> Rules
rule228 = \ ((Rule
_hdIoutput) :: Rule) ((Rules
_tlIoutput) :: Rules) ->
     (:) Rule
_hdIoutput Rules
_tlIoutput
   {-# INLINE rule229 #-}
   rule229 :: p -> p
rule229 = \ p
_output ->
     p
_output
   {-# INLINE rule230 #-}
   rule230 :: [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule230 = \ (([(Identifier, Type, ChildKind)]
_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     [(Identifier, Type, ChildKind)]
_lhsIallfields
   {-# INLINE rule231 #-}
   rule231 :: [Identifier] -> [Identifier]
rule231 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule232 #-}
   rule232 :: [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule232 = \ (([(Identifier, Identifier)]
_lhsIattrs) :: [(Identifier,Identifier)]) ->
     [(Identifier, Identifier)]
_lhsIattrs
   {-# INLINE rule233 #-}
   rule233 :: Identifier -> Identifier
rule233 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule234 #-}
   rule234 :: Attributes -> Attributes
rule234 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule235 #-}
   rule235 :: Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule235 = \ ((Map Identifier (Identifier, [Identifier])
_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     Map Identifier (Identifier, [Identifier])
_lhsImergeMap
   {-# INLINE rule236 #-}
   rule236 :: Identifier -> Identifier
rule236 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule237 #-}
   rule237 :: Options -> Options
rule237 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule238 #-}
   rule238 :: Attributes -> Attributes
rule238 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
   {-# INLINE rule239 #-}
   rule239 :: [(Identifier, Type, ChildKind)] -> [(Identifier, Type, ChildKind)]
rule239 = \ (([(Identifier, Type, ChildKind)]
_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->
     [(Identifier, Type, ChildKind)]
_lhsIallfields
   {-# INLINE rule240 #-}
   rule240 :: [Identifier] -> [Identifier]
rule240 = \ (([Identifier]
_lhsIallnts) :: [Identifier]) ->
     [Identifier]
_lhsIallnts
   {-# INLINE rule241 #-}
   rule241 :: [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule241 = \ (([(Identifier, Identifier)]
_lhsIattrs) :: [(Identifier,Identifier)]) ->
     [(Identifier, Identifier)]
_lhsIattrs
   {-# INLINE rule242 #-}
   rule242 :: Identifier -> Identifier
rule242 = \ ((Identifier
_lhsIcon) :: Identifier) ->
     Identifier
_lhsIcon
   {-# INLINE rule243 #-}
   rule243 :: Attributes -> Attributes
rule243 = \ ((Attributes
_lhsIinh) :: Attributes) ->
     Attributes
_lhsIinh
   {-# INLINE rule244 #-}
   rule244 :: Map Identifier (Identifier, [Identifier])
-> Map Identifier (Identifier, [Identifier])
rule244 = \ ((Map Identifier (Identifier, [Identifier])
_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->
     Map Identifier (Identifier, [Identifier])
_lhsImergeMap
   {-# INLINE rule245 #-}
   rule245 :: Identifier -> Identifier
rule245 = \ ((Identifier
_lhsInt) :: Identifier) ->
     Identifier
_lhsInt
   {-# INLINE rule246 #-}
   rule246 :: Options -> Options
rule246 = \ ((Options
_lhsIoptions) :: Options) ->
     Options
_lhsIoptions
   {-# INLINE rule247 #-}
   rule247 :: Attributes -> Attributes
rule247 = \ ((Attributes
_lhsIsyn) :: Attributes) ->
     Attributes
_lhsIsyn
{-# NOINLINE sem_Rules_Nil #-}
sem_Rules_Nil ::  T_Rules 
sem_Rules_Nil :: T_Rules
sem_Rules_Nil  = Identity T_Rules_s35 -> T_Rules
T_Rules (forall (m :: * -> *) a. Monad m => a -> m a
return T_Rules_s35
st35) where
   {-# NOINLINE st35 #-}
   st35 :: T_Rules_s35
st35 = let
      v34 :: T_Rules_v34 
      v34 :: T_Rules_v34
v34 = \ (T_Rules_vIn34 [(Identifier, Type, ChildKind)]
_lhsIallfields [Identifier]
_lhsIallnts [(Identifier, Identifier)]
_lhsIattrs Identifier
_lhsIcon Attributes
_lhsIinh Map Identifier (Identifier, [Identifier])
_lhsImergeMap Identifier
_lhsInt Options
_lhsIoptions Attributes
_lhsIsyn) -> ( let
         _lhsOerrors :: Seq Error
         _lhsOerrors :: Seq Error
_lhsOerrors = forall {a}. () -> Seq a
rule248  ()
         _lhsOinstVars :: [Identifier]
         _lhsOinstVars :: [Identifier]
_lhsOinstVars = forall {a}. () -> [a]
rule249  ()
         _lhsOlocVars :: [Identifier]
         _lhsOlocVars :: [Identifier]
_lhsOlocVars = forall {a}. () -> [a]
rule250  ()
         _output :: [a]
_output = forall {a}. () -> [a]
rule251  ()
         _lhsOoutput :: Rules
         _lhsOoutput :: Rules
_lhsOoutput = forall {p}. p -> p
rule252 forall a. [a]
_output
         __result_ :: T_Rules_vOut34
__result_ = Seq Error
-> [Identifier] -> [Identifier] -> Rules -> T_Rules_vOut34
T_Rules_vOut34 Seq Error
_lhsOerrors [Identifier]
_lhsOinstVars [Identifier]
_lhsOlocVars Rules
_lhsOoutput
         in T_Rules_vOut34
__result_ )
     in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
   {-# INLINE rule248 #-}
   rule248 :: () -> Seq a
rule248 = \  (()
_ :: ()) ->
     forall a. Seq a
Seq.empty
   {-# INLINE rule249 #-}
   rule249 :: () -> [a]
rule249 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule250 #-}
   rule250 :: () -> [a]
rule250 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule251 #-}
   rule251 :: () -> [a]
rule251 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule252 #-}
   rule252 :: p -> p
rule252 = \ p
_output ->
     p
_output

-- TypeSig -----------------------------------------------------
-- wrapper
data Inh_TypeSig  = Inh_TypeSig {  }
data Syn_TypeSig  = Syn_TypeSig { Syn_TypeSig -> TypeSig
output_Syn_TypeSig :: (TypeSig) }
{-# INLINABLE wrap_TypeSig #-}
wrap_TypeSig :: T_TypeSig  -> Inh_TypeSig  -> (Syn_TypeSig )
wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> Syn_TypeSig
wrap_TypeSig (T_TypeSig Identity T_TypeSig_s38
act) (Inh_TypeSig
Inh_TypeSig ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_TypeSig_s38
sem <- Identity T_TypeSig_s38
act
        let arg37 :: T_TypeSig_vIn37
arg37 = T_TypeSig_vIn37
T_TypeSig_vIn37 
        (T_TypeSig_vOut37 TypeSig
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 T_TypeSig_s38
sem T_TypeSig_vIn37
arg37)
        forall (m :: * -> *) a. Monad m => a -> m a
return (TypeSig -> Syn_TypeSig
Syn_TypeSig TypeSig
_lhsOoutput)
   )

-- cata
{-# INLINE sem_TypeSig #-}
sem_TypeSig :: TypeSig  -> T_TypeSig 
sem_TypeSig :: TypeSig -> T_TypeSig
sem_TypeSig ( TypeSig Identifier
name_ Type
tp_ ) = Identifier -> Type -> T_TypeSig
sem_TypeSig_TypeSig Identifier
name_ Type
tp_

-- semantic domain
newtype T_TypeSig  = T_TypeSig {
                               T_TypeSig -> Identity T_TypeSig_s38
attach_T_TypeSig :: Identity (T_TypeSig_s38 )
                               }
newtype T_TypeSig_s38  = C_TypeSig_s38 {
                                       T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 :: (T_TypeSig_v37 )
                                       }
data T_TypeSig_s39  = C_TypeSig_s39
type T_TypeSig_v37  = (T_TypeSig_vIn37 ) -> (T_TypeSig_vOut37 )
data T_TypeSig_vIn37  = T_TypeSig_vIn37 
data T_TypeSig_vOut37  = T_TypeSig_vOut37 (TypeSig)
{-# NOINLINE sem_TypeSig_TypeSig #-}
sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig 
sem_TypeSig_TypeSig :: Identifier -> Type -> T_TypeSig
sem_TypeSig_TypeSig Identifier
arg_name_ Type
arg_tp_ = Identity T_TypeSig_s38 -> T_TypeSig
T_TypeSig (forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSig_s38
st38) where
   {-# NOINLINE st38 #-}
   st38 :: T_TypeSig_s38
st38 = let
      v37 :: T_TypeSig_v37 
      v37 :: T_TypeSig_v37
v37 = \ (T_TypeSig_vIn37
T_TypeSig_vIn37 ) -> ( let
         _output :: TypeSig
_output = Identifier -> Type -> TypeSig
rule253 Identifier
arg_name_ Type
arg_tp_
         _lhsOoutput :: TypeSig
         _lhsOoutput :: TypeSig
_lhsOoutput = forall {p}. p -> p
rule254 TypeSig
_output
         __result_ :: T_TypeSig_vOut37
__result_ = TypeSig -> T_TypeSig_vOut37
T_TypeSig_vOut37 TypeSig
_lhsOoutput
         in T_TypeSig_vOut37
__result_ )
     in T_TypeSig_v37 -> T_TypeSig_s38
C_TypeSig_s38 T_TypeSig_v37
v37
   {-# INLINE rule253 #-}
   rule253 :: Identifier -> Type -> TypeSig
rule253 = \ Identifier
name_ Type
tp_ ->
     Identifier -> Type -> TypeSig
TypeSig Identifier
name_ Type
tp_
   {-# INLINE rule254 #-}
   rule254 :: p -> p
rule254 = \ p
_output ->
     p
_output

-- TypeSigs ----------------------------------------------------
-- wrapper
data Inh_TypeSigs  = Inh_TypeSigs {  }
data Syn_TypeSigs  = Syn_TypeSigs { Syn_TypeSigs -> TypeSigs
output_Syn_TypeSigs :: (TypeSigs) }
{-# INLINABLE wrap_TypeSigs #-}
wrap_TypeSigs :: T_TypeSigs  -> Inh_TypeSigs  -> (Syn_TypeSigs )
wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> Syn_TypeSigs
wrap_TypeSigs (T_TypeSigs Identity T_TypeSigs_s41
act) (Inh_TypeSigs
Inh_TypeSigs ) =
   forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
     do T_TypeSigs_s41
sem <- Identity T_TypeSigs_s41
act
        let arg40 :: T_TypeSigs_vIn40
arg40 = T_TypeSigs_vIn40
T_TypeSigs_vIn40 
        (T_TypeSigs_vOut40 TypeSigs
_lhsOoutput) <- forall (m :: * -> *) a. Monad m => a -> m a
return (T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
sem T_TypeSigs_vIn40
arg40)
        forall (m :: * -> *) a. Monad m => a -> m a
return (TypeSigs -> Syn_TypeSigs
Syn_TypeSigs TypeSigs
_lhsOoutput)
   )

-- cata
{-# NOINLINE sem_TypeSigs #-}
sem_TypeSigs :: TypeSigs  -> T_TypeSigs 
sem_TypeSigs :: TypeSigs -> T_TypeSigs
sem_TypeSigs TypeSigs
list = forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_TypeSig -> T_TypeSigs -> T_TypeSigs
sem_TypeSigs_Cons T_TypeSigs
sem_TypeSigs_Nil (forall a b. (a -> b) -> [a] -> [b]
Prelude.map TypeSig -> T_TypeSig
sem_TypeSig TypeSigs
list)

-- semantic domain
newtype T_TypeSigs  = T_TypeSigs {
                                 T_TypeSigs -> Identity T_TypeSigs_s41
attach_T_TypeSigs :: Identity (T_TypeSigs_s41 )
                                 }
newtype T_TypeSigs_s41  = C_TypeSigs_s41 {
                                         T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 :: (T_TypeSigs_v40 )
                                         }
data T_TypeSigs_s42  = C_TypeSigs_s42
type T_TypeSigs_v40  = (T_TypeSigs_vIn40 ) -> (T_TypeSigs_vOut40 )
data T_TypeSigs_vIn40  = T_TypeSigs_vIn40 
data T_TypeSigs_vOut40  = T_TypeSigs_vOut40 (TypeSigs)
{-# NOINLINE sem_TypeSigs_Cons #-}
sem_TypeSigs_Cons :: T_TypeSig  -> T_TypeSigs  -> T_TypeSigs 
sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs
sem_TypeSigs_Cons T_TypeSig
arg_hd_ T_TypeSigs
arg_tl_ = Identity T_TypeSigs_s41 -> T_TypeSigs
T_TypeSigs (forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSigs_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_TypeSigs_s41
st41 = let
      v40 :: T_TypeSigs_v40 
      v40 :: T_TypeSigs_v40
v40 = \ (T_TypeSigs_vIn40
T_TypeSigs_vIn40 ) -> ( let
         _hdX38 :: T_TypeSig_s38
_hdX38 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSig -> Identity T_TypeSig_s38
attach_T_TypeSig (T_TypeSig
arg_hd_))
         _tlX41 :: T_TypeSigs_s41
_tlX41 = forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSigs -> Identity T_TypeSigs_s41
attach_T_TypeSigs (T_TypeSigs
arg_tl_))
         (T_TypeSig_vOut37 TypeSig
_hdIoutput) = T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 T_TypeSig_s38
_hdX38 (T_TypeSig_vIn37
T_TypeSig_vIn37 )
         (T_TypeSigs_vOut40 TypeSigs
_tlIoutput) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_tlX41 (T_TypeSigs_vIn40
T_TypeSigs_vIn40 )
         _output :: TypeSigs
_output = TypeSig -> TypeSigs -> TypeSigs
rule255 TypeSig
_hdIoutput TypeSigs
_tlIoutput
         _lhsOoutput :: TypeSigs
         _lhsOoutput :: TypeSigs
_lhsOoutput = forall {p}. p -> p
rule256 TypeSigs
_output
         __result_ :: T_TypeSigs_vOut40
__result_ = TypeSigs -> T_TypeSigs_vOut40
T_TypeSigs_vOut40 TypeSigs
_lhsOoutput
         in T_TypeSigs_vOut40
__result_ )
     in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
   {-# INLINE rule255 #-}
   rule255 :: TypeSig -> TypeSigs -> TypeSigs
rule255 = \ ((TypeSig
_hdIoutput) :: TypeSig) ((TypeSigs
_tlIoutput) :: TypeSigs) ->
     (:) TypeSig
_hdIoutput TypeSigs
_tlIoutput
   {-# INLINE rule256 #-}
   rule256 :: p -> p
rule256 = \ p
_output ->
     p
_output
{-# NOINLINE sem_TypeSigs_Nil #-}
sem_TypeSigs_Nil ::  T_TypeSigs 
sem_TypeSigs_Nil :: T_TypeSigs
sem_TypeSigs_Nil  = Identity T_TypeSigs_s41 -> T_TypeSigs
T_TypeSigs (forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSigs_s41
st41) where
   {-# NOINLINE st41 #-}
   st41 :: T_TypeSigs_s41
st41 = let
      v40 :: T_TypeSigs_v40 
      v40 :: T_TypeSigs_v40
v40 = \ (T_TypeSigs_vIn40
T_TypeSigs_vIn40 ) -> ( let
         _output :: [a]
_output = forall {a}. () -> [a]
rule257  ()
         _lhsOoutput :: TypeSigs
         _lhsOoutput :: TypeSigs
_lhsOoutput = forall {p}. p -> p
rule258 forall a. [a]
_output
         __result_ :: T_TypeSigs_vOut40
__result_ = TypeSigs -> T_TypeSigs_vOut40
T_TypeSigs_vOut40 TypeSigs
_lhsOoutput
         in T_TypeSigs_vOut40
__result_ )
     in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
   {-# INLINE rule257 #-}
   rule257 :: () -> [a]
rule257 = \  (()
_ :: ()) ->
     []
   {-# INLINE rule258 #-}
   rule258 :: p -> p
rule258 = \ p
_output ->
     p
_output