{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module TfmToVisage where
{-# LINE 2 "src-ag/Expression.ag" #-}
import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 10 "src-generated/TfmToVisage.hs" #-}
{-# LINE 2 "src-ag/Patterns.ag" #-}
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 17 "src-generated/TfmToVisage.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/TfmToVisage.hs" #-}
{-# LINE 9 "src-ag/TfmToVisage.ag" #-}
import AbstractSyntax
import VisagePatterns
import VisageSyntax
import qualified Data.Map as Map
import Data.Map (Map)
{-# LINE 38 "src-generated/TfmToVisage.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 17 "src-ag/TfmToVisage.ag" #-}
isVar (Alias _ _ (Underscore _)) = True
isVar _ = False
type VisageRuleMap = [(String, VisageRule)]
splitVRules :: [VisageRule] -> VisageRuleMap
splitVRules vrs = concat (map unfoldvrs vrs)
unfoldvrs :: VisageRule -> VisageRuleMap
unfoldvrs vr@(VRule attrfields _ _ _ _) = zip (map (getName . fst) attrfields) (map (copyRule vr) attrfields)
copyRule :: VisageRule -> (Identifier,Identifier) -> VisageRule
copyRule (VRule attrfields _ pat expr owrt) (field,attr) = VRule attrfields attr pat expr owrt
getForField :: String -> VisageRuleMap -> [VisageRule]
getForField field xs = map snd (filter ((field ==) . fst) xs)
{-# LINE 96 "src-generated/TfmToVisage.hs" #-}
data Inh_Child = Inh_Child { Inh_Child -> Map Identifier Attributes
inhMap_Inh_Child :: (Map Identifier Attributes), Inh_Child -> VisageRuleMap
rulemap_Inh_Child :: (VisageRuleMap), Inh_Child -> Map Identifier Attributes
synMap_Inh_Child :: (Map Identifier Attributes) }
data Syn_Child = Syn_Child { Syn_Child -> VisageChild
vchild_Syn_Child :: (VisageChild) }
{-# 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 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap Map Identifier Attributes
_lhsIsynMap) =
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 = Map Identifier Attributes
-> VisageRuleMap -> Map Identifier Attributes -> T_Child_vIn1
T_Child_vIn1 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap Map Identifier Attributes
_lhsIsynMap
(T_Child_vOut1 VisageChild
_lhsOvchild) <- 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 (VisageChild -> Syn_Child
Syn_Child VisageChild
_lhsOvchild)
)
{-# 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_
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 (Map Identifier Attributes) (VisageRuleMap) (Map Identifier Attributes)
data T_Child_vOut1 = T_Child_vOut1 (VisageChild)
{-# 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
_ = 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 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap 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
_lhsOvchild :: VisageChild
_lhsOvchild :: VisageChild
_lhsOvchild = Attributes
-> VisageRuleMap -> Attributes -> Identifier -> Type -> VisageChild
rule3 Attributes
_inh VisageRuleMap
_lhsIrulemap Attributes
_syn Identifier
arg_name_ Type
arg_tp_
__result_ :: T_Child_vOut1
__result_ = VisageChild -> T_Child_vOut1
T_Child_vOut1 VisageChild
_lhsOvchild
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 150 "src-generated/TfmToVisage.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 156 "src-generated/TfmToVisage.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 162 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule3 #-}
{-# LINE 121 "src-ag/TfmToVisage.ag" #-}
rule3 = \ _inh ((_lhsIrulemap) :: VisageRuleMap) _syn name_ tp_ ->
{-# LINE 121 "src-ag/TfmToVisage.ag" #-}
VChild name_ tp_ _inh _syn (getForField (getName name_) _lhsIrulemap)
{-# LINE 168 "src-generated/TfmToVisage.hs" #-}
data Inh_Children = Inh_Children { Inh_Children -> Map Identifier Attributes
inhMap_Inh_Children :: (Map Identifier Attributes), Inh_Children -> VisageRuleMap
rulemap_Inh_Children :: (VisageRuleMap), Inh_Children -> Map Identifier Attributes
synMap_Inh_Children :: (Map Identifier Attributes) }
data Syn_Children = Syn_Children { Syn_Children -> [VisageChild]
vchildren_Syn_Children :: ([VisageChild]) }
{-# 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 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap Map Identifier Attributes
_lhsIsynMap) =
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 = Map Identifier Attributes
-> VisageRuleMap -> Map Identifier Attributes -> T_Children_vIn4
T_Children_vIn4 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap Map Identifier Attributes
_lhsIsynMap
(T_Children_vOut4 [VisageChild]
_lhsOvchildren) <- 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 ([VisageChild] -> Syn_Children
Syn_Children [VisageChild]
_lhsOvchildren)
)
{-# 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 (Map Identifier Attributes) (VisageRuleMap) (Map Identifier Attributes)
data T_Children_vOut4 = T_Children_vOut4 ([VisageChild])
{-# 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 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap Map Identifier Attributes
_lhsIsynMap) -> ( 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 VisageChild
_hdIvchild) = T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
_hdX2 (Map Identifier Attributes
-> VisageRuleMap -> Map Identifier Attributes -> T_Child_vIn1
T_Child_vIn1 Map Identifier Attributes
_hdOinhMap VisageRuleMap
_hdOrulemap Map Identifier Attributes
_hdOsynMap)
(T_Children_vOut4 [VisageChild]
_tlIvchildren) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_tlX5 (Map Identifier Attributes
-> VisageRuleMap -> Map Identifier Attributes -> T_Children_vIn4
T_Children_vIn4 Map Identifier Attributes
_tlOinhMap VisageRuleMap
_tlOrulemap Map Identifier Attributes
_tlOsynMap)
_lhsOvchildren :: [VisageChild]
_lhsOvchildren :: [VisageChild]
_lhsOvchildren = VisageChild -> [VisageChild] -> [VisageChild]
rule4 VisageChild
_hdIvchild [VisageChild]
_tlIvchildren
_hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule5 Map Identifier Attributes
_lhsIinhMap
_hdOrulemap :: VisageRuleMap
_hdOrulemap = VisageRuleMap -> VisageRuleMap
rule6 VisageRuleMap
_lhsIrulemap
_hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule7 Map Identifier Attributes
_lhsIsynMap
_tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule8 Map Identifier Attributes
_lhsIinhMap
_tlOrulemap :: VisageRuleMap
_tlOrulemap = VisageRuleMap -> VisageRuleMap
rule9 VisageRuleMap
_lhsIrulemap
_tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule10 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Children_vOut4
__result_ = [VisageChild] -> T_Children_vOut4
T_Children_vOut4 [VisageChild]
_lhsOvchildren
in T_Children_vOut4
__result_ )
in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
{-# INLINE rule4 #-}
{-# LINE 117 "src-ag/TfmToVisage.ag" #-}
rule4 = \ ((_hdIvchild) :: VisageChild) ((_tlIvchildren) :: [VisageChild]) ->
{-# LINE 117 "src-ag/TfmToVisage.ag" #-}
_hdIvchild : _tlIvchildren
{-# LINE 227 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule5 #-}
rule5 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule6 #-}
rule6 = \ ((_lhsIrulemap) :: VisageRuleMap) ->
_lhsIrulemap
{-# INLINE rule7 #-}
rule7 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
{-# INLINE rule8 #-}
rule8 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule9 #-}
rule9 = \ ((_lhsIrulemap) :: VisageRuleMap) ->
_lhsIrulemap
{-# INLINE rule10 #-}
rule10 = \ ((_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 (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 Map Identifier Attributes
_lhsIinhMap VisageRuleMap
_lhsIrulemap Map Identifier Attributes
_lhsIsynMap) -> ( let
_lhsOvchildren :: [VisageChild]
_lhsOvchildren :: [VisageChild]
_lhsOvchildren = () -> [VisageChild]
forall a. () -> [a]
rule11 ()
__result_ :: T_Children_vOut4
__result_ = [VisageChild] -> T_Children_vOut4
T_Children_vOut4 [VisageChild]
_lhsOvchildren
in T_Children_vOut4
__result_ )
in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
{-# INLINE rule11 #-}
{-# LINE 118 "src-ag/TfmToVisage.ag" #-}
rule11 = \ (_ :: ()) ->
{-# LINE 118 "src-ag/TfmToVisage.ag" #-}
[]
{-# LINE 263 "src-generated/TfmToVisage.hs" #-}
data Inh_Expression = Inh_Expression { }
data Syn_Expression = Syn_Expression { Syn_Expression -> Expression
self_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
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 Expression
_lhsOself) <- 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 (Expression -> Syn_Expression
Syn_Expression Expression
_lhsOself)
)
{-# 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 (Expression)
{-# 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
_self :: Expression
_self = Pos -> [HsToken] -> Expression
rule12 Pos
arg_pos_ [HsToken]
arg_tks_
_lhsOself :: Expression
_lhsOself :: Expression
_lhsOself = Expression -> Expression
forall p. p -> p
rule13 Expression
_self
__result_ :: T_Expression_vOut7
__result_ = Expression -> T_Expression_vOut7
T_Expression_vOut7 Expression
_lhsOself
in T_Expression_vOut7
__result_ )
in T_Expression_v7 -> T_Expression_s8
C_Expression_s8 T_Expression_v7
v7
{-# INLINE rule12 #-}
rule12 :: Pos -> [HsToken] -> Expression
rule12 = \ Pos
pos_ [HsToken]
tks_ ->
Pos -> [HsToken] -> Expression
Expression Pos
pos_ [HsToken]
tks_
{-# INLINE rule13 #-}
rule13 :: p -> p
rule13 = \ p
_self ->
p
_self
data Inh_Grammar = Inh_Grammar { }
data Syn_Grammar = Syn_Grammar { Syn_Grammar -> VisageGrammar
visage_Syn_Grammar :: (VisageGrammar) }
{-# 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 VisageGrammar
_lhsOvisage) <- 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 (VisageGrammar -> Syn_Grammar
Syn_Grammar VisageGrammar
_lhsOvisage)
)
{-# 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_
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 (VisageGrammar)
{-# 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
_ UseMap
_ Derivings
_ Set Identifier
_ T_Nonterminals
arg_nonts_ 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)))
_ = 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 Map Identifier Attributes
_nontsIinhMap' Map Identifier Attributes
_nontsIsynMap' [VisageNonterminal]
_nontsIvnonts) = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_nontsX17 (Map Identifier Attributes
-> Map Identifier Attributes -> T_Nonterminals_vIn16
T_Nonterminals_vIn16 Map Identifier Attributes
_nontsOinhMap Map Identifier Attributes
_nontsOsynMap)
_nontsOinhMap :: Map Identifier Attributes
_nontsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule14 Map Identifier Attributes
_nontsIinhMap'
_nontsOsynMap :: Map Identifier Attributes
_nontsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule15 Map Identifier Attributes
_nontsIsynMap'
_lhsOvisage :: VisageGrammar
_lhsOvisage :: VisageGrammar
_lhsOvisage = [VisageNonterminal] -> VisageGrammar
rule16 [VisageNonterminal]
_nontsIvnonts
__result_ :: T_Grammar_vOut10
__result_ = VisageGrammar -> T_Grammar_vOut10
T_Grammar_vOut10 VisageGrammar
_lhsOvisage
in T_Grammar_vOut10
__result_ )
in T_Grammar_v10 -> T_Grammar_s11
C_Grammar_s11 T_Grammar_v10
v10
{-# INLINE rule14 #-}
{-# LINE 15 "src-ag/DistChildAttr.ag" #-}
rule14 = \ ((_nontsIinhMap') :: Map Identifier Attributes) ->
{-# LINE 15 "src-ag/DistChildAttr.ag" #-}
_nontsIinhMap'
{-# LINE 366 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule15 #-}
{-# LINE 16 "src-ag/DistChildAttr.ag" #-}
rule15 = \ ((_nontsIsynMap') :: Map Identifier Attributes) ->
{-# LINE 16 "src-ag/DistChildAttr.ag" #-}
_nontsIsynMap'
{-# LINE 372 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule16 #-}
{-# LINE 90 "src-ag/TfmToVisage.ag" #-}
rule16 = \ ((_nontsIvnonts) :: [VisageNonterminal]) ->
{-# LINE 90 "src-ag/TfmToVisage.ag" #-}
VGrammar _nontsIvnonts
{-# LINE 378 "src-generated/TfmToVisage.hs" #-}
data Inh_Nonterminal = Inh_Nonterminal { Inh_Nonterminal -> Map Identifier Attributes
inhMap_Inh_Nonterminal :: (Map Identifier Attributes), Inh_Nonterminal -> Map Identifier Attributes
synMap_Inh_Nonterminal :: (Map Identifier Attributes) }
data Syn_Nonterminal = Syn_Nonterminal { Syn_Nonterminal -> Map Identifier Attributes
inhMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> Map Identifier Attributes
synMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> VisageNonterminal
vnont_Syn_Nonterminal :: (VisageNonterminal) }
{-# 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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) =
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 = Map Identifier Attributes
-> Map Identifier Attributes -> T_Nonterminal_vIn13
T_Nonterminal_vIn13 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap
(T_Nonterminal_vOut13 Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' VisageNonterminal
_lhsOvnont) <- 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 (Map Identifier Attributes
-> Map Identifier Attributes
-> VisageNonterminal
-> Syn_Nonterminal
Syn_Nonterminal Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' VisageNonterminal
_lhsOvnont)
)
{-# 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_ )
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 (Map Identifier Attributes) (Map Identifier Attributes)
data T_Nonterminal_vOut13 = T_Nonterminal_vOut13 (Map Identifier Attributes) (Map Identifier Attributes) (VisageNonterminal)
{-# 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]
_ Attributes
arg_inh_ Attributes
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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) -> ( 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 [VisageProduction]
_prodsIvprods) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_prodsX29 (Map Identifier Attributes
-> Map Identifier Attributes -> T_Productions_vIn28
T_Productions_vIn28 Map Identifier Attributes
_prodsOinhMap Map Identifier Attributes
_prodsOsynMap)
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = Attributes -> Identifier -> Map Identifier Attributes
forall a k. a -> k -> Map k a
rule17 Attributes
arg_inh_ Identifier
arg_nt_
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = Identifier -> Attributes -> Map Identifier Attributes
forall k a. k -> a -> Map k a
rule18 Identifier
arg_nt_ Attributes
arg_syn_
_lhsOvnont :: VisageNonterminal
_lhsOvnont :: VisageNonterminal
_lhsOvnont = [VisageProduction]
-> Attributes -> Identifier -> Attributes -> VisageNonterminal
rule19 [VisageProduction]
_prodsIvprods Attributes
arg_inh_ Identifier
arg_nt_ Attributes
arg_syn_
_prodsOinhMap :: Map Identifier Attributes
_prodsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule20 Map Identifier Attributes
_lhsIinhMap
_prodsOsynMap :: Map Identifier Attributes
_prodsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule21 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Nonterminal_vOut13
__result_ = Map Identifier Attributes
-> Map Identifier Attributes
-> VisageNonterminal
-> T_Nonterminal_vOut13
T_Nonterminal_vOut13 Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' VisageNonterminal
_lhsOvnont
in T_Nonterminal_vOut13
__result_ )
in T_Nonterminal_v13 -> T_Nonterminal_s14
C_Nonterminal_s14 T_Nonterminal_v13
v13
{-# INLINE rule17 #-}
{-# LINE 7 "src-ag/DistChildAttr.ag" #-}
rule17 = \ inh_ nt_ ->
{-# LINE 7 "src-ag/DistChildAttr.ag" #-}
Map.singleton nt_ inh_
{-# LINE 435 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule18 #-}
{-# LINE 8 "src-ag/DistChildAttr.ag" #-}
rule18 = \ nt_ syn_ ->
{-# LINE 8 "src-ag/DistChildAttr.ag" #-}
Map.singleton nt_ syn_
{-# LINE 441 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule19 #-}
{-# LINE 100 "src-ag/TfmToVisage.ag" #-}
rule19 = \ ((_prodsIvprods) :: [VisageProduction]) inh_ nt_ syn_ ->
{-# LINE 100 "src-ag/TfmToVisage.ag" #-}
VNonterminal nt_ inh_ syn_ _prodsIvprods
{-# LINE 447 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule20 #-}
rule20 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule21 #-}
rule21 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
data Inh_Nonterminals = Inh_Nonterminals { Inh_Nonterminals -> Map Identifier Attributes
inhMap_Inh_Nonterminals :: (Map Identifier Attributes), Inh_Nonterminals -> Map Identifier Attributes
synMap_Inh_Nonterminals :: (Map Identifier Attributes) }
data Syn_Nonterminals = Syn_Nonterminals { Syn_Nonterminals -> Map Identifier Attributes
inhMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> Map Identifier Attributes
synMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> [VisageNonterminal]
vnonts_Syn_Nonterminals :: ([VisageNonterminal]) }
{-# 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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) =
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 = Map Identifier Attributes
-> Map Identifier Attributes -> T_Nonterminals_vIn16
T_Nonterminals_vIn16 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap
(T_Nonterminals_vOut16 Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' [VisageNonterminal]
_lhsOvnonts) <- 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 (Map Identifier Attributes
-> Map Identifier Attributes
-> [VisageNonterminal]
-> Syn_Nonterminals
Syn_Nonterminals Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' [VisageNonterminal]
_lhsOvnonts)
)
{-# 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 (Map Identifier Attributes) (Map Identifier Attributes)
data T_Nonterminals_vOut16 = T_Nonterminals_vOut16 (Map Identifier Attributes) (Map Identifier Attributes) ([VisageNonterminal])
{-# 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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) -> ( 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 Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
_hdIsynMap' VisageNonterminal
_hdIvnont) = T_Nonterminal_s14 -> T_Nonterminal_v13
inv_Nonterminal_s14 T_Nonterminal_s14
_hdX14 (Map Identifier Attributes
-> Map Identifier Attributes -> T_Nonterminal_vIn13
T_Nonterminal_vIn13 Map Identifier Attributes
_hdOinhMap Map Identifier Attributes
_hdOsynMap)
(T_Nonterminals_vOut16 Map Identifier Attributes
_tlIinhMap' Map Identifier Attributes
_tlIsynMap' [VisageNonterminal]
_tlIvnonts) = T_Nonterminals_s17 -> T_Nonterminals_v16
inv_Nonterminals_s17 T_Nonterminals_s17
_tlX17 (Map Identifier Attributes
-> Map Identifier Attributes -> T_Nonterminals_vIn16
T_Nonterminals_vIn16 Map Identifier Attributes
_tlOinhMap Map Identifier Attributes
_tlOsynMap)
_lhsOvnonts :: [VisageNonterminal]
_lhsOvnonts :: [VisageNonterminal]
_lhsOvnonts = VisageNonterminal -> [VisageNonterminal] -> [VisageNonterminal]
rule22 VisageNonterminal
_hdIvnont [VisageNonterminal]
_tlIvnonts
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule23 Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
_tlIinhMap'
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule24 Map Identifier Attributes
_hdIsynMap' Map Identifier Attributes
_tlIsynMap'
_hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule25 Map Identifier Attributes
_lhsIinhMap
_hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule26 Map Identifier Attributes
_lhsIsynMap
_tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule27 Map Identifier Attributes
_lhsIinhMap
_tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule28 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Nonterminals_vOut16
__result_ = Map Identifier Attributes
-> Map Identifier Attributes
-> [VisageNonterminal]
-> T_Nonterminals_vOut16
T_Nonterminals_vOut16 Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' [VisageNonterminal]
_lhsOvnonts
in T_Nonterminals_vOut16
__result_ )
in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
{-# INLINE rule22 #-}
{-# LINE 94 "src-ag/TfmToVisage.ag" #-}
rule22 = \ ((_hdIvnont) :: VisageNonterminal) ((_tlIvnonts) :: [VisageNonterminal]) ->
{-# LINE 94 "src-ag/TfmToVisage.ag" #-}
_hdIvnont : _tlIvnonts
{-# LINE 514 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule23 #-}
rule23 = \ ((_hdIinhMap') :: Map Identifier Attributes) ((_tlIinhMap') :: Map Identifier Attributes) ->
_hdIinhMap' `Map.union` _tlIinhMap'
{-# INLINE rule24 #-}
rule24 = \ ((_hdIsynMap') :: Map Identifier Attributes) ((_tlIsynMap') :: Map Identifier Attributes) ->
_hdIsynMap' `Map.union` _tlIsynMap'
{-# INLINE rule25 #-}
rule25 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule26 #-}
rule26 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
{-# INLINE rule27 #-}
rule27 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule28 #-}
rule28 = \ ((_lhsIsynMap) :: 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 (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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) -> ( let
_lhsOvnonts :: [VisageNonterminal]
_lhsOvnonts :: [VisageNonterminal]
_lhsOvnonts = () -> [VisageNonterminal]
forall a. () -> [a]
rule29 ()
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule30 ()
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule31 ()
__result_ :: T_Nonterminals_vOut16
__result_ = Map Identifier Attributes
-> Map Identifier Attributes
-> [VisageNonterminal]
-> T_Nonterminals_vOut16
T_Nonterminals_vOut16 Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOsynMap' [VisageNonterminal]
_lhsOvnonts
in T_Nonterminals_vOut16
__result_ )
in T_Nonterminals_v16 -> T_Nonterminals_s17
C_Nonterminals_s17 T_Nonterminals_v16
v16
{-# INLINE rule29 #-}
{-# LINE 96 "src-ag/TfmToVisage.ag" #-}
rule29 = \ (_ :: ()) ->
{-# LINE 96 "src-ag/TfmToVisage.ag" #-}
[]
{-# LINE 554 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule30 #-}
rule30 = \ (_ :: ()) ->
Map.empty
{-# INLINE rule31 #-}
rule31 = \ (_ :: ()) ->
Map.empty
data Inh_Pattern = Inh_Pattern { }
data Syn_Pattern = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> [(Identifier, Identifier)]
fieldattrs_Syn_Pattern :: ( [(Identifier,Identifier)] ), Syn_Pattern -> Pattern
self_Syn_Pattern :: (Pattern), Syn_Pattern -> VisagePattern
vpat_Syn_Pattern :: (VisagePattern) }
{-# 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 [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat) <- 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
-> [(Identifier, Identifier)]
-> Pattern
-> VisagePattern
-> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat)
)
{-# 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_
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) ( [(Identifier,Identifier)] ) (Pattern) (VisagePattern)
{-# 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 (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 [(Identifier, Identifier)]
_patsIfieldattrs Patterns
_patsIself [VisagePattern]
_patsIvpats) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (T_Patterns_vIn22
T_Patterns_vIn22 )
_lhsOvpat :: VisagePattern
_lhsOvpat :: VisagePattern
_lhsOvpat = [VisagePattern] -> Identifier -> VisagePattern
rule32 [VisagePattern]
_patsIvpats Identifier
arg_name_
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule33 [(Identifier, Identifier)]
_patsIfieldattrs
_copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule34 Patterns
_patsIcopy Identifier
arg_name_
_self :: Pattern
_self = Patterns -> Identifier -> Pattern
rule35 Patterns
_patsIself Identifier
arg_name_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule36 Pattern
_copy
_lhsOself :: Pattern
_lhsOself :: Pattern
_lhsOself = Pattern -> Pattern
forall p. p -> p
rule37 Pattern
_self
__result_ :: T_Pattern_vOut19
__result_ = Pattern
-> [(Identifier, Identifier)]
-> Pattern
-> VisagePattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule32 #-}
{-# LINE 136 "src-ag/TfmToVisage.ag" #-}
rule32 = \ ((_patsIvpats) :: [VisagePattern]) name_ ->
{-# LINE 136 "src-ag/TfmToVisage.ag" #-}
VConstr name_ _patsIvpats
{-# LINE 623 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule33 #-}
rule33 = \ ((_patsIfieldattrs) :: [(Identifier,Identifier)] ) ->
_patsIfieldattrs
{-# INLINE rule34 #-}
rule34 = \ ((_patsIcopy) :: Patterns) name_ ->
Constr name_ _patsIcopy
{-# INLINE rule35 #-}
rule35 = \ ((_patsIself) :: Patterns) name_ ->
Constr name_ _patsIself
{-# INLINE rule36 #-}
rule36 = \ _copy ->
_copy
{-# INLINE rule37 #-}
rule37 = \ _self ->
_self
{-# 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 [(Identifier, Identifier)]
_patsIfieldattrs Patterns
_patsIself [VisagePattern]
_patsIvpats) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_patsX23 (T_Patterns_vIn22
T_Patterns_vIn22 )
_lhsOvpat :: VisagePattern
_lhsOvpat :: VisagePattern
_lhsOvpat = [VisagePattern] -> Pos -> VisagePattern
rule38 [VisagePattern]
_patsIvpats Pos
arg_pos_
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule39 [(Identifier, Identifier)]
_patsIfieldattrs
_copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule40 Patterns
_patsIcopy Pos
arg_pos_
_self :: Pattern
_self = Patterns -> Pos -> Pattern
rule41 Patterns
_patsIself Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule42 Pattern
_copy
_lhsOself :: Pattern
_lhsOself :: Pattern
_lhsOself = Pattern -> Pattern
forall p. p -> p
rule43 Pattern
_self
__result_ :: T_Pattern_vOut19
__result_ = Pattern
-> [(Identifier, Identifier)]
-> Pattern
-> VisagePattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule38 #-}
{-# LINE 137 "src-ag/TfmToVisage.ag" #-}
rule38 = \ ((_patsIvpats) :: [VisagePattern]) pos_ ->
{-# LINE 137 "src-ag/TfmToVisage.ag" #-}
VProduct pos_ _patsIvpats
{-# LINE 666 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule39 #-}
rule39 = \ ((_patsIfieldattrs) :: [(Identifier,Identifier)] ) ->
_patsIfieldattrs
{-# INLINE rule40 #-}
rule40 = \ ((_patsIcopy) :: Patterns) pos_ ->
Product pos_ _patsIcopy
{-# INLINE rule41 #-}
rule41 = \ ((_patsIself) :: Patterns) pos_ ->
Product pos_ _patsIself
{-# INLINE rule42 #-}
rule42 = \ _copy ->
_copy
{-# INLINE rule43 #-}
rule43 = \ _self ->
_self
{-# 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 (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 [(Identifier, Identifier)]
_patIfieldattrs Pattern
_patIself VisagePattern
_patIvpat) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
_lhsOvpat :: VisagePattern
_lhsOvpat :: VisagePattern
_lhsOvpat = VisagePattern
-> Pattern -> Identifier -> Identifier -> VisagePattern
rule44 VisagePattern
_patIvpat Pattern
_self Identifier
arg_attr_ Identifier
arg_field_
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = Identifier -> Identifier -> [(Identifier, Identifier)]
forall b a. b -> a -> [(a, b)]
rule45 Identifier
arg_attr_ Identifier
arg_field_
_copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule46 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
_self :: Pattern
_self = Pattern -> Identifier -> Identifier -> Pattern
rule47 Pattern
_patIself Identifier
arg_attr_ Identifier
arg_field_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule48 Pattern
_copy
_lhsOself :: Pattern
_lhsOself :: Pattern
_lhsOself = Pattern -> Pattern
forall p. p -> p
rule49 Pattern
_self
__result_ :: T_Pattern_vOut19
__result_ = Pattern
-> [(Identifier, Identifier)]
-> Pattern
-> VisagePattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule44 #-}
{-# LINE 138 "src-ag/TfmToVisage.ag" #-}
rule44 = \ ((_patIvpat) :: VisagePattern) _self attr_ field_ ->
{-# LINE 138 "src-ag/TfmToVisage.ag" #-}
if (isVar _self)
then VVar field_ attr_
else VAlias field_ attr_ _patIvpat
{-# LINE 711 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule45 #-}
{-# LINE 147 "src-ag/TfmToVisage.ag" #-}
rule45 = \ attr_ field_ ->
{-# LINE 147 "src-ag/TfmToVisage.ag" #-}
[(field_, attr_)]
{-# LINE 717 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule46 #-}
rule46 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIcopy
{-# INLINE rule47 #-}
rule47 = \ ((_patIself) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIself
{-# INLINE rule48 #-}
rule48 = \ _copy ->
_copy
{-# INLINE rule49 #-}
rule49 = \ _self ->
_self
{-# 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 [(Identifier, Identifier)]
_patIfieldattrs Pattern
_patIself VisagePattern
_patIvpat) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule50 [(Identifier, Identifier)]
_patIfieldattrs
_copy :: Pattern
_copy = Pattern -> Pattern
rule51 Pattern
_patIcopy
_self :: Pattern
_self = Pattern -> Pattern
rule52 Pattern
_patIself
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule53 Pattern
_copy
_lhsOself :: Pattern
_lhsOself :: Pattern
_lhsOself = Pattern -> Pattern
forall p. p -> p
rule54 Pattern
_self
_lhsOvpat :: VisagePattern
_lhsOvpat :: VisagePattern
_lhsOvpat = VisagePattern -> VisagePattern
rule55 VisagePattern
_patIvpat
__result_ :: T_Pattern_vOut19
__result_ = Pattern
-> [(Identifier, Identifier)]
-> Pattern
-> VisagePattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule50 #-}
rule50 :: [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule50 = \ (([(Identifier, Identifier)]
_patIfieldattrs) :: [(Identifier,Identifier)] ) ->
[(Identifier, Identifier)]
_patIfieldattrs
{-# INLINE rule51 #-}
rule51 :: Pattern -> Pattern
rule51 = \ ((Pattern
_patIcopy) :: Pattern) ->
Pattern -> Pattern
Irrefutable Pattern
_patIcopy
{-# INLINE rule52 #-}
rule52 :: Pattern -> Pattern
rule52 = \ ((Pattern
_patIself) :: Pattern) ->
Pattern -> Pattern
Irrefutable Pattern
_patIself
{-# INLINE rule53 #-}
rule53 :: p -> p
rule53 = \ p
_copy ->
p
_copy
{-# INLINE rule54 #-}
rule54 :: p -> p
rule54 = \ p
_self ->
p
_self
{-# INLINE rule55 #-}
rule55 :: VisagePattern -> VisagePattern
rule55 = \ ((VisagePattern
_patIvpat) :: VisagePattern) ->
VisagePattern
_patIvpat
{-# 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
_lhsOvpat :: VisagePattern
_lhsOvpat :: VisagePattern
_lhsOvpat = Pos -> VisagePattern
rule56 Pos
arg_pos_
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = () -> [(Identifier, Identifier)]
forall a. () -> [a]
rule57 ()
_copy :: Pattern
_copy = Pos -> Pattern
rule58 Pos
arg_pos_
_self :: Pattern
_self = Pos -> Pattern
rule59 Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall p. p -> p
rule60 Pattern
_copy
_lhsOself :: Pattern
_lhsOself :: Pattern
_lhsOself = Pattern -> Pattern
forall p. p -> p
rule61 Pattern
_self
__result_ :: T_Pattern_vOut19
__result_ = Pattern
-> [(Identifier, Identifier)]
-> Pattern
-> VisagePattern
-> T_Pattern_vOut19
T_Pattern_vOut19 Pattern
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Pattern
_lhsOself VisagePattern
_lhsOvpat
in T_Pattern_vOut19
__result_ )
in T_Pattern_v19 -> T_Pattern_s20
C_Pattern_s20 T_Pattern_v19
v19
{-# INLINE rule56 #-}
{-# LINE 141 "src-ag/TfmToVisage.ag" #-}
rule56 = \ pos_ ->
{-# LINE 141 "src-ag/TfmToVisage.ag" #-}
VUnderscore pos_
{-# LINE 795 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule57 #-}
rule57 = \ (_ :: ()) ->
[]
{-# INLINE rule58 #-}
rule58 = \ pos_ ->
Underscore pos_
{-# INLINE rule59 #-}
rule59 = \ pos_ ->
Underscore pos_
{-# INLINE rule60 #-}
rule60 = \ _copy ->
_copy
{-# INLINE rule61 #-}
rule61 = \ _self ->
_self
data Inh_Patterns = Inh_Patterns { }
data Syn_Patterns = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> [(Identifier, Identifier)]
fieldattrs_Syn_Patterns :: ( [(Identifier,Identifier)] ), Syn_Patterns -> Patterns
self_Syn_Patterns :: (Patterns), Syn_Patterns -> [VisagePattern]
vpats_Syn_Patterns :: ([VisagePattern]) }
{-# 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 [(Identifier, Identifier)]
_lhsOfieldattrs Patterns
_lhsOself [VisagePattern]
_lhsOvpats) <- 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
-> [(Identifier, Identifier)]
-> Patterns
-> [VisagePattern]
-> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Patterns
_lhsOself [VisagePattern]
_lhsOvpats)
)
{-# 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) ( [(Identifier,Identifier)] ) (Patterns) ([VisagePattern])
{-# 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 [(Identifier, Identifier)]
_hdIfieldattrs Pattern
_hdIself VisagePattern
_hdIvpat) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_hdX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
(T_Patterns_vOut22 Patterns
_tlIcopy [(Identifier, Identifier)]
_tlIfieldattrs Patterns
_tlIself [VisagePattern]
_tlIvpats) = T_Patterns_s23 -> T_Patterns_v22
inv_Patterns_s23 T_Patterns_s23
_tlX23 (T_Patterns_vIn22
T_Patterns_vIn22 )
_lhsOvpats :: [VisagePattern]
_lhsOvpats :: [VisagePattern]
_lhsOvpats = VisagePattern -> [VisagePattern] -> [VisagePattern]
rule62 VisagePattern
_hdIvpat [VisagePattern]
_tlIvpats
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = [(Identifier, Identifier)]
-> [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule63 [(Identifier, Identifier)]
_hdIfieldattrs [(Identifier, Identifier)]
_tlIfieldattrs
_copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule64 Pattern
_hdIcopy Patterns
_tlIcopy
_self :: Patterns
_self = Pattern -> Patterns -> Patterns
rule65 Pattern
_hdIself Patterns
_tlIself
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall p. p -> p
rule66 Patterns
_copy
_lhsOself :: Patterns
_lhsOself :: Patterns
_lhsOself = Patterns -> Patterns
forall p. p -> p
rule67 Patterns
_self
__result_ :: T_Patterns_vOut22
__result_ = Patterns
-> [(Identifier, Identifier)]
-> Patterns
-> [VisagePattern]
-> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Patterns
_lhsOself [VisagePattern]
_lhsOvpats
in T_Patterns_vOut22
__result_ )
in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
{-# INLINE rule62 #-}
{-# LINE 132 "src-ag/TfmToVisage.ag" #-}
rule62 = \ ((_hdIvpat) :: VisagePattern) ((_tlIvpats) :: [VisagePattern]) ->
{-# LINE 132 "src-ag/TfmToVisage.ag" #-}
_hdIvpat : _tlIvpats
{-# LINE 871 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule63 #-}
rule63 = \ ((_hdIfieldattrs) :: [(Identifier,Identifier)] ) ((_tlIfieldattrs) :: [(Identifier,Identifier)] ) ->
_hdIfieldattrs ++ _tlIfieldattrs
{-# INLINE rule64 #-}
rule64 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->
(:) _hdIcopy _tlIcopy
{-# INLINE rule65 #-}
rule65 = \ ((_hdIself) :: Pattern) ((_tlIself) :: Patterns) ->
(:) _hdIself _tlIself
{-# INLINE rule66 #-}
rule66 = \ _copy ->
_copy
{-# INLINE rule67 #-}
rule67 = \ _self ->
_self
{-# 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
_lhsOvpats :: [VisagePattern]
_lhsOvpats :: [VisagePattern]
_lhsOvpats = () -> [VisagePattern]
forall a. () -> [a]
rule68 ()
_lhsOfieldattrs :: [(Identifier,Identifier)]
_lhsOfieldattrs :: [(Identifier, Identifier)]
_lhsOfieldattrs = () -> [(Identifier, Identifier)]
forall a. () -> [a]
rule69 ()
_copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule70 ()
_self :: [a]
_self = () -> [a]
forall a. () -> [a]
rule71 ()
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall p. p -> p
rule72 Patterns
forall a. [a]
_copy
_lhsOself :: Patterns
_lhsOself :: Patterns
_lhsOself = Patterns -> Patterns
forall p. p -> p
rule73 Patterns
forall a. [a]
_self
__result_ :: T_Patterns_vOut22
__result_ = Patterns
-> [(Identifier, Identifier)]
-> Patterns
-> [VisagePattern]
-> T_Patterns_vOut22
T_Patterns_vOut22 Patterns
_lhsOcopy [(Identifier, Identifier)]
_lhsOfieldattrs Patterns
_lhsOself [VisagePattern]
_lhsOvpats
in T_Patterns_vOut22
__result_ )
in T_Patterns_v22 -> T_Patterns_s23
C_Patterns_s23 T_Patterns_v22
v22
{-# INLINE rule68 #-}
{-# LINE 133 "src-ag/TfmToVisage.ag" #-}
rule68 = \ (_ :: ()) ->
{-# LINE 133 "src-ag/TfmToVisage.ag" #-}
[]
{-# LINE 912 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule69 #-}
rule69 = \ (_ :: ()) ->
[]
{-# INLINE rule70 #-}
rule70 = \ (_ :: ()) ->
[]
{-# INLINE rule71 #-}
rule71 = \ (_ :: ()) ->
[]
{-# INLINE rule72 #-}
rule72 = \ _copy ->
_copy
{-# INLINE rule73 #-}
rule73 = \ _self ->
_self
data Inh_Production = Inh_Production { Inh_Production -> Map Identifier Attributes
inhMap_Inh_Production :: (Map Identifier Attributes), Inh_Production -> Map Identifier Attributes
synMap_Inh_Production :: (Map Identifier Attributes) }
data Syn_Production = Syn_Production { Syn_Production -> VisageProduction
vprod_Syn_Production :: (VisageProduction) }
{-# 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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) =
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 = Map Identifier Attributes
-> Map Identifier Attributes -> T_Production_vIn25
T_Production_vIn25 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap
(T_Production_vOut25 VisageProduction
_lhsOvprod) <- 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 (VisageProduction -> Syn_Production
Syn_Production VisageProduction
_lhsOvprod)
)
{-# 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_
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 (Map Identifier Attributes) (Map Identifier Attributes)
data T_Production_vOut25 = T_Production_vOut25 (VisageProduction)
{-# 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]
_ [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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) -> ( 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 [VisageChild]
_childrenIvchildren) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_childrenX5 (Map Identifier Attributes
-> VisageRuleMap -> Map Identifier Attributes -> T_Children_vIn4
T_Children_vIn4 Map Identifier Attributes
_childrenOinhMap VisageRuleMap
_childrenOrulemap Map Identifier Attributes
_childrenOsynMap)
(T_Rules_vOut34 [VisageRule]
_rulesIvrules) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_rulesX35 (T_Rules_vIn34
T_Rules_vIn34 )
(T_TypeSigs_vOut40
T_TypeSigs_vOut40 ) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_typeSigsX41 (T_TypeSigs_vIn40
T_TypeSigs_vIn40 )
_lhsOvprod :: VisageProduction
_lhsOvprod :: VisageProduction
_lhsOvprod = [VisageChild]
-> [VisageRule] -> [VisageRule] -> Identifier -> VisageProduction
rule74 [VisageChild]
_childrenIvchildren [VisageRule]
_lhsrules [VisageRule]
_locrules Identifier
arg_con_
_splitVRules :: VisageRuleMap
_splitVRules = [VisageRule] -> VisageRuleMap
rule75 [VisageRule]
_rulesIvrules
_locrules :: [VisageRule]
_locrules = VisageRuleMap -> [VisageRule]
rule76 VisageRuleMap
_splitVRules
_lhsrules :: [VisageRule]
_lhsrules = VisageRuleMap -> [VisageRule]
rule77 VisageRuleMap
_splitVRules
_childrenOrulemap :: VisageRuleMap
_childrenOrulemap = VisageRuleMap -> VisageRuleMap
forall p. p -> p
rule78 VisageRuleMap
_splitVRules
_childrenOinhMap :: Map Identifier Attributes
_childrenOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule79 Map Identifier Attributes
_lhsIinhMap
_childrenOsynMap :: Map Identifier Attributes
_childrenOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule80 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Production_vOut25
__result_ = VisageProduction -> T_Production_vOut25
T_Production_vOut25 VisageProduction
_lhsOvprod
in T_Production_vOut25
__result_ )
in T_Production_v25 -> T_Production_s26
C_Production_s26 T_Production_v25
v25
{-# INLINE rule74 #-}
{-# LINE 110 "src-ag/TfmToVisage.ag" #-}
rule74 = \ ((_childrenIvchildren) :: [VisageChild]) _lhsrules _locrules con_ ->
{-# LINE 110 "src-ag/TfmToVisage.ag" #-}
VProduction con_ _childrenIvchildren _lhsrules _locrules
{-# LINE 988 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule75 #-}
{-# LINE 111 "src-ag/TfmToVisage.ag" #-}
rule75 = \ ((_rulesIvrules) :: [VisageRule]) ->
{-# LINE 111 "src-ag/TfmToVisage.ag" #-}
splitVRules _rulesIvrules
{-# LINE 994 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule76 #-}
{-# LINE 112 "src-ag/TfmToVisage.ag" #-}
rule76 = \ _splitVRules ->
{-# LINE 112 "src-ag/TfmToVisage.ag" #-}
getForField "loc" _splitVRules
{-# LINE 1000 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule77 #-}
{-# LINE 113 "src-ag/TfmToVisage.ag" #-}
rule77 = \ _splitVRules ->
{-# LINE 113 "src-ag/TfmToVisage.ag" #-}
getForField "lhs" _splitVRules
{-# LINE 1006 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule78 #-}
{-# LINE 114 "src-ag/TfmToVisage.ag" #-}
rule78 = \ _splitVRules ->
{-# LINE 114 "src-ag/TfmToVisage.ag" #-}
_splitVRules
{-# LINE 1012 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule79 #-}
rule79 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule80 #-}
rule80 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
data Inh_Productions = Inh_Productions { Inh_Productions -> Map Identifier Attributes
inhMap_Inh_Productions :: (Map Identifier Attributes), Inh_Productions -> Map Identifier Attributes
synMap_Inh_Productions :: (Map Identifier Attributes) }
data Syn_Productions = Syn_Productions { Syn_Productions -> [VisageProduction]
vprods_Syn_Productions :: ([VisageProduction]) }
{-# 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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) =
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 = Map Identifier Attributes
-> Map Identifier Attributes -> T_Productions_vIn28
T_Productions_vIn28 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap
(T_Productions_vOut28 [VisageProduction]
_lhsOvprods) <- 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 ([VisageProduction] -> Syn_Productions
Syn_Productions [VisageProduction]
_lhsOvprods)
)
{-# 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 (Map Identifier Attributes) (Map Identifier Attributes)
data T_Productions_vOut28 = T_Productions_vOut28 ([VisageProduction])
{-# 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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) -> ( 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 VisageProduction
_hdIvprod) = T_Production_s26 -> T_Production_v25
inv_Production_s26 T_Production_s26
_hdX26 (Map Identifier Attributes
-> Map Identifier Attributes -> T_Production_vIn25
T_Production_vIn25 Map Identifier Attributes
_hdOinhMap Map Identifier Attributes
_hdOsynMap)
(T_Productions_vOut28 [VisageProduction]
_tlIvprods) = T_Productions_s29 -> T_Productions_v28
inv_Productions_s29 T_Productions_s29
_tlX29 (Map Identifier Attributes
-> Map Identifier Attributes -> T_Productions_vIn28
T_Productions_vIn28 Map Identifier Attributes
_tlOinhMap Map Identifier Attributes
_tlOsynMap)
_lhsOvprods :: [VisageProduction]
_lhsOvprods :: [VisageProduction]
_lhsOvprods = VisageProduction -> [VisageProduction] -> [VisageProduction]
rule81 VisageProduction
_hdIvprod [VisageProduction]
_tlIvprods
_hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule82 Map Identifier Attributes
_lhsIinhMap
_hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule83 Map Identifier Attributes
_lhsIsynMap
_tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule84 Map Identifier Attributes
_lhsIinhMap
_tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule85 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Productions_vOut28
__result_ = [VisageProduction] -> T_Productions_vOut28
T_Productions_vOut28 [VisageProduction]
_lhsOvprods
in T_Productions_vOut28
__result_ )
in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
{-# INLINE rule81 #-}
{-# LINE 104 "src-ag/TfmToVisage.ag" #-}
rule81 = \ ((_hdIvprod) :: VisageProduction) ((_tlIvprods) :: [VisageProduction]) ->
{-# LINE 104 "src-ag/TfmToVisage.ag" #-}
_hdIvprod : _tlIvprods
{-# LINE 1075 "src-generated/TfmToVisage.hs" #-}
{-# INLINE rule82 #-}
rule82 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule83 #-}
rule83 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
{-# INLINE rule84 #-}
rule84 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule85 #-}
rule85 = \ ((_lhsIsynMap) :: 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 (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 Map Identifier Attributes
_lhsIinhMap Map Identifier Attributes
_lhsIsynMap) -> ( let
_lhsOvprods :: [VisageProduction]
_lhsOvprods :: [VisageProduction]
_lhsOvprods = () -> [VisageProduction]
forall a. () -> [a]
rule86 ()
__result_ :: T_Productions_vOut28
__result_ = [VisageProduction] -> T_Productions_vOut28
T_Productions_vOut28 [VisageProduction]
_lhsOvprods
in T_Productions_vOut28
__result_ )
in T_Productions_v28 -> T_Productions_s29
C_Productions_s29 T_Productions_v28
v28
{-# INLINE rule86 #-}
{-# LINE 106 "src-ag/TfmToVisage.ag" #-}
rule86 = \ (_ :: ()) ->
{-# LINE 106 "src-ag/TfmToVisage.ag" #-}
[]
{-# LINE 1105 "src-generated/TfmToVisage.hs" #-}
data Inh_Rule = Inh_Rule { }
data Syn_Rule = Syn_Rule { Syn_Rule -> VisageRule
vrule_Syn_Rule :: (VisageRule) }
{-# 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 VisageRule
_lhsOvrule) <- 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 (VisageRule -> Syn_Rule
Syn_Rule VisageRule
_lhsOvrule)
)
{-# 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_
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 (VisageRule)
{-# 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
_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
arg_owrt_ String
_ 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 [(Identifier, Identifier)]
_patternIfieldattrs Pattern
_patternIself VisagePattern
_patternIvpat) = T_Pattern_s20 -> T_Pattern_v19
inv_Pattern_s20 T_Pattern_s20
_patternX20 (T_Pattern_vIn19
T_Pattern_vIn19 )
(T_Expression_vOut7 Expression
_rhsIself) = T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
_rhsX8 (T_Expression_vIn7
T_Expression_vIn7 )
_lhsOvrule :: VisageRule
_lhsOvrule :: VisageRule
_lhsOvrule = [(Identifier, Identifier)]
-> VisagePattern -> Expression -> Bool -> VisageRule
rule87 [(Identifier, Identifier)]
_patternIfieldattrs VisagePattern
_patternIvpat Expression
_rhsIself Bool
arg_owrt_
__result_ :: T_Rule_vOut31
__result_ = VisageRule -> T_Rule_vOut31
T_Rule_vOut31 VisageRule
_lhsOvrule
in T_Rule_vOut31
__result_ )
in T_Rule_v31 -> T_Rule_s32
C_Rule_s32 T_Rule_v31
v31
{-# INLINE rule87 #-}
{-# LINE 129 "src-ag/TfmToVisage.ag" #-}
rule87 = \ ((_patternIfieldattrs) :: [(Identifier,Identifier)] ) ((_patternIvpat) :: VisagePattern) ((_rhsIself) :: Expression) owrt_ ->
{-# LINE 129 "src-ag/TfmToVisage.ag" #-}
VRule _patternIfieldattrs undefined _patternIvpat _rhsIself owrt_
{-# LINE 1158 "src-generated/TfmToVisage.hs" #-}
data Inh_Rules = Inh_Rules { }
data Syn_Rules = Syn_Rules { Syn_Rules -> [VisageRule]
vrules_Syn_Rules :: ([VisageRule]) }
{-# 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 [VisageRule]
_lhsOvrules) <- 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 ([VisageRule] -> Syn_Rules
Syn_Rules [VisageRule]
_lhsOvrules)
)
{-# 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 ([VisageRule])
{-# 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 VisageRule
_hdIvrule) = T_Rule_s32 -> T_Rule_v31
inv_Rule_s32 T_Rule_s32
_hdX32 (T_Rule_vIn31
T_Rule_vIn31 )
(T_Rules_vOut34 [VisageRule]
_tlIvrules) = T_Rules_s35 -> T_Rules_v34
inv_Rules_s35 T_Rules_s35
_tlX35 (T_Rules_vIn34
T_Rules_vIn34 )
_lhsOvrules :: [VisageRule]
_lhsOvrules :: [VisageRule]
_lhsOvrules = VisageRule -> [VisageRule] -> [VisageRule]
rule88 VisageRule
_hdIvrule [VisageRule]
_tlIvrules
__result_ :: T_Rules_vOut34
__result_ = [VisageRule] -> T_Rules_vOut34
T_Rules_vOut34 [VisageRule]
_lhsOvrules
in T_Rules_vOut34
__result_ )
in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
{-# INLINE rule88 #-}
{-# LINE 124 "src-ag/TfmToVisage.ag" #-}
rule88 = \ ((_hdIvrule) :: VisageRule) ((_tlIvrules) :: [VisageRule]) ->
{-# LINE 124 "src-ag/TfmToVisage.ag" #-}
_hdIvrule : _tlIvrules
{-# LINE 1211 "src-generated/TfmToVisage.hs" #-}
{-# 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
_lhsOvrules :: [VisageRule]
_lhsOvrules :: [VisageRule]
_lhsOvrules = () -> [VisageRule]
forall a. () -> [a]
rule89 ()
__result_ :: T_Rules_vOut34
__result_ = [VisageRule] -> T_Rules_vOut34
T_Rules_vOut34 [VisageRule]
_lhsOvrules
in T_Rules_vOut34
__result_ )
in T_Rules_v34 -> T_Rules_s35
C_Rules_s35 T_Rules_v34
v34
{-# INLINE rule89 #-}
{-# LINE 125 "src-ag/TfmToVisage.ag" #-}
rule89 = \ (_ :: ()) ->
{-# LINE 125 "src-ag/TfmToVisage.ag" #-}
[]
{-# LINE 1229 "src-generated/TfmToVisage.hs" #-}
data Inh_TypeSig = Inh_TypeSig { }
data Syn_TypeSig = Syn_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 ) =
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
T_TypeSig_vOut37 ) <- 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 (Syn_TypeSig
Syn_TypeSig )
)
{-# 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_
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
{-# NOINLINE sem_TypeSig_TypeSig #-}
sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig
sem_TypeSig_TypeSig :: Identifier -> Type -> T_TypeSig
sem_TypeSig_TypeSig Identifier
_ Type
_ = 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
__result_ :: T_TypeSig_vOut37
__result_ = T_TypeSig_vOut37
T_TypeSig_vOut37
in T_TypeSig_vOut37
__result_ )
in T_TypeSig_v37 -> T_TypeSig_s38
C_TypeSig_s38 T_TypeSig_v37
v37
data Inh_TypeSigs = Inh_TypeSigs { }
data Syn_TypeSigs = Syn_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 ) =
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
T_TypeSigs_vOut40 ) <- 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 (Syn_TypeSigs
Syn_TypeSigs )
)
{-# 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
{-# 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
T_TypeSig_vOut37 ) = T_TypeSig_s38 -> T_TypeSig_v37
inv_TypeSig_s38 T_TypeSig_s38
_hdX38 (T_TypeSig_vIn37
T_TypeSig_vIn37 )
(T_TypeSigs_vOut40
T_TypeSigs_vOut40 ) = T_TypeSigs_s41 -> T_TypeSigs_v40
inv_TypeSigs_s41 T_TypeSigs_s41
_tlX41 (T_TypeSigs_vIn40
T_TypeSigs_vIn40 )
__result_ :: T_TypeSigs_vOut40
__result_ = T_TypeSigs_vOut40
T_TypeSigs_vOut40
in T_TypeSigs_vOut40
__result_ )
in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40
{-# 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
__result_ :: T_TypeSigs_vOut40
__result_ = T_TypeSigs_vOut40
T_TypeSigs_vOut40
in T_TypeSigs_vOut40
__result_ )
in T_TypeSigs_v40 -> T_TypeSigs_s41
C_TypeSigs_s41 T_TypeSigs_v40
v40