{-# LANGUAGE Rank2Types, GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
module KWOrder where
{-# LINE 2 "src-ag/Patterns.ag" #-}
import UU.Scanner.Position(Pos)
import CommonTypes (ConstructorIdent,Identifier)
{-# LINE 11 "src-generated/KWOrder.hs" #-}
{-# LINE 2 "src-ag/Expression.ag" #-}
import UU.Scanner.Position(Pos)
import HsToken
{-# LINE 17 "src-generated/KWOrder.hs" #-}
{-# LINE 2 "src-ag/HsToken.ag" #-}
import CommonTypes
import UU.Scanner.Position(Pos)
{-# LINE 23 "src-generated/KWOrder.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 35 "src-generated/KWOrder.hs" #-}
{-# LINE 10 "src-ag/KWOrder.ag" #-}
import AbstractSyntax
import HsToken
import Expression
import Patterns
import Options
import PPUtil
import Pretty
import Knuth1
import KennedyWarren
import ExecutionPlan
import Data.Maybe
import Debug.Trace
import Data.Set(Set)
import Data.Map(Map)
import Data.Sequence(Seq)
import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified Data.Sequence as Seq
import Data.Monoid(mappend,mempty)
{-# LINE 58 "src-generated/KWOrder.hs" #-}
import Control.Monad.Identity (Identity)
import qualified Control.Monad.Identity
{-# LINE 125 "src-ag/KWOrder.ag" #-}
depToEdge :: Dependency -> Edge
depToEdge (Dependency a b) = (occToVertex False b, occToVertex True a)
occToVertex :: Bool -> Occurrence -> Vertex
occToVertex _ (OccRule nm) = VRule nm
occToVertex isDependency (OccAttr c a)
| c == _LOC = VAttr Syn c a
| c == _INST = VChild a
| otherwise = VAttr kind c a where
kind | isDependency && c == _LHS = Inh
| isDependency && c /= _LHS = Syn
| not isDependency && c == _LHS = Syn
| not isDependency && c /= _LHS = Inh
{-# LINE 78 "src-generated/KWOrder.hs" #-}
data Inh_Child = Inh_Child { Inh_Child -> Map Identifier [Expression]
aroundMap_Inh_Child :: (Map Identifier [Expression]), Inh_Child -> Map Identifier Attributes
inhMap_Inh_Child :: (Map Identifier Attributes), Inh_Child -> Map Identifier (Identifier, [Identifier], Expression)
mergeMap_Inh_Child :: (Map Identifier (Identifier, [Identifier], Expression)), Inh_Child -> Set Identifier
mergedChildren_Inh_Child :: (Set Identifier), Inh_Child -> Options
options_Inh_Child :: (Options), Inh_Child -> Map Identifier Attributes
synMap_Inh_Child :: (Map Identifier Attributes) }
data Syn_Child = Syn_Child { Syn_Child -> EChild
echilds_Syn_Child :: (EChild), Syn_Child -> Set (Vertex, Vertex)
edges_Syn_Child :: (Set.Set Edge), Syn_Child -> [(Identifier, Identifier)]
nontnames_Syn_Child :: ([(Identifier, Identifier)]), Syn_Child -> Set Identifier
refHoNts_Syn_Child :: (Set NontermIdent), Syn_Child -> Set Identifier
refNts_Syn_Child :: (Set NontermIdent), Syn_Child -> Set Vertex
vertices_Syn_Child :: (Set.Set Vertex) }
{-# 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 [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions 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 [Expression]
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier], Expression)
-> Set Identifier
-> Options
-> Map Identifier Attributes
-> T_Child_vIn1
T_Child_vIn1 Map Identifier [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap
(T_Child_vOut1 EChild
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices) <- 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 (EChild
-> Set (Vertex, Vertex)
-> [(Identifier, Identifier)]
-> Set Identifier
-> Set Identifier
-> Set Vertex
-> Syn_Child
Syn_Child EChild
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices)
)
{-# 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 [Expression]) (Map Identifier Attributes) (Map Identifier (Identifier, [Identifier], Expression)) (Set Identifier) (Options) (Map Identifier Attributes)
data T_Child_vOut1 = T_Child_vOut1 (EChild) (Set.Set Edge) ([(Identifier, Identifier)]) (Set NontermIdent) (Set NontermIdent) (Set.Set Vertex)
{-# NOINLINE sem_Child_Child #-}
sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child
sem_Child_Child :: Identifier -> Type -> ChildKind -> T_Child
sem_Child_Child Identifier
arg_name_ Type
arg_tp_ ChildKind
arg_kind_ = Identity T_Child_s2 -> T_Child
T_Child (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 [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) -> ( let
_refNts :: Set Identifier
_refNts = Type -> Set Identifier
rule0 Type
arg_tp_
_refHoNts :: Set Identifier
_refHoNts = Bool -> Set Identifier -> Set Identifier
rule1 Bool
_isHigherOrder Set Identifier
_refNts
_isHigherOrder :: Bool
_isHigherOrder = ChildKind -> Bool
rule2 ChildKind
arg_kind_
_hasArounds :: Bool
_hasArounds = Map Identifier [Expression] -> Identifier -> Bool
rule3 Map Identifier [Expression]
_lhsIaroundMap Identifier
arg_name_
_merges :: Maybe [Identifier]
_merges = Map Identifier (Identifier, [Identifier], Expression)
-> Identifier -> Maybe [Identifier]
rule4 Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Identifier
arg_name_
_isMerged :: Bool
_isMerged = Set Identifier -> Identifier -> Bool
rule5 Set Identifier
_lhsImergedChildren Identifier
arg_name_
_lhsOechilds :: EChild
_lhsOechilds :: EChild
_lhsOechilds = Bool
-> Bool
-> Maybe [Identifier]
-> ChildKind
-> Identifier
-> Type
-> EChild
rule6 Bool
_hasArounds Bool
_isMerged Maybe [Identifier]
_merges ChildKind
arg_kind_ Identifier
arg_name_ Type
arg_tp_
_chnt :: Identifier
_chnt = Identifier -> Type -> Identifier
rule7 Identifier
arg_name_ Type
arg_tp_
_inh :: Attributes
_inh = Identifier -> Map Identifier Attributes -> Attributes
rule8 Identifier
_chnt Map Identifier Attributes
_lhsIinhMap
_syn :: Attributes
_syn = Identifier -> Map Identifier Attributes -> Attributes
rule9 Identifier
_chnt Map Identifier Attributes
_lhsIsynMap
_vertex :: Vertex
_vertex = Identifier -> Vertex
rule10 Identifier
arg_name_
_synvertices :: [Vertex]
_synvertices = Attributes -> Identifier -> [Vertex]
forall a. Map Identifier a -> Identifier -> [Vertex]
rule11 Attributes
_syn Identifier
arg_name_
_inhvertices :: [Vertex]
_inhvertices = Attributes -> Identifier -> [Vertex]
forall a. Map Identifier a -> Identifier -> [Vertex]
rule12 Attributes
_inh Identifier
arg_name_
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = [Vertex] -> [Vertex] -> Vertex -> Type -> Set Vertex
rule13 [Vertex]
_inhvertices [Vertex]
_synvertices Vertex
_vertex Type
arg_tp_
_childIsDeforested :: Bool
_childIsDeforested = Type -> Bool
rule14 Type
arg_tp_
_higherOrderEdges :: [(Vertex, Vertex)]
_higherOrderEdges = Bool -> Options -> Vertex -> ChildKind -> [(Vertex, Vertex)]
forall a. Bool -> Options -> a -> ChildKind -> [(a, Vertex)]
rule15 Bool
_childIsDeforested Options
_lhsIoptions Vertex
_vertex ChildKind
arg_kind_
_aroundEdges :: [(Vertex, Vertex)]
_aroundEdges = Bool -> Vertex -> Identifier -> [(Vertex, Vertex)]
forall a. Bool -> a -> Identifier -> [(a, Vertex)]
rule16 Bool
_hasArounds Vertex
_vertex Identifier
arg_name_
_edgesout :: [(Vertex, Vertex)]
_edgesout = [(Vertex, Vertex)] -> [(Vertex, Vertex)]
forall a. a -> a
rule17 [(Vertex, Vertex)]
_higherOrderEdges
_edgesin :: [(Vertex, Vertex)]
_edgesin = [Vertex] -> Vertex -> [(Vertex, Vertex)]
forall a b. [a] -> b -> [(a, b)]
rule18 [Vertex]
_synvertices Vertex
_vertex
_lhsOedges :: Set.Set Edge
_lhsOedges :: Set (Vertex, Vertex)
_lhsOedges = [(Vertex, Vertex)] -> [(Vertex, Vertex)] -> Set (Vertex, Vertex)
rule19 [(Vertex, Vertex)]
_edgesin [(Vertex, Vertex)]
_edgesout
_lhsOnontnames :: [(Identifier, Identifier)]
_lhsOnontnames :: [(Identifier, Identifier)]
_lhsOnontnames = Identifier -> Type -> [(Identifier, Identifier)]
forall a. a -> Type -> [(a, Identifier)]
rule20 Identifier
arg_name_ Type
arg_tp_
_lhsOrefHoNts :: Set NontermIdent
_lhsOrefHoNts :: Set Identifier
_lhsOrefHoNts = Set Identifier -> Set Identifier
forall a. a -> a
rule21 Set Identifier
_refHoNts
_lhsOrefNts :: Set NontermIdent
_lhsOrefNts :: Set Identifier
_lhsOrefNts = Set Identifier -> Set Identifier
forall a. a -> a
rule22 Set Identifier
_refNts
__result_ :: T_Child_vOut1
__result_ = EChild
-> Set (Vertex, Vertex)
-> [(Identifier, Identifier)]
-> Set Identifier
-> Set Identifier
-> Set Vertex
-> T_Child_vOut1
T_Child_vOut1 EChild
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices
in T_Child_vOut1
__result_ )
in T_Child_v1 -> T_Child_s2
C_Child_s2 T_Child_v1
v1
{-# INLINE rule0 #-}
{-# LINE 31 "src-ag/ExecutionPlanCommon.ag" #-}
rule0 = \ tp_ ->
{-# LINE 31 "src-ag/ExecutionPlanCommon.ag" #-}
case tp_ of
NT nt _ _ -> Set.singleton nt
_ -> mempty
{-# LINE 155 "src-generated/KWOrder.hs" #-}
{-# INLINE rule1 #-}
{-# LINE 34 "src-ag/ExecutionPlanCommon.ag" #-}
rule1 = \ _isHigherOrder _refNts ->
{-# LINE 34 "src-ag/ExecutionPlanCommon.ag" #-}
if _isHigherOrder then _refNts else mempty
{-# LINE 161 "src-generated/KWOrder.hs" #-}
{-# INLINE rule2 #-}
{-# LINE 35 "src-ag/ExecutionPlanCommon.ag" #-}
rule2 = \ kind_ ->
{-# LINE 35 "src-ag/ExecutionPlanCommon.ag" #-}
case kind_ of
ChildSyntax -> False
_ -> True
{-# LINE 169 "src-generated/KWOrder.hs" #-}
{-# INLINE rule3 #-}
{-# LINE 95 "src-ag/ExecutionPlanCommon.ag" #-}
rule3 = \ ((_lhsIaroundMap) :: Map Identifier [Expression]) name_ ->
{-# LINE 95 "src-ag/ExecutionPlanCommon.ag" #-}
case Map.lookup name_ _lhsIaroundMap of
Nothing -> False
Just as -> not (null as)
{-# LINE 177 "src-generated/KWOrder.hs" #-}
{-# INLINE rule4 #-}
{-# LINE 123 "src-ag/ExecutionPlanCommon.ag" #-}
rule4 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier], Expression)) name_ ->
{-# LINE 123 "src-ag/ExecutionPlanCommon.ag" #-}
maybe Nothing (\(_,ms,_) -> Just ms) $ Map.lookup name_ _lhsImergeMap
{-# LINE 183 "src-generated/KWOrder.hs" #-}
{-# INLINE rule5 #-}
{-# LINE 124 "src-ag/ExecutionPlanCommon.ag" #-}
rule5 = \ ((_lhsImergedChildren) :: Set Identifier) name_ ->
{-# LINE 124 "src-ag/ExecutionPlanCommon.ag" #-}
name_ `Set.member` _lhsImergedChildren
{-# LINE 189 "src-generated/KWOrder.hs" #-}
{-# INLINE rule6 #-}
{-# LINE 135 "src-ag/ExecutionPlanCommon.ag" #-}
rule6 = \ _hasArounds _isMerged _merges kind_ name_ tp_ ->
{-# LINE 135 "src-ag/ExecutionPlanCommon.ag" #-}
case tp_ of
NT _ _ _ -> EChild name_ tp_ kind_ _hasArounds _merges _isMerged
_ -> ETerm name_ tp_
{-# LINE 197 "src-generated/KWOrder.hs" #-}
{-# INLINE rule7 #-}
{-# LINE 19 "src-ag/DistChildAttr.ag" #-}
rule7 = \ 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 206 "src-generated/KWOrder.hs" #-}
{-# INLINE rule8 #-}
{-# LINE 23 "src-ag/DistChildAttr.ag" #-}
rule8 = \ _chnt ((_lhsIinhMap) :: Map Identifier Attributes) ->
{-# LINE 23 "src-ag/DistChildAttr.ag" #-}
Map.findWithDefault Map.empty _chnt _lhsIinhMap
{-# LINE 212 "src-generated/KWOrder.hs" #-}
{-# INLINE rule9 #-}
{-# LINE 24 "src-ag/DistChildAttr.ag" #-}
rule9 = \ _chnt ((_lhsIsynMap) :: Map Identifier Attributes) ->
{-# LINE 24 "src-ag/DistChildAttr.ag" #-}
Map.findWithDefault Map.empty _chnt _lhsIsynMap
{-# LINE 218 "src-generated/KWOrder.hs" #-}
{-# INLINE rule10 #-}
{-# LINE 65 "src-ag/KWOrder.ag" #-}
rule10 = \ name_ ->
{-# LINE 65 "src-ag/KWOrder.ag" #-}
VChild name_
{-# LINE 224 "src-generated/KWOrder.hs" #-}
{-# INLINE rule11 #-}
{-# LINE 66 "src-ag/KWOrder.ag" #-}
rule11 = \ _syn name_ ->
{-# LINE 66 "src-ag/KWOrder.ag" #-}
map (VAttr Syn name_) . Map.keys $ _syn
{-# LINE 230 "src-generated/KWOrder.hs" #-}
{-# INLINE rule12 #-}
{-# LINE 67 "src-ag/KWOrder.ag" #-}
rule12 = \ _inh name_ ->
{-# LINE 67 "src-ag/KWOrder.ag" #-}
map (VAttr Inh name_) . Map.keys $ _inh
{-# LINE 236 "src-generated/KWOrder.hs" #-}
{-# INLINE rule13 #-}
{-# LINE 68 "src-ag/KWOrder.ag" #-}
rule13 = \ _inhvertices _synvertices _vertex tp_ ->
{-# LINE 68 "src-ag/KWOrder.ag" #-}
case tp_ of
NT _ _ _ -> Set.insert _vertex $ Set.fromList (_synvertices ++ _inhvertices )
_ -> Set.empty
{-# LINE 244 "src-generated/KWOrder.hs" #-}
{-# INLINE rule14 #-}
{-# LINE 98 "src-ag/KWOrder.ag" #-}
rule14 = \ tp_ ->
{-# LINE 98 "src-ag/KWOrder.ag" #-}
case tp_ of
NT _ _ defor -> defor
_ -> False
{-# LINE 252 "src-generated/KWOrder.hs" #-}
{-# INLINE rule15 #-}
{-# LINE 101 "src-ag/KWOrder.ag" #-}
rule15 = \ _childIsDeforested ((_lhsIoptions) :: Options) _vertex kind_ ->
{-# LINE 101 "src-ag/KWOrder.ag" #-}
case kind_ of
ChildAttr | lateHigherOrderBinding _lhsIoptions && not _childIsDeforested
-> [(_vertex , VAttr Inh _LHS idLateBindingAttr)]
_ -> []
{-# LINE 261 "src-generated/KWOrder.hs" #-}
{-# INLINE rule16 #-}
{-# LINE 105 "src-ag/KWOrder.ag" #-}
rule16 = \ _hasArounds _vertex name_ ->
{-# LINE 105 "src-ag/KWOrder.ag" #-}
if _hasArounds
then [(_vertex , VAttr Syn _LOC (Ident (getName name_ ++ "_around") (getPos name_)))]
else []
{-# LINE 269 "src-generated/KWOrder.hs" #-}
{-# INLINE rule17 #-}
{-# LINE 111 "src-ag/KWOrder.ag" #-}
rule17 = \ _higherOrderEdges ->
{-# LINE 111 "src-ag/KWOrder.ag" #-}
_higherOrderEdges
{-# LINE 275 "src-generated/KWOrder.hs" #-}
{-# INLINE rule18 #-}
{-# LINE 112 "src-ag/KWOrder.ag" #-}
rule18 = \ _synvertices _vertex ->
{-# LINE 112 "src-ag/KWOrder.ag" #-}
map (flip (,) _vertex ) _synvertices
{-# LINE 281 "src-generated/KWOrder.hs" #-}
{-# INLINE rule19 #-}
{-# LINE 113 "src-ag/KWOrder.ag" #-}
rule19 = \ _edgesin _edgesout ->
{-# LINE 113 "src-ag/KWOrder.ag" #-}
Set.fromList (_edgesout ++ _edgesin )
{-# LINE 287 "src-generated/KWOrder.hs" #-}
{-# INLINE rule20 #-}
{-# LINE 151 "src-ag/KWOrder.ag" #-}
rule20 = \ name_ tp_ ->
{-# LINE 151 "src-ag/KWOrder.ag" #-}
case tp_ of
NT nont _ _ -> [(name_, nont)]
_ -> []
{-# LINE 295 "src-generated/KWOrder.hs" #-}
{-# INLINE rule21 #-}
rule21 = \ _refHoNts ->
_refHoNts
{-# INLINE rule22 #-}
rule22 = \ _refNts ->
_refNts
data Inh_Children = Inh_Children { Inh_Children -> Map Identifier [Expression]
aroundMap_Inh_Children :: (Map Identifier [Expression]), Inh_Children -> Map Identifier Attributes
inhMap_Inh_Children :: (Map Identifier Attributes), Inh_Children
-> Map Identifier (Identifier, [Identifier], Expression)
mergeMap_Inh_Children :: (Map Identifier (Identifier, [Identifier], Expression)), Inh_Children -> Set Identifier
mergedChildren_Inh_Children :: (Set Identifier), Inh_Children -> Options
options_Inh_Children :: (Options), Inh_Children -> Map Identifier Attributes
synMap_Inh_Children :: (Map Identifier Attributes) }
data Syn_Children = Syn_Children { Syn_Children -> EChildren
echilds_Syn_Children :: (EChildren), Syn_Children -> Set (Vertex, Vertex)
edges_Syn_Children :: (Set.Set Edge), Syn_Children -> [(Identifier, Identifier)]
nontnames_Syn_Children :: ([(Identifier, Identifier)]), Syn_Children -> Set Identifier
refHoNts_Syn_Children :: (Set NontermIdent), Syn_Children -> Set Identifier
refNts_Syn_Children :: (Set NontermIdent), Syn_Children -> Set Vertex
vertices_Syn_Children :: (Set.Set Vertex) }
{-# 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 [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions 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 [Expression]
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier], Expression)
-> Set Identifier
-> Options
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 Map Identifier [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap
(T_Children_vOut4 EChildren
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices) <- 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 (EChildren
-> Set (Vertex, Vertex)
-> [(Identifier, Identifier)]
-> Set Identifier
-> Set Identifier
-> Set Vertex
-> Syn_Children
Syn_Children EChildren
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices)
)
{-# 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 [Expression]) (Map Identifier Attributes) (Map Identifier (Identifier, [Identifier], Expression)) (Set Identifier) (Options) (Map Identifier Attributes)
data T_Children_vOut4 = T_Children_vOut4 (EChildren) (Set.Set Edge) ([(Identifier, Identifier)]) (Set NontermIdent) (Set NontermIdent) (Set.Set Vertex)
{-# 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 [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions 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 EChild
_hdIechilds Set (Vertex, Vertex)
_hdIedges [(Identifier, Identifier)]
_hdInontnames Set Identifier
_hdIrefHoNts Set Identifier
_hdIrefNts Set Vertex
_hdIvertices) = T_Child_s2 -> T_Child_v1
inv_Child_s2 T_Child_s2
_hdX2 (Map Identifier [Expression]
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier], Expression)
-> Set Identifier
-> Options
-> Map Identifier Attributes
-> T_Child_vIn1
T_Child_vIn1 Map Identifier [Expression]
_hdOaroundMap Map Identifier Attributes
_hdOinhMap Map Identifier (Identifier, [Identifier], Expression)
_hdOmergeMap Set Identifier
_hdOmergedChildren Options
_hdOoptions Map Identifier Attributes
_hdOsynMap)
(T_Children_vOut4 EChildren
_tlIechilds Set (Vertex, Vertex)
_tlIedges [(Identifier, Identifier)]
_tlInontnames Set Identifier
_tlIrefHoNts Set Identifier
_tlIrefNts Set Vertex
_tlIvertices) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_tlX5 (Map Identifier [Expression]
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier], Expression)
-> Set Identifier
-> Options
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 Map Identifier [Expression]
_tlOaroundMap Map Identifier Attributes
_tlOinhMap Map Identifier (Identifier, [Identifier], Expression)
_tlOmergeMap Set Identifier
_tlOmergedChildren Options
_tlOoptions Map Identifier Attributes
_tlOsynMap)
_lhsOechilds :: EChildren
_lhsOechilds :: EChildren
_lhsOechilds = EChild -> EChildren -> EChildren
rule23 EChild
_hdIechilds EChildren
_tlIechilds
_lhsOedges :: Set.Set Edge
_lhsOedges :: Set (Vertex, Vertex)
_lhsOedges = Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
rule24 Set (Vertex, Vertex)
_hdIedges Set (Vertex, Vertex)
_tlIedges
_lhsOnontnames :: [(Identifier, Identifier)]
_lhsOnontnames :: [(Identifier, Identifier)]
_lhsOnontnames = [(Identifier, Identifier)]
-> [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule25 [(Identifier, Identifier)]
_hdInontnames [(Identifier, Identifier)]
_tlInontnames
_lhsOrefHoNts :: Set NontermIdent
_lhsOrefHoNts :: Set Identifier
_lhsOrefHoNts = Set Identifier -> Set Identifier -> Set Identifier
rule26 Set Identifier
_hdIrefHoNts Set Identifier
_tlIrefHoNts
_lhsOrefNts :: Set NontermIdent
_lhsOrefNts :: Set Identifier
_lhsOrefNts = Set Identifier -> Set Identifier -> Set Identifier
rule27 Set Identifier
_hdIrefNts Set Identifier
_tlIrefNts
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex -> Set Vertex
rule28 Set Vertex
_hdIvertices Set Vertex
_tlIvertices
_hdOaroundMap :: Map Identifier [Expression]
_hdOaroundMap = Map Identifier [Expression] -> Map Identifier [Expression]
rule29 Map Identifier [Expression]
_lhsIaroundMap
_hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule30 Map Identifier Attributes
_lhsIinhMap
_hdOmergeMap :: Map Identifier (Identifier, [Identifier], Expression)
_hdOmergeMap = Map Identifier (Identifier, [Identifier], Expression)
-> Map Identifier (Identifier, [Identifier], Expression)
rule31 Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap
_hdOmergedChildren :: Set Identifier
_hdOmergedChildren = Set Identifier -> Set Identifier
rule32 Set Identifier
_lhsImergedChildren
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule33 Options
_lhsIoptions
_hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule34 Map Identifier Attributes
_lhsIsynMap
_tlOaroundMap :: Map Identifier [Expression]
_tlOaroundMap = Map Identifier [Expression] -> Map Identifier [Expression]
rule35 Map Identifier [Expression]
_lhsIaroundMap
_tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule36 Map Identifier Attributes
_lhsIinhMap
_tlOmergeMap :: Map Identifier (Identifier, [Identifier], Expression)
_tlOmergeMap = Map Identifier (Identifier, [Identifier], Expression)
-> Map Identifier (Identifier, [Identifier], Expression)
rule37 Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap
_tlOmergedChildren :: Set Identifier
_tlOmergedChildren = Set Identifier -> Set Identifier
rule38 Set Identifier
_lhsImergedChildren
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule39 Options
_lhsIoptions
_tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule40 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Children_vOut4
__result_ = EChildren
-> Set (Vertex, Vertex)
-> [(Identifier, Identifier)]
-> Set Identifier
-> Set Identifier
-> Set Vertex
-> T_Children_vOut4
T_Children_vOut4 EChildren
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices
in T_Children_vOut4
__result_ )
in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
{-# INLINE rule23 #-}
rule23 :: EChild -> EChildren -> EChildren
rule23 = \ ((EChild
_hdIechilds) :: EChild) ((EChildren
_tlIechilds) :: EChildren) ->
EChild
_hdIechilds EChild -> EChildren -> EChildren
forall a. a -> [a] -> [a]
: EChildren
_tlIechilds
{-# INLINE rule24 #-}
rule24 :: Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
rule24 = \ ((Set (Vertex, Vertex)
_hdIedges) :: Set.Set Edge) ((Set (Vertex, Vertex)
_tlIedges) :: Set.Set Edge) ->
Set (Vertex, Vertex)
_hdIedges Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set (Vertex, Vertex)
_tlIedges
{-# INLINE rule25 #-}
rule25 :: [(Identifier, Identifier)]
-> [(Identifier, Identifier)] -> [(Identifier, Identifier)]
rule25 = \ (([(Identifier, Identifier)]
_hdInontnames) :: [(Identifier, Identifier)]) (([(Identifier, Identifier)]
_tlInontnames) :: [(Identifier, Identifier)]) ->
[(Identifier, Identifier)]
_hdInontnames [(Identifier, Identifier)]
-> [(Identifier, Identifier)] -> [(Identifier, Identifier)]
forall a. [a] -> [a] -> [a]
++ [(Identifier, Identifier)]
_tlInontnames
{-# INLINE rule26 #-}
rule26 :: Set Identifier -> Set Identifier -> Set Identifier
rule26 = \ ((Set Identifier
_hdIrefHoNts) :: Set NontermIdent) ((Set Identifier
_tlIrefHoNts) :: Set NontermIdent) ->
Set Identifier
_hdIrefHoNts Set Identifier -> Set Identifier -> Set Identifier
forall a. Monoid a => a -> a -> a
`mappend` Set Identifier
_tlIrefHoNts
{-# INLINE rule27 #-}
rule27 :: Set Identifier -> Set Identifier -> Set Identifier
rule27 = \ ((Set Identifier
_hdIrefNts) :: Set NontermIdent) ((Set Identifier
_tlIrefNts) :: Set NontermIdent) ->
Set Identifier
_hdIrefNts Set Identifier -> Set Identifier -> Set Identifier
forall a. Monoid a => a -> a -> a
`mappend` Set Identifier
_tlIrefNts
{-# INLINE rule28 #-}
rule28 :: Set Vertex -> Set Vertex -> Set Vertex
rule28 = \ ((Set Vertex
_hdIvertices) :: Set.Set Vertex) ((Set Vertex
_tlIvertices) :: Set.Set Vertex) ->
Set Vertex
_hdIvertices Set Vertex -> Set Vertex -> Set Vertex
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set Vertex
_tlIvertices
{-# INLINE rule29 #-}
rule29 :: Map Identifier [Expression] -> Map Identifier [Expression]
rule29 = \ ((Map Identifier [Expression]
_lhsIaroundMap) :: Map Identifier [Expression]) ->
Map Identifier [Expression]
_lhsIaroundMap
{-# INLINE rule30 #-}
rule30 :: Map Identifier Attributes -> Map Identifier Attributes
rule30 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIinhMap
{-# INLINE rule31 #-}
rule31 :: Map Identifier (Identifier, [Identifier], Expression)
-> Map Identifier (Identifier, [Identifier], Expression)
rule31 = \ ((Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap) :: Map Identifier (Identifier, [Identifier], Expression)) ->
Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap
{-# INLINE rule32 #-}
rule32 :: Set Identifier -> Set Identifier
rule32 = \ ((Set Identifier
_lhsImergedChildren) :: Set Identifier) ->
Set Identifier
_lhsImergedChildren
{-# INLINE rule33 #-}
rule33 :: Options -> Options
rule33 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule34 #-}
rule34 :: Map Identifier Attributes -> Map Identifier Attributes
rule34 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIsynMap
{-# INLINE rule35 #-}
rule35 :: Map Identifier [Expression] -> Map Identifier [Expression]
rule35 = \ ((Map Identifier [Expression]
_lhsIaroundMap) :: Map Identifier [Expression]) ->
Map Identifier [Expression]
_lhsIaroundMap
{-# INLINE rule36 #-}
rule36 :: Map Identifier Attributes -> Map Identifier Attributes
rule36 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIinhMap
{-# INLINE rule37 #-}
rule37 :: Map Identifier (Identifier, [Identifier], Expression)
-> Map Identifier (Identifier, [Identifier], Expression)
rule37 = \ ((Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap) :: Map Identifier (Identifier, [Identifier], Expression)) ->
Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap
{-# INLINE rule38 #-}
rule38 :: Set Identifier -> Set Identifier
rule38 = \ ((Set Identifier
_lhsImergedChildren) :: Set Identifier) ->
Set Identifier
_lhsImergedChildren
{-# INLINE rule39 #-}
rule39 :: Options -> Options
rule39 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule40 #-}
rule40 :: Map Identifier Attributes -> Map Identifier Attributes
rule40 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
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 [Expression]
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Identifier, [Identifier], Expression)
_lhsImergeMap Set Identifier
_lhsImergedChildren Options
_lhsIoptions Map Identifier Attributes
_lhsIsynMap) -> ( let
_lhsOechilds :: EChildren
_lhsOechilds :: EChildren
_lhsOechilds = () -> EChildren
forall a. () -> [a]
rule41 ()
_lhsOedges :: Set.Set Edge
_lhsOedges :: Set (Vertex, Vertex)
_lhsOedges = () -> Set (Vertex, Vertex)
forall a. () -> Set a
rule42 ()
_lhsOnontnames :: [(Identifier, Identifier)]
_lhsOnontnames :: [(Identifier, Identifier)]
_lhsOnontnames = () -> [(Identifier, Identifier)]
forall a. () -> [a]
rule43 ()
_lhsOrefHoNts :: Set NontermIdent
_lhsOrefHoNts :: Set Identifier
_lhsOrefHoNts = () -> Set Identifier
rule44 ()
_lhsOrefNts :: Set NontermIdent
_lhsOrefNts :: Set Identifier
_lhsOrefNts = () -> Set Identifier
rule45 ()
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule46 ()
__result_ :: T_Children_vOut4
__result_ = EChildren
-> Set (Vertex, Vertex)
-> [(Identifier, Identifier)]
-> Set Identifier
-> Set Identifier
-> Set Vertex
-> T_Children_vOut4
T_Children_vOut4 EChildren
_lhsOechilds Set (Vertex, Vertex)
_lhsOedges [(Identifier, Identifier)]
_lhsOnontnames Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Set Vertex
_lhsOvertices
in T_Children_vOut4
__result_ )
in T_Children_v4 -> T_Children_s5
C_Children_s5 T_Children_v4
v4
{-# INLINE rule41 #-}
rule41 :: () -> [a]
rule41 = \ (()
_ :: ()) ->
[]
{-# INLINE rule42 #-}
rule42 :: () -> Set a
rule42 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule43 #-}
rule43 :: () -> [a]
rule43 = \ (()
_ :: ()) ->
[]
{-# INLINE rule44 #-}
rule44 :: () -> Set Identifier
rule44 = \ (()
_ :: ()) ->
Set Identifier
forall a. Monoid a => a
mempty
{-# INLINE rule45 #-}
rule45 :: () -> Set Identifier
rule45 = \ (()
_ :: ()) ->
Set Identifier
forall a. Monoid a => a
mempty
{-# INLINE rule46 #-}
rule46 :: () -> Set a
rule46 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
data Inh_Expression = Inh_Expression { }
data Syn_Expression = Syn_Expression { Syn_Expression -> Expression
copy_Syn_Expression :: (Expression), Syn_Expression -> Set Vertex
vertices_Syn_Expression :: (Set.Set Vertex) }
{-# 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
_lhsOcopy Set Vertex
_lhsOvertices) <- 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 -> Set Vertex -> Syn_Expression
Syn_Expression Expression
_lhsOcopy Set Vertex
_lhsOvertices)
)
{-# 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) (Set.Set Vertex)
{-# 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
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = [HsToken] -> Set Vertex
rule47 [HsToken]
arg_tks_
_copy :: Expression
_copy = Pos -> [HsToken] -> Expression
rule48 Pos
arg_pos_ [HsToken]
arg_tks_
_lhsOcopy :: Expression
_lhsOcopy :: Expression
_lhsOcopy = Expression -> Expression
forall a. a -> a
rule49 Expression
_copy
__result_ :: T_Expression_vOut7
__result_ = Expression -> Set Vertex -> T_Expression_vOut7
T_Expression_vOut7 Expression
_lhsOcopy Set Vertex
_lhsOvertices
in T_Expression_vOut7
__result_ )
in T_Expression_v7 -> T_Expression_s8
C_Expression_s8 T_Expression_v7
v7
{-# INLINE rule47 #-}
{-# LINE 50 "src-ag/KWOrder.ag" #-}
rule47 = \ tks_ ->
{-# LINE 50 "src-ag/KWOrder.ag" #-}
Set.unions $ map (\tok -> vertices_Syn_HsToken
(wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_
{-# LINE 517 "src-generated/KWOrder.hs" #-}
{-# INLINE rule48 #-}
rule48 = \ pos_ tks_ ->
Expression pos_ tks_
{-# INLINE rule49 #-}
rule49 = \ _copy ->
_copy
data Inh_Grammar = Inh_Grammar { Inh_Grammar -> Options
options_Inh_Grammar :: (Options) }
data Syn_Grammar = Syn_Grammar { Syn_Grammar -> PP_Doc
depgraphs_Syn_Grammar :: (PP_Doc), Syn_Grammar -> Seq Error
errors_Syn_Grammar :: (Seq Error), Syn_Grammar -> Map Identifier Attributes
inhmap_Syn_Grammar :: (Map.Map NontermIdent Attributes), Syn_Grammar -> Map Identifier (Map Identifier Attributes)
localSigMap_Syn_Grammar :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))), Syn_Grammar -> ExecutionPlan
output_Syn_Grammar :: (ExecutionPlan), Syn_Grammar -> Map Identifier Attributes
synmap_Syn_Grammar :: (Map.Map NontermIdent Attributes), Syn_Grammar -> PP_Doc
visitgraph_Syn_Grammar :: (PP_Doc) }
{-# INLINABLE wrap_Grammar #-}
wrap_Grammar :: T_Grammar -> Inh_Grammar -> (Syn_Grammar )
wrap_Grammar :: T_Grammar -> Inh_Grammar -> Syn_Grammar
wrap_Grammar (T_Grammar Identity T_Grammar_s11
act) (Inh_Grammar Options
_lhsIoptions) =
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 = Options -> T_Grammar_vIn10
T_Grammar_vIn10 Options
_lhsIoptions
(T_Grammar_vOut10 PP_Doc
_lhsOdepgraphs Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap ExecutionPlan
_lhsOoutput Map Identifier Attributes
_lhsOsynmap PP_Doc
_lhsOvisitgraph) <- T_Grammar_vOut10 -> Identity T_Grammar_vOut10
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Grammar_s11 -> T_Grammar_v10
inv_Grammar_s11 T_Grammar_s11
sem T_Grammar_vIn10
arg10)
Syn_Grammar -> Identity Syn_Grammar
forall (m :: * -> *) a. Monad m => a -> m a
return (PP_Doc
-> Seq Error
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> ExecutionPlan
-> Map Identifier Attributes
-> PP_Doc
-> Syn_Grammar
Syn_Grammar PP_Doc
_lhsOdepgraphs Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap ExecutionPlan
_lhsOoutput Map Identifier Attributes
_lhsOsynmap PP_Doc
_lhsOvisitgraph)
)
{-# INLINE sem_Grammar #-}
sem_Grammar :: Grammar -> T_Grammar
sem_Grammar :: Grammar -> T_Grammar
sem_Grammar ( Grammar TypeSyns
typeSyns_ UseMap
useMap_ Map Identifier (Set Identifier)
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
-> Map Identifier (Set Identifier)
-> 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_ Map Identifier (Set Identifier)
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 (Options)
data T_Grammar_vOut10 = T_Grammar_vOut10 (PP_Doc) (Seq Error) (Map.Map NontermIdent Attributes) (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))) (ExecutionPlan) (Map.Map NontermIdent Attributes) (PP_Doc)
{-# NOINLINE sem_Grammar_Grammar #-}
sem_Grammar_Grammar :: (TypeSyns) -> (UseMap) -> (Derivings) -> (Set NontermIdent) -> T_Nonterminals -> (PragmaMap) -> (AttrOrderMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (UniqueMap) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) -> T_Grammar
sem_Grammar_Grammar :: TypeSyns
-> UseMap
-> Map Identifier (Set Identifier)
-> Set Identifier
-> T_Nonterminals
-> PragmaMap
-> AttrOrderMap
-> ParamMap
-> ContextMap
-> QuantMap
-> UniqueMap
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> T_Grammar
sem_Grammar_Grammar TypeSyns
arg_typeSyns_ UseMap
_ Map Identifier (Set Identifier)
arg_derivings_ Set Identifier
arg_wrappers_ T_Nonterminals
arg_nonts_ PragmaMap
_ AttrOrderMap
arg_manualAttrOrderMap_ ParamMap
_ ContextMap
arg_contextMap_ QuantMap
_ UniqueMap
_ Map Identifier (Map Identifier (Map Identifier [Expression]))
_ Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_ Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_ = Identity T_Grammar_s11 -> T_Grammar
T_Grammar (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 Options
_lhsIoptions) -> ( let
_nontsX26 :: T_Nonterminals_s26
_nontsX26 = Identity T_Nonterminals_s26 -> T_Nonterminals_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminals -> Identity T_Nonterminals_s26
attach_T_Nonterminals (T_Nonterminals
arg_nonts_))
(T_Nonterminals_vOut25 [NontDependencyInformation]
_nontsIdepinfo Map Identifier Attributes
_nontsIinhMap' Map Identifier Attributes
_nontsIinhmap Map Identifier (Map Identifier Attributes)
_nontsIlocalSigMap Map Identifier (Set Identifier)
_nontsIntDeps Map Identifier (Set Identifier)
_nontsIntHoDeps Int
_nontsIrulenumber Map Identifier Attributes
_nontsIsynMap' Map Identifier Attributes
_nontsIsynmap) = T_Nonterminals_s26 -> T_Nonterminals_v25
inv_Nonterminals_s26 T_Nonterminals_s26
_nontsX26 (Map Identifier (Map Identifier (Map Identifier [Expression]))
-> ContextMap
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Nonterminals_vIn25
T_Nonterminals_vIn25 Map Identifier (Map Identifier (Map Identifier [Expression]))
_nontsOaroundMap ContextMap
_nontsOclassContexts Map Identifier (Set Identifier)
_nontsOclosedHoNtDeps Map Identifier (Set Identifier)
_nontsOclosedHoNtRevDeps Map Identifier (Set Identifier)
_nontsOclosedNtDeps Map Identifier Attributes
_nontsOinhMap AttrOrderMap
_nontsOmanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_nontsOmergeMap Options
_nontsOoptions Int
_nontsOrulenumber Map Identifier Attributes
_nontsOsynMap)
_closedNtDeps :: Map Identifier (Set Identifier)
_closedNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule50 Map Identifier (Set Identifier)
_nontsIntDeps
_closedHoNtDeps :: Map Identifier (Set Identifier)
_closedHoNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule51 Map Identifier (Set Identifier)
_nontsIntHoDeps
_closedHoNtRevDeps :: Map Identifier (Set Identifier)
_closedHoNtRevDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule52 Map Identifier (Set Identifier)
_closedHoNtDeps
_nontsOclassContexts :: ContextMap
_nontsOclassContexts = ContextMap -> ContextMap
forall a. a -> a
rule53 ContextMap
arg_contextMap_
_nontsOaroundMap :: Map Identifier (Map Identifier (Map Identifier [Expression]))
_nontsOaroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
forall a. a -> a
rule54 Map Identifier (Map Identifier (Map Identifier [Expression]))
arg_aroundsMap_
_nontsOmergeMap :: Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_nontsOmergeMap = Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
forall a. a -> a
rule55 Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
arg_mergeMap_
_nontsOrulenumber :: Int
_nontsOrulenumber = () -> Int
rule56 ()
_nontsOinhMap :: Map Identifier Attributes
_nontsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule57 Map Identifier Attributes
_nontsIinhMap'
_nontsOsynMap :: Map Identifier Attributes
_nontsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule58 Map Identifier Attributes
_nontsIsynMap'
_nontsOmanualDeps :: AttrOrderMap
_nontsOmanualDeps = AttrOrderMap -> AttrOrderMap
forall a. a -> a
rule59 AttrOrderMap
arg_manualAttrOrderMap_
_lhsOoutput :: ExecutionPlan
_lhsOdepgraphs :: PP_Doc
_lhsOvisitgraph :: PP_Doc
_lhsOerrors :: Seq Error
(ExecutionPlan
_lhsOoutput,PP_Doc
_lhsOdepgraphs,PP_Doc
_lhsOvisitgraph,Seq Error
_lhsOerrors) = Options
-> [NontDependencyInformation]
-> Map Identifier (Set Identifier)
-> TypeSyns
-> Set Identifier
-> (ExecutionPlan, PP_Doc, PP_Doc, Seq Error)
rule60 Options
_lhsIoptions [NontDependencyInformation]
_nontsIdepinfo Map Identifier (Set Identifier)
arg_derivings_ TypeSyns
arg_typeSyns_ Set Identifier
arg_wrappers_
_lhsOinhmap :: Map.Map NontermIdent Attributes
_lhsOinhmap :: Map Identifier Attributes
_lhsOinhmap = Map Identifier Attributes -> Map Identifier Attributes
rule61 Map Identifier Attributes
_nontsIinhmap
_lhsOlocalSigMap :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))
_lhsOlocalSigMap :: Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule62 Map Identifier (Map Identifier Attributes)
_nontsIlocalSigMap
_lhsOsynmap :: Map.Map NontermIdent Attributes
_lhsOsynmap :: Map Identifier Attributes
_lhsOsynmap = Map Identifier Attributes -> Map Identifier Attributes
rule63 Map Identifier Attributes
_nontsIsynmap
_nontsOclosedHoNtDeps :: Map Identifier (Set Identifier)
_nontsOclosedHoNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
forall a. a -> a
rule64 Map Identifier (Set Identifier)
_closedHoNtDeps
_nontsOclosedHoNtRevDeps :: Map Identifier (Set Identifier)
_nontsOclosedHoNtRevDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
forall a. a -> a
rule65 Map Identifier (Set Identifier)
_closedHoNtRevDeps
_nontsOclosedNtDeps :: Map Identifier (Set Identifier)
_nontsOclosedNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
forall a. a -> a
rule66 Map Identifier (Set Identifier)
_closedNtDeps
_nontsOoptions :: Options
_nontsOoptions = Options -> Options
rule67 Options
_lhsIoptions
__result_ :: T_Grammar_vOut10
__result_ = PP_Doc
-> Seq Error
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> ExecutionPlan
-> Map Identifier Attributes
-> PP_Doc
-> T_Grammar_vOut10
T_Grammar_vOut10 PP_Doc
_lhsOdepgraphs Seq Error
_lhsOerrors Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap ExecutionPlan
_lhsOoutput Map Identifier Attributes
_lhsOsynmap PP_Doc
_lhsOvisitgraph
in T_Grammar_vOut10
__result_ )
in T_Grammar_v10 -> T_Grammar_s11
C_Grammar_s11 T_Grammar_v10
v10
{-# INLINE rule50 #-}
{-# LINE 40 "src-ag/ExecutionPlanCommon.ag" #-}
rule50 = \ ((_nontsIntDeps) :: Map NontermIdent (Set NontermIdent)) ->
{-# LINE 40 "src-ag/ExecutionPlanCommon.ag" #-}
closeMap _nontsIntDeps
{-# LINE 597 "src-generated/KWOrder.hs" #-}
{-# INLINE rule51 #-}
{-# LINE 41 "src-ag/ExecutionPlanCommon.ag" #-}
rule51 = \ ((_nontsIntHoDeps) :: Map NontermIdent (Set NontermIdent)) ->
{-# LINE 41 "src-ag/ExecutionPlanCommon.ag" #-}
closeMap _nontsIntHoDeps
{-# LINE 603 "src-generated/KWOrder.hs" #-}
{-# INLINE rule52 #-}
{-# LINE 42 "src-ag/ExecutionPlanCommon.ag" #-}
rule52 = \ _closedHoNtDeps ->
{-# LINE 42 "src-ag/ExecutionPlanCommon.ag" #-}
revDeps _closedHoNtDeps
{-# LINE 609 "src-generated/KWOrder.hs" #-}
{-# INLINE rule53 #-}
{-# LINE 51 "src-ag/ExecutionPlanCommon.ag" #-}
rule53 = \ contextMap_ ->
{-# LINE 51 "src-ag/ExecutionPlanCommon.ag" #-}
contextMap_
{-# LINE 615 "src-generated/KWOrder.hs" #-}
{-# INLINE rule54 #-}
{-# LINE 92 "src-ag/ExecutionPlanCommon.ag" #-}
rule54 = \ aroundsMap_ ->
{-# LINE 92 "src-ag/ExecutionPlanCommon.ag" #-}
aroundsMap_
{-# LINE 621 "src-generated/KWOrder.hs" #-}
{-# INLINE rule55 #-}
{-# LINE 117 "src-ag/ExecutionPlanCommon.ag" #-}
rule55 = \ mergeMap_ ->
{-# LINE 117 "src-ag/ExecutionPlanCommon.ag" #-}
mergeMap_
{-# LINE 627 "src-generated/KWOrder.hs" #-}
{-# INLINE rule56 #-}
{-# LINE 9 "src-ag/ExecutionPlanPre.ag" #-}
rule56 = \ (_ :: ()) ->
{-# LINE 9 "src-ag/ExecutionPlanPre.ag" #-}
0
{-# LINE 633 "src-generated/KWOrder.hs" #-}
{-# INLINE rule57 #-}
{-# LINE 15 "src-ag/DistChildAttr.ag" #-}
rule57 = \ ((_nontsIinhMap') :: Map Identifier Attributes) ->
{-# LINE 15 "src-ag/DistChildAttr.ag" #-}
_nontsIinhMap'
{-# LINE 639 "src-generated/KWOrder.hs" #-}
{-# INLINE rule58 #-}
{-# LINE 16 "src-ag/DistChildAttr.ag" #-}
rule58 = \ ((_nontsIsynMap') :: Map Identifier Attributes) ->
{-# LINE 16 "src-ag/DistChildAttr.ag" #-}
_nontsIsynMap'
{-# LINE 645 "src-generated/KWOrder.hs" #-}
{-# INLINE rule59 #-}
{-# LINE 119 "src-ag/KWOrder.ag" #-}
rule59 = \ manualAttrOrderMap_ ->
{-# LINE 119 "src-ag/KWOrder.ag" #-}
manualAttrOrderMap_
{-# LINE 651 "src-generated/KWOrder.hs" #-}
{-# INLINE rule60 #-}
{-# LINE 210 "src-ag/KWOrder.ag" #-}
rule60 = \ ((_lhsIoptions) :: Options) ((_nontsIdepinfo) :: [NontDependencyInformation]) derivings_ typeSyns_ wrappers_ ->
{-# LINE 210 "src-ag/KWOrder.ag" #-}
let lazyPlan = kennedyWarrenLazy _lhsIoptions wrappers_ _nontsIdepinfo typeSyns_ derivings_
in if visit _lhsIoptions && withCycle _lhsIoptions
then case kennedyWarrenOrder _lhsIoptions wrappers_ _nontsIdepinfo typeSyns_ derivings_ of
Left e -> (lazyPlan,empty,empty,Seq.singleton e)
Right (o,d,v) -> (o,d,v,Seq.empty)
else (lazyPlan,empty,empty,Seq.empty)
{-# LINE 662 "src-generated/KWOrder.hs" #-}
{-# INLINE rule61 #-}
rule61 = \ ((_nontsIinhmap) :: Map.Map NontermIdent Attributes) ->
_nontsIinhmap
{-# INLINE rule62 #-}
rule62 = \ ((_nontsIlocalSigMap) :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))) ->
_nontsIlocalSigMap
{-# INLINE rule63 #-}
rule63 = \ ((_nontsIsynmap) :: Map.Map NontermIdent Attributes) ->
_nontsIsynmap
{-# INLINE rule64 #-}
rule64 = \ _closedHoNtDeps ->
_closedHoNtDeps
{-# INLINE rule65 #-}
rule65 = \ _closedHoNtRevDeps ->
_closedHoNtRevDeps
{-# INLINE rule66 #-}
rule66 = \ _closedNtDeps ->
_closedNtDeps
{-# INLINE rule67 #-}
rule67 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
data Inh_HsToken = Inh_HsToken { }
data Syn_HsToken = Syn_HsToken { Syn_HsToken -> Set Vertex
vertices_Syn_HsToken :: (Set.Set Vertex) }
{-# INLINABLE wrap_HsToken #-}
wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )
wrap_HsToken :: T_HsToken -> Inh_HsToken -> Syn_HsToken
wrap_HsToken (T_HsToken Identity T_HsToken_s14
act) (Inh_HsToken
Inh_HsToken ) =
Identity Syn_HsToken -> Syn_HsToken
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_HsToken_s14
sem <- Identity T_HsToken_s14
act
let arg13 :: T_HsToken_vIn13
arg13 = T_HsToken_vIn13
T_HsToken_vIn13
(T_HsToken_vOut13 Set Vertex
_lhsOvertices) <- T_HsToken_vOut13 -> Identity T_HsToken_vOut13
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsToken_s14 -> T_HsToken_v13
inv_HsToken_s14 T_HsToken_s14
sem T_HsToken_vIn13
arg13)
Syn_HsToken -> Identity Syn_HsToken
forall (m :: * -> *) a. Monad m => a -> m a
return (Set Vertex -> Syn_HsToken
Syn_HsToken Set Vertex
_lhsOvertices)
)
{-# NOINLINE sem_HsToken #-}
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken :: HsToken -> T_HsToken
sem_HsToken ( AGLocal Identifier
var_ Pos
pos_ Maybe String
rdesc_ ) = Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGLocal Identifier
var_ Pos
pos_ Maybe String
rdesc_
sem_HsToken ( AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe String
rdesc_ ) = Identifier -> Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGField Identifier
field_ Identifier
attr_ Pos
pos_ Maybe String
rdesc_
sem_HsToken ( HsToken String
value_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_HsToken String
value_ Pos
pos_
sem_HsToken ( CharToken String
value_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_CharToken String
value_ Pos
pos_
sem_HsToken ( StrToken String
value_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_StrToken String
value_ Pos
pos_
sem_HsToken ( Err String
mesg_ Pos
pos_ ) = String -> Pos -> T_HsToken
sem_HsToken_Err String
mesg_ Pos
pos_
newtype T_HsToken = T_HsToken {
T_HsToken -> Identity T_HsToken_s14
attach_T_HsToken :: Identity (T_HsToken_s14 )
}
newtype T_HsToken_s14 = C_HsToken_s14 {
T_HsToken_s14 -> T_HsToken_v13
inv_HsToken_s14 :: (T_HsToken_v13 )
}
data T_HsToken_s15 = C_HsToken_s15
type T_HsToken_v13 = (T_HsToken_vIn13 ) -> (T_HsToken_vOut13 )
data T_HsToken_vIn13 = T_HsToken_vIn13
data T_HsToken_vOut13 = T_HsToken_vOut13 (Set.Set Vertex)
{-# NOINLINE sem_HsToken_AGLocal #-}
sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken
sem_HsToken_AGLocal :: Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGLocal Identifier
arg_var_ Pos
_ Maybe String
_ = Identity T_HsToken_s14 -> T_HsToken
T_HsToken (T_HsToken_s14 -> Identity T_HsToken_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_HsToken_s14
st14 = let
v13 :: T_HsToken_v13
v13 :: T_HsToken_v13
v13 = \ (T_HsToken_vIn13
T_HsToken_vIn13 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Identifier -> Set Vertex
rule68 Identifier
arg_var_
__result_ :: T_HsToken_vOut13
__result_ = Set Vertex -> T_HsToken_vOut13
T_HsToken_vOut13 Set Vertex
_lhsOvertices
in T_HsToken_vOut13
__result_ )
in T_HsToken_v13 -> T_HsToken_s14
C_HsToken_s14 T_HsToken_v13
v13
{-# INLINE rule68 #-}
{-# LINE 43 "src-ag/KWOrder.ag" #-}
rule68 = \ var_ ->
{-# LINE 43 "src-ag/KWOrder.ag" #-}
Set.singleton $ VChild var_
{-# LINE 737 "src-generated/KWOrder.hs" #-}
{-# NOINLINE sem_HsToken_AGField #-}
sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken
sem_HsToken_AGField :: Identifier -> Identifier -> Pos -> Maybe String -> T_HsToken
sem_HsToken_AGField Identifier
arg_field_ Identifier
arg_attr_ Pos
_ Maybe String
_ = Identity T_HsToken_s14 -> T_HsToken
T_HsToken (T_HsToken_s14 -> Identity T_HsToken_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_HsToken_s14
st14 = let
v13 :: T_HsToken_v13
v13 :: T_HsToken_v13
v13 = \ (T_HsToken_vIn13
T_HsToken_vIn13 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Identifier -> Identifier -> Set Vertex
rule69 Identifier
arg_attr_ Identifier
arg_field_
__result_ :: T_HsToken_vOut13
__result_ = Set Vertex -> T_HsToken_vOut13
T_HsToken_vOut13 Set Vertex
_lhsOvertices
in T_HsToken_vOut13
__result_ )
in T_HsToken_v13 -> T_HsToken_s14
C_HsToken_s14 T_HsToken_v13
v13
{-# INLINE rule69 #-}
{-# LINE 44 "src-ag/KWOrder.ag" #-}
rule69 = \ attr_ field_ ->
{-# LINE 44 "src-ag/KWOrder.ag" #-}
Set.singleton $ VAttr (if field_ == _LHS then Inh
else if field_ == _LOC then Loc
else Syn) field_ attr_
{-# LINE 757 "src-generated/KWOrder.hs" #-}
{-# NOINLINE sem_HsToken_HsToken #-}
sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_HsToken :: String -> Pos -> T_HsToken
sem_HsToken_HsToken String
_ Pos
_ = Identity T_HsToken_s14 -> T_HsToken
T_HsToken (T_HsToken_s14 -> Identity T_HsToken_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_HsToken_s14
st14 = let
v13 :: T_HsToken_v13
v13 :: T_HsToken_v13
v13 = \ (T_HsToken_vIn13
T_HsToken_vIn13 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule70 ()
__result_ :: T_HsToken_vOut13
__result_ = Set Vertex -> T_HsToken_vOut13
T_HsToken_vOut13 Set Vertex
_lhsOvertices
in T_HsToken_vOut13
__result_ )
in T_HsToken_v13 -> T_HsToken_s14
C_HsToken_s14 T_HsToken_v13
v13
{-# INLINE rule70 #-}
rule70 :: () -> Set a
rule70 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# NOINLINE sem_HsToken_CharToken #-}
sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_CharToken :: String -> Pos -> T_HsToken
sem_HsToken_CharToken String
_ Pos
_ = Identity T_HsToken_s14 -> T_HsToken
T_HsToken (T_HsToken_s14 -> Identity T_HsToken_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_HsToken_s14
st14 = let
v13 :: T_HsToken_v13
v13 :: T_HsToken_v13
v13 = \ (T_HsToken_vIn13
T_HsToken_vIn13 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule71 ()
__result_ :: T_HsToken_vOut13
__result_ = Set Vertex -> T_HsToken_vOut13
T_HsToken_vOut13 Set Vertex
_lhsOvertices
in T_HsToken_vOut13
__result_ )
in T_HsToken_v13 -> T_HsToken_s14
C_HsToken_s14 T_HsToken_v13
v13
{-# INLINE rule71 #-}
rule71 :: () -> Set a
rule71 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# NOINLINE sem_HsToken_StrToken #-}
sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken
sem_HsToken_StrToken :: String -> Pos -> T_HsToken
sem_HsToken_StrToken String
_ Pos
_ = Identity T_HsToken_s14 -> T_HsToken
T_HsToken (T_HsToken_s14 -> Identity T_HsToken_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_HsToken_s14
st14 = let
v13 :: T_HsToken_v13
v13 :: T_HsToken_v13
v13 = \ (T_HsToken_vIn13
T_HsToken_vIn13 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule72 ()
__result_ :: T_HsToken_vOut13
__result_ = Set Vertex -> T_HsToken_vOut13
T_HsToken_vOut13 Set Vertex
_lhsOvertices
in T_HsToken_vOut13
__result_ )
in T_HsToken_v13 -> T_HsToken_s14
C_HsToken_s14 T_HsToken_v13
v13
{-# INLINE rule72 #-}
rule72 :: () -> Set a
rule72 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# NOINLINE sem_HsToken_Err #-}
sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken
sem_HsToken_Err :: String -> Pos -> T_HsToken
sem_HsToken_Err String
_ Pos
_ = Identity T_HsToken_s14 -> T_HsToken
T_HsToken (T_HsToken_s14 -> Identity T_HsToken_s14
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsToken_s14
st14) where
{-# NOINLINE st14 #-}
st14 :: T_HsToken_s14
st14 = let
v13 :: T_HsToken_v13
v13 :: T_HsToken_v13
v13 = \ (T_HsToken_vIn13
T_HsToken_vIn13 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule73 ()
__result_ :: T_HsToken_vOut13
__result_ = Set Vertex -> T_HsToken_vOut13
T_HsToken_vOut13 Set Vertex
_lhsOvertices
in T_HsToken_vOut13
__result_ )
in T_HsToken_v13 -> T_HsToken_s14
C_HsToken_s14 T_HsToken_v13
v13
{-# INLINE rule73 #-}
rule73 :: () -> Set a
rule73 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
data Inh_HsTokens = Inh_HsTokens { }
data Syn_HsTokens = Syn_HsTokens { }
{-# INLINABLE wrap_HsTokens #-}
wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )
wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> Syn_HsTokens
wrap_HsTokens (T_HsTokens Identity T_HsTokens_s17
act) (Inh_HsTokens
Inh_HsTokens ) =
Identity Syn_HsTokens -> Syn_HsTokens
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_HsTokens_s17
sem <- Identity T_HsTokens_s17
act
let arg16 :: T_HsTokens_vIn16
arg16 = T_HsTokens_vIn16
T_HsTokens_vIn16
(T_HsTokens_vOut16
T_HsTokens_vOut16 ) <- T_HsTokens_vOut16 -> Identity T_HsTokens_vOut16
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsTokens_s17 -> T_HsTokens_v16
inv_HsTokens_s17 T_HsTokens_s17
sem T_HsTokens_vIn16
arg16)
Syn_HsTokens -> Identity Syn_HsTokens
forall (m :: * -> *) a. Monad m => a -> m a
return (Syn_HsTokens
Syn_HsTokens )
)
{-# NOINLINE sem_HsTokens #-}
sem_HsTokens :: HsTokens -> T_HsTokens
sem_HsTokens :: [HsToken] -> T_HsTokens
sem_HsTokens [HsToken]
list = (T_HsToken -> T_HsTokens -> T_HsTokens)
-> T_HsTokens -> [T_HsToken] -> T_HsTokens
forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
Prelude.foldr T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons T_HsTokens
sem_HsTokens_Nil ((HsToken -> T_HsToken) -> [HsToken] -> [T_HsToken]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map HsToken -> T_HsToken
sem_HsToken [HsToken]
list)
newtype T_HsTokens = T_HsTokens {
T_HsTokens -> Identity T_HsTokens_s17
attach_T_HsTokens :: Identity (T_HsTokens_s17 )
}
newtype T_HsTokens_s17 = C_HsTokens_s17 {
T_HsTokens_s17 -> T_HsTokens_v16
inv_HsTokens_s17 :: (T_HsTokens_v16 )
}
data T_HsTokens_s18 = C_HsTokens_s18
type T_HsTokens_v16 = (T_HsTokens_vIn16 ) -> (T_HsTokens_vOut16 )
data T_HsTokens_vIn16 = T_HsTokens_vIn16
data T_HsTokens_vOut16 = T_HsTokens_vOut16
{-# NOINLINE sem_HsTokens_Cons #-}
sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens
sem_HsTokens_Cons T_HsToken
arg_hd_ T_HsTokens
arg_tl_ = Identity T_HsTokens_s17 -> T_HsTokens
T_HsTokens (T_HsTokens_s17 -> Identity T_HsTokens_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokens_s17
st17) where
{-# NOINLINE st17 #-}
st17 :: T_HsTokens_s17
st17 = let
v16 :: T_HsTokens_v16
v16 :: T_HsTokens_v16
v16 = \ (T_HsTokens_vIn16
T_HsTokens_vIn16 ) -> ( let
_hdX14 :: T_HsToken_s14
_hdX14 = Identity T_HsToken_s14 -> T_HsToken_s14
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsToken -> Identity T_HsToken_s14
attach_T_HsToken (T_HsToken
arg_hd_))
_tlX17 :: T_HsTokens_s17
_tlX17 = Identity T_HsTokens_s17 -> T_HsTokens_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsTokens -> Identity T_HsTokens_s17
attach_T_HsTokens (T_HsTokens
arg_tl_))
(T_HsToken_vOut13 Set Vertex
_hdIvertices) = T_HsToken_s14 -> T_HsToken_v13
inv_HsToken_s14 T_HsToken_s14
_hdX14 (T_HsToken_vIn13
T_HsToken_vIn13 )
(T_HsTokens_vOut16
T_HsTokens_vOut16 ) = T_HsTokens_s17 -> T_HsTokens_v16
inv_HsTokens_s17 T_HsTokens_s17
_tlX17 (T_HsTokens_vIn16
T_HsTokens_vIn16 )
__result_ :: T_HsTokens_vOut16
__result_ = T_HsTokens_vOut16
T_HsTokens_vOut16
in T_HsTokens_vOut16
__result_ )
in T_HsTokens_v16 -> T_HsTokens_s17
C_HsTokens_s17 T_HsTokens_v16
v16
{-# NOINLINE sem_HsTokens_Nil #-}
sem_HsTokens_Nil :: T_HsTokens
sem_HsTokens_Nil :: T_HsTokens
sem_HsTokens_Nil = Identity T_HsTokens_s17 -> T_HsTokens
T_HsTokens (T_HsTokens_s17 -> Identity T_HsTokens_s17
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokens_s17
st17) where
{-# NOINLINE st17 #-}
st17 :: T_HsTokens_s17
st17 = let
v16 :: T_HsTokens_v16
v16 :: T_HsTokens_v16
v16 = \ (T_HsTokens_vIn16
T_HsTokens_vIn16 ) -> ( let
__result_ :: T_HsTokens_vOut16
__result_ = T_HsTokens_vOut16
T_HsTokens_vOut16
in T_HsTokens_vOut16
__result_ )
in T_HsTokens_v16 -> T_HsTokens_s17
C_HsTokens_s17 T_HsTokens_v16
v16
data Inh_HsTokensRoot = Inh_HsTokensRoot { }
data Syn_HsTokensRoot = Syn_HsTokensRoot { }
{-# INLINABLE wrap_HsTokensRoot #-}
wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> (Syn_HsTokensRoot )
wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> Syn_HsTokensRoot
wrap_HsTokensRoot (T_HsTokensRoot Identity T_HsTokensRoot_s20
act) (Inh_HsTokensRoot
Inh_HsTokensRoot ) =
Identity Syn_HsTokensRoot -> Syn_HsTokensRoot
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_HsTokensRoot_s20
sem <- Identity T_HsTokensRoot_s20
act
let arg19 :: T_HsTokensRoot_vIn19
arg19 = T_HsTokensRoot_vIn19
T_HsTokensRoot_vIn19
(T_HsTokensRoot_vOut19
T_HsTokensRoot_vOut19 ) <- T_HsTokensRoot_vOut19 -> Identity T_HsTokensRoot_vOut19
forall (m :: * -> *) a. Monad m => a -> m a
return (T_HsTokensRoot_s20 -> T_HsTokensRoot_v19
inv_HsTokensRoot_s20 T_HsTokensRoot_s20
sem T_HsTokensRoot_vIn19
arg19)
Syn_HsTokensRoot -> Identity Syn_HsTokensRoot
forall (m :: * -> *) a. Monad m => a -> m a
return (Syn_HsTokensRoot
Syn_HsTokensRoot )
)
{-# INLINE sem_HsTokensRoot #-}
sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot
sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot
sem_HsTokensRoot ( HsTokensRoot [HsToken]
tokens_ ) = T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot ( [HsToken] -> T_HsTokens
sem_HsTokens [HsToken]
tokens_ )
newtype T_HsTokensRoot = T_HsTokensRoot {
T_HsTokensRoot -> Identity T_HsTokensRoot_s20
attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s20 )
}
newtype T_HsTokensRoot_s20 = C_HsTokensRoot_s20 {
T_HsTokensRoot_s20 -> T_HsTokensRoot_v19
inv_HsTokensRoot_s20 :: (T_HsTokensRoot_v19 )
}
data T_HsTokensRoot_s21 = C_HsTokensRoot_s21
type T_HsTokensRoot_v19 = (T_HsTokensRoot_vIn19 ) -> (T_HsTokensRoot_vOut19 )
data T_HsTokensRoot_vIn19 = T_HsTokensRoot_vIn19
data T_HsTokensRoot_vOut19 = T_HsTokensRoot_vOut19
{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}
sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot
sem_HsTokensRoot_HsTokensRoot T_HsTokens
arg_tokens_ = Identity T_HsTokensRoot_s20 -> T_HsTokensRoot
T_HsTokensRoot (T_HsTokensRoot_s20 -> Identity T_HsTokensRoot_s20
forall (m :: * -> *) a. Monad m => a -> m a
return T_HsTokensRoot_s20
st20) where
{-# NOINLINE st20 #-}
st20 :: T_HsTokensRoot_s20
st20 = let
v19 :: T_HsTokensRoot_v19
v19 :: T_HsTokensRoot_v19
v19 = \ (T_HsTokensRoot_vIn19
T_HsTokensRoot_vIn19 ) -> ( let
_tokensX17 :: T_HsTokens_s17
_tokensX17 = Identity T_HsTokens_s17 -> T_HsTokens_s17
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_HsTokens -> Identity T_HsTokens_s17
attach_T_HsTokens (T_HsTokens
arg_tokens_))
(T_HsTokens_vOut16
T_HsTokens_vOut16 ) = T_HsTokens_s17 -> T_HsTokens_v16
inv_HsTokens_s17 T_HsTokens_s17
_tokensX17 (T_HsTokens_vIn16
T_HsTokens_vIn16 )
__result_ :: T_HsTokensRoot_vOut19
__result_ = T_HsTokensRoot_vOut19
T_HsTokensRoot_vOut19
in T_HsTokensRoot_vOut19
__result_ )
in T_HsTokensRoot_v19 -> T_HsTokensRoot_s20
C_HsTokensRoot_s20 T_HsTokensRoot_v19
v19
data Inh_Nonterminal = Inh_Nonterminal { Inh_Nonterminal
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), Inh_Nonterminal -> ContextMap
classContexts_Inh_Nonterminal :: (ContextMap), Inh_Nonterminal -> Map Identifier (Set Identifier)
closedHoNtDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)), Inh_Nonterminal -> Map Identifier (Set Identifier)
closedHoNtRevDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)), Inh_Nonterminal -> Map Identifier (Set Identifier)
closedNtDeps_Inh_Nonterminal :: (Map NontermIdent (Set NontermIdent)), Inh_Nonterminal -> Map Identifier Attributes
inhMap_Inh_Nonterminal :: (Map Identifier Attributes), Inh_Nonterminal -> AttrOrderMap
manualDeps_Inh_Nonterminal :: (AttrOrderMap), Inh_Nonterminal
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))), Inh_Nonterminal -> Options
options_Inh_Nonterminal :: (Options), Inh_Nonterminal -> Int
rulenumber_Inh_Nonterminal :: (Int), Inh_Nonterminal -> Map Identifier Attributes
synMap_Inh_Nonterminal :: (Map Identifier Attributes) }
data Syn_Nonterminal = Syn_Nonterminal { Syn_Nonterminal -> NontDependencyInformation
depinfo_Syn_Nonterminal :: (NontDependencyInformation), Syn_Nonterminal -> Map Identifier Attributes
inhMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> Map Identifier Attributes
inhmap_Syn_Nonterminal :: (Map.Map NontermIdent Attributes), Syn_Nonterminal -> Map Identifier (Map Identifier Attributes)
localSigMap_Syn_Nonterminal :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))), Syn_Nonterminal -> Map Identifier (Set Identifier)
ntDeps_Syn_Nonterminal :: (Map NontermIdent (Set NontermIdent)), Syn_Nonterminal -> Map Identifier (Set Identifier)
ntHoDeps_Syn_Nonterminal :: (Map NontermIdent (Set NontermIdent)), Syn_Nonterminal -> Int
rulenumber_Syn_Nonterminal :: (Int), Syn_Nonterminal -> Map Identifier Attributes
synMap'_Syn_Nonterminal :: (Map Identifier Attributes), Syn_Nonterminal -> Map Identifier Attributes
synmap_Syn_Nonterminal :: (Map.Map NontermIdent Attributes) }
{-# INLINABLE wrap_Nonterminal #-}
wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> (Syn_Nonterminal )
wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> Syn_Nonterminal
wrap_Nonterminal (T_Nonterminal Identity T_Nonterminal_s23
act) (Inh_Nonterminal Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) =
Identity Syn_Nonterminal -> Syn_Nonterminal
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Nonterminal_s23
sem <- Identity T_Nonterminal_s23
act
let arg22 :: T_Nonterminal_vIn22
arg22 = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> ContextMap
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Nonterminal_vIn22
T_Nonterminal_vIn22 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap
(T_Nonterminal_vOut22 NontDependencyInformation
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap) <- T_Nonterminal_vOut22 -> Identity T_Nonterminal_vOut22
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Nonterminal_s23 -> T_Nonterminal_v22
inv_Nonterminal_s23 T_Nonterminal_s23
sem T_Nonterminal_vIn22
arg22)
Syn_Nonterminal -> Identity Syn_Nonterminal
forall (m :: * -> *) a. Monad m => a -> m a
return (NontDependencyInformation
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Int
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Syn_Nonterminal
Syn_Nonterminal NontDependencyInformation
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap)
)
{-# 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_s23
attach_T_Nonterminal :: Identity (T_Nonterminal_s23 )
}
newtype T_Nonterminal_s23 = C_Nonterminal_s23 {
T_Nonterminal_s23 -> T_Nonterminal_v22
inv_Nonterminal_s23 :: (T_Nonterminal_v22 )
}
data T_Nonterminal_s24 = C_Nonterminal_s24
type T_Nonterminal_v22 = (T_Nonterminal_vIn22 ) -> (T_Nonterminal_vOut22 )
data T_Nonterminal_vIn22 = T_Nonterminal_vIn22 (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (ContextMap) (Map NontermIdent (Set NontermIdent)) (Map NontermIdent (Set NontermIdent)) (Map NontermIdent (Set NontermIdent)) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) (Options) (Int) (Map Identifier Attributes)
data T_Nonterminal_vOut22 = T_Nonterminal_vOut22 (NontDependencyInformation) (Map Identifier Attributes) (Map.Map NontermIdent Attributes) (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))) (Map NontermIdent (Set NontermIdent)) (Map NontermIdent (Set NontermIdent)) (Int) (Map Identifier Attributes) (Map.Map NontermIdent Attributes)
{-# NOINLINE sem_Nonterminal_Nonterminal #-}
sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions -> T_Nonterminal
sem_Nonterminal_Nonterminal :: Identifier
-> [Identifier]
-> Attributes
-> Attributes
-> T_Productions
-> T_Nonterminal
sem_Nonterminal_Nonterminal Identifier
arg_nt_ [Identifier]
arg_params_ Attributes
arg_inh_ Attributes
arg_syn_ T_Productions
arg_prods_ = Identity T_Nonterminal_s23 -> T_Nonterminal
T_Nonterminal (T_Nonterminal_s23 -> Identity T_Nonterminal_s23
forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminal_s23
st23) where
{-# NOINLINE st23 #-}
st23 :: T_Nonterminal_s23
st23 = let
v22 :: T_Nonterminal_v22
v22 :: T_Nonterminal_v22
v22 = \ (T_Nonterminal_vIn22 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) -> ( let
_prodsX38 :: T_Productions_s38
_prodsX38 = Identity T_Productions_s38 -> T_Productions_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Productions -> Identity T_Productions_s38
attach_T_Productions (T_Productions
arg_prods_))
(T_Productions_vOut37 [ProdDependencyGraph]
_prodsIdepgraph Map Identifier Attributes
_prodsIlocalSigMap Set Identifier
_prodsIrefHoNts Set Identifier
_prodsIrefNts Int
_prodsIrulenumber) = T_Productions_s38 -> T_Productions_v37
inv_Productions_s38 T_Productions_s38
_prodsX38 (Map Identifier (Map Identifier [Expression])
-> Map Identifier Attributes
-> Map Identifier (Set Dependency)
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Productions_vIn37
T_Productions_vIn37 Map Identifier (Map Identifier [Expression])
_prodsOaroundMap Map Identifier Attributes
_prodsOinhMap Map Identifier (Set Dependency)
_prodsOmanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_prodsOmergeMap Options
_prodsOoptions Int
_prodsOrulenumber Map Identifier Attributes
_prodsOsynMap)
_lhsOntDeps :: Map NontermIdent (Set NontermIdent)
_lhsOntDeps :: Map Identifier (Set Identifier)
_lhsOntDeps = Set Identifier -> Identifier -> Map Identifier (Set Identifier)
forall k. Set Identifier -> k -> Map k (Set Identifier)
rule74 Set Identifier
_prodsIrefNts Identifier
arg_nt_
_lhsOntHoDeps :: Map NontermIdent (Set NontermIdent)
_lhsOntHoDeps :: Map Identifier (Set Identifier)
_lhsOntHoDeps = Set Identifier -> Identifier -> Map Identifier (Set Identifier)
forall k. Set Identifier -> k -> Map k (Set Identifier)
rule75 Set Identifier
_prodsIrefHoNts Identifier
arg_nt_
_closedNtDeps :: Set Identifier
_closedNtDeps = Map Identifier (Set Identifier) -> Identifier -> Set Identifier
rule76 Map Identifier (Set Identifier)
_lhsIclosedNtDeps Identifier
arg_nt_
_closedHoNtDeps :: Set Identifier
_closedHoNtDeps = Map Identifier (Set Identifier) -> Identifier -> Set Identifier
rule77 Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Identifier
arg_nt_
_closedHoNtRevDeps :: Set Identifier
_closedHoNtRevDeps = Map Identifier (Set Identifier) -> Identifier -> Set Identifier
rule78 Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Identifier
arg_nt_
_recursive :: Bool
_recursive = Set Identifier -> Identifier -> Bool
rule79 Set Identifier
_closedNtDeps Identifier
arg_nt_
_nontrivAcyc :: Bool
_nontrivAcyc = Set Identifier -> Identifier -> Bool
rule80 Set Identifier
_closedHoNtDeps Identifier
arg_nt_
_hoInfo :: HigherOrderInfo
_hoInfo = Set Identifier -> Set Identifier -> Bool -> HigherOrderInfo
rule81 Set Identifier
_closedHoNtDeps Set Identifier
_closedHoNtRevDeps Bool
_nontrivAcyc
_classContexts :: [(Identifier, [String])]
_classContexts = ContextMap -> Identifier -> [(Identifier, [String])]
rule82 ContextMap
_lhsIclassContexts Identifier
arg_nt_
_aroundMap :: Map Identifier (Map Identifier [Expression])
_aroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Identifier -> Map Identifier (Map Identifier [Expression])
rule83 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap Identifier
arg_nt_
_mergeMap :: Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_mergeMap = Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Identifier
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
rule84 Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Identifier
arg_nt_
_lhsOinhmap :: Map.Map NontermIdent Attributes
_lhsOinhmap :: Map Identifier Attributes
_lhsOinhmap = Attributes -> Identifier -> Map Identifier Attributes
forall a k. a -> k -> Map k a
rule85 Attributes
arg_inh_ Identifier
arg_nt_
_lhsOsynmap :: Map.Map NontermIdent Attributes
_lhsOsynmap :: Map Identifier Attributes
_lhsOsynmap = Identifier -> Attributes -> Map Identifier Attributes
forall k a. k -> a -> Map k a
rule86 Identifier
arg_nt_ Attributes
arg_syn_
_lhsOlocalSigMap :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))
_lhsOlocalSigMap :: Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap = Map Identifier Attributes
-> Identifier -> Map Identifier (Map Identifier Attributes)
forall k.
Map Identifier Attributes -> k -> Map k (Map Identifier Attributes)
rule87 Map Identifier Attributes
_prodsIlocalSigMap Identifier
arg_nt_
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = Attributes -> Identifier -> Map Identifier Attributes
forall a k. a -> k -> Map k a
rule88 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
rule89 Identifier
arg_nt_ Attributes
arg_syn_
_prodsOmanualDeps :: Map Identifier (Set Dependency)
_prodsOmanualDeps = AttrOrderMap -> Identifier -> Map Identifier (Set Dependency)
rule90 AttrOrderMap
_lhsImanualDeps Identifier
arg_nt_
_synvertices :: [Vertex]
_synvertices = Identifier -> Attributes -> [Vertex]
forall a. Identifier -> Map Identifier a -> [Vertex]
rule91 Identifier
arg_nt_ Attributes
arg_syn_
_inhvertices :: [Vertex]
_inhvertices = Attributes -> Identifier -> [Vertex]
forall a. Map Identifier a -> Identifier -> [Vertex]
rule92 Attributes
arg_inh_ Identifier
arg_nt_
_vertices :: [Vertex]
_vertices = [Vertex] -> [Vertex] -> [Vertex]
forall a. [a] -> [a] -> [a]
rule93 [Vertex]
_inhvertices [Vertex]
_synvertices
_nontgraph :: NontDependencyGraph
_nontgraph = [Vertex] -> NontDependencyGraph
rule94 [Vertex]
_vertices
_lhsOdepinfo :: NontDependencyInformation
_lhsOdepinfo :: NontDependencyInformation
_lhsOdepinfo = [(Identifier, [String])]
-> HigherOrderInfo
-> NontDependencyGraph
-> [ProdDependencyGraph]
-> Bool
-> Attributes
-> Identifier
-> [Identifier]
-> Attributes
-> NontDependencyInformation
forall a a.
[(Identifier, [String])]
-> HigherOrderInfo
-> NontDependencyGraph
-> [ProdDependencyGraph]
-> Bool
-> Map Identifier a
-> Identifier
-> [Identifier]
-> Map Identifier a
-> NontDependencyInformation
rule95 [(Identifier, [String])]
_classContexts HigherOrderInfo
_hoInfo NontDependencyGraph
_nontgraph [ProdDependencyGraph]
_prodsIdepgraph Bool
_recursive Attributes
arg_inh_ Identifier
arg_nt_ [Identifier]
arg_params_ Attributes
arg_syn_
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule96 Int
_prodsIrulenumber
_prodsOaroundMap :: Map Identifier (Map Identifier [Expression])
_prodsOaroundMap = Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
forall a. a -> a
rule97 Map Identifier (Map Identifier [Expression])
_aroundMap
_prodsOinhMap :: Map Identifier Attributes
_prodsOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule98 Map Identifier Attributes
_lhsIinhMap
_prodsOmergeMap :: Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_prodsOmergeMap = Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
forall a. a -> a
rule99 Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_mergeMap
_prodsOoptions :: Options
_prodsOoptions = Options -> Options
rule100 Options
_lhsIoptions
_prodsOrulenumber :: Int
_prodsOrulenumber = Int -> Int
rule101 Int
_lhsIrulenumber
_prodsOsynMap :: Map Identifier Attributes
_prodsOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule102 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Nonterminal_vOut22
__result_ = NontDependencyInformation
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Int
-> Map Identifier Attributes
-> Map Identifier Attributes
-> T_Nonterminal_vOut22
T_Nonterminal_vOut22 NontDependencyInformation
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap
in T_Nonterminal_vOut22
__result_ )
in T_Nonterminal_v22 -> T_Nonterminal_s23
C_Nonterminal_s23 T_Nonterminal_v22
v22
{-# INLINE rule74 #-}
{-# LINE 16 "src-ag/ExecutionPlanCommon.ag" #-}
rule74 = \ ((_prodsIrefNts) :: Set NontermIdent) nt_ ->
{-# LINE 16 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton nt_ _prodsIrefNts
{-# LINE 1002 "src-generated/KWOrder.hs" #-}
{-# INLINE rule75 #-}
{-# LINE 17 "src-ag/ExecutionPlanCommon.ag" #-}
rule75 = \ ((_prodsIrefHoNts) :: Set NontermIdent) nt_ ->
{-# LINE 17 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton nt_ _prodsIrefHoNts
{-# LINE 1008 "src-generated/KWOrder.hs" #-}
{-# INLINE rule76 #-}
{-# LINE 19 "src-ag/ExecutionPlanCommon.ag" #-}
rule76 = \ ((_lhsIclosedNtDeps) :: Map NontermIdent (Set NontermIdent)) nt_ ->
{-# LINE 19 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Set.empty nt_ _lhsIclosedNtDeps
{-# LINE 1014 "src-generated/KWOrder.hs" #-}
{-# INLINE rule77 #-}
{-# LINE 20 "src-ag/ExecutionPlanCommon.ag" #-}
rule77 = \ ((_lhsIclosedHoNtDeps) :: Map NontermIdent (Set NontermIdent)) nt_ ->
{-# LINE 20 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Set.empty nt_ _lhsIclosedHoNtDeps
{-# LINE 1020 "src-generated/KWOrder.hs" #-}
{-# INLINE rule78 #-}
{-# LINE 21 "src-ag/ExecutionPlanCommon.ag" #-}
rule78 = \ ((_lhsIclosedHoNtRevDeps) :: Map NontermIdent (Set NontermIdent)) nt_ ->
{-# LINE 21 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Set.empty nt_ _lhsIclosedHoNtRevDeps
{-# LINE 1026 "src-generated/KWOrder.hs" #-}
{-# INLINE rule79 #-}
{-# LINE 23 "src-ag/ExecutionPlanCommon.ag" #-}
rule79 = \ _closedNtDeps nt_ ->
{-# LINE 23 "src-ag/ExecutionPlanCommon.ag" #-}
nt_ `Set.member` _closedNtDeps
{-# LINE 1032 "src-generated/KWOrder.hs" #-}
{-# INLINE rule80 #-}
{-# LINE 24 "src-ag/ExecutionPlanCommon.ag" #-}
rule80 = \ _closedHoNtDeps nt_ ->
{-# LINE 24 "src-ag/ExecutionPlanCommon.ag" #-}
nt_ `Set.member` _closedHoNtDeps
{-# LINE 1038 "src-generated/KWOrder.hs" #-}
{-# INLINE rule81 #-}
{-# LINE 25 "src-ag/ExecutionPlanCommon.ag" #-}
rule81 = \ _closedHoNtDeps _closedHoNtRevDeps _nontrivAcyc ->
{-# LINE 25 "src-ag/ExecutionPlanCommon.ag" #-}
HigherOrderInfo { hoNtDeps = _closedHoNtDeps
, hoNtRevDeps = _closedHoNtRevDeps
, hoAcyclic = _nontrivAcyc
}
{-# LINE 1047 "src-generated/KWOrder.hs" #-}
{-# INLINE rule82 #-}
{-# LINE 54 "src-ag/ExecutionPlanCommon.ag" #-}
rule82 = \ ((_lhsIclassContexts) :: ContextMap) nt_ ->
{-# LINE 54 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault [] nt_ _lhsIclassContexts
{-# LINE 1053 "src-generated/KWOrder.hs" #-}
{-# INLINE rule83 #-}
{-# LINE 88 "src-ag/ExecutionPlanCommon.ag" #-}
rule83 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) nt_ ->
{-# LINE 88 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Map.empty nt_ _lhsIaroundMap
{-# LINE 1059 "src-generated/KWOrder.hs" #-}
{-# INLINE rule84 #-}
{-# LINE 113 "src-ag/ExecutionPlanCommon.ag" #-}
rule84 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) nt_ ->
{-# LINE 113 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Map.empty nt_ _lhsImergeMap
{-# LINE 1065 "src-generated/KWOrder.hs" #-}
{-# INLINE rule85 #-}
{-# LINE 149 "src-ag/ExecutionPlanCommon.ag" #-}
rule85 = \ inh_ nt_ ->
{-# LINE 149 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton nt_ inh_
{-# LINE 1071 "src-generated/KWOrder.hs" #-}
{-# INLINE rule86 #-}
{-# LINE 150 "src-ag/ExecutionPlanCommon.ag" #-}
rule86 = \ nt_ syn_ ->
{-# LINE 150 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton nt_ syn_
{-# LINE 1077 "src-generated/KWOrder.hs" #-}
{-# INLINE rule87 #-}
{-# LINE 159 "src-ag/ExecutionPlanCommon.ag" #-}
rule87 = \ ((_prodsIlocalSigMap) :: Map.Map ConstructorIdent (Map.Map Identifier Type)) nt_ ->
{-# LINE 159 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton nt_ _prodsIlocalSigMap
{-# LINE 1083 "src-generated/KWOrder.hs" #-}
{-# INLINE rule88 #-}
{-# LINE 7 "src-ag/DistChildAttr.ag" #-}
rule88 = \ inh_ nt_ ->
{-# LINE 7 "src-ag/DistChildAttr.ag" #-}
Map.singleton nt_ inh_
{-# LINE 1089 "src-generated/KWOrder.hs" #-}
{-# INLINE rule89 #-}
{-# LINE 8 "src-ag/DistChildAttr.ag" #-}
rule89 = \ nt_ syn_ ->
{-# LINE 8 "src-ag/DistChildAttr.ag" #-}
Map.singleton nt_ syn_
{-# LINE 1095 "src-generated/KWOrder.hs" #-}
{-# INLINE rule90 #-}
{-# LINE 120 "src-ag/KWOrder.ag" #-}
rule90 = \ ((_lhsImanualDeps) :: AttrOrderMap) nt_ ->
{-# LINE 120 "src-ag/KWOrder.ag" #-}
Map.findWithDefault Map.empty nt_ _lhsImanualDeps
{-# LINE 1101 "src-generated/KWOrder.hs" #-}
{-# INLINE rule91 #-}
{-# LINE 175 "src-ag/KWOrder.ag" #-}
rule91 = \ nt_ syn_ ->
{-# LINE 175 "src-ag/KWOrder.ag" #-}
map (VAttr Syn nt_) . Map.keys $ syn_
{-# LINE 1107 "src-generated/KWOrder.hs" #-}
{-# INLINE rule92 #-}
{-# LINE 176 "src-ag/KWOrder.ag" #-}
rule92 = \ inh_ nt_ ->
{-# LINE 176 "src-ag/KWOrder.ag" #-}
map (VAttr Inh nt_) . Map.keys $ inh_
{-# LINE 1113 "src-generated/KWOrder.hs" #-}
{-# INLINE rule93 #-}
{-# LINE 177 "src-ag/KWOrder.ag" #-}
rule93 = \ _inhvertices _synvertices ->
{-# LINE 177 "src-ag/KWOrder.ag" #-}
_synvertices ++ _inhvertices
{-# LINE 1119 "src-generated/KWOrder.hs" #-}
{-# INLINE rule94 #-}
{-# LINE 181 "src-ag/KWOrder.ag" #-}
rule94 = \ _vertices ->
{-# LINE 181 "src-ag/KWOrder.ag" #-}
NontDependencyGraph { ndgVertices = _vertices
, ndgEdges = [] }
{-# LINE 1126 "src-generated/KWOrder.hs" #-}
{-# INLINE rule95 #-}
{-# LINE 189 "src-ag/KWOrder.ag" #-}
rule95 = \ _classContexts _hoInfo _nontgraph ((_prodsIdepgraph) :: [ProdDependencyGraph]) _recursive inh_ nt_ params_ syn_ ->
{-# LINE 189 "src-ag/KWOrder.ag" #-}
NontDependencyInformation { ndiNonterminal = nt_
, ndiParams = params_
, ndiInh = Map.keys inh_
, ndiSyn = Map.keys syn_
, ndiDepGraph = _nontgraph
, ndiProds = _prodsIdepgraph
, ndiRecursive = _recursive
, ndiHoInfo = _hoInfo
, ndiClassCtxs = _classContexts
}
{-# LINE 1141 "src-generated/KWOrder.hs" #-}
{-# INLINE rule96 #-}
rule96 = \ ((_prodsIrulenumber) :: Int) ->
_prodsIrulenumber
{-# INLINE rule97 #-}
rule97 = \ _aroundMap ->
_aroundMap
{-# INLINE rule98 #-}
rule98 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule99 #-}
rule99 = \ _mergeMap ->
_mergeMap
{-# INLINE rule100 #-}
rule100 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule101 #-}
rule101 = \ ((_lhsIrulenumber) :: Int) ->
_lhsIrulenumber
{-# INLINE rule102 #-}
rule102 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
data Inh_Nonterminals = Inh_Nonterminals { Inh_Nonterminals
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
aroundMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), Inh_Nonterminals -> ContextMap
classContexts_Inh_Nonterminals :: (ContextMap), Inh_Nonterminals -> Map Identifier (Set Identifier)
closedHoNtDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)), Inh_Nonterminals -> Map Identifier (Set Identifier)
closedHoNtRevDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)), Inh_Nonterminals -> Map Identifier (Set Identifier)
closedNtDeps_Inh_Nonterminals :: (Map NontermIdent (Set NontermIdent)), Inh_Nonterminals -> Map Identifier Attributes
inhMap_Inh_Nonterminals :: (Map Identifier Attributes), Inh_Nonterminals -> AttrOrderMap
manualDeps_Inh_Nonterminals :: (AttrOrderMap), Inh_Nonterminals
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))), Inh_Nonterminals -> Options
options_Inh_Nonterminals :: (Options), Inh_Nonterminals -> Int
rulenumber_Inh_Nonterminals :: (Int), Inh_Nonterminals -> Map Identifier Attributes
synMap_Inh_Nonterminals :: (Map Identifier Attributes) }
data Syn_Nonterminals = Syn_Nonterminals { Syn_Nonterminals -> [NontDependencyInformation]
depinfo_Syn_Nonterminals :: ([NontDependencyInformation]), Syn_Nonterminals -> Map Identifier Attributes
inhMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> Map Identifier Attributes
inhmap_Syn_Nonterminals :: (Map.Map NontermIdent Attributes), Syn_Nonterminals -> Map Identifier (Map Identifier Attributes)
localSigMap_Syn_Nonterminals :: (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))), Syn_Nonterminals -> Map Identifier (Set Identifier)
ntDeps_Syn_Nonterminals :: (Map NontermIdent (Set NontermIdent)), Syn_Nonterminals -> Map Identifier (Set Identifier)
ntHoDeps_Syn_Nonterminals :: (Map NontermIdent (Set NontermIdent)), Syn_Nonterminals -> Int
rulenumber_Syn_Nonterminals :: (Int), Syn_Nonterminals -> Map Identifier Attributes
synMap'_Syn_Nonterminals :: (Map Identifier Attributes), Syn_Nonterminals -> Map Identifier Attributes
synmap_Syn_Nonterminals :: (Map.Map NontermIdent Attributes) }
{-# INLINABLE wrap_Nonterminals #-}
wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> (Syn_Nonterminals )
wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> Syn_Nonterminals
wrap_Nonterminals (T_Nonterminals Identity T_Nonterminals_s26
act) (Inh_Nonterminals Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) =
Identity Syn_Nonterminals -> Syn_Nonterminals
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Nonterminals_s26
sem <- Identity T_Nonterminals_s26
act
let arg25 :: T_Nonterminals_vIn25
arg25 = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> ContextMap
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Nonterminals_vIn25
T_Nonterminals_vIn25 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap
(T_Nonterminals_vOut25 [NontDependencyInformation]
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap) <- T_Nonterminals_vOut25 -> Identity T_Nonterminals_vOut25
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Nonterminals_s26 -> T_Nonterminals_v25
inv_Nonterminals_s26 T_Nonterminals_s26
sem T_Nonterminals_vIn25
arg25)
Syn_Nonterminals -> Identity Syn_Nonterminals
forall (m :: * -> *) a. Monad m => a -> m a
return ([NontDependencyInformation]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Int
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Syn_Nonterminals
Syn_Nonterminals [NontDependencyInformation]
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap)
)
{-# 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_s26
attach_T_Nonterminals :: Identity (T_Nonterminals_s26 )
}
newtype T_Nonterminals_s26 = C_Nonterminals_s26 {
T_Nonterminals_s26 -> T_Nonterminals_v25
inv_Nonterminals_s26 :: (T_Nonterminals_v25 )
}
data T_Nonterminals_s27 = C_Nonterminals_s27
type T_Nonterminals_v25 = (T_Nonterminals_vIn25 ) -> (T_Nonterminals_vOut25 )
data T_Nonterminals_vIn25 = T_Nonterminals_vIn25 (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (ContextMap) (Map NontermIdent (Set NontermIdent)) (Map NontermIdent (Set NontermIdent)) (Map NontermIdent (Set NontermIdent)) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) (Options) (Int) (Map Identifier Attributes)
data T_Nonterminals_vOut25 = T_Nonterminals_vOut25 ([NontDependencyInformation]) (Map Identifier Attributes) (Map.Map NontermIdent Attributes) (Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))) (Map NontermIdent (Set NontermIdent)) (Map NontermIdent (Set NontermIdent)) (Int) (Map Identifier Attributes) (Map.Map NontermIdent Attributes)
{-# NOINLINE sem_Nonterminals_Cons #-}
sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals
sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals
sem_Nonterminals_Cons T_Nonterminal
arg_hd_ T_Nonterminals
arg_tl_ = Identity T_Nonterminals_s26 -> T_Nonterminals
T_Nonterminals (T_Nonterminals_s26 -> Identity T_Nonterminals_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminals_s26
st26) where
{-# NOINLINE st26 #-}
st26 :: T_Nonterminals_s26
st26 = let
v25 :: T_Nonterminals_v25
v25 :: T_Nonterminals_v25
v25 = \ (T_Nonterminals_vIn25 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) -> ( let
_hdX23 :: T_Nonterminal_s23
_hdX23 = Identity T_Nonterminal_s23 -> T_Nonterminal_s23
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminal -> Identity T_Nonterminal_s23
attach_T_Nonterminal (T_Nonterminal
arg_hd_))
_tlX26 :: T_Nonterminals_s26
_tlX26 = Identity T_Nonterminals_s26 -> T_Nonterminals_s26
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Nonterminals -> Identity T_Nonterminals_s26
attach_T_Nonterminals (T_Nonterminals
arg_tl_))
(T_Nonterminal_vOut22 NontDependencyInformation
_hdIdepinfo Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
_hdIinhmap Map Identifier (Map Identifier Attributes)
_hdIlocalSigMap Map Identifier (Set Identifier)
_hdIntDeps Map Identifier (Set Identifier)
_hdIntHoDeps Int
_hdIrulenumber Map Identifier Attributes
_hdIsynMap' Map Identifier Attributes
_hdIsynmap) = T_Nonterminal_s23 -> T_Nonterminal_v22
inv_Nonterminal_s23 T_Nonterminal_s23
_hdX23 (Map Identifier (Map Identifier (Map Identifier [Expression]))
-> ContextMap
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Nonterminal_vIn22
T_Nonterminal_vIn22 Map Identifier (Map Identifier (Map Identifier [Expression]))
_hdOaroundMap ContextMap
_hdOclassContexts Map Identifier (Set Identifier)
_hdOclosedHoNtDeps Map Identifier (Set Identifier)
_hdOclosedHoNtRevDeps Map Identifier (Set Identifier)
_hdOclosedNtDeps Map Identifier Attributes
_hdOinhMap AttrOrderMap
_hdOmanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_hdOmergeMap Options
_hdOoptions Int
_hdOrulenumber Map Identifier Attributes
_hdOsynMap)
(T_Nonterminals_vOut25 [NontDependencyInformation]
_tlIdepinfo Map Identifier Attributes
_tlIinhMap' Map Identifier Attributes
_tlIinhmap Map Identifier (Map Identifier Attributes)
_tlIlocalSigMap Map Identifier (Set Identifier)
_tlIntDeps Map Identifier (Set Identifier)
_tlIntHoDeps Int
_tlIrulenumber Map Identifier Attributes
_tlIsynMap' Map Identifier Attributes
_tlIsynmap) = T_Nonterminals_s26 -> T_Nonterminals_v25
inv_Nonterminals_s26 T_Nonterminals_s26
_tlX26 (Map Identifier (Map Identifier (Map Identifier [Expression]))
-> ContextMap
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier Attributes
-> AttrOrderMap
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Nonterminals_vIn25
T_Nonterminals_vIn25 Map Identifier (Map Identifier (Map Identifier [Expression]))
_tlOaroundMap ContextMap
_tlOclassContexts Map Identifier (Set Identifier)
_tlOclosedHoNtDeps Map Identifier (Set Identifier)
_tlOclosedHoNtRevDeps Map Identifier (Set Identifier)
_tlOclosedNtDeps Map Identifier Attributes
_tlOinhMap AttrOrderMap
_tlOmanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_tlOmergeMap Options
_tlOoptions Int
_tlOrulenumber Map Identifier Attributes
_tlOsynMap)
_lhsOdepinfo :: [NontDependencyInformation]
_lhsOdepinfo :: [NontDependencyInformation]
_lhsOdepinfo = NontDependencyInformation
-> [NontDependencyInformation] -> [NontDependencyInformation]
rule103 NontDependencyInformation
_hdIdepinfo [NontDependencyInformation]
_tlIdepinfo
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule104 Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
_tlIinhMap'
_lhsOinhmap :: Map.Map NontermIdent Attributes
_lhsOinhmap :: Map Identifier Attributes
_lhsOinhmap = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule105 Map Identifier Attributes
_hdIinhmap Map Identifier Attributes
_tlIinhmap
_lhsOlocalSigMap :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))
_lhsOlocalSigMap :: Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap = Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule106 Map Identifier (Map Identifier Attributes)
_hdIlocalSigMap Map Identifier (Map Identifier Attributes)
_tlIlocalSigMap
_lhsOntDeps :: Map NontermIdent (Set NontermIdent)
_lhsOntDeps :: Map Identifier (Set Identifier)
_lhsOntDeps = Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
rule107 Map Identifier (Set Identifier)
_hdIntDeps Map Identifier (Set Identifier)
_tlIntDeps
_lhsOntHoDeps :: Map NontermIdent (Set NontermIdent)
_lhsOntHoDeps :: Map Identifier (Set Identifier)
_lhsOntHoDeps = Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
rule108 Map Identifier (Set Identifier)
_hdIntHoDeps Map Identifier (Set Identifier)
_tlIntHoDeps
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule109 Map Identifier Attributes
_hdIsynMap' Map Identifier Attributes
_tlIsynMap'
_lhsOsynmap :: Map.Map NontermIdent Attributes
_lhsOsynmap :: Map Identifier Attributes
_lhsOsynmap = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule110 Map Identifier Attributes
_hdIsynmap Map Identifier Attributes
_tlIsynmap
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule111 Int
_tlIrulenumber
_hdOaroundMap :: Map Identifier (Map Identifier (Map Identifier [Expression]))
_hdOaroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
rule112 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap
_hdOclassContexts :: ContextMap
_hdOclassContexts = ContextMap -> ContextMap
rule113 ContextMap
_lhsIclassContexts
_hdOclosedHoNtDeps :: Map Identifier (Set Identifier)
_hdOclosedHoNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule114 Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps
_hdOclosedHoNtRevDeps :: Map Identifier (Set Identifier)
_hdOclosedHoNtRevDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule115 Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps
_hdOclosedNtDeps :: Map Identifier (Set Identifier)
_hdOclosedNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule116 Map Identifier (Set Identifier)
_lhsIclosedNtDeps
_hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule117 Map Identifier Attributes
_lhsIinhMap
_hdOmanualDeps :: AttrOrderMap
_hdOmanualDeps = AttrOrderMap -> AttrOrderMap
rule118 AttrOrderMap
_lhsImanualDeps
_hdOmergeMap :: Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_hdOmergeMap = Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
rule119 Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule120 Options
_lhsIoptions
_hdOrulenumber :: Int
_hdOrulenumber = Int -> Int
rule121 Int
_lhsIrulenumber
_hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule122 Map Identifier Attributes
_lhsIsynMap
_tlOaroundMap :: Map Identifier (Map Identifier (Map Identifier [Expression]))
_tlOaroundMap = Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
rule123 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap
_tlOclassContexts :: ContextMap
_tlOclassContexts = ContextMap -> ContextMap
rule124 ContextMap
_lhsIclassContexts
_tlOclosedHoNtDeps :: Map Identifier (Set Identifier)
_tlOclosedHoNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule125 Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps
_tlOclosedHoNtRevDeps :: Map Identifier (Set Identifier)
_tlOclosedHoNtRevDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule126 Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps
_tlOclosedNtDeps :: Map Identifier (Set Identifier)
_tlOclosedNtDeps = Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule127 Map Identifier (Set Identifier)
_lhsIclosedNtDeps
_tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule128 Map Identifier Attributes
_lhsIinhMap
_tlOmanualDeps :: AttrOrderMap
_tlOmanualDeps = AttrOrderMap -> AttrOrderMap
rule129 AttrOrderMap
_lhsImanualDeps
_tlOmergeMap :: Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_tlOmergeMap = Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
rule130 Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule131 Options
_lhsIoptions
_tlOrulenumber :: Int
_tlOrulenumber = Int -> Int
rule132 Int
_hdIrulenumber
_tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule133 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Nonterminals_vOut25
__result_ = [NontDependencyInformation]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Int
-> Map Identifier Attributes
-> Map Identifier Attributes
-> T_Nonterminals_vOut25
T_Nonterminals_vOut25 [NontDependencyInformation]
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap
in T_Nonterminals_vOut25
__result_ )
in T_Nonterminals_v25 -> T_Nonterminals_s26
C_Nonterminals_s26 T_Nonterminals_v25
v25
{-# INLINE rule103 #-}
rule103 :: NontDependencyInformation
-> [NontDependencyInformation] -> [NontDependencyInformation]
rule103 = \ ((NontDependencyInformation
_hdIdepinfo) :: NontDependencyInformation) (([NontDependencyInformation]
_tlIdepinfo) :: [NontDependencyInformation]) ->
NontDependencyInformation
_hdIdepinfo NontDependencyInformation
-> [NontDependencyInformation] -> [NontDependencyInformation]
forall a. a -> [a] -> [a]
: [NontDependencyInformation]
_tlIdepinfo
{-# INLINE rule104 #-}
rule104 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule104 = \ ((Map Identifier Attributes
_hdIinhMap') :: Map Identifier Attributes) ((Map Identifier Attributes
_tlIinhMap') :: Map Identifier Attributes) ->
Map Identifier Attributes
_hdIinhMap' Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIinhMap'
{-# INLINE rule105 #-}
rule105 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule105 = \ ((Map Identifier Attributes
_hdIinhmap) :: Map.Map NontermIdent Attributes) ((Map Identifier Attributes
_tlIinhmap) :: Map.Map NontermIdent Attributes) ->
Map Identifier Attributes
_hdIinhmap Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIinhmap
{-# INLINE rule106 #-}
rule106 :: Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
rule106 = \ ((Map Identifier (Map Identifier Attributes)
_hdIlocalSigMap) :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))) ((Map Identifier (Map Identifier Attributes)
_tlIlocalSigMap) :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))) ->
Map Identifier (Map Identifier Attributes)
_hdIlocalSigMap Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Map Identifier Attributes)
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier (Map Identifier Attributes)
_tlIlocalSigMap
{-# INLINE rule107 #-}
rule107 :: Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
rule107 = \ ((Map Identifier (Set Identifier)
_hdIntDeps) :: Map NontermIdent (Set NontermIdent)) ((Map Identifier (Set Identifier)
_tlIntDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_hdIntDeps Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
forall a. Monoid a => a -> a -> a
`mappend` Map Identifier (Set Identifier)
_tlIntDeps
{-# INLINE rule108 #-}
rule108 :: Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
rule108 = \ ((Map Identifier (Set Identifier)
_hdIntHoDeps) :: Map NontermIdent (Set NontermIdent)) ((Map Identifier (Set Identifier)
_tlIntHoDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_hdIntHoDeps Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
forall a. Monoid a => a -> a -> a
`mappend` Map Identifier (Set Identifier)
_tlIntHoDeps
{-# INLINE rule109 #-}
rule109 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule109 = \ ((Map Identifier Attributes
_hdIsynMap') :: Map Identifier Attributes) ((Map Identifier Attributes
_tlIsynMap') :: Map Identifier Attributes) ->
Map Identifier Attributes
_hdIsynMap' Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIsynMap'
{-# INLINE rule110 #-}
rule110 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule110 = \ ((Map Identifier Attributes
_hdIsynmap) :: Map.Map NontermIdent Attributes) ((Map Identifier Attributes
_tlIsynmap) :: Map.Map NontermIdent Attributes) ->
Map Identifier Attributes
_hdIsynmap Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIsynmap
{-# INLINE rule111 #-}
rule111 :: Int -> Int
rule111 = \ ((Int
_tlIrulenumber) :: Int) ->
Int
_tlIrulenumber
{-# INLINE rule112 #-}
rule112 :: Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
rule112 = \ ((Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->
Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap
{-# INLINE rule113 #-}
rule113 :: ContextMap -> ContextMap
rule113 = \ ((ContextMap
_lhsIclassContexts) :: ContextMap) ->
ContextMap
_lhsIclassContexts
{-# INLINE rule114 #-}
rule114 :: Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule114 = \ ((Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps
{-# INLINE rule115 #-}
rule115 :: Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule115 = \ ((Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps
{-# INLINE rule116 #-}
rule116 :: Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule116 = \ ((Map Identifier (Set Identifier)
_lhsIclosedNtDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_lhsIclosedNtDeps
{-# INLINE rule117 #-}
rule117 :: Map Identifier Attributes -> Map Identifier Attributes
rule117 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIinhMap
{-# INLINE rule118 #-}
rule118 :: AttrOrderMap -> AttrOrderMap
rule118 = \ ((AttrOrderMap
_lhsImanualDeps) :: AttrOrderMap) ->
AttrOrderMap
_lhsImanualDeps
{-# INLINE rule119 #-}
rule119 :: Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
rule119 = \ ((Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->
Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap
{-# INLINE rule120 #-}
rule120 :: Options -> Options
rule120 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule121 #-}
rule121 :: Int -> Int
rule121 = \ ((Int
_lhsIrulenumber) :: Int) ->
Int
_lhsIrulenumber
{-# INLINE rule122 #-}
rule122 :: Map Identifier Attributes -> Map Identifier Attributes
rule122 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIsynMap
{-# INLINE rule123 #-}
rule123 :: Map Identifier (Map Identifier (Map Identifier [Expression]))
-> Map Identifier (Map Identifier (Map Identifier [Expression]))
rule123 = \ ((Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->
Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap
{-# INLINE rule124 #-}
rule124 :: ContextMap -> ContextMap
rule124 = \ ((ContextMap
_lhsIclassContexts) :: ContextMap) ->
ContextMap
_lhsIclassContexts
{-# INLINE rule125 #-}
rule125 :: Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule125 = \ ((Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps
{-# INLINE rule126 #-}
rule126 :: Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule126 = \ ((Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps
{-# INLINE rule127 #-}
rule127 :: Map Identifier (Set Identifier) -> Map Identifier (Set Identifier)
rule127 = \ ((Map Identifier (Set Identifier)
_lhsIclosedNtDeps) :: Map NontermIdent (Set NontermIdent)) ->
Map Identifier (Set Identifier)
_lhsIclosedNtDeps
{-# INLINE rule128 #-}
rule128 :: Map Identifier Attributes -> Map Identifier Attributes
rule128 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIinhMap
{-# INLINE rule129 #-}
rule129 :: AttrOrderMap -> AttrOrderMap
rule129 = \ ((AttrOrderMap
_lhsImanualDeps) :: AttrOrderMap) ->
AttrOrderMap
_lhsImanualDeps
{-# INLINE rule130 #-}
rule130 :: Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
-> Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
rule130 = \ ((Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) ->
Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap
{-# INLINE rule131 #-}
rule131 :: Options -> Options
rule131 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule132 #-}
rule132 :: Int -> Int
rule132 = \ ((Int
_hdIrulenumber) :: Int) ->
Int
_hdIrulenumber
{-# INLINE rule133 #-}
rule133 :: Map Identifier Attributes -> Map Identifier Attributes
rule133 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIsynMap
{-# NOINLINE sem_Nonterminals_Nil #-}
sem_Nonterminals_Nil :: T_Nonterminals
sem_Nonterminals_Nil :: T_Nonterminals
sem_Nonterminals_Nil = Identity T_Nonterminals_s26 -> T_Nonterminals
T_Nonterminals (T_Nonterminals_s26 -> Identity T_Nonterminals_s26
forall (m :: * -> *) a. Monad m => a -> m a
return T_Nonterminals_s26
st26) where
{-# NOINLINE st26 #-}
st26 :: T_Nonterminals_s26
st26 = let
v25 :: T_Nonterminals_v25
v25 :: T_Nonterminals_v25
v25 = \ (T_Nonterminals_vIn25 Map Identifier (Map Identifier (Map Identifier [Expression]))
_lhsIaroundMap ContextMap
_lhsIclassContexts Map Identifier (Set Identifier)
_lhsIclosedHoNtDeps Map Identifier (Set Identifier)
_lhsIclosedHoNtRevDeps Map Identifier (Set Identifier)
_lhsIclosedNtDeps Map Identifier Attributes
_lhsIinhMap AttrOrderMap
_lhsImanualDeps Map
Identifier
(Map
Identifier (Map Identifier (Identifier, [Identifier], Expression)))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) -> ( let
_lhsOdepinfo :: [NontDependencyInformation]
_lhsOdepinfo :: [NontDependencyInformation]
_lhsOdepinfo = () -> [NontDependencyInformation]
forall a. () -> [a]
rule134 ()
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' :: Map Identifier Attributes
_lhsOinhMap' = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule135 ()
_lhsOinhmap :: Map.Map NontermIdent Attributes
_lhsOinhmap :: Map Identifier Attributes
_lhsOinhmap = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule136 ()
_lhsOlocalSigMap :: Map.Map NontermIdent (Map.Map ConstructorIdent (Map.Map Identifier Type))
_lhsOlocalSigMap :: Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap = () -> Map Identifier (Map Identifier Attributes)
forall k a. () -> Map k a
rule137 ()
_lhsOntDeps :: Map NontermIdent (Set NontermIdent)
_lhsOntDeps :: Map Identifier (Set Identifier)
_lhsOntDeps = () -> Map Identifier (Set Identifier)
rule138 ()
_lhsOntHoDeps :: Map NontermIdent (Set NontermIdent)
_lhsOntHoDeps :: Map Identifier (Set Identifier)
_lhsOntHoDeps = () -> Map Identifier (Set Identifier)
rule139 ()
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' :: Map Identifier Attributes
_lhsOsynMap' = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule140 ()
_lhsOsynmap :: Map.Map NontermIdent Attributes
_lhsOsynmap :: Map Identifier Attributes
_lhsOsynmap = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule141 ()
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule142 Int
_lhsIrulenumber
__result_ :: T_Nonterminals_vOut25
__result_ = [NontDependencyInformation]
-> Map Identifier Attributes
-> Map Identifier Attributes
-> Map Identifier (Map Identifier Attributes)
-> Map Identifier (Set Identifier)
-> Map Identifier (Set Identifier)
-> Int
-> Map Identifier Attributes
-> Map Identifier Attributes
-> T_Nonterminals_vOut25
T_Nonterminals_vOut25 [NontDependencyInformation]
_lhsOdepinfo Map Identifier Attributes
_lhsOinhMap' Map Identifier Attributes
_lhsOinhmap Map Identifier (Map Identifier Attributes)
_lhsOlocalSigMap Map Identifier (Set Identifier)
_lhsOntDeps Map Identifier (Set Identifier)
_lhsOntHoDeps Int
_lhsOrulenumber Map Identifier Attributes
_lhsOsynMap' Map Identifier Attributes
_lhsOsynmap
in T_Nonterminals_vOut25
__result_ )
in T_Nonterminals_v25 -> T_Nonterminals_s26
C_Nonterminals_s26 T_Nonterminals_v25
v25
{-# INLINE rule134 #-}
rule134 :: () -> [a]
rule134 = \ (()
_ :: ()) ->
[]
{-# INLINE rule135 #-}
rule135 :: () -> Map k a
rule135 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule136 #-}
rule136 :: () -> Map k a
rule136 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule137 #-}
rule137 :: () -> Map k a
rule137 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule138 #-}
rule138 :: () -> Map Identifier (Set Identifier)
rule138 = \ (()
_ :: ()) ->
Map Identifier (Set Identifier)
forall a. Monoid a => a
mempty
{-# INLINE rule139 #-}
rule139 :: () -> Map Identifier (Set Identifier)
rule139 = \ (()
_ :: ()) ->
Map Identifier (Set Identifier)
forall a. Monoid a => a
mempty
{-# INLINE rule140 #-}
rule140 :: () -> Map k a
rule140 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule141 #-}
rule141 :: () -> Map k a
rule141 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule142 #-}
rule142 :: Int -> Int
rule142 = \ ((Int
_lhsIrulenumber) :: Int) ->
Int
_lhsIrulenumber
data Inh_Pattern = Inh_Pattern { }
data Syn_Pattern = Syn_Pattern { Syn_Pattern -> Pattern
copy_Syn_Pattern :: (Pattern), Syn_Pattern -> Set Vertex
vertices_Syn_Pattern :: (Set.Set Vertex) }
{-# 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_s29
act) (Inh_Pattern
Inh_Pattern ) =
Identity Syn_Pattern -> Syn_Pattern
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Pattern_s29
sem <- Identity T_Pattern_s29
act
let arg28 :: T_Pattern_vIn28
arg28 = T_Pattern_vIn28
T_Pattern_vIn28
(T_Pattern_vOut28 Pattern
_lhsOcopy Set Vertex
_lhsOvertices) <- T_Pattern_vOut28 -> Identity T_Pattern_vOut28
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Pattern_s29 -> T_Pattern_v28
inv_Pattern_s29 T_Pattern_s29
sem T_Pattern_vIn28
arg28)
Syn_Pattern -> Identity Syn_Pattern
forall (m :: * -> *) a. Monad m => a -> m a
return (Pattern -> Set Vertex -> Syn_Pattern
Syn_Pattern Pattern
_lhsOcopy Set Vertex
_lhsOvertices)
)
{-# 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_s29
attach_T_Pattern :: Identity (T_Pattern_s29 )
}
newtype T_Pattern_s29 = C_Pattern_s29 {
T_Pattern_s29 -> T_Pattern_v28
inv_Pattern_s29 :: (T_Pattern_v28 )
}
data T_Pattern_s30 = C_Pattern_s30
type T_Pattern_v28 = (T_Pattern_vIn28 ) -> (T_Pattern_vOut28 )
data T_Pattern_vIn28 = T_Pattern_vIn28
data T_Pattern_vOut28 = T_Pattern_vOut28 (Pattern) (Set.Set Vertex)
{-# 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_s29 -> T_Pattern
T_Pattern (T_Pattern_s29 -> Identity T_Pattern_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s29
st29) where
{-# NOINLINE st29 #-}
st29 :: T_Pattern_s29
st29 = let
v28 :: T_Pattern_v28
v28 :: T_Pattern_v28
v28 = \ (T_Pattern_vIn28
T_Pattern_vIn28 ) -> ( let
_patsX32 :: T_Patterns_s32
_patsX32 = Identity T_Patterns_s32 -> T_Patterns_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s32
attach_T_Patterns (T_Patterns
arg_pats_))
(T_Patterns_vOut31 Patterns
_patsIcopy Set Vertex
_patsIvertices) = T_Patterns_s32 -> T_Patterns_v31
inv_Patterns_s32 T_Patterns_s32
_patsX32 (T_Patterns_vIn31
T_Patterns_vIn31 )
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex
rule143 Set Vertex
_patsIvertices
_copy :: Pattern
_copy = Patterns -> Identifier -> Pattern
rule144 Patterns
_patsIcopy Identifier
arg_name_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule145 Pattern
_copy
__result_ :: T_Pattern_vOut28
__result_ = Pattern -> Set Vertex -> T_Pattern_vOut28
T_Pattern_vOut28 Pattern
_lhsOcopy Set Vertex
_lhsOvertices
in T_Pattern_vOut28
__result_ )
in T_Pattern_v28 -> T_Pattern_s29
C_Pattern_s29 T_Pattern_v28
v28
{-# INLINE rule143 #-}
rule143 :: Set Vertex -> Set Vertex
rule143 = \ ((Set Vertex
_patsIvertices) :: Set.Set Vertex) ->
Set Vertex
_patsIvertices
{-# INLINE rule144 #-}
rule144 :: Patterns -> Identifier -> Pattern
rule144 = \ ((Patterns
_patsIcopy) :: Patterns) Identifier
name_ ->
Identifier -> Patterns -> Pattern
Constr Identifier
name_ Patterns
_patsIcopy
{-# INLINE rule145 #-}
rule145 :: p -> p
rule145 = \ p
_copy ->
p
_copy
{-# NOINLINE sem_Pattern_Product #-}
sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern
sem_Pattern_Product :: Pos -> T_Patterns -> T_Pattern
sem_Pattern_Product Pos
arg_pos_ T_Patterns
arg_pats_ = Identity T_Pattern_s29 -> T_Pattern
T_Pattern (T_Pattern_s29 -> Identity T_Pattern_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s29
st29) where
{-# NOINLINE st29 #-}
st29 :: T_Pattern_s29
st29 = let
v28 :: T_Pattern_v28
v28 :: T_Pattern_v28
v28 = \ (T_Pattern_vIn28
T_Pattern_vIn28 ) -> ( let
_patsX32 :: T_Patterns_s32
_patsX32 = Identity T_Patterns_s32 -> T_Patterns_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s32
attach_T_Patterns (T_Patterns
arg_pats_))
(T_Patterns_vOut31 Patterns
_patsIcopy Set Vertex
_patsIvertices) = T_Patterns_s32 -> T_Patterns_v31
inv_Patterns_s32 T_Patterns_s32
_patsX32 (T_Patterns_vIn31
T_Patterns_vIn31 )
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex
rule146 Set Vertex
_patsIvertices
_copy :: Pattern
_copy = Patterns -> Pos -> Pattern
rule147 Patterns
_patsIcopy Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule148 Pattern
_copy
__result_ :: T_Pattern_vOut28
__result_ = Pattern -> Set Vertex -> T_Pattern_vOut28
T_Pattern_vOut28 Pattern
_lhsOcopy Set Vertex
_lhsOvertices
in T_Pattern_vOut28
__result_ )
in T_Pattern_v28 -> T_Pattern_s29
C_Pattern_s29 T_Pattern_v28
v28
{-# INLINE rule146 #-}
rule146 :: Set Vertex -> Set Vertex
rule146 = \ ((Set Vertex
_patsIvertices) :: Set.Set Vertex) ->
Set Vertex
_patsIvertices
{-# INLINE rule147 #-}
rule147 :: Patterns -> Pos -> Pattern
rule147 = \ ((Patterns
_patsIcopy) :: Patterns) Pos
pos_ ->
Pos -> Patterns -> Pattern
Product Pos
pos_ Patterns
_patsIcopy
{-# INLINE rule148 #-}
rule148 :: p -> p
rule148 = \ p
_copy ->
p
_copy
{-# NOINLINE sem_Pattern_Alias #-}
sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern
sem_Pattern_Alias :: Identifier -> Identifier -> T_Pattern -> T_Pattern
sem_Pattern_Alias Identifier
arg_field_ Identifier
arg_attr_ T_Pattern
arg_pat_ = Identity T_Pattern_s29 -> T_Pattern
T_Pattern (T_Pattern_s29 -> Identity T_Pattern_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s29
st29) where
{-# NOINLINE st29 #-}
st29 :: T_Pattern_s29
st29 = let
v28 :: T_Pattern_v28
v28 :: T_Pattern_v28
v28 = \ (T_Pattern_vIn28
T_Pattern_vIn28 ) -> ( let
_patX29 :: T_Pattern_s29
_patX29 = Identity T_Pattern_s29 -> T_Pattern_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s29
attach_T_Pattern (T_Pattern
arg_pat_))
(T_Pattern_vOut28 Pattern
_patIcopy Set Vertex
_patIvertices) = T_Pattern_s29 -> T_Pattern_v28
inv_Pattern_s29 T_Pattern_s29
_patX29 (T_Pattern_vIn28
T_Pattern_vIn28 )
_vertex :: Vertex
_vertex = Identifier -> Identifier -> Vertex
rule149 Identifier
arg_attr_ Identifier
arg_field_
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Vertex -> Set Vertex
rule150 Set Vertex
_patIvertices Vertex
_vertex
_copy :: Pattern
_copy = Pattern -> Identifier -> Identifier -> Pattern
rule151 Pattern
_patIcopy Identifier
arg_attr_ Identifier
arg_field_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule152 Pattern
_copy
__result_ :: T_Pattern_vOut28
__result_ = Pattern -> Set Vertex -> T_Pattern_vOut28
T_Pattern_vOut28 Pattern
_lhsOcopy Set Vertex
_lhsOvertices
in T_Pattern_vOut28
__result_ )
in T_Pattern_v28 -> T_Pattern_s29
C_Pattern_s29 T_Pattern_v28
v28
{-# INLINE rule149 #-}
{-# LINE 55 "src-ag/KWOrder.ag" #-}
rule149 = \ attr_ field_ ->
{-# LINE 55 "src-ag/KWOrder.ag" #-}
if field_ == _INST then VChild attr_
else VAttr (if field_ == _LHS then Syn
else if field_ == _LOC then Loc
else Inh) field_ attr_
{-# LINE 1509 "src-generated/KWOrder.hs" #-}
{-# INLINE rule150 #-}
{-# LINE 59 "src-ag/KWOrder.ag" #-}
rule150 = \ ((_patIvertices) :: Set.Set Vertex) _vertex ->
{-# LINE 59 "src-ag/KWOrder.ag" #-}
Set.insert _vertex _patIvertices
{-# LINE 1515 "src-generated/KWOrder.hs" #-}
{-# INLINE rule151 #-}
rule151 = \ ((_patIcopy) :: Pattern) attr_ field_ ->
Alias field_ attr_ _patIcopy
{-# INLINE rule152 #-}
rule152 = \ _copy ->
_copy
{-# NOINLINE sem_Pattern_Irrefutable #-}
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern
sem_Pattern_Irrefutable T_Pattern
arg_pat_ = Identity T_Pattern_s29 -> T_Pattern
T_Pattern (T_Pattern_s29 -> Identity T_Pattern_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s29
st29) where
{-# NOINLINE st29 #-}
st29 :: T_Pattern_s29
st29 = let
v28 :: T_Pattern_v28
v28 :: T_Pattern_v28
v28 = \ (T_Pattern_vIn28
T_Pattern_vIn28 ) -> ( let
_patX29 :: T_Pattern_s29
_patX29 = Identity T_Pattern_s29 -> T_Pattern_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s29
attach_T_Pattern (T_Pattern
arg_pat_))
(T_Pattern_vOut28 Pattern
_patIcopy Set Vertex
_patIvertices) = T_Pattern_s29 -> T_Pattern_v28
inv_Pattern_s29 T_Pattern_s29
_patX29 (T_Pattern_vIn28
T_Pattern_vIn28 )
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex
rule153 Set Vertex
_patIvertices
_copy :: Pattern
_copy = Pattern -> Pattern
rule154 Pattern
_patIcopy
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule155 Pattern
_copy
__result_ :: T_Pattern_vOut28
__result_ = Pattern -> Set Vertex -> T_Pattern_vOut28
T_Pattern_vOut28 Pattern
_lhsOcopy Set Vertex
_lhsOvertices
in T_Pattern_vOut28
__result_ )
in T_Pattern_v28 -> T_Pattern_s29
C_Pattern_s29 T_Pattern_v28
v28
{-# INLINE rule153 #-}
rule153 :: Set Vertex -> Set Vertex
rule153 = \ ((Set Vertex
_patIvertices) :: Set.Set Vertex) ->
Set Vertex
_patIvertices
{-# INLINE rule154 #-}
rule154 :: Pattern -> Pattern
rule154 = \ ((Pattern
_patIcopy) :: Pattern) ->
Pattern -> Pattern
Irrefutable Pattern
_patIcopy
{-# INLINE rule155 #-}
rule155 :: p -> p
rule155 = \ p
_copy ->
p
_copy
{-# NOINLINE sem_Pattern_Underscore #-}
sem_Pattern_Underscore :: (Pos) -> T_Pattern
sem_Pattern_Underscore :: Pos -> T_Pattern
sem_Pattern_Underscore Pos
arg_pos_ = Identity T_Pattern_s29 -> T_Pattern
T_Pattern (T_Pattern_s29 -> Identity T_Pattern_s29
forall (m :: * -> *) a. Monad m => a -> m a
return T_Pattern_s29
st29) where
{-# NOINLINE st29 #-}
st29 :: T_Pattern_s29
st29 = let
v28 :: T_Pattern_v28
v28 :: T_Pattern_v28
v28 = \ (T_Pattern_vIn28
T_Pattern_vIn28 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule156 ()
_copy :: Pattern
_copy = Pos -> Pattern
rule157 Pos
arg_pos_
_lhsOcopy :: Pattern
_lhsOcopy :: Pattern
_lhsOcopy = Pattern -> Pattern
forall a. a -> a
rule158 Pattern
_copy
__result_ :: T_Pattern_vOut28
__result_ = Pattern -> Set Vertex -> T_Pattern_vOut28
T_Pattern_vOut28 Pattern
_lhsOcopy Set Vertex
_lhsOvertices
in T_Pattern_vOut28
__result_ )
in T_Pattern_v28 -> T_Pattern_s29
C_Pattern_s29 T_Pattern_v28
v28
{-# INLINE rule156 #-}
rule156 :: () -> Set a
rule156 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule157 #-}
rule157 :: Pos -> Pattern
rule157 = \ Pos
pos_ ->
Pos -> Pattern
Underscore Pos
pos_
{-# INLINE rule158 #-}
rule158 :: p -> p
rule158 = \ p
_copy ->
p
_copy
data Inh_Patterns = Inh_Patterns { }
data Syn_Patterns = Syn_Patterns { Syn_Patterns -> Patterns
copy_Syn_Patterns :: (Patterns), Syn_Patterns -> Set Vertex
vertices_Syn_Patterns :: (Set.Set Vertex) }
{-# 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_s32
act) (Inh_Patterns
Inh_Patterns ) =
Identity Syn_Patterns -> Syn_Patterns
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Patterns_s32
sem <- Identity T_Patterns_s32
act
let arg31 :: T_Patterns_vIn31
arg31 = T_Patterns_vIn31
T_Patterns_vIn31
(T_Patterns_vOut31 Patterns
_lhsOcopy Set Vertex
_lhsOvertices) <- T_Patterns_vOut31 -> Identity T_Patterns_vOut31
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Patterns_s32 -> T_Patterns_v31
inv_Patterns_s32 T_Patterns_s32
sem T_Patterns_vIn31
arg31)
Syn_Patterns -> Identity Syn_Patterns
forall (m :: * -> *) a. Monad m => a -> m a
return (Patterns -> Set Vertex -> Syn_Patterns
Syn_Patterns Patterns
_lhsOcopy Set Vertex
_lhsOvertices)
)
{-# 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_s32
attach_T_Patterns :: Identity (T_Patterns_s32 )
}
newtype T_Patterns_s32 = C_Patterns_s32 {
T_Patterns_s32 -> T_Patterns_v31
inv_Patterns_s32 :: (T_Patterns_v31 )
}
data T_Patterns_s33 = C_Patterns_s33
type T_Patterns_v31 = (T_Patterns_vIn31 ) -> (T_Patterns_vOut31 )
data T_Patterns_vIn31 = T_Patterns_vIn31
data T_Patterns_vOut31 = T_Patterns_vOut31 (Patterns) (Set.Set Vertex)
{-# 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_s32 -> T_Patterns
T_Patterns (T_Patterns_s32 -> Identity T_Patterns_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_Patterns_s32
st32 = let
v31 :: T_Patterns_v31
v31 :: T_Patterns_v31
v31 = \ (T_Patterns_vIn31
T_Patterns_vIn31 ) -> ( let
_hdX29 :: T_Pattern_s29
_hdX29 = Identity T_Pattern_s29 -> T_Pattern_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s29
attach_T_Pattern (T_Pattern
arg_hd_))
_tlX32 :: T_Patterns_s32
_tlX32 = Identity T_Patterns_s32 -> T_Patterns_s32
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Patterns -> Identity T_Patterns_s32
attach_T_Patterns (T_Patterns
arg_tl_))
(T_Pattern_vOut28 Pattern
_hdIcopy Set Vertex
_hdIvertices) = T_Pattern_s29 -> T_Pattern_v28
inv_Pattern_s29 T_Pattern_s29
_hdX29 (T_Pattern_vIn28
T_Pattern_vIn28 )
(T_Patterns_vOut31 Patterns
_tlIcopy Set Vertex
_tlIvertices) = T_Patterns_s32 -> T_Patterns_v31
inv_Patterns_s32 T_Patterns_s32
_tlX32 (T_Patterns_vIn31
T_Patterns_vIn31 )
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex -> Set Vertex
rule159 Set Vertex
_hdIvertices Set Vertex
_tlIvertices
_copy :: Patterns
_copy = Pattern -> Patterns -> Patterns
rule160 Pattern
_hdIcopy Patterns
_tlIcopy
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule161 Patterns
_copy
__result_ :: T_Patterns_vOut31
__result_ = Patterns -> Set Vertex -> T_Patterns_vOut31
T_Patterns_vOut31 Patterns
_lhsOcopy Set Vertex
_lhsOvertices
in T_Patterns_vOut31
__result_ )
in T_Patterns_v31 -> T_Patterns_s32
C_Patterns_s32 T_Patterns_v31
v31
{-# INLINE rule159 #-}
rule159 :: Set Vertex -> Set Vertex -> Set Vertex
rule159 = \ ((Set Vertex
_hdIvertices) :: Set.Set Vertex) ((Set Vertex
_tlIvertices) :: Set.Set Vertex) ->
Set Vertex
_hdIvertices Set Vertex -> Set Vertex -> Set Vertex
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set Vertex
_tlIvertices
{-# INLINE rule160 #-}
rule160 :: Pattern -> Patterns -> Patterns
rule160 = \ ((Pattern
_hdIcopy) :: Pattern) ((Patterns
_tlIcopy) :: Patterns) ->
(:) Pattern
_hdIcopy Patterns
_tlIcopy
{-# INLINE rule161 #-}
rule161 :: p -> p
rule161 = \ p
_copy ->
p
_copy
{-# NOINLINE sem_Patterns_Nil #-}
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil :: T_Patterns
sem_Patterns_Nil = Identity T_Patterns_s32 -> T_Patterns
T_Patterns (T_Patterns_s32 -> Identity T_Patterns_s32
forall (m :: * -> *) a. Monad m => a -> m a
return T_Patterns_s32
st32) where
{-# NOINLINE st32 #-}
st32 :: T_Patterns_s32
st32 = let
v31 :: T_Patterns_v31
v31 :: T_Patterns_v31
v31 = \ (T_Patterns_vIn31
T_Patterns_vIn31 ) -> ( let
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule162 ()
_copy :: [a]
_copy = () -> [a]
forall a. () -> [a]
rule163 ()
_lhsOcopy :: Patterns
_lhsOcopy :: Patterns
_lhsOcopy = Patterns -> Patterns
forall a. a -> a
rule164 Patterns
forall a. [a]
_copy
__result_ :: T_Patterns_vOut31
__result_ = Patterns -> Set Vertex -> T_Patterns_vOut31
T_Patterns_vOut31 Patterns
_lhsOcopy Set Vertex
_lhsOvertices
in T_Patterns_vOut31
__result_ )
in T_Patterns_v31 -> T_Patterns_s32
C_Patterns_s32 T_Patterns_v31
v31
{-# INLINE rule162 #-}
rule162 :: () -> Set a
rule162 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule163 #-}
rule163 :: () -> [a]
rule163 = \ (()
_ :: ()) ->
[]
{-# INLINE rule164 #-}
rule164 :: p -> p
rule164 = \ p
_copy ->
p
_copy
data Inh_Production = Inh_Production { Inh_Production -> Map Identifier (Map Identifier [Expression])
aroundMap_Inh_Production :: (Map ConstructorIdent (Map Identifier [Expression])), Inh_Production -> Map Identifier Attributes
inhMap_Inh_Production :: (Map Identifier Attributes), Inh_Production -> Map Identifier (Set Dependency)
manualDeps_Inh_Production :: (Map ConstructorIdent (Set Dependency)), Inh_Production
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))), Inh_Production -> Options
options_Inh_Production :: (Options), Inh_Production -> Int
rulenumber_Inh_Production :: (Int), Inh_Production -> Map Identifier Attributes
synMap_Inh_Production :: (Map Identifier Attributes) }
data Syn_Production = Syn_Production { Syn_Production -> ProdDependencyGraph
depgraph_Syn_Production :: (ProdDependencyGraph), Syn_Production -> Map Identifier Attributes
localSigMap_Syn_Production :: (Map.Map ConstructorIdent (Map.Map Identifier Type)), Syn_Production -> Set Identifier
refHoNts_Syn_Production :: (Set NontermIdent), Syn_Production -> Set Identifier
refNts_Syn_Production :: (Set NontermIdent), Syn_Production -> Int
rulenumber_Syn_Production :: (Int) }
{-# 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_s35
act) (Inh_Production Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) =
Identity Syn_Production -> Syn_Production
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Production_s35
sem <- Identity T_Production_s35
act
let arg34 :: T_Production_vIn34
arg34 = Map Identifier (Map Identifier [Expression])
-> Map Identifier Attributes
-> Map Identifier (Set Dependency)
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Production_vIn34
T_Production_vIn34 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap
(T_Production_vOut34 ProdDependencyGraph
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber) <- T_Production_vOut34 -> Identity T_Production_vOut34
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Production_s35 -> T_Production_v34
inv_Production_s35 T_Production_s35
sem T_Production_vIn34
arg34)
Syn_Production -> Identity Syn_Production
forall (m :: * -> *) a. Monad m => a -> m a
return (ProdDependencyGraph
-> Map Identifier Attributes
-> Set Identifier
-> Set Identifier
-> Int
-> Syn_Production
Syn_Production ProdDependencyGraph
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber)
)
{-# 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_s35
attach_T_Production :: Identity (T_Production_s35 )
}
newtype T_Production_s35 = C_Production_s35 {
T_Production_s35 -> T_Production_v34
inv_Production_s35 :: (T_Production_v34 )
}
data T_Production_s36 = C_Production_s36
type T_Production_v34 = (T_Production_vIn34 ) -> (T_Production_vOut34 )
data T_Production_vIn34 = T_Production_vIn34 (Map ConstructorIdent (Map Identifier [Expression])) (Map Identifier Attributes) (Map ConstructorIdent (Set Dependency)) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) (Options) (Int) (Map Identifier Attributes)
data T_Production_vOut34 = T_Production_vOut34 (ProdDependencyGraph) (Map.Map ConstructorIdent (Map.Map Identifier Type)) (Set NontermIdent) (Set NontermIdent) (Int)
{-# NOINLINE sem_Production_Production #-}
sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children -> T_Rules -> T_TypeSigs -> (MaybeMacro) -> T_Production
sem_Production_Production :: Identifier
-> [Identifier]
-> [Type]
-> T_Children
-> T_Rules
-> T_TypeSigs
-> MaybeMacro
-> T_Production
sem_Production_Production Identifier
arg_con_ [Identifier]
arg_params_ [Type]
arg_constraints_ T_Children
arg_children_ T_Rules
arg_rules_ T_TypeSigs
arg_typeSigs_ MaybeMacro
_ = Identity T_Production_s35 -> T_Production
T_Production (T_Production_s35 -> Identity T_Production_s35
forall (m :: * -> *) a. Monad m => a -> m a
return T_Production_s35
st35) where
{-# NOINLINE st35 #-}
st35 :: T_Production_s35
st35 = let
v34 :: T_Production_v34
v34 :: T_Production_v34
v34 = \ (T_Production_vIn34 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber 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_))
_rulesX44 :: T_Rules_s44
_rulesX44 = Identity T_Rules_s44 -> T_Rules_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rules -> Identity T_Rules_s44
attach_T_Rules (T_Rules
arg_rules_))
_typeSigsX50 :: T_TypeSigs_s50
_typeSigsX50 = Identity T_TypeSigs_s50 -> T_TypeSigs_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSigs -> Identity T_TypeSigs_s50
attach_T_TypeSigs (T_TypeSigs
arg_typeSigs_))
(T_Children_vOut4 EChildren
_childrenIechilds Set (Vertex, Vertex)
_childrenIedges [(Identifier, Identifier)]
_childrenInontnames Set Identifier
_childrenIrefHoNts Set Identifier
_childrenIrefNts Set Vertex
_childrenIvertices) = T_Children_s5 -> T_Children_v4
inv_Children_s5 T_Children_s5
_childrenX5 (Map Identifier [Expression]
-> Map Identifier Attributes
-> Map Identifier (Identifier, [Identifier], Expression)
-> Set Identifier
-> Options
-> Map Identifier Attributes
-> T_Children_vIn4
T_Children_vIn4 Map Identifier [Expression]
_childrenOaroundMap Map Identifier Attributes
_childrenOinhMap Map Identifier (Identifier, [Identifier], Expression)
_childrenOmergeMap Set Identifier
_childrenOmergedChildren Options
_childrenOoptions Map Identifier Attributes
_childrenOsynMap)
(T_Rules_vOut43 Set (Vertex, Vertex)
_rulesIedges ERules
_rulesIerules Int
_rulesIrulenumber Set Vertex
_rulesIvertices) = T_Rules_s44 -> T_Rules_v43
inv_Rules_s44 T_Rules_s44
_rulesX44 (Int -> T_Rules_vIn43
T_Rules_vIn43 Int
_rulesOrulenumber)
(T_TypeSigs_vOut49 Attributes
_typeSigsIlocalSigMap) = T_TypeSigs_s50 -> T_TypeSigs_v49
inv_TypeSigs_s50 T_TypeSigs_s50
_typeSigsX50 (T_TypeSigs_vIn49
T_TypeSigs_vIn49 )
_aroundMap :: Map Identifier [Expression]
_aroundMap = Map Identifier (Map Identifier [Expression])
-> Identifier -> Map Identifier [Expression]
rule165 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Identifier
arg_con_
_mergeMap :: Map Identifier (Identifier, [Identifier], Expression)
_mergeMap = Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Identifier
-> Map Identifier (Identifier, [Identifier], Expression)
rule166 Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Identifier
arg_con_
_mergedChildren :: Set Identifier
_mergedChildren = Map Identifier (Identifier, [Identifier], Expression)
-> Set Identifier
forall k a c. Map k (a, [Identifier], c) -> Set Identifier
rule167 Map Identifier (Identifier, [Identifier], Expression)
_mergeMap
_lhsOlocalSigMap :: Map.Map ConstructorIdent (Map.Map Identifier Type)
_lhsOlocalSigMap :: Map Identifier Attributes
_lhsOlocalSigMap = Attributes -> Identifier -> Map Identifier Attributes
forall k. Attributes -> k -> Map k Attributes
rule168 Attributes
_typeSigsIlocalSigMap Identifier
arg_con_
_vertices :: Set Vertex
_vertices = Set Vertex -> Set Vertex -> Set Vertex
rule169 Set Vertex
_childrenIvertices Set Vertex
_rulesIvertices
_manualDeps :: Set Dependency
_manualDeps = Map Identifier (Set Dependency) -> Identifier -> Set Dependency
rule170 Map Identifier (Set Dependency)
_lhsImanualDeps Identifier
arg_con_
_manualEdges :: Set (Vertex, Vertex)
_manualEdges = Set Dependency -> Set (Vertex, Vertex)
rule171 Set Dependency
_manualDeps
_edges :: Set (Vertex, Vertex)
_edges = Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
rule172 Set (Vertex, Vertex)
_childrenIedges Set (Vertex, Vertex)
_rulesIedges
_lhsOdepgraph :: ProdDependencyGraph
_lhsOdepgraph :: ProdDependencyGraph
_lhsOdepgraph = EChildren
-> [(Identifier, Identifier)]
-> Set (Vertex, Vertex)
-> ERules
-> Set Vertex
-> Identifier
-> [Type]
-> [Identifier]
-> ProdDependencyGraph
rule173 EChildren
_childrenIechilds [(Identifier, Identifier)]
_childrenInontnames Set (Vertex, Vertex)
_edges ERules
_rulesIerules Set Vertex
_vertices Identifier
arg_con_ [Type]
arg_constraints_ [Identifier]
arg_params_
_lhsOrefHoNts :: Set NontermIdent
_lhsOrefHoNts :: Set Identifier
_lhsOrefHoNts = Set Identifier -> Set Identifier
rule174 Set Identifier
_childrenIrefHoNts
_lhsOrefNts :: Set NontermIdent
_lhsOrefNts :: Set Identifier
_lhsOrefNts = Set Identifier -> Set Identifier
rule175 Set Identifier
_childrenIrefNts
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule176 Int
_rulesIrulenumber
_childrenOaroundMap :: Map Identifier [Expression]
_childrenOaroundMap = Map Identifier [Expression] -> Map Identifier [Expression]
forall a. a -> a
rule177 Map Identifier [Expression]
_aroundMap
_childrenOinhMap :: Map Identifier Attributes
_childrenOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule178 Map Identifier Attributes
_lhsIinhMap
_childrenOmergeMap :: Map Identifier (Identifier, [Identifier], Expression)
_childrenOmergeMap = Map Identifier (Identifier, [Identifier], Expression)
-> Map Identifier (Identifier, [Identifier], Expression)
forall a. a -> a
rule179 Map Identifier (Identifier, [Identifier], Expression)
_mergeMap
_childrenOmergedChildren :: Set Identifier
_childrenOmergedChildren = Set Identifier -> Set Identifier
forall a. a -> a
rule180 Set Identifier
_mergedChildren
_childrenOoptions :: Options
_childrenOoptions = Options -> Options
rule181 Options
_lhsIoptions
_childrenOsynMap :: Map Identifier Attributes
_childrenOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule182 Map Identifier Attributes
_lhsIsynMap
_rulesOrulenumber :: Int
_rulesOrulenumber = Int -> Int
rule183 Int
_lhsIrulenumber
__result_ :: T_Production_vOut34
__result_ = ProdDependencyGraph
-> Map Identifier Attributes
-> Set Identifier
-> Set Identifier
-> Int
-> T_Production_vOut34
T_Production_vOut34 ProdDependencyGraph
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber
in T_Production_vOut34
__result_ )
in T_Production_v34 -> T_Production_s35
C_Production_s35 T_Production_v34
v34
{-# INLINE rule165 #-}
{-# LINE 89 "src-ag/ExecutionPlanCommon.ag" #-}
rule165 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) con_ ->
{-# LINE 89 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Map.empty con_ _lhsIaroundMap
{-# LINE 1731 "src-generated/KWOrder.hs" #-}
{-# INLINE rule166 #-}
{-# LINE 114 "src-ag/ExecutionPlanCommon.ag" #-}
rule166 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) con_ ->
{-# LINE 114 "src-ag/ExecutionPlanCommon.ag" #-}
Map.findWithDefault Map.empty con_ _lhsImergeMap
{-# LINE 1737 "src-generated/KWOrder.hs" #-}
{-# INLINE rule167 #-}
{-# LINE 120 "src-ag/ExecutionPlanCommon.ag" #-}
rule167 = \ _mergeMap ->
{-# LINE 120 "src-ag/ExecutionPlanCommon.ag" #-}
Set.unions [ Set.fromList ms | (_,ms,_) <- Map.elems _mergeMap ]
{-# LINE 1743 "src-generated/KWOrder.hs" #-}
{-# INLINE rule168 #-}
{-# LINE 160 "src-ag/ExecutionPlanCommon.ag" #-}
rule168 = \ ((_typeSigsIlocalSigMap) :: Map Identifier Type) con_ ->
{-# LINE 160 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton con_ _typeSigsIlocalSigMap
{-# LINE 1749 "src-generated/KWOrder.hs" #-}
{-# INLINE rule169 #-}
{-# LINE 79 "src-ag/KWOrder.ag" #-}
rule169 = \ ((_childrenIvertices) :: Set.Set Vertex) ((_rulesIvertices) :: Set.Set Vertex) ->
{-# LINE 79 "src-ag/KWOrder.ag" #-}
_rulesIvertices `Set.union` _childrenIvertices
{-# LINE 1755 "src-generated/KWOrder.hs" #-}
{-# INLINE rule170 #-}
{-# LINE 122 "src-ag/KWOrder.ag" #-}
rule170 = \ ((_lhsImanualDeps) :: Map ConstructorIdent (Set Dependency)) con_ ->
{-# LINE 122 "src-ag/KWOrder.ag" #-}
Map.findWithDefault Set.empty con_ _lhsImanualDeps
{-# LINE 1761 "src-generated/KWOrder.hs" #-}
{-# INLINE rule171 #-}
{-# LINE 123 "src-ag/KWOrder.ag" #-}
rule171 = \ _manualDeps ->
{-# LINE 123 "src-ag/KWOrder.ag" #-}
Set.map depToEdge _manualDeps
{-# LINE 1767 "src-generated/KWOrder.hs" #-}
{-# INLINE rule172 #-}
{-# LINE 145 "src-ag/KWOrder.ag" #-}
rule172 = \ ((_childrenIedges) :: Set.Set Edge) ((_rulesIedges) :: Set.Set Edge) ->
{-# LINE 145 "src-ag/KWOrder.ag" #-}
_rulesIedges `Set.union` _childrenIedges
{-# LINE 1773 "src-generated/KWOrder.hs" #-}
{-# INLINE rule173 #-}
{-# LINE 160 "src-ag/KWOrder.ag" #-}
rule173 = \ ((_childrenIechilds) :: EChildren) ((_childrenInontnames) :: [(Identifier, Identifier)]) _edges ((_rulesIerules) :: ERules) _vertices con_ constraints_ params_ ->
{-# LINE 160 "src-ag/KWOrder.ag" #-}
ProdDependencyGraph { pdgVertices = Set.toList _vertices
, pdgEdges = Set.toList _edges
, pdgRules = _rulesIerules
, pdgChilds = _childrenIechilds
, pdgProduction = con_
, pdgChildMap = _childrenInontnames
, pdgConstraints = constraints_
, pdgParams = params_ }
{-# LINE 1786 "src-generated/KWOrder.hs" #-}
{-# INLINE rule174 #-}
rule174 = \ ((_childrenIrefHoNts) :: Set NontermIdent) ->
_childrenIrefHoNts
{-# INLINE rule175 #-}
rule175 = \ ((_childrenIrefNts) :: Set NontermIdent) ->
_childrenIrefNts
{-# INLINE rule176 #-}
rule176 = \ ((_rulesIrulenumber) :: Int) ->
_rulesIrulenumber
{-# INLINE rule177 #-}
rule177 = \ _aroundMap ->
_aroundMap
{-# INLINE rule178 #-}
rule178 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->
_lhsIinhMap
{-# INLINE rule179 #-}
rule179 = \ _mergeMap ->
_mergeMap
{-# INLINE rule180 #-}
rule180 = \ _mergedChildren ->
_mergedChildren
{-# INLINE rule181 #-}
rule181 = \ ((_lhsIoptions) :: Options) ->
_lhsIoptions
{-# INLINE rule182 #-}
rule182 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->
_lhsIsynMap
{-# INLINE rule183 #-}
rule183 = \ ((_lhsIrulenumber) :: Int) ->
_lhsIrulenumber
data Inh_Productions = Inh_Productions { Inh_Productions -> Map Identifier (Map Identifier [Expression])
aroundMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier [Expression])), Inh_Productions -> Map Identifier Attributes
inhMap_Inh_Productions :: (Map Identifier Attributes), Inh_Productions -> Map Identifier (Set Dependency)
manualDeps_Inh_Productions :: (Map ConstructorIdent (Set Dependency)), Inh_Productions
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))), Inh_Productions -> Options
options_Inh_Productions :: (Options), Inh_Productions -> Int
rulenumber_Inh_Productions :: (Int), Inh_Productions -> Map Identifier Attributes
synMap_Inh_Productions :: (Map Identifier Attributes) }
data Syn_Productions = Syn_Productions { Syn_Productions -> [ProdDependencyGraph]
depgraph_Syn_Productions :: ([ProdDependencyGraph]), Syn_Productions -> Map Identifier Attributes
localSigMap_Syn_Productions :: (Map.Map ConstructorIdent (Map.Map Identifier Type)), Syn_Productions -> Set Identifier
refHoNts_Syn_Productions :: (Set NontermIdent), Syn_Productions -> Set Identifier
refNts_Syn_Productions :: (Set NontermIdent), Syn_Productions -> Int
rulenumber_Syn_Productions :: (Int) }
{-# 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_s38
act) (Inh_Productions Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) =
Identity Syn_Productions -> Syn_Productions
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Productions_s38
sem <- Identity T_Productions_s38
act
let arg37 :: T_Productions_vIn37
arg37 = Map Identifier (Map Identifier [Expression])
-> Map Identifier Attributes
-> Map Identifier (Set Dependency)
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Productions_vIn37
T_Productions_vIn37 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap
(T_Productions_vOut37 [ProdDependencyGraph]
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber) <- T_Productions_vOut37 -> Identity T_Productions_vOut37
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Productions_s38 -> T_Productions_v37
inv_Productions_s38 T_Productions_s38
sem T_Productions_vIn37
arg37)
Syn_Productions -> Identity Syn_Productions
forall (m :: * -> *) a. Monad m => a -> m a
return ([ProdDependencyGraph]
-> Map Identifier Attributes
-> Set Identifier
-> Set Identifier
-> Int
-> Syn_Productions
Syn_Productions [ProdDependencyGraph]
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber)
)
{-# 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_s38
attach_T_Productions :: Identity (T_Productions_s38 )
}
newtype T_Productions_s38 = C_Productions_s38 {
T_Productions_s38 -> T_Productions_v37
inv_Productions_s38 :: (T_Productions_v37 )
}
data T_Productions_s39 = C_Productions_s39
type T_Productions_v37 = (T_Productions_vIn37 ) -> (T_Productions_vOut37 )
data T_Productions_vIn37 = T_Productions_vIn37 (Map ConstructorIdent (Map Identifier [Expression])) (Map Identifier Attributes) (Map ConstructorIdent (Set Dependency)) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) (Options) (Int) (Map Identifier Attributes)
data T_Productions_vOut37 = T_Productions_vOut37 ([ProdDependencyGraph]) (Map.Map ConstructorIdent (Map.Map Identifier Type)) (Set NontermIdent) (Set NontermIdent) (Int)
{-# 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_s38 -> T_Productions
T_Productions (T_Productions_s38 -> Identity T_Productions_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_Productions_s38
st38) where
{-# NOINLINE st38 #-}
st38 :: T_Productions_s38
st38 = let
v37 :: T_Productions_v37
v37 :: T_Productions_v37
v37 = \ (T_Productions_vIn37 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) -> ( let
_hdX35 :: T_Production_s35
_hdX35 = Identity T_Production_s35 -> T_Production_s35
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Production -> Identity T_Production_s35
attach_T_Production (T_Production
arg_hd_))
_tlX38 :: T_Productions_s38
_tlX38 = Identity T_Productions_s38 -> T_Productions_s38
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Productions -> Identity T_Productions_s38
attach_T_Productions (T_Productions
arg_tl_))
(T_Production_vOut34 ProdDependencyGraph
_hdIdepgraph Map Identifier Attributes
_hdIlocalSigMap Set Identifier
_hdIrefHoNts Set Identifier
_hdIrefNts Int
_hdIrulenumber) = T_Production_s35 -> T_Production_v34
inv_Production_s35 T_Production_s35
_hdX35 (Map Identifier (Map Identifier [Expression])
-> Map Identifier Attributes
-> Map Identifier (Set Dependency)
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Production_vIn34
T_Production_vIn34 Map Identifier (Map Identifier [Expression])
_hdOaroundMap Map Identifier Attributes
_hdOinhMap Map Identifier (Set Dependency)
_hdOmanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_hdOmergeMap Options
_hdOoptions Int
_hdOrulenumber Map Identifier Attributes
_hdOsynMap)
(T_Productions_vOut37 [ProdDependencyGraph]
_tlIdepgraph Map Identifier Attributes
_tlIlocalSigMap Set Identifier
_tlIrefHoNts Set Identifier
_tlIrefNts Int
_tlIrulenumber) = T_Productions_s38 -> T_Productions_v37
inv_Productions_s38 T_Productions_s38
_tlX38 (Map Identifier (Map Identifier [Expression])
-> Map Identifier Attributes
-> Map Identifier (Set Dependency)
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Options
-> Int
-> Map Identifier Attributes
-> T_Productions_vIn37
T_Productions_vIn37 Map Identifier (Map Identifier [Expression])
_tlOaroundMap Map Identifier Attributes
_tlOinhMap Map Identifier (Set Dependency)
_tlOmanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_tlOmergeMap Options
_tlOoptions Int
_tlOrulenumber Map Identifier Attributes
_tlOsynMap)
_lhsOdepgraph :: [ProdDependencyGraph]
_lhsOdepgraph :: [ProdDependencyGraph]
_lhsOdepgraph = ProdDependencyGraph
-> [ProdDependencyGraph] -> [ProdDependencyGraph]
rule184 ProdDependencyGraph
_hdIdepgraph [ProdDependencyGraph]
_tlIdepgraph
_lhsOlocalSigMap :: Map.Map ConstructorIdent (Map.Map Identifier Type)
_lhsOlocalSigMap :: Map Identifier Attributes
_lhsOlocalSigMap = Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule185 Map Identifier Attributes
_hdIlocalSigMap Map Identifier Attributes
_tlIlocalSigMap
_lhsOrefHoNts :: Set NontermIdent
_lhsOrefHoNts :: Set Identifier
_lhsOrefHoNts = Set Identifier -> Set Identifier -> Set Identifier
rule186 Set Identifier
_hdIrefHoNts Set Identifier
_tlIrefHoNts
_lhsOrefNts :: Set NontermIdent
_lhsOrefNts :: Set Identifier
_lhsOrefNts = Set Identifier -> Set Identifier -> Set Identifier
rule187 Set Identifier
_hdIrefNts Set Identifier
_tlIrefNts
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule188 Int
_tlIrulenumber
_hdOaroundMap :: Map Identifier (Map Identifier [Expression])
_hdOaroundMap = Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
rule189 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap
_hdOinhMap :: Map Identifier Attributes
_hdOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule190 Map Identifier Attributes
_lhsIinhMap
_hdOmanualDeps :: Map Identifier (Set Dependency)
_hdOmanualDeps = Map Identifier (Set Dependency) -> Map Identifier (Set Dependency)
rule191 Map Identifier (Set Dependency)
_lhsImanualDeps
_hdOmergeMap :: Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_hdOmergeMap = Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
rule192 Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap
_hdOoptions :: Options
_hdOoptions = Options -> Options
rule193 Options
_lhsIoptions
_hdOrulenumber :: Int
_hdOrulenumber = Int -> Int
rule194 Int
_lhsIrulenumber
_hdOsynMap :: Map Identifier Attributes
_hdOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule195 Map Identifier Attributes
_lhsIsynMap
_tlOaroundMap :: Map Identifier (Map Identifier [Expression])
_tlOaroundMap = Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
rule196 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap
_tlOinhMap :: Map Identifier Attributes
_tlOinhMap = Map Identifier Attributes -> Map Identifier Attributes
rule197 Map Identifier Attributes
_lhsIinhMap
_tlOmanualDeps :: Map Identifier (Set Dependency)
_tlOmanualDeps = Map Identifier (Set Dependency) -> Map Identifier (Set Dependency)
rule198 Map Identifier (Set Dependency)
_lhsImanualDeps
_tlOmergeMap :: Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_tlOmergeMap = Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
rule199 Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap
_tlOoptions :: Options
_tlOoptions = Options -> Options
rule200 Options
_lhsIoptions
_tlOrulenumber :: Int
_tlOrulenumber = Int -> Int
rule201 Int
_hdIrulenumber
_tlOsynMap :: Map Identifier Attributes
_tlOsynMap = Map Identifier Attributes -> Map Identifier Attributes
rule202 Map Identifier Attributes
_lhsIsynMap
__result_ :: T_Productions_vOut37
__result_ = [ProdDependencyGraph]
-> Map Identifier Attributes
-> Set Identifier
-> Set Identifier
-> Int
-> T_Productions_vOut37
T_Productions_vOut37 [ProdDependencyGraph]
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber
in T_Productions_vOut37
__result_ )
in T_Productions_v37 -> T_Productions_s38
C_Productions_s38 T_Productions_v37
v37
{-# INLINE rule184 #-}
rule184 :: ProdDependencyGraph
-> [ProdDependencyGraph] -> [ProdDependencyGraph]
rule184 = \ ((ProdDependencyGraph
_hdIdepgraph) :: ProdDependencyGraph) (([ProdDependencyGraph]
_tlIdepgraph) :: [ProdDependencyGraph]) ->
ProdDependencyGraph
_hdIdepgraph ProdDependencyGraph
-> [ProdDependencyGraph] -> [ProdDependencyGraph]
forall a. a -> [a] -> [a]
: [ProdDependencyGraph]
_tlIdepgraph
{-# INLINE rule185 #-}
rule185 :: Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
rule185 = \ ((Map Identifier Attributes
_hdIlocalSigMap) :: Map.Map ConstructorIdent (Map.Map Identifier Type)) ((Map Identifier Attributes
_tlIlocalSigMap) :: Map.Map ConstructorIdent (Map.Map Identifier Type)) ->
Map Identifier Attributes
_hdIlocalSigMap Map Identifier Attributes
-> Map Identifier Attributes -> Map Identifier Attributes
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Map Identifier Attributes
_tlIlocalSigMap
{-# INLINE rule186 #-}
rule186 :: Set Identifier -> Set Identifier -> Set Identifier
rule186 = \ ((Set Identifier
_hdIrefHoNts) :: Set NontermIdent) ((Set Identifier
_tlIrefHoNts) :: Set NontermIdent) ->
Set Identifier
_hdIrefHoNts Set Identifier -> Set Identifier -> Set Identifier
forall a. Monoid a => a -> a -> a
`mappend` Set Identifier
_tlIrefHoNts
{-# INLINE rule187 #-}
rule187 :: Set Identifier -> Set Identifier -> Set Identifier
rule187 = \ ((Set Identifier
_hdIrefNts) :: Set NontermIdent) ((Set Identifier
_tlIrefNts) :: Set NontermIdent) ->
Set Identifier
_hdIrefNts Set Identifier -> Set Identifier -> Set Identifier
forall a. Monoid a => a -> a -> a
`mappend` Set Identifier
_tlIrefNts
{-# INLINE rule188 #-}
rule188 :: Int -> Int
rule188 = \ ((Int
_tlIrulenumber) :: Int) ->
Int
_tlIrulenumber
{-# INLINE rule189 #-}
rule189 :: Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
rule189 = \ ((Map Identifier (Map Identifier [Expression])
_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->
Map Identifier (Map Identifier [Expression])
_lhsIaroundMap
{-# INLINE rule190 #-}
rule190 :: Map Identifier Attributes -> Map Identifier Attributes
rule190 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIinhMap
{-# INLINE rule191 #-}
rule191 :: Map Identifier (Set Dependency) -> Map Identifier (Set Dependency)
rule191 = \ ((Map Identifier (Set Dependency)
_lhsImanualDeps) :: Map ConstructorIdent (Set Dependency)) ->
Map Identifier (Set Dependency)
_lhsImanualDeps
{-# INLINE rule192 #-}
rule192 :: Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
rule192 = \ ((Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) ->
Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap
{-# INLINE rule193 #-}
rule193 :: Options -> Options
rule193 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule194 #-}
rule194 :: Int -> Int
rule194 = \ ((Int
_lhsIrulenumber) :: Int) ->
Int
_lhsIrulenumber
{-# INLINE rule195 #-}
rule195 :: Map Identifier Attributes -> Map Identifier Attributes
rule195 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIsynMap
{-# INLINE rule196 #-}
rule196 :: Map Identifier (Map Identifier [Expression])
-> Map Identifier (Map Identifier [Expression])
rule196 = \ ((Map Identifier (Map Identifier [Expression])
_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->
Map Identifier (Map Identifier [Expression])
_lhsIaroundMap
{-# INLINE rule197 #-}
rule197 :: Map Identifier Attributes -> Map Identifier Attributes
rule197 = \ ((Map Identifier Attributes
_lhsIinhMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIinhMap
{-# INLINE rule198 #-}
rule198 :: Map Identifier (Set Dependency) -> Map Identifier (Set Dependency)
rule198 = \ ((Map Identifier (Set Dependency)
_lhsImanualDeps) :: Map ConstructorIdent (Set Dependency)) ->
Map Identifier (Set Dependency)
_lhsImanualDeps
{-# INLINE rule199 #-}
rule199 :: Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
-> Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
rule199 = \ ((Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression))) ->
Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap
{-# INLINE rule200 #-}
rule200 :: Options -> Options
rule200 = \ ((Options
_lhsIoptions) :: Options) ->
Options
_lhsIoptions
{-# INLINE rule201 #-}
rule201 :: Int -> Int
rule201 = \ ((Int
_hdIrulenumber) :: Int) ->
Int
_hdIrulenumber
{-# INLINE rule202 #-}
rule202 :: Map Identifier Attributes -> Map Identifier Attributes
rule202 = \ ((Map Identifier Attributes
_lhsIsynMap) :: Map Identifier Attributes) ->
Map Identifier Attributes
_lhsIsynMap
{-# NOINLINE sem_Productions_Nil #-}
sem_Productions_Nil :: T_Productions
sem_Productions_Nil :: T_Productions
sem_Productions_Nil = Identity T_Productions_s38 -> T_Productions
T_Productions (T_Productions_s38 -> Identity T_Productions_s38
forall (m :: * -> *) a. Monad m => a -> m a
return T_Productions_s38
st38) where
{-# NOINLINE st38 #-}
st38 :: T_Productions_s38
st38 = let
v37 :: T_Productions_v37
v37 :: T_Productions_v37
v37 = \ (T_Productions_vIn37 Map Identifier (Map Identifier [Expression])
_lhsIaroundMap Map Identifier Attributes
_lhsIinhMap Map Identifier (Set Dependency)
_lhsImanualDeps Map
Identifier (Map Identifier (Identifier, [Identifier], Expression))
_lhsImergeMap Options
_lhsIoptions Int
_lhsIrulenumber Map Identifier Attributes
_lhsIsynMap) -> ( let
_lhsOdepgraph :: [ProdDependencyGraph]
_lhsOdepgraph :: [ProdDependencyGraph]
_lhsOdepgraph = () -> [ProdDependencyGraph]
forall a. () -> [a]
rule203 ()
_lhsOlocalSigMap :: Map.Map ConstructorIdent (Map.Map Identifier Type)
_lhsOlocalSigMap :: Map Identifier Attributes
_lhsOlocalSigMap = () -> Map Identifier Attributes
forall k a. () -> Map k a
rule204 ()
_lhsOrefHoNts :: Set NontermIdent
_lhsOrefHoNts :: Set Identifier
_lhsOrefHoNts = () -> Set Identifier
rule205 ()
_lhsOrefNts :: Set NontermIdent
_lhsOrefNts :: Set Identifier
_lhsOrefNts = () -> Set Identifier
rule206 ()
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule207 Int
_lhsIrulenumber
__result_ :: T_Productions_vOut37
__result_ = [ProdDependencyGraph]
-> Map Identifier Attributes
-> Set Identifier
-> Set Identifier
-> Int
-> T_Productions_vOut37
T_Productions_vOut37 [ProdDependencyGraph]
_lhsOdepgraph Map Identifier Attributes
_lhsOlocalSigMap Set Identifier
_lhsOrefHoNts Set Identifier
_lhsOrefNts Int
_lhsOrulenumber
in T_Productions_vOut37
__result_ )
in T_Productions_v37 -> T_Productions_s38
C_Productions_s38 T_Productions_v37
v37
{-# INLINE rule203 #-}
rule203 :: () -> [a]
rule203 = \ (()
_ :: ()) ->
[]
{-# INLINE rule204 #-}
rule204 :: () -> Map k a
rule204 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty
{-# INLINE rule205 #-}
rule205 :: () -> Set Identifier
rule205 = \ (()
_ :: ()) ->
Set Identifier
forall a. Monoid a => a
mempty
{-# INLINE rule206 #-}
rule206 :: () -> Set Identifier
rule206 = \ (()
_ :: ()) ->
Set Identifier
forall a. Monoid a => a
mempty
{-# INLINE rule207 #-}
rule207 :: Int -> Int
rule207 = \ ((Int
_lhsIrulenumber) :: Int) ->
Int
_lhsIrulenumber
data Inh_Rule = Inh_Rule { Inh_Rule -> Int
rulenumber_Inh_Rule :: (Int) }
data Syn_Rule = Syn_Rule { Syn_Rule -> Set (Vertex, Vertex)
edges_Syn_Rule :: (Set.Set Edge), Syn_Rule -> ERule
erules_Syn_Rule :: (ERule), Syn_Rule -> Int
rulenumber_Syn_Rule :: (Int), Syn_Rule -> Set Vertex
vertices_Syn_Rule :: (Set.Set Vertex) }
{-# 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_s41
act) (Inh_Rule Int
_lhsIrulenumber) =
Identity Syn_Rule -> Syn_Rule
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Rule_s41
sem <- Identity T_Rule_s41
act
let arg40 :: T_Rule_vIn40
arg40 = Int -> T_Rule_vIn40
T_Rule_vIn40 Int
_lhsIrulenumber
(T_Rule_vOut40 Set (Vertex, Vertex)
_lhsOedges ERule
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices) <- T_Rule_vOut40 -> Identity T_Rule_vOut40
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Rule_s41 -> T_Rule_v40
inv_Rule_s41 T_Rule_s41
sem T_Rule_vIn40
arg40)
Syn_Rule -> Identity Syn_Rule
forall (m :: * -> *) a. Monad m => a -> m a
return (Set (Vertex, Vertex) -> ERule -> Int -> Set Vertex -> Syn_Rule
Syn_Rule Set (Vertex, Vertex)
_lhsOedges ERule
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices)
)
{-# 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_s41
attach_T_Rule :: Identity (T_Rule_s41 )
}
newtype T_Rule_s41 = C_Rule_s41 {
T_Rule_s41 -> T_Rule_v40
inv_Rule_s41 :: (T_Rule_v40 )
}
data T_Rule_s42 = C_Rule_s42
type T_Rule_v40 = (T_Rule_vIn40 ) -> (T_Rule_vOut40 )
data T_Rule_vIn40 = T_Rule_vIn40 (Int)
data T_Rule_vOut40 = T_Rule_vOut40 (Set.Set Edge) (ERule) (Int) (Set.Set Vertex)
{-# NOINLINE sem_Rule_Rule #-}
sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Bool) -> (Maybe Error) -> (Bool) -> T_Rule
sem_Rule_Rule :: Maybe Identifier
-> T_Pattern
-> T_Expression
-> Bool
-> String
-> Bool
-> Bool
-> Bool
-> Maybe Error
-> Bool
-> T_Rule
sem_Rule_Rule Maybe Identifier
arg_mbName_ T_Pattern
arg_pattern_ T_Expression
arg_rhs_ Bool
arg_owrt_ String
arg_origin_ Bool
arg_explicit_ Bool
arg_pure_ Bool
_ Maybe Error
arg_mbError_ Bool
_ = Identity T_Rule_s41 -> T_Rule
T_Rule (T_Rule_s41 -> Identity T_Rule_s41
forall (m :: * -> *) a. Monad m => a -> m a
return T_Rule_s41
st41) where
{-# NOINLINE st41 #-}
st41 :: T_Rule_s41
st41 = let
v40 :: T_Rule_v40
v40 :: T_Rule_v40
v40 = \ (T_Rule_vIn40 Int
_lhsIrulenumber) -> ( let
_patternX29 :: T_Pattern_s29
_patternX29 = Identity T_Pattern_s29 -> T_Pattern_s29
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Pattern -> Identity T_Pattern_s29
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_vOut28 Pattern
_patternIcopy Set Vertex
_patternIvertices) = T_Pattern_s29 -> T_Pattern_v28
inv_Pattern_s29 T_Pattern_s29
_patternX29 (T_Pattern_vIn28
T_Pattern_vIn28 )
(T_Expression_vOut7 Expression
_rhsIcopy Set Vertex
_rhsIvertices) = T_Expression_s8 -> T_Expression_v7
inv_Expression_s8 T_Expression_s8
_rhsX8 (T_Expression_vIn7
T_Expression_vIn7 )
_lhsOerules :: ERule
_lhsOerules :: ERule
_lhsOerules = Pattern
-> Expression
-> Identifier
-> Bool
-> Maybe Error
-> String
-> Bool
-> Bool
-> ERule
rule208 Pattern
_patternIcopy Expression
_rhsIcopy Identifier
_rulename Bool
arg_explicit_ Maybe Error
arg_mbError_ String
arg_origin_ Bool
arg_owrt_ Bool
arg_pure_
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule209 Int
_lhsIrulenumber
_rulename :: Identifier
_rulename = Int -> Maybe Identifier -> Identifier
rule210 Int
_lhsIrulenumber Maybe Identifier
arg_mbName_
_vertex :: Vertex
_vertex = Identifier -> Vertex
rule211 Identifier
_rulename
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex -> Vertex -> Set Vertex
rule212 Set Vertex
_patternIvertices Set Vertex
_rhsIvertices Vertex
_vertex
_edgesout :: [(Vertex, Vertex)]
_edgesout = Set Vertex -> Vertex -> [(Vertex, Vertex)]
forall a. Set Vertex -> a -> [(a, Vertex)]
rule213 Set Vertex
_rhsIvertices Vertex
_vertex
_edgesin :: [(Vertex, Vertex)]
_edgesin = Set Vertex -> Vertex -> [(Vertex, Vertex)]
forall b. Set Vertex -> b -> [(Vertex, b)]
rule214 Set Vertex
_patternIvertices Vertex
_vertex
_lhsOedges :: Set.Set Edge
_lhsOedges :: Set (Vertex, Vertex)
_lhsOedges = [(Vertex, Vertex)] -> [(Vertex, Vertex)] -> Set (Vertex, Vertex)
rule215 [(Vertex, Vertex)]
_edgesin [(Vertex, Vertex)]
_edgesout
__result_ :: T_Rule_vOut40
__result_ = Set (Vertex, Vertex) -> ERule -> Int -> Set Vertex -> T_Rule_vOut40
T_Rule_vOut40 Set (Vertex, Vertex)
_lhsOedges ERule
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices
in T_Rule_vOut40
__result_ )
in T_Rule_v40 -> T_Rule_s41
C_Rule_s41 T_Rule_v40
v40
{-# INLINE rule208 #-}
{-# LINE 65 "src-ag/ExecutionPlanCommon.ag" #-}
rule208 = \ ((_patternIcopy) :: Pattern) ((_rhsIcopy) :: Expression) _rulename explicit_ mbError_ origin_ owrt_ pure_ ->
{-# LINE 65 "src-ag/ExecutionPlanCommon.ag" #-}
ERule _rulename
_patternIcopy
_rhsIcopy
owrt_
origin_
explicit_
pure_
mbError_
{-# LINE 2047 "src-generated/KWOrder.hs" #-}
{-# INLINE rule209 #-}
{-# LINE 12 "src-ag/ExecutionPlanPre.ag" #-}
rule209 = \ ((_lhsIrulenumber) :: Int) ->
{-# LINE 12 "src-ag/ExecutionPlanPre.ag" #-}
_lhsIrulenumber + 1
{-# LINE 2053 "src-generated/KWOrder.hs" #-}
{-# INLINE rule210 #-}
{-# LINE 13 "src-ag/ExecutionPlanPre.ag" #-}
rule210 = \ ((_lhsIrulenumber) :: Int) mbName_ ->
{-# LINE 13 "src-ag/ExecutionPlanPre.ag" #-}
maybe (identifier $ "rule" ++ show _lhsIrulenumber) id mbName_
{-# LINE 2059 "src-generated/KWOrder.hs" #-}
{-# INLINE rule211 #-}
{-# LINE 74 "src-ag/KWOrder.ag" #-}
rule211 = \ _rulename ->
{-# LINE 74 "src-ag/KWOrder.ag" #-}
VRule _rulename
{-# LINE 2065 "src-generated/KWOrder.hs" #-}
{-# INLINE rule212 #-}
{-# LINE 75 "src-ag/KWOrder.ag" #-}
rule212 = \ ((_patternIvertices) :: Set.Set Vertex) ((_rhsIvertices) :: Set.Set Vertex) _vertex ->
{-# LINE 75 "src-ag/KWOrder.ag" #-}
Set.insert _vertex $ _patternIvertices `Set.union` _rhsIvertices
{-# LINE 2071 "src-generated/KWOrder.hs" #-}
{-# INLINE rule213 #-}
{-# LINE 87 "src-ag/KWOrder.ag" #-}
rule213 = \ ((_rhsIvertices) :: Set.Set Vertex) _vertex ->
{-# LINE 87 "src-ag/KWOrder.ag" #-}
map ((,) _vertex ) (Set.toList _rhsIvertices)
{-# LINE 2077 "src-generated/KWOrder.hs" #-}
{-# INLINE rule214 #-}
{-# LINE 88 "src-ag/KWOrder.ag" #-}
rule214 = \ ((_patternIvertices) :: Set.Set Vertex) _vertex ->
{-# LINE 88 "src-ag/KWOrder.ag" #-}
map (flip (,) _vertex ) (Set.toList _patternIvertices)
{-# LINE 2083 "src-generated/KWOrder.hs" #-}
{-# INLINE rule215 #-}
{-# LINE 89 "src-ag/KWOrder.ag" #-}
rule215 = \ _edgesin _edgesout ->
{-# LINE 89 "src-ag/KWOrder.ag" #-}
Set.fromList $ _edgesout ++ _edgesin
{-# LINE 2089 "src-generated/KWOrder.hs" #-}
data Inh_Rules = Inh_Rules { Inh_Rules -> Int
rulenumber_Inh_Rules :: (Int) }
data Syn_Rules = Syn_Rules { Syn_Rules -> Set (Vertex, Vertex)
edges_Syn_Rules :: (Set.Set Edge), Syn_Rules -> ERules
erules_Syn_Rules :: (ERules), Syn_Rules -> Int
rulenumber_Syn_Rules :: (Int), Syn_Rules -> Set Vertex
vertices_Syn_Rules :: (Set.Set Vertex) }
{-# 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_s44
act) (Inh_Rules Int
_lhsIrulenumber) =
Identity Syn_Rules -> Syn_Rules
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_Rules_s44
sem <- Identity T_Rules_s44
act
let arg43 :: T_Rules_vIn43
arg43 = Int -> T_Rules_vIn43
T_Rules_vIn43 Int
_lhsIrulenumber
(T_Rules_vOut43 Set (Vertex, Vertex)
_lhsOedges ERules
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices) <- T_Rules_vOut43 -> Identity T_Rules_vOut43
forall (m :: * -> *) a. Monad m => a -> m a
return (T_Rules_s44 -> T_Rules_v43
inv_Rules_s44 T_Rules_s44
sem T_Rules_vIn43
arg43)
Syn_Rules -> Identity Syn_Rules
forall (m :: * -> *) a. Monad m => a -> m a
return (Set (Vertex, Vertex) -> ERules -> Int -> Set Vertex -> Syn_Rules
Syn_Rules Set (Vertex, Vertex)
_lhsOedges ERules
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices)
)
{-# 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_s44
attach_T_Rules :: Identity (T_Rules_s44 )
}
newtype T_Rules_s44 = C_Rules_s44 {
T_Rules_s44 -> T_Rules_v43
inv_Rules_s44 :: (T_Rules_v43 )
}
data T_Rules_s45 = C_Rules_s45
type T_Rules_v43 = (T_Rules_vIn43 ) -> (T_Rules_vOut43 )
data T_Rules_vIn43 = T_Rules_vIn43 (Int)
data T_Rules_vOut43 = T_Rules_vOut43 (Set.Set Edge) (ERules) (Int) (Set.Set Vertex)
{-# 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_s44 -> T_Rules
T_Rules (T_Rules_s44 -> Identity T_Rules_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_Rules_s44
st44) where
{-# NOINLINE st44 #-}
st44 :: T_Rules_s44
st44 = let
v43 :: T_Rules_v43
v43 :: T_Rules_v43
v43 = \ (T_Rules_vIn43 Int
_lhsIrulenumber) -> ( let
_hdX41 :: T_Rule_s41
_hdX41 = Identity T_Rule_s41 -> T_Rule_s41
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rule -> Identity T_Rule_s41
attach_T_Rule (T_Rule
arg_hd_))
_tlX44 :: T_Rules_s44
_tlX44 = Identity T_Rules_s44 -> T_Rules_s44
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_Rules -> Identity T_Rules_s44
attach_T_Rules (T_Rules
arg_tl_))
(T_Rule_vOut40 Set (Vertex, Vertex)
_hdIedges ERule
_hdIerules Int
_hdIrulenumber Set Vertex
_hdIvertices) = T_Rule_s41 -> T_Rule_v40
inv_Rule_s41 T_Rule_s41
_hdX41 (Int -> T_Rule_vIn40
T_Rule_vIn40 Int
_hdOrulenumber)
(T_Rules_vOut43 Set (Vertex, Vertex)
_tlIedges ERules
_tlIerules Int
_tlIrulenumber Set Vertex
_tlIvertices) = T_Rules_s44 -> T_Rules_v43
inv_Rules_s44 T_Rules_s44
_tlX44 (Int -> T_Rules_vIn43
T_Rules_vIn43 Int
_tlOrulenumber)
_lhsOedges :: Set.Set Edge
_lhsOedges :: Set (Vertex, Vertex)
_lhsOedges = Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
rule216 Set (Vertex, Vertex)
_hdIedges Set (Vertex, Vertex)
_tlIedges
_lhsOerules :: ERules
_lhsOerules :: ERules
_lhsOerules = ERule -> ERules -> ERules
rule217 ERule
_hdIerules ERules
_tlIerules
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = Set Vertex -> Set Vertex -> Set Vertex
rule218 Set Vertex
_hdIvertices Set Vertex
_tlIvertices
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule219 Int
_tlIrulenumber
_hdOrulenumber :: Int
_hdOrulenumber = Int -> Int
rule220 Int
_lhsIrulenumber
_tlOrulenumber :: Int
_tlOrulenumber = Int -> Int
rule221 Int
_hdIrulenumber
__result_ :: T_Rules_vOut43
__result_ = Set (Vertex, Vertex)
-> ERules -> Int -> Set Vertex -> T_Rules_vOut43
T_Rules_vOut43 Set (Vertex, Vertex)
_lhsOedges ERules
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices
in T_Rules_vOut43
__result_ )
in T_Rules_v43 -> T_Rules_s44
C_Rules_s44 T_Rules_v43
v43
{-# INLINE rule216 #-}
rule216 :: Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
rule216 = \ ((Set (Vertex, Vertex)
_hdIedges) :: Set.Set Edge) ((Set (Vertex, Vertex)
_tlIedges) :: Set.Set Edge) ->
Set (Vertex, Vertex)
_hdIedges Set (Vertex, Vertex)
-> Set (Vertex, Vertex) -> Set (Vertex, Vertex)
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set (Vertex, Vertex)
_tlIedges
{-# INLINE rule217 #-}
rule217 :: ERule -> ERules -> ERules
rule217 = \ ((ERule
_hdIerules) :: ERule) ((ERules
_tlIerules) :: ERules) ->
ERule
_hdIerules ERule -> ERules -> ERules
forall a. a -> [a] -> [a]
: ERules
_tlIerules
{-# INLINE rule218 #-}
rule218 :: Set Vertex -> Set Vertex -> Set Vertex
rule218 = \ ((Set Vertex
_hdIvertices) :: Set.Set Vertex) ((Set Vertex
_tlIvertices) :: Set.Set Vertex) ->
Set Vertex
_hdIvertices Set Vertex -> Set Vertex -> Set Vertex
forall a. Ord a => Set a -> Set a -> Set a
`Set.union` Set Vertex
_tlIvertices
{-# INLINE rule219 #-}
rule219 :: Int -> Int
rule219 = \ ((Int
_tlIrulenumber) :: Int) ->
Int
_tlIrulenumber
{-# INLINE rule220 #-}
rule220 :: Int -> Int
rule220 = \ ((Int
_lhsIrulenumber) :: Int) ->
Int
_lhsIrulenumber
{-# INLINE rule221 #-}
rule221 :: Int -> Int
rule221 = \ ((Int
_hdIrulenumber) :: Int) ->
Int
_hdIrulenumber
{-# NOINLINE sem_Rules_Nil #-}
sem_Rules_Nil :: T_Rules
sem_Rules_Nil :: T_Rules
sem_Rules_Nil = Identity T_Rules_s44 -> T_Rules
T_Rules (T_Rules_s44 -> Identity T_Rules_s44
forall (m :: * -> *) a. Monad m => a -> m a
return T_Rules_s44
st44) where
{-# NOINLINE st44 #-}
st44 :: T_Rules_s44
st44 = let
v43 :: T_Rules_v43
v43 :: T_Rules_v43
v43 = \ (T_Rules_vIn43 Int
_lhsIrulenumber) -> ( let
_lhsOedges :: Set.Set Edge
_lhsOedges :: Set (Vertex, Vertex)
_lhsOedges = () -> Set (Vertex, Vertex)
forall a. () -> Set a
rule222 ()
_lhsOerules :: ERules
_lhsOerules :: ERules
_lhsOerules = () -> ERules
forall a. () -> [a]
rule223 ()
_lhsOvertices :: Set.Set Vertex
_lhsOvertices :: Set Vertex
_lhsOvertices = () -> Set Vertex
forall a. () -> Set a
rule224 ()
_lhsOrulenumber :: Int
_lhsOrulenumber :: Int
_lhsOrulenumber = Int -> Int
rule225 Int
_lhsIrulenumber
__result_ :: T_Rules_vOut43
__result_ = Set (Vertex, Vertex)
-> ERules -> Int -> Set Vertex -> T_Rules_vOut43
T_Rules_vOut43 Set (Vertex, Vertex)
_lhsOedges ERules
_lhsOerules Int
_lhsOrulenumber Set Vertex
_lhsOvertices
in T_Rules_vOut43
__result_ )
in T_Rules_v43 -> T_Rules_s44
C_Rules_s44 T_Rules_v43
v43
{-# INLINE rule222 #-}
rule222 :: () -> Set a
rule222 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule223 #-}
rule223 :: () -> [a]
rule223 = \ (()
_ :: ()) ->
[]
{-# INLINE rule224 #-}
rule224 :: () -> Set a
rule224 = \ (()
_ :: ()) ->
Set a
forall a. Set a
Set.empty
{-# INLINE rule225 #-}
rule225 :: Int -> Int
rule225 = \ ((Int
_lhsIrulenumber) :: Int) ->
Int
_lhsIrulenumber
data Inh_TypeSig = Inh_TypeSig { }
data Syn_TypeSig = Syn_TypeSig { Syn_TypeSig -> Attributes
localSigMap_Syn_TypeSig :: (Map Identifier Type) }
{-# 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_s47
act) (Inh_TypeSig
Inh_TypeSig ) =
Identity Syn_TypeSig -> Syn_TypeSig
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_TypeSig_s47
sem <- Identity T_TypeSig_s47
act
let arg46 :: T_TypeSig_vIn46
arg46 = T_TypeSig_vIn46
T_TypeSig_vIn46
(T_TypeSig_vOut46 Attributes
_lhsOlocalSigMap) <- T_TypeSig_vOut46 -> Identity T_TypeSig_vOut46
forall (m :: * -> *) a. Monad m => a -> m a
return (T_TypeSig_s47 -> T_TypeSig_v46
inv_TypeSig_s47 T_TypeSig_s47
sem T_TypeSig_vIn46
arg46)
Syn_TypeSig -> Identity Syn_TypeSig
forall (m :: * -> *) a. Monad m => a -> m a
return (Attributes -> Syn_TypeSig
Syn_TypeSig Attributes
_lhsOlocalSigMap)
)
{-# 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_s47
attach_T_TypeSig :: Identity (T_TypeSig_s47 )
}
newtype T_TypeSig_s47 = C_TypeSig_s47 {
T_TypeSig_s47 -> T_TypeSig_v46
inv_TypeSig_s47 :: (T_TypeSig_v46 )
}
data T_TypeSig_s48 = C_TypeSig_s48
type T_TypeSig_v46 = (T_TypeSig_vIn46 ) -> (T_TypeSig_vOut46 )
data T_TypeSig_vIn46 = T_TypeSig_vIn46
data T_TypeSig_vOut46 = T_TypeSig_vOut46 (Map Identifier Type)
{-# NOINLINE sem_TypeSig_TypeSig #-}
sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig
sem_TypeSig_TypeSig :: Identifier -> Type -> T_TypeSig
sem_TypeSig_TypeSig Identifier
arg_name_ Type
arg_tp_ = Identity T_TypeSig_s47 -> T_TypeSig
T_TypeSig (T_TypeSig_s47 -> Identity T_TypeSig_s47
forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSig_s47
st47) where
{-# NOINLINE st47 #-}
st47 :: T_TypeSig_s47
st47 = let
v46 :: T_TypeSig_v46
v46 :: T_TypeSig_v46
v46 = \ (T_TypeSig_vIn46
T_TypeSig_vIn46 ) -> ( let
_lhsOlocalSigMap :: Map Identifier Type
_lhsOlocalSigMap :: Attributes
_lhsOlocalSigMap = Identifier -> Type -> Attributes
forall k a. k -> a -> Map k a
rule226 Identifier
arg_name_ Type
arg_tp_
__result_ :: T_TypeSig_vOut46
__result_ = Attributes -> T_TypeSig_vOut46
T_TypeSig_vOut46 Attributes
_lhsOlocalSigMap
in T_TypeSig_vOut46
__result_ )
in T_TypeSig_v46 -> T_TypeSig_s47
C_TypeSig_s47 T_TypeSig_v46
v46
{-# INLINE rule226 #-}
{-# LINE 161 "src-ag/ExecutionPlanCommon.ag" #-}
rule226 = \ name_ tp_ ->
{-# LINE 161 "src-ag/ExecutionPlanCommon.ag" #-}
Map.singleton name_ tp_
{-# LINE 2241 "src-generated/KWOrder.hs" #-}
data Inh_TypeSigs = Inh_TypeSigs { }
data Syn_TypeSigs = Syn_TypeSigs { Syn_TypeSigs -> Attributes
localSigMap_Syn_TypeSigs :: (Map Identifier Type) }
{-# 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_s50
act) (Inh_TypeSigs
Inh_TypeSigs ) =
Identity Syn_TypeSigs -> Syn_TypeSigs
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (
do T_TypeSigs_s50
sem <- Identity T_TypeSigs_s50
act
let arg49 :: T_TypeSigs_vIn49
arg49 = T_TypeSigs_vIn49
T_TypeSigs_vIn49
(T_TypeSigs_vOut49 Attributes
_lhsOlocalSigMap) <- T_TypeSigs_vOut49 -> Identity T_TypeSigs_vOut49
forall (m :: * -> *) a. Monad m => a -> m a
return (T_TypeSigs_s50 -> T_TypeSigs_v49
inv_TypeSigs_s50 T_TypeSigs_s50
sem T_TypeSigs_vIn49
arg49)
Syn_TypeSigs -> Identity Syn_TypeSigs
forall (m :: * -> *) a. Monad m => a -> m a
return (Attributes -> Syn_TypeSigs
Syn_TypeSigs Attributes
_lhsOlocalSigMap)
)
{-# 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_s50
attach_T_TypeSigs :: Identity (T_TypeSigs_s50 )
}
newtype T_TypeSigs_s50 = C_TypeSigs_s50 {
T_TypeSigs_s50 -> T_TypeSigs_v49
inv_TypeSigs_s50 :: (T_TypeSigs_v49 )
}
data T_TypeSigs_s51 = C_TypeSigs_s51
type T_TypeSigs_v49 = (T_TypeSigs_vIn49 ) -> (T_TypeSigs_vOut49 )
data T_TypeSigs_vIn49 = T_TypeSigs_vIn49
data T_TypeSigs_vOut49 = T_TypeSigs_vOut49 (Map Identifier Type)
{-# 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_s50 -> T_TypeSigs
T_TypeSigs (T_TypeSigs_s50 -> Identity T_TypeSigs_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSigs_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_TypeSigs_s50
st50 = let
v49 :: T_TypeSigs_v49
v49 :: T_TypeSigs_v49
v49 = \ (T_TypeSigs_vIn49
T_TypeSigs_vIn49 ) -> ( let
_hdX47 :: T_TypeSig_s47
_hdX47 = Identity T_TypeSig_s47 -> T_TypeSig_s47
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSig -> Identity T_TypeSig_s47
attach_T_TypeSig (T_TypeSig
arg_hd_))
_tlX50 :: T_TypeSigs_s50
_tlX50 = Identity T_TypeSigs_s50 -> T_TypeSigs_s50
forall a. Identity a -> a
Control.Monad.Identity.runIdentity (T_TypeSigs -> Identity T_TypeSigs_s50
attach_T_TypeSigs (T_TypeSigs
arg_tl_))
(T_TypeSig_vOut46 Attributes
_hdIlocalSigMap) = T_TypeSig_s47 -> T_TypeSig_v46
inv_TypeSig_s47 T_TypeSig_s47
_hdX47 (T_TypeSig_vIn46
T_TypeSig_vIn46 )
(T_TypeSigs_vOut49 Attributes
_tlIlocalSigMap) = T_TypeSigs_s50 -> T_TypeSigs_v49
inv_TypeSigs_s50 T_TypeSigs_s50
_tlX50 (T_TypeSigs_vIn49
T_TypeSigs_vIn49 )
_lhsOlocalSigMap :: Map Identifier Type
_lhsOlocalSigMap :: Attributes
_lhsOlocalSigMap = Attributes -> Attributes -> Attributes
rule227 Attributes
_hdIlocalSigMap Attributes
_tlIlocalSigMap
__result_ :: T_TypeSigs_vOut49
__result_ = Attributes -> T_TypeSigs_vOut49
T_TypeSigs_vOut49 Attributes
_lhsOlocalSigMap
in T_TypeSigs_vOut49
__result_ )
in T_TypeSigs_v49 -> T_TypeSigs_s50
C_TypeSigs_s50 T_TypeSigs_v49
v49
{-# INLINE rule227 #-}
rule227 :: Attributes -> Attributes -> Attributes
rule227 = \ ((Attributes
_hdIlocalSigMap) :: Map Identifier Type) ((Attributes
_tlIlocalSigMap) :: Map Identifier Type) ->
Attributes
_hdIlocalSigMap Attributes -> Attributes -> Attributes
forall k a. Ord k => Map k a -> Map k a -> Map k a
`Map.union` Attributes
_tlIlocalSigMap
{-# NOINLINE sem_TypeSigs_Nil #-}
sem_TypeSigs_Nil :: T_TypeSigs
sem_TypeSigs_Nil :: T_TypeSigs
sem_TypeSigs_Nil = Identity T_TypeSigs_s50 -> T_TypeSigs
T_TypeSigs (T_TypeSigs_s50 -> Identity T_TypeSigs_s50
forall (m :: * -> *) a. Monad m => a -> m a
return T_TypeSigs_s50
st50) where
{-# NOINLINE st50 #-}
st50 :: T_TypeSigs_s50
st50 = let
v49 :: T_TypeSigs_v49
v49 :: T_TypeSigs_v49
v49 = \ (T_TypeSigs_vIn49
T_TypeSigs_vIn49 ) -> ( let
_lhsOlocalSigMap :: Map Identifier Type
_lhsOlocalSigMap :: Attributes
_lhsOlocalSigMap = () -> Attributes
forall k a. () -> Map k a
rule228 ()
__result_ :: T_TypeSigs_vOut49
__result_ = Attributes -> T_TypeSigs_vOut49
T_TypeSigs_vOut49 Attributes
_lhsOlocalSigMap
in T_TypeSigs_vOut49
__result_ )
in T_TypeSigs_v49 -> T_TypeSigs_s50
C_TypeSigs_s50 T_TypeSigs_v49
v49
{-# INLINE rule228 #-}
rule228 :: () -> Map k a
rule228 = \ (()
_ :: ()) ->
Map k a
forall k a. Map k a
Map.empty