{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module AbstractSyntaxDump where
{-# LINE 2 "src-ag/Expression.ag" #-}
import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 10 "src-generated/AbstractSyntaxDump.hs" #-}
{-# LINE 2 "src-ag/Patterns.ag" #-}
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 17 "src-generated/AbstractSyntaxDump.hs" #-}
{-# LINE 2 "src-ag/AbstractSyntax.ag" #-}
import Data.Set(Set)
import Data.Map(Map)
import Patterns (Pattern(..),Patterns)
import Expression (Expression(..))
import Macro
import CommonTypes
import ErrorMessages
{-# LINE 29 "src-generated/AbstractSyntaxDump.hs" #-}
{-# LINE 6 "src-ag/AbstractSyntaxDump.ag" #-}
import Data.List
import qualified Data.Map as Map
import Pretty
import PPUtil
import AbstractSyntax
import TokenDef
{-# LINE 41 "src-generated/AbstractSyntaxDump.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
data Inh_Child = Inh_Child { }
data Syn_Child = Syn_Child { Syn_Child -> PP_Doc
pp_Syn_Child :: (PP_Doc) }
{-# 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
Inh_Child ) =
Identity Syn_Child -> Syn_Child
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 = T_Child_vIn1
T_Child_vIn1
(T_Child_vOut1 PP_Doc
_lhsOpp) <- T_Child_vOut1 -> Identity T_Child_vOut1
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)
Syn_Child -> Identity Syn_Child
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Child
Syn_Child PP_Doc
_lhsOpp)
)
{-# INLINE sem_Child #-}
sem_Child :: Child -> T_Child
sem_Child :: Child -> T_Child
sem_Child ( Child NontermIdent
name_ Type
tp_ ChildKind
kind_ ) = NontermIdent -> Type -> ChildKind -> T_Child
sem_Child_Child NontermIdent
name_ Type
tp_ ChildKind
kind_
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
data T_Child_vOut1 = T_Child_vOut1 (PP_Doc)
{-# NOINLINE sem_Child_Child #-}
sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child
sem_Child_Child :: NontermIdent -> Type -> ChildKind -> T_Child
sem_Child_Child NontermIdent
arg_name_ Type
arg_tp_ ChildKind
arg_kind_ = Identity T_Child_s2 -> T_Child
T_Child (T_Child_s2 -> Identity T_Child_s2
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
T_Child_vIn1 ) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = ChildKind -> NontermIdent -> Type -> PP_Doc
rule0 ChildKind
arg_kind_ NontermIdent
arg_name_ Type
arg_tp_
__result_ :: T_Child_vOut1
__result_ = PP_Doc -> T_Child_vOut1
T_Child_vOut1 PP_Doc
_lhsOpp
in T_Child_vOut1
__result_ )
in T_Child_v1 -> T_Child_s2
C_Child_s2 T_Child_v1
v1
{-# INLINE rule0 #-}
{-# LINE 35 "src-ag/AbstractSyntaxDump.ag" #-}
rule0 = \ kind_ name_ tp_ ->
{-# LINE 35 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Child","Child"] [pp name_, ppShow tp_] [ppF "kind" $ ppShow kind_] []
{-# LINE 91 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_Children = Inh_Children { }
data Syn_Children = Syn_Children { Syn_Children -> PP_Doc
pp_Syn_Children :: (PP_Doc), Syn_Children -> [PP_Doc]
ppL_Syn_Children :: ([PP_Doc]) }
{-# 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
Inh_Children ) =
Identity Syn_Children -> Syn_Children
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 = T_Children_vIn4
T_Children_vIn4
(T_Children_vOut4 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- T_Children_vOut4 -> Identity T_Children_vOut4
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)
Syn_Children -> Identity Syn_Children
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_Children
Syn_Children PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
)
{-# NOINLINE sem_Children #-}
sem_Children :: Children -> T_Children
sem_Children :: Children -> T_Children
sem_Children Children
list = (T_Child -> T_Children -> T_Children)
-> T_Children -> [T_Child] -> T_Children
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 ((Child -> T_Child) -> Children -> [T_Child]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Child -> T_Child
sem_Child Children
list)
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
data T_Children_vOut4 = T_Children_vOut4 (PP_Doc) ([PP_Doc])
{-# 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 (T_Children_s5 -> Identity T_Children_s5
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
T_Children_vIn4 ) -> ( let
_hdX2 :: T_Child_s2
_hdX2 = Identity T_Child_s2 -> T_Child_s2
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 = Identity T_Children_s5 -> T_Children_s5
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 PP_Doc
_hdIpp) = T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
_hdX2 (T_Child_vIn1
T_Child_vIn1 )
(T_Children_vOut4 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_tlX5 (T_Children_vIn4
T_Children_vIn4 )
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule1 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule2 PP_Doc
_hdIpp PP_Doc
_tlIpp
__result_ :: T_Children_vOut4
__result_ = PP_Doc -> [PP_Doc] -> T_Children_vOut4
T_Children_vOut4 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Children_vOut4
__result_ )
in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
{-# INLINE rule1 #-}
{-# LINE 67 "src-ag/AbstractSyntaxDump.ag" #-}
rule1 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
{-# LINE 67 "src-ag/AbstractSyntaxDump.ag" #-}
_hdIpp : _tlIppL
{-# LINE 146 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule2 #-}
rule2 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
_hdIpp >-< _tlIpp
{-# 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 (T_Children_s5 -> Identity T_Children_s5
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
T_Children_vIn4 ) -> ( let
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = () -> [PP_Doc]
forall a. () -> [a]
rule3 ()
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule4 ()
__result_ :: T_Children_vOut4
__result_ = PP_Doc -> [PP_Doc] -> T_Children_vOut4
T_Children_vOut4 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Children_vOut4
__result_ )
in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
{-# INLINE rule3 #-}
{-# LINE 68 "src-ag/AbstractSyntaxDump.ag" #-}
rule3 = \ (_ :: ()) ->
{-# LINE 68 "src-ag/AbstractSyntaxDump.ag" #-}
[]
{-# LINE 169 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule4 #-}
rule4 = \ (_ :: ()) ->
empty
data Inh_Expression = Inh_Expression { }
data Syn_Expression = Syn_Expression { Syn_Expression -> PP_Doc
pp_Syn_Expression :: (PP_Doc) }
{-# 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
Inh_Expression ) =
Identity Syn_Expression -> Syn_Expression
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 = T_Expression_vIn7
T_Expression_vIn7
(T_Expression_vOut7 PP_Doc
_lhsOpp) <- T_Expression_vOut7 -> Identity T_Expression_vOut7
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)
Syn_Expression -> Identity Syn_Expression
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Expression
Syn_Expression PP_Doc
_lhsOpp)
)
{-# INLINE sem_Expression #-}
sem_Expression :: Expression -> T_Expression
sem_Expression :: Expression -> T_Expression
sem_Expression ( Expression Pos
pos_ [HsToken]
tks_ ) = Pos -> [HsToken] -> T_Expression
sem_Expression_Expression Pos
pos_ [HsToken]
tks_
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
data T_Expression_vOut7 = T_Expression_vOut7 (PP_Doc)
{-# NOINLINE sem_Expression_Expression #-}
sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression
sem_Expression_Expression :: Pos -> [HsToken] -> T_Expression
sem_Expression_Expression Pos
arg_pos_ [HsToken]
arg_tks_ = Identity T_Expression_s8 -> T_Expression
T_Expression (T_Expression_s8 -> Identity T_Expression_s8
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
T_Expression_vIn7 ) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = Pos -> [HsToken] -> PP_Doc
rule5 Pos
arg_pos_ [HsToken]
arg_tks_
__result_ :: T_Expression_vOut7
__result_ = PP_Doc -> T_Expression_vOut7
T_Expression_vOut7 PP_Doc
_lhsOpp
in T_Expression_vOut7
__result_ )
in T_Expression_v7 -> T_Expression_s8
C_Expression_s8 T_Expression_v7
v7
{-# INLINE rule5 #-}
{-# LINE 50 "src-ag/AbstractSyntaxDump.ag" #-}
rule5 = \ pos_ tks_ ->
{-# LINE 50 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Expression","Expression"] [ppShow pos_] [ppF "txt" $ vlist . showTokens . tokensToStrings $ tks_] []
{-# LINE 221 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_Grammar = Inh_Grammar { }
data Syn_Grammar = Syn_Grammar { Syn_Grammar -> PP_Doc
pp_Syn_Grammar :: (PP_Doc) }
{-# 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
Inh_Grammar ) =
Identity Syn_Grammar -> Syn_Grammar
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 = T_Grammar_vIn10
T_Grammar_vIn10
(T_Grammar_vOut10 PP_Doc
_lhsOpp) <- T_Grammar_vOut10 -> Identity T_Grammar_vOut10
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)
Syn_Grammar -> Identity Syn_Grammar
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Grammar
Syn_Grammar PP_Doc
_lhsOpp)
)
{-# INLINE sem_Grammar #-}
sem_Grammar :: Grammar -> T_Grammar
sem_Grammar :: Grammar -> T_Grammar
sem_Grammar ( Grammar [(NontermIdent, ComplexType)]
typeSyns_ Map NontermIdent (Map NontermIdent (String, String, String))
useMap_ Map NontermIdent (Set NontermIdent)
derivings_ Set NontermIdent
wrappers_ Nonterminals
nonts_ PragmaMap
pragmas_ AttrOrderMap
manualAttrOrderMap_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ UniqueMap
uniqueMap_ Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
augmentsMap_ Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
aroundsMap_ Map
NontermIdent
(Map
NontermIdent
(Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
mergeMap_ ) = [(NontermIdent, ComplexType)]
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> T_Nonterminals
-> PragmaMap
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map
NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
-> Map
NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
-> Map
NontermIdent
(Map
NontermIdent
(Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
-> T_Grammar
sem_Grammar_Grammar [(NontermIdent, ComplexType)]
typeSyns_ Map NontermIdent (Map NontermIdent (String, String, String))
useMap_ Map NontermIdent (Set NontermIdent)
derivings_ Set NontermIdent
wrappers_ ( Nonterminals -> T_Nonterminals
sem_Nonterminals Nonterminals
nonts_ ) PragmaMap
pragmas_ AttrOrderMap
manualAttrOrderMap_ ParamMap
paramMap_ ContextMap
contextMap_ QuantMap
quantMap_ UniqueMap
uniqueMap_ Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
augmentsMap_ Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
aroundsMap_ Map
NontermIdent
(Map
NontermIdent
(Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
mergeMap_
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
data T_Grammar_vOut10 = T_Grammar_vOut10 (PP_Doc)
{-# 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 :: [(NontermIdent, ComplexType)]
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Map NontermIdent (Set NontermIdent)
-> Set NontermIdent
-> T_Nonterminals
-> PragmaMap
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map
NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
-> Map
NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
-> Map
NontermIdent
(Map
NontermIdent
(Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
-> T_Grammar
sem_Grammar_Grammar [(NontermIdent, ComplexType)]
arg_typeSyns_ Map NontermIdent (Map NontermIdent (String, String, String))
arg_useMap_ Map NontermIdent (Set NontermIdent)
arg_derivings_ Set NontermIdent
arg_wrappers_ T_Nonterminals
arg_nonts_ PragmaMap
_ AttrOrderMap
_ ParamMap
_ ContextMap
_ QuantMap
_ UniqueMap
_ Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
_ Map NontermIdent (Map NontermIdent (Map NontermIdent [Expression]))
_ Map
NontermIdent
(Map
NontermIdent
(Map NontermIdent (NontermIdent, [NontermIdent], Expression)))
_ = Identity T_Grammar_s11 -> T_Grammar
T_Grammar (T_Grammar_s11 -> Identity T_Grammar_s11
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
T_Grammar_vIn10 ) -> ( let
_nontsX17 :: T_Nonterminals_s17
_nontsX17 = Identity T_Nonterminals_s17 -> T_Nonterminals_s17
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 PP_Doc
_nontsIpp [PP_Doc]
_nontsIppL) = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_nontsX17 (T_Nonterminals_vIn16
T_Nonterminals_vIn16 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc]
-> Map NontermIdent (Set NontermIdent)
-> [(NontermIdent, ComplexType)]
-> Map NontermIdent (Map NontermIdent (String, String, String))
-> Set NontermIdent
-> PP_Doc
rule6 [PP_Doc]
_nontsIppL Map NontermIdent (Set NontermIdent)
arg_derivings_ [(NontermIdent, ComplexType)]
arg_typeSyns_ Map NontermIdent (Map NontermIdent (String, String, String))
arg_useMap_ Set NontermIdent
arg_wrappers_
__result_ :: T_Grammar_vOut10
__result_ = PP_Doc -> T_Grammar_vOut10
T_Grammar_vOut10 PP_Doc
_lhsOpp
in T_Grammar_vOut10
__result_ )
in T_Grammar_v10 -> T_Grammar_s11
C_Grammar_s11 T_Grammar_v10
v10
{-# INLINE rule6 #-}
{-# LINE 20 "src-ag/AbstractSyntaxDump.ag" #-}
rule6 = \ ((_nontsIppL) :: [PP_Doc]) derivings_ typeSyns_ useMap_ wrappers_ ->
{-# LINE 20 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Grammar","Grammar"] []
[ ppF "typeSyns" $ ppAssocL typeSyns_
, ppF "useMap" $ ppMap $ Map.map ppMap $ useMap_
, ppF "derivings" $ ppMap $ derivings_
, ppF "wrappers" $ ppShow $ wrappers_
, ppF "nonts" $ ppVList _nontsIppL
] []
{-# LINE 278 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_Nonterminal = Inh_Nonterminal { }
data Syn_Nonterminal = Syn_Nonterminal { Syn_Nonterminal -> PP_Doc
pp_Syn_Nonterminal :: (PP_Doc) }
{-# 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
Inh_Nonterminal ) =
Identity Syn_Nonterminal -> Syn_Nonterminal
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 = T_Nonterminal_vIn13
T_Nonterminal_vIn13
(T_Nonterminal_vOut13 PP_Doc
_lhsOpp) <- T_Nonterminal_vOut13 -> Identity T_Nonterminal_vOut13
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)
Syn_Nonterminal -> Identity Syn_Nonterminal
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Nonterminal
Syn_Nonterminal PP_Doc
_lhsOpp)
)
{-# INLINE sem_Nonterminal #-}
sem_Nonterminal :: Nonterminal -> T_Nonterminal
sem_Nonterminal :: Nonterminal -> T_Nonterminal
sem_Nonterminal ( Nonterminal NontermIdent
nt_ [NontermIdent]
params_ Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ Productions
prods_ ) = NontermIdent
-> [NontermIdent]
-> Map NontermIdent Type
-> Map NontermIdent Type
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal NontermIdent
nt_ [NontermIdent]
params_ Map NontermIdent Type
inh_ Map NontermIdent Type
syn_ ( Productions -> T_Productions
sem_Productions Productions
prods_ )
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
data T_Nonterminal_vOut13 = T_Nonterminal_vOut13 (PP_Doc)
{-# NOINLINE sem_Nonterminal_Nonterminal #-}
sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions -> T_Nonterminal
sem_Nonterminal_Nonterminal :: NontermIdent
-> [NontermIdent]
-> Map NontermIdent Type
-> Map NontermIdent Type
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal NontermIdent
arg_nt_ [NontermIdent]
arg_params_ Map NontermIdent Type
arg_inh_ Map NontermIdent Type
arg_syn_ T_Productions
arg_prods_ = Identity T_Nonterminal_s14 -> T_Nonterminal
T_Nonterminal (T_Nonterminal_s14 -> Identity T_Nonterminal_s14
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
T_Nonterminal_vIn13 ) -> ( let
_prodsX29 :: T_Productions_s29
_prodsX29 = Identity T_Productions_s29 -> T_Productions_s29
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 PP_Doc
_prodsIpp [PP_Doc]
_prodsIppL) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_prodsX29 (T_Productions_vIn28
T_Productions_vIn28 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc]
-> Map NontermIdent Type
-> NontermIdent
-> [NontermIdent]
-> Map NontermIdent Type
-> PP_Doc
rule7 [PP_Doc]
_prodsIppL Map NontermIdent Type
arg_inh_ NontermIdent
arg_nt_ [NontermIdent]
arg_params_ Map NontermIdent Type
arg_syn_
__result_ :: T_Nonterminal_vOut13
__result_ = PP_Doc -> T_Nonterminal_vOut13
T_Nonterminal_vOut13 PP_Doc
_lhsOpp
in T_Nonterminal_vOut13
__result_ )
in T_Nonterminal_v13 -> T_Nonterminal_s14
C_Nonterminal_s14 T_Nonterminal_v13
v13
{-# INLINE rule7 #-}
{-# LINE 29 "src-ag/AbstractSyntaxDump.ag" #-}
rule7 = \ ((_prodsIppL) :: [PP_Doc]) inh_ nt_ params_ syn_ ->
{-# LINE 29 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Nonterminal","Nonterminal"] (pp nt_ : map pp params_) [ppF "inh" $ ppMap inh_, ppF "syn" $ ppMap syn_, ppF "prods" $ ppVList _prodsIppL] []
{-# LINE 329 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_Nonterminals = Inh_Nonterminals { }
data Syn_Nonterminals = Syn_Nonterminals { Syn_Nonterminals -> PP_Doc
pp_Syn_Nonterminals :: (PP_Doc), Syn_Nonterminals -> [PP_Doc]
ppL_Syn_Nonterminals :: ([PP_Doc]) }
{-# 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
Inh_Nonterminals ) =
Identity Syn_Nonterminals -> Syn_Nonterminals
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 = T_Nonterminals_vIn16
T_Nonterminals_vIn16
(T_Nonterminals_vOut16 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- T_Nonterminals_vOut16 -> Identity T_Nonterminals_vOut16
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)
Syn_Nonterminals -> Identity Syn_Nonterminals
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_Nonterminals
Syn_Nonterminals PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
)
{-# NOINLINE sem_Nonterminals #-}
sem_Nonterminals :: Nonterminals -> T_Nonterminals
sem_Nonterminals :: Nonterminals -> T_Nonterminals
sem_Nonterminals Nonterminals
list = (T_Nonterminal -> T_Nonterminals -> T_Nonterminals)
-> T_Nonterminals -> [T_Nonterminal] -> T_Nonterminals
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 ((Nonterminal -> T_Nonterminal) -> Nonterminals -> [T_Nonterminal]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Nonterminal -> T_Nonterminal
sem_Nonterminal Nonterminals
list)
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
data T_Nonterminals_vOut16 = T_Nonterminals_vOut16 (PP_Doc) ([PP_Doc])
{-# 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 (T_Nonterminals_s17 -> Identity T_Nonterminals_s17
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
T_Nonterminals_vIn16 ) -> ( let
_hdX14 :: T_Nonterminal_s14
_hdX14 = Identity T_Nonterminal_s14 -> T_Nonterminal_s14
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 = Identity T_Nonterminals_s17 -> T_Nonterminals_s17
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 PP_Doc
_hdIpp) = T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 T_Nonterminal_s14
_hdX14 (T_Nonterminal_vIn13
T_Nonterminal_vIn13 )
(T_Nonterminals_vOut16 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_tlX17 (T_Nonterminals_vIn16
T_Nonterminals_vIn16 )
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule8 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule9 PP_Doc
_hdIpp PP_Doc
_tlIpp
__result_ :: T_Nonterminals_vOut16
__result_ = PP_Doc -> [PP_Doc] -> T_Nonterminals_vOut16
T_Nonterminals_vOut16 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Nonterminals_vOut16
__result_ )
in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
{-# INLINE rule8 #-}
{-# LINE 75 "src-ag/AbstractSyntaxDump.ag" #-}
rule8 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
{-# LINE 75 "src-ag/AbstractSyntaxDump.ag" #-}
_hdIpp : _tlIppL
{-# LINE 384 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule9 #-}
rule9 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
_hdIpp >-< _tlIpp
{-# 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 (T_Nonterminals_s17 -> Identity T_Nonterminals_s17
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
T_Nonterminals_vIn16 ) -> ( let
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = () -> [PP_Doc]
forall a. () -> [a]
rule10 ()
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule11 ()
__result_ :: T_Nonterminals_vOut16
__result_ = PP_Doc -> [PP_Doc] -> T_Nonterminals_vOut16
T_Nonterminals_vOut16 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Nonterminals_vOut16
__result_ )
in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
{-# INLINE rule10 #-}
{-# LINE 76 "src-ag/AbstractSyntaxDump.ag" #-}
rule10 = \ (_ :: ()) ->
{-# LINE 76 "src-ag/AbstractSyntaxDump.ag" #-}
[]
{-# LINE 407 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule11 #-}
rule11 = \ (_ :: ()) ->
empty
data Inh_Pattern = Inh_Pattern { }
data Syn_Pattern = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> PP_Doc
pp_Syn_Pattern :: (PP_Doc) }
{-# INLINABLE wrap_Pattern #-}
wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )
wrap_Pattern :: T_Pattern -> Inh_Pattern -> Syn_Pattern
wrap_Pattern (T_Pattern Identity T_Pattern_s20
act) (Inh_Pattern
Inh_Pattern ) =
Identity Syn_Pattern -> Syn_Pattern
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 = T_Pattern_vIn19
T_Pattern_vIn19
(T_Pattern_vOut19 Pattern
_lhsOcopy PP_Doc
_lhsOpp) <- T_Pattern_vOut19 -> Identity T_Pattern_vOut19
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)
Syn_Pattern -> Identity Syn_Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern -> PP_Doc -> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy PP_Doc
_lhsOpp)
)
{-# NOINLINE sem_Pattern #-}
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern :: Pattern -> T_Pattern
sem_Pattern ( Constr NontermIdent
name_ Patterns
pats_ ) = NontermIdent -> T_Patterns -> T_Pattern
sem_Pattern_Constr NontermIdent
name_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Product Pos
pos_ Patterns
pats_ ) = Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
pos_ ( Patterns -> T_Patterns
sem_Patterns Patterns
pats_ )
sem_Pattern ( Alias NontermIdent
field_ NontermIdent
attr_ Pattern
pat_ ) = NontermIdent -> NontermIdent -> T_Pattern -> T_Pattern
sem_Pattern_Alias NontermIdent
field_ NontermIdent
attr_ ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Irrefutable Pattern
pat_ ) = T_Pattern -> T_Pattern
sem_Pattern_Irrefutable ( Pattern -> T_Pattern
sem_Pattern Pattern
pat_ )
sem_Pattern ( Underscore Pos
pos_ ) = Pos -> T_Pattern
sem_Pattern_Underscore Pos
pos_
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
data T_Pattern_vOut19 = T_Pattern_vOut19 (Pattern) (PP_Doc)
{-# NOINLINE sem_Pattern_Constr #-}
sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern
sem_Pattern_Constr :: NontermIdent -> T_Patterns -> T_Pattern
sem_Pattern_Constr NontermIdent
arg_name_ T_Patterns
arg_pats_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (T_Pattern_s20 -> Identity T_Pattern_s20
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
T_Pattern_vIn19 ) -> ( let
_patsX23 :: T_Patterns_s23
_patsX23 = Identity T_Patterns_s23 -> T_Patterns_s23
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 PP_Doc
_patsIpp [PP_Doc]
_patsIppL) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (T_Patterns_vIn22
T_Patterns_vIn22 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> NontermIdent -> PP_Doc
rule12 [PP_Doc]
_patsIppL NontermIdent
arg_name_
_copy :: Pattern
_copy = Patterns -> NontermIdent -> Pattern
rule13 Patterns
_patsIcopy NontermIdent
arg_name_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule14 Pattern
_copy
__result_ :: T_Pattern_vOut19
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy PP_Doc
_lhsOpp
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule12 #-}
{-# LINE 44 "src-ag/AbstractSyntaxDump.ag" #-}
rule12 = \ ((_patsIppL) :: [PP_Doc]) name_ ->
{-# LINE 44 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Pattern","Constr"] [pp name_] [ppF "pats" $ ppVList _patsIppL] []
{-# LINE 468 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule13 #-}
rule13 = \ ((_patsIcopy) :: Patterns) name_ ->
Constr name_ _patsIcopy
{-# INLINE rule14 #-}
rule14 = \ _copy ->
_copy
{-# NOINLINE sem_Pattern_Product #-}
sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern
sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
arg_pos_ T_Patterns
arg_pats_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (T_Pattern_s20 -> Identity T_Pattern_s20
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
T_Pattern_vIn19 ) -> ( let
_patsX23 :: T_Patterns_s23
_patsX23 = Identity T_Patterns_s23 -> T_Patterns_s23
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 PP_Doc
_patsIpp [PP_Doc]
_patsIppL) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (T_Patterns_vIn22
T_Patterns_vIn22 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> Pos -> PP_Doc
rule15 [PP_Doc]
_patsIppL Pos
arg_pos_
_copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule16 Patterns
_patsIcopy Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule17 Pattern
_copy
__result_ :: T_Pattern_vOut19
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy PP_Doc
_lhsOpp
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule15 #-}
{-# LINE 45 "src-ag/AbstractSyntaxDump.ag" #-}
rule15 = \ ((_patsIppL) :: [PP_Doc]) pos_ ->
{-# LINE 45 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Pattern","Product"] [ppShow pos_] [ppF "pats" $ ppVList _patsIppL] []
{-# LINE 497 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule16 #-}
rule16 = \ ((_patsIcopy) :: Patterns) pos_ ->
Product pos_ _patsIcopy
{-# INLINE rule17 #-}
rule17 = \ _copy ->
_copy
{-# NOINLINE sem_Pattern_Alias #-}
sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern
sem_Pattern_Alias :: NontermIdent -> NontermIdent -> T_Pattern -> T_Pattern
sem_Pattern_Alias NontermIdent
arg_field_ NontermIdent
arg_attr_ T_Pattern
arg_pat_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (T_Pattern_s20 -> Identity T_Pattern_s20
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
T_Pattern_vIn19 ) -> ( let
_patX20 :: T_Pattern_s20
_patX20 = Identity T_Pattern_s20 -> T_Pattern_s20
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 PP_Doc
_patIpp) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> NontermIdent -> NontermIdent -> PP_Doc
rule18 PP_Doc
_patIpp NontermIdent
arg_attr_ NontermIdent
arg_field_
_copy :: Pattern
_copy = Pattern -> NontermIdent -> NontermIdent -> Pattern
rule19 Pattern
_patIcopy NontermIdent
arg_attr_ NontermIdent
arg_field_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule20 Pattern
_copy
__result_ :: T_Pattern_vOut19
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy PP_Doc
_lhsOpp
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule18 #-}
{-# LINE 46 "src-ag/AbstractSyntaxDump.ag" #-}
rule18 = \ ((_patIpp) :: PP_Doc) attr_ field_ ->
{-# LINE 46 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Pattern","Alias"] [pp field_, pp attr_] [ppF "pat" $ _patIpp] []
{-# LINE 526 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule19 #-}
rule19 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIcopy
{-# INLINE rule20 #-}
rule20 = \ _copy ->
_copy
{-# NOINLINE sem_Pattern_Irrefutable #-}
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable T_Pattern
arg_pat_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (T_Pattern_s20 -> Identity T_Pattern_s20
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
T_Pattern_vIn19 ) -> ( let
_patX20 :: T_Pattern_s20
_patX20 = Identity T_Pattern_s20 -> T_Pattern_s20
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 PP_Doc
_patIpp) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc
rule21 PP_Doc
_patIpp
_copy :: Pattern
_copy = Pattern -> Pattern
rule22 Pattern
_patIcopy
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule23 Pattern
_copy
__result_ :: T_Pattern_vOut19
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy PP_Doc
_lhsOpp
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule21 #-}
rule21 :: PP_Doc -> PP_Doc
rule21 = \ ((PP_Doc
_patIpp) :: PP_Doc) ->
PP_Doc
_patIpp
{-# INLINE rule22 #-}
rule22 :: Pattern -> Pattern
rule22 = \ ((Pattern
_patIcopy) :: Pattern) ->
Pattern -> Pattern
Irrefutable Pattern
_patIcopy
{-# INLINE rule23 #-}
rule23 :: p -> p
rule23 = \ p
_copy ->
p
_copy
{-# NOINLINE sem_Pattern_Underscore #-}
sem_Pattern_Underscore :: (Pos) -> T_Pattern
sem_Pattern_Underscore :: Pos -> T_Pattern
sem_Pattern_Underscore Pos
arg_pos_ = Identity T_Pattern_s20 -> T_Pattern
T_Pattern (T_Pattern_s20 -> Identity T_Pattern_s20
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
T_Pattern_vIn19 ) -> ( let
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = Pos -> PP_Doc
rule24 Pos
arg_pos_
_copy :: Pattern
_copy = Pos -> Pattern
rule25 Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule26 Pattern
_copy
__result_ :: T_Pattern_vOut19
__result_ = Pattern -> PP_Doc -> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy PP_Doc
_lhsOpp
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule24 #-}
{-# LINE 47 "src-ag/AbstractSyntaxDump.ag" #-}
rule24 = \ pos_ ->
{-# LINE 47 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Pattern","Underscore"] [ppShow pos_] [] []
{-# LINE 579 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule25 #-}
rule25 = \ pos_ ->
Underscore pos_
{-# INLINE rule26 #-}
rule26 = \ _copy ->
_copy
data Inh_Patterns = Inh_Patterns { }
data Syn_Patterns = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> PP_Doc
pp_Syn_Patterns :: (PP_Doc), Syn_Patterns -> [PP_Doc]
ppL_Syn_Patterns :: ([PP_Doc]) }
{-# INLINABLE wrap_Patterns #-}
wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )
wrap_Patterns :: T_Patterns -> Inh_Patterns -> Syn_Patterns
wrap_Patterns (T_Patterns Identity T_Patterns_s23
act) (Inh_Patterns
Inh_Patterns ) =
Identity Syn_Patterns -> Syn_Patterns
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 = T_Patterns_vIn22
T_Patterns_vIn22
(T_Patterns_vOut22 Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- T_Patterns_vOut22 -> Identity T_Patterns_vOut22
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)
Syn_Patterns -> Identity Syn_Patterns
forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns -> PP_Doc -> [PP_Doc] -> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
)
{-# NOINLINE sem_Patterns #-}
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns :: Patterns -> T_Patterns
sem_Patterns Patterns
list = (T_Pattern -> T_Patterns -> T_Patterns)
-> T_Patterns -> [T_Pattern] -> T_Patterns
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Patterns
sem_Patterns_Nil ((Pattern -> T_Pattern) -> Patterns -> [T_Pattern]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Pattern -> T_Pattern
sem_Pattern Patterns
list)
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
data T_Patterns_vOut22 = T_Patterns_vOut22 (Patterns) (PP_Doc) ([PP_Doc])
{-# NOINLINE sem_Patterns_Cons #-}
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns
sem_Patterns_Cons T_Pattern
arg_hd_ T_Patterns
arg_tl_ = Identity T_Patterns_s23 -> T_Patterns
T_Patterns (T_Patterns_s23 -> Identity T_Patterns_s23
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
T_Patterns_vIn22 ) -> ( let
_hdX20 :: T_Pattern_s20
_hdX20 = Identity T_Pattern_s20 -> T_Pattern_s20
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 = Identity T_Patterns_s23 -> T_Patterns_s23
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 PP_Doc
_hdIpp) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_hdX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
(T_Patterns_vOut22 Patterns
_tlIcopy PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_tlX23 (T_Patterns_vIn22
T_Patterns_vIn22 )
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule27 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule28 PP_Doc
_hdIpp PP_Doc
_tlIpp
_copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule29 Pattern
_hdIcopy Patterns
_tlIcopy
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall p. p -> p
rule30 Patterns
_copy
__result_ :: T_Patterns_vOut22
__result_ = Patterns -> PP_Doc -> [PP_Doc] -> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Patterns_vOut22
__result_ )
in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
{-# INLINE rule27 #-}
{-# LINE 55 "src-ag/AbstractSyntaxDump.ag" #-}
rule27 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
{-# LINE 55 "src-ag/AbstractSyntaxDump.ag" #-}
_hdIpp : _tlIppL
{-# LINE 643 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule28 #-}
rule28 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
_hdIpp >-< _tlIpp
{-# INLINE rule29 #-}
rule29 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->
(:) _hdIcopy _tlIcopy
{-# INLINE rule30 #-}
rule30 = \ _copy ->
_copy
{-# 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 (T_Patterns_s23 -> Identity T_Patterns_s23
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
T_Patterns_vIn22 ) -> ( let
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = () -> [PP_Doc]
forall a. () -> [a]
rule31 ()
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule32 ()
_copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule33 ()
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall p. p -> p
rule34 Patterns
forall a. [a]
_copy
__result_ :: T_Patterns_vOut22
__result_ = Patterns -> PP_Doc -> [PP_Doc] -> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Patterns_vOut22
__result_ )
in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
{-# INLINE rule31 #-}
{-# LINE 56 "src-ag/AbstractSyntaxDump.ag" #-}
rule31 = \ (_ :: ()) ->
{-# LINE 56 "src-ag/AbstractSyntaxDump.ag" #-}
[]
{-# LINE 675 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule32 #-}
rule32 = \ (_ :: ()) ->
empty
{-# INLINE rule33 #-}
rule33 = \ (_ :: ()) ->
[]
{-# INLINE rule34 #-}
rule34 = \ _copy ->
_copy
data Inh_Production = Inh_Production { }
data Syn_Production = Syn_Production { Syn_Production -> PP_Doc
pp_Syn_Production :: (PP_Doc) }
{-# 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
Inh_Production ) =
Identity Syn_Production -> Syn_Production
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 = T_Production_vIn25
T_Production_vIn25
(T_Production_vOut25 PP_Doc
_lhsOpp) <- T_Production_vOut25 -> Identity T_Production_vOut25
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)
Syn_Production -> Identity Syn_Production
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Production
Syn_Production PP_Doc
_lhsOpp)
)
{-# INLINE sem_Production #-}
sem_Production :: Production -> T_Production
sem_Production :: Production -> T_Production
sem_Production ( Production NontermIdent
con_ [NontermIdent]
params_ [Type]
constraints_ Children
children_ Rules
rules_ TypeSigs
typeSigs_ MaybeMacro
macro_ ) = NontermIdent
-> [NontermIdent]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production NontermIdent
con_ [NontermIdent]
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_
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
data T_Production_vOut25 = T_Production_vOut25 (PP_Doc)
{-# NOINLINE sem_Production_Production #-}
sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children -> T_Rules -> T_TypeSigs -> (MaybeMacro) -> T_Production
sem_Production_Production :: NontermIdent
-> [NontermIdent]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production NontermIdent
arg_con_ [NontermIdent]
_ [Type]
_ T_Children
arg_children_ T_Rules
arg_rules_ T_TypeSigs
arg_typeSigs_ MaybeMacro
_ = Identity T_Production_s26 -> T_Production
T_Production (T_Production_s26 -> Identity T_Production_s26
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
T_Production_vIn25 ) -> ( let
_childrenX5 :: T_Children_s5
_childrenX5 = Identity T_Children_s5 -> T_Children_s5
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 = Identity T_Rules_s35 -> T_Rules_s35
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 = Identity T_TypeSigs_s41 -> T_TypeSigs_s41
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 PP_Doc
_childrenIpp [PP_Doc]
_childrenIppL) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_childrenX5 (T_Children_vIn4
T_Children_vIn4 )
(T_Rules_vOut34 PP_Doc
_rulesIpp [PP_Doc]
_rulesIppL) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_rulesX35 (T_Rules_vIn34
T_Rules_vIn34 )
(T_TypeSigs_vOut40 PP_Doc
_typeSigsIpp [PP_Doc]
_typeSigsIppL) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_typeSigsX41 (T_TypeSigs_vIn40
T_TypeSigs_vIn40 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = [PP_Doc] -> [PP_Doc] -> [PP_Doc] -> NontermIdent -> PP_Doc
rule35 [PP_Doc]
_childrenIppL [PP_Doc]
_rulesIppL [PP_Doc]
_typeSigsIppL NontermIdent
arg_con_
__result_ :: T_Production_vOut25
__result_ = PP_Doc -> T_Production_vOut25
T_Production_vOut25 PP_Doc
_lhsOpp
in T_Production_vOut25
__result_ )
in T_Production_v25 -> T_Production_s26
C_Production_s26 T_Production_v25
v25
{-# INLINE rule35 #-}
{-# LINE 32 "src-ag/AbstractSyntaxDump.ag" #-}
rule35 = \ ((_childrenIppL) :: [PP_Doc]) ((_rulesIppL) :: [PP_Doc]) ((_typeSigsIppL) :: [PP_Doc]) con_ ->
{-# LINE 32 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Production","Production"] [pp con_] [ppF "children" $ ppVList _childrenIppL,ppF "rules" $ ppVList _rulesIppL,ppF "typeSigs" $ ppVList _typeSigsIppL] []
{-# LINE 739 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_Productions = Inh_Productions { }
data Syn_Productions = Syn_Productions { Syn_Productions -> PP_Doc
pp_Syn_Productions :: (PP_Doc), Syn_Productions -> [PP_Doc]
ppL_Syn_Productions :: ([PP_Doc]) }
{-# 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
Inh_Productions ) =
Identity Syn_Productions -> Syn_Productions
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 = T_Productions_vIn28
T_Productions_vIn28
(T_Productions_vOut28 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- T_Productions_vOut28 -> Identity T_Productions_vOut28
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)
Syn_Productions -> Identity Syn_Productions
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_Productions
Syn_Productions PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
)
{-# NOINLINE sem_Productions #-}
sem_Productions :: Productions -> T_Productions
sem_Productions :: Productions -> T_Productions
sem_Productions Productions
list = (T_Production -> T_Productions -> T_Productions)
-> T_Productions -> [T_Production] -> T_Productions
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 ((Production -> T_Production) -> Productions -> [T_Production]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Production -> T_Production
sem_Production Productions
list)
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
data T_Productions_vOut28 = T_Productions_vOut28 (PP_Doc) ([PP_Doc])
{-# 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 (T_Productions_s29 -> Identity T_Productions_s29
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
T_Productions_vIn28 ) -> ( let
_hdX26 :: T_Production_s26
_hdX26 = Identity T_Production_s26 -> T_Production_s26
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 = Identity T_Productions_s29 -> T_Productions_s29
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 PP_Doc
_hdIpp) = T_Production_s26 -> T_Production_v25
inv_Production_s26 T_Production_s26
_hdX26 (T_Production_vIn25
T_Production_vIn25 )
(T_Productions_vOut28 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_tlX29 (T_Productions_vIn28
T_Productions_vIn28 )
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule36 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule37 PP_Doc
_hdIpp PP_Doc
_tlIpp
__result_ :: T_Productions_vOut28
__result_ = PP_Doc -> [PP_Doc] -> T_Productions_vOut28
T_Productions_vOut28 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Productions_vOut28
__result_ )
in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
{-# INLINE rule36 #-}
{-# LINE 71 "src-ag/AbstractSyntaxDump.ag" #-}
rule36 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
{-# LINE 71 "src-ag/AbstractSyntaxDump.ag" #-}
_hdIpp : _tlIppL
{-# LINE 794 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule37 #-}
rule37 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
_hdIpp >-< _tlIpp
{-# 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 (T_Productions_s29 -> Identity T_Productions_s29
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
T_Productions_vIn28 ) -> ( let
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = () -> [PP_Doc]
forall a. () -> [a]
rule38 ()
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule39 ()
__result_ :: T_Productions_vOut28
__result_ = PP_Doc -> [PP_Doc] -> T_Productions_vOut28
T_Productions_vOut28 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Productions_vOut28
__result_ )
in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
{-# INLINE rule38 #-}
{-# LINE 72 "src-ag/AbstractSyntaxDump.ag" #-}
rule38 = \ (_ :: ()) ->
{-# LINE 72 "src-ag/AbstractSyntaxDump.ag" #-}
[]
{-# LINE 817 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule39 #-}
rule39 = \ (_ :: ()) ->
empty
data Inh_Rule = Inh_Rule { }
data Syn_Rule = Syn_Rule { Syn_Rule -> PP_Doc
pp_Syn_Rule :: (PP_Doc) }
{-# 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
Inh_Rule ) =
Identity Syn_Rule -> Syn_Rule
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 = T_Rule_vIn31
T_Rule_vIn31
(T_Rule_vOut31 PP_Doc
_lhsOpp) <- T_Rule_vOut31 -> Identity T_Rule_vOut31
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)
Syn_Rule -> Identity Syn_Rule
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_Rule
Syn_Rule PP_Doc
_lhsOpp)
)
{-# INLINE sem_Rule #-}
sem_Rule :: Rule -> T_Rule
sem_Rule :: Rule -> T_Rule
sem_Rule ( Rule Maybe NontermIdent
mbName_ Pattern
pattern_ Expression
rhs_ Bool
owrt_ String
origin_ Bool
explicit_ Bool
pure_ Bool
identity_ Maybe Error
mbError_ Bool
eager_ ) = Maybe NontermIdent
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe NontermIdent
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_
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
data T_Rule_vOut31 = T_Rule_vOut31 (PP_Doc)
{-# 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 NontermIdent
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe NontermIdent
_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
arg_owrt_ String
arg_origin_ Bool
_ Bool
_ Bool
_ Maybe Error
_ Bool
_ = Identity T_Rule_s32 -> T_Rule
T_Rule (T_Rule_s32 -> Identity T_Rule_s32
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
T_Rule_vIn31 ) -> ( let
_patternX20 :: T_Pattern_s20
_patternX20 = Identity T_Pattern_s20 -> T_Pattern_s20
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 = Identity T_Expression_s8 -> T_Expression_s8
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 PP_Doc
_patternIpp) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patternX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
(T_Expression_vOut7 PP_Doc
_rhsIpp) = T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
_rhsX8 (T_Expression_vIn7
T_Expression_vIn7 )
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> String -> Bool -> PP_Doc
rule40 PP_Doc
_patternIpp PP_Doc
_rhsIpp String
arg_origin_ Bool
arg_owrt_
__result_ :: T_Rule_vOut31
__result_ = PP_Doc -> T_Rule_vOut31
T_Rule_vOut31 PP_Doc
_lhsOpp
in T_Rule_vOut31
__result_ )
in T_Rule_v31 -> T_Rule_s32
C_Rule_s32 T_Rule_v31
v31
{-# INLINE rule40 #-}
{-# LINE 38 "src-ag/AbstractSyntaxDump.ag" #-}
rule40 = \ ((_patternIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) origin_ owrt_ ->
{-# LINE 38 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["Rule","Rule"] [ppShow owrt_, pp origin_] [ppF "pattern" $ _patternIpp, ppF "rhs" $ _rhsIpp] []
{-# LINE 873 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_Rules = Inh_Rules { }
data Syn_Rules = Syn_Rules { Syn_Rules -> PP_Doc
pp_Syn_Rules :: (PP_Doc), Syn_Rules -> [PP_Doc]
ppL_Syn_Rules :: ([PP_Doc]) }
{-# 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
Inh_Rules ) =
Identity Syn_Rules -> Syn_Rules
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 = T_Rules_vIn34
T_Rules_vIn34
(T_Rules_vOut34 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- T_Rules_vOut34 -> Identity T_Rules_vOut34
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)
Syn_Rules -> Identity Syn_Rules
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_Rules
Syn_Rules PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
)
{-# NOINLINE sem_Rules #-}
sem_Rules :: Rules -> T_Rules
sem_Rules :: Rules -> T_Rules
sem_Rules Rules
list = (T_Rule -> T_Rules -> T_Rules) -> T_Rules -> [T_Rule] -> T_Rules
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 ((Rule -> T_Rule) -> Rules -> [T_Rule]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map Rule -> T_Rule
sem_Rule Rules
list)
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
data T_Rules_vOut34 = T_Rules_vOut34 (PP_Doc) ([PP_Doc])
{-# 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 (T_Rules_s35 -> Identity T_Rules_s35
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
T_Rules_vIn34 ) -> ( let
_hdX32 :: T_Rule_s32
_hdX32 = Identity T_Rule_s32 -> T_Rule_s32
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 = Identity T_Rules_s35 -> T_Rules_s35
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 PP_Doc
_hdIpp) = T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 T_Rule_s32
_hdX32 (T_Rule_vIn31
T_Rule_vIn31 )
(T_Rules_vOut34 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_tlX35 (T_Rules_vIn34
T_Rules_vIn34 )
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule41 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule42 PP_Doc
_hdIpp PP_Doc
_tlIpp
__result_ :: T_Rules_vOut34
__result_ = PP_Doc -> [PP_Doc] -> T_Rules_vOut34
T_Rules_vOut34 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Rules_vOut34
__result_ )
in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
{-# INLINE rule41 #-}
{-# LINE 63 "src-ag/AbstractSyntaxDump.ag" #-}
rule41 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
{-# LINE 63 "src-ag/AbstractSyntaxDump.ag" #-}
_hdIpp : _tlIppL
{-# LINE 928 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule42 #-}
rule42 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
_hdIpp >-< _tlIpp
{-# 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 (T_Rules_s35 -> Identity T_Rules_s35
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
T_Rules_vIn34 ) -> ( let
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = () -> [PP_Doc]
forall a. () -> [a]
rule43 ()
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule44 ()
__result_ :: T_Rules_vOut34
__result_ = PP_Doc -> [PP_Doc] -> T_Rules_vOut34
T_Rules_vOut34 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_Rules_vOut34
__result_ )
in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
{-# INLINE rule43 #-}
{-# LINE 64 "src-ag/AbstractSyntaxDump.ag" #-}
rule43 = \ (_ :: ()) ->
{-# LINE 64 "src-ag/AbstractSyntaxDump.ag" #-}
[]
{-# LINE 951 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule44 #-}
rule44 = \ (_ :: ()) ->
empty
data Inh_TypeSig = Inh_TypeSig { }
data Syn_TypeSig = Syn_TypeSig { Syn_TypeSig -> PP_Doc
pp_Syn_TypeSig :: (PP_Doc) }
{-# 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 ) =
Identity Syn_TypeSig -> Syn_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 PP_Doc
_lhsOpp) <- T_TypeSig_vOut37 -> Identity T_TypeSig_vOut37
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)
Syn_TypeSig -> Identity Syn_TypeSig
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> Syn_TypeSig
Syn_TypeSig PP_Doc
_lhsOpp)
)
{-# INLINE sem_TypeSig #-}
sem_TypeSig :: TypeSig -> T_TypeSig
sem_TypeSig :: TypeSig -> T_TypeSig
sem_TypeSig ( TypeSig NontermIdent
name_ Type
tp_ ) = NontermIdent -> Type -> T_TypeSig
sem_TypeSig_TypeSig NontermIdent
name_ Type
tp_
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 (PP_Doc)
{-# NOINLINE sem_TypeSig_TypeSig #-}
sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig
sem_TypeSig_TypeSig :: NontermIdent -> Type -> T_TypeSig
sem_TypeSig_TypeSig NontermIdent
arg_name_ Type
arg_tp_ = Identity T_TypeSig_s38 -> T_TypeSig
T_TypeSig (T_TypeSig_s38 -> Identity T_TypeSig_s38
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
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = NontermIdent -> Type -> PP_Doc
rule45 NontermIdent
arg_name_ Type
arg_tp_
__result_ :: T_TypeSig_vOut37
__result_ = PP_Doc -> T_TypeSig_vOut37
T_TypeSig_vOut37 PP_Doc
_lhsOpp
in T_TypeSig_vOut37
__result_ )
in T_TypeSig_v37 -> T_TypeSig_s38
C_TypeSig_s38 T_TypeSig_v37
v37
{-# INLINE rule45 #-}
{-# LINE 41 "src-ag/AbstractSyntaxDump.ag" #-}
rule45 = \ name_ tp_ ->
{-# LINE 41 "src-ag/AbstractSyntaxDump.ag" #-}
ppNestInfo ["TypeSig","TypeSig"] [pp name_, ppShow tp_] [] []
{-# LINE 1003 "src-generated/AbstractSyntaxDump.hs" #-}
data Inh_TypeSigs = Inh_TypeSigs { }
data Syn_TypeSigs = Syn_TypeSigs { Syn_TypeSigs -> PP_Doc
pp_Syn_TypeSigs :: (PP_Doc), Syn_TypeSigs -> [PP_Doc]
ppL_Syn_TypeSigs :: ([PP_Doc]) }
{-# 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 ) =
Identity Syn_TypeSigs -> Syn_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 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL) <- T_TypeSigs_vOut40 -> Identity T_TypeSigs_vOut40
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)
Syn_TypeSigs -> Identity Syn_TypeSigs
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc -> [PP_Doc] -> Syn_TypeSigs
Syn_TypeSigs PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL)
)
{-# NOINLINE sem_TypeSigs #-}
sem_TypeSigs :: TypeSigs -> T_TypeSigs
sem_TypeSigs :: TypeSigs -> T_TypeSigs
sem_TypeSigs TypeSigs
list = (T_TypeSig -> T_TypeSigs -> T_TypeSigs)
-> T_TypeSigs -> [T_TypeSig] -> T_TypeSigs
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 ((TypeSig -> T_TypeSig) -> TypeSigs -> [T_TypeSig]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map TypeSig -> T_TypeSig
sem_TypeSig TypeSigs
list)
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 (PP_Doc) ([PP_Doc])
{-# 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 (T_TypeSigs_s41 -> Identity T_TypeSigs_s41
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 = Identity T_TypeSig_s38 -> T_TypeSig_s38
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 = Identity T_TypeSigs_s41 -> T_TypeSigs_s41
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 PP_Doc
_hdIpp) = T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 T_TypeSig_s38
_hdX38 (T_TypeSig_vIn37
T_TypeSig_vIn37 )
(T_TypeSigs_vOut40 PP_Doc
_tlIpp [PP_Doc]
_tlIppL) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_tlX41 (T_TypeSigs_vIn40
T_TypeSigs_vIn40 )
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = PP_Doc -> [PP_Doc] -> [PP_Doc]
rule46 PP_Doc
_hdIpp [PP_Doc]
_tlIppL
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = PP_Doc -> PP_Doc -> PP_Doc
rule47 PP_Doc
_hdIpp PP_Doc
_tlIpp
__result_ :: T_TypeSigs_vOut40
__result_ = PP_Doc -> [PP_Doc] -> T_TypeSigs_vOut40
T_TypeSigs_vOut40 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_TypeSigs_vOut40
__result_ )
in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
{-# INLINE rule46 #-}
{-# LINE 59 "src-ag/AbstractSyntaxDump.ag" #-}
rule46 = \ ((_hdIpp) :: PP_Doc) ((_tlIppL) :: [PP_Doc]) ->
{-# LINE 59 "src-ag/AbstractSyntaxDump.ag" #-}
_hdIpp : _tlIppL
{-# LINE 1058 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule47 #-}
rule47 = \ ((_hdIpp) :: PP_Doc) ((_tlIpp) :: PP_Doc) ->
_hdIpp >-< _tlIpp
{-# 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 (T_TypeSigs_s41 -> Identity T_TypeSigs_s41
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
_lhsOppL :: [PP_Doc]
_lhsOppL :: [PP_Doc]
_lhsOppL = () -> [PP_Doc]
forall a. () -> [a]
rule48 ()
_lhsOpp :: PP_Doc
_lhsOpp :: PP_Doc
_lhsOpp = () -> PP_Doc
rule49 ()
__result_ :: T_TypeSigs_vOut40
__result_ = PP_Doc -> [PP_Doc] -> T_TypeSigs_vOut40
T_TypeSigs_vOut40 PP_Doc
_lhsOpp [PP_Doc]
_lhsOppL
in T_TypeSigs_vOut40
__result_ )
in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
{-# INLINE rule48 #-}
{-# LINE 60 "src-ag/AbstractSyntaxDump.ag" #-}
rule48 = \ (_ :: ()) ->
{-# LINE 60 "src-ag/AbstractSyntaxDump.ag" #-}
[]
{-# LINE 1081 "src-generated/AbstractSyntaxDump.hs" #-}
{-# INLINE rule49 #-}
rule49 = \ (_ :: ()) ->
empty