uuagc 0.9.42.3 → 0.9.50
raw patch · 60 files changed
+47803/−33756 lines, 60 filesdep ~uuagcPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: uuagc
API changes (from Hackage documentation)
+ UU.UUAGC: clean :: Options -> Bool
+ UU.UUAGC: cleanOpt :: Options -> Options
- UU.UUAGC: Options :: ModuleHeader -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> [String] -> Bool -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Int -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Maybe String -> Bool -> Maybe String -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe String -> Bool -> Bool -> Bool -> Bool -> Bool -> Set NontermIdent -> Bool -> Bool -> Bool -> (String -> IO ()) -> (Int -> IO ()) -> Maybe String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Options
+ UU.UUAGC: Options :: ModuleHeader -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> [String] -> Bool -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Int -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> [String] -> Maybe String -> Bool -> Maybe String -> String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Maybe String -> Bool -> Bool -> Bool -> Bool -> Bool -> Set NontermIdent -> Bool -> Bool -> Bool -> (String -> IO ()) -> (Int -> IO ()) -> Maybe String -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Bool -> Options
Files
- README +4/−7
- src-ag/ConcreteSyntax.ag +8/−7
- src-ag/DefaultRules.ag +47/−19
- src-ag/ExecutionPlan.ag +31/−31
- src-ag/ExecutionPlan2Caml.ag +28/−25
- src-ag/ExecutionPlan2Clean.ag +1684/−0
- src-ag/ExecutionPlan2Hs.ag +33/−30
- src-ag/GenerateCode.ag +51/−48
- src-ag/Order.ag +5/−1
- src-ag/PrintCleanCode.ag +559/−0
- src-ag/PrintCode.ag +3/−3
- src-ag/PrintOcamlCode.ag +1/−1
- src-ag/ResolveLocals.ag +1/−1
- src-ag/SemHsTokens.ag +4/−3
- src-ag/Transform.ag +19/−9
- src-generated/AG2AspectAG.hs +16/−16
- src-generated/AbstractSyntax.hs +1/−1
- src-generated/AbstractSyntaxDump.hs +13/−13
- src-generated/Code.hs +1/−1
- src-generated/CodeSyntax.hs +1/−1
- src-generated/CodeSyntaxDump.hs +7/−7
- src-generated/ConcreteSyntax.hs +3/−2
- src-generated/DeclBlocks.hs +1/−1
- src-generated/DefaultRules.hs +4720/−4656
- src-generated/Desugar.hs +16/−16
- src-generated/ErrorMessages.hs +1/−1
- src-generated/ExecutionPlan.hs +1/−1
- src-generated/ExecutionPlan2Caml.hs +6142/−6119
- src-generated/ExecutionPlan2Clean.hs +7001/−0
- src-generated/ExecutionPlan2Hs.hs +6992/−6969
- src-generated/Expression.hs +1/−1
- src-generated/GenerateCode.hs +5263/−5190
- src-generated/HsToken.hs +1/−1
- src-generated/Interfaces.hs +1/−1
- src-generated/KWOrder.hs +19/−19
- src-generated/Macro.hs +2/−2
- src-generated/Order.hs +3841/−3801
- src-generated/Patterns.hs +1/−1
- src-generated/PrintCleanCode.hs +4329/−0
- src-generated/PrintCode.hs +14/−14
- src-generated/PrintOcamlCode.hs +10/−10
- src-generated/PrintVisitCode.hs +9/−9
- src-generated/ResolveLocals.hs +68/−68
- src-generated/SemHsTokens.hs +154/−142
- src-generated/TfmToVisage.hs +13/−13
- src-generated/Transform.hs +6253/−6179
- src-generated/Visage.hs +11/−11
- src-generated/VisagePatterns.hs +1/−1
- src-generated/VisageSyntax.hs +1/−1
- src-options/Options.hs +6/−2
- src/Ag.hs +87/−34
- src/CommonTypes.hs +20/−12
- src/GrammarInfo.hs +2/−1
- src/HsTokenScanner.hs +24/−5
- src/PPUtil.hs +1/−0
- src/Parser.hs +27/−18
- src/Scanner.hs +234/−223
- src/SequentialTypes.hs +6/−6
- uuagc.cabal +4/−2
- uuagc_options +6/−0
README view
@@ -1,13 +1,10 @@ To install UUAG, use cabal in combination with Setup.hs -Note: you'll need the packages because UUAGC is bootstrapped:-uuagc-cabal-uuagc-bootstrap--By default, UUAGC is bootstrapped with the tool 'uuagc-bootstrap' in the-uuagc-bootstrap package. If you want to bootstrap with a different-tool, change the compiler-variable in Setup.hs+By default, "cabal install" will install UUAGC from the+included Haskell sources. To build from the AG sources+using an existing uuagc installation, use: +cabal install --ghc-options="-DEXTERNAL_UUAGC" Note: to produce a source release, you'll need to use the Setup.hs because cabal-install at the time is not able to
src-ag/ConcreteSyntax.ag view
@@ -20,13 +20,14 @@ DATA AG | AG elems : Elems -DATA Elem | Data pos : {Pos}- ctx : {ClassContext}- names : NontSet- params : {[Identifier]}- attrs : Attrs- alts : Alts- ext : {Bool}+DATA Elem | Data pos : {Pos}+ contype : {ConstructorType}+ ctx : {ClassContext}+ names : NontSet+ params : {[Identifier]}+ attrs : Attrs+ alts : Alts+ ext : {Bool} | Type pos : {Pos} ctx : {ClassContext}
src-ag/DefaultRules.ag view
@@ -48,7 +48,9 @@ -- Distributing options ------------------------------------------------------------------------------- -ATTR Grammar Nonterminals Nonterminal Productions Production Rules Rule [ options:{Options} | | ]+ATTR Grammar Nonterminals Nonterminal Productions Production Rules Rule+ [ options:{Options}+ constructorTypeMap : {Map NontermIdent ConstructorType} | | ] ATTR Nonterminals Nonterminal Productions Production [ o_rename:{Bool} cr:Bool {- copy rule -} | | ]@@ -89,14 +91,23 @@ mkLocVar = AGField _LOC +isRecordConstructor :: NontermIdent -> Map NontermIdent ConstructorType -> Bool+isRecordConstructor nt ctm = Map.lookup nt ctm == Just RecordConstructor -buildConExpr ocaml typeSyns rename nt con1 fs- | nt `elem` map fst typeSyns = if ocaml then synonymMl else synonymHs- | otherwise = normalExpr- where con = getName con1+buildConExpr ocaml clean conmap typeSyns rename nt con1 fs'+ | nt `elem` map fst typeSyns = if ocaml then synonymMl+ else if clean then synonymClean+ else synonymHs+ | otherwise = normalExpr+ where fs = map fst fs'+ con = getName con1 tup = " " ++ buildTuple fs args = " " ++ unwords fs- normalExpr = conname' ++ args+ normalExpr = if clean && isRecordConstructor nt conmap+ then "{" ++ con ++ "|" +++ unwords (intersperse "," $ map (\(new, old) -> getName old ++ " = " ++ new) fs')+ ++ "}"+ else conname' ++ args conname' | rename = getName nt ++ "_" ++ getName con1 | otherwise = getName con1@@ -135,6 +146,24 @@ Just IntSet -> prefixMod nt "add" ) ++ args | otherwise = normalExpr + synonymClean | con == "Tuple" = buildTuple fs+ | con == "Cons" = "(\\x xs -> [x:xs])" ++ args+ | con == "Nil" = case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.empty"+ Just (IntMap _) -> "Data.IntMap.empty"+ Just (OrdSet _) -> "Data.Set.empty"+ Just IntSet -> "Data.IntSet.empty"+ _ -> "[]"+ | con == "Just" = "Just" ++ args+ | con == "Nothing" = "Nothing"+ | con == "Entry" = ( case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.insert"+ Just (IntMap _) -> "Data.IntMap.insert"+ Just (OrdSet _) -> "Data.Set.insert"+ Just IntSet -> "Data.IntSet.insert" ) ++ args+ | otherwise = normalExpr++ prefixMod nt nm = "M_" ++ getName nt ++ "." ++ nm concatSeq = foldr (Seq.><) Seq.empty@@ -254,13 +283,12 @@ in CustomError True (getPos a) mesg -missingRuleErrorExpr nt con fld a- = "error \"missing rule: "+missingRuleErrorExpr clean nt con fld a+ = (if clean then "abort" else "error")+ ++ " \"missing rule: " ++ show nt ++ "." ++ show con ++ "." ++ show fld ++ "." ++ show a ++ "\"" -- makeRule :: (Identifier,Identifier) -> Expression -> String -> Bool -> Maybe Error -> Rule makeRule (f1,a1) expr origin identity mbDelayedError = Rule Nothing@@ -275,8 +303,8 @@ False -useRule :: Set Identifier -> [(Identifier,Attributes)] -> (Identifier,(String,String,String)) -> Rule-useRule locals ch_outs (n,(op,e,pos))+useRule :: Options -> Set Identifier -> [(Identifier,Attributes)] -> (Identifier,(String,String,String)) -> Rule+useRule opts locals ch_outs (n,(op,e,pos)) = let elems = [ fld | (fld,as) <- ch_outs , Map.member n as@@ -292,8 +320,8 @@ | otherwise = True tks | Set.member n locals = [mkLocVar n noPos Nothing]- | null elems = lexTokens noPos e- | otherwise = lexTokens noPos str+ | null elems = lexTokens opts noPos e+ | otherwise = lexTokens opts noPos str where opExpr l r | isOp op = l ++ " " ++ op ++ " " ++ r -- takes the associativity of the operator@@ -345,7 +373,7 @@ (tks,err,mbDelayedErr) = case sel of- Nothing -> let tks = [HsToken (missingRuleErrorExpr nt con fld a) noPos]+ Nothing -> let tks = [HsToken (missingRuleErrorExpr (clean options) nt con fld a) noPos] err = MissingRule nt con fld a in if nt `Set.member` wrappers && kennedyWarren options then (tks, Seq.empty, Just err) -- yield error only if the rule is actually scheduled; for kennedyWarren code gen only@@ -418,15 +446,15 @@ (zip envs (map (removeDefined @rules.definedAttrs) @children.inputs)) uRules- = map (useRule locals @children.outputs) useAttrs+ = map (useRule @lhs.options locals @children.outputs) useAttrs -- creates a loc.xxx if there is a synthesized attr xxx of type SELF and no -- loc.xxx exists yet. If there exists a terminal yyy and a local loc.yyy, then -- the local is chosen as value for the terminal. selfLocRules = [ selfRule False attr $- lexTokens noPos $ -- building a string and lexing it again is not so nice... but practical here- constructor [childSelf attr nm tp | (nm,tp,virt) <- @children.fields, childExists virt]+ lexTokens @lhs.options noPos $ -- building a string and lexing it again is not so nice... but practical here+ constructor [(childSelf attr nm tp, nm) | (nm,tp,virt) <- @children.fields, childExists virt] | attr <- Map.keys selfAttrs , not (Set.member attr locals) ]@@ -436,7 +464,7 @@ _ | nm `Set.member` locals -> locName nm | otherwise -> fieldName nm constructor fs- = buildConExpr (ocaml @lhs.options) @lhs.typeSyns @lhs.o_rename @lhs.nt @con fs+ = buildConExpr (ocaml @lhs.options) (clean @lhs.options) @lhs.constructorTypeMap @lhs.typeSyns @lhs.o_rename @lhs.nt @con fs childExists ChildAttr = False childExists _ = True
src-ag/ExecutionPlan.ag view
@@ -13,9 +13,9 @@ } DATA ExecutionPlan | ExecutionPlan nonts : ENonterminals- typeSyns : {TypeSyns}- wrappers : {Set NontermIdent}- derivings : {Derivings}+ typeSyns : {TypeSyns}+ wrappers : {Set NontermIdent}+ derivings : {Derivings} TYPE ENonterminals = [ENonterminal] @@ -32,29 +32,29 @@ DATA ENonterminal | ENonterminal nt : {NontermIdent} params : {[Identifier]} classCtxs : {ClassContext} -- class context at the datatype level- initial : {StateIdentifier}- initialv : {Maybe VisitIdentifier}- nextVisits : {Map StateIdentifier StateCtx} -- info about the next visits from a given state- prevVisits : {Map StateIdentifier StateCtx} -- info about the previous visits to a given state+ initial : {StateIdentifier}+ initialv : {Maybe VisitIdentifier}+ nextVisits : {Map StateIdentifier StateCtx} -- info about the next visits from a given state+ prevVisits : {Map StateIdentifier StateCtx} -- info about the previous visits to a given state prods : EProductions recursive : {Bool} hoInfo : {HigherOrderInfo} DATA EProduction | EProduction con : {ConstructorIdent}- params : {[Identifier]}- constraints : {[Type]} -- (class/equality) constraints on types (requires GADTs)- rules : ERules- children : EChildren- visits : Visits+ params : {[Identifier]}+ constraints : {[Type]} -- (class/equality) constraints on types (requires GADTs)+ rules : ERules+ children : EChildren+ visits : Visits DATA EChild | EChild name : {Identifier} tp : {Type}- kind : {ChildKind}- hasAround : {Bool} -- if there exists a rule <name>_around that transforms the child's sem- merges : {Maybe [Identifier]} -- Nothing: not the result of a merge of other children (ignored for now)- isMerged : {Bool} -- False: not being used to merge other children (ignored for now)- | ETerm name : {Identifier}- tp : {Type}+ kind : {ChildKind}+ hasAround : {Bool} -- if there exists a rule <name>_around that transforms the child's sem+ merges : {Maybe [Identifier]} -- Nothing: not the result of a merge of other children (ignored for now)+ isMerged : {Bool} -- False: not being used to merge other children (ignored for now)+ | ETerm name : {Identifier}+ tp : {Type} DATA ERule | ERule name : {Identifier} pattern : Pattern@@ -66,18 +66,18 @@ mbError : {Maybe Error} -- the rule may contain an error that is yielded when the rule is scheduled DATA Visit | Visit ident : {VisitIdentifier}- from : {StateIdentifier}- to : {StateIdentifier}- inh : {Set Identifier}- syn : {Set Identifier}- steps : VisitSteps- kind : {VisitKind}+ from : {StateIdentifier}+ to : {StateIdentifier}+ inh : {Set Identifier}+ syn : {Set Identifier}+ steps : VisitSteps+ kind : {VisitKind} DATA VisitStep | Sem name : {Identifier}- | ChildVisit child : {Identifier}- nonterm : {NontermIdent}- visit : {VisitIdentifier}- | PureGroup steps : VisitSteps -- A group of steps that should be executed purely- ordered : {Bool}- | Sim steps : VisitSteps- | ChildIntro child : {Identifier}+ | ChildVisit child : {Identifier}+ nonterm : {NontermIdent}+ visit : {VisitIdentifier}+ | PureGroup steps : VisitSteps -- A group of steps that should be executed purely+ ordered : {Bool}+ | Sim steps : VisitSteps+ | ChildIntro child : {Identifier}
src-ag/ExecutionPlan2Caml.ag view
@@ -66,8 +66,10 @@ ENonterminals ENonterminal EProductions EProduction ERules ERule- Pattern Patterns EChildren EChild+ Expression+ HsToken HsTokens HsTokensRoot+ Pattern Patterns Visits Visit VisitSteps VisitStep [ options : {Options} | | ] ATTR EProductions EProduction [ rename : {Bool} | | ]@@ -604,12 +606,12 @@ loc.wrapArgSemTp = @loc.t_params >#< @loc.t_type loc.wrapArgInhTp = @loc.t_params >#< @loc.inhname- loc.wrapArgPats = ppRecordVal [ i >|< "_inh_" >|< @nt >#< "=" >#< lhsname True i | (i,_) <- @loc.wr_inhs1 ]+ loc.wrapArgPats = ppRecordVal [ i >|< "_inh_" >|< @nt >#< "=" >#< lhsname @lhs.options True i | (i,_) <- @loc.wr_inhs1 ] loc.wrapResTp = @loc.t_params >#< @loc.synname loc.wrapper = "and" >#< ppFunDecl @loc.o_sigs @loc.wrapname [(pp "act", @loc.wrapArgSemTp), (@loc.wrapArgPats, @loc.wrapArgInhTp)] @loc.wrapResTp @loc.wrapperPreamble loc.wrapperPreamble = ( if lateHigherOrderBinding @lhs.options- then "let" >#< lhsname True idLateBindingAttr >#< "=" >#< lateBindingFieldNm @lhs.mainName >#< "in"+ then "let" >#< lhsname @lhs.options True idLateBindingAttr >#< "=" >#< lateBindingFieldNm @lhs.mainName >#< "in" else empty ) -- initial attribute for late binding >-< @loc.wrapperBody@@ -620,12 +622,12 @@ let attach = "let" >#< "sem" >#< "=" >#< "act." >|< nm_attach @nt >#< "()" >#< "in" -- run attach code -- result transformer to wrapper output record- pat = ppRecordVal [ nm_outarg i @nt initv >#< "=" >#< lhsname False i | (i,_) <- @loc.wr_syns ]- bld = ppRecordVal [ i >|< "_syn_" >|< @nt >#< "=" >#< lhsname False i | (i,_) <- @loc.wr_syns ]+ pat = ppRecordVal [ nm_outarg i @nt initv >#< "=" >#< lhsname @lhs.options False i | (i,_) <- @loc.wr_syns ]+ bld = ppRecordVal [ i >|< "_syn_" >|< @nt >#< "=" >#< lhsname @lhs.options False i | (i,_) <- @loc.wr_syns ] res = "let res = function" >#< pat >#< "->" >#< bld >#< "in" -- input to the visit (inh attrs + continuation)- inps = "let" >#< "inps" >#< "=" >#< ppRecordVal [ nm_inarg i @nt initv >#< "=" >#< lhsname True i | (i,_) <- @loc.wr_inhs ] >#< "in"+ inps = "let" >#< "inps" >#< "=" >#< ppRecordVal [ nm_inarg i @nt initv >#< "=" >#< lhsname @lhs.options True i | (i,_) <- @loc.wr_inhs ] >#< "in" arg = "let" >#< "arg" >#< "=" >#< argcon >#< argrec >#< "in" argcon = case @loc.firstVisitInfo of ManyVis -> con_visit @nt initv@@ -797,7 +799,7 @@ lhs.sem_visit = ( @from , let resTp = @loc.t_params >#< @loc.nameTOut_visit argTp = @loc.t_params >#< @loc.nameTIn_visit- argMatch = ppRecordVal [ nm_inarg i @lhs.nt @ident >#< "=" >#< lhsname True i | i <- Set.toList @inh ]+ argMatch = ppRecordVal [ nm_inarg i @lhs.nt @ident >#< "=" >#< lhsname @lhs.options True i | i <- Set.toList @inh ] in ppFunDecl @loc.o_sigs (nm_visit @ident) [(argMatch, argTp)] resTp @steps.sem_steps ) @@ -808,7 +810,7 @@ loc.nextStExp = nm_st @to >#< @loc.nextArgs >#< dummyArg @lhs.options (Map.null @loc.nextArgsMp) loc.resultval = ppRecordVal- ( [ nm_outarg i @lhs.nt @ident >#< "=" >#< lhsname False i | i <- Set.toList @syn ]+ ( [ nm_outarg i @lhs.nt @ident >#< "=" >#< lhsname @lhs.options False i | i <- Set.toList @syn ] ++ [ @loc.nextStRefExp ]) (loc.nextStBuild, loc.nextStRefExp)@@ -926,7 +928,7 @@ ChildSyntax -> @name >|< "_" ChildAttr -> -- decide if we need to invoke the sem-function under the hood let head | not @loc.isDefor = if lateHigherOrderBinding @lhs.options- then lateSemNtLabel @loc.nt >#< lhsname True idLateBindingAttr+ then lateSemNtLabel @loc.nt >#< lhsname @lhs.options True idLateBindingAttr else prefix @lhs.options >|< @loc.nt | otherwise = empty -- no need to intro a terminal in pp_parens (head >#< instname @name)@@ -934,7 +936,7 @@ -- the semantics of the child (always deforested) pp_parens (instname @name >#< @name >|< "_") loc.aroundcode = if @hasAround- then locname @name >|< "_around"+ then locname @lhs.options @name >|< "_around" else empty loc.introcode = \kind -> let pat = text $ stname @name @loc.initSt attach = pp_parens (@loc.aroundcode >#< @loc.valcode) >|< "." >|< nm_attach @loc.nt >#< "()"@@ -946,10 +948,10 @@ ChildAttr -> Map.insert (instname @name) Nothing $ -- the sem attr ( if @loc.isDefor || not (lateHigherOrderBinding @lhs.options) then id -- the sem dictionary attr is not used- else Map.insert (lhsname True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ else Map.insert (lhsname @lhs.options True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr) ) $ ( if @hasAround- then Map.insert (locname (@name) ++ "_around") Nothing+ then Map.insert (locname @lhs.options (@name) ++ "_around") Nothing else id ) $ Map.empty ChildReplace _ -> Map.singleton (instname @name) Nothing -- uses the transformation function@@ -1052,7 +1054,7 @@ ATTR Pattern Patterns [ | | extraDefs USE {++} {[]} : {[(PP_Doc,PP_Doc)]} ] SEM Pattern- | Alias loc.var = text $ attrname False @field @attr+ | Alias loc.var = text $ attrname @lhs.options False @field @attr loc.hasTp = isJust @loc.mbTp loc.o_sigs = typeSigs @lhs.options @@ -1078,7 +1080,7 @@ -- Collect the attributes defined by a pattern ATTR Pattern Patterns [ | | attrs USE {`Set.union`} {Set.empty} : {Set String} ] SEM Pattern | Alias- lhs.attrs = Set.insert (attrname False @field @attr) @pat.attrs+ lhs.attrs = Set.insert (attrname @lhs.options False @field @attr) @pat.attrs -- All attribute types of this pattern -- Todo: if possible, make attribute types part of the pattern@@ -1089,7 +1091,7 @@ else if @field == _LOC then Map.lookup @attr @lhs.localAttrTypes else Nothing- lhs.attrTypes = maybe empty (\tp -> (attrname False @field @attr) >#< "::" >#< ppTp tp) @loc.mbTp+ lhs.attrTypes = maybe empty (\tp -> (attrname @lhs.options False @field @attr) >#< "::" >#< ppTp tp) @loc.mbTp >-< @pat.attrTypes -- Collect the attributes used by the right-hand side@@ -1099,7 +1101,7 @@ | AGField loc.mbAttr = if @field == _INST || @field == _FIELD || @field == _INST' then Nothing -- should not be used in the first place else Just $ mkNonLocalAttr (@field == _LHS) @field @attr- lhs.attrs = Map.singleton (attrname True @field @attr) @loc.mbAttr+ lhs.attrs = Map.singleton (attrname @lhs.options True @field @attr) @loc.mbAttr { data NonLocalAttr@@ -1136,8 +1138,9 @@ ATTR Expression [ | | semfunc : {PP_Doc} ] SEM Expression- | Expression lhs.attrs = Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) @tks- lhs.semfunc = vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) @tks+ | Expression lhs.attrs = Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) @loc.inhhstoken)) @tks+ lhs.semfunc = vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) @loc.inhhstoken)) @tks+ loc.inhhstoken = Inh_HsToken @lhs.options -- child visit map ATTR Visit@@ -1175,7 +1178,7 @@ cont = "let" >#< contNm >#< ppArg @loc.o_sigs (ppRecordVal cont_in) cont_in_tp >#< "=" >-< indent 2 follow -- the continuation-code >#< "in"- cont_in = [ nm_outarg i @lhs.nt @ident >#< "=" >#< attrname True chld i | i <- Set.toList @syn ]+ cont_in = [ nm_outarg i @lhs.nt @ident >#< "=" >#< attrname @lhs.options True chld i | i <- Set.toList @syn ] ++ case @loc.nextVisitInfo of NoneVis -> [] _ -> [ nm_outarg_cont @lhs.nt @ident >#< "=" >#< childNmTo ]@@ -1186,7 +1189,7 @@ [ nm_inh @lhs.nt @ident >#< "=" >#< ppRecordVal inps_in , nm_cont @lhs.nt @ident >#< "=" >#< contNm ] >#< "in"- inps_in = [ nm_inarg i @lhs.nt @ident >#< "=" >#< attrname False chld i | i <- Set.toList @inh ]+ inps_in = [ nm_inarg i @lhs.nt @ident >#< "=" >#< attrname @lhs.options False chld i | i <- Set.toList @inh ] -- the call to the visit function, with possible the need to specify which visit function to dispatch to call = childNmFrom >|< "." >|< nm_invoke @lhs.nt @from >#< arg@@ -1271,9 +1274,9 @@ lhs.intramap = Map.singleton @from @loc.thisintra loc.nextintra = maybe Map.empty id $ Map.lookup @to @lhs.allintramap loc.uses = let mp1 = @steps.uses- mp2 = Map.fromList [ (lhsname False i, Just (AttrSyn _LHS i)) | i <- Set.elems @syn ]+ mp2 = Map.fromList [ (lhsname @lhs.options False i, Just (AttrSyn _LHS i)) | i <- Set.elems @syn ] in mp1 `Map.union` mp2- loc.inhVarNms = Set.map (lhsname True) @inh+ loc.inhVarNms = Set.map (lhsname @lhs.options True) @inh loc.defs = @steps.defs `Set.union` @loc.inhVarNms `Set.union` @lhs.terminaldefs loc.defsAsMap = Map.fromList [ (a, Nothing) | a <- Set.elems @loc.defs ] @@ -1317,8 +1320,8 @@ SEM VisitStep | Sem lhs.defs = maybe (error "Rule not found") id $ Map.lookup @name @lhs.ruledefs lhs.uses = maybe (error "Rule not found") id $ Map.lookup @name @lhs.ruleuses- | ChildVisit lhs.defs = Set.insert (stname @child @to) $ maybe (error "Visit not found") (Set.map $ attrname True @child) $ Map.lookup @visit @lhs.avisitdefs- lhs.uses = let convert attrs = Map.fromList [ (attrname False @child attr, Just $ mkNonLocalAttr True @child attr) | attr <- Set.elems attrs ]+ | ChildVisit lhs.defs = Set.insert (stname @child @to) $ maybe (error "Visit not found") (Set.map $ attrname @lhs.options True @child) $ Map.lookup @visit @lhs.avisitdefs+ lhs.uses = let convert attrs = Map.fromList [ (attrname @lhs.options False @child attr, Just $ mkNonLocalAttr True @child attr) | attr <- Set.elems attrs ] in Map.insert (stname @child @from) Nothing $ convert $ maybe (error "Visit not found") id $ Map.lookup @visit @lhs.avisituses @@ -1364,7 +1367,7 @@ loc.addTrace = case @rdesc of Just d -> \x -> "(prerr_endline " ++ show (d ++ " -> " ++ show @field ++ "." ++ show @attr) ++ "; " ++ x ++ ")" Nothing -> id- lhs.tok = (@pos, @loc.addTrace $ attrname True @field @attr)+ lhs.tok = (@pos, @loc.addTrace $ attrname @lhs.options True @field @attr) | HsToken lhs.tok = (@pos, @value)
+ src-ag/ExecutionPlan2Clean.ag view
@@ -0,0 +1,1684 @@+INCLUDE "ExecutionPlan.ag"+INCLUDE "Patterns.ag"+INCLUDE "Expression.ag"+INCLUDE "HsToken.ag"++imports+{+import ExecutionPlan+import Pretty+import PPUtil+import Options+import Data.Monoid(mappend,mempty)+import Data.Maybe+import Debug.Trace+import System.IO+import System.Directory+import System.FilePath+import UU.Scanner.Position++import TokenDef+import HsToken+import ErrorMessages++import Data.Set (Set)+import qualified Data.Set as Set+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Sequence(Seq)+import qualified Data.Sequence as Seq+import Data.Foldable(toList)+}++ATTR ExecutionPlan ENonterminals ENonterminal EProductions EProduction ERules ERule EChildren EChild+ [ importBlocks : PP_Doc+ textBlocks : PP_Doc+ iclModuleHeader : {String -> String -> String -> Bool -> String}+ dclModuleHeader : {String -> String -> String -> Bool -> String}+ mainFile : String+ mainName : String+ constructorTypeMap : {Map NontermIdent ConstructorType} | | ]++-------------------------------------------------------------------------------+-- Options+-------------------------------------------------------------------------------+ATTR ExecutionPlan+ ENonterminals ENonterminal+ EProductions EProduction+ ERules ERule+ EChildren EChild+ Expression+ HsToken HsTokens HsTokensRoot+ Pattern Patterns+ Visits Visit+ VisitSteps VisitStep [ options : {Options} | | ]+ATTR EProductions EProduction [ rename : {Bool} | | ]++SEM ENonterminal+ | ENonterminal prods.rename = rename @lhs.options++-------------------------------------------------------------------------------+-- Context info (nonterminal ident, constructor ident, nonterm params, etc.)+-------------------------------------------------------------------------------++ATTR Visit Visits EProduction EProductions EChildren EChild ERules ERule [ nt : NontermIdent | | ]+SEM ENonterminal+ | ENonterminal prods.nt = @nt++ATTR EChildren EChild ERules ERule Visits Visit+ [ con : ConstructorIdent | | ]++SEM EProduction+ | EProduction children.con = @con+ rules.con = @con+ visits.con = @con++ATTR EProductions EProduction Visits Visit [ params : {[Identifier]} | | ]+SEM ENonterminal | ENonterminal+ prods.params = @params++ATTR EProductions EProduction [ classCtxs : ClassContext | | ]+SEM ENonterminal | ENonterminal+ prods.classCtxs = @classCtxs++-------------------------------------------------------------------------------+-- Default output+-------------------------------------------------------------------------------+ATTR ExecutionPlan [ | | output : {PP_Doc}+ output_dcl : {PP_Doc} ]++SEM ExecutionPlan+ | ExecutionPlan lhs.output = @nonts.output >-< @loc.commonExtra >-< @loc.wrappersExtra+ lhs.output_dcl = @nonts.output_dcl++ATTR ENonterminal ENonterminals [ wrappers : {Set NontermIdent}+ | | output USE {>-<} {empty} : {PP_Doc}+ output_dcl USE {>-<} {empty} : {PP_Doc}]++SEM ExecutionPlan+ | ExecutionPlan nonts.wrappers = @wrappers++SEM ENonterminal+ | ENonterminal lhs.output = ("// " ++ getName @nt ++ " " ++ replicate (60 - length (getName @nt)) '-')+ >-< (if @loc.hasWrapper+ then "// wrapper"+ >-< @loc.wr_inh_icl+ >-< @loc.wr_syn_icl+ >-< @loc.wrapper_icl+ >-< ""+ else empty)+ >-< (if folds @lhs.options+ then "// cata"+ >-< @loc.sem_nt+ >-< ""+ else empty)+ >-< (if semfuns @lhs.options+ then "// semantic domain"+ >-< @loc.t_init_icl+ >-< @loc.t_states_icl+ >-< @loc.k_states+ >-< @prods.sem_prod+ >-< ""+ else empty)+ loc.hasWrapper = @nt `Set.member` @lhs.wrappers+ + lhs.output_dcl = ("// " ++ getName @nt ++ " " ++ replicate (60 - length (getName @nt)) '-')+ >-< (if dataTypes @lhs.options+ then "// data"+ >-< @loc.datatype+ >-< ""+ else empty)+ >-< (if @loc.hasWrapper+ then "// wrapper"+ >-< @loc.wr_inh_dcl+ >-< @loc.wr_syn_dcl+ >-< @loc.wrapper_dcl+ >-< ""+ else empty)+ >-< (if folds @lhs.options+ then "// cata"+ >-< @loc.semname >#< "::" >#< @loc.sem_tp+ >-< ""+ else empty)+ >-< (if semfuns @lhs.options+ then "// semantic domain"+ >-< @loc.t_init_dcl+ >-< @loc.t_states_dcl+ >-< @prods.t_visits+ >-< @prods.sem_prod_tys+ >-< ""+ else empty)++-------------------------------------------------------------------------------+-- Nonterminal datatype+-------------------------------------------------------------------------------+ATTR ENonterminal ENonterminals [ typeSyns : {TypeSyns}+ derivings : {Derivings} | | ]++SEM ExecutionPlan+ | ExecutionPlan nonts.typeSyns = @typeSyns+ nonts.derivings = @derivings++SEM ENonterminal+ | ENonterminal loc.classPP = ppClasses $ classCtxsToDocs @classCtxs+ loc.aliasPre = "::" >#< @loc.classPP >#< @nt >#< @loc.t_params >#< ":=="+ loc.datatype = case lookup @nt @lhs.typeSyns of+ Nothing -> "::" >#< @loc.classPP >#< @nt >#< @loc.t_params+ >-< ( if null @prods.datatype+ then empty+ else if isRecordConstructor @nt @lhs.constructorTypeMap+ then indent 2 $ "=" >#< @prods.recordtype+ else indent 2 $ vlist $ ( ("=" >#< head @prods.datatype)+ : (map ("|" >#<) $ tail @prods.datatype))+ )+ >-< indent 2 @loc.derivings+ Just (List t) -> @loc.aliasPre >#< "[" >#< show t >#< "]"+ Just (Maybe t) -> @loc.aliasPre >#< "Data.Maybe" >#< pp_parens (show t)+ Just (Tuple ts) -> @loc.aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)+ Just (Either l r) -> @loc.aliasPre >#< "Data.Either" >#< pp_parens (show l) >#< pp_parens (show r)+ Just (Map k v) -> @loc.aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< pp_parens (show v)+ Just (IntMap t) -> @loc.aliasPre >#< "Data.IntMap.IntMap" >#< pp_parens (show t)+ Just (OrdSet t) -> @loc.aliasPre >#< "Data.Set.Set" >#< pp_parens (show t)+ Just IntSet -> @loc.aliasPre >#< "Data.IntSet.IntSet"+-- Just x -> error $ "Type " ++ show x ++ " is not supported"+ loc.derivings = case Map.lookup @nt @lhs.derivings of+ Nothing -> empty+ Just s -> if Set.null s+ then empty+ else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)++{+classCtxsToDocs :: ClassContext -> [PP_Doc]+classCtxsToDocs = map toDoc where+ toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))++classConstrsToDocs :: [Type] -> [PP_Doc]+classConstrsToDocs = map ppTp++ppClasses :: [PP_Doc] -> PP_Doc+ppClasses [] = empty+ppClasses xs = "|" >#< pp_block "" "" "&" xs++ppQuants :: [Identifier] -> PP_Doc+ppQuants [] = empty+ppQuants ps = "E." >#< ppSpaced ps >#< ":"+}++ATTR EProduction [ | | datatype : {PP_Doc}+ recordtype : {PP_Doc} ]+ATTR EProductions [ | | datatype USE {:} {[]} : {[PP_Doc]}+ recordtype : {PP_Doc} ]++-- we generate the data type in the type-class style instead of the GADT style+-- the GADT extension may be required if equality constraints are used+SEM EProduction+ | EProduction lhs.datatype = @loc.quantPP1 >#< @loc.classPP1+ >#< conname @lhs.rename @lhs.nt @con+ >#< ppConFields (dataRecords @lhs.options) @children.datatype+ lhs.recordtype = @loc.quantPP1 >#< @loc.classPP1+ >#< ppConFields True @children.recordtype+ loc.classPP1 = ppClasses (classConstrsToDocs @constraints)+ loc.quantPP1 = ppQuants @params++SEM EProductions+ | Cons lhs.recordtype = @hd.recordtype+ | Nil lhs.recordtype = empty++{+-- first parameter indicates: generate a record or not+ppConFields :: Bool -> [PP_Doc] -> PP_Doc+ppConFields True flds = ppListSep "{" "}" ", " flds+ppConFields False flds = ppSpaced flds+}+++ATTR EChild [ | | datatype : {PP_Doc}+ recordtype : {PP_Doc} ]+ATTR EChildren [ | | datatype USE {:} {[]} : {[PP_Doc]}+ recordtype USE {:} {[]} : {[PP_Doc]} ]++-- Note: the child may be a higher-order attribute, and its semantics may be deforested+SEM EChild+ | EChild ETerm+ loc.tpDoc = @loc.addStrict $ pp_parens $ ppTp $ removeDeforested @tp+ loc.strNm = recordFieldname @lhs.nt @lhs.con @name+ loc.field = if dataRecords @lhs.options+ then @loc.strNm >#< "::" >#< @loc.tpDoc+ else @loc.tpDoc+ loc.recordfield = @loc.strNm >#< "::" >#< @loc.tpDoc+ loc.addStrict = \x -> if strictData @lhs.options then "!" >|< x else x+ | EChild lhs.datatype = case @kind of+ ChildAttr -> empty -- higher order attributes are not part of the data type+ _ -> @loc.field++ lhs.recordtype = case @kind of+ ChildAttr -> empty -- higher order attributes are not part of the data type+ _ -> @loc.recordfield+ | ETerm lhs.datatype = @loc.field+ lhs.recordtype = @loc.recordfield++{+ppTp :: Type -> PP_Doc+ppTp = text . typeToHaskellString Nothing []+}++-------------------------------------------------------------------------------+-- Nonterminal semantic function+-------------------------------------------------------------------------------+SEM ENonterminal+ | ENonterminal loc.fsemname = \x -> "sem_" ++ show x+ loc.semname = @loc.fsemname @nt+ loc.frecarg = \t x -> case t of+ NT nt _ _ -> pp_parens (@fsemname nt >#< x)+ _ -> pp x++ -- The sem_NT function is lazy in the AST: it depends on the application of "child"+ -- rules to which extend the AST needs to be constructed.+ loc.sem_tp = @loc.quantPP >#< @loc.classPP >#< @nt >#< @loc.t_params >#< "->" >#< @loc.t_type >#< @loc.t_params+ loc.quantPP = ppQuants @params+ + loc.sem_nt = @loc.semname >#< "::" >#< @loc.sem_tp+ >-< case lookup @nt @lhs.typeSyns of+ Nothing -> @prods.sem_nt+ Just (List t) -> @loc.semname >#< "list" >#< "=" >#< "foldr" >#< @loc.semname >|< "_Cons"+ >#< @loc.semname >|< "_Nil"+ >#< case t of+ NT nt _ _ -> pp_parens ("map" >#< @fsemname nt >#< "list")+ _ -> pp "list"+ Just (Maybe t) -> @loc.semname >#< "'Data.Maybe'.Nothing" >#< "=" >#< @loc.semname >|< "_Nothing"+ >-< @loc.semname >#< pp_parens ("'Data.Maybe'.Just just") >#< "="+ >#< @loc.semname >|< "_Just" >#< @frecarg t "just"+ Just (Tuple ts) -> @loc.semname >#< pp_parens (ppCommas $ map fst ts) >#< "="+ >#< @loc.semname >|< "_Tuple" >#< ppSpaced (map (\t -> @frecarg (snd t) (show $ fst t)) ts)+ Just (Either l r) -> @loc.semname >#< "('Data.Either'.Left left)" >#< "=" >#< @loc.semname >|< "_Left" >#< @frecarg l "left"+ >-< @loc.semname >#< "('Data.Either'.Right right)" >#< "=" >#< @loc.semname >|< "_Right" >#< @frecarg r "right"+ Just (Map k v) -> @loc.semname >#< "m" >#< "=" >#< "'Data.Map'.foldrWithKey"+ >#< @loc.semname >|< "_Entry" >#< @loc.semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("'Data.Map'.map" >#< @fsemname nt >#< "m")+ _ -> pp "m"+ Just (IntMap v) -> @loc.semname >#< "m" >#< "=" >#< "'Data.IntMap'.foldWithKey"+ >#< @loc.semname >|< "_Entry" >#< @loc.semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("'Data.IntMap'.map" >#< @fsemname nt >#< "m")+ _ -> pp "m"+ Just (OrdSet t) -> @loc.semname >#< "s" >#< "=" >#< "foldr" >#< @loc.semname >|< "_Entry"+ >#< @loc.semname >|< "_Nil"+ >#< pp_parens (+ ( case t of+ NT nt _ _ -> pp_parens ("map" >#< @fsemname nt)+ _ -> empty+ ) >#< pp_parens ("'Data.IntSet'.elems" >#< "s")+ )+ Just IntSet -> @loc.semname >#< "s" >#< "=" >#< "foldr" >#< @loc.semname >|< "_Entry"+ >#< @loc.semname >|< "_Nil"+ >#< pp_parens ("'Data.IntSet'.elems" >#< "s")+-- Just x -> error $ "Type " ++ show x ++ " is not supported yet" -- TODO: other typeSyns++-- The number of productions+ATTR EProductions EProduction [ | | count USE {+} {0} : {Int} ]+SEM EProduction | EProduction lhs.count = {1}++-- The per-production cases for the sem_NT function+ATTR EProduction EProductions [ | | sem_nt USE {>-<} {empty} : {PP_Doc} ]+SEM EProduction+ | EProduction lhs.sem_nt = let lhs = "sem_" >|< @lhs.nt+ rhs = "=" >#< "sem_" >|< @lhs.nt >|< "_" >|< @con >#< ppSpaced @children.argnamesw+ cnnm = conname @lhs.rename @lhs.nt @con+ in if isRecordConstructor @lhs.nt @lhs.constructorTypeMap+ then lhs >#< "{" >#< cnnm >#< "|" >#<+ pp_block "" "" "," (zipWith (\l r -> l >#< "=" >#< r) @children.recfields @children.argpats) >#< "}" >#< rhs+ else lhs >#< "(" >#< cnnm >#< ppSpaced @children.argpats >#< ")" >#< rhs++{+isRecordConstructor :: NontermIdent -> Map NontermIdent ConstructorType -> Bool+isRecordConstructor nt ctm = Map.lookup nt ctm == Just RecordConstructor+}++ATTR EChild [ | | argnamesw : { PP_Doc } ]+ATTR EChildren [ | | argnamesw USE {:} {[]} : {[PP_Doc]} ]++SEM EChild+ | EChild lhs.argnamesw = case @kind of+ ChildSyntax -> "(" >#< "sem_" >|< @loc.nt >#< @name >|< "_" >#< ")"+ ChildAttr -> empty -- no sem-case for a higher-order child+ ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< @name >|< "_" >#< ")"+ | ETerm lhs.argnamesw = text $ fieldname @name++-------------------------------------------------------------------------------+-- Types of attributes+-------------------------------------------------------------------------------+ATTR ExecutionPlan+ ENonterminals+ ENonterminal [ inhmap : {Map NontermIdent Attributes}+ synmap : {Map NontermIdent Attributes} | | ]++ATTR EProductions EProduction+ ERules ERule+ Patterns Pattern+ Visits+ Visit [ inhmap : {Attributes}+ synmap : {Attributes}+ allInhmap : {Map NontermIdent Attributes}+ allSynmap : {Map NontermIdent Attributes} | | ]++SEM ENonterminal+ | ENonterminal (Just prods.inhmap) = Map.lookup @nt @lhs.inhmap+ (Just prods.synmap) = Map.lookup @nt @lhs.synmap+ prods.allInhmap = @lhs.inhmap+ prods.allSynmap = @lhs.synmap++-------------------------------------------------------------------------------+-- State datatypes+-------------------------------------------------------------------------------+{type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)}++ATTR Visit [ | | allvisits : { VisitStateState }]+ATTR Visits [ | | allvisits USE {:} {[]} : {[VisitStateState]}]+ATTR EProduction+ EProductions [ | | allvisits: {[VisitStateState]}]++SEM Visit+ | Visit lhs.allvisits = (@ident, @from, @to)++SEM EProductions+ | Cons lhs.allvisits = @hd.allvisits -- just pick the first production+ | Nil lhs.allvisits = error "Every nonterminal should have at least 1 production"++-- type of tree in a given state s+SEM ENonterminal+ | ENonterminal loc.outedges = Set.fromList $ map (\(_,f,_) -> f) @prods.allvisits+ loc.inedges = Set.fromList $ map (\(_,_,t) -> t) @prods.allvisits+ loc.allstates = Set.insert @initial $ @loc.inedges `Set.union` @loc.outedges+ loc.stvisits = \st -> filter (\(v,f,t) -> f == st) @prods.allvisits+ loc.t_type = "T_" >|< @nt+ loc.lt_type = "t_" >|< @nt+ loc.t_params = ppSpaced @params+ loc.t_init_icl = @loc.t_init_dcl >-<+ "attach_" >|< @loc.t_type >#< pp_parens (@loc.t_type >#< @loc.lt_type) >#< "=" >#< @loc.lt_type+ loc.t_init_dcl = "::" >#< @loc.t_type >#< @loc.t_params >#< "=" >#< @loc.t_type+ >#<+ pp_parens (+ ppMonadType @lhs.options >#< pp_parens (@loc.t_type >|< "_s" >|< @initial >#< @loc.t_params))+ loc.t_states_icl = vlist $ map (\st ->+ let nt_st = @nt >|< "_s" >|< st+ c_st = "C_" >|< nt_st+ inv_st = "inv_" >|< nt_st+ nextVisit = Map.findWithDefault ManyVis st @nextVisits+ in case nextVisit of+ NoneVis -> empty -- empty semantics+ OneVis vId -> inv_st >#< pp_parens (c_st >#< "x") >#< "=" >#< "x"+ ManyVis -> empty+ ) $ Set.toList @loc.allstates+ loc.t_states_dcl = vlist $ map (\st ->+ let nt_st = @nt >|< "_s" >|< st+ t_st = "T_" >|< nt_st+ k_st = "K_" >|< nt_st+ c_st = "C_" >|< nt_st+ inv_st = "inv_" >|< nt_st+ nextVisit = Map.findWithDefault ManyVis st @nextVisits+ in case nextVisit of+ NoneVis -> "::" >#< t_st >#< @loc.t_params >#< "=" >#< c_st -- empty semantics+ OneVis vId -> "::" >#< t_st >#< @loc.t_params >#< "=" >#< c_st >#< (pp_parens (conNmTVisit @nt vId >#< @loc.t_params))+ ManyVis -> "::" >#< t_st >#< @loc.t_params >#< "where" >#< c_st >#< "::" -- TODO : Cleanify+ >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("E.t:" >#< k_st >#< @loc.t_params >#< "t" >#< "->" >#< "t"))+ >#< "->" >#< t_st >#< @loc.t_params -- this is a conventional data type, but declared with GADT syntax+ ) $ Set.toList @loc.allstates+ +-- type of a key which identifies a visit v from state s+SEM ENonterminal+ | ENonterminal loc.k_type = "K_" ++ show @nt+ loc.k_states = vlist $ map (\st ->+ let nt_st = @nt >|< "_s" >|< st+ k_st = "K_" >|< nt_st+ outg = filter (\(v,f,t) -> f == st) @prods.allvisits+ visitlist = vlist $ map (\(v,f,t) ->+ @loc.k_type >|< "_v" >|< v >#< "::" >#< k_st >#< @loc.t_params >#< pp_parens (@loc.t_type >|< "_v" >|< v >#< @loc.t_params)+ ) outg+ nextVisit = Map.findWithDefault ManyVis st @nextVisits+ decl = "::" >#< k_st >#< "k" >#< @loc.t_params >#< "where" >-< indent 3 visitlist+ in case nextVisit of+ NoneVis -> empty+ OneVis _ -> empty+ ManyVis -> decl+ ) $ Set.toList @loc.allstates++-- type of a visit v, with continuation as new state s+ATTR Visit Visits EProduction EProductions [ | | t_visits USE {>-<} {empty} : {PP_Doc} ]++SEM EProductions+ | Cons lhs.t_visits = @hd.t_visits -- just pick the first production++SEM Visit+ | Visit loc.nameT_visit = conNmTVisit @lhs.nt @ident+ loc.nameTIn_visit = conNmTVisitIn @lhs.nt @ident+ loc.nameTOut_visit = conNmTVisitOut @lhs.nt @ident+ loc.nameTNext_visit = conNmTNextVisit @lhs.nt @to++ loc.nextVisitInfo = Map.findWithDefault ManyVis @to @lhs.nextVisits -- which visits can we do after we reach the @to state?+ loc.typecon = case @kind of+ VisitPure _ -> empty+ VisitMonadic -> ppMonadType @lhs.options++ loc.t_params = ppSpaced @lhs.params+ lhs.t_visits = "::" >#< @loc.nameT_visit >#< @loc.t_params >#< ":==" >#<+ pp_parens (@loc.nameTIn_visit >#< @loc.t_params)+ >#< ( if dummyTokenVisit @lhs.options+ then "->" >#< dummyType @lhs.options True -- Additional (unused though) argument+ else empty+ )+ >#< "->" >#< @loc.typecon >#< pp_parens (@loc.nameTOut_visit >#< @loc.t_params)+ >-< "::" >#< @loc.nameTIn_visit >#< @loc.t_params >#< "=" >#< @loc.nameTIn_visit >#<+ @loc.inhpart+ >-< "::" >#< @loc.nameTOut_visit >#< @loc.t_params >#< "=" >#< @loc.nameTOut_visit >#<+ @loc.synpart >#< case @loc.nextVisitInfo of+ NoneVis -> empty -- don't return a continuation at all+ _ -> @loc.addbang1 $ pp_parens (@loc.nameTNext_visit >#< @loc.t_params) -- normal route: select the next semantics++ loc.inhpart = @loc.ppTypeList @inh @lhs.inhmap+ loc.synpart = @loc.ppTypeList @syn @lhs.synmap+ loc.ppTypeList = \s m -> ppSpaced $ map (\i -> @loc.addbang1 $ pp_parens $ case Map.lookup i m of+ Just tp -> ppTp tp ) $ Set.toList s++{+conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId+conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId+conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId+conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId++ppMonadType :: Options -> PP_Doc+ppMonadType opts+ | parallelInvoke opts = text "IO"+ | otherwise = text "Identity"+}++-------------------------------------------------------------------------------+-- Inh and Syn wrappers+-------------------------------------------------------------------------------+SEM ENonterminal+ | ENonterminal loc.wr_inh_icl = @loc.genwrap_icl "Inh" @loc.wr_inhs+ loc.wr_syn_icl = @loc.genwrap_icl "Syn" @loc.wr_syns+ loc.genwrap_icl = \nm attr ->+ let tyConName = nm >|< "_" >|< @nt+ in (let (d, _, _) = foldr (\(i, t) (d, c, n) -> (d >-<+ i >|< "_" >|< tyConName >#< "::" >#< tyConName >#< "->" >#< (@loc.addbang $ pp_parens $ typeToHaskellString (Just @nt) [] t)+ >-< i >|< "_" >|< tyConName >#< pp_parens (tyConName >#< unwords (replicate (n - c - 1) "_" ++ ["x"] ++ replicate c "_")) >#< "= x"+ , c + 1, n)+ ) (empty, 0, length attr) attr+ in d)+ loc.wr_inh_dcl = @loc.genwrap_dcl "Inh" @loc.wr_inhs+ loc.wr_syn_dcl = @loc.genwrap_dcl "Syn" @loc.wr_syns+ loc.genwrap_dcl = \nm attr ->+ let tyConName = nm >|< "_" >|< @nt+ in "::" >#< tyConName >#< @loc.t_params >#< "=" >#< tyConName -- >#< "{"+ >#< (ppSpaced $ map (\(_,t) -> @loc.addbang $ pp_parens $ typeToHaskellString (Just @nt) [] t) attr) -- >#< "}"+ >-<+ (let (d, _, _) = foldr (\(i, t) (d, c, n) -> (d >-<+ i >|< "_" >|< tyConName >#< "::" >#< tyConName >#< "->" >#< (@loc.addbang $ pp_parens $ typeToHaskellString (Just @nt) [] t)+ , c + 1, n)+ ) (empty, 0, length attr) attr+ in d)+ loc.synAttrs = fromJust $ Map.lookup @nt @lhs.inhmap+ loc.wr_inhs = Map.toList $ @loc.wr_filter $ @loc.synAttrs+ loc.wr_inhs1 = Map.toList @loc.synAttrs+ loc.wr_filter = if lateHigherOrderBinding @lhs.options+ then Map.delete idLateBindingAttr+ else id+ loc.wr_syns = Map.toList $ fromJust $ Map.lookup @nt @lhs.synmap+ loc.inhlist = map (lhsname @lhs.options True . fst) @loc.wr_inhs+ loc.inhlist1 = map (lhsname @lhs.options True . fst) @loc.wr_inhs1+ loc.synlist = map (lhsname @lhs.options False . fst) @loc.wr_syns+ loc.wrapname = "wrap_" ++ show @nt+ loc.inhname = "Inh_" ++ show @nt+ loc.synname = "Syn_" ++ show @nt+ loc.firstVisitInfo = Map.findWithDefault ManyVis @initial @nextVisits+ loc.wrapper_icl = (@loc.wrapname >#< "::" >#< @loc.quantPP >#< @loc.classPP >#< @loc.t_type >#< @loc.t_params -- TODO : Remove ? >#< "->"+ >#< @loc.inhname >#< @loc.t_params >#< "->" >#< ( if monadicWrappers @lhs.options then ppMonadType @lhs.options else empty) >#< pp_parens (@loc.synname >#< @loc.t_params))+ >-< (@loc.wrapname >#< (@loc.addbang $ pp_parens (@loc.t_type >#< pp "act"))+ >#< (@loc.addbang $ pp_parens (@loc.inhname+ >#< (ppSpaced $ map (@loc.addbangWrap . pp) @loc.inhlist)) >#< "="))+ >-<+ indent 3 (case @initialv of+ -- case where there are no inherited or synthesized attributes+ Nothing -> text @loc.synname -- TODO : Remove? >#< " { }"+ Just initv ->+ let inCon = conNmTVisitIn @nt initv+ outCon = conNmTVisitOut @nt initv+ pat = @loc.addbang $ pp_parens $ pat0+ pat0 = outCon >#< ppSpaced @loc.synlist -- should be an "end" state, thus no continuation expected here+ arg = inCon >#< ppSpaced @loc.inhlist1+ ind = case @loc.firstVisitInfo of+ NoneVis -> error "wrapper: initial state should have a next visit but it has none"+ OneVis _ -> empty+ ManyVis -> @loc.k_type >|< "_v" >|< initv+ extra = if dummyTokenVisit @lhs.options+ then pp $ dummyArg @lhs.options True+ else empty+ convert = case Map.lookup initv @lhs.allVisitKinds of+ Just kind -> case kind of+ VisitPure _ -> text "lift"+ VisitMonadic -> empty+ _ -> empty+ unMonad | monadicWrappers @lhs.options = empty+ | otherwise = unMon @lhs.options+ in unMonad >#< "("+ >-< indent 2+ ("act >>= \\" >#< @loc.addbang (pp "sem") >#< "->" -- run the per-node monadic code to get the initial state (of the root)+ >-< "lift" >#< pp_parens arg >#< ">>= \\" >#< @loc.addbangWrap (pp "arg") >#< "->"+ >-< convert >#< pp_parens ("inv_" >|< @nt >|< "_s" >|< @initial >#< "sem" >#< ind >#< "arg" >#< extra) >#< ">>= \\" >#< pat >#< "->" -- invoke initial state (of the root)+ >-< "lift" >#< pp_parens (@loc.synname >#< ppSpaced @loc.synlist)+ )+ >-< ")" )+ >-< if lateHigherOrderBinding @lhs.options+ then indent 2 ("where" >#< lhsname @lhs.options True idLateBindingAttr >#< "=" >#< lateBindingFieldNm @lhs.mainName)+ else empty+ loc.wrapper_dcl = (@loc.wrapname >#< "::" >#< @loc.quantPP >#< @loc.classPP >#< @loc.t_type >#< @loc.t_params -- TODO : Remove ? >#< "->"+ >#< @loc.inhname >#< @loc.t_params >#< "->" >#< ( if monadicWrappers @lhs.options then ppMonadType @lhs.options else empty) >#< pp_parens (@loc.synname >#< @loc.t_params))++-------------------------------------------------------------------------------+-- Collection of NT / Production sem funs references+-------------------------------------------------------------------------------++ATTR ENonterminals ENonterminal EProductions EProduction [ | | semFunBndDefs, semFunBndTps USE {Seq.><} {Seq.empty} : {Seq PP_Doc} ]+SEM ENonterminal | ENonterminal+ lhs.semFunBndDefs = @loc.semFunBndDef Seq.<| @prods.semFunBndDefs+ lhs.semFunBndTps = @loc.semFunBndTp Seq.<| @prods.semFunBndTps+ loc.semFunBndDef = @loc.semFunBndNm >#< "=" >#< @loc.semname+ loc.semFunBndTp = @loc.semFunBndNm >#< "::" >#< @loc.sem_tp+ loc.semFunBndNm = lateSemNtLabel @nt++SEM EProduction | EProduction+ lhs.semFunBndDefs = Seq.singleton @loc.semFunBndDef+ lhs.semFunBndTps = Seq.singleton @loc.semFunBndTp+ loc.semFunBndDef = @loc.semFunBndNm >#< "=" >#< @loc.semname+ loc.semFunBndTp = @loc.semFunBndNm >#< "::" >#< @loc.sem_tp+ loc.semFunBndNm = lateSemConLabel @lhs.nt @con++-- Generate a dictionary that contains the semantics of all semantic functions+SEM ExecutionPlan | ExecutionPlan+ loc.wrappersExtra = if lateHigherOrderBinding @lhs.options+ then @loc.lateSemBndDef+ else empty+ loc.commonExtra = if lateHigherOrderBinding @lhs.options+ then @loc.lateSemBndTp+ else empty+ loc.lateSemBndTp = "::" >#< lateBindingTypeNm @lhs.mainName >#< "=" >#< lateBindingTypeNm @lhs.mainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList @nonts.semFunBndTps)+ loc.lateSemBndDef = lateBindingFieldNm @lhs.mainName >#< "::" >#< lateBindingTypeNm @lhs.mainName+ >-< lateBindingFieldNm @lhs.mainName >#< "=" >#< lateBindingTypeNm @lhs.mainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList @nonts.semFunBndDefs )++-------------------------------------------------------------------------------+-- Production semantic functions+-------------------------------------------------------------------------------+ATTR EProduction [ | | sem_prod : {PP_Doc}+ sem_prod_tys : {PP_Doc} ]+ATTR EProductions [ | | sem_prod USE {>-<} {empty} : {PP_Doc}+ sem_prod_tys USE {>-<} {empty} : {PP_Doc} ]++ATTR EProduction EProductions [ initial : {StateIdentifier}+ allstates : {Set StateIdentifier} | | ]+SEM ENonterminal+ | ENonterminal prods.initial = @initial+ prods.allstates = @loc.allstates+ +ATTR EChild [ | | argtps : { PP_Doc }+ argpats : { PP_Doc }+ recfields USE {++} {[]} : { [Identifier] }]+ATTR EChildren [ | | argtps USE {:} {[]} : { [PP_Doc] }+ argpats USE {:} {[]} : { [PP_Doc] }+ recfields USE {++} {[]} : { [Identifier] }]++SEM EChild+ | EChild lhs.argtps = case @kind of+ ChildSyntax -> pp_parens $ ppDefor @tp -- TODO Remove? >#< "->"+ ChildReplace tp -> pp_parens $ ppDefor tp -- TODO Remove? >#< "->"+ _ -> empty -- higher order attribute+ loc.argpats = case @kind of+ ChildSyntax -> @name >|< "_" -- no strictification of children semantics to allow infinite trees+ ChildReplace _ -> @name >|< "_"+ _ -> empty+ + lhs.recfields = case @kind of+ ChildSyntax -> [@name] -- no strictification of children semantics to allow infinite trees+ ChildReplace _ -> [@name]+ _ -> []+ + -- | ETerm lhs.argtps = (pp_parens $ show @tp) >#< "572->" -- TODO Remove?+ | ETerm lhs.argtps = pp_parens $ show @tp+ loc.argpats = @loc.addbang $ text $ fieldname @name -- terminals may be strict (perhaps this should become an option)+ lhs.recfields = [@name]++{+ppDefor :: Type -> PP_Doc+ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)+ppDefor (Haskell s) = text s+}++SEM EProduction+ | EProduction loc.t_type = "T_" >|< @lhs.nt+ loc.t_params = ppSpaced @lhs.params+ loc.usedArgs = @children.usedArgs `Set.union` @visits.usedArgs `Set.union` @rules.usedArgs+ -- A bit ugly, but this code renames arguments and puts an underscore when the argument+ -- is never used. This avoids compiler warnings of unused variables.+ loc.args = map (\x -> let (name,arg) = case show x of + "" -> ("", empty)+ '!':name -> ("arg_" ++ name, "!arg_" >|< name)+ name -> ("arg_" ++ name, "arg_" >|< name)+ in if null name || name `Set.member` @loc.usedArgs+ then arg+ else text "_") @children.argpats+ loc.semname = "sem_" ++ show @lhs.nt ++ "_" ++ show @con+ loc.sem_tp = @loc.quantPP2 >#< @loc.classPP2 >#< ppSpaced @children.argtps+ >#< (if length @children.argtps > 0 then "->" else "")+ >#< @loc.t_type >#< @loc.t_params -- TODO Keep -> here?+ loc.classPP2 = ppClasses (classCtxsToDocs @lhs.classCtxs ++ classConstrsToDocs @constraints)+ loc.quantPP2 = ppQuants (@lhs.params ++ @params)+ + lhs.sem_prod_tys = @loc.semname >#< " ::" >#< @loc.sem_tp+ + loc.sem_prod = @loc.semname >#< " ::" >#< @loc.sem_tp+ >-< @loc.mkSemBody (@loc.semname >#< ppSpaced @loc.args >#< "=" >#< @loc.t_type)+ @loc.mbInitializer @loc.outerlet ("lift" >#< "st" >|< @lhs.initial)+ loc.mkSemBody = \prefix mbInit outerlet ret ->+ case mbInit of+ Nothing -> prefix >#< pp_parens ret >#< "where"+ >-< indent 3 outerlet -- code for states and visits+ Just m -> prefix >#< "(" >#< "do" -- TODO: desugar+ >-< indent 1 (+ m+ >-< "let"+ >-< indent 2 outerlet -- code for the states and visits+ >-< ret )+ >-< indent 1 ")"++ loc.mbInitializer = --some monadic actions, performed upon attaching a child, can+ -- be specified here. The resulting bindings of these actions are+ -- in scope of the rules of the production+ if parallelInvoke @lhs.options+ then (Nothing :: Maybe PP_Doc) -- perhaps do some per-node registation, etc. For now: nothing+ else Nothing -- nothing special here+ loc.outerlet = vlist @loc.statefns >-< @rules.sem_rules+ loc.statefns = map @loc.genstfn $ Set.toList @lhs.allstates+ loc.genstfn = \st -> let nextVisitInfo = Map.findWithDefault ManyVis st @lhs.nextVisits+ prevVisitInfo = Map.findWithDefault ManyVis st @lhs.prevVisits+ stNm = "st" >|< st+ lhs = bang stNm >#< "=" >#<+ ( -- generating a lambda for the same reasons as generating+ -- a lambda for rules: to ensure that overloading is+ -- resolved for all visit functions and rules together.+ if st == @lhs.initial+ then empty+ else "\\" >#< @loc.stargs st >#< "->"+ )++ cCon = "C_" >|< @lhs.nt >|< "_s" >|< st+ bang | st == @lhs.initial = @loc.addbang -- initial state is not parameterized+ | otherwise = id++ -- note about the initial state: the initial state should be the only+ -- state-binding that is not a function. It is non-recursive and not needed+ -- anywhere except delivered as initial result. This binding therefore does+ -- not end up needlessly in any closure.+ in case nextVisitInfo of+ NoneVis -> -- the (empty) closure of a (non-initial) end state is not referenced+ -- thus generating it is not needed (and omitting it may catch some small mistakes).+ if st == @lhs.initial+ then lhs >#< cCon -- empty state+ else empty -- no state generated+ OneVis vId -> mklet lhs (@loc.stvs st False) (cCon >#< "v" >|< vId)+ ManyVis -> mklet lhs (@loc.stks st >-< @loc.stvs st True) (cCon >#< "k" >|< st)+ loc.stargs = \st -> let attrs = maybe Map.empty id $ Map.lookup st @visits.intramap+ in ppSpaced [ let match | str `Set.member` @loc.lazyIntras = pp str+ | otherwise = @loc.addbang (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs @lhs.options) ->+ case Map.lookup nm @loc.localAttrTypes of+ Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerStateTypeSigs @lhs.options) ->+ case lookupAttrType attr @lhs.allInhmap @lhs.allSynmap @loc.childTypes of+ Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs attrs+ ] >#< dummyPat @lhs.options (Map.null attrs)++ loc.stks = \st -> if null (@loc.stvisits st)+ then empty+ else "k" >|< st >#< "::" >#< "K_" >|< @lhs.nt >|< "_s" >|< st >#< @loc.t_params >#< "t" >#< "->" >#< "t"+ >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< @lhs.nt >|< "_v" >|< v >#< "="+ >#< "v" >|< v) $ @loc.stvisits st)+ loc.stvisits = \st -> filter (\(v,f,t) -> f == st) @visits.allvisits+ loc.stvs = \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- @visits.sem_visit, f == st]+ visits.mrules = @rules.mrules++{+mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc+mklet prefix defs body =+ prefix+ >-< indent (length (show prefix))+ ("let"+ >-< indent 4 defs+ >-< "in" >#< body)+}++-------------------------------------------------------------------------------+-- Visit semantic functions+-------------------------------------------------------------------------------+ATTR Visit [ | | sem_visit : { (StateIdentifier,Bool -> PP_Doc) } ]+ATTR Visits [ | | sem_visit USE {:} {[]} : { [(StateIdentifier,Bool -> PP_Doc)] } ]++SEM Visit+ | Visit lhs.sem_visit = ( @from+ , \_ ->+ -- TODO: Generate type signature "v" >|< @ident >#< "::" >#< @loc.nameTIn_visit >#< "->" >#< @loc.nameT_visit >#< @loc.t_params >-< ++ -- Haskell: generate a lambda here as well instead of a function definition+ -- >-< "v" >|< @ident >#< "=" >#< "\\" >#< (@loc.addbang $ pp_parens (@loc.nameTIn_visit >#< @loc.inhpats))+ -- Clean: generate a function+ "v" >|< @ident >#< (@loc.addbang $ pp_parens (@loc.nameTIn_visit >#< @loc.inhpats)) >#< "="+ >#< ( if dummyTokenVisit @lhs.options+ then pp $ dummyPat @lhs.options True -- extra (but unused) argument+ else empty+ )+ -- >#< "->"+ -- >#< "("+ >-< indent 10 (@loc.stepsInitial+ >-< indent 4 @steps.sem_steps) >-< indent 10 @loc.stepsClosing+ -- >#< ")"+ )+ loc.stepsInitial = case @kind of+ VisitPure False -> text "let"+ VisitPure True -> empty+ VisitMonadic -> text "do"+ loc.stepsClosing = let decls = @loc.nextStBuild+ >-< @loc.addbang (pp resultValName) >#< "=" >#< @loc.resultval+ in case @kind of+ VisitPure False -> indent 4 decls+ >-< "in" >#< resultValName+ VisitPure True -> "let" >#< decls+ >-< indent 1 ("in" >#< resultValName)+ VisitMonadic -> "let" >#< decls+ >-< "lift" >#< resultValName+ loc.vname = "v" >|< @ident+ loc.inhpats = ppSpaced $ map (\arg -> pp $ attrname @lhs.options True _LHS arg) $ Set.toList @inh+ loc.inhargs = \chn -> ppSpaced $ map (attrname @lhs.options False chn) $ Set.toList @inh+ loc.synargs = ppSpaced $ map (\arg -> attrname @lhs.options False _LHS arg) $ Set.toList @syn+ loc.nextargsMp = maybe Map.empty id $ Map.lookup @to @lhs.allintramap+ loc.nextargs = ppSpaced $ Map.keys $ @loc.nextargsMp+ loc.nextst = "st" >|< @to >#< @loc.nextargs >#< dummyArg @lhs.options (Map.null @loc.nextargsMp)+ loc.resultval = @loc.nameTOut_visit >#< @loc.synargs >#< @loc.nextStRef+ (loc.nextStBuild, loc.nextStRef)+ = case @loc.nextVisitInfo of+ NoneVis -> (empty, empty)+ _ -> (@loc.addbang (pp nextStName) >#< "=" >#< @loc.nextst, pp nextStName)++{+resultValName :: String+resultValName = "ag__result_"++nextStName :: String+nextStName = "ag__st_"+}++-- Propagate the visit kind to the steps+ATTR VisitStep VisitSteps [ kind : VisitKind | | ]+SEM Visit | Visit steps.kind = @kind++-- the steps in this group should be executed in a pure fashion+SEM VisitStep | PureGroup+ steps.kind = VisitPure @ordered++ATTR Visits Visit VisitStep VisitSteps [ mrules : {Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)} | | ]+ATTR VisitStep VisitSteps [ | | sem_steps USE {>-<} {empty} : {PP_Doc} ]+SEM VisitStep+ | Sem loc.ruleItf = Map.findWithDefault (error $ "Rule " ++ show @name ++ " not found") @name @lhs.mrules+ (lhs.errors, loc.sem_steps) = case @loc.ruleItf @lhs.kind @lhs.fmtMode of+ Left e -> (Seq.singleton e, empty)+ Right stmt -> (Seq.empty, stmt)+ | ChildIntro loc.attachItf = Map.findWithDefault (error $ "Child " ++ show @child ++ " not found") @child @lhs.childintros+ (lhs.errors,lhs.sem_steps,lhs.defs,lhs.uses)+ = case @loc.attachItf @lhs.kind @lhs.fmtMode of+ Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)+ Right (code, defs, uses) -> (Seq.empty, code, defs, uses)+ | ChildVisit loc.visitItf = Map.findWithDefault (error $ "Visit " ++ show @visit ++ " not found") @visit @lhs.allchildvisit+ (lhs.errors, loc.patPP, loc.exprPP) = case @loc.visitItf @child @lhs.kind of+ Left e -> (Seq.singleton e, empty, empty)+ Right (pat,expr) -> (Seq.empty, pat, expr)++ lhs.sem_steps = let decl = case @lhs.kind of+ VisitPure _ -> @loc.patPP >#< "=" >#< @loc.exprPP+ VisitMonadic -> @loc.exprPP >#< ">>= \\" >#< @loc.patPP >#< "->"+ in fmtDecl False @lhs.fmtMode decl+ loc.convToMonad = case @loc.callKind of+ VisitPure _ -> text "lift"+ VisitMonadic -> empty+ loc.callKind = Map.findWithDefault (error "visit kind should be in the map") @visit @lhs.allVisitKinds+ | Sim lhs.sem_steps = @steps.sem_steps+ | PureGroup lhs.sem_steps = case @lhs.fmtMode of+ FormatDo -> "let" >#< @steps.sem_steps -- formatted as a let-block (not a line-let)+ _ -> @steps.sem_steps++-- The fmtMode indicates in what kind of expression (do/let/line-lets) we are printing+-- declarations, because that determines how we need to wrap declarations+-- Invariant: @lhs.kind == VisitMonadic ---> @lhs.fmtMode == FormatDo+ATTR VisitSteps VisitStep [ fmtMode : FormatMode | | ]+SEM Visit | Visit+ steps.fmtMode = case @kind of+ VisitPure False -> FormatLetDecl+ VisitPure True -> FormatLetLine+ VisitMonadic -> FormatDo++SEM VisitStep | PureGroup+ steps.fmtMode = case @lhs.fmtMode of+ FormatDo -> FormatLetDecl+ mode -> mode++{+parResultName :: String+parResultName = "__outcome_"++fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc+fmtDecl declPure fmt decl = case fmt of+ FormatLetDecl -> pp decl+ FormatLetLine -> "let" >#< decl >#< "in"+ FormatDo | declPure -> "let" >#< decl >#< "in"+ | otherwise -> pp decl+}++--+-- Some properties of VisitStep(s)+--++-- Used arguments+ATTR VisitSteps VisitStep Visit Visits EChild EChildren ERule ERules [ | | usedArgs USE {`Set.union`} {Set.empty} : {Set String} ]+SEM ERule+ | ERule +usedArgs = Set.union $ Map.keysSet $ Map.mapKeys (\a -> "arg_" ++ a) $ Map.filter isNothing @rhs.attrs++SEM EChild+ | EChild +usedArgs = \s -> case @kind of+ ChildSyntax -> Set.insert ("arg_" ++ show @name ++ "_") s+ _ -> s+++-- Number of steps in a 'Sim' block+ATTR VisitSteps [ | | size : Int ]+SEM VisitSteps+ | Nil lhs.size = 0+ | Cons lhs.size = 1 + @tl.size++-- Number the steps in a 'Sim' block+ATTR VisitSteps VisitStep [ | index : Int | ]+SEM VisitSteps | Cons+ hd.index = @lhs.index -- copy rule+ tl.index = 1 + @lhs.index+ lhs.index = @tl.index -- copy rule+SEM Visit | Visit steps.index = 0+SEM VisitStep | Sim steps.index = 0+ lhs.index = @lhs.index -- needed for if we ever allow nested Sims++-- Is this the last step?+ATTR VisitSteps VisitStep [ | | isLast : Bool ]+ATTR VisitStep [ isLast : Bool | | ]+SEM VisitSteps+ | Nil lhs.isLast = True+ | Cons lhs.isLast = False+ hd.isLast = @tl.isLast++SEM VisitStep | Sim+ loc.isMonadic = case @lhs.kind of+ VisitMonadic -> True+ _ -> False+++-- Child introduction+ATTR EChild EChildren [ | | childintros USE {`Map.union`} {Map.empty} : {Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))} ]++ATTR Visits Visit+ VisitSteps VisitStep [ childintros : {Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))} | | ]++SEM EProduction+ | EProduction visits.childintros = @children.childintros++SEM EChild+ | ETerm lhs.childintros = Map.singleton @name (\_ _ -> Right (empty, Set.empty, Map.empty))+ | EChild lhs.childintros = Map.singleton @name @loc.introcode+ loc.isDefor = case @tp of+ NT _ _ defor -> defor+ _ -> False+ loc.valcode = case @kind of+ ChildSyntax -> "arg_" >|< @name >|< "_"+ ChildAttr -> -- decide if we need to invoke the sem-function under the hood+ let prefix | not @loc.isDefor = if lateHigherOrderBinding @lhs.options -- && sepsemmods @lhs.options -- when sepsemmods is not enabled, the indirection can be optimized away+ then lateSemNtLabel @loc.nt >#< lhsname @lhs.options True idLateBindingAttr+ else "sem_" >|< @loc.nt+ | otherwise = empty -- no need to intro a terminal+ in pp_parens (prefix >#< instname @name)+ ChildReplace _ -> -- the higher-order attribute is actually a function that transforms+ -- the semantics of the child (always deforested)+ pp_parens (instname @name >#< @name >|< "_")+ loc.aroundcode = if @hasAround+ then locname @lhs.options @name >|< "_around"+ else empty+ loc.introcode = \kind fmtMode ->+ let pat = text $ stname @name @loc.initSt+ patStrict = @loc.addbang pat+ attach = "attach_T_" >|< @loc.nt >#< pp_parens (@loc.aroundcode >#< @loc.valcode)+ runAttach = unMon @lhs.options >#< pp_parens attach+ decl = case kind of+ VisitPure False -> pat >#< "=" >#< runAttach+ VisitPure True -> patStrict >#< "=" >#< runAttach+ VisitMonadic -> attach >#< ">>= \\" >#< patStrict >#< "->"+ in if compatibleAttach kind @loc.nt @lhs.options+ then Right ( fmtDecl False fmtMode decl+ , Set.singleton (stname @name @loc.initSt) -- variables defined by the child intro+ , case @kind of -- variables used by the child introduction+ ChildAttr -> Map.insert (instname @name) Nothing $ -- the sem attr+ ( if @loc.isDefor || not (lateHigherOrderBinding @lhs.options)+ then id -- the sem dictionary attr is not used+ else Map.insert (lhsname @lhs.options True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ ) $+ ( if @hasAround+ then Map.insert (locname @lhs.options (@name) ++ "_around") Nothing+ else id+ ) $ Map.empty+ ChildReplace _ -> Map.singleton (instname @name) Nothing -- uses the transformation function+ ChildSyntax -> Map.empty+ )+ else Left $ IncompatibleAttachKind @name kind+ loc.nt = extractNonterminal @tp++{+stname :: Identifier -> Int -> String+stname child st = "st_" ++ getName child ++ "X" ++ show st++-- should actually return some conversion info+compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool+compatibleAttach _ _ _ = True++unMon :: Options -> PP_Doc+unMon options+ | parallelInvoke options = text "'System.IO.Unsafe'.unsafePerformIO" -- IO monad+ | otherwise = text "'Control.Monad.Identity'.runIdentity" -- identity monad+}++-- rules+ATTR ERules ERule [ | | sem_rules USE {>-<} {empty} : {PP_Doc}+ mrules USE {`Map.union`} {Map.empty} : {Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)} ]++SEM ERule | ERule+ lhs.sem_rules = if @loc.used == 0+ then empty+ else @loc.rulecode+ loc.rulecode = ( if @loc.genpragma+ then @loc.pragma -- this additional pragma *may* help to give some AG source location in the presence of+ -- type errors in the rule. It will definitely not be precise, and may take some additional+ -- source space, but let's see if it's worth it in practice.+ else empty+ )+ >-< @loc.lambda+ >-< indent ((column @rhs.pos - 2) `max` 2)+ ( if @loc.genpragma+ then @loc.pragma >-< @rhs.semfunc >-< @loc.endpragma+ else @rhs.semfunc+ )+ loc.pragma = "/*# LINE" >#< show (line @rhs.pos) >#< show (file @rhs.pos) >#< "#*/"+ loc.endpragma = ppWithLineNr (\ln -> "/*# LINE " ++ show (ln+1) ++ " " ++ show @lhs.mainFile ++ "#*/")+ loc.genpragma = genLinePragmas @lhs.options && @explicit && @loc.haspos+ loc.haspos = line @rhs.pos > 0 && column @rhs.pos >= 0 && not (null (file @rhs.pos))++ -- This comment describes the Haskell rationale for lambdas+ -- we generate a simple pattern binding because of overloading-resolving during the type inference process.+ -- The types of the rules are not generalized (nor do we want that - rules are used in a single typing-context).+ -- If overloading is resolved separately, it may not be clear which dictionaries to use. For that all rules have+ -- to be considered together, which is done when we use simple pattern bindings with a lambda expression instead+ -- of a function definition.+ -- Note: we also ensure that all rules are lambda expressions, so that they are not made part of any closures+ -- but are lambda-lifted instead.+ -- loc.lambda = @name >#< "=" >#< "\\" >#< @loc.argPats >#< dummyPat @lhs.options (Map.null @rhs.attrs) >#< "->"+ + -- For Clean, we do not want to generate lambdas, but functions instead+ loc.lambda = @name >#< @loc.argPats >#< dummyPat @lhs.options (Map.null @rhs.attrs) >#< "="++ loc.argPats = ppSpaced [ let match | str `Set.member` @lhs.lazyIntras = pp str+ | otherwise = @loc.addbang1 (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs @lhs.options) ->+ case Map.lookup nm @lhs.localAttrTypes of+ Just tp -> pp_parens (pp_parens match) -- TODO Remove? >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerRuleTypeSigs @lhs.options) ->+ case lookupAttrType attr @lhs.allInhmap @lhs.allSynmap @lhs.childTypes of+ Just tpDoc -> pp_parens (pp_parens match) -- TODO Remove? >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs @rhs.attrs+ ]+ loc.argExprs = ppSpaced [ case mbAttr of+ Nothing -> "arg_" >|< str+ _ -> text str+ | (str,mbAttr) <- Map.assocs @rhs.attrs+ ]+ loc.stepcode = \kind fmtMode -> if kind `compatibleRule` @pure+ then Right $ let oper | @pure = "="+ | otherwise = "<-" -- TODO Desugar+ decl = @pattern.sem_lhs >#< oper >#< @name >#< @loc.argExprs >#< dummyArg @lhs.options (Map.null @rhs.attrs)+ tp = if @pure && not (noPerRuleTypeSigs @lhs.options)+ then @pattern.attrTypes+ else empty+ in fmtDecl @pure fmtMode (tp >-< decl)+ else Left $ IncompatibleRuleKind @name kind++ lhs.mrules = Map.singleton @name @loc.stepcode++ATTR Expression [ | | tks : {[HsToken]} ]+SEM Expression+ | Expression lhs.tks = @tks++{+dummyPat :: Options -> Bool -> PP_Doc+dummyPat opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = if strictDummyToken opts+ then text "Void"+ else text "(_)"+ | otherwise = let match | strictDummyToken opts = "!_"+ | otherwise = "_"+ in pp_parens (match >#< "::" >#< dummyType opts noArgs)+ where match | strictDummyToken opts = "(!_)"+ | otherwise = "_"++dummyArg :: Options -> Bool -> PP_Doc+dummyArg opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "Void"+ | otherwise = text "GHC.Prim.realWorld#"++dummyType :: Options -> Bool -> PP_Doc+dummyType opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "Void"+ | otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"+}++{+-- rules are "deinlined" to prevent needless code duplication.+-- if there is only a bit of duplication, we allow ghc to decide if it is worth it.+-- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.+ruleInlineThresholdSoft :: Int+ruleInlineThresholdSoft = 3++ruleInlineThresholdHard :: Int+ruleInlineThresholdHard = 5++reallyOftenUsedThreshold :: Int+reallyOftenUsedThreshold = 12+}++ATTR Expression [ | | pos : {Pos} ]+SEM Expression | Expression lhs.pos = @pos++-- pattern and expression semantics+ATTR Pattern [ | | sem_lhs : { PP_Doc } ]+ATTR Patterns [ | | sem_lhs USE {:} {[]} : {[PP_Doc]} ]+ATTR Pattern Patterns [ | | ]++SEM Pattern+ | Alias loc.varPat = text $ attrname @lhs.options False @field @attr+ loc.patExpr = if @pat.isUnderscore+ then @loc.varPat+ else @loc.varPat >|< "@" >|< @pat.sem_lhs+ lhs.sem_lhs = @loc.addbang1 @loc.patExpr+ | Product lhs.sem_lhs = @loc.addbang1 $ pp_block "(" ")" "," @pats.sem_lhs+ | Constr lhs.sem_lhs = @loc.addbang1 $ pp_parens $ @name >#< hv_sp @pats.sem_lhs+ | Underscore lhs.sem_lhs = text "_"+ | Irrefutable lhs.sem_lhs = text "~" >|< pp_parens @pat.sem_lhs++-- Check if a pattern is just an underscore+ATTR Pattern [ | | isUnderscore:{Bool}]+SEM Pattern+ | Constr lhs.isUnderscore = False+ | Product lhs.isUnderscore = False+ | Alias lhs.isUnderscore = False+ | Underscore lhs.isUnderscore = True++-- Collect the attributes defined by a pattern+ATTR Pattern Patterns [ | | attrs USE {`Set.union`} {Set.empty} : {Set String} ]+SEM Pattern | Alias+ lhs.attrs = Set.insert (attrname @lhs.options False @field @attr) @pat.attrs++-- All attribute types of this pattern+ATTR Pattern Patterns [ | | attrTypes USE {>-<} {empty} : {PP_Doc} ]+SEM Pattern | Alias+ loc.mbTp = if @field == _LHS+ then Map.lookup @attr @lhs.synmap+ else if @field == _LOC+ then Map.lookup @attr @lhs.localAttrTypes+ else Nothing+ lhs.attrTypes = empty -- Don't generate these type signatures; increases performance in Clean+ -- maybe empty (\tp -> (attrname @lhs.options False @field @attr) >#< "::" >#< ppTp tp) @loc.mbTp+ -- >-< @pat.attrTypes++-- Collect the attributes used by the right-hand side+ATTR HsToken Expression [ | | attrs USE {`Map.union`} {Map.empty} : {Map String (Maybe NonLocalAttr)} ]+SEM HsToken+ | AGLocal lhs.attrs = Map.singleton (fieldname @var) Nothing+ | AGField loc.mbAttr = if @field == _INST || @field == _FIELD || @field == _INST'+ then Nothing -- should not be used in the first place+ else Just $ mkNonLocalAttr (@field == _LHS) @field @attr+ lhs.attrs = Map.singleton (attrname @lhs.options True @field @attr) @loc.mbAttr++{+data NonLocalAttr+ = AttrInh Identifier Identifier+ | AttrSyn Identifier Identifier deriving Show++mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr+mkNonLocalAttr True = AttrInh -- True: inherited attr+mkNonLocalAttr False = AttrSyn++lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs+lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns++-- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that+-- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.+-- However, for now we simply decide to return Nothing in this case, which skips the type annotation.+lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupType child name attrMp childMp+ | noParameters childTp = Just ppDoc+ | otherwise = Nothing+ where+ attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs+ childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp+ nonterm = extractNonterminal childTp+ childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp+ ppDoc = ppTp attrTp++noParameters :: Type -> Bool+noParameters (Haskell _) = True+noParameters (NT _ args _) = null args+}++ATTR Expression [ | | semfunc : {PP_Doc} ]++SEM Expression+ | Expression lhs.attrs = Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) @loc.inhhstoken)) @tks+ lhs.semfunc = vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) @loc.inhhstoken)) @tks+ loc.inhhstoken = Inh_HsToken @lhs.options++-- child visit map+ATTR Visit+ Visits+ EProduction+ EProductions+ ENonterminal+ ENonterminals [ allchildvisit : {Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))}+ | | childvisit USE {`Map.union`} {Map.empty} : {Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))} ]++ATTR VisitSteps VisitStep [ allchildvisit : {Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))} | | ]++SEM ExecutionPlan+ | ExecutionPlan nonts.allchildvisit = @nonts.childvisit++SEM Visit+ | Visit+ loc.prevVisitInfo = Map.findWithDefault ManyVis @from @lhs.nextVisits+ lhs.childvisit = Map.singleton @ident @loc.invokecode+ loc.invokecode = \chn kind -> -- "chn" is the name of the child at the place of invocation, and "kind" the kind of the calling visit+ if kind `compatibleKind` @kind+ then Right $+ let pat | isLazyKind @kind = pat0+ | otherwise = @loc.addbang pat0+ pat0 = pp_parens pat1+ pat1 = @loc.nameTOut_visit >#< (ppSpaced $ map (attrname @lhs.options True chn) $ Set.toList @syn)+ >#< cont+ cont = case @loc.nextVisitInfo of+ NoneVis -> empty+ _ -> ch1+ ch0 = text $ stname chn @from+ ch1 = text $ stname chn @to+ expr = case (kind, @kind) of+ (VisitPure _, VisitPure _) -> expr0+ (VisitPure _, VisitMonadic) -> unMon @lhs.options >#< expr0+ (VisitMonadic, VisitPure _) -> "lift" >#< expr0+ (VisitMonadic, VisitMonadic) -> expr0+ expr0 = case @loc.prevVisitInfo of+ NoneVis -> error "error: invocation of a visit from a state that has no next visits"+ OneVis _ -> "inv_" >|< @lhs.nt >|< "_s" >|< @from >#< ch0 >#< args+ ManyVis -> "inv_" >|< @lhs.nt >|< "_s" >|< @from >#< ch0+ >#< "K_" >|< @lhs.nt >|< "_v" >|< @ident >#< args+ args = pp_parens args0 >#< args1+ args0 = @loc.nameTIn_visit >#< @loc.inhargs chn+ args1 | dummyTokenVisit @lhs.options = pp $ dummyArg @lhs.options True+ | otherwise = empty+ in (pat, expr) -- pretty print of the pattern and the expression part+ else Left $ IncompatibleVisitKind chn @ident kind @kind++{+-- a `compatibleKind` b means: can kind b be invoked from a+compatibleKind :: VisitKind -> VisitKind -> Bool+compatibleKind _ _ = True++compatibleRule :: VisitKind -> Bool -> Bool+compatibleRule (VisitPure _) False = False+compatibleRule _ _ = True+}++-------------------------------------------------------------------------------+-- Properties of rules+-------------------------------------------------------------------------------++-- Construct an environment that counts how often certain rules are used+ATTR Visits Visit VisitSteps VisitStep [ | | ruleUsage USE {`unionWithSum`} {Map.empty} : {Map Identifier Int} ]+ATTR ERules ERule [ usageInfo : {Map Identifier Int} | | ]++SEM EProduction | EProduction rules.usageInfo = @visits.ruleUsage+SEM VisitStep | Sem lhs.ruleUsage = Map.singleton @name 1+SEM ERule | ERule loc.used = Map.findWithDefault 0 @name @lhs.usageInfo++{+unionWithSum = Map.unionWith (+)+}++-- Collect in what visit-kinds a rule is used+ATTR Visits Visit VisitSteps VisitStep [ | | ruleKinds USE {`unionWithMappend`} {Map.empty} : {Map Identifier (Set VisitKind)} ]+SEM VisitStep | Sem+ lhs.ruleKinds = Map.singleton @name (Set.singleton @lhs.kind)++ATTR ERules ERule [ ruleKinds : {Map Identifier (Set VisitKind)} | | ]+SEM EProduction | EProduction+ rules.ruleKinds = @visits.ruleKinds++SEM ERule | ERule+ loc.kinds = Map.findWithDefault Set.empty @name @lhs.ruleKinds+ loc.anyLazyKind = Set.fold (\k r -> isLazyKind k || r) False @loc.kinds++ATTR Pattern Patterns [ anyLazyKind : Bool | | ]+++-------------------------------------------------------------------------------+-- Intra attributes+-------------------------------------------------------------------------------+{+uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)+uwSetUnion = Map.unionWith Set.union++uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)+uwMapUnion = Map.unionWith Map.union+}+ATTR Visit Visits [ allintramap : {Map StateIdentifier (Map String (Maybe NonLocalAttr))}+ | | intramap USE {`uwMapUnion`} {Map.empty} : {Map StateIdentifier (Map String (Maybe NonLocalAttr))} ]++ATTR Visit Visits [ terminaldefs : {Set String} | | ]+ATTR EChild EChildren [ | | terminaldefs USE {`Set.union`} {Set.empty} : {Set String} ]++SEM EChild | ETerm+ lhs.terminaldefs = Set.singleton $ fieldname @name++SEM EProduction | EProduction+ visits.allintramap = @visits.intramap+ visits.terminaldefs = @children.terminaldefs++SEM Visit+ | Visit loc.thisintra = (@loc.uses `Map.union` @loc.nextintra) `Map.difference` @loc.defsAsMap+ lhs.intramap = Map.singleton @from @loc.thisintra+ loc.nextintra = maybe Map.empty id $ Map.lookup @to @lhs.allintramap+ loc.uses = let mp1 = @steps.uses+ mp2 = Map.fromList [ (lhsname @lhs.options False i, Just (AttrSyn _LHS i)) | i <- Set.elems @syn ]+ in mp1 `Map.union` mp2+ loc.inhVarNms = Set.map (lhsname @lhs.options True) @inh+ loc.defs = @steps.defs `Set.union` @loc.inhVarNms `Set.union` @lhs.terminaldefs+ loc.defsAsMap = Map.fromList [ (a, Nothing) | a <- Set.elems @loc.defs ]++ATTR ERule ERules [ | | ruledefs USE {`uwSetUnion`} {Map.empty} : {Map Identifier (Set String)}+ ruleuses USE {`uwMapUnion`} {Map.empty} : {Map Identifier (Map String (Maybe NonLocalAttr))} ]+ATTR Visit Visits+ VisitSteps VisitStep [ ruledefs : {Map Identifier (Set String)}+ ruleuses : {Map Identifier (Map String (Maybe NonLocalAttr))} | | ]++SEM ERule+ | ERule lhs.ruledefs = Map.singleton @name @pattern.attrs+ lhs.ruleuses = Map.singleton @name @rhs.attrs++SEM EProduction+ | EProduction visits.ruledefs = @rules.ruledefs+ visits.ruleuses = @rules.ruleuses++ATTR Visit Visits+ EProduction+ EProductions+ ENonterminal+ ENonterminals [ | | visitdefs USE {`uwSetUnion`} {Map.empty} : {Map VisitIdentifier (Set Identifier)}+ visituses USE {`uwSetUnion`} {Map.empty} : {Map VisitIdentifier (Set Identifier)} ]++SEM Visit+ | Visit lhs.visitdefs = Map.singleton @ident @syn+ lhs.visituses = Map.singleton @ident @inh++ATTR Visit Visits+ VisitSteps VisitStep+ EProduction EProductions+ ENonterminal ENonterminals [ avisitdefs : {Map VisitIdentifier (Set Identifier)}+ avisituses : {Map VisitIdentifier (Set Identifier)} | | ]++SEM ExecutionPlan+ | ExecutionPlan nonts.avisitdefs = @nonts.visitdefs+ nonts.avisituses = @nonts.visituses++ATTR VisitSteps VisitStep [ | | defs USE {`Set.union`} {Set.empty} : {Set String}+ uses USE {`Map.union`} {Map.empty} : {Map String (Maybe NonLocalAttr)} ]+SEM VisitStep+ | Sem lhs.defs = maybe (error "Rule not found") id $ Map.lookup @name @lhs.ruledefs+ lhs.uses = maybe (error "Rule not found") id $ Map.lookup @name @lhs.ruleuses+ | ChildVisit lhs.defs = Set.insert (stname @child @to) $ maybe (error "Visit not found") (Set.map $ attrname @lhs.options True @child) $ Map.lookup @visit @lhs.avisitdefs+ lhs.uses = let convert attrs = Map.fromList [ (attrname @lhs.options False @child attr, Just $ mkNonLocalAttr True @child attr) | attr <- Set.elems attrs ]+ in Map.insert (stname @child @from) Nothing $ convert $+ maybe (error "Visit not found") id $ Map.lookup @visit @lhs.avisituses++-------------------------------------------------------------------------------+-- Identification of lazy intra defs within a production+--+-- These identifiers will not be marked as strict in rules and state closures+-------------------------------------------------------------------------------++ATTR Visits Visit VisitSteps VisitStep [ | | lazyIntras USE {`Set.union`} {Set.empty} : {Set String} ]+ATTR ERules ERule [ lazyIntras : {Set String} | | ]++SEM Visit | Visit+ loc.lazyIntrasInh = case @kind of+ VisitPure False -> @loc.inhVarNms `Set.union` @steps.defs+ _ -> Set.empty+ lhs.lazyIntras = @loc.lazyIntrasInh `Set.union` @steps.lazyIntras++SEM VisitStep | PureGroup+ lhs.lazyIntras = if @ordered+ then @steps.lazyIntras+ else @steps.defs++SEM EProduction | EProduction+ loc.lazyIntras = @visits.lazyIntras++-------------------------------------------------------------------------------+-- Pretty printing of haskell code+-------------------------------------------------------------------------------++SEM HsTokens [ || tks : {[(Pos,String)]} ]+ | Cons lhs.tks = @hd.tok : @tl.tks+ | Nil lhs.tks = []++SEM HsToken+ | AGLocal loc.tok = (@pos,fieldname @var)++SEM HsToken [ || tok:{(Pos,String)}]+ | AGField+ loc.addTrace = case @rdesc of+ Just d -> \x -> "(trace_n " ++ show (d ++ " -> " ++ show @field ++ "." ++ show @attr) ++ " (" ++ x ++ "))"+ Nothing -> id+ lhs.tok = (@pos, @loc.addTrace $ attrname @lhs.options True @field @attr)++ | HsToken lhs.tok = (@pos, @value)++ | CharToken lhs.tok = (@pos, if null @value+ then ""+ else showCharShort (head @value)+ )++ | StrToken lhs.tok = (@pos, showStrShort @value)+ | Err lhs.tok = (@pos, "")++-------------------------------------------------------------------------------+-- Alternative code generation (sepsemmods)+-------------------------------------------------------------------------------++ATTR ExecutionPlan [ mainBlocksDoc : PP_Doc textBlockMap : {Map BlockInfo PP_Doc}+ | | genIO : {IO ()} ]++SEM ExecutionPlan+ | ExecutionPlan lhs.genIO = do @loc.genMainModule+ @loc.genCommonModule+ @nonts.genProdIO+ loc.mainModuleFile = @lhs.mainFile+ loc.ppMonadImports = pp "import qualified Control.Monad.Identity"+ loc.genMainModule = writeModule @loc.mainModuleFile+ ( [ pp $ @lhs.iclModuleHeader @lhs.mainName "" "" False+ , @loc.ppMonadImports+ , pp $ "import " ++ @lhs.mainName ++ "_common"+ ]+ ++ @nonts.imports+ ++ [@lhs.mainBlocksDoc]+ ++ [@loc.wrappersExtra]+ ++ @nonts.appendMain+ )+ loc.commonFile = replaceBaseName @lhs.mainFile (takeBaseName @lhs.mainFile ++ "_common")+ loc.genCommonModule = writeModule @loc.commonFile+ ( [ pp $ @lhs.iclModuleHeader @lhs.mainName "_common" "" True+ , @loc.ppMonadImports+ , @lhs.importBlocks+ , @lhs.textBlocks+ , @loc.commonExtra+ ]+ ++ @nonts.appendCommon+ )++ATTR ENonterminal [ | | appendCommon, appendMain : { PP_Doc } ]+ATTR ENonterminals [ | | appendCommon, appendMain USE {:} {[]} : {[PP_Doc]} ]++SEM ENonterminal+ | ENonterminal lhs.appendMain = (if @nt `Set.member` @lhs.wrappers+ then @loc.wr_inh_icl+ >-< @loc.wr_syn_icl+ >-< @loc.wrapper_icl+ else empty)+ >-< @loc.sem_nt+ lhs.appendCommon = (if dataTypes @lhs.options then @loc.datatype else empty)+ >-< @loc.t_init_icl+ >-< @loc.t_states_icl+ >-< @loc.k_states+ >-< @prods.t_visits++ATTR EProduction EProductions+ ENonterminal ENonterminals [ | | imports USE {++} {[]} : {[PP_Doc]}+ genProdIO USE {>>} {return ()} : {IO ()} ]++SEM EProduction+ | EProduction lhs.imports = [pp $ "import " ++ @loc.moduleName]+ loc.moduleName = @lhs.mainName ++ @loc.suffix+ loc.suffix = '_' : show @lhs.nt ++ ('_' : show @con)+ loc.outputfile = replaceBaseName @lhs.mainFile (takeBaseName @lhs.mainFile ++ @loc.suffix)+ loc.ppMonadImports = pp "import qualified Control.Monad.Identity"+ lhs.genProdIO = writeModule @loc.outputfile+ [ pp $ @lhs.iclModuleHeader @lhs.mainName @loc.suffix @loc.semname True+ , @lhs.importBlocks+ , @loc.ppMonadImports+ , pp $ "import " ++ @lhs.mainName ++ "_common"+ , @loc.sem_prod+ ]++{+renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""++writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output++cleanIclModuleHeader :: Options -> String -> String+cleanIclModuleHeader flags input+ = case moduleName flags+ of Name nm -> genMod nm+ Default -> genMod (defaultModuleName input)+ NoName -> ""+ where genMod x = "implementation module " ++ x ++cleanDclModuleHeader :: Options -> String -> Maybe String -> String+cleanDclModuleHeader flags input export+ = case moduleName flags+ of Name nm -> genMod nm+ Default -> genMod (defaultModuleName input)+ NoName -> ""+ where genMod x = "definition module " ++ x ++ genExp export x+ genExp Nothing _ = ""+ genExp (Just e) x = "(module " ++ x ++ ", module " ++ e ++ ")"++defaultModuleName :: String -> String+defaultModuleName = dropExtension++mkIclModuleHeader :: Maybe (String,String,String) -> String -> String -> String -> Bool -> String+mkIclModuleHeader Nothing defaultName suffix _ _+ = "implementation module " ++ defaultName ++ suffix+mkIclModuleHeader (Just (name, exports, imports)) _ suffix addExports replaceExports+ = "implementation module " ++ name ++ suffix ++ "\n" ++ imports ++ "\n"++mkDclModuleHeader :: Maybe (String,String,String) -> String -> String -> String -> Bool -> String+mkDclModuleHeader Nothing defaultName suffix _ _+ = "definition module " ++ defaultName ++ suffix+mkDclModuleHeader (Just (name, exports, _)) _ suffix addExports replaceExports+ = "definition module " ++ name ++ suffix ++ ex ++ "\n"+ where+ ex = if null exports || (replaceExports && null addExports)+ then ""+ else if null addExports+ then exports+ else if replaceExports+ then addExports+ else exports ++ "," ++ addExports+}+++--+-- Bang pattern usage+--++SEM ERule | ERule loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM Visit | Visit loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM ENonterminal | ENonterminal loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM EProduction | EProduction loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM EChild | EChild loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM EChild | ETerm loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM VisitStep | ChildVisit loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x+SEM Pattern | Alias Constr Product loc.addbang = \x -> if bangpats @lhs.options then "!" >|< x else x++SEM Visit | Visit loc.addbang1 = if isLazyKind @kind then id else @loc.addbang+SEM ENonterminal | ENonterminal loc.addbangWrap = id --if strictWrap @lhs.options then @loc.addbang else id+SEM ERule | ERule loc.addbang1 = if @loc.anyLazyKind then id else @loc.addbang+SEM Pattern | Alias Constr Product loc.addbang1 = if @lhs.anyLazyKind then id else @loc.addbang++--+-- Distribute single-visit-next map downward+--++ATTR EProductions EProduction Visits Visit+ [ prevVisits, nextVisits : {Map StateIdentifier StateCtx} | | ]++SEM ENonterminal | ENonterminal+ prods.nextVisits = @nextVisits+ prods.prevVisits = @prevVisits++--+-- Collect and distribute the from/to states of a visit+--++ATTR ENonterminals ENonterminal EProductions EProduction Visits Visit+ [ | | fromToStates USE {`mappend`} {mempty} : {Map VisitIdentifier (Int,Int)} ]++ATTR ENonterminals ENonterminal EProductions EProduction Visits Visit VisitSteps VisitStep+ [ allFromToStates : {Map VisitIdentifier (Int,Int)} | | ]++SEM Visit | Visit+ lhs.fromToStates = Map.singleton @ident (@from, @to)++SEM ExecutionPlan | ExecutionPlan+ nonts.allFromToStates = @nonts.fromToStates++SEM VisitStep | ChildVisit+ (loc.from, loc.to) = Map.findWithDefault (error "visit not in allFromToStates") @visit @lhs.allFromToStates+++--+-- Collect and distribute the actual types of children of productions+--++ATTR EChildren EChild [ | | childTypes USE {`mappend`} {mempty} : {Map Identifier Type} ]+ATTR ERules ERule Visits Visit VisitSteps VisitStep [ childTypes : {Map Identifier Type} | | ]++SEM EProduction | EProduction+ loc.childTypes = Map.singleton _LHS @lhs.ntType `Map.union` @children.childTypes++SEM EChild | EChild ETerm+ lhs.childTypes = Map.singleton @name @tp++--+-- Distribute types of local attributes+--++ATTR ExecutionPlan ENonterminals ENonterminal [ localAttrTypes : {Map NontermIdent (Map ConstructorIdent (Map Identifier Type))} | | ]+ATTR EProductions EProduction [ localAttrTypes : {Map ConstructorIdent (Map Identifier Type)} | | ]+ATTR ERules ERule Pattern Patterns [ localAttrTypes : {Map Identifier Type} | | ]++SEM ENonterminal | ENonterminal+ prods.localAttrTypes = Map.findWithDefault Map.empty @nt @lhs.localAttrTypes++SEM EProduction | EProduction+ loc.localAttrTypes = Map.findWithDefault Map.empty @con @lhs.localAttrTypes++--+-- Collect and distribute visit kinds+--++ATTR ENonterminals ENonterminal EProductions EProduction Visits Visit VisitSteps VisitStep+ [ allVisitKinds : {Map VisitIdentifier VisitKind} | | visitKinds USE {`mappend`} {mempty} : {Map VisitIdentifier VisitKind} ]++SEM Visit | Visit+ lhs.visitKinds = Map.singleton @ident @kind++SEM ExecutionPlan | ExecutionPlan+ nonts.allVisitKinds = @nonts.visitKinds++--+-- Collect and distribute the initial state of nonterminals+--++ATTR ENonterminals ENonterminal [ | | initStates USE {`mappend`} {mempty} : {Map NontermIdent Int} ]+ATTR ENonterminals ENonterminal EProductions EProduction EChildren EChild Visits Visit VisitSteps VisitStep+ [ allInitStates : {Map NontermIdent Int} | | ]++SEM ENonterminal | ENonterminal+ lhs.initStates = Map.singleton @nt @initial++SEM ExecutionPlan | ExecutionPlan+ nonts.allInitStates = @nonts.initStates++SEM EChild | EChild+ loc.initSt = Map.findWithDefault (error "nonterminal not in allInitStates map") @loc.nt @lhs.allInitStates++--+-- Push the nonterminal type downward+--++ATTR EProductions EProduction [ ntType : Type | | ]+SEM ENonterminal | ENonterminal+ loc.ntType = NT @nt (map show @params) False++--+-- Collect errors contained in rules that should be yielded when the+-- rules are scheduled.+--++ATTR ExecutionPlan ENonterminals ENonterminal EProductions EProduction ERules ERule Visits Visit VisitSteps VisitStep [ | | errors USE {Seq.><} {Seq.empty} : {Seq Error} ]+SEM ERule | ERule+ lhs.errors = case @mbError of+ Just e | @loc.used > 0 -> Seq.singleton e+ _ -> Seq.empty+
src-ag/ExecutionPlan2Hs.ag view
@@ -45,8 +45,10 @@ ENonterminals ENonterminal EProductions EProduction ERules ERule- Pattern Patterns EChildren EChild+ Expression+ HsToken HsTokens HsTokensRoot+ Pattern Patterns Visits Visit VisitSteps VisitStep [ options : {Options} | | ] ATTR EProductions EProduction [ rename : {Bool} | | ]@@ -144,12 +146,12 @@ ) >-< indent 2 @loc.derivings Just (List t) -> @loc.aliasPre >#< "[" >#< show t >#< "]"- Just (Maybe t) -> @loc.aliasPre >#< "Maybe" >#< show t+ Just (Maybe t) -> @loc.aliasPre >#< "Maybe" >#< pp_parens (show t) Just (Tuple ts) -> @loc.aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)- Just (Either l r) -> @loc.aliasPre >#< "Either" >#< show l >#< show r- Just (Map k v) -> @loc.aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< show v- Just (IntMap t) -> @loc.aliasPre >#< "Data.IntMap.IntMap" >#< show t- Just (OrdSet t) -> @loc.aliasPre >#< "Data.Set.Set" >#< show t+ Just (Either l r) -> @loc.aliasPre >#< "Either" >#< pp_parens (show l) >#< pp_parens (show r)+ Just (Map k v) -> @loc.aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< pp_parens (show v)+ Just (IntMap t) -> @loc.aliasPre >#< "Data.IntMap.IntMap" >#< pp_parens (show t)+ Just (OrdSet t) -> @loc.aliasPre >#< "Data.Set.Set" >#< pp_parens (show t) Just IntSet -> @loc.aliasPre >#< "Data.IntSet.IntSet" -- Just x -> error $ "Type " ++ show x ++ " is not supported" loc.derivings = case Map.lookup @nt @lhs.derivings of@@ -190,7 +192,7 @@ { -- first parameter indicates: generate a record or not ppConFields :: Bool -> [PP_Doc] -> PP_Doc-ppConFields True flds = ppListSep "{" "}" ", " flds+ppConFields True flds = ppListSep "{" "}" ", " $ filter (not . isEmpty) flds ppConFields False flds = ppSpaced flds } @@ -451,9 +453,9 @@ then Map.delete idLateBindingAttr else id loc.wr_syns = Map.toList $ fromJust $ Map.lookup @nt @lhs.synmap- loc.inhlist = map (lhsname True . fst) @loc.wr_inhs- loc.inhlist1 = map (lhsname True . fst) @loc.wr_inhs1- loc.synlist = map (lhsname False . fst) @loc.wr_syns+ loc.inhlist = map (lhsname @lhs.options True . fst) @loc.wr_inhs+ loc.inhlist1 = map (lhsname @lhs.options True . fst) @loc.wr_inhs1+ loc.synlist = map (lhsname @lhs.options False . fst) @loc.wr_syns loc.wrapname = "wrap_" ++ show @nt loc.inhname = "Inh_" ++ show @nt loc.synname = "Syn_" ++ show @nt@@ -497,7 +499,7 @@ ) >-< ")" ) >-< if lateHigherOrderBinding @lhs.options- then indent 2 ("where" >#< lhsname True idLateBindingAttr >#< "=" >#< lateBindingFieldNm @lhs.mainName)+ then indent 2 ("where" >#< lhsname @lhs.options True idLateBindingAttr >#< "=" >#< lateBindingFieldNm @lhs.mainName) else empty loc.wrapPragma = if parallelInvoke @lhs.options && not (monadicWrappers @lhs.options) then ppNoInline @loc.wrapname -- required for the use of unsafePerformIO in case of the IO monad@@ -751,9 +753,9 @@ VisitMonadic -> "let" >#< decls >-< "return" >#< resultValName loc.vname = "v" >|< @ident- loc.inhpats = ppSpaced $ map (\arg -> {-@loc.addbang $-} pp $ attrname True _LHS arg) $ Set.toList @inh- loc.inhargs = \chn -> ppSpaced $ map (attrname False chn) $ Set.toList @inh- loc.synargs = ppSpaced $ map (\arg -> attrname False _LHS arg) $ Set.toList @syn+ loc.inhpats = ppSpaced $ map (\arg -> {-@loc.addbang $-} pp $ attrname @lhs.options True _LHS arg) $ Set.toList @inh+ loc.inhargs = \chn -> ppSpaced $ map (attrname @lhs.options False chn) $ Set.toList @inh+ loc.synargs = ppSpaced $ map (\arg -> attrname @lhs.options False _LHS arg) $ Set.toList @syn loc.nextargsMp = maybe Map.empty id $ Map.lookup @to @lhs.allintramap loc.nextargs = ppSpaced $ Map.keys $ @loc.nextargsMp loc.nextst = "st" >|< @to >#< @loc.nextargs >#< dummyArg @lhs.options (Map.null @loc.nextargsMp)@@ -922,7 +924,7 @@ ChildSyntax -> "arg_" >|< @name >|< "_" ChildAttr -> -- decide if we need to invoke the sem-function under the hood let prefix | not @loc.isDefor = if lateHigherOrderBinding @lhs.options -- && sepsemmods @lhs.options -- when sepsemmods is not enabled, the indirection can be optimized away- then lateSemNtLabel @loc.nt >#< lhsname True idLateBindingAttr+ then lateSemNtLabel @loc.nt >#< lhsname @lhs.options True idLateBindingAttr else "sem_" >|< @loc.nt | otherwise = empty -- no need to intro a terminal in pp_parens (prefix >#< instname @name)@@ -930,7 +932,7 @@ -- the semantics of the child (always deforested) pp_parens (instname @name >#< @name >|< "_") loc.aroundcode = if @hasAround- then locname @name >|< "_around"+ then locname @lhs.options @name >|< "_around" else empty loc.introcode = \kind fmtMode -> let pat = text $ stname @name @loc.initSt@@ -948,10 +950,10 @@ ChildAttr -> Map.insert (instname @name) Nothing $ -- the sem attr ( if @loc.isDefor || not (lateHigherOrderBinding @lhs.options) then id -- the sem dictionary attr is not used- else Map.insert (lhsname True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ else Map.insert (lhsname @lhs.options True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr) ) $ ( if @hasAround- then Map.insert (locname (@name) ++ "_around") Nothing+ then Map.insert (locname @lhs.options (@name) ++ "_around") Nothing else id ) $ Map.empty ChildReplace _ -> Map.singleton (instname @name) Nothing -- uses the transformation function@@ -1117,7 +1119,7 @@ ATTR Pattern Patterns [ | | ] SEM Pattern- | Alias loc.varPat = text $ attrname False @field @attr+ | Alias loc.varPat = text $ attrname @lhs.options False @field @attr loc.patExpr = if @pat.isUnderscore then @loc.varPat else @loc.varPat >|< "@" >|< @pat.sem_lhs@@ -1138,7 +1140,7 @@ -- Collect the attributes defined by a pattern ATTR Pattern Patterns [ | | attrs USE {`Set.union`} {Set.empty} : {Set String} ] SEM Pattern | Alias- lhs.attrs = Set.insert (attrname False @field @attr) @pat.attrs+ lhs.attrs = Set.insert (attrname @lhs.options False @field @attr) @pat.attrs -- All attribute types of this pattern ATTR Pattern Patterns [ | | attrTypes USE {>-<} {empty} : {PP_Doc} ]@@ -1148,7 +1150,7 @@ else if @field == _LOC then Map.lookup @attr @lhs.localAttrTypes else Nothing- lhs.attrTypes = maybe empty (\tp -> (attrname False @field @attr) >#< "::" >#< ppTp tp) @loc.mbTp+ lhs.attrTypes = maybe empty (\tp -> (attrname @lhs.options False @field @attr) >#< "::" >#< ppTp tp) @loc.mbTp >-< @pat.attrTypes -- Collect the attributes used by the right-hand side@@ -1158,7 +1160,7 @@ | AGField loc.mbAttr = if @field == _INST || @field == _FIELD || @field == _INST' then Nothing -- should not be used in the first place else Just $ mkNonLocalAttr (@field == _LHS) @field @attr- lhs.attrs = Map.singleton (attrname True @field @attr) @loc.mbAttr+ lhs.attrs = Map.singleton (attrname @lhs.options True @field @attr) @loc.mbAttr { data NonLocalAttr@@ -1195,8 +1197,9 @@ ATTR Expression [ | | semfunc : {PP_Doc} ] SEM Expression- | Expression lhs.attrs = Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) @tks- lhs.semfunc = vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) @tks+ | Expression lhs.attrs = Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) @loc.inhhstoken)) @tks+ lhs.semfunc = vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) @loc.inhhstoken)) @tks+ loc.inhhstoken = Inh_HsToken @lhs.options -- child visit map ATTR Visit@@ -1222,7 +1225,7 @@ let pat | isLazyKind @kind = pat0 | otherwise = @loc.addbang pat0 pat0 = pp_parens pat1- pat1 = @loc.nameTOut_visit >#< (ppSpaced $ map (attrname True chn) $ Set.toList @syn)+ pat1 = @loc.nameTOut_visit >#< (ppSpaced $ map (attrname @lhs.options True chn) $ Set.toList @syn) >#< cont cont = case @loc.nextVisitInfo of NoneVis -> empty@@ -1316,9 +1319,9 @@ lhs.intramap = Map.singleton @from @loc.thisintra loc.nextintra = maybe Map.empty id $ Map.lookup @to @lhs.allintramap loc.uses = let mp1 = @steps.uses- mp2 = Map.fromList [ (lhsname False i, Just (AttrSyn _LHS i)) | i <- Set.elems @syn ]+ mp2 = Map.fromList [ (lhsname @lhs.options False i, Just (AttrSyn _LHS i)) | i <- Set.elems @syn ] in mp1 `Map.union` mp2- loc.inhVarNms = Set.map (lhsname True) @inh+ loc.inhVarNms = Set.map (lhsname @lhs.options True) @inh loc.defs = @steps.defs `Set.union` @loc.inhVarNms `Set.union` @lhs.terminaldefs loc.defsAsMap = Map.fromList [ (a, Nothing) | a <- Set.elems @loc.defs ] @@ -1362,8 +1365,8 @@ SEM VisitStep | Sem lhs.defs = maybe (error "Rule not found") id $ Map.lookup @name @lhs.ruledefs lhs.uses = maybe (error "Rule not found") id $ Map.lookup @name @lhs.ruleuses- | ChildVisit lhs.defs = Set.insert (stname @child @to) $ maybe (error "Visit not found") (Set.map $ attrname True @child) $ Map.lookup @visit @lhs.avisitdefs- lhs.uses = let convert attrs = Map.fromList [ (attrname False @child attr, Just $ mkNonLocalAttr True @child attr) | attr <- Set.elems attrs ]+ | ChildVisit lhs.defs = Set.insert (stname @child @to) $ maybe (error "Visit not found") (Set.map $ attrname @lhs.options True @child) $ Map.lookup @visit @lhs.avisitdefs+ lhs.uses = let convert attrs = Map.fromList [ (attrname @lhs.options False @child attr, Just $ mkNonLocalAttr True @child attr) | attr <- Set.elems attrs ] in Map.insert (stname @child @from) Nothing $ convert $ maybe (error "Visit not found") id $ Map.lookup @visit @lhs.avisituses @@ -1406,7 +1409,7 @@ loc.addTrace = case @rdesc of Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show @field ++ "." ++ show @attr) ++ " (" ++ x ++ "))" Nothing -> id- lhs.tok = (@pos, @loc.addTrace $ attrname True @field @attr)+ lhs.tok = (@pos, @loc.addTrace $ attrname @lhs.options True @field @attr) | HsToken lhs.tok = (@pos, @value)
src-ag/GenerateCode.ag view
@@ -43,7 +43,7 @@ CVisits CVisit Sequence CRule CInterface CSegments CSegment- [ o_unbox,o_sig,o_sem,o_newtypes,o_case,o_pretty,o_rename,o_cata,o_strictwrap,o_splitsems,o_traces,o_costcentre,o_linePragmas,o_monadic : Bool+ [ o_unbox,o_sig,o_sem,o_newtypes,o_case,o_pretty,o_rename,o_cata,o_strictwrap,o_splitsems,o_traces,o_costcentre,o_linePragmas,o_monadic,o_clean : Bool o_data : {Maybe Bool} prefix : String options : Options@@ -65,6 +65,7 @@ .o_costcentre = genCostCentres @lhs.options .o_linePragmas = genLinePragmas @lhs.options .o_monadic = monadic @lhs.options+ .o_clean = clean @lhs.options SEM CGrammar | CGrammar loc.options = @lhs.options { breadthFirst = breadthFirst @lhs.options && visit @lhs.options && cases @lhs.options && @multivisit }@@ -101,13 +102,13 @@ SEM CProduction | CProduction- loc.paramInstMap = Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- @children, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]+ loc.paramInstMap = Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- @children, let tps = map (cleanupArg @lhs.options) $ nontermArgs tp, not (null tps) ] { -- remove possible @v references in the types of a data type.-cleanupArg :: String -> String-cleanupArg s- = case idEvalType (SimpleType s) of+cleanupArg :: Options -> String -> String+cleanupArg opts s+ = case idEvalType opts (SimpleType s) of SimpleType s' -> s' _ -> error "Only SimpleType supported" }@@ -172,8 +173,8 @@ (Set.singleton instSemFieldName) (Set.singleton instLocFieldName) | inst <- @loc.definedInsts- , let instLocFieldName = attrname True _INST inst- instSemFieldName = attrname False _INST' inst+ , let instLocFieldName = attrname @lhs.options True _INST inst+ instSemFieldName = attrname @lhs.options False _INST' inst ] loc.patDescr = if @isIn then "_"@@ -196,19 +197,19 @@ else v loc.decls = if @hasCode then @originComment ( mkDecl (@lhs.o_monadic && @explicit) (Pattern3 @pattern.copy) (@loc.addTrace $ @loc.addCostCentre $ @loc.addLinePragma $ (TextExpr @rhs))- (Set.fromList [attrname False fld nm | (fld,nm,_) <- Map.elems @defines])- (Set.fromList [attrname True fld nm | (fld,nm) <- Set.toList @uses])+ (Set.fromList [attrname @lhs.options False fld nm | (fld,nm,_) <- Map.elems @defines])+ (Set.fromList [attrname @lhs.options True fld nm | (fld,nm) <- Set.toList @uses]) : @loc.instDecls) else @loc.instDecls | CChildVisit loc.costCentreDescr = show @lhs.nt ++ ":" ++ show @lhs.con ++ ":" ++ show @name ++ ":" ++ show @nt ++ ":" ++ show @nr loc.addCostCentre = \v -> if @lhs.o_costcentre then PragmaExpr True False ("SCC \"" ++ @loc.costCentreDescr ++ "\"") v else v- loc.decls = let lhsVars = map (attrname True @name) (Map.keys @syn)+ loc.decls = let lhsVars = map (attrname @lhs.options True @name) (Map.keys @syn) ++ if @isLast then [] else [unwrap ++ funname @name (@nr+1)]- rhsVars = map (attrname False @name) (Map.keys @inh)+ rhsVars = map (attrname @lhs.options False @name) (Map.keys @inh) unwrap = if @lhs.o_newtypes then typeName @nt (@nr + 1) ++ " " else ""- tuple | isMerging = TupleLhs [locname @name ++ "_comp"]+ tuple | isMerging = TupleLhs [locname @lhs.options @name ++ "_comp"] | otherwise = mkTupleLhs @lhs.o_unbox (null $ Map.keys @inh) lhsVars rhs = @loc.addCostCentre $ Code.InvokeExpr (typeName @nt @nr) (SimpleExpr fun) (map SimpleExpr rhsVars) isVirtual _ [] = False@@ -225,7 +226,7 @@ then Ident (getName @name ++ "_inst") (getPos @name) else @name fun | @nr == 0 && Set.member @name @lhs.aroundMap- = locname @name ++ "_around " ++ funname baseNm 0+ = locname @lhs.options @name ++ "_around " ++ funname baseNm 0 | otherwise = funname baseNm @nr outDecls | isMerged = [] -- merged variant is only produced after the last visit of the merged children | otherwise = -- [mkDecl @lhs.o_monadic tuple rhs (Set.fromList lhsVars) (Set.fromList (funname baseNm @nr : rhsVars))]@@ -235,10 +236,10 @@ outMerged | null merges || @nr /= 0 = [] -- no merged child to produce | otherwise = let (c,cs) = head merges tuple' = mkTupleLhs @lhs.o_unbox (null $ Map.keys @inh) lhsVars'- lhsVars' = map (attrname True c) (Map.keys @syn)+ lhsVars' = map (attrname @lhs.options True c) (Map.keys @syn) ++ if @isLast then [] else [unwrap ++ funname c (@nr+1)]- rhsVars' = [ locname c' ++ "_comp" | c' <- cs ]- fun' = locname c ++ "_merge"+ rhsVars' = [ locname @lhs.options c' ++ "_comp" | c' <- cs ]+ fun' = locname @lhs.options c ++ "_merge" rhs' = App fun' (map SimpleExpr rhsVars') in [Resume @lhs.o_monadic (typeName @nt @nr) tuple' rhs'] in -- trace (show @name ++ " # " ++ show @loc.visitedSet ++ " # " ++ show (Map.assocs @lhs.mergeMap) ++ " # " ++ show merges ++ " # " ++ show @nr ++ " # " ++ show (length outMerged)) $@@ -336,7 +337,7 @@ SEM CRule | CRule loc.rulename = if @field == _LOC && @name `elem` @lhs.terminals then funname @name 0- else attrname @isIn @field @name+ else attrname @lhs.options @isIn @field @name lhs.exprs = [SimpleExpr @loc.rulename] | CChildVisit loc.names = -- do not pass inst-childs as parameter if they are not defined yet@@ -364,7 +365,7 @@ ATTR Sequence CRule [ | | tSigs USE {++} {[]} : {[Decl]} ] SEM CRule | CRule loc.mkTp = typeToCodeType (Just @lhs.nt) @loc.orgParams- lhs.tSigs = [ TSig (attrname False field attr) tp'+ lhs.tSigs = [ TSig (attrname @lhs.options False field attr) tp' | (field,attr,tp) <- Map.elems @defines, isJust tp , let tp1 = @loc.evalTp field $ @mkTp (fromJust tp) tp' = case findOrigType attr @lhs.children of@@ -388,11 +389,11 @@ in if null instParams then if null @orgParams then tp- else idEvalType tp- else evalType replace tp+ else idEvalType @lhs.options tp+ else evalType @lhs.options replace tp | CChildVisit loc.mkTp = @loc.evalTp . typeToCodeType (Just @nt) @loc.orgParams- loc.definedTps = [ TSig (attrname True @name a) (@mkTp tp) | (a,tp) <- Map.toList @syn ]+ loc.definedTps = [ TSig (attrname @lhs.options True @name a) (@mkTp tp) | (a,tp) <- Map.toList @syn ] loc.nextTp = typeName @nt (@nr+1) lhs.tSigs = (if @isLast then id else (TSig (funname @name (@nr+1)) (TypeApp (SimpleType @nextTp) (map SimpleType @loc.instParams)) :)) @definedTps @@ -400,7 +401,7 @@ loc.instParams = snd $ Map.findWithDefault (@nt,[]) @name @lhs.paramInstMap loc.replParamMap = Map.fromList (zip @loc.orgParams @loc.instParams) loc.replace = \k -> Map.findWithDefault k k @loc.replParamMap- loc.evalTp = if null @loc.orgParams then id else evalType @loc.replace+ loc.evalTp = if null @loc.orgParams then id else evalType @lhs.options @loc.replace -------------------------------------------------------------------------------@@ -455,15 +456,17 @@ loc.refDecls = if @loc.isOneVisit && @loc.hasWrappers && reference @lhs.options then let synAttrs = Map.toList @syn synNT = "Syn" ++ "_" ++ getName @lhs.nt- synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]+ synVars = [ SimpleExpr (attrname @lhs.options False _LHS a) | (a,_) <- synAttrs ] rhs = App synNT synVars lhs = Fun "___node" [] in [Decl lhs rhs Set.empty Set.empty] else []- loc.decls = @typeSigs ++ @vss.decls ++ @nextVisitDecl ++ @loc.refDecls- vss.lastExpr = mkTupleExpr @lhs.o_unbox (null $ Map.keys @inh) $ map (SimpleExpr . lhsname False) (Map.keys @syn) ++ map SimpleExpr @nextVisitName+ loc.decls = if @lhs.o_clean+ then @vss.decls ++ @nextVisitDecl ++ @loc.refDecls -- Don't generate type signatures for Clean, they will cause the compiler to generate functions, even for constants+ else @typeSigs ++ @vss.decls ++ @nextVisitDecl ++ @loc.refDecls+ vss.lastExpr = mkTupleExpr @lhs.o_unbox (null $ Map.keys @inh) $ map (SimpleExpr . lhsname @lhs.options False) (Map.keys @syn) ++ map SimpleExpr @nextVisitName intra.lastExpr = error "lastExpr: not used here"- loc.lastExprVars = map (lhsname False) (Map.keys @syn) ++ @loc.nextVisitName+ loc.lastExprVars = map (lhsname @lhs.options False) (Map.keys @syn) ++ @loc.nextVisitName (loc.blockFunDecls, loc.blockFirstFunCall) = mkPartitionedFunction @loc.funcname @loc.o_case @loc.nextVisitDecl @loc.lastExprVars @vss.blockDecls loc.costCentreDescr = "b" ++ ":" ++ show @lhs.nt ++ ":" ++ show @lhs.con ++ ":" ++ show @lhs.nr@@ -485,20 +488,20 @@ field (name,tp,_) = let expr = SimpleExpr (funname name 0) in if null @loc.params then expr- else TypedExpr expr (idEvalType $ typeToCodeType (Just @lhs.nt) @loc.params $ removeDeforested tp)+ else TypedExpr expr (idEvalType @lhs.options $ typeToCodeType (Just @lhs.nt) @loc.params $ removeDeforested tp) mbEvalTp | null @loc.params = const Nothing- | otherwise = Just . idEvalType+ | otherwise = Just . (idEvalType @lhs.options) rhs = wrap- . mkSemFun @lhs.nt @lhs.nr [mkLambdaArg (lhsname True nm) (mbEvalTp $ typeToCodeType (Just @lhs.nt) @loc.params $ removeDeforested tp) | (nm,tp) <- Map.assocs @inh]+ . mkSemFun @lhs.nt @lhs.nr [mkLambdaArg (lhsname @lhs.options True nm) (mbEvalTp $ typeToCodeType (Just @lhs.nt) @loc.params $ removeDeforested tp) | (nm,tp) <- Map.assocs @inh] $ @loc.addCostCentre $ if @ordered && @loc.o_splitsems then @loc.blockFirstFunCall else mkDecls @loc.declsType @decls . ResultExpr (typeName @lhs.nt @lhs.nr) . mkTupleExpr @lhs.o_unbox (null $ Map.keys @inh)- $ map (SimpleExpr . lhsname False) (Map.keys @syn) ++ map SimpleExpr @nextVisitName+ $ map (SimpleExpr . lhsname @lhs.options False) (Map.keys @syn) ++ map SimpleExpr @nextVisitName wrap = if @lhs.o_newtypes then \x -> App (typeName @lhs.nt @lhs.nr) [x] else id@@ -509,7 +512,7 @@ argType (Haskell tp) r = SimpleType tp `Arr` r argType _ _ = error "Self type not allowed here" evalTp | null @loc.params = id- | otherwise = idEvalType+ | otherwise = idEvalType @lhs.options in appQuant @lhs.quantMap @lhs.nt $ appContext @lhs.contextMap @lhs.nt $ evalTp $ if @lhs.nr == 0@@ -735,7 +738,7 @@ loc.params = map getName $ Map.findWithDefault [] @lhs.nt @lhs.paramMap lhs.semDom = let name = typeName @lhs.nt @lhs.nr evalTp | null @loc.params = id- | otherwise = idEvalType+ | otherwise = idEvalType @lhs.options in ( if @lhs.o_newtypes then [ Code.NewType name @loc.params name (evalTp @loc.tp) ] else [ Code.Type name @loc.params (evalTp @loc.tp) ] )@@ -758,7 +761,7 @@ let (params, tp) = Map.findWithDefault (error ("No such semantic domain: " ++ show nt)) (nt, nr) @nonts.semDomUnfoldGath replMap = Map.fromList (zip params repl) replace k = Map.findWithDefault ('@':k) k replMap- in evalType replace tp+ in evalType @lhs.options replace tp { typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type@@ -768,8 +771,8 @@ Haskell t -> SimpleType t Self -> error "Self type not allowed here." -evalType :: (String -> String) -> Code.Type -> Code.Type-evalType replf t'+evalType :: Options -> (String -> String) -> Code.Type -> Code.Type+evalType opts replf t' = chase t' where chase t@@ -779,7 +782,7 @@ TupleType tps -> TupleType (map chase tps) UnboxedTupleType tps -> UnboxedTupleType (map chase tps) Code.List tp -> Code.List (chase tp)- SimpleType txt -> let tks = lexTokens (initPos txt) txt+ SimpleType txt -> let tks = lexTokens opts (initPos txt) txt tks' = map replaceTok tks txt' = unlines . showTokens . tokensToStrings $ tks' in SimpleType txt'@@ -794,8 +797,8 @@ AGLocal v p _ -> HsToken (replf $ getName v) p _ -> t -idEvalType :: Code.Type -> Code.Type-idEvalType = evalType id+idEvalType :: Options -> Code.Type -> Code.Type+idEvalType options = evalType options id } -------------------------------------------------------------------------------@@ -806,8 +809,8 @@ | CNonterminal loc.semWrapper = let params' = map getName @params inhAttrs = Map.toList @inh synAttrs = Map.toList @syn- inhVars = [ SimpleExpr (attrname True _LHS a) | (a,_) <- inhAttrs ]- synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]+ inhVars = [ SimpleExpr (attrname @lhs.options True _LHS a) | (a,_) <- inhAttrs ]+ synVars = [ SimpleExpr (attrname @lhs.options False _LHS a) | (a,_) <- synAttrs ] var = "sem" wrapNT = "wrap" ++ "_" ++ getName @nt inhNT = "Inh" ++ "_" ++ getName @nt@@ -817,7 +820,7 @@ else SimpleExpr var evalTp | null params' = id- | otherwise = idEvalType+ | otherwise = idEvalType @lhs.options appParams nm = TypeApp (SimpleType nm) (map SimpleType params') typeSig = TSig wrapNT (evalTp $ appParams (sdtype @nt) `Arr` (appParams inhNT `Arr` appParams synNT)) mkstrict = Named @lhs.o_strictwrap@@ -831,9 +834,9 @@ ATTR CInterface CSegments CSegment [ | | wrapDecls USE {++} {[]}: {Decls} ] SEM CSegment- | CSegment lhs.wrapDecls = let lhsVars = map (lhsname False) (Map.keys @syn)+ | CSegment lhs.wrapDecls = let lhsVars = map (lhsname @lhs.options False) (Map.keys @syn) ++ if @lhs.isLast then [] else [unwrap ++ sem (@lhs.nr+1)]- rhsVars = map (lhsname True) (Map.keys @inh)+ rhsVars = map (lhsname @lhs.options True) (Map.keys @inh) rhs = map SimpleExpr rhsVars unwrap = if @lhs.o_newtypes then typeName @lhs.nt (@lhs.nr + 1) ++ " " else "" var = "sem"@@ -1009,7 +1012,7 @@ CommonTypes.List t -> Code.List $ typeToCodeType (Just @nt) params' t CommonTypes.Tuple ts -> Code.TupleType [typeToCodeType (Just @nt) params' t | (_,t) <- ts ] tp' -> error $ show tp' ++ " not supported"- in Code.Type (getName @nt) params' (idEvalType theType)+ in Code.Type (getName @nt) params' (idEvalType @lhs.options theType) derivings = maybe [] (map getName . Set.toList) (Map.lookup @nt @lhs.derivings) dataDef = Data (getName @nt) (map getName @params) @prods.dataAlts (maybe False id @lhs.o_data) derivings in maybe dataDef typeSyn $ lookup @nt @lhs.typeSyns@@ -1045,7 +1048,7 @@ | CNonterminal loc.genCata = not (@nt `Set.member` nocatas @lhs.options) loc.cataFun = let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName @params)) evalTp | null @params = id- | otherwise = idEvalType+ | otherwise = idEvalType @lhs.options tSig = TSig (cataname @lhs.prefix @nt) (appQuant @lhs.quantMap @nt $ appContext @lhs.contextMap @nt $ evalTp $ appParams (getName @nt) `Arr` appParams (sdtype @nt)) special typ = case typ of@@ -1138,12 +1141,12 @@ SEM CProduction | CProduction lhs.cataAlt = let lhs = Fun (cataname @lhs.prefix @lhs.nt) [lhs_pat] lhs_pat = App (conname @lhs.o_rename @lhs.nt @con)- (map (\(n,_,_) -> SimpleExpr $ locname $ n) @loc.firstOrderChildren)+ (map (\(n,_,_) -> SimpleExpr $ locname @lhs.options $ n) @loc.firstOrderChildren) rhs = App (semname @lhs.prefix @lhs.nt @con) (map argument @loc.firstOrderChildren) argument (nm,NT tp _ _,_) = App (cataname @lhs.prefix tp)- [SimpleExpr (locname nm)]- argument (nm, _,_) = SimpleExpr (locname nm)+ [SimpleExpr (locname @lhs.options nm)]+ argument (nm, _,_) = SimpleExpr (locname @lhs.options nm) in Decl lhs rhs Set.empty Set.empty
src-ag/Order.ag view
@@ -22,7 +22,6 @@ import CodeSyntax import GrammarInfo import HsToken(HsTokensRoot(HsTokensRoot))-import HsTokenScanner(lexTokens) import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..)) -- From uulib import qualified Data.Map as Map@@ -168,6 +167,9 @@ data AltAttr = AltAttr Identifier Identifier Bool deriving (Eq, Ord, Show) }+ATTR Rules Rule Production Productions Nonterminal Nonterminals+ [ options : {Options} | | ]+ ATTR Children Child Rules Rule Patterns Pattern [ | | gathAltAttrs USE {++} {[]} : {[AltAttr]} ] SEM Production | Production loc.gathAltAttrs = [ AltAttr _LHS inh True | inh <- Map.keys @lhs.inh ] -- sublist 1@@ -447,6 +449,7 @@ allfields:{[(Identifier,Type,ChildKind)]} allnts :{[Identifier]} attrs :{[(Identifier,Identifier)]}+ options :{Options} || errors :{Seq Error} usedLocals:{[Identifier]}@@ -471,6 +474,7 @@ , allfields_Inh_HsTokensRoot = @lhs.allfields , allnts_Inh_HsTokensRoot = @lhs.allnts , nt_Inh_HsTokensRoot = @lhs.nt+ , options_Inh_HsTokensRoot = @lhs.options } synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot @tks)) inherited in case synthesized of
+ src-ag/PrintCleanCode.ag view
@@ -0,0 +1,559 @@+PRAGMA strictdata+PRAGMA optimize+PRAGMA bangpats+PRAGMA strictwrap++INCLUDE "Code.ag"+INCLUDE "Patterns.ag"++imports+{+import Data.Char (isAlphaNum)+import Pretty+import Code+import Options+import CommonTypes (attrname, _LOC, nullIdent)+import Data.List(intersperse)+import System.IO+import System.Directory+import System.FilePath+import CommonTypes(BlockInfo, BlockKind(..))+}++{+type PP_Docs = [PP_Doc]+}++{+ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqH = ppMultiSeq' (>#<)++ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqV = ppMultiSeq' (>-<)++ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeq' next strictArgs expr+ = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs+}++ATTR Expr Exprs Decl Decls CaseAlt CaseAlts Lhs [ outputfile : {String} | | ]++SEM Chunk+ | Chunk+ loc.outputfile = if sepSemMods @lhs.options+ then replaceBaseName @lhs.mainFile (takeBaseName @lhs.mainFile ++ "_" ++ @name)+ else @lhs.mainFile++ATTR Program [ options:{Options} | | output:{PP_Docs} ]++ATTR Expr Exprs Decl Decls Chunk Chunks CaseAlts CaseAlt Lhs Pattern Patterns [ options:{Options} | | ]++ATTR Expr Decl DataAlt Type NamedType Lhs [ nested:{Bool} | | pp:{PP_Doc} ]+ATTR Decl DataAlt NamedType [ | | ppa USE {>-<} {empty} : {PP_Doc}]++ATTR Exprs DataAlts Types NamedTypes Decls Chunk Chunks [ nested:{Bool} | | pps : {PP_Docs} ]+ATTR DataAlts NamedTypes [ | | ppas : {PP_Docs} ]++ATTR CaseAlt CaseAlts [ nested:{Bool} | | pps: {PP_Docs} ]++ATTR Type Types [ | | copy : SELF]++SEM Program | Program+ loc.options = @lhs.options { breadthFirst = breadthFirst @lhs.options && visit @lhs.options && cases @lhs.options && @ordered }++SEM Program+ | Program chunks.nested = nest @lhs.options++SEM Exprs+ | Cons lhs.pps = @hd.pp : @tl.pps+ | Nil lhs.pps = []++SEM CaseAlts+ | Cons lhs.pps = @hd.pps ++ @tl.pps+ | Nil lhs.pps = []++SEM DataAlts+ | Cons lhs.pps = @hd.pp : @tl.pps+ lhs.ppas = @hd.ppa : @tl.ppas+ | Nil lhs.pps = []+ lhs.ppas = []++SEM Types+ | Cons lhs.pps = @hd.pp : @tl.pps+ | Nil lhs.pps = []++SEM NamedTypes+ | Cons lhs.pps = @hd.pp : @tl.pps+ lhs.ppas = @hd.ppa : @tl.ppas+ | Nil lhs.pps = []+ lhs.ppas = []++SEM Decls+ | Cons lhs.pps = @hd.pp : @tl.pps+ | Nil lhs.pps = []++SEM Chunks+ | Cons lhs.pps = @hd.pps ++ @tl.pps+ | Nil lhs.pps = []+++SEM Program+ | Program lhs.output = @chunks.pps++SEM Chunk+ | Chunk lhs.pps = @comment.pp+ : @info.pps+ ++ @dataDef.pps+ ++ @cataFun.pps+ ++ @semDom.pps+ ++ @semWrapper.pps+ ++ @semFunctions.pps+ ++ [Map.findWithDefault empty (BlockOther, Just $ identifier @name) @lhs.textBlockMap]++SEM Decl+ | Decl lhs.pp = @left.pp >#< "="+ >-< indent 4 @rhs.pp+ | Bind lhs.pp = @left.pp >#< "<-" >#< @rhs.pp+ | BindLet lhs.pp = "let" >#< @left.pp >#< "=" >#< @rhs.pp+ | Data lhs.pp = "::" >#< hv_sp (@name : @params)+ >#< ( case @alts.pps of+ [] -> empty+ (x:xs) -> "=" >#< x+ >-< vlist (map ("|" >#<) xs)+ >-< if null @derivings+ then empty+ else "deriving" >#< ppTuple False (map text @derivings)+ )+ >-< foldr (>-<) empty @alts.ppas++ | NewType lhs.pp = "::" >#< hv_sp (@name : @params) >#< "=" >#< @con >#< pp_parens @tp.pp+ | Type lhs.pp = "::" >#< hv_sp (@name : @params) >#< ":==" >#< @tp.pp+ | TSig lhs.pp = @name >#< "::" >#< @tp.pp+ | Comment lhs.pp = if '\n' `elem` @txt+ then "/*" >-< vlist (lines @txt) >-< "*/"+ else "//" >#< @txt+ | PragmaDecl lhs.pp = "/*#" >#< text @txt >#< "#*/" -- Not used in Clean+ | Resume lhs.pp = if @monadic+ then @left.pp >#< "<-" >#< @rhs.pp+ else @left.pp >#< "=" >-< indent 4 @rhs.pp+ | EvalDecl loc.strat = if breadthFirstStrict @lhs.options+ then "stepwiseEval"+ else "lazyEval"+ lhs.pp = if breadthFirst @lhs.options+ then @left.pp >#< "=" >#< "case" >#< @loc.strat >#< pp_parens @rhs.pp >#< "of"+ >-< indent 4 (+ pp_parens (@nt >|< "_Syn" >#< "_val") >#< "-> _val"+ )+ else @left.pp >#< "=" >#< @rhs.pp++SEM Expr+ | Let lhs.pp = pp_parens ( "let" >#< (vlist @decls.pps)+ >-< "in " >#< @body.pp+ )+ | Case lhs.pp = pp_parens ( "case" >#< pp_parens @expr.pp >#< "of"+ >-< (vlist @alts.pps)+ )+ | Do lhs.pp = pp_parens ( "do" >#< ( vlist @stmts.pps+ >-< ("return" >#< @body.pp))+ )+ | Lambda loc.strictParams = if strictSems @lhs.options+ then @args.pps+ else []+ loc.addBang = if bangpats @lhs.options+ then \p -> pp_parens ("!" >|< p)+ else id+ lhs.pp = pp_parens ( "\\" >#< (vlist (map @loc.addBang @args.pps)) >#< "->"+ >-< indent 4 (@loc.strictParams `ppMultiSeqV` @body.pp)+ )+ | TupleExpr lhs.pp = ppTuple @lhs.nested @exprs.pps+ | UnboxedTupleExpr lhs.pp = ppUnboxedTuple @lhs.nested @exprs.pps+ | App lhs.pp = pp_parens $ @name >#< hv_sp @args.pps+ | SimpleExpr lhs.pp = text @txt+ | TextExpr lhs.pp = vlist (map text @lns)+ | Trace lhs.pp = "trace" >#< ( pp_parens ("\"" >|< text @txt >|< "\"")+ >-< pp_parens @expr.pp+ )+ | PragmaExpr lhs.pp = let pragmaDoc = "/*#" >#< @txt >#< "#*/" -- Not used in Clean+ op = if @onNewLine+ then (>-<)+ else (>#<)+ leftOp x y = if @onLeftSide+ then x `op` y+ else y+ rightOp x y = if @onLeftSide+ then x+ else x `op` y+ in pp_parens (pragmaDoc `leftOp` @expr.pp `rightOp` pragmaDoc)+ | LineExpr lhs.pp = @expr.pp >-< "/*# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show @lhs.outputfile >#< "#*/"+ >-< ""+ | TypedExpr lhs.pp = pp_parens (@expr.pp >#< "::" >#< @tp.pp)+ | ResultExpr lhs.pp = if breadthFirst @lhs.options+ then "final" >#<+ pp_parens (@nt >|< "_Syn" >#< pp_parens @expr.pp)+ else @expr.pp+ | InvokeExpr lhs.pp = if breadthFirst @lhs.options+ then "invoke" >#< pp_parens @expr.pp >#< pp_parens (+ @nt >|< "_Inh" >#< pp_parens (ppTuple False @args.pps))+ else @expr.pp >#< hv_sp @args.pps+ | ResumeExpr lhs.pp = if breadthFirst @lhs.options+ then pp_parens ("resume" >#< pp_parens @expr.pp+ >-< indent 2 (pp_parens ( "\\" >|<+ pp_parens ("~" >|< pp_parens (@nt >|< "_Syn" >#< "_inh_arg"))+ >#< "->"+ >-< indent 2 ( "let" >#< @left.pp >#< "= _inh_arg"+ >-< indent 2 ("in" >#< @rhs.pp)+ ))))+ else pp_parens ( "case" >#< pp_parens @expr.pp >#< "of"+ >-< ("{" >#< @left.pp >#< "->")+ >-< indent 4 (@rhs.pp >#< "}")+ )+ | SemFun loc.strictParams = if strictSems @lhs.options+ then @args.pps+ else []+ loc.addBang = if bangpats @lhs.options+ then \p -> pp_parens ("!" >|< p)+ else id+ lhs.pp = if breadthFirst @lhs.options+ then "Child" >#< pp_parens ( "\\" >|<+ pp_parens (@nt >|< "_Inh" >#<+ ppTuple False (map @loc.addBang @args.pps)) >#< "->"+ >-< indent 2 (@loc.strictParams `ppMultiSeqV` @body.pp))+ else if null @args.pps+ then @body.pp+ else pp_parens ( "\\" >#< (vlist (map @loc.addBang @args.pps)) >#< "->"+ >-< indent 4 (@loc.strictParams `ppMultiSeqV` @body.pp)+ )++SEM CaseAlt+ | CaseAlt lhs.pps = ["{" >#< @left.pp >#< "->", @expr.pp >#< "}"]++SEM DataAlt+ | DataAlt lhs.pp = @name >#< hv_sp (map ((@lhs.strictPre >|<) . pp_parens) @args.pps)+ lhs.ppa = empty+ | Record lhs.pp = @name >#< hv_sp (map ((@lhs.strictPre >|<) . pp_parens) @args.pps) -- @name >#< pp_block "{" "}" "," @args.pps+ lhs.ppa = let f n d = d >#< (pp_block ("(" ++ @name) ")" "" $ map pp (ppat n))+ >#< pp "=" >#< pp "x"+ ppat n = replicate (length @args.ppas - n - 1) (pp " _") ++ [pp " x"] ++ replicate n (pp " _")+ in snd $ foldr (\x (n, xs) -> (n + 1, f n x >-< xs)) (0, empty) @args.ppas++SEM NamedType+ | Named lhs.pp = -- @name >#< "::" >#< + if @strict+ then "!" >|< pp_parens @tp.pp+ else @tp.pp+ lhs.ppa = pp @name++SEM Lhs+ | Pattern3 TupleLhs UnboxedTupleLhs+ loc.addStrictGuard = if strictCases @lhs.options && @loc.hasStrictVars then \v -> v >#< "|" >#< @loc.strictGuard else id+ | Pattern3+ loc.strictGuard = @pat3.strictVars `ppMultiSeqH` (pp "True")+ loc.hasStrictVars = not (null @pat3.strictVars)+ | TupleLhs UnboxedTupleLhs+ loc.strictGuard = if stricterCases @lhs.options && not @lhs.isDeclOfLet+ then map text @comps `ppMultiSeqH` (pp "True")+ else pp "True"+ loc.hasStrictVars = not (null @comps)++ | Fun+ loc.addStrictGuard = if strictSems @lhs.options && @loc.hasStrictVars then \v -> v >#< "|" >#< @loc.strictGuard else id+ loc.hasStrictVars = not (null @args.pps)+ loc.strictGuard = @args.pps `ppMultiSeqH` (pp "True")++ | TupleLhs UnboxedTupleLhs Fun+ loc.addBang = if bangpats @lhs.options+ then \p -> "!" >|< p+ else id++ | Pattern3 lhs.pp = @loc.addStrictGuard @pat3.pp+ | Pattern3SM lhs.pp = @pat3.pp'+ | TupleLhs lhs.pp = @loc.addStrictGuard $ ppTuple @lhs.nested (map (@loc.addBang . text) @comps)+ | UnboxedTupleLhs lhs.pp = @loc.addStrictGuard $ ppUnboxedTuple @lhs.nested (map (@loc.addBang . text) @comps)+ | Fun lhs.pp = @loc.addStrictGuard (@name >#< hv_sp (map @loc.addBang @args.pps))+ | Unwrap lhs.pp = pp_parens (@name >#< @sub.pp)++SEM Type [ | | prec:Int ]+ | Arr lhs.prec = 2+ .pp = case @right.copy of+ Arr{} -> @loc.l >-< @loc.r+ _ -> @loc.l >#< "->" >-< @loc.r+ loc.l = if @left.prec <= 2 then pp_parens @left.pp else @left.pp+ .r = if @right.prec < 2 then pp_parens @right.pp else @right.pp++ | TypeApp+ lhs.pp = pp "(" >#< hv_sp (@func.pp : @args.pps) >#< pp ")"-- TODO: Check++ | CtxApp+ lhs.pp = @right.pp >#< " | " >#< (pp_block "" "" "&" $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) @left)+ | QuantApp+ lhs.pp = @left >#< @right.pp++ | TupleType lhs.prec = 5+ .pp = ppTuple @lhs.nested @tps.pps++ | UnboxedTupleType lhs.prec = 5+ .pp = ppUnboxedTuple @lhs.nested @tps.pps++ | List lhs.prec = 5+ .pp = "[" >|< @tp.pp >|< "]"++ | SimpleType lhs.prec = 5+ .pp = if reallySimple @txt then text @txt else pp_parens (text @txt)++ | NontermType lhs.prec = 5+ lhs.pp = @loc.prefix >|< text @name >#< hv_sp @params+ loc.prefix = if @deforested+ then text "T_"+ else empty+ | TMaybe lhs.prec = 5+ lhs.pp = text "Maybe" >#< pp_parens @tp.pp+ | TEither lhs.prec = 5+ lhs.pp = text "Either" >#< pp_parens @left.pp >#< pp_parens @right.pp+ | TMap lhs.prec = 5+ lhs.pp = text "'Data.Map'.Map" >#< pp_parens @key.pp >#< pp_parens @value.pp+ | TIntMap lhs.prec = 5+ lhs.pp = text "'Data.IntMap'.IntMap" >#< pp_parens @value.pp+++{++reallySimple :: String -> Bool+reallySimple = and . map (\x -> isAlphaNum x || x=='_')++ppTuple :: Bool -> [PP_Doc] -> PP_Doc+ppTuple _ [x] = pp x+ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps+ppTuple False pps = "(" >|< pp_block " " ")" "," pps+ppUnboxedTuple :: Bool -> [PP_Doc] -> PP_Doc+ppUnboxedTuple = ppTuple+--ppUnboxedTuple True pps = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps+--ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps++}+++-------------------------------------------------------------------------------+-- Strict data fields+-------------------------------------------------------------------------------++ATTR DataAlt DataAlts [ strictPre: PP_Doc | | ]++SEM Decl+ | Data alts.strictPre = if @strict then pp "!" else empty++-------------------------------------------------------------------------------+-- Strict variables+-------------------------------------------------------------------------------++ATTR Pattern Patterns [ | | strictVars USE {++} {[]} : {[PP_Doc]} ]+SEM Pattern+ | Alias+ loc.strictVar+ = if strictCases @lhs.options && not @lhs.isDeclOfLet+ then [@loc.ppVar]+ else []+ loc.strictPatVars+ = if stricterCases @lhs.options && not @lhs.isDeclOfLet+ then @pat.strictVars+ else []+ lhs.strictVars+ = @loc.strictVar ++ @loc.strictPatVars+ | Irrefutable+ lhs.strictVars = []++-------------------------------------------------------------------------------+-- Pretty printing patterns+-------------------------------------------------------------------------------++SEM Patterns [ | | pps : {[PP_Doc]} ]+ | Cons lhs.pps = @hd.pp : @tl.pps+ | Nil lhs.pps = []++SEM Pattern+ | Constr Product Alias+ loc.addBang = if bangpats @lhs.options && not @lhs.isDeclOfLet && not @lhs.belowIrrefutable+ then \p -> "!" >|< p+ else id++SEM Pattern [ | | pp:PP_Doc ]+ | Constr lhs.pp = @loc.addBang $ pp_parens $ @name >#< hv_sp @pats.pps+ | Product lhs.pp = @loc.addBang $ pp_block "(" ")" "," @pats.pps+ | Alias loc.ppVar = pp (attrname @lhs.options False @field @attr)+ loc.ppVarBang = @loc.addBang $ @loc.ppVar+ lhs.pp = if @pat.isUnderscore+ then @loc.ppVarBang+ else @loc.ppVarBang >|< "@" >|< @pat.pp+ | Irrefutable lhs.pp = text "~" >|< pp_parens @pat.pp+ | Underscore lhs.pp = text "_"++SEM Pattern [ | | isUnderscore:{Bool}]+ | Constr lhs.isUnderscore = False+ | Product lhs.isUnderscore = False+ | Alias lhs.isUnderscore = False+ | Underscore lhs.isUnderscore = True++ATTR Pattern Patterns [ belowIrrefutable : Bool | | ]+SEM Pattern+ | Irrefutable+ pat.belowIrrefutable = True++SEM Lhs+ | Pattern3 Pattern3SM+ pat3.belowIrrefutable = False++-------------------------------------------------------------------------------+-- Pretty printing patterns for SM+-------------------------------------------------------------------------------++SEM Patterns [ | | pps' : {[PP_Doc]} ]+ | Cons lhs.pps' = @hd.pp' : @tl.pps'+ | Nil lhs.pps' = []++SEM Pattern [ | | pp':PP_Doc ]+ | Constr lhs.pp' = pp_parens $ @name >#< hv_sp (map pp_parens @pats.pps')+ | Product lhs.pp' = pp_block "(" ")" "," @pats.pps'+ | Alias lhs.pp' = let attribute | @field == _LOC || @field == nullIdent = locname' @attr+ | otherwise = attrname @lhs.options False @field @attr+ in attribute >|< "@" >|< @pat.pp'+ | Irrefutable lhs.pp' = text "~" >|< pp_parens @pat.pp+ | Underscore lhs.pp' = text "_"++{+locname' :: Identifier -> [Char]+locname' n = "_loc_" ++ getName n+}++-------------------------------------------------------------------------------+-- Determine if inside a Let+-------------------------------------------------------------------------------++ATTR Chunks Chunk Decls Decl Lhs Pattern Patterns [ isDeclOfLet : Bool | | ]+SEM Program+ | Program+ chunks.isDeclOfLet = False++SEM Expr+ | Let+ decls.isDeclOfLet = True+ | Do+ stmts.isDeclOfLet = False+ | ResumeExpr+ left.isDeclOfLet = False++SEM CaseAlt+ | CaseAlt+ left.isDeclOfLet = False++++-------------------------------------------------------------------------------+-- Alternative code printing to separate modules+-------------------------------------------------------------------------------++ATTR Program [ mainBlocksDoc : PP_Doc | | genIO : {IO ()} ]+ATTR Program Chunks Chunk+ [ importBlocks : PP_Doc+ pragmaBlocks : String+ textBlocks : PP_Doc+ textBlockMap : {Map BlockInfo PP_Doc}+ optionsLine : String+ mainFile : String+ mainName : String+ moduleHeader : {String -> String -> String -> Bool -> String}+ | | ]++SEM Program+ | Program+ loc.mainModuleFile = @lhs.mainFile+ loc.genMainModule+ = writeModule @loc.mainModuleFile+ ( [ pp $ @lhs.pragmaBlocks+ , pp $ @lhs.optionsLine+ , pp $ @lhs.moduleHeader @lhs.mainName "" "" False+ , pp $ ("import " ++ @lhs.mainName ++ "_common\n")+ ]+ ++ map pp @chunks.imports+ ++ map vlist @chunks.appendMain+ ++ [@lhs.mainBlocksDoc]+ )++ loc.commonFile = replaceBaseName @lhs.mainFile (takeBaseName @lhs.mainFile ++ "_common")+ loc.genCommonModule+ = writeModule @loc.commonFile+ ( [ pp $ @lhs.pragmaBlocks+ , pp $ @lhs.optionsLine+ , pp $ @lhs.moduleHeader @lhs.mainName "_common" "" True+ , @lhs.importBlocks+ , @lhs.textBlocks+ ]+ ++ map vlist @chunks.appendCommon+ )++ lhs.genIO = do @loc.genMainModule+ @loc.genCommonModule+ @chunks.genSems++{+renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""+}++ATTR Chunk Chunks [ | | imports USE {++} {[]} : {[String]} ]+SEM Chunk+ | Chunk+ lhs.imports = ["import " ++ @lhs.mainName ++ "_" ++ @name ++ "\n"]++ATTR Chunk Chunks [ | | appendCommon, appendMain USE {++} {[]} : {[[PP_Doc]]} ]++SEM Chunk+ | Chunk+ lhs.appendCommon+ = [ [@comment.pp]+ , @dataDef.pps+ , @semDom.pps+ , if reference @lhs.options then @semWrapper.pps else []+ ]+ lhs.appendMain+ = [ [@comment.pp]+ , @cataFun.pps+ , if reference @lhs.options then [] else @semWrapper.pps+ ]++ATTR Chunk Chunks [ | | genSems USE {>>} {return ()} : {IO ()} ]++SEM Chunk+ | Chunk+ lhs.genSems+ = writeModule @loc.outputfile+ [ pp $ @lhs.pragmaBlocks+ , pp $ Map.findWithDefault empty (BlockPragma, Just $ identifier @name) @lhs.textBlockMap+ , pp $ @lhs.optionsLine+ , pp $ @lhs.moduleHeader @lhs.mainName ("_" ++ @name) @loc.exports True+ , pp $ ("import " ++ @lhs.mainName ++ "_common\n")+ , pp $ Map.findWithDefault empty (BlockImport, Just $ identifier @name) @lhs.textBlockMap+ , @comment.pp+ , vlist_sep "" @info.pps+ , vlist_sep "" @semFunctions.pps+ , Map.findWithDefault empty (BlockOther, Just $ identifier @name) @lhs.textBlockMap+ ]++SEM Chunk+ | Chunk+ loc.exports = concat $ intersperse "," @semNames++{+writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output+}+
src-ag/PrintCode.ag view
@@ -287,7 +287,7 @@ then text "T_" else empty | TMaybe lhs.prec = 5- lhs.pp = text "Maybe" >#< @tp.pp+ lhs.pp = text "Maybe" >#< pp_parens @tp.pp | TEither lhs.prec = 5 lhs.pp = text "Either" >#< pp_parens @left.pp >#< pp_parens @right.pp | TMap lhs.prec = 5@@ -357,7 +357,7 @@ SEM Pattern [ | | pp:PP_Doc ] | Constr lhs.pp = @loc.addBang $ pp_parens $ @name >#< hv_sp @pats.pps | Product lhs.pp = @loc.addBang $ pp_block "(" ")" "," @pats.pps- | Alias loc.ppVar = pp (attrname False @field @attr)+ | Alias loc.ppVar = pp (attrname @lhs.options False @field @attr) loc.ppVarBang = @loc.addBang $ @loc.ppVar lhs.pp = if @pat.isUnderscore then @loc.ppVarBang@@ -392,7 +392,7 @@ | Constr lhs.pp' = pp_parens $ @name >#< hv_sp (map pp_parens @pats.pps') | Product lhs.pp' = pp_block "(" ")" "," @pats.pps' | Alias lhs.pp' = let attribute | @field == _LOC || @field == nullIdent = locname' @attr- | otherwise = attrname False @field @attr+ | otherwise = attrname @lhs.options False @field @attr in attribute >|< "@" >|< @pat.pp' | Irrefutable lhs.pp' = text "~" >|< pp_parens @pat.pp | Underscore lhs.pp' = text "_"
src-ag/PrintOcamlCode.ag view
@@ -193,7 +193,7 @@ | Product lhs.pp = pp_block "(" ")" "," @pats.pps | Alias -- assuming here that there is only an underscore under an alias lhs.pp = if @pat.isUnderscore- then pp (attrname False @field @attr)+ then pp (attrname @lhs.options False @field @attr) else error "pp of Pattern.Alias is only supported in the form (x@_)" | Irrefutable lhs.pp = error "pp of Pattern.Irrefutable not supported" | Underscore lhs.pp = text "_"
src-ag/ResolveLocals.ag view
@@ -25,7 +25,6 @@ import Expression import Options import HsToken(HsTokensRoot(HsTokensRoot))-import HsTokenScanner(lexTokens) import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..)) import Data.Maybe }@@ -151,6 +150,7 @@ , allfields_Inh_HsTokensRoot = @lhs.allfields , allnts_Inh_HsTokensRoot = @lhs.allnts , nt_Inh_HsTokensRoot = @lhs.nt+ , options_Inh_HsTokensRoot = @lhs.options } synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot @tks)) inherited in (errors_Syn_HsTokensRoot synthesized, output_Syn_HsTokensRoot synthesized)
src-ag/SemHsTokens.ag view
@@ -30,6 +30,7 @@ allfields : {[(Identifier,Type,ChildKind)]} allnts : {[Identifier]} attrs : {[(Identifier,Identifier)]}+ options : {Options} || ] @@ -70,8 +71,8 @@ then (Seq.singleton(ChildAsLocal @lhs.nt @lhs.con @var), @loc.tkAsLocal,(@pos,fieldname @var), [] ) else (Seq.empty, @loc.tkAsLocal, (@pos,fieldname @var), [] ) else if (_LOC,@var) `elem` @lhs.attrs- then (Seq.empty , @loc.tkAsField, (@pos,locname @var), [@var])- else (Seq.singleton(UndefLocal @lhs.nt @lhs.con @var), @loc.tkAsField, (@pos,locname @var), [] )+ then (Seq.empty , @loc.tkAsField, (@pos,locname @lhs.options @var), [@var])+ else (Seq.singleton(UndefLocal @lhs.nt @lhs.con @var), @loc.tkAsField, (@pos,locname @lhs.options @var), [] ) SEM HsToken | AGField lhs.errors = if (@field,@attr) `elem` @lhs.attrs@@ -122,7 +123,7 @@ loc.addTrace = case @rdesc of Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show @field ++ "." ++ show @attr) ++ " (" ++ x ++ "))" Nothing -> id- lhs.tok = (@pos, @loc.addTrace $ attrname True @field @attr)+ lhs.tok = (@pos, @loc.addTrace $ attrname @lhs.options True @field @attr) | HsToken lhs.tok = (@pos, @value)
src-ag/Transform.ag view
@@ -51,7 +51,7 @@ @elems.paramsCollect @loc.allConParams @loc.allFields- @loc.prodOrder+ @loc.prodOrder @loc.allConstraints @loc.allAttrDecls @elems.useMap@@ -255,11 +255,11 @@ SEM AG | AG- loc.prodOrder = let f (nt,con,_) = Map.insertWith g nt [con]- g [con] lst | con `elem` lst = lst- | otherwise = con : lst- g _ _ = error "This is not possible"- in foldr f Map.empty @elems.collectedFields+ loc.prodOrder = let f (nt,con,_) = Map.insertWith g nt [con]+ g [con] lst | con `elem` lst = lst+ | otherwise = con : lst+ g _ _ = error "This is not possible"+ in foldr f Map.empty @elems.collectedFields loc.allFields = let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm) in foldr f (Map.empty) @elems.collectedFields @@ -536,7 +536,7 @@ rul = Rule Nothing pat rhs False "-- generated by the unique rule mechanism." False True False Nothing False hasOut = exists outAttr exists (Alias fld a _) = (fld,a) `elem` attrDefs- exists _ = False+ exists _ = False existsLoc nm = exists (attr _LOC nm) in rul attr fld a = Alias fld a (Underscore noPos)@@ -866,6 +866,7 @@ "aggressiveinlinepragmas" -> o { aggressiveInlinePragmas = True } "latehigherorderbindings" -> o { lateHigherOrderBinding = True } "ocaml" -> ocamlOpt o+ "cleanlang" -> cleanOpt o s -> trace ("uuagc: ignoring unknown pragma: " ++ s) o in \o -> foldr mk o @names@@ -1231,7 +1232,7 @@ -> ParamMap -> Map NontermIdent (Map ConstructorIdent (Set Identifier)) -> DataTypes- -> Map NontermIdent [ConstructorIdent]+ -> Map NontermIdent [ConstructorIdent] -> Map NontermIdent (Map ConstructorIdent [Type]) -> Map NontermIdent (Attributes, Attributes) -> Map NontermIdent (Map Identifier (String, String, String))@@ -1264,7 +1265,7 @@ macromap = Map.findWithDefault Map.empty nt macros csmap = Map.findWithDefault Map.empty nt constraints psmap = Map.findWithDefault Map.empty nt prodParams- prs = Map.findWithDefault [] nt prodOrder+ prs = Map.findWithDefault [] nt prodOrder alt con = let flds = Map.findWithDefault [] con alts rules = Map.findWithDefault [] con rmap@@ -1359,3 +1360,12 @@ in foldl ins @lhs.attrs (Set.toList @lhs.nts) +-------------------------------------------------------------------------------+-- Collecting the data type information+-------------------------------------------------------------------------------++ATTR AG Elems Elem+ [ | | constructorTypeMap USE {`Map.union`} {Map.empty} : {Map NontermIdent ConstructorType} ]+ +SEM Elem+ | Data lhs.constructorTypeMap = Set.fold (\nm mp -> Map.insert nm @contype mp) Map.empty @names.collectedNames
src-generated/AG2AspectAG.hs view
@@ -2,16 +2,16 @@ {-# LANGUAGE ScopedTypeVariables #-} module AG2AspectAG where-{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}+{-# LINE 2 "./src-ag/HsToken.ag" #-} --- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos import CommonTypes-import ErrorMessages+import UU.Scanner.Position(Pos)+{-# LINE 10 "dist/build/AG2AspectAG.hs" #-}++{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken {-# LINE 16 "dist/build/AG2AspectAG.hs" #-} {-# LINE 2 "./src-ag/Patterns.ag" #-}@@ -21,16 +21,16 @@ import CommonTypes (ConstructorIdent,Identifier) {-# LINE 23 "dist/build/AG2AspectAG.hs" #-} -{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 29 "dist/build/AG2AspectAG.hs" #-}--{-# LINE 2 "./src-ag/HsToken.ag" #-}+{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-} +-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos import CommonTypes-import UU.Scanner.Position(Pos)+import ErrorMessages {-# LINE 35 "dist/build/AG2AspectAG.hs" #-} {-# LINE 8 "./src-ag/AG2AspectAG.ag" #-}
src-generated/AbstractSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/AbstractSyntax.ag)+-- UUAGC 0.9.50 (src-ag/AbstractSyntax.ag) module AbstractSyntax where {-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}
src-generated/AbstractSyntaxDump.hs view
@@ -2,6 +2,19 @@ {-# LANGUAGE ScopedTypeVariables #-} module AbstractSyntaxDump where+{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 10 "dist/build/AbstractSyntaxDump.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 17 "dist/build/AbstractSyntaxDump.hs" #-}+ {-# LINE 2 "./src-ag/AbstractSyntax.ag" #-} -- AbstractSyntax.ag imports@@ -12,19 +25,6 @@ import Macro --marcos import CommonTypes import ErrorMessages-{-# LINE 16 "dist/build/AbstractSyntaxDump.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 23 "dist/build/AbstractSyntaxDump.hs" #-}--{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken {-# LINE 29 "dist/build/AbstractSyntaxDump.hs" #-} {-# LINE 6 "./src-ag/AbstractSyntaxDump.ag" #-}
src-generated/Code.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/Code.ag)+-- UUAGC 0.9.50 (src-ag/Code.ag) module Code where {-# LINE 2 "./src-ag/Code.ag" #-}
src-generated/CodeSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/CodeSyntax.ag)+-- UUAGC 0.9.50 (src-ag/CodeSyntax.ag) module CodeSyntax where {-# LINE 2 "./src-ag/CodeSyntax.ag" #-}
src-generated/CodeSyntaxDump.hs view
@@ -2,19 +2,19 @@ {-# LANGUAGE ScopedTypeVariables #-} module CodeSyntaxDump where+{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 11 "dist/build/CodeSyntaxDump.hs" #-}+ {-# LINE 2 "./src-ag/CodeSyntax.ag" #-} import Patterns import CommonTypes import Data.Map(Map) import Data.Set(Set)-{-# LINE 12 "dist/build/CodeSyntaxDump.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier) {-# LINE 19 "dist/build/CodeSyntaxDump.hs" #-} {-# LINE 5 "./src-ag/CodeSyntaxDump.ag" #-}
src-generated/ConcreteSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/ConcreteSyntax.ag)+-- UUAGC 0.9.50 (src-ag/ConcreteSyntax.ag) module ConcreteSyntax where {-# LINE 2 "./src-ag/ConcreteSyntax.ag" #-} @@ -69,6 +69,7 @@ alternatives: alternative Data: child pos : {Pos}+ child contype : {ConstructorType} child ctx : {ClassContext} child names : NontSet child params : {[Identifier]}@@ -123,7 +124,7 @@ child exports : {String} child imports : {String} -}-data Elem = Data (Pos) (ClassContext) (NontSet) (([Identifier])) (Attrs) (Alts) (Bool)+data Elem = Data (Pos) (ConstructorType) (ClassContext) (NontSet) (([Identifier])) (Attrs) (Alts) (Bool) | Type (Pos) (ClassContext) (NontermIdent) (([Identifier])) (ComplexType) | Attr (Pos) (ClassContext) (NontSet) (([String])) (Attrs) | Sem (Pos) (ClassContext) (NontSet) (Attrs) (([String])) (SemAlts)
src-generated/DeclBlocks.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/DeclBlocks.ag)+-- UUAGC 0.9.50 (src-ag/DeclBlocks.ag) module DeclBlocks where {-# LINE 2 "./src-ag/DeclBlocks.ag" #-}
src-generated/DefaultRules.hs view
@@ -3,4660 +3,4724 @@ {-# LANGUAGE ScopedTypeVariables #-} module DefaultRules where-{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 17 "dist/build/DefaultRules.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 24 "dist/build/DefaultRules.hs" #-}--{-# LINE 15 "./src-ag/DefaultRules.ag" #-}--import qualified Data.List-import qualified Data.Set as Set-import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq,(><))-import UU.Scanner.Position(noPos)-import Pretty-import Data.Maybe-import HsToken-import HsTokenScanner-import Data.List(intersperse)-import Data.Char--import AbstractSyntax-import ErrorMessages--import Options-{-# LINE 46 "dist/build/DefaultRules.hs" #-}-import Control.Monad.Identity (Identity)-import qualified Control.Monad.Identity-{-# LINE 78 "./src-ag/DefaultRules.ag" #-}--fieldName n = '@' : getName n--locName n = "@loc." ++ getName n--attrName fld attr- | fld == _LOC = locName attr- | fld == _FIELD = fieldName attr- | otherwise = '@' : getName fld ++ "." ++ getName attr--_ACHILD = Ident "(" noPos -- hack--mkLocVar = AGField _LOC---buildConExpr ocaml typeSyns rename nt con1 fs- | nt `elem` map fst typeSyns = if ocaml then synonymMl else synonymHs- | otherwise = normalExpr- where con = getName con1- tup = " " ++ buildTuple fs- args = " " ++ unwords fs- normalExpr = conname' ++ args-- conname' | rename = getName nt ++ "_" ++ getName con1- | otherwise = getName con1-- synonymHs | con == "Tuple" = buildTuple fs- | con == "Cons" = "(:)" ++ args- | con == "Nil" = case lookup nt typeSyns of- Just (Map _ _) -> "Data.Map.empty"- Just (IntMap _) -> "Data.IntMap.empty"- Just (OrdSet _) -> "Data.Set.empty"- Just IntSet -> "Data.IntSet.empty"- _ -> "[]"- | con == "Just" = "Just" ++ args- | con == "Nothing" = "Nothing"- | con == "Entry" = ( case lookup nt typeSyns of- Just (Map _ _) -> "Data.Map.insert"- Just (IntMap _) -> "Data.IntMap.insert"- Just (OrdSet _) -> "Data.Set.insert"- Just IntSet -> "Data.IntSet.insert" ) ++ args- | otherwise = normalExpr-- synonymMl | con == "Tuple" = buildTuple fs- | con == "Cons" = "(::)" ++ tup- | con == "Nil" = case lookup nt typeSyns of- Just (Map _ _) -> prefixMod nt "empty"- Just (IntMap _) -> prefixMod nt "empty"- Just (OrdSet _) -> prefixMod nt "empty"- Just IntSet -> prefixMod nt "empty"- _ -> "[]"- | con == "Just" = "Some" ++ tup- | con == "Nothing" = "None"- | con == "Entry" = ( case lookup nt typeSyns of- Just (Map _ _) -> prefixMod nt "add"- Just (IntMap _) -> prefixMod nt "add"- Just (OrdSet _) -> prefixMod nt "add"- Just IntSet -> prefixMod nt "add" ) ++ args- | otherwise = normalExpr-- prefixMod nt nm = "M_" ++ getName nt ++ "." ++ nm--concatSeq = foldr (Seq.><) Seq.empty--splitAttrs :: Map Identifier a -> [Identifier] -> ([(Identifier,a)],[Identifier]) -- a used as (String,String)-splitAttrs _ []- = ([],[])-splitAttrs useMap (n:rest)- = let (uses,normals) = splitAttrs useMap rest- in case Map.lookup n useMap of- Just x -> ((n,x):uses , normals )- Nothing -> ( uses , n:normals )--removeDefined :: Set (Identifier,Identifier) -> (Identifier,Attributes) -> (Identifier,[Identifier])-removeDefined defined (fld,as)- = ( fld- , [ a- | a <- Map.keys as- , not (Set.member (fld,a) defined)- ]- )--{-# LINE 132 "dist/build/DefaultRules.hs" #-}--{-# LINE 226 "./src-ag/DefaultRules.ag" #-}-----deprecatedCopyRuleError nt con fld a- = let mesg =- "In the definitions for alternative"- >#< getName con- >#< "of nonterminal"- >#< getName nt- >|< ","- >-< "the value of field"- >#< getName a- >#< "is copied by a copy-rule."- >-< "Copying the value of a field using a copy-rule is deprecated"- >-< "Please add the following lines to your code:"- >-< ( "SEM"- >#< getName nt- >-< indent 2 ( "|"- >#< getName con- >#< getName fld- >#< "."- >#< a- >#< "="- >#< "@"- >|< a- )- )- in CustomError True (getPos a) mesg---missingRuleErrorExpr nt con fld a- = "error \"missing rule: "- ++ show nt ++ "." ++ show con ++ "."- ++ show fld ++ "." ++ show a ++ "\""----makeRule :: (Identifier,Identifier) -> Expression -> String -> Bool -> Maybe Error -> Rule-makeRule (f1,a1) expr origin identity mbDelayedError- = Rule Nothing- (Alias f1 a1 (Underscore noPos))- expr- False- origin- False- True- identity- mbDelayedError- False---useRule :: Set Identifier -> [(Identifier,Attributes)] -> (Identifier,(String,String,String)) -> Rule-useRule locals ch_outs (n,(op,e,pos))- = let elems = [ fld- | (fld,as) <- ch_outs- , Map.member n as- ]-- isOp [] = False- isOp (c:cs)- | isSpace c = isOp cs- | isAlpha c = case dropWhile isAlpha cs of- ('.':cs2) -> isOp cs2 -- fully qualified name, drop prefix- _ -> False- | c == '(' = False- | otherwise = True-- tks | Set.member n locals = [mkLocVar n noPos Nothing]- | null elems = lexTokens noPos e- | otherwise = lexTokens noPos str- where- opExpr l r- | isOp op = l ++ " " ++ op ++ " " ++ r -- takes the associativity of the operator- | otherwise = "(" ++ op ++ " " ++ l ++ " " ++ r ++ ")" -- associates to the right- str = foldr1 opExpr (map (flip attrName n) elems)-- in makeRule (_LHS,n)- (Expression noPos tks)- ("use rule " ++ pos)- False- Nothing---selfRule :: Bool -> Identifier -> [HsToken] -> Rule-selfRule lhsNecLoc attr tks- = makeRule (if lhsNecLoc then _LHS else _LOC,attr)- (Expression noPos tks)- "self rule"- False- Nothing-----concatRE rsess = let (rss,ess) = unzip rsess- in (concat rss, concatSeq ess)---copyRule :: Options -> Set NontermIdent -> Identifier -> Identifier -> Bool -> Set Identifier -> (Map Identifier Identifier, (Identifier,[Identifier])) -> ([Rule], Seq Error)-copyRule options wrappers nt con modcopy locals (env,(fld,as))- = concatRE (map copyRu as)-- where- copyRu a- = ( [ makeRule (fld,a)- (Expression noPos tks)- (cruletxt sel)- True- mbDelayedErr- ]- , err- )-- where- sel- | not modcopy- && Set.member a locals = Just _LOC- | otherwise = Map.lookup a env-- (tks,err,mbDelayedErr)- = case sel of- Nothing -> let tks = [HsToken (missingRuleErrorExpr nt con fld a) noPos]- err = MissingRule nt con fld a- in if nt `Set.member` wrappers && kennedyWarren options- then (tks, Seq.empty, Just err) -- yield error only if the rule is actually scheduled; for kennedyWarren code gen only- else (tks, Seq.singleton err, Nothing)- Just f- | f == _ACHILD -> ( [AGLocal a noPos Nothing]- , Seq.singleton (deprecatedCopyRuleError nt con fld a)- , Nothing- )- | otherwise -> ( [AGField f a noPos Nothing]- , Seq.empty- , Nothing- )-- cruletxt sel- | local = "copy rule (from local)"- | deprChild = "deprecated child copy"- | Set.member a locals && nonlocal = "modified copy rule"- | incoming && outgoing = "copy rule (chain)"- | incoming = "copy rule (down)"- | outgoing = "copy rule (up)"- | otherwise = "copy rule (chain)"- where outgoing = fld == _LHS- incoming = maybe False (== _LHS) sel- nonlocal = maybe False (/= _LOC) sel- local = maybe False (== _LOC) sel- deprChild = maybe False (== _ACHILD) sel-{-# LINE 285 "dist/build/DefaultRules.hs" #-}--{-# LINE 460 "./src-ag/DefaultRules.ag" #-}--buildTuple fs = "(" ++ concat (intersperse "," fs) ++ ")"--addAugments :: (Identifier, [Expression]) -> [Rule] -> [Rule]-addAugments (_, exprs) rules- | null exprs = rules-addAugments (syn, exprs) rules- = [rule] ++ funRules ++ map modify rules- where- rule = Rule Nothing (Alias _LHS syn (Underscore noPos)) rhs False "augmented rule" False True False Nothing False- rhs = Expression noPos tks- tks = [ HsToken "foldr ($) " noPos, mkLocVar substSyn noPos Nothing, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]- funs = intersperse (HsToken ", " noPos) (map (\n -> mkLocVar n noPos Nothing) funNames)-- substSyn = Ident (show syn ++ "_augmented_syn") (getPos syn)- funNames = zipWith (\i _ -> Ident (show syn ++ "_augmented_f" ++ show i) (getPos syn)) [1..] exprs- funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "augment function" False True False Nothing False) funNames exprs-- modify (Rule mbNm pat rhs owrt origin expl pure identity mbErr eager)- | containsSyn pat = Rule mbNm (modifyPat pat) rhs owrt origin expl pure identity mbErr eager- modify r = r-- containsSyn (Constr _ pats) = any containsSyn pats- containsSyn (Product _ pats) = any containsSyn pats- containsSyn (Irrefutable pat) = containsSyn pat- containsSyn (Alias field attr pat) = (field == _LHS && attr == syn) || containsSyn pat- containsSyn _ = False-- modifyPat (Constr name pats) = Constr name (map modifyPat pats)- modifyPat (Product pos pats) = Product pos (map modifyPat pats)- modifyPat (Irrefutable pat) = Irrefutable (modifyPat pat)- modifyPat (Alias field attr pat)- | field == _LHS && attr == syn = Alias _LOC substSyn (modifyPat pat)- | otherwise = Alias field attr (modifyPat pat)- modifyPat p = p---- adds the additional rules needed for around, which creates a sequence of--- rules that form a function that each transforms the semantics of a child--- before attaching the child.--- The rule defines a local attribute "<child>_around" and <child> is dependent--- on this attribute.-addArounds :: (Identifier, [Expression]) -> [Rule] -> [Rule]-addArounds (_, exprs) rules | null exprs = rules-addArounds (child, exprs) rules- = [rule] ++ funRules ++ rules- where- rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) rhs False "around rule" False True False Nothing False- rhs = Expression noPos tks- tks = [ HsToken "\\s -> foldr ($) s " noPos, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]- funs = intersperse (HsToken ", " noPos) (map (\n -> mkLocVar n noPos Nothing) funNames)-- childLoc = Ident (show child ++ "_around") (getPos child)- funNames = zipWith (\i _ -> Ident (show child ++ "_around_f" ++ show i) (getPos child)) [1..] exprs- funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "around function" False True False Nothing False) funNames exprs---- adds the additional rules needed for merging.--- It produces for each merging child a rule with local attribute: "<child>_merged".--- this rules takes the semantics of the first children and feeds it to the function--- represented by this attribute. This attribute then defines the semantics for--- the merging child.-addMerges :: (Identifier, (Identifier,[Identifier],Expression)) -> [Rule] -> [Rule]-addMerges (target,(_,_,expr)) rules- = rule : rules- where- rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) expr False "merge rule" False True False Nothing False- childLoc = Ident (show target ++ "_merge") (getPos target)-{-# LINE 354 "dist/build/DefaultRules.hs" #-}--{-# LINE 578 "./src-ag/DefaultRules.ag" #-}--elimSelfId :: NontermIdent -> [Identifier] -> Type -> Type-elimSelfId nt args Self = NT nt (map getName args) False-elimSelfId _ _ tp = tp--elimSelfStr :: NontermIdent -> [String] -> Type -> Type-elimSelfStr nt args Self = NT nt args False-elimSelfStr _ _ tp = tp-{-# LINE 365 "dist/build/DefaultRules.hs" #-}--{-# LINE 630 "./src-ag/DefaultRules.ag" #-}---- When a rule has a name, create an alias for a rule--- and a modified rule that refers to the alias--- Thus it removes rule names from rules-mkRuleAlias :: Rule -> (Rule, Maybe Rule)-mkRuleAlias r@(Rule Nothing _ _ _ _ _ _ _ _ _) = (r, Nothing)-mkRuleAlias (Rule (Just nm) pat expr owrt origin expl pure identity mbErr eager) = (r', Just alias) where- alias = Rule Nothing (Alias _LOC (Ident ("_rule_" ++ show nm) pos) (Underscore pos)) expr owrt origin expl pure identity mbErr eager- pos = getPos nm- expr' = Expression pos tks- tks = [mkLocVar (Ident ("_rule_" ++ show nm) pos) pos (Just ("Indirection to rule " ++ show nm))]- r' = Rule Nothing pat expr' owrt origin False True identity Nothing False-{-# LINE 380 "dist/build/DefaultRules.hs" #-}--{-# LINE 647 "./src-ag/DefaultRules.ag" #-}--needsMultiRules :: Options -> Bool-needsMultiRules opts = (visit opts || withCycle opts) && not (kennedyWarren opts)-{-# LINE 386 "dist/build/DefaultRules.hs" #-}--{-# LINE 652 "./src-ag/DefaultRules.ag" #-}--{--multiRule replaces- loc.(a,b) = e-by- loc.tup1 = e- loc.(a,_) = @loc.tup1- loc.(_,b) = @loc.tup1-It needs to thread a unique number for inventing names for the tuples.--It also works for nested tuples:- loc.(a,(b,c)) = e-becomes- loc.tup1 = e- loc.(a,_) = @loc.tup1- loc.(_,tup2) = @loc.tup1- loc.(b,_) = @loc.tup2- loc.(_,c) = @loc.tup2--}--multiRule :: Rule -> Int -> ([Rule], Int)-multiRule (Rule _ pat expr owrt origin expl pure identity mbErr eager) uniq- = let f :: Bool -> (Pattern->Pattern) -> Expression -> Pattern -> Int -> (Pattern, ([Rule], Int))- f expl' w e (Product pos pats) n- = let freshName = Ident ("_tup" ++ show n) pos- freshExpr = Expression pos freshTks- freshTks = [AGField _LOC freshName pos Nothing]- freshPat = Alias _LOC freshName (Underscore pos)- a = length pats - 1- us b p = Product pos (replicate (a-b) (Underscore pos) ++ [p] ++ replicate b (Underscore pos))- g :: Pattern -> ([Pattern],[Rule],Int) -> ([Pattern],[Rule],Int)- g p (xs1,rs1,n1) = let (x2,(rs2,n2)) = f False (us (length xs1)) freshExpr p n1- in (x2:xs1, rs2++rs1, n2)- (xs9,rs9,n9) = foldr g ([], [], n+1) pats- in ( freshPat- , ( Rule Nothing (w freshPat) e owrt origin expl' True False mbErr eager : rs9- , n9- )- )- f expl' w e p n- = ( p- , ( [Rule Nothing (w p) e owrt origin expl' True False mbErr eager]- , n- )- )- in snd (f expl id expr pat uniq)--{-# LINE 436 "dist/build/DefaultRules.hs" #-}--- Child ---------------------------------------------------------- wrapper-data Inh_Child = Inh_Child { con_Inh_Child :: !(ConstructorIdent), cr_Inh_Child :: !(Bool), inhMap_Inh_Child :: !(Map Identifier Attributes), merged_Inh_Child :: !(Set Identifier), nt_Inh_Child :: !(NontermIdent), params_Inh_Child :: !([Identifier]), synMap_Inh_Child :: !(Map Identifier Attributes) }-data Syn_Child = Syn_Child { errors_Syn_Child :: !(Seq Error), field_Syn_Child :: !( (Identifier,Type,ChildKind) ), inherited_Syn_Child :: !(Attributes), name_Syn_Child :: !(Identifier), output_Syn_Child :: !(Child), synthesized_Syn_Child :: !(Attributes) }-{-# INLINABLE wrap_Child #-}-wrap_Child :: T_Child -> Inh_Child -> (Syn_Child )-wrap_Child !(T_Child act) !(Inh_Child _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Child_vIn0 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap- !(T_Child_vOut0 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized) <- return (inv_Child_s0 sem K_Child_v0 arg)- return (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized)- )---- cata-{-# INLINE sem_Child #-}-sem_Child :: Child -> T_Child -sem_Child ( Child !name_ !tp_ !kind_ ) = sem_Child_Child name_ tp_ kind_---- semantic domain-newtype T_Child = T_Child {- attach_T_Child :: Identity (T_Child_s0 )- }-data T_Child_s0 where C_Child_s0 :: {- inv_Child_s0 :: !(forall t. K_Child_s0 t -> t)- } -> T_Child_s0 -data T_Child_s1 = C_Child_s1-data T_Child_s26 = C_Child_s26-newtype T_Child_s56 = C_Child_s56 {- inv_Child_s56 :: (T_Child_v53 )- }-data K_Child_s0 k where- K_Child_v0 :: K_Child_s0 (T_Child_v0 )- K_Child_v13 :: K_Child_s0 (T_Child_v13 )- K_Child_v52 :: K_Child_s0 (T_Child_v52 )-type T_Child_v0 = (T_Child_vIn0 ) -> (T_Child_vOut0 )-data T_Child_vIn0 = T_Child_vIn0 !(ConstructorIdent) !(Bool) !(Map Identifier Attributes) !(Set Identifier) !(NontermIdent) !([Identifier]) !(Map Identifier Attributes)-data T_Child_vOut0 = T_Child_vOut0 !(Seq Error) !( (Identifier,Type,ChildKind) ) !(Attributes) !(Identifier) !(Child) !(Attributes)-type T_Child_v13 = (T_Child_vIn13 ) -> (T_Child_vOut13 )-data T_Child_vIn13 = T_Child_vIn13 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)-data T_Child_vOut13 = T_Child_vOut13 !(Seq Error) !( (Identifier,Type,ChildKind) ) !(Attributes) !(Identifier) !(Child) !(Attributes)-type T_Child_v52 = (T_Child_vIn52 ) -> (T_Child_vOut52 )-data T_Child_vIn52 = T_Child_vIn52 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)-data T_Child_vOut52 = T_Child_vOut52 !(Seq Error) !( (Identifier,Type,ChildKind) ) !(Attributes) !(Identifier) !(Attributes) !(T_Child_s56 )-type T_Child_v53 = (T_Child_vIn53 ) -> (T_Child_vOut53 )-data T_Child_vIn53 = T_Child_vIn53 -data T_Child_vOut53 = T_Child_vOut53 !(Child)-{-# NOINLINE sem_Child_Child #-}-sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child -sem_Child_Child !arg_name_ !arg_tp_ !arg_kind_ = T_Child (return st0) where- {-# NOINLINE st0 #-}- !st0 = let- k0 :: K_Child_s0 t -> t- k0 K_Child_v0 = v0- k0 K_Child_v13 = v13- k0 K_Child_v52 = v52- v0 :: T_Child_v0 - v0 = \ !(T_Child_vIn0 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule11 () in- let _lhsOfield :: (Identifier,Type,ChildKind) - !_lhsOfield = rule6 arg_kind_ arg_name_ arg_tp_ in- let !_chnt = rule0 arg_name_ arg_tp_ in- let !_inh = rule1 _chnt _lhsIinhMap in- let !(!_nt,!_params) = rule7 arg_name_ arg_tp_ in- let !_inh1 = rule8 _inh _nt _params in- let _lhsOinherited :: Attributes- !_lhsOinherited = rule4 _inh1 in- let _lhsOname :: Identifier- !_lhsOname = rule3 arg_name_ in- let _lhsOoutput :: Child- !_lhsOoutput = rule10 arg_kind_ arg_name_ arg_tp_ in- let !_syn = rule2 _chnt _lhsIsynMap in- let !_syn1 = rule9 _nt _params _syn in- let _lhsOsynthesized :: Attributes- !_lhsOsynthesized = rule5 _lhsImerged _syn1 arg_name_ in- let !__result_ = T_Child_vOut0 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized- in __result_ )- v13 :: T_Child_v13 - v13 = \ !(T_Child_vIn13 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule11 () in- let _lhsOfield :: (Identifier,Type,ChildKind) - !_lhsOfield = rule6 arg_kind_ arg_name_ arg_tp_ in- let !_chnt = rule0 arg_name_ arg_tp_ in- let !_inh = rule1 _chnt _lhsIinhMap in- let !(!_nt,!_params) = rule7 arg_name_ arg_tp_ in- let !_inh1 = rule8 _inh _nt _params in- let _lhsOinherited :: Attributes- !_lhsOinherited = rule4 _inh1 in- let _lhsOname :: Identifier- !_lhsOname = rule3 arg_name_ in- let _lhsOoutput :: Child- !_lhsOoutput = rule10 arg_kind_ arg_name_ arg_tp_ in- let !_syn = rule2 _chnt _lhsIsynMap in- let !_syn1 = rule9 _nt _params _syn in- let _lhsOsynthesized :: Attributes- !_lhsOsynthesized = rule5 _lhsImerged _syn1 arg_name_ in- let !__result_ = T_Child_vOut13 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized- in __result_ )- v52 :: T_Child_v52 - v52 = \ !(T_Child_vIn52 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule11 () in- let _lhsOfield :: (Identifier,Type,ChildKind) - !_lhsOfield = rule6 arg_kind_ arg_name_ arg_tp_ in- let !_chnt = rule0 arg_name_ arg_tp_ in- let !_inh = rule1 _chnt _lhsIinhMap in- let !(!_nt,!_params) = rule7 arg_name_ arg_tp_ in- let !_inh1 = rule8 _inh _nt _params in- let _lhsOinherited :: Attributes- !_lhsOinherited = rule4 _inh1 in- let _lhsOname :: Identifier- !_lhsOname = rule3 arg_name_ in- let !_syn = rule2 _chnt _lhsIsynMap in- let !_syn1 = rule9 _nt _params _syn in- let _lhsOsynthesized :: Attributes- !_lhsOsynthesized = rule5 _lhsImerged _syn1 arg_name_ in- let !__st_ = st56 ()- !__result_ = T_Child_vOut52 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOsynthesized __st_- in __result_ )- in C_Child_s0 k0- {-# NOINLINE st56 #-}- st56 = \ (_ :: ()) -> let- v53 :: T_Child_v53 - v53 = \ !(T_Child_vIn53 ) -> (- let _lhsOoutput :: Child- !_lhsOoutput = rule10 arg_kind_ arg_name_ arg_tp_ in- let !__result_ = T_Child_vOut53 _lhsOoutput- in __result_ )- in C_Child_s56 v53- {-# NOINLINE[1] rule0 #-}- {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}- rule0 = \ !name_ !tp_ ->- {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier ""- {-# LINE 576 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule1 #-}- {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}- rule1 = \ !_chnt ((!_lhsIinhMap) :: Map Identifier Attributes) ->- {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 582 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule2 #-}- {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}- rule2 = \ !_chnt ((!_lhsIsynMap) :: Map Identifier Attributes) ->- {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 588 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule3 #-}- {-# LINE 200 "./src-ag/DefaultRules.ag" #-}- rule3 = \ !name_ ->- {-# LINE 200 "./src-ag/DefaultRules.ag" #-}- name_- {-# LINE 594 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule4 #-}- {-# LINE 209 "./src-ag/DefaultRules.ag" #-}- rule4 = \ !_inh1 ->- {-# LINE 209 "./src-ag/DefaultRules.ag" #-}- _inh1- {-# LINE 600 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule5 #-}- {-# LINE 210 "./src-ag/DefaultRules.ag" #-}- rule5 = \ ((!_lhsImerged) :: Set Identifier) !_syn1 !name_ ->- {-# LINE 210 "./src-ag/DefaultRules.ag" #-}- if name_ `Set.member` _lhsImerged- then Map.empty- else _syn1- {-# LINE 608 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule6 #-}- {-# LINE 546 "./src-ag/DefaultRules.ag" #-}- rule6 = \ !kind_ !name_ !tp_ ->- {-# LINE 546 "./src-ag/DefaultRules.ag" #-}- (name_,tp_,kind_)- {-# LINE 614 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule7 #-}- {-# LINE 568 "./src-ag/DefaultRules.ag" #-}- rule7 = \ !name_ !tp_ ->- {-# LINE 568 "./src-ag/DefaultRules.ag" #-}- case tp_ of- NT nt params _ -> (nt, params)- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> (identifier t, [])- {-# LINE 623 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule8 #-}- {-# LINE 572 "./src-ag/DefaultRules.ag" #-}- rule8 = \ !_inh !_nt !_params ->- {-# LINE 572 "./src-ag/DefaultRules.ag" #-}- Map.map (elimSelfStr _nt _params ) _inh- {-# LINE 629 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule9 #-}- {-# LINE 573 "./src-ag/DefaultRules.ag" #-}- rule9 = \ !_nt !_params !_syn ->- {-# LINE 573 "./src-ag/DefaultRules.ag" #-}- Map.map (elimSelfStr _nt _params ) _syn- {-# LINE 635 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule10 #-}- {-# LINE 614 "./src-ag/DefaultRules.ag" #-}- rule10 = \ !kind_ !name_ !tp_ ->- {-# LINE 614 "./src-ag/DefaultRules.ag" #-}- Child name_ tp_ kind_- {-# LINE 641 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule11 #-}- rule11 = \ (_ :: ()) ->- Seq.empty---- Children ------------------------------------------------------- wrapper-data Inh_Children = Inh_Children { con_Inh_Children :: !(ConstructorIdent), cr_Inh_Children :: !(Bool), inhMap_Inh_Children :: !(Map Identifier Attributes), merged_Inh_Children :: !(Set Identifier), nt_Inh_Children :: !(NontermIdent), params_Inh_Children :: !([Identifier]), synMap_Inh_Children :: !(Map Identifier Attributes) }-data Syn_Children = Syn_Children { errors_Syn_Children :: !(Seq Error), fields_Syn_Children :: !([(Identifier,Type,ChildKind)]), inputs_Syn_Children :: !([(Identifier, Attributes)]), output_Syn_Children :: !(Children), outputs_Syn_Children :: !([(Identifier, Attributes)]) }-{-# INLINABLE wrap_Children #-}-wrap_Children :: T_Children -> Inh_Children -> (Syn_Children )-wrap_Children !(T_Children act) !(Inh_Children _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Children_vIn1 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap- !(T_Children_vOut1 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs) <- return (inv_Children_s2 sem K_Children_v1 arg)- return (Syn_Children _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs)- )---- cata-{-# NOINLINE sem_Children #-}-sem_Children :: Children -> T_Children -sem_Children list = Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list)---- semantic domain-newtype T_Children = T_Children {- attach_T_Children :: Identity (T_Children_s2 )- }-data T_Children_s2 where C_Children_s2 :: {- inv_Children_s2 :: !(forall t. K_Children_s2 t -> t)- } -> T_Children_s2 -data T_Children_s3 = C_Children_s3-data T_Children_s27 = C_Children_s27-newtype T_Children_s53 = C_Children_s53 {- inv_Children_s53 :: (T_Children_v48 )- }-data K_Children_s2 k where- K_Children_v1 :: K_Children_s2 (T_Children_v1 )- K_Children_v14 :: K_Children_s2 (T_Children_v14 )- K_Children_v47 :: K_Children_s2 (T_Children_v47 )-type T_Children_v1 = (T_Children_vIn1 ) -> (T_Children_vOut1 )-data T_Children_vIn1 = T_Children_vIn1 !(ConstructorIdent) !(Bool) !(Map Identifier Attributes) !(Set Identifier) !(NontermIdent) !([Identifier]) !(Map Identifier Attributes)-data T_Children_vOut1 = T_Children_vOut1 !(Seq Error) !([(Identifier,Type,ChildKind)]) !([(Identifier, Attributes)]) !(Children) !([(Identifier, Attributes)])-type T_Children_v14 = (T_Children_vIn14 ) -> (T_Children_vOut14 )-data T_Children_vIn14 = T_Children_vIn14 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)-data T_Children_vOut14 = T_Children_vOut14 !(Seq Error) !([(Identifier,Type,ChildKind)]) !([(Identifier, Attributes)]) !(Children) !([(Identifier, Attributes)])-type T_Children_v47 = (T_Children_vIn47 ) -> (T_Children_vOut47 )-data T_Children_vIn47 = T_Children_vIn47 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)-data T_Children_vOut47 = T_Children_vOut47 !(Seq Error) !([(Identifier,Type,ChildKind)]) !([(Identifier, Attributes)]) !([(Identifier, Attributes)]) !(T_Children_s53 )-type T_Children_v48 = (T_Children_vIn48 ) -> (T_Children_vOut48 )-data T_Children_vIn48 = T_Children_vIn48 -data T_Children_vOut48 = T_Children_vOut48 !(Children)-{-# NOINLINE sem_Children_Cons #-}-sem_Children_Cons :: T_Child -> T_Children -> T_Children -sem_Children_Cons arg_hd_ arg_tl_ = T_Children (return st2) where- {-# NOINLINE st2 #-}- !st2 = let- k2 :: K_Children_s2 t -> t- k2 K_Children_v1 = v1- k2 K_Children_v14 = v14- k2 K_Children_v47 = v47- v1 :: T_Children_v1 - v1 = \ !(T_Children_vIn1 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) -> (- let !_hdX0 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_)) in- let !_tlX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_)) in- let !_hdOinhMap = rule21 _lhsIinhMap in- let !_tlOinhMap = rule28 _lhsIinhMap in- let !_hdOmerged = rule22 _lhsImerged in- let !_hdOsynMap = rule25 _lhsIsynMap in- let !_tlOmerged = rule29 _lhsImerged in- let !_tlOsynMap = rule32 _lhsIsynMap in- let !(T_Child_vOut13 _hdIerrors _hdIfield _hdIinherited _hdIname _hdIoutput _hdIsynthesized) = inv_Child_s0 _hdX0 K_Child_v13 (T_Child_vIn13 _hdOinhMap _hdOmerged _hdOsynMap) in- let !(T_Children_vOut14 _tlIerrors _tlIfields _tlIinputs _tlIoutput _tlIoutputs) = inv_Children_s2 _tlX2 K_Children_v14 (T_Children_vIn14 _tlOinhMap _tlOmerged _tlOsynMap) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule16 _hdIerrors _tlIerrors in- let _lhsOfields :: [(Identifier,Type,ChildKind)]- !_lhsOfields = rule15 _hdIfield _tlIfields in- let _lhsOinputs :: [(Identifier, Attributes)]- !_lhsOinputs = rule13 _hdIinherited _hdIname _tlIinputs in- let !_output = rule17 _hdIoutput _tlIoutput in- let _lhsOoutput :: Children- !_lhsOoutput = rule18 _output in- let _lhsOoutputs :: [(Identifier, Attributes)]- !_lhsOoutputs = rule14 _hdIname _hdIsynthesized _tlIoutputs in- let !__result_ = T_Children_vOut1 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs- in __result_ )- v14 :: T_Children_v14 - v14 = \ !(T_Children_vIn14 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (- let !_hdX0 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_)) in- let !_tlX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_)) in- let !_hdOinhMap = rule21 _lhsIinhMap in- let !_tlOinhMap = rule28 _lhsIinhMap in- let !_hdOmerged = rule22 _lhsImerged in- let !_hdOsynMap = rule25 _lhsIsynMap in- let !_tlOmerged = rule29 _lhsImerged in- let !_tlOsynMap = rule32 _lhsIsynMap in- let !(T_Child_vOut13 _hdIerrors _hdIfield _hdIinherited _hdIname _hdIoutput _hdIsynthesized) = inv_Child_s0 _hdX0 K_Child_v13 (T_Child_vIn13 _hdOinhMap _hdOmerged _hdOsynMap) in- let !(T_Children_vOut14 _tlIerrors _tlIfields _tlIinputs _tlIoutput _tlIoutputs) = inv_Children_s2 _tlX2 K_Children_v14 (T_Children_vIn14 _tlOinhMap _tlOmerged _tlOsynMap) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule16 _hdIerrors _tlIerrors in- let _lhsOfields :: [(Identifier,Type,ChildKind)]- !_lhsOfields = rule15 _hdIfield _tlIfields in- let _lhsOinputs :: [(Identifier, Attributes)]- !_lhsOinputs = rule13 _hdIinherited _hdIname _tlIinputs in- let !_output = rule17 _hdIoutput _tlIoutput in- let _lhsOoutput :: Children- !_lhsOoutput = rule18 _output in- let _lhsOoutputs :: [(Identifier, Attributes)]- !_lhsOoutputs = rule14 _hdIname _hdIsynthesized _tlIoutputs in- let !__result_ = T_Children_vOut14 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs- in __result_ )- v47 :: T_Children_v47 - v47 = \ !(T_Children_vIn47 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (- let !_hdX0 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_)) in- let !_tlX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_)) in- let !_hdOinhMap = rule21 _lhsIinhMap in- let !_tlOinhMap = rule28 _lhsIinhMap in- let !_hdOmerged = rule22 _lhsImerged in- let !_hdOsynMap = rule25 _lhsIsynMap in- let !_tlOmerged = rule29 _lhsImerged in- let !_tlOsynMap = rule32 _lhsIsynMap in- let !(T_Child_vOut52 _hdIerrors _hdIfield _hdIinherited _hdIname _hdIsynthesized _hdX56) = inv_Child_s0 _hdX0 K_Child_v52 (T_Child_vIn52 _hdOinhMap _hdOmerged _hdOsynMap) in- let !(T_Children_vOut47 _tlIerrors _tlIfields _tlIinputs _tlIoutputs _tlX53) = inv_Children_s2 _tlX2 K_Children_v47 (T_Children_vIn47 _tlOinhMap _tlOmerged _tlOsynMap) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule16 _hdIerrors _tlIerrors in- let _lhsOfields :: [(Identifier,Type,ChildKind)]- !_lhsOfields = rule15 _hdIfield _tlIfields in- let _lhsOinputs :: [(Identifier, Attributes)]- !_lhsOinputs = rule13 _hdIinherited _hdIname _tlIinputs in- let _lhsOoutputs :: [(Identifier, Attributes)]- !_lhsOoutputs = rule14 _hdIname _hdIsynthesized _tlIoutputs in- let !__st_ = st53 _hdX56 _tlX53- !__result_ = T_Children_vOut47 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutputs __st_- in __result_ )- in C_Children_s2 k2- {-# NOINLINE st53 #-}- st53 = \ !_hdX56 !_tlX53 -> let- v48 :: T_Children_v48 - v48 = \ !(T_Children_vIn48 ) -> (- let !(T_Child_vOut53 _hdIoutput) = inv_Child_s56 _hdX56 (T_Child_vIn53 ) in- let !(T_Children_vOut48 _tlIoutput) = inv_Children_s53 _tlX53 (T_Children_vIn48 ) in- let !_output = rule17 _hdIoutput _tlIoutput in- let _lhsOoutput :: Children- !_lhsOoutput = rule18 _output in- let !__result_ = T_Children_vOut48 _lhsOoutput- in __result_ )- in C_Children_s53 v48- {-# NOINLINE[1] rule13 #-}- {-# LINE 215 "./src-ag/DefaultRules.ag" #-}- rule13 = \ ((!_hdIinherited) :: Attributes) ((!_hdIname) :: Identifier) ((!_tlIinputs) :: [(Identifier, Attributes)]) ->- {-# LINE 215 "./src-ag/DefaultRules.ag" #-}- (_hdIname, _hdIinherited) : _tlIinputs- {-# LINE 793 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule14 #-}- {-# LINE 216 "./src-ag/DefaultRules.ag" #-}- rule14 = \ ((!_hdIname) :: Identifier) ((!_hdIsynthesized) :: Attributes) ((!_tlIoutputs) :: [(Identifier, Attributes)]) ->- {-# LINE 216 "./src-ag/DefaultRules.ag" #-}- (_hdIname, _hdIsynthesized) : _tlIoutputs- {-# LINE 799 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule15 #-}- {-# LINE 542 "./src-ag/DefaultRules.ag" #-}- rule15 = \ ((!_hdIfield) :: (Identifier,Type,ChildKind) ) ((!_tlIfields) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 542 "./src-ag/DefaultRules.ag" #-}- _hdIfield : _tlIfields- {-# LINE 805 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule16 #-}- rule16 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# NOINLINE[1] rule17 #-}- rule17 = \ ((!_hdIoutput) :: Child) ((!_tlIoutput) :: Children) ->- (:) _hdIoutput _tlIoutput- {-# NOINLINE[1] rule18 #-}- rule18 = \ !_output ->- _output- {-# NOINLINE[1] rule21 #-}- rule21 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule22 #-}- rule22 = \ ((!_lhsImerged) :: Set Identifier) ->- _lhsImerged- {-# NOINLINE[1] rule25 #-}- rule25 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule28 #-}- rule28 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule29 #-}- rule29 = \ ((!_lhsImerged) :: Set Identifier) ->- _lhsImerged- {-# NOINLINE[1] rule32 #-}- rule32 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap-{-# NOINLINE sem_Children_Nil #-}-sem_Children_Nil :: T_Children -sem_Children_Nil = T_Children (return st2) where- {-# NOINLINE st2 #-}- !st2 = let- k2 :: K_Children_s2 t -> t- k2 K_Children_v1 = v1- k2 K_Children_v14 = v14- k2 K_Children_v47 = v47- v1 :: T_Children_v1 - v1 = \ !(T_Children_vIn1 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule36 () in- let _lhsOfields :: [(Identifier,Type,ChildKind)]- !_lhsOfields = rule35 () in- let _lhsOinputs :: [(Identifier, Attributes)]- !_lhsOinputs = rule33 () in- let !_output = rule37 () in- let _lhsOoutputs :: [(Identifier, Attributes)]- !_lhsOoutputs = rule34 () in- let _lhsOoutput :: Children- !_lhsOoutput = rule38 _output in- let !__result_ = T_Children_vOut1 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs- in __result_ )- v14 :: T_Children_v14 - v14 = \ !(T_Children_vIn14 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule36 () in- let _lhsOfields :: [(Identifier,Type,ChildKind)]- !_lhsOfields = rule35 () in- let _lhsOinputs :: [(Identifier, Attributes)]- !_lhsOinputs = rule33 () in- let !_output = rule37 () in- let _lhsOoutputs :: [(Identifier, Attributes)]- !_lhsOoutputs = rule34 () in- let _lhsOoutput :: Children- !_lhsOoutput = rule38 _output in- let !__result_ = T_Children_vOut14 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs- in __result_ )- v47 :: T_Children_v47 - v47 = \ !(T_Children_vIn47 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule36 () in- let _lhsOfields :: [(Identifier,Type,ChildKind)]- !_lhsOfields = rule35 () in- let _lhsOinputs :: [(Identifier, Attributes)]- !_lhsOinputs = rule33 () in- let _lhsOoutputs :: [(Identifier, Attributes)]- !_lhsOoutputs = rule34 () in- let !__st_ = st53 ()- !__result_ = T_Children_vOut47 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutputs __st_- in __result_ )- in C_Children_s2 k2- {-# NOINLINE st53 #-}- st53 = \ (_ :: ()) -> let- v48 :: T_Children_v48 - v48 = \ !(T_Children_vIn48 ) -> (- let !_output = rule37 () in- let _lhsOoutput :: Children- !_lhsOoutput = rule38 _output in- let !__result_ = T_Children_vOut48 _lhsOoutput- in __result_ )- in C_Children_s53 v48- {-# NOINLINE[1] rule33 #-}- {-# LINE 217 "./src-ag/DefaultRules.ag" #-}- rule33 = \ (_ :: ()) ->- {-# LINE 217 "./src-ag/DefaultRules.ag" #-}- []- {-# LINE 901 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule34 #-}- {-# LINE 218 "./src-ag/DefaultRules.ag" #-}- rule34 = \ (_ :: ()) ->- {-# LINE 218 "./src-ag/DefaultRules.ag" #-}- []- {-# LINE 907 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule35 #-}- {-# LINE 543 "./src-ag/DefaultRules.ag" #-}- rule35 = \ (_ :: ()) ->- {-# LINE 543 "./src-ag/DefaultRules.ag" #-}- []- {-# LINE 913 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule36 #-}- rule36 = \ (_ :: ()) ->- Seq.empty- {-# NOINLINE[1] rule37 #-}- rule37 = \ (_ :: ()) ->- []- {-# NOINLINE[1] rule38 #-}- rule38 = \ !_output ->- _output---- Grammar -------------------------------------------------------- wrapper-data Inh_Grammar = Inh_Grammar { options_Inh_Grammar :: !(Options) }-data Syn_Grammar = Syn_Grammar { errors_Syn_Grammar :: !(Seq Error), output_Syn_Grammar :: !(Grammar) }-{-# INLINABLE wrap_Grammar #-}-wrap_Grammar :: T_Grammar -> Inh_Grammar -> (Syn_Grammar )-wrap_Grammar !(T_Grammar act) !(Inh_Grammar _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Grammar_vIn2 _lhsIoptions- !(T_Grammar_vOut2 _lhsOerrors _lhsOoutput) <- return (inv_Grammar_s4 sem arg)- return (Syn_Grammar _lhsOerrors _lhsOoutput)- )---- cata-{-# INLINE sem_Grammar #-}-sem_Grammar :: Grammar -> T_Grammar -sem_Grammar ( Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ nonts_ !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !quantMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ ) = sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ ( sem_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_---- semantic domain-newtype T_Grammar = T_Grammar {- attach_T_Grammar :: Identity (T_Grammar_s4 )- }-newtype T_Grammar_s4 = C_Grammar_s4 {- inv_Grammar_s4 :: (T_Grammar_v2 )- }-data T_Grammar_s5 = C_Grammar_s5-type T_Grammar_v2 = (T_Grammar_vIn2 ) -> (T_Grammar_vOut2 )-data T_Grammar_vIn2 = T_Grammar_vIn2 !(Options)-data T_Grammar_vOut2 = T_Grammar_vOut2 !(Seq Error) !(Grammar)-{-# NOINLINE sem_Grammar_Grammar #-}-sem_Grammar_Grammar :: (TypeSyns) -> (UseMap) -> (Derivings) -> (Set NontermIdent) -> T_Nonterminals -> (PragmaMap) -> (AttrOrderMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (UniqueMap) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) -> T_Grammar -sem_Grammar_Grammar !arg_typeSyns_ !arg_useMap_ !arg_derivings_ !arg_wrappers_ arg_nonts_ !arg_pragmas_ !arg_manualAttrOrderMap_ !arg_paramMap_ !arg_contextMap_ !arg_quantMap_ !arg_uniqueMap_ !arg_augmentsMap_ !arg_aroundsMap_ !arg_mergeMap_ = T_Grammar (return st4) where- {-# NOINLINE st4 #-}- !st4 = let- v2 :: T_Grammar_v2 - v2 = \ !(T_Grammar_vIn2 _lhsIoptions) -> (- let !_nontsX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_nonts_)) in- let !_nontsOuniq = rule47 () in- let !_nontsOcr = rule42 _lhsIoptions in- let !_nontsOmanualAttrOrderMap = rule48 arg_manualAttrOrderMap_ in- let !_nontsOmergesIn = rule51 arg_mergeMap_ in- let !_nontsOo_rename = rule41 _lhsIoptions in- let !_nontsOoptions = rule55 _lhsIoptions in- let !_nontsOtypeSyns = rule46 arg_typeSyns_ in- let !_nontsOuseMap = rule45 arg_useMap_ in- let !_nontsOwrappers = rule43 arg_wrappers_ in- let !_nontsOaroundsIn = rule50 arg_aroundsMap_ in- let !_nontsOaugmentsIn = rule49 arg_augmentsMap_ in- let !(T_Nonterminals_vOut15 _nontsIinhMap' _nontsIsynMap' _nontsX28) = inv_Nonterminals_s8 _nontsX8 K_Nonterminals_v15 (T_Nonterminals_vIn15 ) in- let !_nontsOinhMap = rule39 _nontsIinhMap' in- let !_nontsOsynMap = rule40 _nontsIsynMap' in- let !(T_Nonterminals_vOut16 _nontsIerrors _nontsIoutput _nontsIuniq) = inv_Nonterminals_s28 _nontsX28 K_Nonterminals_v16 (T_Nonterminals_vIn16 _nontsOaroundsIn _nontsOaugmentsIn _nontsOcr _nontsOinhMap _nontsOmanualAttrOrderMap _nontsOmergesIn _nontsOo_rename _nontsOoptions _nontsOsynMap _nontsOtypeSyns _nontsOuniq _nontsOuseMap _nontsOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule52 _nontsIerrors in- let !_output = rule53 _nontsIoutput arg_aroundsMap_ arg_augmentsMap_ arg_contextMap_ arg_derivings_ arg_manualAttrOrderMap_ arg_mergeMap_ arg_paramMap_ arg_pragmas_ arg_quantMap_ arg_typeSyns_ arg_uniqueMap_ arg_useMap_ arg_wrappers_ in- let _lhsOoutput :: Grammar- !_lhsOoutput = rule54 _output in- let !__result_ = T_Grammar_vOut2 _lhsOerrors _lhsOoutput- in __result_ )- in C_Grammar_s4 v2- {-# INLINE rule39 #-}- {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}- rule39 = \ ((!_nontsIinhMap') :: Map Identifier Attributes) ->- {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 990 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule40 #-}- {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}- rule40 = \ ((!_nontsIsynMap') :: Map Identifier Attributes) ->- {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 996 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule41 #-}- {-# LINE 58 "./src-ag/DefaultRules.ag" #-}- rule41 = \ ((!_lhsIoptions) :: Options) ->- {-# LINE 58 "./src-ag/DefaultRules.ag" #-}- rename _lhsIoptions- {-# LINE 1002 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule42 #-}- {-# LINE 59 "./src-ag/DefaultRules.ag" #-}- rule42 = \ ((!_lhsIoptions) :: Options) ->- {-# LINE 59 "./src-ag/DefaultRules.ag" #-}- modcopy _lhsIoptions- {-# LINE 1008 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule43 #-}- {-# LINE 67 "./src-ag/DefaultRules.ag" #-}- rule43 = \ !wrappers_ ->- {-# LINE 67 "./src-ag/DefaultRules.ag" #-}- wrappers_- {-# LINE 1014 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule45 #-}- {-# LINE 202 "./src-ag/DefaultRules.ag" #-}- rule45 = \ !useMap_ ->- {-# LINE 202 "./src-ag/DefaultRules.ag" #-}- useMap_- {-# LINE 1020 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule46 #-}- {-# LINE 204 "./src-ag/DefaultRules.ag" #-}- rule46 = \ !typeSyns_ ->- {-# LINE 204 "./src-ag/DefaultRules.ag" #-}- typeSyns_- {-# LINE 1026 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule47 #-}- {-# LINE 595 "./src-ag/DefaultRules.ag" #-}- rule47 = \ (_ :: ()) ->- {-# LINE 595 "./src-ag/DefaultRules.ag" #-}- 1- {-# LINE 1032 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule48 #-}- {-# LINE 709 "./src-ag/DefaultRules.ag" #-}- rule48 = \ !manualAttrOrderMap_ ->- {-# LINE 709 "./src-ag/DefaultRules.ag" #-}- manualAttrOrderMap_- {-# LINE 1038 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule49 #-}- {-# LINE 775 "./src-ag/DefaultRules.ag" #-}- rule49 = \ !augmentsMap_ ->- {-# LINE 775 "./src-ag/DefaultRules.ag" #-}- augmentsMap_- {-# LINE 1044 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule50 #-}- {-# LINE 782 "./src-ag/DefaultRules.ag" #-}- rule50 = \ !aroundsMap_ ->- {-# LINE 782 "./src-ag/DefaultRules.ag" #-}- aroundsMap_- {-# LINE 1050 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule51 #-}- {-# LINE 790 "./src-ag/DefaultRules.ag" #-}- rule51 = \ !mergeMap_ ->- {-# LINE 790 "./src-ag/DefaultRules.ag" #-}- mergeMap_- {-# LINE 1056 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule52 #-}- rule52 = \ ((!_nontsIerrors) :: Seq Error) ->- _nontsIerrors- {-# INLINE rule53 #-}- rule53 = \ ((!_nontsIoutput) :: Nonterminals) !aroundsMap_ !augmentsMap_ !contextMap_ !derivings_ !manualAttrOrderMap_ !mergeMap_ !paramMap_ !pragmas_ !quantMap_ !typeSyns_ !uniqueMap_ !useMap_ !wrappers_ ->- Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_- {-# INLINE rule54 #-}- rule54 = \ !_output ->- _output- {-# INLINE rule55 #-}- rule55 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions---- Nonterminal ---------------------------------------------------- wrapper-data Inh_Nonterminal = Inh_Nonterminal { aroundsIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), augmentsIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), cr_Inh_Nonterminal :: !(Bool), inhMap_Inh_Nonterminal :: !(Map Identifier Attributes), manualAttrOrderMap_Inh_Nonterminal :: !(AttrOrderMap), mergesIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))), nonterminals_Inh_Nonterminal :: !(Set NontermIdent), o_rename_Inh_Nonterminal :: !(Bool), options_Inh_Nonterminal :: !(Options), synMap_Inh_Nonterminal :: !(Map Identifier Attributes), typeSyns_Inh_Nonterminal :: !(TypeSyns), uniq_Inh_Nonterminal :: !(Int), useMap_Inh_Nonterminal :: !(UseMap), wrappers_Inh_Nonterminal :: !(Set NontermIdent) }-data Syn_Nonterminal = Syn_Nonterminal { collect_nts_Syn_Nonterminal :: !(Set NontermIdent), errors_Syn_Nonterminal :: !(Seq Error), inhMap'_Syn_Nonterminal :: !(Map Identifier Attributes), output_Syn_Nonterminal :: !(Nonterminal), synMap'_Syn_Nonterminal :: !(Map Identifier Attributes), uniq_Syn_Nonterminal :: !(Int) }-{-# INLINABLE wrap_Nonterminal #-}-wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> (Syn_Nonterminal )-wrap_Nonterminal !(T_Nonterminal act) !(Inh_Nonterminal _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Nonterminal_vIn3 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers- !(T_Nonterminal_vOut3 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq) <- return (inv_Nonterminal_s6 sem K_Nonterminal_v3 arg)- return (Syn_Nonterminal _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq)- )---- cata-{-# INLINE sem_Nonterminal #-}-sem_Nonterminal :: Nonterminal -> T_Nonterminal -sem_Nonterminal ( Nonterminal !nt_ !params_ !inh_ !syn_ prods_ ) = sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ ( sem_Productions prods_ )---- semantic domain-newtype T_Nonterminal = T_Nonterminal {- attach_T_Nonterminal :: Identity (T_Nonterminal_s6 )- }-data T_Nonterminal_s6 where C_Nonterminal_s6 :: {- inv_Nonterminal_s6 :: !(forall t. K_Nonterminal_s6 t -> t)- } -> T_Nonterminal_s6 -data T_Nonterminal_s7 = C_Nonterminal_s7-data T_Nonterminal_s31 = C_Nonterminal_s31-data T_Nonterminal_s43 where C_Nonterminal_s43 :: {- inv_Nonterminal_s43 :: !(forall t. K_Nonterminal_s43 t -> t)- } -> T_Nonterminal_s43 -data T_Nonterminal_s44 = C_Nonterminal_s44-newtype T_Nonterminal_s46 = C_Nonterminal_s46 {- inv_Nonterminal_s46 :: (T_Nonterminal_v37 )- }-newtype T_Nonterminal_s52 = C_Nonterminal_s52 {- inv_Nonterminal_s52 :: (T_Nonterminal_v46 )- }-data K_Nonterminal_s6 k where- K_Nonterminal_v3 :: K_Nonterminal_s6 (T_Nonterminal_v3 )- K_Nonterminal_v18 :: K_Nonterminal_s6 (T_Nonterminal_v18 )- K_Nonterminal_v32 :: K_Nonterminal_s6 (T_Nonterminal_v32 )- K_Nonterminal_v36 :: K_Nonterminal_s6 (T_Nonterminal_v36 )-data K_Nonterminal_s43 k where- K_Nonterminal_v33 :: K_Nonterminal_s43 (T_Nonterminal_v33 )- K_Nonterminal_v45 :: K_Nonterminal_s43 (T_Nonterminal_v45 )-type T_Nonterminal_v3 = (T_Nonterminal_vIn3 ) -> (T_Nonterminal_vOut3 )-data T_Nonterminal_vIn3 = T_Nonterminal_vIn3 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Set NontermIdent) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)-data T_Nonterminal_vOut3 = T_Nonterminal_vOut3 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Nonterminal) !(Map Identifier Attributes) !(Int)-type T_Nonterminal_v18 = (T_Nonterminal_vIn18 ) -> (T_Nonterminal_vOut18 )-data T_Nonterminal_vIn18 = T_Nonterminal_vIn18 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)-data T_Nonterminal_vOut18 = T_Nonterminal_vOut18 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Nonterminal) !(Map Identifier Attributes) !(Int)-type T_Nonterminal_v32 = (T_Nonterminal_vIn32 ) -> (T_Nonterminal_vOut32 )-data T_Nonterminal_vIn32 = T_Nonterminal_vIn32 -data T_Nonterminal_vOut32 = T_Nonterminal_vOut32 !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminal_s43 )-type T_Nonterminal_v33 = (T_Nonterminal_vIn33 ) -> (T_Nonterminal_vOut33 )-data T_Nonterminal_vIn33 = T_Nonterminal_vIn33 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)-data T_Nonterminal_vOut33 = T_Nonterminal_vOut33 !(Seq Error) !(Nonterminal) !(Int)-type T_Nonterminal_v36 = (T_Nonterminal_vIn36 ) -> (T_Nonterminal_vOut36 )-data T_Nonterminal_vIn36 = T_Nonterminal_vIn36 !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)-data T_Nonterminal_vOut36 = T_Nonterminal_vOut36 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminal_s46 )-type T_Nonterminal_v37 = (T_Nonterminal_vIn37 ) -> (T_Nonterminal_vOut37 )-data T_Nonterminal_vIn37 = T_Nonterminal_vIn37 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)-data T_Nonterminal_vOut37 = T_Nonterminal_vOut37 !(Nonterminal) !(Int)-type T_Nonterminal_v45 = (T_Nonterminal_vIn45 ) -> (T_Nonterminal_vOut45 )-data T_Nonterminal_vIn45 = T_Nonterminal_vIn45 !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)-data T_Nonterminal_vOut45 = T_Nonterminal_vOut45 !(Seq Error) !(T_Nonterminal_s52 )-type T_Nonterminal_v46 = (T_Nonterminal_vIn46 ) -> (T_Nonterminal_vOut46 )-data T_Nonterminal_vIn46 = T_Nonterminal_vIn46 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)-data T_Nonterminal_vOut46 = T_Nonterminal_vOut46 !(Nonterminal) !(Int)-{-# NOINLINE sem_Nonterminal_Nonterminal #-}-sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions -> T_Nonterminal -sem_Nonterminal_Nonterminal !arg_nt_ !arg_params_ !arg_inh_ !arg_syn_ arg_prods_ = T_Nonterminal (return st6) where- {-# NOINLINE st6 #-}- !st6 = let- k6 :: K_Nonterminal_s6 t -> t- k6 K_Nonterminal_v3 = v3- k6 K_Nonterminal_v18 = v18- k6 K_Nonterminal_v32 = v32- k6 K_Nonterminal_v36 = v36- v3 :: T_Nonterminal_v3 - v3 = \ !(T_Nonterminal_vIn3 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule59 arg_nt_ in- let !_prodsOcr = rule77 _lhsIcr in- let !_inh1 = rule66 arg_inh_ arg_nt_ arg_params_ in- let !_prodsOinh = rule60 _inh1 in- let !_prodsOinhMap = rule78 _lhsIinhMap in- let !_prodsOmanualAttrOrderMap = rule79 _lhsImanualAttrOrderMap in- let !_mergesIn = rule71 _lhsImergesIn arg_nt_ in- let !_prodsOmergesIn = rule80 _mergesIn in- let !_prodsOnt = rule65 arg_nt_ in- let !_prodsOo_rename = rule82 _lhsIo_rename in- let !_prodsOoptions = rule83 _lhsIoptions in- let !_syn1 = rule67 arg_nt_ arg_params_ arg_syn_ in- let !_prodsOsyn = rule61 _syn1 in- let !_prodsOsynMap = rule84 _lhsIsynMap in- let !_prodsOsynOrig = rule63 arg_syn_ in- let !_prodsOtypeSyns = rule85 _lhsItypeSyns in- let !_prodsOuseMap = rule64 _lhsIuseMap arg_nt_ in- let !_prodsOwrappers = rule87 _lhsIwrappers in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule56 arg_inh_ arg_nt_ in- let !_aroundsIn = rule70 _lhsIaroundsIn arg_nt_ in- let !_prodsOaroundsIn = rule75 _aroundsIn in- let !_augmentsIn = rule69 _lhsIaugmentsIn arg_nt_ in- let !_prodsOaugmentsIn = rule76 _augmentsIn in- let !_prodsOparams = rule58 arg_params_ in- let !_prodsOuniq = rule86 _lhsIuniq in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule57 arg_nt_ arg_syn_ in- let !(T_Productions_vOut17 _prodsIerrors _prodsIoutput _prodsIuniq) = inv_Productions_s16 _prodsX16 K_Productions_v17 (T_Productions_vIn17 _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule72 _prodsIerrors in- let _lhsOoutput :: Nonterminal- !_lhsOoutput = rule68 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule74 _prodsIuniq in- let !__result_ = T_Nonterminal_vOut3 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq- in __result_ )- v18 :: T_Nonterminal_v18 - v18 = \ !(T_Nonterminal_vIn18 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule59 arg_nt_ in- let !_prodsOcr = rule77 _lhsIcr in- let !_inh1 = rule66 arg_inh_ arg_nt_ arg_params_ in- let !_prodsOinh = rule60 _inh1 in- let !_prodsOinhMap = rule78 _lhsIinhMap in- let !_prodsOmanualAttrOrderMap = rule79 _lhsImanualAttrOrderMap in- let !_mergesIn = rule71 _lhsImergesIn arg_nt_ in- let !_prodsOmergesIn = rule80 _mergesIn in- let !_prodsOnt = rule65 arg_nt_ in- let !_prodsOo_rename = rule82 _lhsIo_rename in- let !_prodsOoptions = rule83 _lhsIoptions in- let !_syn1 = rule67 arg_nt_ arg_params_ arg_syn_ in- let !_prodsOsyn = rule61 _syn1 in- let !_prodsOsynMap = rule84 _lhsIsynMap in- let !_prodsOsynOrig = rule63 arg_syn_ in- let !_prodsOtypeSyns = rule85 _lhsItypeSyns in- let !_prodsOuseMap = rule64 _lhsIuseMap arg_nt_ in- let !_prodsOwrappers = rule87 _lhsIwrappers in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule56 arg_inh_ arg_nt_ in- let !_aroundsIn = rule70 _lhsIaroundsIn arg_nt_ in- let !_prodsOaroundsIn = rule75 _aroundsIn in- let !_augmentsIn = rule69 _lhsIaugmentsIn arg_nt_ in- let !_prodsOaugmentsIn = rule76 _augmentsIn in- let !_prodsOparams = rule58 arg_params_ in- let !_prodsOuniq = rule86 _lhsIuniq in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule57 arg_nt_ arg_syn_ in- let !(T_Productions_vOut17 _prodsIerrors _prodsIoutput _prodsIuniq) = inv_Productions_s16 _prodsX16 K_Productions_v17 (T_Productions_vIn17 _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule72 _prodsIerrors in- let _lhsOoutput :: Nonterminal- !_lhsOoutput = rule68 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule74 _prodsIuniq in- let !__result_ = T_Nonterminal_vOut18 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq- in __result_ )- v32 :: T_Nonterminal_v32 - v32 = \ !(T_Nonterminal_vIn32 ) -> (- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule56 arg_inh_ arg_nt_ in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule57 arg_nt_ arg_syn_ in- let !__st_ = st43 ()- !__result_ = T_Nonterminal_vOut32 _lhsOinhMap' _lhsOsynMap' __st_- in __result_ )- v36 :: T_Nonterminal_v36 - v36 = \ !(T_Nonterminal_vIn36 _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule59 arg_nt_ in- let !_prodsOcr = rule77 _lhsIcr in- let !_inh1 = rule66 arg_inh_ arg_nt_ arg_params_ in- let !_prodsOinh = rule60 _inh1 in- let !_prodsOinhMap = rule78 _lhsIinhMap in- let !_prodsOmanualAttrOrderMap = rule79 _lhsImanualAttrOrderMap in- let !_mergesIn = rule71 _lhsImergesIn arg_nt_ in- let !_prodsOmergesIn = rule80 _mergesIn in- let !_prodsOnt = rule65 arg_nt_ in- let !_prodsOo_rename = rule82 _lhsIo_rename in- let !_prodsOoptions = rule83 _lhsIoptions in- let !_syn1 = rule67 arg_nt_ arg_params_ arg_syn_ in- let !_prodsOsyn = rule61 _syn1 in- let !_prodsOsynMap = rule84 _lhsIsynMap in- let !_prodsOsynOrig = rule63 arg_syn_ in- let !_prodsOtypeSyns = rule85 _lhsItypeSyns in- let !_prodsOuseMap = rule64 _lhsIuseMap arg_nt_ in- let !_prodsOwrappers = rule87 _lhsIwrappers in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule56 arg_inh_ arg_nt_ in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule57 arg_nt_ arg_syn_ in- let !(T_Productions_vOut26 _prodsIerrors _prodsX39) = inv_Productions_s16 _prodsX16 K_Productions_v26 (T_Productions_vIn26 _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuseMap _prodsOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule72 _prodsIerrors in- let !__st_ = st46 _inh1 _prodsX39 _syn1- !__result_ = T_Nonterminal_vOut36 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOsynMap' __st_- in __result_ )- in C_Nonterminal_s6 k6- {-# NOINLINE st43 #-}- st43 = \ (_ :: ()) -> let- k43 :: K_Nonterminal_s43 t -> t- k43 K_Nonterminal_v33 = v33- k43 K_Nonterminal_v45 = v45- v33 :: T_Nonterminal_v33 - v33 = \ !(T_Nonterminal_vIn33 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_prodsOnt = rule65 arg_nt_ in- let !_prodsOsynOrig = rule63 arg_syn_ in- let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in- let !_prodsOcr = rule77 _lhsIcr in- let !_inh1 = rule66 arg_inh_ arg_nt_ arg_params_ in- let !_prodsOinh = rule60 _inh1 in- let !_prodsOinhMap = rule78 _lhsIinhMap in- let !_prodsOmanualAttrOrderMap = rule79 _lhsImanualAttrOrderMap in- let !_mergesIn = rule71 _lhsImergesIn arg_nt_ in- let !_prodsOmergesIn = rule80 _mergesIn in- let !_prodsOo_rename = rule82 _lhsIo_rename in- let !_prodsOoptions = rule83 _lhsIoptions in- let !_syn1 = rule67 arg_nt_ arg_params_ arg_syn_ in- let !_prodsOsyn = rule61 _syn1 in- let !_prodsOsynMap = rule84 _lhsIsynMap in- let !_prodsOtypeSyns = rule85 _lhsItypeSyns in- let !_prodsOuseMap = rule64 _lhsIuseMap arg_nt_ in- let !_prodsOwrappers = rule87 _lhsIwrappers in- let !_aroundsIn = rule70 _lhsIaroundsIn arg_nt_ in- let !_prodsOaroundsIn = rule75 _aroundsIn in- let !_augmentsIn = rule69 _lhsIaugmentsIn arg_nt_ in- let !_prodsOaugmentsIn = rule76 _augmentsIn in- let !_prodsOparams = rule58 arg_params_ in- let !_prodsOuniq = rule86 _lhsIuniq in- let !(T_Productions_vOut17 _prodsIerrors _prodsIoutput _prodsIuniq) = inv_Productions_s16 _prodsX16 K_Productions_v17 (T_Productions_vIn17 _prodsOaroundsIn _prodsOaugmentsIn _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule72 _prodsIerrors in- let _lhsOoutput :: Nonterminal- !_lhsOoutput = rule68 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule74 _prodsIuniq in- let !__result_ = T_Nonterminal_vOut33 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v45 :: T_Nonterminal_v45 - v45 = \ !(T_Nonterminal_vIn45 _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let !_prodsOnt = rule65 arg_nt_ in- let !_prodsOsynOrig = rule63 arg_syn_ in- let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in- let !_prodsOcr = rule77 _lhsIcr in- let !_inh1 = rule66 arg_inh_ arg_nt_ arg_params_ in- let !_prodsOinh = rule60 _inh1 in- let !_prodsOinhMap = rule78 _lhsIinhMap in- let !_prodsOmanualAttrOrderMap = rule79 _lhsImanualAttrOrderMap in- let !_mergesIn = rule71 _lhsImergesIn arg_nt_ in- let !_prodsOmergesIn = rule80 _mergesIn in- let !_prodsOo_rename = rule82 _lhsIo_rename in- let !_prodsOoptions = rule83 _lhsIoptions in- let !_syn1 = rule67 arg_nt_ arg_params_ arg_syn_ in- let !_prodsOsyn = rule61 _syn1 in- let !_prodsOsynMap = rule84 _lhsIsynMap in- let !_prodsOtypeSyns = rule85 _lhsItypeSyns in- let !_prodsOuseMap = rule64 _lhsIuseMap arg_nt_ in- let !_prodsOwrappers = rule87 _lhsIwrappers in- let !(T_Productions_vOut26 _prodsIerrors _prodsX39) = inv_Productions_s16 _prodsX16 K_Productions_v26 (T_Productions_vIn26 _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuseMap _prodsOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule72 _prodsIerrors in- let !__st_ = st52 _inh1 _prodsX39 _syn1- !__result_ = T_Nonterminal_vOut45 _lhsOerrors __st_- in __result_ )- in C_Nonterminal_s43 k43- {-# NOINLINE st46 #-}- st46 = \ !_inh1 !_prodsX39 !_syn1 -> let- v37 :: T_Nonterminal_v37 - v37 = \ !(T_Nonterminal_vIn37 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (- let !_prodsOparams = rule58 arg_params_ in- let !_aroundsIn = rule70 _lhsIaroundsIn arg_nt_ in- let !_prodsOaroundsIn = rule75 _aroundsIn in- let !_augmentsIn = rule69 _lhsIaugmentsIn arg_nt_ in- let !_prodsOaugmentsIn = rule76 _augmentsIn in- let !_prodsOuniq = rule86 _lhsIuniq in- let !(T_Productions_vOut27 _prodsIoutput _prodsIuniq) = inv_Productions_s39 _prodsX39 (T_Productions_vIn27 _prodsOaroundsIn _prodsOaugmentsIn _prodsOparams _prodsOuniq) in- let _lhsOoutput :: Nonterminal- !_lhsOoutput = rule68 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule74 _prodsIuniq in- let !__result_ = T_Nonterminal_vOut37 _lhsOoutput _lhsOuniq- in __result_ )- in C_Nonterminal_s46 v37- {-# NOINLINE st52 #-}- st52 = \ !_inh1 !_prodsX39 !_syn1 -> let- v46 :: T_Nonterminal_v46 - v46 = \ !(T_Nonterminal_vIn46 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (- let !_prodsOparams = rule58 arg_params_ in- let !_aroundsIn = rule70 _lhsIaroundsIn arg_nt_ in- let !_prodsOaroundsIn = rule75 _aroundsIn in- let !_augmentsIn = rule69 _lhsIaugmentsIn arg_nt_ in- let !_prodsOaugmentsIn = rule76 _augmentsIn in- let !_prodsOuniq = rule86 _lhsIuniq in- let !(T_Productions_vOut27 _prodsIoutput _prodsIuniq) = inv_Productions_s39 _prodsX39 (T_Productions_vIn27 _prodsOaroundsIn _prodsOaugmentsIn _prodsOparams _prodsOuniq) in- let _lhsOoutput :: Nonterminal- !_lhsOoutput = rule68 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule74 _prodsIuniq in- let !__result_ = T_Nonterminal_vOut46 _lhsOoutput _lhsOuniq- in __result_ )- in C_Nonterminal_s52 v46- {-# NOINLINE rule56 #-}- {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}- rule56 = \ !inh_ !nt_ ->- {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1382 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule57 #-}- {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}- rule57 = \ !nt_ !syn_ ->- {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1388 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule58 #-}- {-# LINE 44 "./src-ag/DefaultRules.ag" #-}- rule58 = \ !params_ ->- {-# LINE 44 "./src-ag/DefaultRules.ag" #-}- params_- {-# LINE 1394 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule59 #-}- {-# LINE 176 "./src-ag/DefaultRules.ag" #-}- rule59 = \ !nt_ ->- {-# LINE 176 "./src-ag/DefaultRules.ag" #-}- Set.singleton nt_- {-# LINE 1400 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule60 #-}- {-# LINE 190 "./src-ag/DefaultRules.ag" #-}- rule60 = \ !_inh1 ->- {-# LINE 190 "./src-ag/DefaultRules.ag" #-}- _inh1- {-# LINE 1406 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule61 #-}- {-# LINE 191 "./src-ag/DefaultRules.ag" #-}- rule61 = \ !_syn1 ->- {-# LINE 191 "./src-ag/DefaultRules.ag" #-}- _syn1- {-# LINE 1412 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule63 #-}- {-# LINE 193 "./src-ag/DefaultRules.ag" #-}- rule63 = \ !syn_ ->- {-# LINE 193 "./src-ag/DefaultRules.ag" #-}- syn_- {-# LINE 1418 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule64 #-}- {-# LINE 194 "./src-ag/DefaultRules.ag" #-}- rule64 = \ ((!_lhsIuseMap) :: UseMap) !nt_ ->- {-# LINE 194 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIuseMap- {-# LINE 1424 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule65 #-}- {-# LINE 206 "./src-ag/DefaultRules.ag" #-}- rule65 = \ !nt_ ->- {-# LINE 206 "./src-ag/DefaultRules.ag" #-}- nt_- {-# LINE 1430 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule66 #-}- {-# LINE 564 "./src-ag/DefaultRules.ag" #-}- rule66 = \ !inh_ !nt_ !params_ ->- {-# LINE 564 "./src-ag/DefaultRules.ag" #-}- Map.map (elimSelfId nt_ params_) inh_- {-# LINE 1436 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule67 #-}- {-# LINE 565 "./src-ag/DefaultRules.ag" #-}- rule67 = \ !nt_ !params_ !syn_ ->- {-# LINE 565 "./src-ag/DefaultRules.ag" #-}- Map.map (elimSelfId nt_ params_) syn_- {-# LINE 1442 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule68 #-}- {-# LINE 604 "./src-ag/DefaultRules.ag" #-}- rule68 = \ !_inh1 ((!_prodsIoutput) :: Productions) !_syn1 !nt_ !params_ ->- {-# LINE 604 "./src-ag/DefaultRules.ag" #-}- Nonterminal nt_ params_ _inh1 _syn1 _prodsIoutput- {-# LINE 1448 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule69 #-}- {-# LINE 776 "./src-ag/DefaultRules.ag" #-}- rule69 = \ ((!_lhsIaugmentsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !nt_ ->- {-# LINE 776 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn- {-# LINE 1454 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule70 #-}- {-# LINE 783 "./src-ag/DefaultRules.ag" #-}- rule70 = \ ((!_lhsIaroundsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !nt_ ->- {-# LINE 783 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundsIn- {-# LINE 1460 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule71 #-}- {-# LINE 791 "./src-ag/DefaultRules.ag" #-}- rule71 = \ ((!_lhsImergesIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !nt_ ->- {-# LINE 791 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergesIn- {-# LINE 1466 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule72 #-}- rule72 = \ ((!_prodsIerrors) :: Seq Error) ->- _prodsIerrors- {-# NOINLINE[1] rule74 #-}- rule74 = \ ((!_prodsIuniq) :: Int) ->- _prodsIuniq- {-# NOINLINE[1] rule75 #-}- rule75 = \ !_aroundsIn ->- _aroundsIn- {-# NOINLINE[1] rule76 #-}- rule76 = \ !_augmentsIn ->- _augmentsIn- {-# NOINLINE[1] rule77 #-}- rule77 = \ ((!_lhsIcr) :: Bool) ->- _lhsIcr- {-# NOINLINE[1] rule78 #-}- rule78 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule79 #-}- rule79 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->- _lhsImanualAttrOrderMap- {-# NOINLINE[1] rule80 #-}- rule80 = \ !_mergesIn ->- _mergesIn- {-# NOINLINE[1] rule82 #-}- rule82 = \ ((!_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# NOINLINE[1] rule83 #-}- rule83 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule84 #-}- rule84 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule85 #-}- rule85 = \ ((!_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# NOINLINE[1] rule86 #-}- rule86 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq- {-# NOINLINE[1] rule87 #-}- rule87 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers---- Nonterminals --------------------------------------------------- wrapper-data Inh_Nonterminals = Inh_Nonterminals { aroundsIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), augmentsIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), cr_Inh_Nonterminals :: !(Bool), inhMap_Inh_Nonterminals :: !(Map Identifier Attributes), manualAttrOrderMap_Inh_Nonterminals :: !(AttrOrderMap), mergesIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))), nonterminals_Inh_Nonterminals :: !(Set NontermIdent), o_rename_Inh_Nonterminals :: !(Bool), options_Inh_Nonterminals :: !(Options), synMap_Inh_Nonterminals :: !(Map Identifier Attributes), typeSyns_Inh_Nonterminals :: !(TypeSyns), uniq_Inh_Nonterminals :: !(Int), useMap_Inh_Nonterminals :: !(UseMap), wrappers_Inh_Nonterminals :: !(Set NontermIdent) }-data Syn_Nonterminals = Syn_Nonterminals { collect_nts_Syn_Nonterminals :: !(Set NontermIdent), errors_Syn_Nonterminals :: !(Seq Error), inhMap'_Syn_Nonterminals :: !(Map Identifier Attributes), output_Syn_Nonterminals :: !(Nonterminals), synMap'_Syn_Nonterminals :: !(Map Identifier Attributes), uniq_Syn_Nonterminals :: !(Int) }-{-# INLINABLE wrap_Nonterminals #-}-wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> (Syn_Nonterminals )-wrap_Nonterminals !(T_Nonterminals act) !(Inh_Nonterminals _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Nonterminals_vIn4 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers- !(T_Nonterminals_vOut4 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq) <- return (inv_Nonterminals_s8 sem K_Nonterminals_v4 arg)- return (Syn_Nonterminals _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq)- )---- cata-{-# NOINLINE sem_Nonterminals #-}-sem_Nonterminals :: Nonterminals -> T_Nonterminals -sem_Nonterminals list = Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list)---- semantic domain-newtype T_Nonterminals = T_Nonterminals {- attach_T_Nonterminals :: Identity (T_Nonterminals_s8 )- }-data T_Nonterminals_s8 where C_Nonterminals_s8 :: {- inv_Nonterminals_s8 :: !(forall t. K_Nonterminals_s8 t -> t)- } -> T_Nonterminals_s8 -data T_Nonterminals_s9 = C_Nonterminals_s9-data T_Nonterminals_s28 where C_Nonterminals_s28 :: {- inv_Nonterminals_s28 :: !(forall t. K_Nonterminals_s28 t -> t)- } -> T_Nonterminals_s28 -data T_Nonterminals_s29 = C_Nonterminals_s29-newtype T_Nonterminals_s32 = C_Nonterminals_s32 {- inv_Nonterminals_s32 :: (T_Nonterminals_v20 )- }-data T_Nonterminals_s33 = C_Nonterminals_s33-newtype T_Nonterminals_s45 = C_Nonterminals_s45 {- inv_Nonterminals_s45 :: (T_Nonterminals_v35 )- }-data K_Nonterminals_s8 k where- K_Nonterminals_v4 :: K_Nonterminals_s8 (T_Nonterminals_v4 )- K_Nonterminals_v15 :: K_Nonterminals_s8 (T_Nonterminals_v15 )- K_Nonterminals_v19 :: K_Nonterminals_s8 (T_Nonterminals_v19 )-data K_Nonterminals_s28 k where- K_Nonterminals_v16 :: K_Nonterminals_s28 (T_Nonterminals_v16 )- K_Nonterminals_v34 :: K_Nonterminals_s28 (T_Nonterminals_v34 )-type T_Nonterminals_v4 = (T_Nonterminals_vIn4 ) -> (T_Nonterminals_vOut4 )-data T_Nonterminals_vIn4 = T_Nonterminals_vIn4 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Set NontermIdent) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)-data T_Nonterminals_vOut4 = T_Nonterminals_vOut4 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Nonterminals) !(Map Identifier Attributes) !(Int)-type T_Nonterminals_v15 = (T_Nonterminals_vIn15 ) -> (T_Nonterminals_vOut15 )-data T_Nonterminals_vIn15 = T_Nonterminals_vIn15 -data T_Nonterminals_vOut15 = T_Nonterminals_vOut15 !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminals_s28 )-type T_Nonterminals_v16 = (T_Nonterminals_vIn16 ) -> (T_Nonterminals_vOut16 )-data T_Nonterminals_vIn16 = T_Nonterminals_vIn16 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)-data T_Nonterminals_vOut16 = T_Nonterminals_vOut16 !(Seq Error) !(Nonterminals) !(Int)-type T_Nonterminals_v19 = (T_Nonterminals_vIn19 ) -> (T_Nonterminals_vOut19 )-data T_Nonterminals_vIn19 = T_Nonterminals_vIn19 !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)-data T_Nonterminals_vOut19 = T_Nonterminals_vOut19 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminals_s32 )-type T_Nonterminals_v20 = (T_Nonterminals_vIn20 ) -> (T_Nonterminals_vOut20 )-data T_Nonterminals_vIn20 = T_Nonterminals_vIn20 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)-data T_Nonterminals_vOut20 = T_Nonterminals_vOut20 !(Nonterminals) !(Int)-type T_Nonterminals_v34 = (T_Nonterminals_vIn34 ) -> (T_Nonterminals_vOut34 )-data T_Nonterminals_vIn34 = T_Nonterminals_vIn34 !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)-data T_Nonterminals_vOut34 = T_Nonterminals_vOut34 !(Seq Error) !(T_Nonterminals_s45 )-type T_Nonterminals_v35 = (T_Nonterminals_vIn35 ) -> (T_Nonterminals_vOut35 )-data T_Nonterminals_vIn35 = T_Nonterminals_vIn35 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)-data T_Nonterminals_vOut35 = T_Nonterminals_vOut35 !(Nonterminals) !(Int)-{-# NOINLINE sem_Nonterminals_Cons #-}-sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals -sem_Nonterminals_Cons arg_hd_ arg_tl_ = T_Nonterminals (return st8) where- {-# NOINLINE st8 #-}- !st8 = let- k8 :: K_Nonterminals_s8 t -> t- k8 K_Nonterminals_v4 = v4- k8 K_Nonterminals_v15 = v15- k8 K_Nonterminals_v19 = v19- v4 :: T_Nonterminals_v4 - v4 = \ !(T_Nonterminals_vIn4 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_hdX6 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_)) in- let !_tlX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_)) in- let !_hdOcr = rule97 _lhsIcr in- let !_hdOinhMap = rule98 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule99 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule100 _lhsImergesIn in- let !_hdOo_rename = rule102 _lhsIo_rename in- let !_hdOoptions = rule103 _lhsIoptions in- let !_hdOsynMap = rule104 _lhsIsynMap in- let !_hdOtypeSyns = rule105 _lhsItypeSyns in- let !_hdOuseMap = rule107 _lhsIuseMap in- let !_hdOwrappers = rule108 _lhsIwrappers in- let !_tlOcr = rule111 _lhsIcr in- let !_tlOinhMap = rule112 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule113 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule114 _lhsImergesIn in- let !_tlOo_rename = rule116 _lhsIo_rename in- let !_tlOoptions = rule117 _lhsIoptions in- let !_tlOsynMap = rule118 _lhsIsynMap in- let !_tlOtypeSyns = rule119 _lhsItypeSyns in- let !_tlOuseMap = rule121 _lhsIuseMap in- let !_tlOwrappers = rule122 _lhsIwrappers in- let !_hdOaroundsIn = rule95 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule96 _lhsIaugmentsIn in- let !_hdOuniq = rule106 _lhsIuniq in- let !_tlOaroundsIn = rule109 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule110 _lhsIaugmentsIn in- let !(T_Nonterminal_vOut18 _hdIcollect_nts _hdIerrors _hdIinhMap' _hdIoutput _hdIsynMap' _hdIuniq) = inv_Nonterminal_s6 _hdX6 K_Nonterminal_v18 (T_Nonterminal_vIn18 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in- let !(T_Nonterminals_vOut19 _tlIcollect_nts _tlIerrors _tlIinhMap' _tlIsynMap' _tlX32) = inv_Nonterminals_s8 _tlX8 K_Nonterminals_v19 (T_Nonterminals_vIn19 _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule88 _hdIcollect_nts _tlIcollect_nts in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule89 _hdIerrors _tlIerrors in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule90 _hdIinhMap' _tlIinhMap' in- let !_tlOuniq = rule120 _hdIuniq in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule91 _hdIsynMap' _tlIsynMap' in- let !(T_Nonterminals_vOut20 _tlIoutput _tlIuniq) = inv_Nonterminals_s32 _tlX32 (T_Nonterminals_vIn20 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in- let !_output = rule92 _hdIoutput _tlIoutput in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule93 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule94 _tlIuniq in- let !__result_ = T_Nonterminals_vOut4 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq- in __result_ )- v15 :: T_Nonterminals_v15 - v15 = \ !(T_Nonterminals_vIn15 ) -> (- let !_hdX6 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_)) in- let !_tlX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_)) in- let !(T_Nonterminal_vOut32 _hdIinhMap' _hdIsynMap' _hdX43) = inv_Nonterminal_s6 _hdX6 K_Nonterminal_v32 (T_Nonterminal_vIn32 ) in- let !(T_Nonterminals_vOut15 _tlIinhMap' _tlIsynMap' _tlX28) = inv_Nonterminals_s8 _tlX8 K_Nonterminals_v15 (T_Nonterminals_vIn15 ) in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule90 _hdIinhMap' _tlIinhMap' in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule91 _hdIsynMap' _tlIsynMap' in- let !__st_ = st28 _hdX43 _tlX28- !__result_ = T_Nonterminals_vOut15 _lhsOinhMap' _lhsOsynMap' __st_- in __result_ )- v19 :: T_Nonterminals_v19 - v19 = \ !(T_Nonterminals_vIn19 _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let !_hdX6 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_)) in- let !_tlX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_)) in- let !_hdOcr = rule97 _lhsIcr in- let !_hdOinhMap = rule98 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule99 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule100 _lhsImergesIn in- let !_hdOo_rename = rule102 _lhsIo_rename in- let !_hdOoptions = rule103 _lhsIoptions in- let !_hdOsynMap = rule104 _lhsIsynMap in- let !_hdOtypeSyns = rule105 _lhsItypeSyns in- let !_hdOuseMap = rule107 _lhsIuseMap in- let !_hdOwrappers = rule108 _lhsIwrappers in- let !_tlOcr = rule111 _lhsIcr in- let !_tlOinhMap = rule112 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule113 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule114 _lhsImergesIn in- let !_tlOo_rename = rule116 _lhsIo_rename in- let !_tlOoptions = rule117 _lhsIoptions in- let !_tlOsynMap = rule118 _lhsIsynMap in- let !_tlOtypeSyns = rule119 _lhsItypeSyns in- let !_tlOuseMap = rule121 _lhsIuseMap in- let !_tlOwrappers = rule122 _lhsIwrappers in- let !(T_Nonterminal_vOut36 _hdIcollect_nts _hdIerrors _hdIinhMap' _hdIsynMap' _hdX46) = inv_Nonterminal_s6 _hdX6 K_Nonterminal_v36 (T_Nonterminal_vIn36 _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuseMap _hdOwrappers) in- let !(T_Nonterminals_vOut19 _tlIcollect_nts _tlIerrors _tlIinhMap' _tlIsynMap' _tlX32) = inv_Nonterminals_s8 _tlX8 K_Nonterminals_v19 (T_Nonterminals_vIn19 _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule88 _hdIcollect_nts _tlIcollect_nts in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule89 _hdIerrors _tlIerrors in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule90 _hdIinhMap' _tlIinhMap' in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule91 _hdIsynMap' _tlIsynMap' in- let !__st_ = st32 _hdX46 _tlX32- !__result_ = T_Nonterminals_vOut19 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOsynMap' __st_- in __result_ )- in C_Nonterminals_s8 k8- {-# NOINLINE st28 #-}- st28 = \ !_hdX43 !_tlX28 -> let- k28 :: K_Nonterminals_s28 t -> t- k28 K_Nonterminals_v16 = v16- k28 K_Nonterminals_v34 = v34- v16 :: T_Nonterminals_v16 - v16 = \ !(T_Nonterminals_vIn16 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_hdOcr = rule97 _lhsIcr in- let !_hdOinhMap = rule98 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule99 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule100 _lhsImergesIn in- let !_hdOo_rename = rule102 _lhsIo_rename in- let !_hdOoptions = rule103 _lhsIoptions in- let !_hdOsynMap = rule104 _lhsIsynMap in- let !_hdOtypeSyns = rule105 _lhsItypeSyns in- let !_hdOuseMap = rule107 _lhsIuseMap in- let !_hdOwrappers = rule108 _lhsIwrappers in- let !_tlOcr = rule111 _lhsIcr in- let !_tlOinhMap = rule112 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule113 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule114 _lhsImergesIn in- let !_tlOo_rename = rule116 _lhsIo_rename in- let !_tlOoptions = rule117 _lhsIoptions in- let !_tlOsynMap = rule118 _lhsIsynMap in- let !_tlOtypeSyns = rule119 _lhsItypeSyns in- let !_tlOuseMap = rule121 _lhsIuseMap in- let !_tlOwrappers = rule122 _lhsIwrappers in- let !_hdOaroundsIn = rule95 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule96 _lhsIaugmentsIn in- let !_hdOuniq = rule106 _lhsIuniq in- let !_tlOaroundsIn = rule109 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule110 _lhsIaugmentsIn in- let !(T_Nonterminal_vOut33 _hdIerrors _hdIoutput _hdIuniq) = inv_Nonterminal_s43 _hdX43 K_Nonterminal_v33 (T_Nonterminal_vIn33 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in- let !(T_Nonterminals_vOut34 _tlIerrors _tlX45) = inv_Nonterminals_s28 _tlX28 K_Nonterminals_v34 (T_Nonterminals_vIn34 _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule89 _hdIerrors _tlIerrors in- let !_tlOuniq = rule120 _hdIuniq in- let !(T_Nonterminals_vOut35 _tlIoutput _tlIuniq) = inv_Nonterminals_s45 _tlX45 (T_Nonterminals_vIn35 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in- let !_output = rule92 _hdIoutput _tlIoutput in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule93 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule94 _tlIuniq in- let !__result_ = T_Nonterminals_vOut16 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v34 :: T_Nonterminals_v34 - v34 = \ !(T_Nonterminals_vIn34 _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let !_hdOcr = rule97 _lhsIcr in- let !_hdOinhMap = rule98 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule99 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule100 _lhsImergesIn in- let !_hdOo_rename = rule102 _lhsIo_rename in- let !_hdOoptions = rule103 _lhsIoptions in- let !_hdOsynMap = rule104 _lhsIsynMap in- let !_hdOtypeSyns = rule105 _lhsItypeSyns in- let !_hdOuseMap = rule107 _lhsIuseMap in- let !_hdOwrappers = rule108 _lhsIwrappers in- let !_tlOcr = rule111 _lhsIcr in- let !_tlOinhMap = rule112 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule113 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule114 _lhsImergesIn in- let !_tlOo_rename = rule116 _lhsIo_rename in- let !_tlOoptions = rule117 _lhsIoptions in- let !_tlOsynMap = rule118 _lhsIsynMap in- let !_tlOtypeSyns = rule119 _lhsItypeSyns in- let !_tlOuseMap = rule121 _lhsIuseMap in- let !_tlOwrappers = rule122 _lhsIwrappers in- let !(T_Nonterminal_vOut45 _hdIerrors _hdX52) = inv_Nonterminal_s43 _hdX43 K_Nonterminal_v45 (T_Nonterminal_vIn45 _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuseMap _hdOwrappers) in- let !(T_Nonterminals_vOut34 _tlIerrors _tlX45) = inv_Nonterminals_s28 _tlX28 K_Nonterminals_v34 (T_Nonterminals_vIn34 _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule89 _hdIerrors _tlIerrors in- let !__st_ = st45 _hdX52 _tlX45- !__result_ = T_Nonterminals_vOut34 _lhsOerrors __st_- in __result_ )- in C_Nonterminals_s28 k28- {-# NOINLINE st32 #-}- st32 = \ !_hdX46 !_tlX32 -> let- v20 :: T_Nonterminals_v20 - v20 = \ !(T_Nonterminals_vIn20 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (- let !_hdOaroundsIn = rule95 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule96 _lhsIaugmentsIn in- let !_hdOuniq = rule106 _lhsIuniq in- let !_tlOaroundsIn = rule109 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule110 _lhsIaugmentsIn in- let !(T_Nonterminal_vOut37 _hdIoutput _hdIuniq) = inv_Nonterminal_s46 _hdX46 (T_Nonterminal_vIn37 _hdOaroundsIn _hdOaugmentsIn _hdOuniq) in- let !_tlOuniq = rule120 _hdIuniq in- let !(T_Nonterminals_vOut20 _tlIoutput _tlIuniq) = inv_Nonterminals_s32 _tlX32 (T_Nonterminals_vIn20 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in- let !_output = rule92 _hdIoutput _tlIoutput in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule93 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule94 _tlIuniq in- let !__result_ = T_Nonterminals_vOut20 _lhsOoutput _lhsOuniq- in __result_ )- in C_Nonterminals_s32 v20- {-# NOINLINE st45 #-}- st45 = \ !_hdX52 !_tlX45 -> let- v35 :: T_Nonterminals_v35 - v35 = \ !(T_Nonterminals_vIn35 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (- let !_hdOaroundsIn = rule95 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule96 _lhsIaugmentsIn in- let !_hdOuniq = rule106 _lhsIuniq in- let !_tlOaroundsIn = rule109 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule110 _lhsIaugmentsIn in- let !(T_Nonterminal_vOut46 _hdIoutput _hdIuniq) = inv_Nonterminal_s52 _hdX52 (T_Nonterminal_vIn46 _hdOaroundsIn _hdOaugmentsIn _hdOuniq) in- let !_tlOuniq = rule120 _hdIuniq in- let !(T_Nonterminals_vOut35 _tlIoutput _tlIuniq) = inv_Nonterminals_s45 _tlX45 (T_Nonterminals_vIn35 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in- let !_output = rule92 _hdIoutput _tlIoutput in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule93 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule94 _tlIuniq in- let !__result_ = T_Nonterminals_vOut35 _lhsOoutput _lhsOuniq- in __result_ )- in C_Nonterminals_s45 v35- {-# NOINLINE[1] rule88 #-}- rule88 = \ ((!_hdIcollect_nts) :: Set NontermIdent) ((!_tlIcollect_nts) :: Set NontermIdent) ->- _hdIcollect_nts `Set.union` _tlIcollect_nts- {-# NOINLINE[1] rule89 #-}- rule89 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# NOINLINE[1] rule90 #-}- rule90 = \ ((!_hdIinhMap') :: Map Identifier Attributes) ((!_tlIinhMap') :: Map Identifier Attributes) ->- _hdIinhMap' `Map.union` _tlIinhMap'- {-# NOINLINE[1] rule91 #-}- rule91 = \ ((!_hdIsynMap') :: Map Identifier Attributes) ((!_tlIsynMap') :: Map Identifier Attributes) ->- _hdIsynMap' `Map.union` _tlIsynMap'- {-# NOINLINE[1] rule92 #-}- rule92 = \ ((!_hdIoutput) :: Nonterminal) ((!_tlIoutput) :: Nonterminals) ->- (:) _hdIoutput _tlIoutput- {-# NOINLINE[1] rule93 #-}- rule93 = \ !_output ->- _output- {-# NOINLINE[1] rule94 #-}- rule94 = \ ((!_tlIuniq) :: Int) ->- _tlIuniq- {-# NOINLINE[1] rule95 #-}- rule95 = \ ((!_lhsIaroundsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- _lhsIaroundsIn- {-# NOINLINE[1] rule96 #-}- rule96 = \ ((!_lhsIaugmentsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- _lhsIaugmentsIn- {-# NOINLINE[1] rule97 #-}- rule97 = \ ((!_lhsIcr) :: Bool) ->- _lhsIcr- {-# NOINLINE[1] rule98 #-}- rule98 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule99 #-}- rule99 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->- _lhsImanualAttrOrderMap- {-# NOINLINE[1] rule100 #-}- rule100 = \ ((!_lhsImergesIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->- _lhsImergesIn- {-# NOINLINE[1] rule102 #-}- rule102 = \ ((!_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# NOINLINE[1] rule103 #-}- rule103 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule104 #-}- rule104 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule105 #-}- rule105 = \ ((!_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# NOINLINE[1] rule106 #-}- rule106 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq- {-# NOINLINE[1] rule107 #-}- rule107 = \ ((!_lhsIuseMap) :: UseMap) ->- _lhsIuseMap- {-# NOINLINE[1] rule108 #-}- rule108 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# NOINLINE[1] rule109 #-}- rule109 = \ ((!_lhsIaroundsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- _lhsIaroundsIn- {-# NOINLINE[1] rule110 #-}- rule110 = \ ((!_lhsIaugmentsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- _lhsIaugmentsIn- {-# NOINLINE[1] rule111 #-}- rule111 = \ ((!_lhsIcr) :: Bool) ->- _lhsIcr- {-# NOINLINE[1] rule112 #-}- rule112 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule113 #-}- rule113 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->- _lhsImanualAttrOrderMap- {-# NOINLINE[1] rule114 #-}- rule114 = \ ((!_lhsImergesIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->- _lhsImergesIn- {-# NOINLINE[1] rule116 #-}- rule116 = \ ((!_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# NOINLINE[1] rule117 #-}- rule117 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule118 #-}- rule118 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule119 #-}- rule119 = \ ((!_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# NOINLINE[1] rule120 #-}- rule120 = \ ((!_hdIuniq) :: Int) ->- _hdIuniq- {-# NOINLINE[1] rule121 #-}- rule121 = \ ((!_lhsIuseMap) :: UseMap) ->- _lhsIuseMap- {-# NOINLINE[1] rule122 #-}- rule122 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_Nonterminals_Nil #-}-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil = T_Nonterminals (return st8) where- {-# NOINLINE st8 #-}- !st8 = let- k8 :: K_Nonterminals_s8 t -> t- k8 K_Nonterminals_v4 = v4- k8 K_Nonterminals_v15 = v15- k8 K_Nonterminals_v19 = v19- v4 :: T_Nonterminals_v4 - v4 = \ !(T_Nonterminals_vIn4 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule123 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule124 () in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule125 () in- let !_output = rule127 () in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule126 () in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule128 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule129 _lhsIuniq in- let !__result_ = T_Nonterminals_vOut4 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq- in __result_ )- v15 :: T_Nonterminals_v15 - v15 = \ !(T_Nonterminals_vIn15 ) -> (- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule125 () in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule126 () in- let !__st_ = st28 ()- !__result_ = T_Nonterminals_vOut15 _lhsOinhMap' _lhsOsynMap' __st_- in __result_ )- v19 :: T_Nonterminals_v19 - v19 = \ !(T_Nonterminals_vIn19 _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let _lhsOcollect_nts :: Set NontermIdent- !_lhsOcollect_nts = rule123 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule124 () in- let _lhsOinhMap' :: Map Identifier Attributes- !_lhsOinhMap' = rule125 () in- let _lhsOsynMap' :: Map Identifier Attributes- !_lhsOsynMap' = rule126 () in- let !__st_ = st32 ()- !__result_ = T_Nonterminals_vOut19 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOsynMap' __st_- in __result_ )- in C_Nonterminals_s8 k8- {-# NOINLINE st28 #-}- st28 = \ (_ :: ()) -> let- k28 :: K_Nonterminals_s28 t -> t- k28 K_Nonterminals_v16 = v16- k28 K_Nonterminals_v34 = v34- v16 :: T_Nonterminals_v16 - v16 = \ !(T_Nonterminals_vIn16 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule124 () in- let !_output = rule127 () in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule128 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule129 _lhsIuniq in- let !__result_ = T_Nonterminals_vOut16 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v34 :: T_Nonterminals_v34 - v34 = \ !(T_Nonterminals_vIn34 _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule124 () in- let !__st_ = st45 ()- !__result_ = T_Nonterminals_vOut34 _lhsOerrors __st_- in __result_ )- in C_Nonterminals_s28 k28- {-# NOINLINE st32 #-}- st32 = \ (_ :: ()) -> let- v20 :: T_Nonterminals_v20 - v20 = \ !(T_Nonterminals_vIn20 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (- let !_output = rule127 () in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule128 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule129 _lhsIuniq in- let !__result_ = T_Nonterminals_vOut20 _lhsOoutput _lhsOuniq- in __result_ )- in C_Nonterminals_s32 v20- {-# NOINLINE st45 #-}- st45 = \ (_ :: ()) -> let- v35 :: T_Nonterminals_v35 - v35 = \ !(T_Nonterminals_vIn35 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (- let !_output = rule127 () in- let _lhsOoutput :: Nonterminals- !_lhsOoutput = rule128 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule129 _lhsIuniq in- let !__result_ = T_Nonterminals_vOut35 _lhsOoutput _lhsOuniq- in __result_ )- in C_Nonterminals_s45 v35- {-# NOINLINE[1] rule123 #-}- rule123 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule124 #-}- rule124 = \ (_ :: ()) ->- Seq.empty- {-# NOINLINE[1] rule125 #-}- rule125 = \ (_ :: ()) ->- Map.empty- {-# NOINLINE[1] rule126 #-}- rule126 = \ (_ :: ()) ->- Map.empty- {-# NOINLINE[1] rule127 #-}- rule127 = \ (_ :: ()) ->- []- {-# NOINLINE[1] rule128 #-}- rule128 = \ !_output ->- _output- {-# NOINLINE[1] rule129 #-}- rule129 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq---- Pattern -------------------------------------------------------- wrapper-data Inh_Pattern = Inh_Pattern { con_Inh_Pattern :: !(ConstructorIdent), nt_Inh_Pattern :: !(NontermIdent) }-data Syn_Pattern = Syn_Pattern { containsVars_Syn_Pattern :: !(Bool), copy_Syn_Pattern :: !(Pattern), definedAttrs_Syn_Pattern :: !(Set (Identifier,Identifier)), errors_Syn_Pattern :: !(Seq Error), locals_Syn_Pattern :: !(Set Identifier), output_Syn_Pattern :: !(Pattern) }-{-# INLINABLE wrap_Pattern #-}-wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )-wrap_Pattern !(T_Pattern act) !(Inh_Pattern _lhsIcon _lhsInt) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Pattern_vIn5 _lhsIcon _lhsInt- !(T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput) <- return (inv_Pattern_s10 sem K_Pattern_v5 arg)- return (Syn_Pattern _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput)- )---- cata-{-# NOINLINE sem_Pattern #-}-sem_Pattern :: Pattern -> T_Pattern -sem_Pattern ( Constr !name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )-sem_Pattern ( Product !pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )-sem_Pattern ( Alias !field_ !attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )-sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )-sem_Pattern ( Underscore !pos_ ) = sem_Pattern_Underscore pos_---- semantic domain-newtype T_Pattern = T_Pattern {- attach_T_Pattern :: Identity (T_Pattern_s10 )- }-data T_Pattern_s10 where C_Pattern_s10 :: {- inv_Pattern_s10 :: !(forall t. K_Pattern_s10 t -> t)- } -> T_Pattern_s10 -data T_Pattern_s11 = C_Pattern_s11-data T_Pattern_s35 = C_Pattern_s35-data T_Pattern_s36 = C_Pattern_s36-data T_Pattern_s40 = C_Pattern_s40-data T_Pattern_s50 = C_Pattern_s50-data T_Pattern_s55 where C_Pattern_s55 :: {- inv_Pattern_s55 :: !(forall t. K_Pattern_s55 t -> t)- } -> T_Pattern_s55 -data K_Pattern_s10 k where- K_Pattern_v5 :: K_Pattern_s10 (T_Pattern_v5 )- K_Pattern_v22 :: K_Pattern_s10 (T_Pattern_v22 )- K_Pattern_v23 :: K_Pattern_s10 (T_Pattern_v23 )- K_Pattern_v28 :: K_Pattern_s10 (T_Pattern_v28 )- K_Pattern_v42 :: K_Pattern_s10 (T_Pattern_v42 )- K_Pattern_v50 :: K_Pattern_s10 (T_Pattern_v50 )-data K_Pattern_s55 k where- K_Pattern_v51 :: K_Pattern_s55 (T_Pattern_v51 )- K_Pattern_v56 :: K_Pattern_s55 (T_Pattern_v56 )-type T_Pattern_v5 = (T_Pattern_vIn5 ) -> (T_Pattern_vOut5 )-data T_Pattern_vIn5 = T_Pattern_vIn5 !(ConstructorIdent) !(NontermIdent)-data T_Pattern_vOut5 = T_Pattern_vOut5 !(Bool) !(Pattern) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)-type T_Pattern_v22 = (T_Pattern_vIn22 ) -> (T_Pattern_vOut22 )-data T_Pattern_vIn22 = T_Pattern_vIn22 -data T_Pattern_vOut22 = T_Pattern_vOut22 !(Pattern) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)-type T_Pattern_v23 = (T_Pattern_vIn23 ) -> (T_Pattern_vOut23 )-data T_Pattern_vIn23 = T_Pattern_vIn23 -data T_Pattern_vOut23 = T_Pattern_vOut23 !(Bool) !(Pattern) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)-type T_Pattern_v28 = (T_Pattern_vIn28 ) -> (T_Pattern_vOut28 )-data T_Pattern_vIn28 = T_Pattern_vIn28 -data T_Pattern_vOut28 = T_Pattern_vOut28 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)-type T_Pattern_v42 = (T_Pattern_vIn42 ) -> (T_Pattern_vOut42 )-data T_Pattern_vIn42 = T_Pattern_vIn42 -data T_Pattern_vOut42 = T_Pattern_vOut42 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)-type T_Pattern_v50 = (T_Pattern_vIn50 ) -> (T_Pattern_vOut50 )-data T_Pattern_vIn50 = T_Pattern_vIn50 -data T_Pattern_vOut50 = T_Pattern_vOut50 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(T_Pattern_s55 )-type T_Pattern_v51 = (T_Pattern_vIn51 ) -> (T_Pattern_vOut51 )-data T_Pattern_vIn51 = T_Pattern_vIn51 -data T_Pattern_vOut51 = T_Pattern_vOut51 !(Bool) !(Pattern)-type T_Pattern_v56 = (T_Pattern_vIn56 ) -> (T_Pattern_vOut56 )-data T_Pattern_vIn56 = T_Pattern_vIn56 -data T_Pattern_vOut56 = T_Pattern_vOut56 !(Pattern)-{-# NOINLINE sem_Pattern_Constr #-}-sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern -sem_Pattern_Constr !arg_name_ arg_pats_ = T_Pattern (return st10) where- {-# NOINLINE st10 #-}- !st10 = let- k10 :: K_Pattern_s10 t -> t- k10 K_Pattern_v5 = v5- k10 K_Pattern_v22 = v22- k10 K_Pattern_v23 = v23- k10 K_Pattern_v28 = v28- k10 K_Pattern_v42 = v42- k10 K_Pattern_v50 = v50- v5 :: T_Pattern_v5 - v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule130 _patsIcontainsVars in- let !_copy = rule134 _patsIcopy arg_name_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule136 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule131 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule132 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule133 _patsIlocals in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v22 :: T_Pattern_v22 - v22 = \ !(T_Pattern_vIn22 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut38 _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v38 (T_Patterns_vIn38 ) in- let !_copy = rule134 _patsIcopy arg_name_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule136 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule131 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule132 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule133 _patsIlocals in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v23 :: T_Pattern_v23 - v23 = \ !(T_Pattern_vIn23 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule130 _patsIcontainsVars in- let !_copy = rule134 _patsIcopy arg_name_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule136 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule131 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule132 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule133 _patsIlocals in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v28 :: T_Pattern_v28 - v28 = \ !(T_Pattern_vIn28 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut41 _patsIcontainsVars _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v41 (T_Patterns_vIn41 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule130 _patsIcontainsVars in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule131 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule132 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule133 _patsIlocals in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v42 :: T_Pattern_v42 - v42 = \ !(T_Pattern_vIn42 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut49 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v49 (T_Patterns_vIn49 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule131 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule132 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule133 _patsIlocals in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v50 :: T_Pattern_v50 - v50 = \ !(T_Pattern_vIn50 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut54 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsX57) = inv_Patterns_s12 _patsX12 K_Patterns_v54 (T_Patterns_vIn54 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule131 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule132 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule133 _patsIlocals in- let !__st_ = st55 _patsX57- !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Pattern_s10 k10- {-# NOINLINE st55 #-}- st55 = \ !_patsX57 -> let- k55 :: K_Pattern_s55 t -> t- k55 K_Pattern_v51 = v51- k55 K_Pattern_v56 = v56- v51 :: T_Pattern_v51 - v51 = \ !(T_Pattern_vIn51 ) -> (- let !(T_Patterns_vOut55 _patsIcontainsVars _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v55 (T_Patterns_vIn55 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule130 _patsIcontainsVars in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput- in __result_ )- v56 :: T_Pattern_v56 - v56 = \ !(T_Pattern_vIn56 ) -> (- let !(T_Patterns_vOut57 _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v57 (T_Patterns_vIn57 ) in- let !_output = rule135 _patsIoutput arg_name_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule137 _output in- let !__result_ = T_Pattern_vOut56 _lhsOoutput- in __result_ )- in C_Pattern_s55 k55- {-# NOINLINE[1] rule130 #-}- rule130 = \ ((!_patsIcontainsVars) :: Bool) ->- _patsIcontainsVars- {-# NOINLINE[1] rule131 #-}- rule131 = \ ((!_patsIdefinedAttrs) :: Set (Identifier,Identifier)) ->- _patsIdefinedAttrs- {-# NOINLINE[1] rule132 #-}- rule132 = \ ((!_patsIerrors) :: Seq Error) ->- _patsIerrors- {-# NOINLINE[1] rule133 #-}- rule133 = \ ((!_patsIlocals) :: Set Identifier) ->- _patsIlocals- {-# NOINLINE[1] rule134 #-}- rule134 = \ ((!_patsIcopy) :: Patterns) !name_ ->- Constr name_ _patsIcopy- {-# NOINLINE[1] rule135 #-}- rule135 = \ ((!_patsIoutput) :: Patterns) !name_ ->- Constr name_ _patsIoutput- {-# NOINLINE[1] rule136 #-}- rule136 = \ !_copy ->- _copy- {-# NOINLINE[1] rule137 #-}- rule137 = \ !_output ->- _output-{-# NOINLINE sem_Pattern_Product #-}-sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern -sem_Pattern_Product !arg_pos_ arg_pats_ = T_Pattern (return st10) where- {-# NOINLINE st10 #-}- !st10 = let- k10 :: K_Pattern_s10 t -> t- k10 K_Pattern_v5 = v5- k10 K_Pattern_v22 = v22- k10 K_Pattern_v23 = v23- k10 K_Pattern_v28 = v28- k10 K_Pattern_v42 = v42- k10 K_Pattern_v50 = v50- v5 :: T_Pattern_v5 - v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule140 _patsIcontainsVars in- let !_copy = rule144 _patsIcopy arg_pos_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule146 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule141 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule142 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule143 _patsIlocals in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v22 :: T_Pattern_v22 - v22 = \ !(T_Pattern_vIn22 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut38 _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v38 (T_Patterns_vIn38 ) in- let !_copy = rule144 _patsIcopy arg_pos_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule146 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule141 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule142 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule143 _patsIlocals in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v23 :: T_Pattern_v23 - v23 = \ !(T_Pattern_vIn23 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule140 _patsIcontainsVars in- let !_copy = rule144 _patsIcopy arg_pos_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule146 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule141 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule142 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule143 _patsIlocals in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v28 :: T_Pattern_v28 - v28 = \ !(T_Pattern_vIn28 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut41 _patsIcontainsVars _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v41 (T_Patterns_vIn41 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule140 _patsIcontainsVars in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule141 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule142 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule143 _patsIlocals in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v42 :: T_Pattern_v42 - v42 = \ !(T_Pattern_vIn42 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut49 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v49 (T_Patterns_vIn49 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule141 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule142 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule143 _patsIlocals in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v50 :: T_Pattern_v50 - v50 = \ !(T_Pattern_vIn50 ) -> (- let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in- let !(T_Patterns_vOut54 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsX57) = inv_Patterns_s12 _patsX12 K_Patterns_v54 (T_Patterns_vIn54 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule141 _patsIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule142 _patsIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule143 _patsIlocals in- let !__st_ = st55 _patsX57- !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Pattern_s10 k10- {-# NOINLINE st55 #-}- st55 = \ !_patsX57 -> let- k55 :: K_Pattern_s55 t -> t- k55 K_Pattern_v51 = v51- k55 K_Pattern_v56 = v56- v51 :: T_Pattern_v51 - v51 = \ !(T_Pattern_vIn51 ) -> (- let !(T_Patterns_vOut55 _patsIcontainsVars _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v55 (T_Patterns_vIn55 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule140 _patsIcontainsVars in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput- in __result_ )- v56 :: T_Pattern_v56 - v56 = \ !(T_Pattern_vIn56 ) -> (- let !(T_Patterns_vOut57 _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v57 (T_Patterns_vIn57 ) in- let !_output = rule145 _patsIoutput arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule147 _output in- let !__result_ = T_Pattern_vOut56 _lhsOoutput- in __result_ )- in C_Pattern_s55 k55- {-# NOINLINE[1] rule140 #-}- rule140 = \ ((!_patsIcontainsVars) :: Bool) ->- _patsIcontainsVars- {-# NOINLINE[1] rule141 #-}- rule141 = \ ((!_patsIdefinedAttrs) :: Set (Identifier,Identifier)) ->- _patsIdefinedAttrs- {-# NOINLINE[1] rule142 #-}- rule142 = \ ((!_patsIerrors) :: Seq Error) ->- _patsIerrors- {-# NOINLINE[1] rule143 #-}- rule143 = \ ((!_patsIlocals) :: Set Identifier) ->- _patsIlocals- {-# NOINLINE[1] rule144 #-}- rule144 = \ ((!_patsIcopy) :: Patterns) !pos_ ->- Product pos_ _patsIcopy- {-# NOINLINE[1] rule145 #-}- rule145 = \ ((!_patsIoutput) :: Patterns) !pos_ ->- Product pos_ _patsIoutput- {-# NOINLINE[1] rule146 #-}- rule146 = \ !_copy ->- _copy- {-# NOINLINE[1] rule147 #-}- rule147 = \ !_output ->- _output-{-# NOINLINE sem_Pattern_Alias #-}-sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern -sem_Pattern_Alias !arg_field_ !arg_attr_ arg_pat_ = T_Pattern (return st10) where- {-# NOINLINE st10 #-}- !st10 = let- k10 :: K_Pattern_s10 t -> t- k10 K_Pattern_v5 = v5- k10 K_Pattern_v22 = v22- k10 K_Pattern_v23 = v23- k10 K_Pattern_v28 = v28- k10 K_Pattern_v42 = v42- k10 K_Pattern_v50 = v50- v5 :: T_Pattern_v5 - v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule152 () in- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in- let !_copy = rule154 _patIcopy arg_attr_ arg_field_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule156 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule150 _patIdefinedAttrs arg_attr_ arg_field_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule153 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule151 _patIlocals arg_attr_ arg_field_ in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v22 :: T_Pattern_v22 - v22 = \ !(T_Pattern_vIn22 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in- let !_copy = rule154 _patIcopy arg_attr_ arg_field_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule156 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule150 _patIdefinedAttrs arg_attr_ arg_field_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule153 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule151 _patIlocals arg_attr_ arg_field_ in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v23 :: T_Pattern_v23 - v23 = \ !(T_Pattern_vIn23 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule152 () in- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in- let !_copy = rule154 _patIcopy arg_attr_ arg_field_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule156 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule150 _patIdefinedAttrs arg_attr_ arg_field_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule153 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule151 _patIlocals arg_attr_ arg_field_ in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v28 :: T_Pattern_v28 - v28 = \ !(T_Pattern_vIn28 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule152 () in- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut42 _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v42 (T_Pattern_vIn42 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule150 _patIdefinedAttrs arg_attr_ arg_field_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule153 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule151 _patIlocals arg_attr_ arg_field_ in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v42 :: T_Pattern_v42 - v42 = \ !(T_Pattern_vIn42 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut42 _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v42 (T_Pattern_vIn42 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule150 _patIdefinedAttrs arg_attr_ arg_field_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule153 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule151 _patIlocals arg_attr_ arg_field_ in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v50 :: T_Pattern_v50 - v50 = \ !(T_Pattern_vIn50 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut50 _patIdefinedAttrs _patIerrors _patIlocals _patX55) = inv_Pattern_s10 _patX10 K_Pattern_v50 (T_Pattern_vIn50 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule150 _patIdefinedAttrs arg_attr_ arg_field_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule153 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule151 _patIlocals arg_attr_ arg_field_ in- let !__st_ = st55 _patX55- !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Pattern_s10 k10- {-# NOINLINE st55 #-}- st55 = \ !_patX55 -> let- k55 :: K_Pattern_s55 t -> t- k55 K_Pattern_v51 = v51- k55 K_Pattern_v56 = v56- v51 :: T_Pattern_v51 - v51 = \ !(T_Pattern_vIn51 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule152 () in- let !(T_Pattern_vOut56 _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v56 (T_Pattern_vIn56 ) in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput- in __result_ )- v56 :: T_Pattern_v56 - v56 = \ !(T_Pattern_vIn56 ) -> (- let !(T_Pattern_vOut56 _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v56 (T_Pattern_vIn56 ) in- let !_output = rule155 _patIoutput arg_attr_ arg_field_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule157 _output in- let !__result_ = T_Pattern_vOut56 _lhsOoutput- in __result_ )- in C_Pattern_s55 k55- {-# NOINLINE rule150 #-}- {-# LINE 536 "./src-ag/DefaultRules.ag" #-}- rule150 = \ ((!_patIdefinedAttrs) :: Set (Identifier,Identifier)) !attr_ !field_ ->- {-# LINE 536 "./src-ag/DefaultRules.ag" #-}- Set.insert (field_,attr_) _patIdefinedAttrs- {-# LINE 2562 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule151 #-}- {-# LINE 537 "./src-ag/DefaultRules.ag" #-}- rule151 = \ ((!_patIlocals) :: Set Identifier) !attr_ !field_ ->- {-# LINE 537 "./src-ag/DefaultRules.ag" #-}- if field_ == _LOC- then Set.insert attr_ _patIlocals- else _patIlocals- {-# LINE 2570 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE rule152 #-}- {-# LINE 554 "./src-ag/DefaultRules.ag" #-}- rule152 = \ (_ :: ()) ->- {-# LINE 554 "./src-ag/DefaultRules.ag" #-}- True- {-# LINE 2576 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule153 #-}- rule153 = \ ((!_patIerrors) :: Seq Error) ->- _patIerrors- {-# NOINLINE[1] rule154 #-}- rule154 = \ ((!_patIcopy) :: Pattern) !attr_ !field_ ->- Alias field_ attr_ _patIcopy- {-# NOINLINE[1] rule155 #-}- rule155 = \ ((!_patIoutput) :: Pattern) !attr_ !field_ ->- Alias field_ attr_ _patIoutput- {-# NOINLINE[1] rule156 #-}- rule156 = \ !_copy ->- _copy- {-# NOINLINE[1] rule157 #-}- rule157 = \ !_output ->- _output-{-# NOINLINE sem_Pattern_Irrefutable #-}-sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern -sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st10) where- {-# NOINLINE st10 #-}- !st10 = let- k10 :: K_Pattern_s10 t -> t- k10 K_Pattern_v5 = v5- k10 K_Pattern_v22 = v22- k10 K_Pattern_v23 = v23- k10 K_Pattern_v28 = v28- k10 K_Pattern_v42 = v42- k10 K_Pattern_v50 = v50- v5 :: T_Pattern_v5 - v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut23 _patIcontainsVars _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v23 (T_Pattern_vIn23 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule160 _patIcontainsVars in- let !_copy = rule164 _patIcopy in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule166 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule161 _patIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule162 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule163 _patIlocals in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v22 :: T_Pattern_v22 - v22 = \ !(T_Pattern_vIn22 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in- let !_copy = rule164 _patIcopy in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule166 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule161 _patIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule162 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule163 _patIlocals in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v23 :: T_Pattern_v23 - v23 = \ !(T_Pattern_vIn23 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut23 _patIcontainsVars _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v23 (T_Pattern_vIn23 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule160 _patIcontainsVars in- let !_copy = rule164 _patIcopy in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule166 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule161 _patIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule162 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule163 _patIlocals in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v28 :: T_Pattern_v28 - v28 = \ !(T_Pattern_vIn28 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut28 _patIcontainsVars _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v28 (T_Pattern_vIn28 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule160 _patIcontainsVars in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule161 _patIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule162 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule163 _patIlocals in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v42 :: T_Pattern_v42 - v42 = \ !(T_Pattern_vIn42 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut42 _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v42 (T_Pattern_vIn42 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule161 _patIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule162 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule163 _patIlocals in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v50 :: T_Pattern_v50 - v50 = \ !(T_Pattern_vIn50 ) -> (- let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in- let !(T_Pattern_vOut50 _patIdefinedAttrs _patIerrors _patIlocals _patX55) = inv_Pattern_s10 _patX10 K_Pattern_v50 (T_Pattern_vIn50 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule161 _patIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule162 _patIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule163 _patIlocals in- let !__st_ = st55 _patX55- !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Pattern_s10 k10- {-# NOINLINE st55 #-}- st55 = \ !_patX55 -> let- k55 :: K_Pattern_s55 t -> t- k55 K_Pattern_v51 = v51- k55 K_Pattern_v56 = v56- v51 :: T_Pattern_v51 - v51 = \ !(T_Pattern_vIn51 ) -> (- let !(T_Pattern_vOut51 _patIcontainsVars _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v51 (T_Pattern_vIn51 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule160 _patIcontainsVars in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput- in __result_ )- v56 :: T_Pattern_v56 - v56 = \ !(T_Pattern_vIn56 ) -> (- let !(T_Pattern_vOut56 _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v56 (T_Pattern_vIn56 ) in- let !_output = rule165 _patIoutput in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule167 _output in- let !__result_ = T_Pattern_vOut56 _lhsOoutput- in __result_ )- in C_Pattern_s55 k55- {-# NOINLINE[1] rule160 #-}- rule160 = \ ((!_patIcontainsVars) :: Bool) ->- _patIcontainsVars- {-# NOINLINE[1] rule161 #-}- rule161 = \ ((!_patIdefinedAttrs) :: Set (Identifier,Identifier)) ->- _patIdefinedAttrs- {-# NOINLINE[1] rule162 #-}- rule162 = \ ((!_patIerrors) :: Seq Error) ->- _patIerrors- {-# NOINLINE[1] rule163 #-}- rule163 = \ ((!_patIlocals) :: Set Identifier) ->- _patIlocals- {-# NOINLINE[1] rule164 #-}- rule164 = \ ((!_patIcopy) :: Pattern) ->- Irrefutable _patIcopy- {-# NOINLINE[1] rule165 #-}- rule165 = \ ((!_patIoutput) :: Pattern) ->- Irrefutable _patIoutput- {-# NOINLINE[1] rule166 #-}- rule166 = \ !_copy ->- _copy- {-# NOINLINE[1] rule167 #-}- rule167 = \ !_output ->- _output-{-# NOINLINE sem_Pattern_Underscore #-}-sem_Pattern_Underscore :: (Pos) -> T_Pattern -sem_Pattern_Underscore !arg_pos_ = T_Pattern (return st10) where- {-# NOINLINE st10 #-}- !st10 = let- k10 :: K_Pattern_s10 t -> t- k10 K_Pattern_v5 = v5- k10 K_Pattern_v22 = v22- k10 K_Pattern_v23 = v23- k10 K_Pattern_v28 = v28- k10 K_Pattern_v42 = v42- k10 K_Pattern_v50 = v50- v5 :: T_Pattern_v5 - v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule170 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule171 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule172 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule173 () in- let !_copy = rule174 arg_pos_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule176 _copy in- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v22 :: T_Pattern_v22 - v22 = \ !(T_Pattern_vIn22 ) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule171 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule172 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule173 () in- let !_copy = rule174 arg_pos_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule176 _copy in- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v23 :: T_Pattern_v23 - v23 = \ !(T_Pattern_vIn23 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule170 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule171 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule172 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule173 () in- let !_copy = rule174 arg_pos_ in- let _lhsOcopy :: Pattern- !_lhsOcopy = rule176 _copy in- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v28 :: T_Pattern_v28 - v28 = \ !(T_Pattern_vIn28 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule170 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule171 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule172 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule173 () in- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v42 :: T_Pattern_v42 - v42 = \ !(T_Pattern_vIn42 ) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule171 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule172 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule173 () in- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v50 :: T_Pattern_v50 - v50 = \ !(T_Pattern_vIn50 ) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule171 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule172 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule173 () in- let !__st_ = st55 ()- !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Pattern_s10 k10- {-# NOINLINE st55 #-}- st55 = \ (_ :: ()) -> let- k55 :: K_Pattern_s55 t -> t- k55 K_Pattern_v51 = v51- k55 K_Pattern_v56 = v56- v51 :: T_Pattern_v51 - v51 = \ !(T_Pattern_vIn51 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule170 () in- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput- in __result_ )- v56 :: T_Pattern_v56 - v56 = \ !(T_Pattern_vIn56 ) -> (- let !_output = rule175 arg_pos_ in- let _lhsOoutput :: Pattern- !_lhsOoutput = rule177 _output in- let !__result_ = T_Pattern_vOut56 _lhsOoutput- in __result_ )- in C_Pattern_s55 k55- {-# NOINLINE[1] rule170 #-}- rule170 = \ (_ :: ()) ->- False- {-# NOINLINE[1] rule171 #-}- rule171 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule172 #-}- rule172 = \ (_ :: ()) ->- Seq.empty- {-# NOINLINE[1] rule173 #-}- rule173 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule174 #-}- rule174 = \ !pos_ ->- Underscore pos_- {-# NOINLINE[1] rule175 #-}- rule175 = \ !pos_ ->- Underscore pos_- {-# NOINLINE[1] rule176 #-}- rule176 = \ !_copy ->- _copy- {-# NOINLINE[1] rule177 #-}- rule177 = \ !_output ->- _output---- Patterns ------------------------------------------------------- wrapper-data Inh_Patterns = Inh_Patterns { con_Inh_Patterns :: !(ConstructorIdent), nt_Inh_Patterns :: !(NontermIdent) }-data Syn_Patterns = Syn_Patterns { containsVars_Syn_Patterns :: !(Bool), copy_Syn_Patterns :: !(Patterns), definedAttrs_Syn_Patterns :: !(Set (Identifier,Identifier)), errors_Syn_Patterns :: !(Seq Error), locals_Syn_Patterns :: !(Set Identifier), output_Syn_Patterns :: !(Patterns) }-{-# INLINABLE wrap_Patterns #-}-wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )-wrap_Patterns !(T_Patterns act) !(Inh_Patterns _lhsIcon _lhsInt) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Patterns_vIn6 _lhsIcon _lhsInt- !(T_Patterns_vOut6 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput) <- return (inv_Patterns_s12 sem K_Patterns_v6 arg)- return (Syn_Patterns _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput)- )---- cata-{-# NOINLINE sem_Patterns #-}-sem_Patterns :: Patterns -> T_Patterns -sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)---- semantic domain-newtype T_Patterns = T_Patterns {- attach_T_Patterns :: Identity (T_Patterns_s12 )- }-data T_Patterns_s12 where C_Patterns_s12 :: {- inv_Patterns_s12 :: !(forall t. K_Patterns_s12 t -> t)- } -> T_Patterns_s12 -data T_Patterns_s13 = C_Patterns_s13-data T_Patterns_s34 = C_Patterns_s34-data T_Patterns_s47 = C_Patterns_s47-data T_Patterns_s49 = C_Patterns_s49-data T_Patterns_s54 = C_Patterns_s54-data T_Patterns_s57 where C_Patterns_s57 :: {- inv_Patterns_s57 :: !(forall t. K_Patterns_s57 t -> t)- } -> T_Patterns_s57 -data K_Patterns_s12 k where- K_Patterns_v6 :: K_Patterns_s12 (T_Patterns_v6 )- K_Patterns_v21 :: K_Patterns_s12 (T_Patterns_v21 )- K_Patterns_v38 :: K_Patterns_s12 (T_Patterns_v38 )- K_Patterns_v41 :: K_Patterns_s12 (T_Patterns_v41 )- K_Patterns_v49 :: K_Patterns_s12 (T_Patterns_v49 )- K_Patterns_v54 :: K_Patterns_s12 (T_Patterns_v54 )-data K_Patterns_s57 k where- K_Patterns_v55 :: K_Patterns_s57 (T_Patterns_v55 )- K_Patterns_v57 :: K_Patterns_s57 (T_Patterns_v57 )-type T_Patterns_v6 = (T_Patterns_vIn6 ) -> (T_Patterns_vOut6 )-data T_Patterns_vIn6 = T_Patterns_vIn6 !(ConstructorIdent) !(NontermIdent)-data T_Patterns_vOut6 = T_Patterns_vOut6 !(Bool) !(Patterns) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)-type T_Patterns_v21 = (T_Patterns_vIn21 ) -> (T_Patterns_vOut21 )-data T_Patterns_vIn21 = T_Patterns_vIn21 -data T_Patterns_vOut21 = T_Patterns_vOut21 !(Bool) !(Patterns) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)-type T_Patterns_v38 = (T_Patterns_vIn38 ) -> (T_Patterns_vOut38 )-data T_Patterns_vIn38 = T_Patterns_vIn38 -data T_Patterns_vOut38 = T_Patterns_vOut38 !(Patterns) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)-type T_Patterns_v41 = (T_Patterns_vIn41 ) -> (T_Patterns_vOut41 )-data T_Patterns_vIn41 = T_Patterns_vIn41 -data T_Patterns_vOut41 = T_Patterns_vOut41 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)-type T_Patterns_v49 = (T_Patterns_vIn49 ) -> (T_Patterns_vOut49 )-data T_Patterns_vIn49 = T_Patterns_vIn49 -data T_Patterns_vOut49 = T_Patterns_vOut49 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)-type T_Patterns_v54 = (T_Patterns_vIn54 ) -> (T_Patterns_vOut54 )-data T_Patterns_vIn54 = T_Patterns_vIn54 -data T_Patterns_vOut54 = T_Patterns_vOut54 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(T_Patterns_s57 )-type T_Patterns_v55 = (T_Patterns_vIn55 ) -> (T_Patterns_vOut55 )-data T_Patterns_vIn55 = T_Patterns_vIn55 -data T_Patterns_vOut55 = T_Patterns_vOut55 !(Bool) !(Patterns)-type T_Patterns_v57 = (T_Patterns_vIn57 ) -> (T_Patterns_vOut57 )-data T_Patterns_vIn57 = T_Patterns_vIn57 -data T_Patterns_vOut57 = T_Patterns_vOut57 !(Patterns)-{-# NOINLINE sem_Patterns_Cons #-}-sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns -sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st12) where- {-# NOINLINE st12 #-}- !st12 = let- k12 :: K_Patterns_s12 t -> t- k12 K_Patterns_v6 = v6- k12 K_Patterns_v21 = v21- k12 K_Patterns_v38 = v38- k12 K_Patterns_v41 = v41- k12 K_Patterns_v49 = v49- k12 K_Patterns_v54 = v54- v6 :: T_Patterns_v6 - v6 = \ !(T_Patterns_vIn6 _lhsIcon _lhsInt) -> (- let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in- let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in- let !(T_Pattern_vOut23 _hdIcontainsVars _hdIcopy _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v23 (T_Pattern_vIn23 ) in- let !(T_Patterns_vOut21 _tlIcontainsVars _tlIcopy _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v21 (T_Patterns_vIn21 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule178 _hdIcontainsVars _tlIcontainsVars in- let !_copy = rule182 _hdIcopy _tlIcopy in- let _lhsOcopy :: Patterns- !_lhsOcopy = rule184 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule179 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule180 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule181 _hdIlocals _tlIlocals in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut6 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v21 :: T_Patterns_v21 - v21 = \ !(T_Patterns_vIn21 ) -> (- let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in- let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in- let !(T_Pattern_vOut23 _hdIcontainsVars _hdIcopy _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v23 (T_Pattern_vIn23 ) in- let !(T_Patterns_vOut21 _tlIcontainsVars _tlIcopy _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v21 (T_Patterns_vIn21 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule178 _hdIcontainsVars _tlIcontainsVars in- let !_copy = rule182 _hdIcopy _tlIcopy in- let _lhsOcopy :: Patterns- !_lhsOcopy = rule184 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule179 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule180 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule181 _hdIlocals _tlIlocals in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut21 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v38 :: T_Patterns_v38 - v38 = \ !(T_Patterns_vIn38 ) -> (- let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in- let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in- let !(T_Pattern_vOut22 _hdIcopy _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v22 (T_Pattern_vIn22 ) in- let !(T_Patterns_vOut38 _tlIcopy _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v38 (T_Patterns_vIn38 ) in- let !_copy = rule182 _hdIcopy _tlIcopy in- let _lhsOcopy :: Patterns- !_lhsOcopy = rule184 _copy in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule179 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule180 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule181 _hdIlocals _tlIlocals in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut38 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v41 :: T_Patterns_v41 - v41 = \ !(T_Patterns_vIn41 ) -> (- let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in- let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in- let !(T_Pattern_vOut28 _hdIcontainsVars _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v28 (T_Pattern_vIn28 ) in- let !(T_Patterns_vOut41 _tlIcontainsVars _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v41 (T_Patterns_vIn41 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule178 _hdIcontainsVars _tlIcontainsVars in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule179 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule180 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule181 _hdIlocals _tlIlocals in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut41 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v49 :: T_Patterns_v49 - v49 = \ !(T_Patterns_vIn49 ) -> (- let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in- let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in- let !(T_Pattern_vOut42 _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v42 (T_Pattern_vIn42 ) in- let !(T_Patterns_vOut49 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v49 (T_Patterns_vIn49 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule179 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule180 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule181 _hdIlocals _tlIlocals in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut49 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v54 :: T_Patterns_v54 - v54 = \ !(T_Patterns_vIn54 ) -> (- let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in- let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in- let !(T_Pattern_vOut50 _hdIdefinedAttrs _hdIerrors _hdIlocals _hdX55) = inv_Pattern_s10 _hdX10 K_Pattern_v50 (T_Pattern_vIn50 ) in- let !(T_Patterns_vOut54 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlX57) = inv_Patterns_s12 _tlX12 K_Patterns_v54 (T_Patterns_vIn54 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule179 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule180 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule181 _hdIlocals _tlIlocals in- let !__st_ = st57 _hdX55 _tlX57- !__result_ = T_Patterns_vOut54 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Patterns_s12 k12- {-# NOINLINE st57 #-}- st57 = \ !_hdX55 !_tlX57 -> let- k57 :: K_Patterns_s57 t -> t- k57 K_Patterns_v55 = v55- k57 K_Patterns_v57 = v57- v55 :: T_Patterns_v55 - v55 = \ !(T_Patterns_vIn55 ) -> (- let !(T_Pattern_vOut51 _hdIcontainsVars _hdIoutput) = inv_Pattern_s55 _hdX55 K_Pattern_v51 (T_Pattern_vIn51 ) in- let !(T_Patterns_vOut55 _tlIcontainsVars _tlIoutput) = inv_Patterns_s57 _tlX57 K_Patterns_v55 (T_Patterns_vIn55 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule178 _hdIcontainsVars _tlIcontainsVars in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut55 _lhsOcontainsVars _lhsOoutput- in __result_ )- v57 :: T_Patterns_v57 - v57 = \ !(T_Patterns_vIn57 ) -> (- let !(T_Pattern_vOut56 _hdIoutput) = inv_Pattern_s55 _hdX55 K_Pattern_v56 (T_Pattern_vIn56 ) in- let !(T_Patterns_vOut57 _tlIoutput) = inv_Patterns_s57 _tlX57 K_Patterns_v57 (T_Patterns_vIn57 ) in- let !_output = rule183 _hdIoutput _tlIoutput in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule185 _output in- let !__result_ = T_Patterns_vOut57 _lhsOoutput- in __result_ )- in C_Patterns_s57 k57- {-# NOINLINE[1] rule178 #-}- rule178 = \ ((!_hdIcontainsVars) :: Bool) ((!_tlIcontainsVars) :: Bool) ->- _hdIcontainsVars || _tlIcontainsVars- {-# NOINLINE[1] rule179 #-}- rule179 = \ ((!_hdIdefinedAttrs) :: Set (Identifier,Identifier)) ((!_tlIdefinedAttrs) :: Set (Identifier,Identifier)) ->- _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# NOINLINE[1] rule180 #-}- rule180 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# NOINLINE[1] rule181 #-}- rule181 = \ ((!_hdIlocals) :: Set Identifier) ((!_tlIlocals) :: Set Identifier) ->- _hdIlocals `Set.union` _tlIlocals- {-# NOINLINE[1] rule182 #-}- rule182 = \ ((!_hdIcopy) :: Pattern) ((!_tlIcopy) :: Patterns) ->- (:) _hdIcopy _tlIcopy- {-# NOINLINE[1] rule183 #-}- rule183 = \ ((!_hdIoutput) :: Pattern) ((!_tlIoutput) :: Patterns) ->- (:) _hdIoutput _tlIoutput- {-# NOINLINE[1] rule184 #-}- rule184 = \ !_copy ->- _copy- {-# NOINLINE[1] rule185 #-}- rule185 = \ !_output ->- _output-{-# NOINLINE sem_Patterns_Nil #-}-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil = T_Patterns (return st12) where- {-# NOINLINE st12 #-}- !st12 = let- k12 :: K_Patterns_s12 t -> t- k12 K_Patterns_v6 = v6- k12 K_Patterns_v21 = v21- k12 K_Patterns_v38 = v38- k12 K_Patterns_v41 = v41- k12 K_Patterns_v49 = v49- k12 K_Patterns_v54 = v54- v6 :: T_Patterns_v6 - v6 = \ !(T_Patterns_vIn6 _lhsIcon _lhsInt) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule190 () in- let !_copy = rule194 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule191 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule192 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule193 () in- let !_output = rule195 () in- let _lhsOcopy :: Patterns- !_lhsOcopy = rule196 _copy in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut6 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v21 :: T_Patterns_v21 - v21 = \ !(T_Patterns_vIn21 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule190 () in- let !_copy = rule194 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule191 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule192 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule193 () in- let !_output = rule195 () in- let _lhsOcopy :: Patterns- !_lhsOcopy = rule196 _copy in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut21 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v38 :: T_Patterns_v38 - v38 = \ !(T_Patterns_vIn38 ) -> (- let !_copy = rule194 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule191 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule192 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule193 () in- let !_output = rule195 () in- let _lhsOcopy :: Patterns- !_lhsOcopy = rule196 _copy in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut38 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v41 :: T_Patterns_v41 - v41 = \ !(T_Patterns_vIn41 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule190 () in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule191 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule192 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule193 () in- let !_output = rule195 () in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut41 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v49 :: T_Patterns_v49 - v49 = \ !(T_Patterns_vIn49 ) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule191 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule192 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule193 () in- let !_output = rule195 () in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut49 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput- in __result_ )- v54 :: T_Patterns_v54 - v54 = \ !(T_Patterns_vIn54 ) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule191 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule192 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule193 () in- let !__st_ = st57 ()- !__result_ = T_Patterns_vOut54 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_- in __result_ )- in C_Patterns_s12 k12- {-# NOINLINE st57 #-}- st57 = \ (_ :: ()) -> let- k57 :: K_Patterns_s57 t -> t- k57 K_Patterns_v55 = v55- k57 K_Patterns_v57 = v57- v55 :: T_Patterns_v55 - v55 = \ !(T_Patterns_vIn55 ) -> (- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule190 () in- let !_output = rule195 () in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut55 _lhsOcontainsVars _lhsOoutput- in __result_ )- v57 :: T_Patterns_v57 - v57 = \ !(T_Patterns_vIn57 ) -> (- let !_output = rule195 () in- let _lhsOoutput :: Patterns- !_lhsOoutput = rule197 _output in- let !__result_ = T_Patterns_vOut57 _lhsOoutput- in __result_ )- in C_Patterns_s57 k57- {-# NOINLINE[1] rule190 #-}- rule190 = \ (_ :: ()) ->- False- {-# NOINLINE[1] rule191 #-}- rule191 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule192 #-}- rule192 = \ (_ :: ()) ->- Seq.empty- {-# NOINLINE[1] rule193 #-}- rule193 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule194 #-}- rule194 = \ (_ :: ()) ->- []- {-# NOINLINE[1] rule195 #-}- rule195 = \ (_ :: ()) ->- []- {-# NOINLINE[1] rule196 #-}- rule196 = \ !_copy ->- _copy- {-# NOINLINE[1] rule197 #-}- rule197 = \ !_output ->- _output---- Production ----------------------------------------------------- wrapper-data Inh_Production = Inh_Production { aroundsIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])), augmentsIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])), cr_Inh_Production :: !(Bool), inh_Inh_Production :: !(Attributes), inhMap_Inh_Production :: !(Map Identifier Attributes), inhOrig_Inh_Production :: !(Attributes), manualAttrOrderMap_Inh_Production :: !(AttrOrderMap), mergesIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))), nonterminals_Inh_Production :: !(Set NontermIdent), nt_Inh_Production :: !(NontermIdent), o_rename_Inh_Production :: !(Bool), options_Inh_Production :: !(Options), params_Inh_Production :: !([Identifier]), syn_Inh_Production :: !(Attributes), synMap_Inh_Production :: !(Map Identifier Attributes), synOrig_Inh_Production :: !(Attributes), typeSyns_Inh_Production :: !(TypeSyns), uniq_Inh_Production :: !(Int), useMap_Inh_Production :: !(Map Identifier (String,String,String)), wrappers_Inh_Production :: !(Set NontermIdent) }-data Syn_Production = Syn_Production { errors_Syn_Production :: !(Seq Error), output_Syn_Production :: !(Production), uniq_Syn_Production :: !(Int) }-{-# INLINABLE wrap_Production #-}-wrap_Production :: T_Production -> Inh_Production -> (Syn_Production )-wrap_Production !(T_Production act) !(Inh_Production _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Production_vIn7 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers- !(T_Production_vOut7 _lhsOerrors _lhsOoutput _lhsOuniq) <- return (inv_Production_s14 sem K_Production_v7 arg)- return (Syn_Production _lhsOerrors _lhsOoutput _lhsOuniq)- )---- cata-{-# INLINE sem_Production #-}-sem_Production :: Production -> T_Production -sem_Production ( Production !con_ !params_ !constraints_ children_ rules_ typeSigs_ !macro_ ) = sem_Production_Production con_ params_ constraints_ ( sem_Children children_ ) ( sem_Rules rules_ ) ( sem_TypeSigs typeSigs_ ) macro_---- semantic domain-newtype T_Production = T_Production {- attach_T_Production :: Identity (T_Production_s14 )- }-data T_Production_s14 where C_Production_s14 :: {- inv_Production_s14 :: !(forall t. K_Production_s14 t -> t)- } -> T_Production_s14 -data T_Production_s15 = C_Production_s15-data T_Production_s38 = C_Production_s38-newtype T_Production_s48 = C_Production_s48 {- inv_Production_s48 :: (T_Production_v40 )- }-data K_Production_s14 k where- K_Production_v7 :: K_Production_s14 (T_Production_v7 )- K_Production_v25 :: K_Production_s14 (T_Production_v25 )- K_Production_v39 :: K_Production_s14 (T_Production_v39 )-type T_Production_v7 = (T_Production_vIn7 ) -> (T_Production_vOut7 )-data T_Production_vIn7 = T_Production_vIn7 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Bool) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(Set NontermIdent) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)-data T_Production_vOut7 = T_Production_vOut7 !(Seq Error) !(Production) !(Int)-type T_Production_v25 = (T_Production_vIn25 ) -> (T_Production_vOut25 )-data T_Production_vIn25 = T_Production_vIn25 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)-data T_Production_vOut25 = T_Production_vOut25 !(Seq Error) !(Production) !(Int)-type T_Production_v39 = (T_Production_vIn39 ) -> (T_Production_vOut39 )-data T_Production_vIn39 = T_Production_vIn39 !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Map Identifier (String,String,String)) !(Set NontermIdent)-data T_Production_vOut39 = T_Production_vOut39 !(Seq Error) !(T_Production_s48 )-type T_Production_v40 = (T_Production_vIn40 ) -> (T_Production_vOut40 )-data T_Production_vIn40 = T_Production_vIn40 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !([Identifier]) !(Int)-data T_Production_vOut40 = T_Production_vOut40 !(Production) !(Int)-{-# NOINLINE sem_Production_Production #-}-sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children -> T_Rules -> T_TypeSigs -> (MaybeMacro) -> T_Production -sem_Production_Production !arg_con_ !arg_params_ !arg_constraints_ arg_children_ arg_rules_ arg_typeSigs_ !arg_macro_ = T_Production (return st14) where- {-# NOINLINE st14 #-}- !st14 = let- k14 :: K_Production_s14 t -> t- k14 K_Production_v7 = v7- k14 K_Production_v25 = v25- k14 K_Production_v39 = v39- v7 :: T_Production_v7 - v7 = \ !(T_Production_vIn7 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_childrenX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_)) in- let !_rulesX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_)) in- let !_typeSigsX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_)) in- let !_childrenOinhMap = rule215 _lhsIinhMap in- let !_mergesIn = rule210 _lhsImergesIn arg_con_ in- let !_merged = rule211 _mergesIn in- let !_childrenOmerged = rule216 _merged in- let !_childrenOsynMap = rule219 _lhsIsynMap in- let !_orderDeps = rule206 _lhsImanualAttrOrderMap _lhsInt arg_con_ in- let !_typeSigsOnt = rule223 _lhsInt in- let !_typeSigsOparams = rule224 _lhsIparams in- let !_aroundsIn = rule209 _lhsIaroundsIn arg_con_ in- let !_rulesOoptions = rule221 _lhsIoptions in- let !_rulesOuniq = rule222 _lhsIuniq in- let !_augmentsIn = rule208 _lhsIaugmentsIn arg_con_ in- let !(T_Children_vOut14 _childrenIerrors _childrenIfields _childrenIinputs _childrenIoutput _childrenIoutputs) = inv_Children_s2 _childrenX2 K_Children_v14 (T_Children_vIn14 _childrenOinhMap _childrenOmerged _childrenOsynMap) in- let !(T_Rules_vOut24 _rulesIdefinedAttrs _rulesIerrors _rulesIlocals _rulesIoutput _rulesIruleNames _rulesIuniq) = inv_Rules_s20 _rulesX20 K_Rules_v24 (T_Rules_vIn24 _rulesOoptions _rulesOuniq) in- let !(T_TypeSigs_vOut12 _typeSigsIoutput) = inv_TypeSigs_s24 _typeSigsX24 (T_TypeSigs_vIn12 _typeSigsOnt _typeSigsOparams) in- let !(!_newRls,!_errs) = rule201 _childrenIfields _childrenIinputs _childrenIoutputs _lhsIcr _lhsIinh _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers _rulesIdefinedAttrs _rulesIlocals arg_con_ in- let !_orderErrs = rule207 _childrenIinputs _childrenIoutputs _lhsIinh _lhsInt _lhsIsyn _orderDeps _rulesIlocals _rulesIruleNames arg_con_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule200 _childrenIerrors _errs _orderErrs _rulesIerrors in- let !_extra1 = rule202 _augmentsIn _newRls _rulesIoutput in- let !_extra2 = rule203 _aroundsIn _extra1 in- let !_extra3 = rule204 _extra2 _mergesIn in- let _lhsOoutput :: Production- !_lhsOoutput = rule205 _childrenIoutput _extra3 _typeSigsIoutput arg_con_ arg_constraints_ arg_macro_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule213 _rulesIuniq in- let !__result_ = T_Production_vOut7 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v25 :: T_Production_v25 - v25 = \ !(T_Production_vIn25 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_childrenX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_)) in- let !_rulesX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_)) in- let !_typeSigsX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_)) in- let !_childrenOinhMap = rule215 _lhsIinhMap in- let !_mergesIn = rule210 _lhsImergesIn arg_con_ in- let !_merged = rule211 _mergesIn in- let !_childrenOmerged = rule216 _merged in- let !_childrenOsynMap = rule219 _lhsIsynMap in- let !_orderDeps = rule206 _lhsImanualAttrOrderMap _lhsInt arg_con_ in- let !_typeSigsOnt = rule223 _lhsInt in- let !_typeSigsOparams = rule224 _lhsIparams in- let !_aroundsIn = rule209 _lhsIaroundsIn arg_con_ in- let !_rulesOoptions = rule221 _lhsIoptions in- let !_rulesOuniq = rule222 _lhsIuniq in- let !_augmentsIn = rule208 _lhsIaugmentsIn arg_con_ in- let !(T_Children_vOut14 _childrenIerrors _childrenIfields _childrenIinputs _childrenIoutput _childrenIoutputs) = inv_Children_s2 _childrenX2 K_Children_v14 (T_Children_vIn14 _childrenOinhMap _childrenOmerged _childrenOsynMap) in- let !(T_Rules_vOut24 _rulesIdefinedAttrs _rulesIerrors _rulesIlocals _rulesIoutput _rulesIruleNames _rulesIuniq) = inv_Rules_s20 _rulesX20 K_Rules_v24 (T_Rules_vIn24 _rulesOoptions _rulesOuniq) in- let !(T_TypeSigs_vOut12 _typeSigsIoutput) = inv_TypeSigs_s24 _typeSigsX24 (T_TypeSigs_vIn12 _typeSigsOnt _typeSigsOparams) in- let !(!_newRls,!_errs) = rule201 _childrenIfields _childrenIinputs _childrenIoutputs _lhsIcr _lhsIinh _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers _rulesIdefinedAttrs _rulesIlocals arg_con_ in- let !_orderErrs = rule207 _childrenIinputs _childrenIoutputs _lhsIinh _lhsInt _lhsIsyn _orderDeps _rulesIlocals _rulesIruleNames arg_con_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule200 _childrenIerrors _errs _orderErrs _rulesIerrors in- let !_extra1 = rule202 _augmentsIn _newRls _rulesIoutput in- let !_extra2 = rule203 _aroundsIn _extra1 in- let !_extra3 = rule204 _extra2 _mergesIn in- let _lhsOoutput :: Production- !_lhsOoutput = rule205 _childrenIoutput _extra3 _typeSigsIoutput arg_con_ arg_constraints_ arg_macro_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule213 _rulesIuniq in- let !__result_ = T_Production_vOut25 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v39 :: T_Production_v39 - v39 = \ !(T_Production_vIn39 _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let !_childrenX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_)) in- let !_rulesX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_)) in- let !_childrenOinhMap = rule215 _lhsIinhMap in- let !_mergesIn = rule210 _lhsImergesIn arg_con_ in- let !_merged = rule211 _mergesIn in- let !_childrenOmerged = rule216 _merged in- let !_childrenOsynMap = rule219 _lhsIsynMap in- let !_orderDeps = rule206 _lhsImanualAttrOrderMap _lhsInt arg_con_ in- let !(T_Children_vOut47 _childrenIerrors _childrenIfields _childrenIinputs _childrenIoutputs _childrenX53) = inv_Children_s2 _childrenX2 K_Children_v47 (T_Children_vIn47 _childrenOinhMap _childrenOmerged _childrenOsynMap) in- let !(T_Rules_vOut30 _rulesIdefinedAttrs _rulesIerrors _rulesIlocals _rulesIruleNames _rulesX42) = inv_Rules_s20 _rulesX20 K_Rules_v30 (T_Rules_vIn30 ) in- let !(!_newRls,!_errs) = rule201 _childrenIfields _childrenIinputs _childrenIoutputs _lhsIcr _lhsIinh _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers _rulesIdefinedAttrs _rulesIlocals arg_con_ in- let !_orderErrs = rule207 _childrenIinputs _childrenIoutputs _lhsIinh _lhsInt _lhsIsyn _orderDeps _rulesIlocals _rulesIruleNames arg_con_ in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule200 _childrenIerrors _errs _orderErrs _rulesIerrors in- let !__st_ = st48 _childrenX53 _lhsInt _lhsIoptions _mergesIn _newRls _rulesX42- !__result_ = T_Production_vOut39 _lhsOerrors __st_- in __result_ )- in C_Production_s14 k14- {-# NOINLINE st48 #-}- st48 = \ !_childrenX53 ((!_lhsInt) :: NontermIdent) ((!_lhsIoptions) :: Options) !_mergesIn !_newRls !_rulesX42 -> let- v40 :: T_Production_v40 - v40 = \ !(T_Production_vIn40 _lhsIaroundsIn _lhsIaugmentsIn _lhsIparams _lhsIuniq) -> (- let !_typeSigsOnt = rule223 _lhsInt in- let !_typeSigsX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_)) in- let !_rulesOoptions = rule221 _lhsIoptions in- let !_typeSigsOparams = rule224 _lhsIparams in- let !_aroundsIn = rule209 _lhsIaroundsIn arg_con_ in- let !_rulesOuniq = rule222 _lhsIuniq in- let !_augmentsIn = rule208 _lhsIaugmentsIn arg_con_ in- let !(T_Children_vOut48 _childrenIoutput) = inv_Children_s53 _childrenX53 (T_Children_vIn48 ) in- let !(T_Rules_vOut31 _rulesIoutput _rulesIuniq) = inv_Rules_s42 _rulesX42 (T_Rules_vIn31 _rulesOoptions _rulesOuniq) in- let !(T_TypeSigs_vOut12 _typeSigsIoutput) = inv_TypeSigs_s24 _typeSigsX24 (T_TypeSigs_vIn12 _typeSigsOnt _typeSigsOparams) in- let !_extra1 = rule202 _augmentsIn _newRls _rulesIoutput in- let !_extra2 = rule203 _aroundsIn _extra1 in- let !_extra3 = rule204 _extra2 _mergesIn in- let _lhsOoutput :: Production- !_lhsOoutput = rule205 _childrenIoutput _extra3 _typeSigsIoutput arg_con_ arg_constraints_ arg_macro_ arg_params_ in- let _lhsOuniq :: Int- !_lhsOuniq = rule213 _rulesIuniq in- let !__result_ = T_Production_vOut40 _lhsOoutput _lhsOuniq- in __result_ )- in C_Production_s48 v40- {-# NOINLINE[1] rule200 #-}- {-# LINE 384 "./src-ag/DefaultRules.ag" #-}- rule200 = \ ((!_childrenIerrors) :: Seq Error) !_errs !_orderErrs ((!_rulesIerrors) :: Seq Error) ->- {-# LINE 384 "./src-ag/DefaultRules.ag" #-}- _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs- {-# LINE 3475 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule201 #-}- {-# LINE 388 "./src-ag/DefaultRules.ag" #-}- rule201 = \ ((!_childrenIfields) :: [(Identifier,Type,ChildKind)]) ((!_childrenIinputs) :: [(Identifier, Attributes)]) ((!_childrenIoutputs) :: [(Identifier, Attributes)]) ((!_lhsIcr) :: Bool) ((!_lhsIinh) :: Attributes) ((!_lhsInt) :: NontermIdent) ((!_lhsIo_rename) :: Bool) ((!_lhsIoptions) :: Options) ((!_lhsIsyn) :: Attributes) ((!_lhsIsynOrig) :: Attributes) ((!_lhsItypeSyns) :: TypeSyns) ((!_lhsIuseMap) :: Map Identifier (String,String,String)) ((!_lhsIwrappers) :: Set NontermIdent) ((!_rulesIdefinedAttrs) :: Set (Identifier,Identifier)) ((!_rulesIlocals) :: Set Identifier) !con_ ->- {-# LINE 388 "./src-ag/DefaultRules.ag" #-}- let locals = _rulesIlocals- initenv = Map.fromList ( [ (a,_ACHILD)- | (a,_,_) <- _childrenIfields- ]- ++ attrs(_LHS, _lhsIinh)- ++ [ (a,_LOC)- | a <- Set.toList locals- ]- )- attrs (n,as) = [ (a,n) | a <- Map.keys as ]- envs = scanl (flip Map.union)- initenv- (map (Map.fromList . attrs ) _childrenIoutputs)- child_envs = init envs- lhs_env = last envs- (selfAttrs, normalAttrs)- = Map.partitionWithKey (\k _ -> maybe False isSELFNonterminal $ Map.lookup k _lhsIsynOrig) _lhsIsyn- (_,undefAttrs)- = removeDefined _rulesIdefinedAttrs (_LHS, normalAttrs)- (useAttrs,others)- = splitAttrs _lhsIuseMap undefAttrs- (rules1, errors1)- = concatRE $ map (copyRule _lhsIoptions _lhsIwrappers _lhsInt con_ _lhsIcr locals)- (zip envs (map (removeDefined _rulesIdefinedAttrs) _childrenIinputs))- uRules- = map (useRule locals _childrenIoutputs) useAttrs- selfLocRules- = [ selfRule False attr $- lexTokens noPos $- constructor [childSelf attr nm tp | (nm,tp,virt) <- _childrenIfields, childExists virt]- | attr <- Map.keys selfAttrs- , not (Set.member attr locals)- ]- where- childSelf self nm tp- = case tp of NT nt _ _ -> attrName nm self- _ | nm `Set.member` locals -> locName nm- | otherwise -> fieldName nm- constructor fs- = buildConExpr (ocaml _lhsIoptions) _lhsItypeSyns _lhsIo_rename _lhsInt con_ fs- childExists ChildAttr = False- childExists _ = True- selfRules- = [ selfRule True attr [mkLocVar attr noPos Nothing]- | attr <- Map.keys selfAttrs- , not (Set.member (_LHS,attr) _rulesIdefinedAttrs)- ]- (rules5, errs5)- = copyRule _lhsIoptions- _lhsIwrappers- _lhsInt- con_- _lhsIcr- locals- (lhs_env, (_LHS, others))- in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)- {-# LINE 3536 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule202 #-}- {-# LINE 608 "./src-ag/DefaultRules.ag" #-}- rule202 = \ !_augmentsIn !_newRls ((!_rulesIoutput) :: Rules) ->- {-# LINE 608 "./src-ag/DefaultRules.ag" #-}- foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )- {-# LINE 3542 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule203 #-}- {-# LINE 609 "./src-ag/DefaultRules.ag" #-}- rule203 = \ !_aroundsIn !_extra1 ->- {-# LINE 609 "./src-ag/DefaultRules.ag" #-}- foldr addArounds _extra1 (Map.assocs _aroundsIn )- {-# LINE 3548 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule204 #-}- {-# LINE 610 "./src-ag/DefaultRules.ag" #-}- rule204 = \ !_extra2 !_mergesIn ->- {-# LINE 610 "./src-ag/DefaultRules.ag" #-}- foldr addMerges _extra2 (Map.assocs _mergesIn )- {-# LINE 3554 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule205 #-}- {-# LINE 611 "./src-ag/DefaultRules.ag" #-}- rule205 = \ ((!_childrenIoutput) :: Children) !_extra3 ((!_typeSigsIoutput) :: TypeSigs) !con_ !constraints_ !macro_ !params_ ->- {-# LINE 611 "./src-ag/DefaultRules.ag" #-}- Production con_ params_ constraints_ _childrenIoutput _extra3 _typeSigsIoutput macro_- {-# LINE 3560 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule206 #-}- {-# LINE 719 "./src-ag/DefaultRules.ag" #-}- rule206 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ((!_lhsInt) :: NontermIdent) !con_ ->- {-# LINE 719 "./src-ag/DefaultRules.ag" #-}- Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap- {-# LINE 3566 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule207 #-}- {-# LINE 722 "./src-ag/DefaultRules.ag" #-}- rule207 = \ ((!_childrenIinputs) :: [(Identifier, Attributes)]) ((!_childrenIoutputs) :: [(Identifier, Attributes)]) ((!_lhsIinh) :: Attributes) ((!_lhsInt) :: NontermIdent) ((!_lhsIsyn) :: Attributes) !_orderDeps ((!_rulesIlocals) :: Set Identifier) ((!_rulesIruleNames) :: Set Identifier) !con_ ->- {-# LINE 722 "./src-ag/DefaultRules.ag" #-}- let chldOutMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIoutputs ]- chldInMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIinputs ]- isInAttribute :: Identifier -> Identifier -> [Error]- isInAttribute fld nm- | fld == _LOC = if nm `Set.member` _rulesIlocals- then []- else [UndefAttr _lhsInt con_ fld nm False]- | fld == _LHS = if nm `Map.member` _lhsIinh- then []- else [UndefAttr _lhsInt con_ fld nm False]- | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldOutMap)- then []- else [UndefAttr _lhsInt con_ fld nm False]- isOutAttribute :: Identifier -> Identifier -> [Error]- isOutAttribute fld nm- | fld == _LOC = if nm `Set.member` _rulesIlocals- then []- else [UndefAttr _lhsInt con_ fld nm True]- | fld == _LHS = if nm `Map.member` _lhsIsyn- then []- else [UndefAttr _lhsInt con_ fld nm True]- | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldInMap)- then []- else [UndefAttr _lhsInt con_ fld nm True]- existsRule nm = if nm `Set.member` _rulesIruleNames- then []- else [MissingNamedRule _lhsInt con_ nm]- checkIn (OccAttr fld nm) = isInAttribute fld nm- checkIn (OccRule nm) = existsRule nm- checkOut (OccAttr fld nm) = isOutAttribute fld nm- checkOut (OccRule nm) = existsRule nm- in Seq.fromList . concat $- [ checkIn occA ++ checkOut occB- | (Dependency occA occB) <- _orderDeps- ]- {-# LINE 3606 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule208 #-}- {-# LINE 777 "./src-ag/DefaultRules.ag" #-}- rule208 = \ ((!_lhsIaugmentsIn) :: Map ConstructorIdent (Map Identifier [Expression])) !con_ ->- {-# LINE 777 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaugmentsIn- {-# LINE 3612 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule209 #-}- {-# LINE 784 "./src-ag/DefaultRules.ag" #-}- rule209 = \ ((!_lhsIaroundsIn) :: Map ConstructorIdent (Map Identifier [Expression])) !con_ ->- {-# LINE 784 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundsIn- {-# LINE 3618 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule210 #-}- {-# LINE 792 "./src-ag/DefaultRules.ag" #-}- rule210 = \ ((!_lhsImergesIn) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !con_ ->- {-# LINE 792 "./src-ag/DefaultRules.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergesIn- {-# LINE 3624 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule211 #-}- {-# LINE 793 "./src-ag/DefaultRules.ag" #-}- rule211 = \ !_mergesIn ->- {-# LINE 793 "./src-ag/DefaultRules.ag" #-}- Set.fromList [ c | (_,cs,_) <- Map.elems _mergesIn , c <- cs ]- {-# LINE 3630 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule213 #-}- rule213 = \ ((!_rulesIuniq) :: Int) ->- _rulesIuniq- {-# NOINLINE[1] rule215 #-}- rule215 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule216 #-}- rule216 = \ !_merged ->- _merged- {-# NOINLINE[1] rule219 #-}- rule219 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule221 #-}- rule221 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule222 #-}- rule222 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq- {-# NOINLINE[1] rule223 #-}- rule223 = \ ((!_lhsInt) :: NontermIdent) ->- _lhsInt- {-# NOINLINE[1] rule224 #-}- rule224 = \ ((!_lhsIparams) :: [Identifier]) ->- _lhsIparams---- Productions ---------------------------------------------------- wrapper-data Inh_Productions = Inh_Productions { aroundsIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])), augmentsIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])), cr_Inh_Productions :: !(Bool), inh_Inh_Productions :: !(Attributes), inhMap_Inh_Productions :: !(Map Identifier Attributes), inhOrig_Inh_Productions :: !(Attributes), manualAttrOrderMap_Inh_Productions :: !(AttrOrderMap), mergesIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))), nonterminals_Inh_Productions :: !(Set NontermIdent), nt_Inh_Productions :: !(NontermIdent), o_rename_Inh_Productions :: !(Bool), options_Inh_Productions :: !(Options), params_Inh_Productions :: !([Identifier]), syn_Inh_Productions :: !(Attributes), synMap_Inh_Productions :: !(Map Identifier Attributes), synOrig_Inh_Productions :: !(Attributes), typeSyns_Inh_Productions :: !(TypeSyns), uniq_Inh_Productions :: !(Int), useMap_Inh_Productions :: !(Map Identifier (String,String,String)), wrappers_Inh_Productions :: !(Set NontermIdent) }-data Syn_Productions = Syn_Productions { errors_Syn_Productions :: !(Seq Error), output_Syn_Productions :: !(Productions), uniq_Syn_Productions :: !(Int) }-{-# INLINABLE wrap_Productions #-}-wrap_Productions :: T_Productions -> Inh_Productions -> (Syn_Productions )-wrap_Productions !(T_Productions act) !(Inh_Productions _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Productions_vIn8 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers- !(T_Productions_vOut8 _lhsOerrors _lhsOoutput _lhsOuniq) <- return (inv_Productions_s16 sem K_Productions_v8 arg)- return (Syn_Productions _lhsOerrors _lhsOoutput _lhsOuniq)- )---- cata-{-# NOINLINE sem_Productions #-}-sem_Productions :: Productions -> T_Productions -sem_Productions list = Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list)---- semantic domain-newtype T_Productions = T_Productions {- attach_T_Productions :: Identity (T_Productions_s16 )- }-data T_Productions_s16 where C_Productions_s16 :: {- inv_Productions_s16 :: !(forall t. K_Productions_s16 t -> t)- } -> T_Productions_s16 -data T_Productions_s17 = C_Productions_s17-data T_Productions_s30 = C_Productions_s30-newtype T_Productions_s39 = C_Productions_s39 {- inv_Productions_s39 :: (T_Productions_v27 )- }-data K_Productions_s16 k where- K_Productions_v8 :: K_Productions_s16 (T_Productions_v8 )- K_Productions_v17 :: K_Productions_s16 (T_Productions_v17 )- K_Productions_v26 :: K_Productions_s16 (T_Productions_v26 )-type T_Productions_v8 = (T_Productions_vIn8 ) -> (T_Productions_vOut8 )-data T_Productions_vIn8 = T_Productions_vIn8 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Bool) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(Set NontermIdent) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)-data T_Productions_vOut8 = T_Productions_vOut8 !(Seq Error) !(Productions) !(Int)-type T_Productions_v17 = (T_Productions_vIn17 ) -> (T_Productions_vOut17 )-data T_Productions_vIn17 = T_Productions_vIn17 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)-data T_Productions_vOut17 = T_Productions_vOut17 !(Seq Error) !(Productions) !(Int)-type T_Productions_v26 = (T_Productions_vIn26 ) -> (T_Productions_vOut26 )-data T_Productions_vIn26 = T_Productions_vIn26 !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Map Identifier (String,String,String)) !(Set NontermIdent)-data T_Productions_vOut26 = T_Productions_vOut26 !(Seq Error) !(T_Productions_s39 )-type T_Productions_v27 = (T_Productions_vIn27 ) -> (T_Productions_vOut27 )-data T_Productions_vIn27 = T_Productions_vIn27 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !([Identifier]) !(Int)-data T_Productions_vOut27 = T_Productions_vOut27 !(Productions) !(Int)-{-# NOINLINE sem_Productions_Cons #-}-sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions -sem_Productions_Cons arg_hd_ arg_tl_ = T_Productions (return st16) where- {-# NOINLINE st16 #-}- !st16 = let- k16 :: K_Productions_s16 t -> t- k16 K_Productions_v8 = v8- k16 K_Productions_v17 = v17- k16 K_Productions_v26 = v26- v8 :: T_Productions_v8 - v8 = \ !(T_Productions_vIn8 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_hdX14 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_)) in- let !_tlX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_)) in- let !_hdOcr = rule231 _lhsIcr in- let !_hdOinh = rule232 _lhsIinh in- let !_hdOinhMap = rule233 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule235 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule236 _lhsImergesIn in- let !_hdOnt = rule238 _lhsInt in- let !_hdOo_rename = rule239 _lhsIo_rename in- let !_hdOoptions = rule240 _lhsIoptions in- let !_hdOsyn = rule242 _lhsIsyn in- let !_hdOsynMap = rule243 _lhsIsynMap in- let !_hdOsynOrig = rule244 _lhsIsynOrig in- let !_hdOtypeSyns = rule245 _lhsItypeSyns in- let !_hdOuseMap = rule247 _lhsIuseMap in- let !_hdOwrappers = rule248 _lhsIwrappers in- let !_tlOcr = rule251 _lhsIcr in- let !_tlOinh = rule252 _lhsIinh in- let !_tlOinhMap = rule253 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule255 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule256 _lhsImergesIn in- let !_tlOnt = rule258 _lhsInt in- let !_tlOo_rename = rule259 _lhsIo_rename in- let !_tlOoptions = rule260 _lhsIoptions in- let !_tlOsyn = rule262 _lhsIsyn in- let !_tlOsynMap = rule263 _lhsIsynMap in- let !_tlOsynOrig = rule264 _lhsIsynOrig in- let !_tlOtypeSyns = rule265 _lhsItypeSyns in- let !_tlOuseMap = rule267 _lhsIuseMap in- let !_tlOwrappers = rule268 _lhsIwrappers in- let !_hdOaroundsIn = rule229 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule230 _lhsIaugmentsIn in- let !_hdOparams = rule241 _lhsIparams in- let !_hdOuniq = rule246 _lhsIuniq in- let !_tlOaroundsIn = rule249 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule250 _lhsIaugmentsIn in- let !_tlOparams = rule261 _lhsIparams in- let !(T_Production_vOut25 _hdIerrors _hdIoutput _hdIuniq) = inv_Production_s14 _hdX14 K_Production_v25 (T_Production_vIn25 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnt _hdOo_rename _hdOoptions _hdOparams _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in- let !(T_Productions_vOut26 _tlIerrors _tlX39) = inv_Productions_s16 _tlX16 K_Productions_v26 (T_Productions_vIn26 _tlOcr _tlOinh _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnt _tlOo_rename _tlOoptions _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule225 _hdIerrors _tlIerrors in- let !_tlOuniq = rule266 _hdIuniq in- let !(T_Productions_vOut27 _tlIoutput _tlIuniq) = inv_Productions_s39 _tlX39 (T_Productions_vIn27 _tlOaroundsIn _tlOaugmentsIn _tlOparams _tlOuniq) in- let !_output = rule226 _hdIoutput _tlIoutput in- let _lhsOoutput :: Productions- !_lhsOoutput = rule227 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule228 _tlIuniq in- let !__result_ = T_Productions_vOut8 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v17 :: T_Productions_v17 - v17 = \ !(T_Productions_vIn17 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let !_hdX14 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_)) in- let !_tlX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_)) in- let !_hdOcr = rule231 _lhsIcr in- let !_hdOinh = rule232 _lhsIinh in- let !_hdOinhMap = rule233 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule235 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule236 _lhsImergesIn in- let !_hdOnt = rule238 _lhsInt in- let !_hdOo_rename = rule239 _lhsIo_rename in- let !_hdOoptions = rule240 _lhsIoptions in- let !_hdOsyn = rule242 _lhsIsyn in- let !_hdOsynMap = rule243 _lhsIsynMap in- let !_hdOsynOrig = rule244 _lhsIsynOrig in- let !_hdOtypeSyns = rule245 _lhsItypeSyns in- let !_hdOuseMap = rule247 _lhsIuseMap in- let !_hdOwrappers = rule248 _lhsIwrappers in- let !_tlOcr = rule251 _lhsIcr in- let !_tlOinh = rule252 _lhsIinh in- let !_tlOinhMap = rule253 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule255 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule256 _lhsImergesIn in- let !_tlOnt = rule258 _lhsInt in- let !_tlOo_rename = rule259 _lhsIo_rename in- let !_tlOoptions = rule260 _lhsIoptions in- let !_tlOsyn = rule262 _lhsIsyn in- let !_tlOsynMap = rule263 _lhsIsynMap in- let !_tlOsynOrig = rule264 _lhsIsynOrig in- let !_tlOtypeSyns = rule265 _lhsItypeSyns in- let !_tlOuseMap = rule267 _lhsIuseMap in- let !_tlOwrappers = rule268 _lhsIwrappers in- let !_hdOaroundsIn = rule229 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule230 _lhsIaugmentsIn in- let !_hdOparams = rule241 _lhsIparams in- let !_hdOuniq = rule246 _lhsIuniq in- let !_tlOaroundsIn = rule249 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule250 _lhsIaugmentsIn in- let !_tlOparams = rule261 _lhsIparams in- let !(T_Production_vOut25 _hdIerrors _hdIoutput _hdIuniq) = inv_Production_s14 _hdX14 K_Production_v25 (T_Production_vIn25 _hdOaroundsIn _hdOaugmentsIn _hdOcr _hdOinh _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnt _hdOo_rename _hdOoptions _hdOparams _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in- let !(T_Productions_vOut26 _tlIerrors _tlX39) = inv_Productions_s16 _tlX16 K_Productions_v26 (T_Productions_vIn26 _tlOcr _tlOinh _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnt _tlOo_rename _tlOoptions _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule225 _hdIerrors _tlIerrors in- let !_tlOuniq = rule266 _hdIuniq in- let !(T_Productions_vOut27 _tlIoutput _tlIuniq) = inv_Productions_s39 _tlX39 (T_Productions_vIn27 _tlOaroundsIn _tlOaugmentsIn _tlOparams _tlOuniq) in- let !_output = rule226 _hdIoutput _tlIoutput in- let _lhsOoutput :: Productions- !_lhsOoutput = rule227 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule228 _tlIuniq in- let !__result_ = T_Productions_vOut17 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v26 :: T_Productions_v26 - v26 = \ !(T_Productions_vIn26 _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let !_hdX14 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_)) in- let !_tlX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_)) in- let !_hdOcr = rule231 _lhsIcr in- let !_hdOinh = rule232 _lhsIinh in- let !_hdOinhMap = rule233 _lhsIinhMap in- let !_hdOmanualAttrOrderMap = rule235 _lhsImanualAttrOrderMap in- let !_hdOmergesIn = rule236 _lhsImergesIn in- let !_hdOnt = rule238 _lhsInt in- let !_hdOo_rename = rule239 _lhsIo_rename in- let !_hdOoptions = rule240 _lhsIoptions in- let !_hdOsyn = rule242 _lhsIsyn in- let !_hdOsynMap = rule243 _lhsIsynMap in- let !_hdOsynOrig = rule244 _lhsIsynOrig in- let !_hdOtypeSyns = rule245 _lhsItypeSyns in- let !_hdOuseMap = rule247 _lhsIuseMap in- let !_hdOwrappers = rule248 _lhsIwrappers in- let !_tlOcr = rule251 _lhsIcr in- let !_tlOinh = rule252 _lhsIinh in- let !_tlOinhMap = rule253 _lhsIinhMap in- let !_tlOmanualAttrOrderMap = rule255 _lhsImanualAttrOrderMap in- let !_tlOmergesIn = rule256 _lhsImergesIn in- let !_tlOnt = rule258 _lhsInt in- let !_tlOo_rename = rule259 _lhsIo_rename in- let !_tlOoptions = rule260 _lhsIoptions in- let !_tlOsyn = rule262 _lhsIsyn in- let !_tlOsynMap = rule263 _lhsIsynMap in- let !_tlOsynOrig = rule264 _lhsIsynOrig in- let !_tlOtypeSyns = rule265 _lhsItypeSyns in- let !_tlOuseMap = rule267 _lhsIuseMap in- let !_tlOwrappers = rule268 _lhsIwrappers in- let !(T_Production_vOut39 _hdIerrors _hdX48) = inv_Production_s14 _hdX14 K_Production_v39 (T_Production_vIn39 _hdOcr _hdOinh _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnt _hdOo_rename _hdOoptions _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuseMap _hdOwrappers) in- let !(T_Productions_vOut26 _tlIerrors _tlX39) = inv_Productions_s16 _tlX16 K_Productions_v26 (T_Productions_vIn26 _tlOcr _tlOinh _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnt _tlOo_rename _tlOoptions _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuseMap _tlOwrappers) in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule225 _hdIerrors _tlIerrors in- let !__st_ = st39 _hdX48 _tlX39- !__result_ = T_Productions_vOut26 _lhsOerrors __st_- in __result_ )- in C_Productions_s16 k16- {-# NOINLINE st39 #-}- st39 = \ !_hdX48 !_tlX39 -> let- v27 :: T_Productions_v27 - v27 = \ !(T_Productions_vIn27 _lhsIaroundsIn _lhsIaugmentsIn _lhsIparams _lhsIuniq) -> (- let !_hdOaroundsIn = rule229 _lhsIaroundsIn in- let !_hdOaugmentsIn = rule230 _lhsIaugmentsIn in- let !_hdOparams = rule241 _lhsIparams in- let !_hdOuniq = rule246 _lhsIuniq in- let !_tlOaroundsIn = rule249 _lhsIaroundsIn in- let !_tlOaugmentsIn = rule250 _lhsIaugmentsIn in- let !_tlOparams = rule261 _lhsIparams in- let !(T_Production_vOut40 _hdIoutput _hdIuniq) = inv_Production_s48 _hdX48 (T_Production_vIn40 _hdOaroundsIn _hdOaugmentsIn _hdOparams _hdOuniq) in- let !_tlOuniq = rule266 _hdIuniq in- let !(T_Productions_vOut27 _tlIoutput _tlIuniq) = inv_Productions_s39 _tlX39 (T_Productions_vIn27 _tlOaroundsIn _tlOaugmentsIn _tlOparams _tlOuniq) in- let !_output = rule226 _hdIoutput _tlIoutput in- let _lhsOoutput :: Productions- !_lhsOoutput = rule227 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule228 _tlIuniq in- let !__result_ = T_Productions_vOut27 _lhsOoutput _lhsOuniq- in __result_ )- in C_Productions_s39 v27- {-# NOINLINE[1] rule225 #-}- rule225 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# NOINLINE[1] rule226 #-}- rule226 = \ ((!_hdIoutput) :: Production) ((!_tlIoutput) :: Productions) ->- (:) _hdIoutput _tlIoutput- {-# NOINLINE[1] rule227 #-}- rule227 = \ !_output ->- _output- {-# NOINLINE[1] rule228 #-}- rule228 = \ ((!_tlIuniq) :: Int) ->- _tlIuniq- {-# NOINLINE[1] rule229 #-}- rule229 = \ ((!_lhsIaroundsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->- _lhsIaroundsIn- {-# NOINLINE[1] rule230 #-}- rule230 = \ ((!_lhsIaugmentsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->- _lhsIaugmentsIn- {-# NOINLINE[1] rule231 #-}- rule231 = \ ((!_lhsIcr) :: Bool) ->- _lhsIcr- {-# NOINLINE[1] rule232 #-}- rule232 = \ ((!_lhsIinh) :: Attributes) ->- _lhsIinh- {-# NOINLINE[1] rule233 #-}- rule233 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule235 #-}- rule235 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->- _lhsImanualAttrOrderMap- {-# NOINLINE[1] rule236 #-}- rule236 = \ ((!_lhsImergesIn) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->- _lhsImergesIn- {-# NOINLINE[1] rule238 #-}- rule238 = \ ((!_lhsInt) :: NontermIdent) ->- _lhsInt- {-# NOINLINE[1] rule239 #-}- rule239 = \ ((!_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# NOINLINE[1] rule240 #-}- rule240 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule241 #-}- rule241 = \ ((!_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# NOINLINE[1] rule242 #-}- rule242 = \ ((!_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# NOINLINE[1] rule243 #-}- rule243 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule244 #-}- rule244 = \ ((!_lhsIsynOrig) :: Attributes) ->- _lhsIsynOrig- {-# NOINLINE[1] rule245 #-}- rule245 = \ ((!_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# NOINLINE[1] rule246 #-}- rule246 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq- {-# NOINLINE[1] rule247 #-}- rule247 = \ ((!_lhsIuseMap) :: Map Identifier (String,String,String)) ->- _lhsIuseMap- {-# NOINLINE[1] rule248 #-}- rule248 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# NOINLINE[1] rule249 #-}- rule249 = \ ((!_lhsIaroundsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->- _lhsIaroundsIn- {-# NOINLINE[1] rule250 #-}- rule250 = \ ((!_lhsIaugmentsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->- _lhsIaugmentsIn- {-# NOINLINE[1] rule251 #-}- rule251 = \ ((!_lhsIcr) :: Bool) ->- _lhsIcr- {-# NOINLINE[1] rule252 #-}- rule252 = \ ((!_lhsIinh) :: Attributes) ->- _lhsIinh- {-# NOINLINE[1] rule253 #-}- rule253 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# NOINLINE[1] rule255 #-}- rule255 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->- _lhsImanualAttrOrderMap- {-# NOINLINE[1] rule256 #-}- rule256 = \ ((!_lhsImergesIn) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->- _lhsImergesIn- {-# NOINLINE[1] rule258 #-}- rule258 = \ ((!_lhsInt) :: NontermIdent) ->- _lhsInt- {-# NOINLINE[1] rule259 #-}- rule259 = \ ((!_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# NOINLINE[1] rule260 #-}- rule260 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule261 #-}- rule261 = \ ((!_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# NOINLINE[1] rule262 #-}- rule262 = \ ((!_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# NOINLINE[1] rule263 #-}- rule263 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# NOINLINE[1] rule264 #-}- rule264 = \ ((!_lhsIsynOrig) :: Attributes) ->- _lhsIsynOrig- {-# NOINLINE[1] rule265 #-}- rule265 = \ ((!_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# NOINLINE[1] rule266 #-}- rule266 = \ ((!_hdIuniq) :: Int) ->- _hdIuniq- {-# NOINLINE[1] rule267 #-}- rule267 = \ ((!_lhsIuseMap) :: Map Identifier (String,String,String)) ->- _lhsIuseMap- {-# NOINLINE[1] rule268 #-}- rule268 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_Productions_Nil #-}-sem_Productions_Nil :: T_Productions -sem_Productions_Nil = T_Productions (return st16) where- {-# NOINLINE st16 #-}- !st16 = let- k16 :: K_Productions_s16 t -> t- k16 K_Productions_v8 = v8- k16 K_Productions_v17 = v17- k16 K_Productions_v26 = v26- v8 :: T_Productions_v8 - v8 = \ !(T_Productions_vIn8 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule269 () in- let !_output = rule270 () in- let _lhsOoutput :: Productions- !_lhsOoutput = rule271 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule272 _lhsIuniq in- let !__result_ = T_Productions_vOut8 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v17 :: T_Productions_v17 - v17 = \ !(T_Productions_vIn17 _lhsIaroundsIn _lhsIaugmentsIn _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule269 () in- let !_output = rule270 () in- let _lhsOoutput :: Productions- !_lhsOoutput = rule271 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule272 _lhsIuniq in- let !__result_ = T_Productions_vOut17 _lhsOerrors _lhsOoutput _lhsOuniq- in __result_ )- v26 :: T_Productions_v26 - v26 = \ !(T_Productions_vIn26 _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule269 () in- let !__st_ = st39 ()- !__result_ = T_Productions_vOut26 _lhsOerrors __st_- in __result_ )- in C_Productions_s16 k16- {-# NOINLINE st39 #-}- st39 = \ (_ :: ()) -> let- v27 :: T_Productions_v27 - v27 = \ !(T_Productions_vIn27 _lhsIaroundsIn _lhsIaugmentsIn _lhsIparams _lhsIuniq) -> (- let !_output = rule270 () in- let _lhsOoutput :: Productions- !_lhsOoutput = rule271 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule272 _lhsIuniq in- let !__result_ = T_Productions_vOut27 _lhsOoutput _lhsOuniq- in __result_ )- in C_Productions_s39 v27- {-# NOINLINE[1] rule269 #-}- rule269 = \ (_ :: ()) ->- Seq.empty- {-# NOINLINE[1] rule270 #-}- rule270 = \ (_ :: ()) ->- []- {-# NOINLINE[1] rule271 #-}- rule271 = \ !_output ->- _output- {-# NOINLINE[1] rule272 #-}- rule272 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq---- Rule ----------------------------------------------------------- wrapper-data Inh_Rule = Inh_Rule { con_Inh_Rule :: !(ConstructorIdent), nt_Inh_Rule :: !(NontermIdent), options_Inh_Rule :: !(Options), uniq_Inh_Rule :: !(Int) }-data Syn_Rule = Syn_Rule { containsVars_Syn_Rule :: !(Bool), definedAttrs_Syn_Rule :: !(Set (Identifier,Identifier)), errors_Syn_Rule :: !(Seq Error), isPure_Syn_Rule :: !(Bool), locals_Syn_Rule :: !(Set Identifier), output_Syn_Rule :: !(Rule), outputs_Syn_Rule :: !(Rules), ruleNames_Syn_Rule :: !(Set Identifier), uniq_Syn_Rule :: !(Int) }-{-# INLINABLE wrap_Rule #-}-wrap_Rule :: T_Rule -> Inh_Rule -> (Syn_Rule )-wrap_Rule !(T_Rule act) !(Inh_Rule _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Rule_vIn9 _lhsIcon _lhsInt _lhsIoptions _lhsIuniq- !(T_Rule_vOut9 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq) <- return (inv_Rule_s18 sem K_Rule_v9 arg)- return (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq)- )---- cata-{-# INLINE sem_Rule #-}-sem_Rule :: Rule -> T_Rule -sem_Rule ( Rule !mbName_ pattern_ !rhs_ !owrt_ !origin_ !explicit_ !pure_ !identity_ !mbError_ !eager_ ) = sem_Rule_Rule mbName_ ( sem_Pattern pattern_ ) rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_---- semantic domain-newtype T_Rule = T_Rule {- attach_T_Rule :: Identity (T_Rule_s18 )- }-data T_Rule_s18 where C_Rule_s18 :: {- inv_Rule_s18 :: !(forall t. K_Rule_s18 t -> t)- } -> T_Rule_s18 -data T_Rule_s19 = C_Rule_s19-data T_Rule_s41 = C_Rule_s41-newtype T_Rule_s51 = C_Rule_s51 {- inv_Rule_s51 :: (T_Rule_v44 )- }-data K_Rule_s18 k where- K_Rule_v9 :: K_Rule_s18 (T_Rule_v9 )- K_Rule_v29 :: K_Rule_s18 (T_Rule_v29 )- K_Rule_v43 :: K_Rule_s18 (T_Rule_v43 )-type T_Rule_v9 = (T_Rule_vIn9 ) -> (T_Rule_vOut9 )-data T_Rule_vIn9 = T_Rule_vIn9 !(ConstructorIdent) !(NontermIdent) !(Options) !(Int)-data T_Rule_vOut9 = T_Rule_vOut9 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Bool) !(Set Identifier) !(Rule) !(Rules) !(Set Identifier) !(Int)-type T_Rule_v29 = (T_Rule_vIn29 ) -> (T_Rule_vOut29 )-data T_Rule_vIn29 = T_Rule_vIn29 !(Options) !(Int)-data T_Rule_vOut29 = T_Rule_vOut29 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Bool) !(Set Identifier) !(Rules) !(Set Identifier) !(Int)-type T_Rule_v43 = (T_Rule_vIn43 ) -> (T_Rule_vOut43 )-data T_Rule_vIn43 = T_Rule_vIn43 -data T_Rule_vOut43 = T_Rule_vOut43 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Set Identifier) !(T_Rule_s51 )-type T_Rule_v44 = (T_Rule_vIn44 ) -> (T_Rule_vOut44 )-data T_Rule_vIn44 = T_Rule_vIn44 !(Options) !(Int)-data T_Rule_vOut44 = T_Rule_vOut44 !(Bool) !(Bool) !(Rules) !(Int)-{-# NOINLINE sem_Rule_Rule #-}-sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern -> (Expression) -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Bool) -> (Maybe Error) -> (Bool) -> T_Rule -sem_Rule_Rule !arg_mbName_ arg_pattern_ !arg_rhs_ !arg_owrt_ !arg_origin_ !arg_explicit_ !arg_pure_ !arg_identity_ !arg_mbError_ !arg_eager_ = T_Rule (return st18) where- {-# NOINLINE st18 #-}- !st18 = let- k18 :: K_Rule_s18 t -> t- k18 K_Rule_v9 = v9- k18 K_Rule_v29 = v29- k18 K_Rule_v43 = v43- v9 :: T_Rule_v9 - v9 = \ !(T_Rule_vIn9 _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) -> (- let !_patternX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_)) in- let _lhsOisPure :: Bool- !_lhsOisPure = rule273 arg_pure_ in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule277 arg_mbName_ in- let !(T_Pattern_vOut28 _patternIcontainsVars _patternIdefinedAttrs _patternIerrors _patternIlocals _patternIoutput) = inv_Pattern_s10 _patternX10 K_Pattern_v28 (T_Pattern_vIn28 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule278 _patternIcontainsVars in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule279 _patternIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule280 _patternIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule281 _patternIlocals in- let !_output = rule282 _patternIoutput arg_eager_ arg_explicit_ arg_identity_ arg_mbError_ arg_mbName_ arg_origin_ arg_owrt_ arg_pure_ arg_rhs_ in- let _lhsOoutput :: Rule- !_lhsOoutput = rule283 _output in- let !(!_output1,!_mbAlias) = rule274 _output in- let _lhsOuniq :: Int- !(!_outputs,!_lhsOuniq) = rule275 _lhsIoptions _lhsIuniq _output1 in- let _lhsOoutputs :: Rules- !_lhsOoutputs = rule276 _mbAlias _outputs in- let !__result_ = T_Rule_vOut9 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq- in __result_ )- v29 :: T_Rule_v29 - v29 = \ !(T_Rule_vIn29 _lhsIoptions _lhsIuniq) -> (- let !_patternX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_)) in- let _lhsOisPure :: Bool- !_lhsOisPure = rule273 arg_pure_ in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule277 arg_mbName_ in- let !(T_Pattern_vOut28 _patternIcontainsVars _patternIdefinedAttrs _patternIerrors _patternIlocals _patternIoutput) = inv_Pattern_s10 _patternX10 K_Pattern_v28 (T_Pattern_vIn28 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule278 _patternIcontainsVars in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule279 _patternIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule280 _patternIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule281 _patternIlocals in- let !_output = rule282 _patternIoutput arg_eager_ arg_explicit_ arg_identity_ arg_mbError_ arg_mbName_ arg_origin_ arg_owrt_ arg_pure_ arg_rhs_ in- let !(!_output1,!_mbAlias) = rule274 _output in- let _lhsOuniq :: Int- !(!_outputs,!_lhsOuniq) = rule275 _lhsIoptions _lhsIuniq _output1 in- let _lhsOoutputs :: Rules- !_lhsOoutputs = rule276 _mbAlias _outputs in- let !__result_ = T_Rule_vOut29 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutputs _lhsOruleNames _lhsOuniq- in __result_ )- v43 :: T_Rule_v43 - v43 = \ !(T_Rule_vIn43 ) -> (- let !_patternX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_)) in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule277 arg_mbName_ in- let !(T_Pattern_vOut50 _patternIdefinedAttrs _patternIerrors _patternIlocals _patternX55) = inv_Pattern_s10 _patternX10 K_Pattern_v50 (T_Pattern_vIn50 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule279 _patternIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule280 _patternIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule281 _patternIlocals in- let !__st_ = st51 _patternX55- !__result_ = T_Rule_vOut43 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOruleNames __st_- in __result_ )- in C_Rule_s18 k18- {-# NOINLINE st51 #-}- st51 = \ !_patternX55 -> let- v44 :: T_Rule_v44 - v44 = \ !(T_Rule_vIn44 _lhsIoptions _lhsIuniq) -> (- let _lhsOisPure :: Bool- !_lhsOisPure = rule273 arg_pure_ in- let !(T_Pattern_vOut51 _patternIcontainsVars _patternIoutput) = inv_Pattern_s55 _patternX55 K_Pattern_v51 (T_Pattern_vIn51 ) in- let _lhsOcontainsVars :: Bool- !_lhsOcontainsVars = rule278 _patternIcontainsVars in- let !_output = rule282 _patternIoutput arg_eager_ arg_explicit_ arg_identity_ arg_mbError_ arg_mbName_ arg_origin_ arg_owrt_ arg_pure_ arg_rhs_ in- let !(!_output1,!_mbAlias) = rule274 _output in- let _lhsOuniq :: Int- !(!_outputs,!_lhsOuniq) = rule275 _lhsIoptions _lhsIuniq _output1 in- let _lhsOoutputs :: Rules- !_lhsOoutputs = rule276 _mbAlias _outputs in- let !__result_ = T_Rule_vOut44 _lhsOcontainsVars _lhsOisPure _lhsOoutputs _lhsOuniq- in __result_ )- in C_Rule_s51 v44- {-# NOINLINE[1] rule273 #-}- {-# LINE 557 "./src-ag/DefaultRules.ag" #-}- rule273 = \ !pure_ ->- {-# LINE 557 "./src-ag/DefaultRules.ag" #-}- pure_- {-# LINE 4207 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule274 #-}- {-# LINE 624 "./src-ag/DefaultRules.ag" #-}- rule274 = \ !_output ->- {-# LINE 624 "./src-ag/DefaultRules.ag" #-}- mkRuleAlias _output- {-# LINE 4213 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule275 #-}- {-# LINE 625 "./src-ag/DefaultRules.ag" #-}- rule275 = \ ((!_lhsIoptions) :: Options) ((!_lhsIuniq) :: Int) !_output1 ->- {-# LINE 625 "./src-ag/DefaultRules.ag" #-}- if needsMultiRules _lhsIoptions- then multiRule _output1 _lhsIuniq- else ([_output1 ], _lhsIuniq)- {-# LINE 4221 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule276 #-}- {-# LINE 628 "./src-ag/DefaultRules.ag" #-}- rule276 = \ !_mbAlias !_outputs ->- {-# LINE 628 "./src-ag/DefaultRules.ag" #-}- maybe [] return _mbAlias ++ _outputs- {-# LINE 4227 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule277 #-}- {-# LINE 713 "./src-ag/DefaultRules.ag" #-}- rule277 = \ !mbName_ ->- {-# LINE 713 "./src-ag/DefaultRules.ag" #-}- case mbName_ of- Nothing -> Set.empty- Just nm -> Set.singleton nm- {-# LINE 4235 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule278 #-}- rule278 = \ ((!_patternIcontainsVars) :: Bool) ->- _patternIcontainsVars- {-# NOINLINE[1] rule279 #-}- rule279 = \ ((!_patternIdefinedAttrs) :: Set (Identifier,Identifier)) ->- _patternIdefinedAttrs- {-# NOINLINE[1] rule280 #-}- rule280 = \ ((!_patternIerrors) :: Seq Error) ->- _patternIerrors- {-# NOINLINE[1] rule281 #-}- rule281 = \ ((!_patternIlocals) :: Set Identifier) ->- _patternIlocals- {-# NOINLINE[1] rule282 #-}- rule282 = \ ((!_patternIoutput) :: Pattern) !eager_ !explicit_ !identity_ !mbError_ !mbName_ !origin_ !owrt_ !pure_ !rhs_ ->- Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_- {-# INLINE rule283 #-}- rule283 = \ !_output ->- _output---- Rules ---------------------------------------------------------- wrapper-data Inh_Rules = Inh_Rules { con_Inh_Rules :: !(ConstructorIdent), nt_Inh_Rules :: !(NontermIdent), options_Inh_Rules :: !(Options), uniq_Inh_Rules :: !(Int) }-data Syn_Rules = Syn_Rules { definedAttrs_Syn_Rules :: !(Set (Identifier,Identifier)), errors_Syn_Rules :: !(Seq Error), locals_Syn_Rules :: !(Set Identifier), output_Syn_Rules :: !(Rules), ruleNames_Syn_Rules :: !(Set Identifier), uniq_Syn_Rules :: !(Int) }-{-# INLINABLE wrap_Rules #-}-wrap_Rules :: T_Rules -> Inh_Rules -> (Syn_Rules )-wrap_Rules !(T_Rules act) !(Inh_Rules _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_Rules_vIn10 _lhsIcon _lhsInt _lhsIoptions _lhsIuniq- !(T_Rules_vOut10 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq) <- return (inv_Rules_s20 sem K_Rules_v10 arg)- return (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq)- )---- cata-{-# NOINLINE sem_Rules #-}-sem_Rules :: Rules -> T_Rules -sem_Rules list = Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list)---- semantic domain-newtype T_Rules = T_Rules {- attach_T_Rules :: Identity (T_Rules_s20 )- }-data T_Rules_s20 where C_Rules_s20 :: {- inv_Rules_s20 :: !(forall t. K_Rules_s20 t -> t)- } -> T_Rules_s20 -data T_Rules_s21 = C_Rules_s21-data T_Rules_s37 = C_Rules_s37-newtype T_Rules_s42 = C_Rules_s42 {- inv_Rules_s42 :: (T_Rules_v31 )- }-data K_Rules_s20 k where- K_Rules_v10 :: K_Rules_s20 (T_Rules_v10 )- K_Rules_v24 :: K_Rules_s20 (T_Rules_v24 )- K_Rules_v30 :: K_Rules_s20 (T_Rules_v30 )-type T_Rules_v10 = (T_Rules_vIn10 ) -> (T_Rules_vOut10 )-data T_Rules_vIn10 = T_Rules_vIn10 !(ConstructorIdent) !(NontermIdent) !(Options) !(Int)-data T_Rules_vOut10 = T_Rules_vOut10 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Rules) !(Set Identifier) !(Int)-type T_Rules_v24 = (T_Rules_vIn24 ) -> (T_Rules_vOut24 )-data T_Rules_vIn24 = T_Rules_vIn24 !(Options) !(Int)-data T_Rules_vOut24 = T_Rules_vOut24 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Rules) !(Set Identifier) !(Int)-type T_Rules_v30 = (T_Rules_vIn30 ) -> (T_Rules_vOut30 )-data T_Rules_vIn30 = T_Rules_vIn30 -data T_Rules_vOut30 = T_Rules_vOut30 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Set Identifier) !(T_Rules_s42 )-type T_Rules_v31 = (T_Rules_vIn31 ) -> (T_Rules_vOut31 )-data T_Rules_vIn31 = T_Rules_vIn31 !(Options) !(Int)-data T_Rules_vOut31 = T_Rules_vOut31 !(Rules) !(Int)-{-# NOINLINE sem_Rules_Cons #-}-sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules -sem_Rules_Cons arg_hd_ arg_tl_ = T_Rules (return st20) where- {-# NOINLINE st20 #-}- !st20 = let- k20 :: K_Rules_s20 t -> t- k20 K_Rules_v10 = v10- k20 K_Rules_v24 = v24- k20 K_Rules_v30 = v30- v10 :: T_Rules_v10 - v10 = \ !(T_Rules_vIn10 _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) -> (- let !_hdX18 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_)) in- let !_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_)) in- let !_hdOoptions = rule295 _lhsIoptions in- let !_hdOuniq = rule296 _lhsIuniq in- let !_tlOoptions = rule299 _lhsIoptions in- let !(T_Rule_vOut29 _hdIcontainsVars _hdIdefinedAttrs _hdIerrors _hdIisPure _hdIlocals _hdIoutputs _hdIruleNames _hdIuniq) = inv_Rule_s18 _hdX18 K_Rule_v29 (T_Rule_vIn29 _hdOoptions _hdOuniq) in- let !(T_Rules_vOut30 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIruleNames _tlX42) = inv_Rules_s20 _tlX20 K_Rules_v30 (T_Rules_vIn30 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule287 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule288 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule289 _hdIlocals _tlIlocals in- let !_tlOuniq = rule300 _hdIuniq in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule290 _hdIruleNames _tlIruleNames in- let !(T_Rules_vOut31 _tlIoutput _tlIuniq) = inv_Rules_s42 _tlX42 (T_Rules_vIn31 _tlOoptions _tlOuniq) in- let _lhsOoutput :: Rules- !_lhsOoutput = rule286 _hdIcontainsVars _hdIisPure _hdIoutputs _tlIoutput in- let _lhsOuniq :: Int- !_lhsOuniq = rule292 _tlIuniq in- let !__result_ = T_Rules_vOut10 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq- in __result_ )- v24 :: T_Rules_v24 - v24 = \ !(T_Rules_vIn24 _lhsIoptions _lhsIuniq) -> (- let !_hdX18 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_)) in- let !_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_)) in- let !_hdOoptions = rule295 _lhsIoptions in- let !_hdOuniq = rule296 _lhsIuniq in- let !_tlOoptions = rule299 _lhsIoptions in- let !(T_Rule_vOut29 _hdIcontainsVars _hdIdefinedAttrs _hdIerrors _hdIisPure _hdIlocals _hdIoutputs _hdIruleNames _hdIuniq) = inv_Rule_s18 _hdX18 K_Rule_v29 (T_Rule_vIn29 _hdOoptions _hdOuniq) in- let !(T_Rules_vOut30 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIruleNames _tlX42) = inv_Rules_s20 _tlX20 K_Rules_v30 (T_Rules_vIn30 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule287 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule288 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule289 _hdIlocals _tlIlocals in- let !_tlOuniq = rule300 _hdIuniq in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule290 _hdIruleNames _tlIruleNames in- let !(T_Rules_vOut31 _tlIoutput _tlIuniq) = inv_Rules_s42 _tlX42 (T_Rules_vIn31 _tlOoptions _tlOuniq) in- let _lhsOoutput :: Rules- !_lhsOoutput = rule286 _hdIcontainsVars _hdIisPure _hdIoutputs _tlIoutput in- let _lhsOuniq :: Int- !_lhsOuniq = rule292 _tlIuniq in- let !__result_ = T_Rules_vOut24 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq- in __result_ )- v30 :: T_Rules_v30 - v30 = \ !(T_Rules_vIn30 ) -> (- let !_hdX18 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_)) in- let !_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_)) in- let !(T_Rule_vOut43 _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIruleNames _hdX51) = inv_Rule_s18 _hdX18 K_Rule_v43 (T_Rule_vIn43 ) in- let !(T_Rules_vOut30 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIruleNames _tlX42) = inv_Rules_s20 _tlX20 K_Rules_v30 (T_Rules_vIn30 ) in- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule287 _hdIdefinedAttrs _tlIdefinedAttrs in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule288 _hdIerrors _tlIerrors in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule289 _hdIlocals _tlIlocals in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule290 _hdIruleNames _tlIruleNames in- let !__st_ = st42 _hdX51 _tlX42- !__result_ = T_Rules_vOut30 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOruleNames __st_- in __result_ )- in C_Rules_s20 k20- {-# NOINLINE st42 #-}- st42 = \ !_hdX51 !_tlX42 -> let- v31 :: T_Rules_v31 - v31 = \ !(T_Rules_vIn31 _lhsIoptions _lhsIuniq) -> (- let !_hdOoptions = rule295 _lhsIoptions in- let !_hdOuniq = rule296 _lhsIuniq in- let !_tlOoptions = rule299 _lhsIoptions in- let !(T_Rule_vOut44 _hdIcontainsVars _hdIisPure _hdIoutputs _hdIuniq) = inv_Rule_s51 _hdX51 (T_Rule_vIn44 _hdOoptions _hdOuniq) in- let !_tlOuniq = rule300 _hdIuniq in- let !(T_Rules_vOut31 _tlIoutput _tlIuniq) = inv_Rules_s42 _tlX42 (T_Rules_vIn31 _tlOoptions _tlOuniq) in- let _lhsOoutput :: Rules- !_lhsOoutput = rule286 _hdIcontainsVars _hdIisPure _hdIoutputs _tlIoutput in- let _lhsOuniq :: Int- !_lhsOuniq = rule292 _tlIuniq in- let !__result_ = T_Rules_vOut31 _lhsOoutput _lhsOuniq- in __result_ )- in C_Rules_s42 v31- {-# NOINLINE[1] rule286 #-}- {-# LINE 620 "./src-ag/DefaultRules.ag" #-}- rule286 = \ ((!_hdIcontainsVars) :: Bool) ((!_hdIisPure) :: Bool) ((!_hdIoutputs) :: Rules) ((!_tlIoutput) :: Rules) ->- {-# LINE 620 "./src-ag/DefaultRules.ag" #-}- if _hdIcontainsVars && _hdIisPure then _hdIoutputs ++ _tlIoutput else _tlIoutput- {-# LINE 4401 "dist/build/DefaultRules.hs"#-}- {-# NOINLINE[1] rule287 #-}- rule287 = \ ((!_hdIdefinedAttrs) :: Set (Identifier,Identifier)) ((!_tlIdefinedAttrs) :: Set (Identifier,Identifier)) ->- _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs- {-# NOINLINE[1] rule288 #-}- rule288 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# NOINLINE[1] rule289 #-}- rule289 = \ ((!_hdIlocals) :: Set Identifier) ((!_tlIlocals) :: Set Identifier) ->- _hdIlocals `Set.union` _tlIlocals- {-# NOINLINE[1] rule290 #-}- rule290 = \ ((!_hdIruleNames) :: Set Identifier) ((!_tlIruleNames) :: Set Identifier) ->- _hdIruleNames `Set.union` _tlIruleNames- {-# NOINLINE[1] rule292 #-}- rule292 = \ ((!_tlIuniq) :: Int) ->- _tlIuniq- {-# NOINLINE[1] rule295 #-}- rule295 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule296 #-}- rule296 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq- {-# NOINLINE[1] rule299 #-}- rule299 = \ ((!_lhsIoptions) :: Options) ->- _lhsIoptions- {-# NOINLINE[1] rule300 #-}- rule300 = \ ((!_hdIuniq) :: Int) ->- _hdIuniq-{-# NOINLINE sem_Rules_Nil #-}-sem_Rules_Nil :: T_Rules -sem_Rules_Nil = T_Rules (return st20) where- {-# NOINLINE st20 #-}- !st20 = let- k20 :: K_Rules_s20 t -> t- k20 K_Rules_v10 = v10- k20 K_Rules_v24 = v24- k20 K_Rules_v30 = v30- v10 :: T_Rules_v10 - v10 = \ !(T_Rules_vIn10 _lhsIcon _lhsInt _lhsIoptions _lhsIuniq) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule301 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule302 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule303 () in- let !_output = rule305 () in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule304 () in- let _lhsOoutput :: Rules- !_lhsOoutput = rule306 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule307 _lhsIuniq in- let !__result_ = T_Rules_vOut10 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq- in __result_ )- v24 :: T_Rules_v24 - v24 = \ !(T_Rules_vIn24 _lhsIoptions _lhsIuniq) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule301 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule302 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule303 () in- let !_output = rule305 () in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule304 () in- let _lhsOoutput :: Rules- !_lhsOoutput = rule306 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule307 _lhsIuniq in- let !__result_ = T_Rules_vOut24 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq- in __result_ )- v30 :: T_Rules_v30 - v30 = \ !(T_Rules_vIn30 ) -> (- let _lhsOdefinedAttrs :: Set (Identifier,Identifier)- !_lhsOdefinedAttrs = rule301 () in- let _lhsOerrors :: Seq Error- !_lhsOerrors = rule302 () in- let _lhsOlocals :: Set Identifier- !_lhsOlocals = rule303 () in- let _lhsOruleNames :: Set Identifier- !_lhsOruleNames = rule304 () in- let !__st_ = st42 ()- !__result_ = T_Rules_vOut30 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOruleNames __st_- in __result_ )- in C_Rules_s20 k20- {-# NOINLINE st42 #-}- st42 = \ (_ :: ()) -> let- v31 :: T_Rules_v31 - v31 = \ !(T_Rules_vIn31 _lhsIoptions _lhsIuniq) -> (- let !_output = rule305 () in- let _lhsOoutput :: Rules- !_lhsOoutput = rule306 _output in- let _lhsOuniq :: Int- !_lhsOuniq = rule307 _lhsIuniq in- let !__result_ = T_Rules_vOut31 _lhsOoutput _lhsOuniq- in __result_ )- in C_Rules_s42 v31- {-# NOINLINE[1] rule301 #-}- rule301 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule302 #-}- rule302 = \ (_ :: ()) ->- Seq.empty- {-# NOINLINE[1] rule303 #-}- rule303 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule304 #-}- rule304 = \ (_ :: ()) ->- Set.empty- {-# NOINLINE[1] rule305 #-}- rule305 = \ (_ :: ()) ->- []- {-# NOINLINE[1] rule306 #-}- rule306 = \ !_output ->- _output- {-# NOINLINE[1] rule307 #-}- rule307 = \ ((!_lhsIuniq) :: Int) ->- _lhsIuniq---- TypeSig -------------------------------------------------------- wrapper-data Inh_TypeSig = Inh_TypeSig { nt_Inh_TypeSig :: !(NontermIdent), params_Inh_TypeSig :: !([Identifier]) }-data Syn_TypeSig = Syn_TypeSig { output_Syn_TypeSig :: !(TypeSig) }-{-# INLINABLE wrap_TypeSig #-}-wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> (Syn_TypeSig )-wrap_TypeSig !(T_TypeSig act) !(Inh_TypeSig _lhsInt _lhsIparams) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_TypeSig_vIn11 _lhsInt _lhsIparams- !(T_TypeSig_vOut11 _lhsOoutput) <- return (inv_TypeSig_s22 sem arg)- return (Syn_TypeSig _lhsOoutput)- )---- cata-{-# INLINE sem_TypeSig #-}-sem_TypeSig :: TypeSig -> T_TypeSig -sem_TypeSig ( TypeSig !name_ !tp_ ) = sem_TypeSig_TypeSig name_ tp_---- semantic domain-newtype T_TypeSig = T_TypeSig {- attach_T_TypeSig :: Identity (T_TypeSig_s22 )- }-newtype T_TypeSig_s22 = C_TypeSig_s22 {- inv_TypeSig_s22 :: (T_TypeSig_v11 )- }-data T_TypeSig_s23 = C_TypeSig_s23-type T_TypeSig_v11 = (T_TypeSig_vIn11 ) -> (T_TypeSig_vOut11 )-data T_TypeSig_vIn11 = T_TypeSig_vIn11 !(NontermIdent) !([Identifier])-data T_TypeSig_vOut11 = T_TypeSig_vOut11 !(TypeSig)-{-# NOINLINE sem_TypeSig_TypeSig #-}-sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig -sem_TypeSig_TypeSig !arg_name_ !arg_tp_ = T_TypeSig (return st22) where- {-# NOINLINE st22 #-}- !st22 = let- v11 :: T_TypeSig_v11 - v11 = \ !(T_TypeSig_vIn11 _lhsInt _lhsIparams) -> (- let !_tp1 = rule308 _lhsInt _lhsIparams arg_tp_ in- let _lhsOoutput :: TypeSig- !_lhsOoutput = rule309 _tp1 arg_name_ in- let !__result_ = T_TypeSig_vOut11 _lhsOoutput- in __result_ )- in C_TypeSig_s22 v11- {-# INLINE rule308 #-}- {-# LINE 576 "./src-ag/DefaultRules.ag" #-}- rule308 = \ ((!_lhsInt) :: NontermIdent) ((!_lhsIparams) :: [Identifier]) !tp_ ->- {-# LINE 576 "./src-ag/DefaultRules.ag" #-}- elimSelfId _lhsInt _lhsIparams tp_- {-# LINE 4568 "dist/build/DefaultRules.hs"#-}- {-# INLINE rule309 #-}- {-# LINE 617 "./src-ag/DefaultRules.ag" #-}- rule309 = \ !_tp1 !name_ ->- {-# LINE 617 "./src-ag/DefaultRules.ag" #-}- TypeSig name_ _tp1- {-# LINE 4574 "dist/build/DefaultRules.hs"#-}---- TypeSigs ------------------------------------------------------- wrapper-data Inh_TypeSigs = Inh_TypeSigs { nt_Inh_TypeSigs :: !(NontermIdent), params_Inh_TypeSigs :: !([Identifier]) }-data Syn_TypeSigs = Syn_TypeSigs { output_Syn_TypeSigs :: !(TypeSigs) }-{-# INLINABLE wrap_TypeSigs #-}-wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> (Syn_TypeSigs )-wrap_TypeSigs !(T_TypeSigs act) !(Inh_TypeSigs _lhsInt _lhsIparams) =- Control.Monad.Identity.runIdentity (- do !sem <- act- let arg = T_TypeSigs_vIn12 _lhsInt _lhsIparams- !(T_TypeSigs_vOut12 _lhsOoutput) <- return (inv_TypeSigs_s24 sem arg)- return (Syn_TypeSigs _lhsOoutput)- )---- cata-{-# NOINLINE sem_TypeSigs #-}-sem_TypeSigs :: TypeSigs -> T_TypeSigs -sem_TypeSigs list = Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list)---- semantic domain-newtype T_TypeSigs = T_TypeSigs {- attach_T_TypeSigs :: Identity (T_TypeSigs_s24 )- }-newtype T_TypeSigs_s24 = C_TypeSigs_s24 {- inv_TypeSigs_s24 :: (T_TypeSigs_v12 )- }-data T_TypeSigs_s25 = C_TypeSigs_s25-type T_TypeSigs_v12 = (T_TypeSigs_vIn12 ) -> (T_TypeSigs_vOut12 )-data T_TypeSigs_vIn12 = T_TypeSigs_vIn12 !(NontermIdent) !([Identifier])-data T_TypeSigs_vOut12 = T_TypeSigs_vOut12 !(TypeSigs)-{-# NOINLINE sem_TypeSigs_Cons #-}-sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs -sem_TypeSigs_Cons arg_hd_ arg_tl_ = T_TypeSigs (return st24) where- {-# NOINLINE st24 #-}- !st24 = let- v12 :: T_TypeSigs_v12 - v12 = \ !(T_TypeSigs_vIn12 _lhsInt _lhsIparams) -> (- let !_hdX22 = Control.Monad.Identity.runIdentity (attach_T_TypeSig (arg_hd_)) in- let !_tlX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_tl_)) in- let !_hdOnt = rule313 _lhsInt in- let !_hdOparams = rule314 _lhsIparams in- let !_tlOnt = rule315 _lhsInt in- let !_tlOparams = rule316 _lhsIparams in- let !(T_TypeSig_vOut11 _hdIoutput) = inv_TypeSig_s22 _hdX22 (T_TypeSig_vIn11 _hdOnt _hdOparams) in- let !(T_TypeSigs_vOut12 _tlIoutput) = inv_TypeSigs_s24 _tlX24 (T_TypeSigs_vIn12 _tlOnt _tlOparams) in- let !_output = rule311 _hdIoutput _tlIoutput in- let _lhsOoutput :: TypeSigs- !_lhsOoutput = rule312 _output in- let !__result_ = T_TypeSigs_vOut12 _lhsOoutput- in __result_ )- in C_TypeSigs_s24 v12- {-# INLINE rule311 #-}- rule311 = \ ((!_hdIoutput) :: TypeSig) ((!_tlIoutput) :: TypeSigs) ->- (:) _hdIoutput _tlIoutput- {-# INLINE rule312 #-}- rule312 = \ !_output ->- _output- {-# INLINE rule313 #-}- rule313 = \ ((!_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule314 #-}- rule314 = \ ((!_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule315 #-}- rule315 = \ ((!_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule316 #-}- rule316 = \ ((!_lhsIparams) :: [Identifier]) ->- _lhsIparams-{-# NOINLINE sem_TypeSigs_Nil #-}-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil = T_TypeSigs (return st24) where- {-# NOINLINE st24 #-}- !st24 = let- v12 :: T_TypeSigs_v12 - v12 = \ !(T_TypeSigs_vIn12 _lhsInt _lhsIparams) -> (- let !_output = rule317 () in- let _lhsOoutput :: TypeSigs- !_lhsOoutput = rule318 _output in- let !__result_ = T_TypeSigs_vOut12 _lhsOoutput- in __result_ )- in C_TypeSigs_s24 v12- {-# INLINE rule317 #-}- rule317 = \ (_ :: ()) ->- []- {-# INLINE rule318 #-}- rule318 = \ !_output ->+{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 12 "dist/build/DefaultRules.hs" #-}++{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 24 "dist/build/DefaultRules.hs" #-}++{-# LINE 15 "./src-ag/DefaultRules.ag" #-}++import qualified Data.List+import qualified Data.Set as Set+import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq,(><))+import UU.Scanner.Position(noPos)+import Pretty+import Data.Maybe+import HsToken+import HsTokenScanner+import Data.List(intersperse)+import Data.Char++import AbstractSyntax+import ErrorMessages++import Options+{-# LINE 46 "dist/build/DefaultRules.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 80 "./src-ag/DefaultRules.ag" #-}++fieldName n = '@' : getName n++locName n = "@loc." ++ getName n++attrName fld attr+ | fld == _LOC = locName attr+ | fld == _FIELD = fieldName attr+ | otherwise = '@' : getName fld ++ "." ++ getName attr++_ACHILD = Ident "(" noPos -- hack++mkLocVar = AGField _LOC++isRecordConstructor :: NontermIdent -> Map NontermIdent ConstructorType -> Bool+isRecordConstructor nt ctm = Map.lookup nt ctm == Just RecordConstructor++buildConExpr ocaml clean conmap typeSyns rename nt con1 fs'+ | nt `elem` map fst typeSyns = if ocaml then synonymMl+ else if clean then synonymClean+ else synonymHs+ | otherwise = normalExpr+ where fs = map fst fs'+ con = getName con1+ tup = " " ++ buildTuple fs+ args = " " ++ unwords fs+ normalExpr = if clean && isRecordConstructor nt conmap+ then "{" ++ con ++ "|" +++ unwords (intersperse "," $ map (\(new, old) -> getName old ++ " = " ++ new) fs')+ ++ "}"+ else conname' ++ args++ conname' | rename = getName nt ++ "_" ++ getName con1+ | otherwise = getName con1++ synonymHs | con == "Tuple" = buildTuple fs+ | con == "Cons" = "(:)" ++ args+ | con == "Nil" = case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.empty"+ Just (IntMap _) -> "Data.IntMap.empty"+ Just (OrdSet _) -> "Data.Set.empty"+ Just IntSet -> "Data.IntSet.empty"+ _ -> "[]"+ | con == "Just" = "Just" ++ args+ | con == "Nothing" = "Nothing"+ | con == "Entry" = ( case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.insert"+ Just (IntMap _) -> "Data.IntMap.insert"+ Just (OrdSet _) -> "Data.Set.insert"+ Just IntSet -> "Data.IntSet.insert" ) ++ args+ | otherwise = normalExpr++ synonymMl | con == "Tuple" = buildTuple fs+ | con == "Cons" = "(::)" ++ tup+ | con == "Nil" = case lookup nt typeSyns of+ Just (Map _ _) -> prefixMod nt "empty"+ Just (IntMap _) -> prefixMod nt "empty"+ Just (OrdSet _) -> prefixMod nt "empty"+ Just IntSet -> prefixMod nt "empty"+ _ -> "[]"+ | con == "Just" = "Some" ++ tup+ | con == "Nothing" = "None"+ | con == "Entry" = ( case lookup nt typeSyns of+ Just (Map _ _) -> prefixMod nt "add"+ Just (IntMap _) -> prefixMod nt "add"+ Just (OrdSet _) -> prefixMod nt "add"+ Just IntSet -> prefixMod nt "add" ) ++ args+ | otherwise = normalExpr++ synonymClean | con == "Tuple" = buildTuple fs+ | con == "Cons" = "(\\x xs -> [x:xs])" ++ args+ | con == "Nil" = case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.empty"+ Just (IntMap _) -> "Data.IntMap.empty"+ Just (OrdSet _) -> "Data.Set.empty"+ Just IntSet -> "Data.IntSet.empty"+ _ -> "[]"+ | con == "Just" = "Just" ++ args+ | con == "Nothing" = "Nothing"+ | con == "Entry" = ( case lookup nt typeSyns of+ Just (Map _ _) -> "Data.Map.insert"+ Just (IntMap _) -> "Data.IntMap.insert"+ Just (OrdSet _) -> "Data.Set.insert"+ Just IntSet -> "Data.IntSet.insert" ) ++ args+ | otherwise = normalExpr+++ prefixMod nt nm = "M_" ++ getName nt ++ "." ++ nm++concatSeq = foldr (Seq.><) Seq.empty++splitAttrs :: Map Identifier a -> [Identifier] -> ([(Identifier,a)],[Identifier]) -- a used as (String,String)+splitAttrs _ []+ = ([],[])+splitAttrs useMap (n:rest)+ = let (uses,normals) = splitAttrs useMap rest+ in case Map.lookup n useMap of+ Just x -> ((n,x):uses , normals )+ Nothing -> ( uses , n:normals )++removeDefined :: Set (Identifier,Identifier) -> (Identifier,Attributes) -> (Identifier,[Identifier])+removeDefined defined (fld,as)+ = ( fld+ , [ a+ | a <- Map.keys as+ , not (Set.member (fld,a) defined)+ ]+ )++{-# LINE 159 "dist/build/DefaultRules.hs" #-}++{-# LINE 255 "./src-ag/DefaultRules.ag" #-}+++++deprecatedCopyRuleError nt con fld a+ = let mesg =+ "In the definitions for alternative"+ >#< getName con+ >#< "of nonterminal"+ >#< getName nt+ >|< ","+ >-< "the value of field"+ >#< getName a+ >#< "is copied by a copy-rule."+ >-< "Copying the value of a field using a copy-rule is deprecated"+ >-< "Please add the following lines to your code:"+ >-< ( "SEM"+ >#< getName nt+ >-< indent 2 ( "|"+ >#< getName con+ >#< getName fld+ >#< "."+ >#< a+ >#< "="+ >#< "@"+ >|< a+ )+ )+ in CustomError True (getPos a) mesg+++missingRuleErrorExpr clean nt con fld a+ = (if clean then "abort" else "error")+ ++ " \"missing rule: "+ ++ show nt ++ "." ++ show con ++ "."+ ++ show fld ++ "." ++ show a ++ "\""++makeRule :: (Identifier,Identifier) -> Expression -> String -> Bool -> Maybe Error -> Rule+makeRule (f1,a1) expr origin identity mbDelayedError+ = Rule Nothing+ (Alias f1 a1 (Underscore noPos))+ expr+ False+ origin+ False+ True+ identity+ mbDelayedError+ False+++useRule :: Options -> Set Identifier -> [(Identifier,Attributes)] -> (Identifier,(String,String,String)) -> Rule+useRule opts locals ch_outs (n,(op,e,pos))+ = let elems = [ fld+ | (fld,as) <- ch_outs+ , Map.member n as+ ]++ isOp [] = False+ isOp (c:cs)+ | isSpace c = isOp cs+ | isAlpha c = case dropWhile isAlpha cs of+ ('.':cs2) -> isOp cs2 -- fully qualified name, drop prefix+ _ -> False+ | c == '(' = False+ | otherwise = True++ tks | Set.member n locals = [mkLocVar n noPos Nothing]+ | null elems = lexTokens opts noPos e+ | otherwise = lexTokens opts noPos str+ where+ opExpr l r+ | isOp op = l ++ " " ++ op ++ " " ++ r -- takes the associativity of the operator+ | otherwise = "(" ++ op ++ " " ++ l ++ " " ++ r ++ ")" -- associates to the right+ str = foldr1 opExpr (map (flip attrName n) elems)++ in makeRule (_LHS,n)+ (Expression noPos tks)+ ("use rule " ++ pos)+ False+ Nothing+++selfRule :: Bool -> Identifier -> [HsToken] -> Rule+selfRule lhsNecLoc attr tks+ = makeRule (if lhsNecLoc then _LHS else _LOC,attr)+ (Expression noPos tks)+ "self rule"+ False+ Nothing+++++concatRE rsess = let (rss,ess) = unzip rsess+ in (concat rss, concatSeq ess)+++copyRule :: Options -> Set NontermIdent -> Identifier -> Identifier -> Bool -> Set Identifier -> (Map Identifier Identifier, (Identifier,[Identifier])) -> ([Rule], Seq Error)+copyRule options wrappers nt con modcopy locals (env,(fld,as))+ = concatRE (map copyRu as)++ where+ copyRu a+ = ( [ makeRule (fld,a)+ (Expression noPos tks)+ (cruletxt sel)+ True+ mbDelayedErr+ ]+ , err+ )++ where+ sel+ | not modcopy+ && Set.member a locals = Just _LOC+ | otherwise = Map.lookup a env++ (tks,err,mbDelayedErr)+ = case sel of+ Nothing -> let tks = [HsToken (missingRuleErrorExpr (clean options) nt con fld a) noPos]+ err = MissingRule nt con fld a+ in if nt `Set.member` wrappers && kennedyWarren options+ then (tks, Seq.empty, Just err) -- yield error only if the rule is actually scheduled; for kennedyWarren code gen only+ else (tks, Seq.singleton err, Nothing)+ Just f+ | f == _ACHILD -> ( [AGLocal a noPos Nothing]+ , Seq.singleton (deprecatedCopyRuleError nt con fld a)+ , Nothing+ )+ | otherwise -> ( [AGField f a noPos Nothing]+ , Seq.empty+ , Nothing+ )++ cruletxt sel+ | local = "copy rule (from local)"+ | deprChild = "deprecated child copy"+ | Set.member a locals && nonlocal = "modified copy rule"+ | incoming && outgoing = "copy rule (chain)"+ | incoming = "copy rule (down)"+ | outgoing = "copy rule (up)"+ | otherwise = "copy rule (chain)"+ where outgoing = fld == _LHS+ incoming = maybe False (== _LHS) sel+ nonlocal = maybe False (/= _LOC) sel+ local = maybe False (== _LOC) sel+ deprChild = maybe False (== _ACHILD) sel+{-# LINE 311 "dist/build/DefaultRules.hs" #-}++{-# LINE 488 "./src-ag/DefaultRules.ag" #-}++buildTuple fs = "(" ++ concat (intersperse "," fs) ++ ")"++addAugments :: (Identifier, [Expression]) -> [Rule] -> [Rule]+addAugments (_, exprs) rules+ | null exprs = rules+addAugments (syn, exprs) rules+ = [rule] ++ funRules ++ map modify rules+ where+ rule = Rule Nothing (Alias _LHS syn (Underscore noPos)) rhs False "augmented rule" False True False Nothing False+ rhs = Expression noPos tks+ tks = [ HsToken "foldr ($) " noPos, mkLocVar substSyn noPos Nothing, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]+ funs = intersperse (HsToken ", " noPos) (map (\n -> mkLocVar n noPos Nothing) funNames)++ substSyn = Ident (show syn ++ "_augmented_syn") (getPos syn)+ funNames = zipWith (\i _ -> Ident (show syn ++ "_augmented_f" ++ show i) (getPos syn)) [1..] exprs+ funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "augment function" False True False Nothing False) funNames exprs++ modify (Rule mbNm pat rhs owrt origin expl pure identity mbErr eager)+ | containsSyn pat = Rule mbNm (modifyPat pat) rhs owrt origin expl pure identity mbErr eager+ modify r = r++ containsSyn (Constr _ pats) = any containsSyn pats+ containsSyn (Product _ pats) = any containsSyn pats+ containsSyn (Irrefutable pat) = containsSyn pat+ containsSyn (Alias field attr pat) = (field == _LHS && attr == syn) || containsSyn pat+ containsSyn _ = False++ modifyPat (Constr name pats) = Constr name (map modifyPat pats)+ modifyPat (Product pos pats) = Product pos (map modifyPat pats)+ modifyPat (Irrefutable pat) = Irrefutable (modifyPat pat)+ modifyPat (Alias field attr pat)+ | field == _LHS && attr == syn = Alias _LOC substSyn (modifyPat pat)+ | otherwise = Alias field attr (modifyPat pat)+ modifyPat p = p++-- adds the additional rules needed for around, which creates a sequence of+-- rules that form a function that each transforms the semantics of a child+-- before attaching the child.+-- The rule defines a local attribute "<child>_around" and <child> is dependent+-- on this attribute.+addArounds :: (Identifier, [Expression]) -> [Rule] -> [Rule]+addArounds (_, exprs) rules | null exprs = rules+addArounds (child, exprs) rules+ = [rule] ++ funRules ++ rules+ where+ rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) rhs False "around rule" False True False Nothing False+ rhs = Expression noPos tks+ tks = [ HsToken "\\s -> foldr ($) s " noPos, HsToken " [" noPos] ++ funs ++ [HsToken "]" noPos]+ funs = intersperse (HsToken ", " noPos) (map (\n -> mkLocVar n noPos Nothing) funNames)++ childLoc = Ident (show child ++ "_around") (getPos child)+ funNames = zipWith (\i _ -> Ident (show child ++ "_around_f" ++ show i) (getPos child)) [1..] exprs+ funRules = zipWith (\name expr -> Rule Nothing (Alias _LOC name (Underscore noPos)) expr False "around function" False True False Nothing False) funNames exprs++-- adds the additional rules needed for merging.+-- It produces for each merging child a rule with local attribute: "<child>_merged".+-- this rules takes the semantics of the first children and feeds it to the function+-- represented by this attribute. This attribute then defines the semantics for+-- the merging child.+addMerges :: (Identifier, (Identifier,[Identifier],Expression)) -> [Rule] -> [Rule]+addMerges (target,(_,_,expr)) rules+ = rule : rules+ where+ rule = Rule Nothing (Alias _LOC childLoc (Underscore noPos)) expr False "merge rule" False True False Nothing False+ childLoc = Ident (show target ++ "_merge") (getPos target)+{-# LINE 380 "dist/build/DefaultRules.hs" #-}++{-# LINE 606 "./src-ag/DefaultRules.ag" #-}++elimSelfId :: NontermIdent -> [Identifier] -> Type -> Type+elimSelfId nt args Self = NT nt (map getName args) False+elimSelfId _ _ tp = tp++elimSelfStr :: NontermIdent -> [String] -> Type -> Type+elimSelfStr nt args Self = NT nt args False+elimSelfStr _ _ tp = tp+{-# LINE 391 "dist/build/DefaultRules.hs" #-}++{-# LINE 658 "./src-ag/DefaultRules.ag" #-}++-- When a rule has a name, create an alias for a rule+-- and a modified rule that refers to the alias+-- Thus it removes rule names from rules+mkRuleAlias :: Rule -> (Rule, Maybe Rule)+mkRuleAlias r@(Rule Nothing _ _ _ _ _ _ _ _ _) = (r, Nothing)+mkRuleAlias (Rule (Just nm) pat expr owrt origin expl pure identity mbErr eager) = (r', Just alias) where+ alias = Rule Nothing (Alias _LOC (Ident ("_rule_" ++ show nm) pos) (Underscore pos)) expr owrt origin expl pure identity mbErr eager+ pos = getPos nm+ expr' = Expression pos tks+ tks = [mkLocVar (Ident ("_rule_" ++ show nm) pos) pos (Just ("Indirection to rule " ++ show nm))]+ r' = Rule Nothing pat expr' owrt origin False True identity Nothing False+{-# LINE 406 "dist/build/DefaultRules.hs" #-}++{-# LINE 675 "./src-ag/DefaultRules.ag" #-}++needsMultiRules :: Options -> Bool+needsMultiRules opts = (visit opts || withCycle opts) && not (kennedyWarren opts)+{-# LINE 412 "dist/build/DefaultRules.hs" #-}++{-# LINE 680 "./src-ag/DefaultRules.ag" #-}++{-+multiRule replaces+ loc.(a,b) = e+by+ loc.tup1 = e+ loc.(a,_) = @loc.tup1+ loc.(_,b) = @loc.tup1+It needs to thread a unique number for inventing names for the tuples.++It also works for nested tuples:+ loc.(a,(b,c)) = e+becomes+ loc.tup1 = e+ loc.(a,_) = @loc.tup1+ loc.(_,tup2) = @loc.tup1+ loc.(b,_) = @loc.tup2+ loc.(_,c) = @loc.tup2+-}++multiRule :: Rule -> Int -> ([Rule], Int)+multiRule (Rule _ pat expr owrt origin expl pure identity mbErr eager) uniq+ = let f :: Bool -> (Pattern->Pattern) -> Expression -> Pattern -> Int -> (Pattern, ([Rule], Int))+ f expl' w e (Product pos pats) n+ = let freshName = Ident ("_tup" ++ show n) pos+ freshExpr = Expression pos freshTks+ freshTks = [AGField _LOC freshName pos Nothing]+ freshPat = Alias _LOC freshName (Underscore pos)+ a = length pats - 1+ us b p = Product pos (replicate (a-b) (Underscore pos) ++ [p] ++ replicate b (Underscore pos))+ g :: Pattern -> ([Pattern],[Rule],Int) -> ([Pattern],[Rule],Int)+ g p (xs1,rs1,n1) = let (x2,(rs2,n2)) = f False (us (length xs1)) freshExpr p n1+ in (x2:xs1, rs2++rs1, n2)+ (xs9,rs9,n9) = foldr g ([], [], n+1) pats+ in ( freshPat+ , ( Rule Nothing (w freshPat) e owrt origin expl' True False mbErr eager : rs9+ , n9+ )+ )+ f expl' w e p n+ = ( p+ , ( [Rule Nothing (w p) e owrt origin expl' True False mbErr eager]+ , n+ )+ )+ in snd (f expl id expr pat uniq)++{-# LINE 462 "dist/build/DefaultRules.hs" #-}+-- Child -------------------------------------------------------+-- wrapper+data Inh_Child = Inh_Child { con_Inh_Child :: !(ConstructorIdent), cr_Inh_Child :: !(Bool), inhMap_Inh_Child :: !(Map Identifier Attributes), merged_Inh_Child :: !(Set Identifier), nt_Inh_Child :: !(NontermIdent), params_Inh_Child :: !([Identifier]), synMap_Inh_Child :: !(Map Identifier Attributes) }+data Syn_Child = Syn_Child { errors_Syn_Child :: !(Seq Error), field_Syn_Child :: !( (Identifier,Type,ChildKind) ), inherited_Syn_Child :: !(Attributes), name_Syn_Child :: !(Identifier), output_Syn_Child :: !(Child), synthesized_Syn_Child :: !(Attributes) }+{-# INLINABLE wrap_Child #-}+wrap_Child :: T_Child -> Inh_Child -> (Syn_Child )+wrap_Child !(T_Child act) !(Inh_Child _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Child_vIn0 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap+ !(T_Child_vOut0 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized) <- return (inv_Child_s0 sem K_Child_v0 arg)+ return (Syn_Child _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized)+ )++-- cata+{-# INLINE sem_Child #-}+sem_Child :: Child -> T_Child +sem_Child ( Child !name_ !tp_ !kind_ ) = sem_Child_Child name_ tp_ kind_++-- semantic domain+newtype T_Child = T_Child {+ attach_T_Child :: Identity (T_Child_s0 )+ }+data T_Child_s0 where C_Child_s0 :: {+ inv_Child_s0 :: !(forall t. K_Child_s0 t -> t)+ } -> T_Child_s0 +data T_Child_s1 = C_Child_s1+data T_Child_s26 = C_Child_s26+newtype T_Child_s56 = C_Child_s56 {+ inv_Child_s56 :: (T_Child_v53 )+ }+data K_Child_s0 k where+ K_Child_v0 :: K_Child_s0 (T_Child_v0 )+ K_Child_v13 :: K_Child_s0 (T_Child_v13 )+ K_Child_v52 :: K_Child_s0 (T_Child_v52 )+type T_Child_v0 = (T_Child_vIn0 ) -> (T_Child_vOut0 )+data T_Child_vIn0 = T_Child_vIn0 !(ConstructorIdent) !(Bool) !(Map Identifier Attributes) !(Set Identifier) !(NontermIdent) !([Identifier]) !(Map Identifier Attributes)+data T_Child_vOut0 = T_Child_vOut0 !(Seq Error) !( (Identifier,Type,ChildKind) ) !(Attributes) !(Identifier) !(Child) !(Attributes)+type T_Child_v13 = (T_Child_vIn13 ) -> (T_Child_vOut13 )+data T_Child_vIn13 = T_Child_vIn13 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)+data T_Child_vOut13 = T_Child_vOut13 !(Seq Error) !( (Identifier,Type,ChildKind) ) !(Attributes) !(Identifier) !(Child) !(Attributes)+type T_Child_v52 = (T_Child_vIn52 ) -> (T_Child_vOut52 )+data T_Child_vIn52 = T_Child_vIn52 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)+data T_Child_vOut52 = T_Child_vOut52 !(Seq Error) !( (Identifier,Type,ChildKind) ) !(Attributes) !(Identifier) !(Attributes) !(T_Child_s56 )+type T_Child_v53 = (T_Child_vIn53 ) -> (T_Child_vOut53 )+data T_Child_vIn53 = T_Child_vIn53 +data T_Child_vOut53 = T_Child_vOut53 !(Child)+{-# NOINLINE sem_Child_Child #-}+sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child +sem_Child_Child !arg_name_ !arg_tp_ !arg_kind_ = T_Child (return st0) where+ {-# NOINLINE st0 #-}+ !st0 = let+ k0 :: K_Child_s0 t -> t+ k0 K_Child_v0 = v0+ k0 K_Child_v13 = v13+ k0 K_Child_v52 = v52+ v0 :: T_Child_v0 + v0 = \ !(T_Child_vIn0 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule11 () in+ let _lhsOfield :: (Identifier,Type,ChildKind) + !_lhsOfield = rule6 arg_kind_ arg_name_ arg_tp_ in+ let !_chnt = rule0 arg_name_ arg_tp_ in+ let !_inh = rule1 _chnt _lhsIinhMap in+ let !(!_nt,!_params) = rule7 arg_name_ arg_tp_ in+ let !_inh1 = rule8 _inh _nt _params in+ let _lhsOinherited :: Attributes+ !_lhsOinherited = rule4 _inh1 in+ let _lhsOname :: Identifier+ !_lhsOname = rule3 arg_name_ in+ let _lhsOoutput :: Child+ !_lhsOoutput = rule10 arg_kind_ arg_name_ arg_tp_ in+ let !_syn = rule2 _chnt _lhsIsynMap in+ let !_syn1 = rule9 _nt _params _syn in+ let _lhsOsynthesized :: Attributes+ !_lhsOsynthesized = rule5 _lhsImerged _syn1 arg_name_ in+ let !__result_ = T_Child_vOut0 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized+ in __result_ )+ v13 :: T_Child_v13 + v13 = \ !(T_Child_vIn13 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule11 () in+ let _lhsOfield :: (Identifier,Type,ChildKind) + !_lhsOfield = rule6 arg_kind_ arg_name_ arg_tp_ in+ let !_chnt = rule0 arg_name_ arg_tp_ in+ let !_inh = rule1 _chnt _lhsIinhMap in+ let !(!_nt,!_params) = rule7 arg_name_ arg_tp_ in+ let !_inh1 = rule8 _inh _nt _params in+ let _lhsOinherited :: Attributes+ !_lhsOinherited = rule4 _inh1 in+ let _lhsOname :: Identifier+ !_lhsOname = rule3 arg_name_ in+ let _lhsOoutput :: Child+ !_lhsOoutput = rule10 arg_kind_ arg_name_ arg_tp_ in+ let !_syn = rule2 _chnt _lhsIsynMap in+ let !_syn1 = rule9 _nt _params _syn in+ let _lhsOsynthesized :: Attributes+ !_lhsOsynthesized = rule5 _lhsImerged _syn1 arg_name_ in+ let !__result_ = T_Child_vOut13 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOoutput _lhsOsynthesized+ in __result_ )+ v52 :: T_Child_v52 + v52 = \ !(T_Child_vIn52 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule11 () in+ let _lhsOfield :: (Identifier,Type,ChildKind) + !_lhsOfield = rule6 arg_kind_ arg_name_ arg_tp_ in+ let !_chnt = rule0 arg_name_ arg_tp_ in+ let !_inh = rule1 _chnt _lhsIinhMap in+ let !(!_nt,!_params) = rule7 arg_name_ arg_tp_ in+ let !_inh1 = rule8 _inh _nt _params in+ let _lhsOinherited :: Attributes+ !_lhsOinherited = rule4 _inh1 in+ let _lhsOname :: Identifier+ !_lhsOname = rule3 arg_name_ in+ let !_syn = rule2 _chnt _lhsIsynMap in+ let !_syn1 = rule9 _nt _params _syn in+ let _lhsOsynthesized :: Attributes+ !_lhsOsynthesized = rule5 _lhsImerged _syn1 arg_name_ in+ let !__st_ = st56 ()+ !__result_ = T_Child_vOut52 _lhsOerrors _lhsOfield _lhsOinherited _lhsOname _lhsOsynthesized __st_+ in __result_ )+ in C_Child_s0 k0+ {-# NOINLINE st56 #-}+ st56 = \ (_ :: ()) -> let+ v53 :: T_Child_v53 + v53 = \ !(T_Child_vIn53 ) -> (+ let _lhsOoutput :: Child+ !_lhsOoutput = rule10 arg_kind_ arg_name_ arg_tp_ in+ let !__result_ = T_Child_vOut53 _lhsOoutput+ in __result_ )+ in C_Child_s56 v53+ {-# NOINLINE[1] rule0 #-}+ {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}+ rule0 = \ !name_ !tp_ ->+ {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 602 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule1 #-}+ {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}+ rule1 = \ !_chnt ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 608 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule2 #-}+ {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}+ rule2 = \ !_chnt ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 614 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule3 #-}+ {-# LINE 229 "./src-ag/DefaultRules.ag" #-}+ rule3 = \ !name_ ->+ {-# LINE 229 "./src-ag/DefaultRules.ag" #-}+ name_+ {-# LINE 620 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule4 #-}+ {-# LINE 238 "./src-ag/DefaultRules.ag" #-}+ rule4 = \ !_inh1 ->+ {-# LINE 238 "./src-ag/DefaultRules.ag" #-}+ _inh1+ {-# LINE 626 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule5 #-}+ {-# LINE 239 "./src-ag/DefaultRules.ag" #-}+ rule5 = \ ((!_lhsImerged) :: Set Identifier) !_syn1 !name_ ->+ {-# LINE 239 "./src-ag/DefaultRules.ag" #-}+ if name_ `Set.member` _lhsImerged+ then Map.empty+ else _syn1+ {-# LINE 634 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule6 #-}+ {-# LINE 574 "./src-ag/DefaultRules.ag" #-}+ rule6 = \ !kind_ !name_ !tp_ ->+ {-# LINE 574 "./src-ag/DefaultRules.ag" #-}+ (name_,tp_,kind_)+ {-# LINE 640 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule7 #-}+ {-# LINE 596 "./src-ag/DefaultRules.ag" #-}+ rule7 = \ !name_ !tp_ ->+ {-# LINE 596 "./src-ag/DefaultRules.ag" #-}+ case tp_ of+ NT nt params _ -> (nt, params)+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> (identifier t, [])+ {-# LINE 649 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule8 #-}+ {-# LINE 600 "./src-ag/DefaultRules.ag" #-}+ rule8 = \ !_inh !_nt !_params ->+ {-# LINE 600 "./src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfStr _nt _params ) _inh+ {-# LINE 655 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule9 #-}+ {-# LINE 601 "./src-ag/DefaultRules.ag" #-}+ rule9 = \ !_nt !_params !_syn ->+ {-# LINE 601 "./src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfStr _nt _params ) _syn+ {-# LINE 661 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule10 #-}+ {-# LINE 642 "./src-ag/DefaultRules.ag" #-}+ rule10 = \ !kind_ !name_ !tp_ ->+ {-# LINE 642 "./src-ag/DefaultRules.ag" #-}+ Child name_ tp_ kind_+ {-# LINE 667 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule11 #-}+ rule11 = \ (_ :: ()) ->+ Seq.empty++-- Children ----------------------------------------------------+-- wrapper+data Inh_Children = Inh_Children { con_Inh_Children :: !(ConstructorIdent), cr_Inh_Children :: !(Bool), inhMap_Inh_Children :: !(Map Identifier Attributes), merged_Inh_Children :: !(Set Identifier), nt_Inh_Children :: !(NontermIdent), params_Inh_Children :: !([Identifier]), synMap_Inh_Children :: !(Map Identifier Attributes) }+data Syn_Children = Syn_Children { errors_Syn_Children :: !(Seq Error), fields_Syn_Children :: !([(Identifier,Type,ChildKind)]), inputs_Syn_Children :: !([(Identifier, Attributes)]), output_Syn_Children :: !(Children), outputs_Syn_Children :: !([(Identifier, Attributes)]) }+{-# INLINABLE wrap_Children #-}+wrap_Children :: T_Children -> Inh_Children -> (Syn_Children )+wrap_Children !(T_Children act) !(Inh_Children _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Children_vIn1 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap+ !(T_Children_vOut1 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs) <- return (inv_Children_s2 sem K_Children_v1 arg)+ return (Syn_Children _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs)+ )++-- cata+{-# NOINLINE sem_Children #-}+sem_Children :: Children -> T_Children +sem_Children list = Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list)++-- semantic domain+newtype T_Children = T_Children {+ attach_T_Children :: Identity (T_Children_s2 )+ }+data T_Children_s2 where C_Children_s2 :: {+ inv_Children_s2 :: !(forall t. K_Children_s2 t -> t)+ } -> T_Children_s2 +data T_Children_s3 = C_Children_s3+data T_Children_s27 = C_Children_s27+newtype T_Children_s53 = C_Children_s53 {+ inv_Children_s53 :: (T_Children_v48 )+ }+data K_Children_s2 k where+ K_Children_v1 :: K_Children_s2 (T_Children_v1 )+ K_Children_v14 :: K_Children_s2 (T_Children_v14 )+ K_Children_v47 :: K_Children_s2 (T_Children_v47 )+type T_Children_v1 = (T_Children_vIn1 ) -> (T_Children_vOut1 )+data T_Children_vIn1 = T_Children_vIn1 !(ConstructorIdent) !(Bool) !(Map Identifier Attributes) !(Set Identifier) !(NontermIdent) !([Identifier]) !(Map Identifier Attributes)+data T_Children_vOut1 = T_Children_vOut1 !(Seq Error) !([(Identifier,Type,ChildKind)]) !([(Identifier, Attributes)]) !(Children) !([(Identifier, Attributes)])+type T_Children_v14 = (T_Children_vIn14 ) -> (T_Children_vOut14 )+data T_Children_vIn14 = T_Children_vIn14 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)+data T_Children_vOut14 = T_Children_vOut14 !(Seq Error) !([(Identifier,Type,ChildKind)]) !([(Identifier, Attributes)]) !(Children) !([(Identifier, Attributes)])+type T_Children_v47 = (T_Children_vIn47 ) -> (T_Children_vOut47 )+data T_Children_vIn47 = T_Children_vIn47 !(Map Identifier Attributes) !(Set Identifier) !(Map Identifier Attributes)+data T_Children_vOut47 = T_Children_vOut47 !(Seq Error) !([(Identifier,Type,ChildKind)]) !([(Identifier, Attributes)]) !([(Identifier, Attributes)]) !(T_Children_s53 )+type T_Children_v48 = (T_Children_vIn48 ) -> (T_Children_vOut48 )+data T_Children_vIn48 = T_Children_vIn48 +data T_Children_vOut48 = T_Children_vOut48 !(Children)+{-# NOINLINE sem_Children_Cons #-}+sem_Children_Cons :: T_Child -> T_Children -> T_Children +sem_Children_Cons arg_hd_ arg_tl_ = T_Children (return st2) where+ {-# NOINLINE st2 #-}+ !st2 = let+ k2 :: K_Children_s2 t -> t+ k2 K_Children_v1 = v1+ k2 K_Children_v14 = v14+ k2 K_Children_v47 = v47+ v1 :: T_Children_v1 + v1 = \ !(T_Children_vIn1 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) -> (+ let !_hdX0 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_)) in+ let !_tlX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_)) in+ let !_hdOinhMap = rule21 _lhsIinhMap in+ let !_tlOinhMap = rule28 _lhsIinhMap in+ let !_hdOmerged = rule22 _lhsImerged in+ let !_hdOsynMap = rule25 _lhsIsynMap in+ let !_tlOmerged = rule29 _lhsImerged in+ let !_tlOsynMap = rule32 _lhsIsynMap in+ let !(T_Child_vOut13 _hdIerrors _hdIfield _hdIinherited _hdIname _hdIoutput _hdIsynthesized) = inv_Child_s0 _hdX0 K_Child_v13 (T_Child_vIn13 _hdOinhMap _hdOmerged _hdOsynMap) in+ let !(T_Children_vOut14 _tlIerrors _tlIfields _tlIinputs _tlIoutput _tlIoutputs) = inv_Children_s2 _tlX2 K_Children_v14 (T_Children_vIn14 _tlOinhMap _tlOmerged _tlOsynMap) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule16 _hdIerrors _tlIerrors in+ let _lhsOfields :: [(Identifier,Type,ChildKind)]+ !_lhsOfields = rule15 _hdIfield _tlIfields in+ let _lhsOinputs :: [(Identifier, Attributes)]+ !_lhsOinputs = rule13 _hdIinherited _hdIname _tlIinputs in+ let !_output = rule17 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Children+ !_lhsOoutput = rule18 _output in+ let _lhsOoutputs :: [(Identifier, Attributes)]+ !_lhsOoutputs = rule14 _hdIname _hdIsynthesized _tlIoutputs in+ let !__result_ = T_Children_vOut1 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs+ in __result_ )+ v14 :: T_Children_v14 + v14 = \ !(T_Children_vIn14 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (+ let !_hdX0 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_)) in+ let !_tlX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_)) in+ let !_hdOinhMap = rule21 _lhsIinhMap in+ let !_tlOinhMap = rule28 _lhsIinhMap in+ let !_hdOmerged = rule22 _lhsImerged in+ let !_hdOsynMap = rule25 _lhsIsynMap in+ let !_tlOmerged = rule29 _lhsImerged in+ let !_tlOsynMap = rule32 _lhsIsynMap in+ let !(T_Child_vOut13 _hdIerrors _hdIfield _hdIinherited _hdIname _hdIoutput _hdIsynthesized) = inv_Child_s0 _hdX0 K_Child_v13 (T_Child_vIn13 _hdOinhMap _hdOmerged _hdOsynMap) in+ let !(T_Children_vOut14 _tlIerrors _tlIfields _tlIinputs _tlIoutput _tlIoutputs) = inv_Children_s2 _tlX2 K_Children_v14 (T_Children_vIn14 _tlOinhMap _tlOmerged _tlOsynMap) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule16 _hdIerrors _tlIerrors in+ let _lhsOfields :: [(Identifier,Type,ChildKind)]+ !_lhsOfields = rule15 _hdIfield _tlIfields in+ let _lhsOinputs :: [(Identifier, Attributes)]+ !_lhsOinputs = rule13 _hdIinherited _hdIname _tlIinputs in+ let !_output = rule17 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Children+ !_lhsOoutput = rule18 _output in+ let _lhsOoutputs :: [(Identifier, Attributes)]+ !_lhsOoutputs = rule14 _hdIname _hdIsynthesized _tlIoutputs in+ let !__result_ = T_Children_vOut14 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs+ in __result_ )+ v47 :: T_Children_v47 + v47 = \ !(T_Children_vIn47 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (+ let !_hdX0 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_)) in+ let !_tlX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_)) in+ let !_hdOinhMap = rule21 _lhsIinhMap in+ let !_tlOinhMap = rule28 _lhsIinhMap in+ let !_hdOmerged = rule22 _lhsImerged in+ let !_hdOsynMap = rule25 _lhsIsynMap in+ let !_tlOmerged = rule29 _lhsImerged in+ let !_tlOsynMap = rule32 _lhsIsynMap in+ let !(T_Child_vOut52 _hdIerrors _hdIfield _hdIinherited _hdIname _hdIsynthesized _hdX56) = inv_Child_s0 _hdX0 K_Child_v52 (T_Child_vIn52 _hdOinhMap _hdOmerged _hdOsynMap) in+ let !(T_Children_vOut47 _tlIerrors _tlIfields _tlIinputs _tlIoutputs _tlX53) = inv_Children_s2 _tlX2 K_Children_v47 (T_Children_vIn47 _tlOinhMap _tlOmerged _tlOsynMap) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule16 _hdIerrors _tlIerrors in+ let _lhsOfields :: [(Identifier,Type,ChildKind)]+ !_lhsOfields = rule15 _hdIfield _tlIfields in+ let _lhsOinputs :: [(Identifier, Attributes)]+ !_lhsOinputs = rule13 _hdIinherited _hdIname _tlIinputs in+ let _lhsOoutputs :: [(Identifier, Attributes)]+ !_lhsOoutputs = rule14 _hdIname _hdIsynthesized _tlIoutputs in+ let !__st_ = st53 _hdX56 _tlX53+ !__result_ = T_Children_vOut47 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutputs __st_+ in __result_ )+ in C_Children_s2 k2+ {-# NOINLINE st53 #-}+ st53 = \ !_hdX56 !_tlX53 -> let+ v48 :: T_Children_v48 + v48 = \ !(T_Children_vIn48 ) -> (+ let !(T_Child_vOut53 _hdIoutput) = inv_Child_s56 _hdX56 (T_Child_vIn53 ) in+ let !(T_Children_vOut48 _tlIoutput) = inv_Children_s53 _tlX53 (T_Children_vIn48 ) in+ let !_output = rule17 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Children+ !_lhsOoutput = rule18 _output in+ let !__result_ = T_Children_vOut48 _lhsOoutput+ in __result_ )+ in C_Children_s53 v48+ {-# NOINLINE[1] rule13 #-}+ {-# LINE 244 "./src-ag/DefaultRules.ag" #-}+ rule13 = \ ((!_hdIinherited) :: Attributes) ((!_hdIname) :: Identifier) ((!_tlIinputs) :: [(Identifier, Attributes)]) ->+ {-# LINE 244 "./src-ag/DefaultRules.ag" #-}+ (_hdIname, _hdIinherited) : _tlIinputs+ {-# LINE 819 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule14 #-}+ {-# LINE 245 "./src-ag/DefaultRules.ag" #-}+ rule14 = \ ((!_hdIname) :: Identifier) ((!_hdIsynthesized) :: Attributes) ((!_tlIoutputs) :: [(Identifier, Attributes)]) ->+ {-# LINE 245 "./src-ag/DefaultRules.ag" #-}+ (_hdIname, _hdIsynthesized) : _tlIoutputs+ {-# LINE 825 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule15 #-}+ {-# LINE 570 "./src-ag/DefaultRules.ag" #-}+ rule15 = \ ((!_hdIfield) :: (Identifier,Type,ChildKind) ) ((!_tlIfields) :: [(Identifier,Type,ChildKind)]) ->+ {-# LINE 570 "./src-ag/DefaultRules.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 831 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule16 #-}+ rule16 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# NOINLINE[1] rule17 #-}+ rule17 = \ ((!_hdIoutput) :: Child) ((!_tlIoutput) :: Children) ->+ (:) _hdIoutput _tlIoutput+ {-# NOINLINE[1] rule18 #-}+ rule18 = \ !_output ->+ _output+ {-# NOINLINE[1] rule21 #-}+ rule21 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule22 #-}+ rule22 = \ ((!_lhsImerged) :: Set Identifier) ->+ _lhsImerged+ {-# NOINLINE[1] rule25 #-}+ rule25 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule28 #-}+ rule28 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule29 #-}+ rule29 = \ ((!_lhsImerged) :: Set Identifier) ->+ _lhsImerged+ {-# NOINLINE[1] rule32 #-}+ rule32 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+{-# NOINLINE sem_Children_Nil #-}+sem_Children_Nil :: T_Children +sem_Children_Nil = T_Children (return st2) where+ {-# NOINLINE st2 #-}+ !st2 = let+ k2 :: K_Children_s2 t -> t+ k2 K_Children_v1 = v1+ k2 K_Children_v14 = v14+ k2 K_Children_v47 = v47+ v1 :: T_Children_v1 + v1 = \ !(T_Children_vIn1 _lhsIcon _lhsIcr _lhsIinhMap _lhsImerged _lhsInt _lhsIparams _lhsIsynMap) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule36 () in+ let _lhsOfields :: [(Identifier,Type,ChildKind)]+ !_lhsOfields = rule35 () in+ let _lhsOinputs :: [(Identifier, Attributes)]+ !_lhsOinputs = rule33 () in+ let !_output = rule37 () in+ let _lhsOoutputs :: [(Identifier, Attributes)]+ !_lhsOoutputs = rule34 () in+ let _lhsOoutput :: Children+ !_lhsOoutput = rule38 _output in+ let !__result_ = T_Children_vOut1 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs+ in __result_ )+ v14 :: T_Children_v14 + v14 = \ !(T_Children_vIn14 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule36 () in+ let _lhsOfields :: [(Identifier,Type,ChildKind)]+ !_lhsOfields = rule35 () in+ let _lhsOinputs :: [(Identifier, Attributes)]+ !_lhsOinputs = rule33 () in+ let !_output = rule37 () in+ let _lhsOoutputs :: [(Identifier, Attributes)]+ !_lhsOoutputs = rule34 () in+ let _lhsOoutput :: Children+ !_lhsOoutput = rule38 _output in+ let !__result_ = T_Children_vOut14 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutput _lhsOoutputs+ in __result_ )+ v47 :: T_Children_v47 + v47 = \ !(T_Children_vIn47 _lhsIinhMap _lhsImerged _lhsIsynMap) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule36 () in+ let _lhsOfields :: [(Identifier,Type,ChildKind)]+ !_lhsOfields = rule35 () in+ let _lhsOinputs :: [(Identifier, Attributes)]+ !_lhsOinputs = rule33 () in+ let _lhsOoutputs :: [(Identifier, Attributes)]+ !_lhsOoutputs = rule34 () in+ let !__st_ = st53 ()+ !__result_ = T_Children_vOut47 _lhsOerrors _lhsOfields _lhsOinputs _lhsOoutputs __st_+ in __result_ )+ in C_Children_s2 k2+ {-# NOINLINE st53 #-}+ st53 = \ (_ :: ()) -> let+ v48 :: T_Children_v48 + v48 = \ !(T_Children_vIn48 ) -> (+ let !_output = rule37 () in+ let _lhsOoutput :: Children+ !_lhsOoutput = rule38 _output in+ let !__result_ = T_Children_vOut48 _lhsOoutput+ in __result_ )+ in C_Children_s53 v48+ {-# NOINLINE[1] rule33 #-}+ {-# LINE 246 "./src-ag/DefaultRules.ag" #-}+ rule33 = \ (_ :: ()) ->+ {-# LINE 246 "./src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 927 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule34 #-}+ {-# LINE 247 "./src-ag/DefaultRules.ag" #-}+ rule34 = \ (_ :: ()) ->+ {-# LINE 247 "./src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 933 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule35 #-}+ {-# LINE 571 "./src-ag/DefaultRules.ag" #-}+ rule35 = \ (_ :: ()) ->+ {-# LINE 571 "./src-ag/DefaultRules.ag" #-}+ []+ {-# LINE 939 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule36 #-}+ rule36 = \ (_ :: ()) ->+ Seq.empty+ {-# NOINLINE[1] rule37 #-}+ rule37 = \ (_ :: ()) ->+ []+ {-# NOINLINE[1] rule38 #-}+ rule38 = \ !_output ->+ _output++-- Grammar -----------------------------------------------------+-- wrapper+data Inh_Grammar = Inh_Grammar { constructorTypeMap_Inh_Grammar :: !(Map NontermIdent ConstructorType), options_Inh_Grammar :: !(Options) }+data Syn_Grammar = Syn_Grammar { errors_Syn_Grammar :: !(Seq Error), output_Syn_Grammar :: !(Grammar) }+{-# INLINABLE wrap_Grammar #-}+wrap_Grammar :: T_Grammar -> Inh_Grammar -> (Syn_Grammar )+wrap_Grammar !(T_Grammar act) !(Inh_Grammar _lhsIconstructorTypeMap _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Grammar_vIn2 _lhsIconstructorTypeMap _lhsIoptions+ !(T_Grammar_vOut2 _lhsOerrors _lhsOoutput) <- return (inv_Grammar_s4 sem arg)+ return (Syn_Grammar _lhsOerrors _lhsOoutput)+ )++-- cata+{-# INLINE sem_Grammar #-}+sem_Grammar :: Grammar -> T_Grammar +sem_Grammar ( Grammar !typeSyns_ !useMap_ !derivings_ !wrappers_ nonts_ !pragmas_ !manualAttrOrderMap_ !paramMap_ !contextMap_ !quantMap_ !uniqueMap_ !augmentsMap_ !aroundsMap_ !mergeMap_ ) = sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ ( sem_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_++-- semantic domain+newtype T_Grammar = T_Grammar {+ attach_T_Grammar :: Identity (T_Grammar_s4 )+ }+newtype T_Grammar_s4 = C_Grammar_s4 {+ inv_Grammar_s4 :: (T_Grammar_v2 )+ }+data T_Grammar_s5 = C_Grammar_s5+type T_Grammar_v2 = (T_Grammar_vIn2 ) -> (T_Grammar_vOut2 )+data T_Grammar_vIn2 = T_Grammar_vIn2 !(Map NontermIdent ConstructorType) !(Options)+data T_Grammar_vOut2 = T_Grammar_vOut2 !(Seq Error) !(Grammar)+{-# NOINLINE sem_Grammar_Grammar #-}+sem_Grammar_Grammar :: (TypeSyns) -> (UseMap) -> (Derivings) -> (Set NontermIdent) -> T_Nonterminals -> (PragmaMap) -> (AttrOrderMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (UniqueMap) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))) -> T_Grammar +sem_Grammar_Grammar !arg_typeSyns_ !arg_useMap_ !arg_derivings_ !arg_wrappers_ arg_nonts_ !arg_pragmas_ !arg_manualAttrOrderMap_ !arg_paramMap_ !arg_contextMap_ !arg_quantMap_ !arg_uniqueMap_ !arg_augmentsMap_ !arg_aroundsMap_ !arg_mergeMap_ = T_Grammar (return st4) where+ {-# NOINLINE st4 #-}+ !st4 = let+ v2 :: T_Grammar_v2 + v2 = \ !(T_Grammar_vIn2 _lhsIconstructorTypeMap _lhsIoptions) -> (+ let !_nontsX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_nonts_)) in+ let !_nontsOuniq = rule47 () in+ let !_nontsOconstructorTypeMap = rule55 _lhsIconstructorTypeMap in+ let !_nontsOcr = rule42 _lhsIoptions in+ let !_nontsOmanualAttrOrderMap = rule48 arg_manualAttrOrderMap_ in+ let !_nontsOmergesIn = rule51 arg_mergeMap_ in+ let !_nontsOo_rename = rule41 _lhsIoptions in+ let !_nontsOoptions = rule56 _lhsIoptions in+ let !_nontsOtypeSyns = rule46 arg_typeSyns_ in+ let !_nontsOuseMap = rule45 arg_useMap_ in+ let !_nontsOwrappers = rule43 arg_wrappers_ in+ let !_nontsOaroundsIn = rule50 arg_aroundsMap_ in+ let !_nontsOaugmentsIn = rule49 arg_augmentsMap_ in+ let !(T_Nonterminals_vOut15 _nontsIinhMap' _nontsIsynMap' _nontsX28) = inv_Nonterminals_s8 _nontsX8 K_Nonterminals_v15 (T_Nonterminals_vIn15 ) in+ let !_nontsOinhMap = rule39 _nontsIinhMap' in+ let !_nontsOsynMap = rule40 _nontsIsynMap' in+ let !(T_Nonterminals_vOut16 _nontsIerrors _nontsIoutput _nontsIuniq) = inv_Nonterminals_s28 _nontsX28 K_Nonterminals_v16 (T_Nonterminals_vIn16 _nontsOaroundsIn _nontsOaugmentsIn _nontsOconstructorTypeMap _nontsOcr _nontsOinhMap _nontsOmanualAttrOrderMap _nontsOmergesIn _nontsOo_rename _nontsOoptions _nontsOsynMap _nontsOtypeSyns _nontsOuniq _nontsOuseMap _nontsOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule52 _nontsIerrors in+ let !_output = rule53 _nontsIoutput arg_aroundsMap_ arg_augmentsMap_ arg_contextMap_ arg_derivings_ arg_manualAttrOrderMap_ arg_mergeMap_ arg_paramMap_ arg_pragmas_ arg_quantMap_ arg_typeSyns_ arg_uniqueMap_ arg_useMap_ arg_wrappers_ in+ let _lhsOoutput :: Grammar+ !_lhsOoutput = rule54 _output in+ let !__result_ = T_Grammar_vOut2 _lhsOerrors _lhsOoutput+ in __result_ )+ in C_Grammar_s4 v2+ {-# INLINE rule39 #-}+ {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}+ rule39 = \ ((!_nontsIinhMap') :: Map Identifier Attributes) ->+ {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 1017 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule40 #-}+ {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}+ rule40 = \ ((!_nontsIsynMap') :: Map Identifier Attributes) ->+ {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 1023 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule41 #-}+ {-# LINE 60 "./src-ag/DefaultRules.ag" #-}+ rule41 = \ ((!_lhsIoptions) :: Options) ->+ {-# LINE 60 "./src-ag/DefaultRules.ag" #-}+ rename _lhsIoptions+ {-# LINE 1029 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule42 #-}+ {-# LINE 61 "./src-ag/DefaultRules.ag" #-}+ rule42 = \ ((!_lhsIoptions) :: Options) ->+ {-# LINE 61 "./src-ag/DefaultRules.ag" #-}+ modcopy _lhsIoptions+ {-# LINE 1035 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule43 #-}+ {-# LINE 69 "./src-ag/DefaultRules.ag" #-}+ rule43 = \ !wrappers_ ->+ {-# LINE 69 "./src-ag/DefaultRules.ag" #-}+ wrappers_+ {-# LINE 1041 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule45 #-}+ {-# LINE 231 "./src-ag/DefaultRules.ag" #-}+ rule45 = \ !useMap_ ->+ {-# LINE 231 "./src-ag/DefaultRules.ag" #-}+ useMap_+ {-# LINE 1047 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule46 #-}+ {-# LINE 233 "./src-ag/DefaultRules.ag" #-}+ rule46 = \ !typeSyns_ ->+ {-# LINE 233 "./src-ag/DefaultRules.ag" #-}+ typeSyns_+ {-# LINE 1053 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule47 #-}+ {-# LINE 623 "./src-ag/DefaultRules.ag" #-}+ rule47 = \ (_ :: ()) ->+ {-# LINE 623 "./src-ag/DefaultRules.ag" #-}+ 1+ {-# LINE 1059 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule48 #-}+ {-# LINE 737 "./src-ag/DefaultRules.ag" #-}+ rule48 = \ !manualAttrOrderMap_ ->+ {-# LINE 737 "./src-ag/DefaultRules.ag" #-}+ manualAttrOrderMap_+ {-# LINE 1065 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule49 #-}+ {-# LINE 803 "./src-ag/DefaultRules.ag" #-}+ rule49 = \ !augmentsMap_ ->+ {-# LINE 803 "./src-ag/DefaultRules.ag" #-}+ augmentsMap_+ {-# LINE 1071 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule50 #-}+ {-# LINE 810 "./src-ag/DefaultRules.ag" #-}+ rule50 = \ !aroundsMap_ ->+ {-# LINE 810 "./src-ag/DefaultRules.ag" #-}+ aroundsMap_+ {-# LINE 1077 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule51 #-}+ {-# LINE 818 "./src-ag/DefaultRules.ag" #-}+ rule51 = \ !mergeMap_ ->+ {-# LINE 818 "./src-ag/DefaultRules.ag" #-}+ mergeMap_+ {-# LINE 1083 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule52 #-}+ rule52 = \ ((!_nontsIerrors) :: Seq Error) ->+ _nontsIerrors+ {-# INLINE rule53 #-}+ rule53 = \ ((!_nontsIoutput) :: Nonterminals) !aroundsMap_ !augmentsMap_ !contextMap_ !derivings_ !manualAttrOrderMap_ !mergeMap_ !paramMap_ !pragmas_ !quantMap_ !typeSyns_ !uniqueMap_ !useMap_ !wrappers_ ->+ Grammar typeSyns_ useMap_ derivings_ wrappers_ _nontsIoutput pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_+ {-# INLINE rule54 #-}+ rule54 = \ !_output ->+ _output+ {-# INLINE rule55 #-}+ rule55 = \ ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule56 #-}+ rule56 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Nonterminal -------------------------------------------------+-- wrapper+data Inh_Nonterminal = Inh_Nonterminal { aroundsIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), augmentsIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), constructorTypeMap_Inh_Nonterminal :: !(Map NontermIdent ConstructorType), cr_Inh_Nonterminal :: !(Bool), inhMap_Inh_Nonterminal :: !(Map Identifier Attributes), manualAttrOrderMap_Inh_Nonterminal :: !(AttrOrderMap), mergesIn_Inh_Nonterminal :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))), nonterminals_Inh_Nonterminal :: !(Set NontermIdent), o_rename_Inh_Nonterminal :: !(Bool), options_Inh_Nonterminal :: !(Options), synMap_Inh_Nonterminal :: !(Map Identifier Attributes), typeSyns_Inh_Nonterminal :: !(TypeSyns), uniq_Inh_Nonterminal :: !(Int), useMap_Inh_Nonterminal :: !(UseMap), wrappers_Inh_Nonterminal :: !(Set NontermIdent) }+data Syn_Nonterminal = Syn_Nonterminal { collect_nts_Syn_Nonterminal :: !(Set NontermIdent), errors_Syn_Nonterminal :: !(Seq Error), inhMap'_Syn_Nonterminal :: !(Map Identifier Attributes), output_Syn_Nonterminal :: !(Nonterminal), synMap'_Syn_Nonterminal :: !(Map Identifier Attributes), uniq_Syn_Nonterminal :: !(Int) }+{-# INLINABLE wrap_Nonterminal #-}+wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> (Syn_Nonterminal )+wrap_Nonterminal !(T_Nonterminal act) !(Inh_Nonterminal _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Nonterminal_vIn3 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ !(T_Nonterminal_vOut3 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq) <- return (inv_Nonterminal_s6 sem K_Nonterminal_v3 arg)+ return (Syn_Nonterminal _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq)+ )++-- cata+{-# INLINE sem_Nonterminal #-}+sem_Nonterminal :: Nonterminal -> T_Nonterminal +sem_Nonterminal ( Nonterminal !nt_ !params_ !inh_ !syn_ prods_ ) = sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ ( sem_Productions prods_ )++-- semantic domain+newtype T_Nonterminal = T_Nonterminal {+ attach_T_Nonterminal :: Identity (T_Nonterminal_s6 )+ }+data T_Nonterminal_s6 where C_Nonterminal_s6 :: {+ inv_Nonterminal_s6 :: !(forall t. K_Nonterminal_s6 t -> t)+ } -> T_Nonterminal_s6 +data T_Nonterminal_s7 = C_Nonterminal_s7+data T_Nonterminal_s31 = C_Nonterminal_s31+data T_Nonterminal_s43 where C_Nonterminal_s43 :: {+ inv_Nonterminal_s43 :: !(forall t. K_Nonterminal_s43 t -> t)+ } -> T_Nonterminal_s43 +data T_Nonterminal_s44 = C_Nonterminal_s44+newtype T_Nonterminal_s46 = C_Nonterminal_s46 {+ inv_Nonterminal_s46 :: (T_Nonterminal_v37 )+ }+newtype T_Nonterminal_s52 = C_Nonterminal_s52 {+ inv_Nonterminal_s52 :: (T_Nonterminal_v46 )+ }+data K_Nonterminal_s6 k where+ K_Nonterminal_v3 :: K_Nonterminal_s6 (T_Nonterminal_v3 )+ K_Nonterminal_v18 :: K_Nonterminal_s6 (T_Nonterminal_v18 )+ K_Nonterminal_v32 :: K_Nonterminal_s6 (T_Nonterminal_v32 )+ K_Nonterminal_v36 :: K_Nonterminal_s6 (T_Nonterminal_v36 )+data K_Nonterminal_s43 k where+ K_Nonterminal_v33 :: K_Nonterminal_s43 (T_Nonterminal_v33 )+ K_Nonterminal_v45 :: K_Nonterminal_s43 (T_Nonterminal_v45 )+type T_Nonterminal_v3 = (T_Nonterminal_vIn3 ) -> (T_Nonterminal_vOut3 )+data T_Nonterminal_vIn3 = T_Nonterminal_vIn3 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Set NontermIdent) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)+data T_Nonterminal_vOut3 = T_Nonterminal_vOut3 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Nonterminal) !(Map Identifier Attributes) !(Int)+type T_Nonterminal_v18 = (T_Nonterminal_vIn18 ) -> (T_Nonterminal_vOut18 )+data T_Nonterminal_vIn18 = T_Nonterminal_vIn18 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)+data T_Nonterminal_vOut18 = T_Nonterminal_vOut18 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Nonterminal) !(Map Identifier Attributes) !(Int)+type T_Nonterminal_v32 = (T_Nonterminal_vIn32 ) -> (T_Nonterminal_vOut32 )+data T_Nonterminal_vIn32 = T_Nonterminal_vIn32 +data T_Nonterminal_vOut32 = T_Nonterminal_vOut32 !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminal_s43 )+type T_Nonterminal_v33 = (T_Nonterminal_vIn33 ) -> (T_Nonterminal_vOut33 )+data T_Nonterminal_vIn33 = T_Nonterminal_vIn33 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)+data T_Nonterminal_vOut33 = T_Nonterminal_vOut33 !(Seq Error) !(Nonterminal) !(Int)+type T_Nonterminal_v36 = (T_Nonterminal_vIn36 ) -> (T_Nonterminal_vOut36 )+data T_Nonterminal_vIn36 = T_Nonterminal_vIn36 !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)+data T_Nonterminal_vOut36 = T_Nonterminal_vOut36 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminal_s46 )+type T_Nonterminal_v37 = (T_Nonterminal_vIn37 ) -> (T_Nonterminal_vOut37 )+data T_Nonterminal_vIn37 = T_Nonterminal_vIn37 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)+data T_Nonterminal_vOut37 = T_Nonterminal_vOut37 !(Nonterminal) !(Int)+type T_Nonterminal_v45 = (T_Nonterminal_vIn45 ) -> (T_Nonterminal_vOut45 )+data T_Nonterminal_vIn45 = T_Nonterminal_vIn45 !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)+data T_Nonterminal_vOut45 = T_Nonterminal_vOut45 !(Seq Error) !(T_Nonterminal_s52 )+type T_Nonterminal_v46 = (T_Nonterminal_vIn46 ) -> (T_Nonterminal_vOut46 )+data T_Nonterminal_vIn46 = T_Nonterminal_vIn46 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)+data T_Nonterminal_vOut46 = T_Nonterminal_vOut46 !(Nonterminal) !(Int)+{-# NOINLINE sem_Nonterminal_Nonterminal #-}+sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions -> T_Nonterminal +sem_Nonterminal_Nonterminal !arg_nt_ !arg_params_ !arg_inh_ !arg_syn_ arg_prods_ = T_Nonterminal (return st6) where+ {-# NOINLINE st6 #-}+ !st6 = let+ k6 :: K_Nonterminal_s6 t -> t+ k6 K_Nonterminal_v3 = v3+ k6 K_Nonterminal_v18 = v18+ k6 K_Nonterminal_v32 = v32+ k6 K_Nonterminal_v36 = v36+ v3 :: T_Nonterminal_v3 + v3 = \ !(T_Nonterminal_vIn3 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule60 arg_nt_ in+ let !_prodsOconstructorTypeMap = rule78 _lhsIconstructorTypeMap in+ let !_prodsOcr = rule79 _lhsIcr in+ let !_inh1 = rule67 arg_inh_ arg_nt_ arg_params_ in+ let !_prodsOinh = rule61 _inh1 in+ let !_prodsOinhMap = rule80 _lhsIinhMap in+ let !_prodsOmanualAttrOrderMap = rule81 _lhsImanualAttrOrderMap in+ let !_mergesIn = rule72 _lhsImergesIn arg_nt_ in+ let !_prodsOmergesIn = rule82 _mergesIn in+ let !_prodsOnt = rule66 arg_nt_ in+ let !_prodsOo_rename = rule84 _lhsIo_rename in+ let !_prodsOoptions = rule85 _lhsIoptions in+ let !_syn1 = rule68 arg_nt_ arg_params_ arg_syn_ in+ let !_prodsOsyn = rule62 _syn1 in+ let !_prodsOsynMap = rule86 _lhsIsynMap in+ let !_prodsOsynOrig = rule64 arg_syn_ in+ let !_prodsOtypeSyns = rule87 _lhsItypeSyns in+ let !_prodsOuseMap = rule65 _lhsIuseMap arg_nt_ in+ let !_prodsOwrappers = rule89 _lhsIwrappers in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule57 arg_inh_ arg_nt_ in+ let !_aroundsIn = rule71 _lhsIaroundsIn arg_nt_ in+ let !_prodsOaroundsIn = rule76 _aroundsIn in+ let !_augmentsIn = rule70 _lhsIaugmentsIn arg_nt_ in+ let !_prodsOaugmentsIn = rule77 _augmentsIn in+ let !_prodsOparams = rule59 arg_params_ in+ let !_prodsOuniq = rule88 _lhsIuniq in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule58 arg_nt_ arg_syn_ in+ let !(T_Productions_vOut17 _prodsIerrors _prodsIoutput _prodsIuniq) = inv_Productions_s16 _prodsX16 K_Productions_v17 (T_Productions_vIn17 _prodsOaroundsIn _prodsOaugmentsIn _prodsOconstructorTypeMap _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule73 _prodsIerrors in+ let _lhsOoutput :: Nonterminal+ !_lhsOoutput = rule69 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule75 _prodsIuniq in+ let !__result_ = T_Nonterminal_vOut3 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq+ in __result_ )+ v18 :: T_Nonterminal_v18 + v18 = \ !(T_Nonterminal_vIn18 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule60 arg_nt_ in+ let !_prodsOconstructorTypeMap = rule78 _lhsIconstructorTypeMap in+ let !_prodsOcr = rule79 _lhsIcr in+ let !_inh1 = rule67 arg_inh_ arg_nt_ arg_params_ in+ let !_prodsOinh = rule61 _inh1 in+ let !_prodsOinhMap = rule80 _lhsIinhMap in+ let !_prodsOmanualAttrOrderMap = rule81 _lhsImanualAttrOrderMap in+ let !_mergesIn = rule72 _lhsImergesIn arg_nt_ in+ let !_prodsOmergesIn = rule82 _mergesIn in+ let !_prodsOnt = rule66 arg_nt_ in+ let !_prodsOo_rename = rule84 _lhsIo_rename in+ let !_prodsOoptions = rule85 _lhsIoptions in+ let !_syn1 = rule68 arg_nt_ arg_params_ arg_syn_ in+ let !_prodsOsyn = rule62 _syn1 in+ let !_prodsOsynMap = rule86 _lhsIsynMap in+ let !_prodsOsynOrig = rule64 arg_syn_ in+ let !_prodsOtypeSyns = rule87 _lhsItypeSyns in+ let !_prodsOuseMap = rule65 _lhsIuseMap arg_nt_ in+ let !_prodsOwrappers = rule89 _lhsIwrappers in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule57 arg_inh_ arg_nt_ in+ let !_aroundsIn = rule71 _lhsIaroundsIn arg_nt_ in+ let !_prodsOaroundsIn = rule76 _aroundsIn in+ let !_augmentsIn = rule70 _lhsIaugmentsIn arg_nt_ in+ let !_prodsOaugmentsIn = rule77 _augmentsIn in+ let !_prodsOparams = rule59 arg_params_ in+ let !_prodsOuniq = rule88 _lhsIuniq in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule58 arg_nt_ arg_syn_ in+ let !(T_Productions_vOut17 _prodsIerrors _prodsIoutput _prodsIuniq) = inv_Productions_s16 _prodsX16 K_Productions_v17 (T_Productions_vIn17 _prodsOaroundsIn _prodsOaugmentsIn _prodsOconstructorTypeMap _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule73 _prodsIerrors in+ let _lhsOoutput :: Nonterminal+ !_lhsOoutput = rule69 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule75 _prodsIuniq in+ let !__result_ = T_Nonterminal_vOut18 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq+ in __result_ )+ v32 :: T_Nonterminal_v32 + v32 = \ !(T_Nonterminal_vIn32 ) -> (+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule57 arg_inh_ arg_nt_ in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule58 arg_nt_ arg_syn_ in+ let !__st_ = st43 ()+ !__result_ = T_Nonterminal_vOut32 _lhsOinhMap' _lhsOsynMap' __st_+ in __result_ )+ v36 :: T_Nonterminal_v36 + v36 = \ !(T_Nonterminal_vIn36 _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule60 arg_nt_ in+ let !_prodsOconstructorTypeMap = rule78 _lhsIconstructorTypeMap in+ let !_prodsOcr = rule79 _lhsIcr in+ let !_inh1 = rule67 arg_inh_ arg_nt_ arg_params_ in+ let !_prodsOinh = rule61 _inh1 in+ let !_prodsOinhMap = rule80 _lhsIinhMap in+ let !_prodsOmanualAttrOrderMap = rule81 _lhsImanualAttrOrderMap in+ let !_mergesIn = rule72 _lhsImergesIn arg_nt_ in+ let !_prodsOmergesIn = rule82 _mergesIn in+ let !_prodsOnt = rule66 arg_nt_ in+ let !_prodsOo_rename = rule84 _lhsIo_rename in+ let !_prodsOoptions = rule85 _lhsIoptions in+ let !_syn1 = rule68 arg_nt_ arg_params_ arg_syn_ in+ let !_prodsOsyn = rule62 _syn1 in+ let !_prodsOsynMap = rule86 _lhsIsynMap in+ let !_prodsOsynOrig = rule64 arg_syn_ in+ let !_prodsOtypeSyns = rule87 _lhsItypeSyns in+ let !_prodsOuseMap = rule65 _lhsIuseMap arg_nt_ in+ let !_prodsOwrappers = rule89 _lhsIwrappers in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule57 arg_inh_ arg_nt_ in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule58 arg_nt_ arg_syn_ in+ let !(T_Productions_vOut26 _prodsIerrors _prodsX39) = inv_Productions_s16 _prodsX16 K_Productions_v26 (T_Productions_vIn26 _prodsOconstructorTypeMap _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuseMap _prodsOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule73 _prodsIerrors in+ let !__st_ = st46 _inh1 _prodsX39 _syn1+ !__result_ = T_Nonterminal_vOut36 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOsynMap' __st_+ in __result_ )+ in C_Nonterminal_s6 k6+ {-# NOINLINE st43 #-}+ st43 = \ (_ :: ()) -> let+ k43 :: K_Nonterminal_s43 t -> t+ k43 K_Nonterminal_v33 = v33+ k43 K_Nonterminal_v45 = v45+ v33 :: T_Nonterminal_v33 + v33 = \ !(T_Nonterminal_vIn33 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_prodsOnt = rule66 arg_nt_ in+ let !_prodsOsynOrig = rule64 arg_syn_ in+ let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in+ let !_prodsOconstructorTypeMap = rule78 _lhsIconstructorTypeMap in+ let !_prodsOcr = rule79 _lhsIcr in+ let !_inh1 = rule67 arg_inh_ arg_nt_ arg_params_ in+ let !_prodsOinh = rule61 _inh1 in+ let !_prodsOinhMap = rule80 _lhsIinhMap in+ let !_prodsOmanualAttrOrderMap = rule81 _lhsImanualAttrOrderMap in+ let !_mergesIn = rule72 _lhsImergesIn arg_nt_ in+ let !_prodsOmergesIn = rule82 _mergesIn in+ let !_prodsOo_rename = rule84 _lhsIo_rename in+ let !_prodsOoptions = rule85 _lhsIoptions in+ let !_syn1 = rule68 arg_nt_ arg_params_ arg_syn_ in+ let !_prodsOsyn = rule62 _syn1 in+ let !_prodsOsynMap = rule86 _lhsIsynMap in+ let !_prodsOtypeSyns = rule87 _lhsItypeSyns in+ let !_prodsOuseMap = rule65 _lhsIuseMap arg_nt_ in+ let !_prodsOwrappers = rule89 _lhsIwrappers in+ let !_aroundsIn = rule71 _lhsIaroundsIn arg_nt_ in+ let !_prodsOaroundsIn = rule76 _aroundsIn in+ let !_augmentsIn = rule70 _lhsIaugmentsIn arg_nt_ in+ let !_prodsOaugmentsIn = rule77 _augmentsIn in+ let !_prodsOparams = rule59 arg_params_ in+ let !_prodsOuniq = rule88 _lhsIuniq in+ let !(T_Productions_vOut17 _prodsIerrors _prodsIoutput _prodsIuniq) = inv_Productions_s16 _prodsX16 K_Productions_v17 (T_Productions_vIn17 _prodsOaroundsIn _prodsOaugmentsIn _prodsOconstructorTypeMap _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOparams _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuniq _prodsOuseMap _prodsOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule73 _prodsIerrors in+ let _lhsOoutput :: Nonterminal+ !_lhsOoutput = rule69 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule75 _prodsIuniq in+ let !__result_ = T_Nonterminal_vOut33 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v45 :: T_Nonterminal_v45 + v45 = \ !(T_Nonterminal_vIn45 _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let !_prodsOnt = rule66 arg_nt_ in+ let !_prodsOsynOrig = rule64 arg_syn_ in+ let !_prodsX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_)) in+ let !_prodsOconstructorTypeMap = rule78 _lhsIconstructorTypeMap in+ let !_prodsOcr = rule79 _lhsIcr in+ let !_inh1 = rule67 arg_inh_ arg_nt_ arg_params_ in+ let !_prodsOinh = rule61 _inh1 in+ let !_prodsOinhMap = rule80 _lhsIinhMap in+ let !_prodsOmanualAttrOrderMap = rule81 _lhsImanualAttrOrderMap in+ let !_mergesIn = rule72 _lhsImergesIn arg_nt_ in+ let !_prodsOmergesIn = rule82 _mergesIn in+ let !_prodsOo_rename = rule84 _lhsIo_rename in+ let !_prodsOoptions = rule85 _lhsIoptions in+ let !_syn1 = rule68 arg_nt_ arg_params_ arg_syn_ in+ let !_prodsOsyn = rule62 _syn1 in+ let !_prodsOsynMap = rule86 _lhsIsynMap in+ let !_prodsOtypeSyns = rule87 _lhsItypeSyns in+ let !_prodsOuseMap = rule65 _lhsIuseMap arg_nt_ in+ let !_prodsOwrappers = rule89 _lhsIwrappers in+ let !(T_Productions_vOut26 _prodsIerrors _prodsX39) = inv_Productions_s16 _prodsX16 K_Productions_v26 (T_Productions_vIn26 _prodsOconstructorTypeMap _prodsOcr _prodsOinh _prodsOinhMap _prodsOmanualAttrOrderMap _prodsOmergesIn _prodsOnt _prodsOo_rename _prodsOoptions _prodsOsyn _prodsOsynMap _prodsOsynOrig _prodsOtypeSyns _prodsOuseMap _prodsOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule73 _prodsIerrors in+ let !__st_ = st52 _inh1 _prodsX39 _syn1+ !__result_ = T_Nonterminal_vOut45 _lhsOerrors __st_+ in __result_ )+ in C_Nonterminal_s43 k43+ {-# NOINLINE st46 #-}+ st46 = \ !_inh1 !_prodsX39 !_syn1 -> let+ v37 :: T_Nonterminal_v37 + v37 = \ !(T_Nonterminal_vIn37 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (+ let !_prodsOparams = rule59 arg_params_ in+ let !_aroundsIn = rule71 _lhsIaroundsIn arg_nt_ in+ let !_prodsOaroundsIn = rule76 _aroundsIn in+ let !_augmentsIn = rule70 _lhsIaugmentsIn arg_nt_ in+ let !_prodsOaugmentsIn = rule77 _augmentsIn in+ let !_prodsOuniq = rule88 _lhsIuniq in+ let !(T_Productions_vOut27 _prodsIoutput _prodsIuniq) = inv_Productions_s39 _prodsX39 (T_Productions_vIn27 _prodsOaroundsIn _prodsOaugmentsIn _prodsOparams _prodsOuniq) in+ let _lhsOoutput :: Nonterminal+ !_lhsOoutput = rule69 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule75 _prodsIuniq in+ let !__result_ = T_Nonterminal_vOut37 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Nonterminal_s46 v37+ {-# NOINLINE st52 #-}+ st52 = \ !_inh1 !_prodsX39 !_syn1 -> let+ v46 :: T_Nonterminal_v46 + v46 = \ !(T_Nonterminal_vIn46 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (+ let !_prodsOparams = rule59 arg_params_ in+ let !_aroundsIn = rule71 _lhsIaroundsIn arg_nt_ in+ let !_prodsOaroundsIn = rule76 _aroundsIn in+ let !_augmentsIn = rule70 _lhsIaugmentsIn arg_nt_ in+ let !_prodsOaugmentsIn = rule77 _augmentsIn in+ let !_prodsOuniq = rule88 _lhsIuniq in+ let !(T_Productions_vOut27 _prodsIoutput _prodsIuniq) = inv_Productions_s39 _prodsX39 (T_Productions_vIn27 _prodsOaroundsIn _prodsOaugmentsIn _prodsOparams _prodsOuniq) in+ let _lhsOoutput :: Nonterminal+ !_lhsOoutput = rule69 _inh1 _prodsIoutput _syn1 arg_nt_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule75 _prodsIuniq in+ let !__result_ = T_Nonterminal_vOut46 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Nonterminal_s52 v46+ {-# NOINLINE rule57 #-}+ {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}+ rule57 = \ !inh_ !nt_ ->+ {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1417 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule58 #-}+ {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}+ rule58 = \ !nt_ !syn_ ->+ {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1423 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule59 #-}+ {-# LINE 44 "./src-ag/DefaultRules.ag" #-}+ rule59 = \ !params_ ->+ {-# LINE 44 "./src-ag/DefaultRules.ag" #-}+ params_+ {-# LINE 1429 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule60 #-}+ {-# LINE 205 "./src-ag/DefaultRules.ag" #-}+ rule60 = \ !nt_ ->+ {-# LINE 205 "./src-ag/DefaultRules.ag" #-}+ Set.singleton nt_+ {-# LINE 1435 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule61 #-}+ {-# LINE 219 "./src-ag/DefaultRules.ag" #-}+ rule61 = \ !_inh1 ->+ {-# LINE 219 "./src-ag/DefaultRules.ag" #-}+ _inh1+ {-# LINE 1441 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule62 #-}+ {-# LINE 220 "./src-ag/DefaultRules.ag" #-}+ rule62 = \ !_syn1 ->+ {-# LINE 220 "./src-ag/DefaultRules.ag" #-}+ _syn1+ {-# LINE 1447 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule64 #-}+ {-# LINE 222 "./src-ag/DefaultRules.ag" #-}+ rule64 = \ !syn_ ->+ {-# LINE 222 "./src-ag/DefaultRules.ag" #-}+ syn_+ {-# LINE 1453 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule65 #-}+ {-# LINE 223 "./src-ag/DefaultRules.ag" #-}+ rule65 = \ ((!_lhsIuseMap) :: UseMap) !nt_ ->+ {-# LINE 223 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIuseMap+ {-# LINE 1459 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule66 #-}+ {-# LINE 235 "./src-ag/DefaultRules.ag" #-}+ rule66 = \ !nt_ ->+ {-# LINE 235 "./src-ag/DefaultRules.ag" #-}+ nt_+ {-# LINE 1465 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule67 #-}+ {-# LINE 592 "./src-ag/DefaultRules.ag" #-}+ rule67 = \ !inh_ !nt_ !params_ ->+ {-# LINE 592 "./src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfId nt_ params_) inh_+ {-# LINE 1471 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule68 #-}+ {-# LINE 593 "./src-ag/DefaultRules.ag" #-}+ rule68 = \ !nt_ !params_ !syn_ ->+ {-# LINE 593 "./src-ag/DefaultRules.ag" #-}+ Map.map (elimSelfId nt_ params_) syn_+ {-# LINE 1477 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule69 #-}+ {-# LINE 632 "./src-ag/DefaultRules.ag" #-}+ rule69 = \ !_inh1 ((!_prodsIoutput) :: Productions) !_syn1 !nt_ !params_ ->+ {-# LINE 632 "./src-ag/DefaultRules.ag" #-}+ Nonterminal nt_ params_ _inh1 _syn1 _prodsIoutput+ {-# LINE 1483 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule70 #-}+ {-# LINE 804 "./src-ag/DefaultRules.ag" #-}+ rule70 = \ ((!_lhsIaugmentsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !nt_ ->+ {-# LINE 804 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaugmentsIn+ {-# LINE 1489 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule71 #-}+ {-# LINE 811 "./src-ag/DefaultRules.ag" #-}+ rule71 = \ ((!_lhsIaroundsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !nt_ ->+ {-# LINE 811 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundsIn+ {-# LINE 1495 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule72 #-}+ {-# LINE 819 "./src-ag/DefaultRules.ag" #-}+ rule72 = \ ((!_lhsImergesIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !nt_ ->+ {-# LINE 819 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergesIn+ {-# LINE 1501 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule73 #-}+ rule73 = \ ((!_prodsIerrors) :: Seq Error) ->+ _prodsIerrors+ {-# NOINLINE[1] rule75 #-}+ rule75 = \ ((!_prodsIuniq) :: Int) ->+ _prodsIuniq+ {-# NOINLINE[1] rule76 #-}+ rule76 = \ !_aroundsIn ->+ _aroundsIn+ {-# NOINLINE[1] rule77 #-}+ rule77 = \ !_augmentsIn ->+ _augmentsIn+ {-# NOINLINE[1] rule78 #-}+ rule78 = \ ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# NOINLINE[1] rule79 #-}+ rule79 = \ ((!_lhsIcr) :: Bool) ->+ _lhsIcr+ {-# NOINLINE[1] rule80 #-}+ rule80 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule81 #-}+ rule81 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->+ _lhsImanualAttrOrderMap+ {-# NOINLINE[1] rule82 #-}+ rule82 = \ !_mergesIn ->+ _mergesIn+ {-# NOINLINE[1] rule84 #-}+ rule84 = \ ((!_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# NOINLINE[1] rule85 #-}+ rule85 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule86 #-}+ rule86 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule87 #-}+ rule87 = \ ((!_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# NOINLINE[1] rule88 #-}+ rule88 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq+ {-# NOINLINE[1] rule89 #-}+ rule89 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers++-- Nonterminals ------------------------------------------------+-- wrapper+data Inh_Nonterminals = Inh_Nonterminals { aroundsIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), augmentsIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), constructorTypeMap_Inh_Nonterminals :: !(Map NontermIdent ConstructorType), cr_Inh_Nonterminals :: !(Bool), inhMap_Inh_Nonterminals :: !(Map Identifier Attributes), manualAttrOrderMap_Inh_Nonterminals :: !(AttrOrderMap), mergesIn_Inh_Nonterminals :: !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))), nonterminals_Inh_Nonterminals :: !(Set NontermIdent), o_rename_Inh_Nonterminals :: !(Bool), options_Inh_Nonterminals :: !(Options), synMap_Inh_Nonterminals :: !(Map Identifier Attributes), typeSyns_Inh_Nonterminals :: !(TypeSyns), uniq_Inh_Nonterminals :: !(Int), useMap_Inh_Nonterminals :: !(UseMap), wrappers_Inh_Nonterminals :: !(Set NontermIdent) }+data Syn_Nonterminals = Syn_Nonterminals { collect_nts_Syn_Nonterminals :: !(Set NontermIdent), errors_Syn_Nonterminals :: !(Seq Error), inhMap'_Syn_Nonterminals :: !(Map Identifier Attributes), output_Syn_Nonterminals :: !(Nonterminals), synMap'_Syn_Nonterminals :: !(Map Identifier Attributes), uniq_Syn_Nonterminals :: !(Int) }+{-# INLINABLE wrap_Nonterminals #-}+wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> (Syn_Nonterminals )+wrap_Nonterminals !(T_Nonterminals act) !(Inh_Nonterminals _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Nonterminals_vIn4 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ !(T_Nonterminals_vOut4 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq) <- return (inv_Nonterminals_s8 sem K_Nonterminals_v4 arg)+ return (Syn_Nonterminals _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq)+ )++-- cata+{-# NOINLINE sem_Nonterminals #-}+sem_Nonterminals :: Nonterminals -> T_Nonterminals +sem_Nonterminals list = Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list)++-- semantic domain+newtype T_Nonterminals = T_Nonterminals {+ attach_T_Nonterminals :: Identity (T_Nonterminals_s8 )+ }+data T_Nonterminals_s8 where C_Nonterminals_s8 :: {+ inv_Nonterminals_s8 :: !(forall t. K_Nonterminals_s8 t -> t)+ } -> T_Nonterminals_s8 +data T_Nonterminals_s9 = C_Nonterminals_s9+data T_Nonterminals_s28 where C_Nonterminals_s28 :: {+ inv_Nonterminals_s28 :: !(forall t. K_Nonterminals_s28 t -> t)+ } -> T_Nonterminals_s28 +data T_Nonterminals_s29 = C_Nonterminals_s29+newtype T_Nonterminals_s32 = C_Nonterminals_s32 {+ inv_Nonterminals_s32 :: (T_Nonterminals_v20 )+ }+data T_Nonterminals_s33 = C_Nonterminals_s33+newtype T_Nonterminals_s45 = C_Nonterminals_s45 {+ inv_Nonterminals_s45 :: (T_Nonterminals_v35 )+ }+data K_Nonterminals_s8 k where+ K_Nonterminals_v4 :: K_Nonterminals_s8 (T_Nonterminals_v4 )+ K_Nonterminals_v15 :: K_Nonterminals_s8 (T_Nonterminals_v15 )+ K_Nonterminals_v19 :: K_Nonterminals_s8 (T_Nonterminals_v19 )+data K_Nonterminals_s28 k where+ K_Nonterminals_v16 :: K_Nonterminals_s28 (T_Nonterminals_v16 )+ K_Nonterminals_v34 :: K_Nonterminals_s28 (T_Nonterminals_v34 )+type T_Nonterminals_v4 = (T_Nonterminals_vIn4 ) -> (T_Nonterminals_vOut4 )+data T_Nonterminals_vIn4 = T_Nonterminals_vIn4 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Set NontermIdent) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)+data T_Nonterminals_vOut4 = T_Nonterminals_vOut4 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Nonterminals) !(Map Identifier Attributes) !(Int)+type T_Nonterminals_v15 = (T_Nonterminals_vIn15 ) -> (T_Nonterminals_vOut15 )+data T_Nonterminals_vIn15 = T_Nonterminals_vIn15 +data T_Nonterminals_vOut15 = T_Nonterminals_vOut15 !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminals_s28 )+type T_Nonterminals_v16 = (T_Nonterminals_vIn16 ) -> (T_Nonterminals_vOut16 )+data T_Nonterminals_vIn16 = T_Nonterminals_vIn16 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(Int) !(UseMap) !(Set NontermIdent)+data T_Nonterminals_vOut16 = T_Nonterminals_vOut16 !(Seq Error) !(Nonterminals) !(Int)+type T_Nonterminals_v19 = (T_Nonterminals_vIn19 ) -> (T_Nonterminals_vOut19 )+data T_Nonterminals_vIn19 = T_Nonterminals_vIn19 !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)+data T_Nonterminals_vOut19 = T_Nonterminals_vOut19 !(Set NontermIdent) !(Seq Error) !(Map Identifier Attributes) !(Map Identifier Attributes) !(T_Nonterminals_s32 )+type T_Nonterminals_v20 = (T_Nonterminals_vIn20 ) -> (T_Nonterminals_vOut20 )+data T_Nonterminals_vIn20 = T_Nonterminals_vIn20 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)+data T_Nonterminals_vOut20 = T_Nonterminals_vOut20 !(Nonterminals) !(Int)+type T_Nonterminals_v34 = (T_Nonterminals_vIn34 ) -> (T_Nonterminals_vOut34 )+data T_Nonterminals_vIn34 = T_Nonterminals_vIn34 !(Map NontermIdent ConstructorType) !(Bool) !(Map Identifier Attributes) !(AttrOrderMap) !(Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) !(Bool) !(Options) !(Map Identifier Attributes) !(TypeSyns) !(UseMap) !(Set NontermIdent)+data T_Nonterminals_vOut34 = T_Nonterminals_vOut34 !(Seq Error) !(T_Nonterminals_s45 )+type T_Nonterminals_v35 = (T_Nonterminals_vIn35 ) -> (T_Nonterminals_vOut35 )+data T_Nonterminals_vIn35 = T_Nonterminals_vIn35 !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) !(Int)+data T_Nonterminals_vOut35 = T_Nonterminals_vOut35 !(Nonterminals) !(Int)+{-# NOINLINE sem_Nonterminals_Cons #-}+sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals +sem_Nonterminals_Cons arg_hd_ arg_tl_ = T_Nonterminals (return st8) where+ {-# NOINLINE st8 #-}+ !st8 = let+ k8 :: K_Nonterminals_s8 t -> t+ k8 K_Nonterminals_v4 = v4+ k8 K_Nonterminals_v15 = v15+ k8 K_Nonterminals_v19 = v19+ v4 :: T_Nonterminals_v4 + v4 = \ !(T_Nonterminals_vIn4 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_hdX6 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_)) in+ let !_tlX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_)) in+ let !_hdOconstructorTypeMap = rule99 _lhsIconstructorTypeMap in+ let !_hdOcr = rule100 _lhsIcr in+ let !_hdOinhMap = rule101 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule102 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule103 _lhsImergesIn in+ let !_hdOo_rename = rule105 _lhsIo_rename in+ let !_hdOoptions = rule106 _lhsIoptions in+ let !_hdOsynMap = rule107 _lhsIsynMap in+ let !_hdOtypeSyns = rule108 _lhsItypeSyns in+ let !_hdOuseMap = rule110 _lhsIuseMap in+ let !_hdOwrappers = rule111 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule114 _lhsIconstructorTypeMap in+ let !_tlOcr = rule115 _lhsIcr in+ let !_tlOinhMap = rule116 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule117 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule118 _lhsImergesIn in+ let !_tlOo_rename = rule120 _lhsIo_rename in+ let !_tlOoptions = rule121 _lhsIoptions in+ let !_tlOsynMap = rule122 _lhsIsynMap in+ let !_tlOtypeSyns = rule123 _lhsItypeSyns in+ let !_tlOuseMap = rule125 _lhsIuseMap in+ let !_tlOwrappers = rule126 _lhsIwrappers in+ let !_hdOaroundsIn = rule97 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule98 _lhsIaugmentsIn in+ let !_hdOuniq = rule109 _lhsIuniq in+ let !_tlOaroundsIn = rule112 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule113 _lhsIaugmentsIn in+ let !(T_Nonterminal_vOut18 _hdIcollect_nts _hdIerrors _hdIinhMap' _hdIoutput _hdIsynMap' _hdIuniq) = inv_Nonterminal_s6 _hdX6 K_Nonterminal_v18 (T_Nonterminal_vIn18 _hdOaroundsIn _hdOaugmentsIn _hdOconstructorTypeMap _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in+ let !(T_Nonterminals_vOut19 _tlIcollect_nts _tlIerrors _tlIinhMap' _tlIsynMap' _tlX32) = inv_Nonterminals_s8 _tlX8 K_Nonterminals_v19 (T_Nonterminals_vIn19 _tlOconstructorTypeMap _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule90 _hdIcollect_nts _tlIcollect_nts in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule91 _hdIerrors _tlIerrors in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule92 _hdIinhMap' _tlIinhMap' in+ let !_tlOuniq = rule124 _hdIuniq in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule93 _hdIsynMap' _tlIsynMap' in+ let !(T_Nonterminals_vOut20 _tlIoutput _tlIuniq) = inv_Nonterminals_s32 _tlX32 (T_Nonterminals_vIn20 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in+ let !_output = rule94 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule95 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule96 _tlIuniq in+ let !__result_ = T_Nonterminals_vOut4 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq+ in __result_ )+ v15 :: T_Nonterminals_v15 + v15 = \ !(T_Nonterminals_vIn15 ) -> (+ let !_hdX6 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_)) in+ let !_tlX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_)) in+ let !(T_Nonterminal_vOut32 _hdIinhMap' _hdIsynMap' _hdX43) = inv_Nonterminal_s6 _hdX6 K_Nonterminal_v32 (T_Nonterminal_vIn32 ) in+ let !(T_Nonterminals_vOut15 _tlIinhMap' _tlIsynMap' _tlX28) = inv_Nonterminals_s8 _tlX8 K_Nonterminals_v15 (T_Nonterminals_vIn15 ) in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule92 _hdIinhMap' _tlIinhMap' in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule93 _hdIsynMap' _tlIsynMap' in+ let !__st_ = st28 _hdX43 _tlX28+ !__result_ = T_Nonterminals_vOut15 _lhsOinhMap' _lhsOsynMap' __st_+ in __result_ )+ v19 :: T_Nonterminals_v19 + v19 = \ !(T_Nonterminals_vIn19 _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let !_hdX6 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_)) in+ let !_tlX8 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_)) in+ let !_hdOconstructorTypeMap = rule99 _lhsIconstructorTypeMap in+ let !_hdOcr = rule100 _lhsIcr in+ let !_hdOinhMap = rule101 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule102 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule103 _lhsImergesIn in+ let !_hdOo_rename = rule105 _lhsIo_rename in+ let !_hdOoptions = rule106 _lhsIoptions in+ let !_hdOsynMap = rule107 _lhsIsynMap in+ let !_hdOtypeSyns = rule108 _lhsItypeSyns in+ let !_hdOuseMap = rule110 _lhsIuseMap in+ let !_hdOwrappers = rule111 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule114 _lhsIconstructorTypeMap in+ let !_tlOcr = rule115 _lhsIcr in+ let !_tlOinhMap = rule116 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule117 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule118 _lhsImergesIn in+ let !_tlOo_rename = rule120 _lhsIo_rename in+ let !_tlOoptions = rule121 _lhsIoptions in+ let !_tlOsynMap = rule122 _lhsIsynMap in+ let !_tlOtypeSyns = rule123 _lhsItypeSyns in+ let !_tlOuseMap = rule125 _lhsIuseMap in+ let !_tlOwrappers = rule126 _lhsIwrappers in+ let !(T_Nonterminal_vOut36 _hdIcollect_nts _hdIerrors _hdIinhMap' _hdIsynMap' _hdX46) = inv_Nonterminal_s6 _hdX6 K_Nonterminal_v36 (T_Nonterminal_vIn36 _hdOconstructorTypeMap _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuseMap _hdOwrappers) in+ let !(T_Nonterminals_vOut19 _tlIcollect_nts _tlIerrors _tlIinhMap' _tlIsynMap' _tlX32) = inv_Nonterminals_s8 _tlX8 K_Nonterminals_v19 (T_Nonterminals_vIn19 _tlOconstructorTypeMap _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule90 _hdIcollect_nts _tlIcollect_nts in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule91 _hdIerrors _tlIerrors in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule92 _hdIinhMap' _tlIinhMap' in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule93 _hdIsynMap' _tlIsynMap' in+ let !__st_ = st32 _hdX46 _tlX32+ !__result_ = T_Nonterminals_vOut19 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOsynMap' __st_+ in __result_ )+ in C_Nonterminals_s8 k8+ {-# NOINLINE st28 #-}+ st28 = \ !_hdX43 !_tlX28 -> let+ k28 :: K_Nonterminals_s28 t -> t+ k28 K_Nonterminals_v16 = v16+ k28 K_Nonterminals_v34 = v34+ v16 :: T_Nonterminals_v16 + v16 = \ !(T_Nonterminals_vIn16 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_hdOconstructorTypeMap = rule99 _lhsIconstructorTypeMap in+ let !_hdOcr = rule100 _lhsIcr in+ let !_hdOinhMap = rule101 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule102 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule103 _lhsImergesIn in+ let !_hdOo_rename = rule105 _lhsIo_rename in+ let !_hdOoptions = rule106 _lhsIoptions in+ let !_hdOsynMap = rule107 _lhsIsynMap in+ let !_hdOtypeSyns = rule108 _lhsItypeSyns in+ let !_hdOuseMap = rule110 _lhsIuseMap in+ let !_hdOwrappers = rule111 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule114 _lhsIconstructorTypeMap in+ let !_tlOcr = rule115 _lhsIcr in+ let !_tlOinhMap = rule116 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule117 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule118 _lhsImergesIn in+ let !_tlOo_rename = rule120 _lhsIo_rename in+ let !_tlOoptions = rule121 _lhsIoptions in+ let !_tlOsynMap = rule122 _lhsIsynMap in+ let !_tlOtypeSyns = rule123 _lhsItypeSyns in+ let !_tlOuseMap = rule125 _lhsIuseMap in+ let !_tlOwrappers = rule126 _lhsIwrappers in+ let !_hdOaroundsIn = rule97 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule98 _lhsIaugmentsIn in+ let !_hdOuniq = rule109 _lhsIuniq in+ let !_tlOaroundsIn = rule112 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule113 _lhsIaugmentsIn in+ let !(T_Nonterminal_vOut33 _hdIerrors _hdIoutput _hdIuniq) = inv_Nonterminal_s43 _hdX43 K_Nonterminal_v33 (T_Nonterminal_vIn33 _hdOaroundsIn _hdOaugmentsIn _hdOconstructorTypeMap _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in+ let !(T_Nonterminals_vOut34 _tlIerrors _tlX45) = inv_Nonterminals_s28 _tlX28 K_Nonterminals_v34 (T_Nonterminals_vIn34 _tlOconstructorTypeMap _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule91 _hdIerrors _tlIerrors in+ let !_tlOuniq = rule124 _hdIuniq in+ let !(T_Nonterminals_vOut35 _tlIoutput _tlIuniq) = inv_Nonterminals_s45 _tlX45 (T_Nonterminals_vIn35 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in+ let !_output = rule94 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule95 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule96 _tlIuniq in+ let !__result_ = T_Nonterminals_vOut16 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v34 :: T_Nonterminals_v34 + v34 = \ !(T_Nonterminals_vIn34 _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let !_hdOconstructorTypeMap = rule99 _lhsIconstructorTypeMap in+ let !_hdOcr = rule100 _lhsIcr in+ let !_hdOinhMap = rule101 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule102 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule103 _lhsImergesIn in+ let !_hdOo_rename = rule105 _lhsIo_rename in+ let !_hdOoptions = rule106 _lhsIoptions in+ let !_hdOsynMap = rule107 _lhsIsynMap in+ let !_hdOtypeSyns = rule108 _lhsItypeSyns in+ let !_hdOuseMap = rule110 _lhsIuseMap in+ let !_hdOwrappers = rule111 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule114 _lhsIconstructorTypeMap in+ let !_tlOcr = rule115 _lhsIcr in+ let !_tlOinhMap = rule116 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule117 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule118 _lhsImergesIn in+ let !_tlOo_rename = rule120 _lhsIo_rename in+ let !_tlOoptions = rule121 _lhsIoptions in+ let !_tlOsynMap = rule122 _lhsIsynMap in+ let !_tlOtypeSyns = rule123 _lhsItypeSyns in+ let !_tlOuseMap = rule125 _lhsIuseMap in+ let !_tlOwrappers = rule126 _lhsIwrappers in+ let !(T_Nonterminal_vOut45 _hdIerrors _hdX52) = inv_Nonterminal_s43 _hdX43 K_Nonterminal_v45 (T_Nonterminal_vIn45 _hdOconstructorTypeMap _hdOcr _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOo_rename _hdOoptions _hdOsynMap _hdOtypeSyns _hdOuseMap _hdOwrappers) in+ let !(T_Nonterminals_vOut34 _tlIerrors _tlX45) = inv_Nonterminals_s28 _tlX28 K_Nonterminals_v34 (T_Nonterminals_vIn34 _tlOconstructorTypeMap _tlOcr _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOo_rename _tlOoptions _tlOsynMap _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule91 _hdIerrors _tlIerrors in+ let !__st_ = st45 _hdX52 _tlX45+ !__result_ = T_Nonterminals_vOut34 _lhsOerrors __st_+ in __result_ )+ in C_Nonterminals_s28 k28+ {-# NOINLINE st32 #-}+ st32 = \ !_hdX46 !_tlX32 -> let+ v20 :: T_Nonterminals_v20 + v20 = \ !(T_Nonterminals_vIn20 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (+ let !_hdOaroundsIn = rule97 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule98 _lhsIaugmentsIn in+ let !_hdOuniq = rule109 _lhsIuniq in+ let !_tlOaroundsIn = rule112 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule113 _lhsIaugmentsIn in+ let !(T_Nonterminal_vOut37 _hdIoutput _hdIuniq) = inv_Nonterminal_s46 _hdX46 (T_Nonterminal_vIn37 _hdOaroundsIn _hdOaugmentsIn _hdOuniq) in+ let !_tlOuniq = rule124 _hdIuniq in+ let !(T_Nonterminals_vOut20 _tlIoutput _tlIuniq) = inv_Nonterminals_s32 _tlX32 (T_Nonterminals_vIn20 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in+ let !_output = rule94 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule95 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule96 _tlIuniq in+ let !__result_ = T_Nonterminals_vOut20 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Nonterminals_s32 v20+ {-# NOINLINE st45 #-}+ st45 = \ !_hdX52 !_tlX45 -> let+ v35 :: T_Nonterminals_v35 + v35 = \ !(T_Nonterminals_vIn35 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (+ let !_hdOaroundsIn = rule97 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule98 _lhsIaugmentsIn in+ let !_hdOuniq = rule109 _lhsIuniq in+ let !_tlOaroundsIn = rule112 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule113 _lhsIaugmentsIn in+ let !(T_Nonterminal_vOut46 _hdIoutput _hdIuniq) = inv_Nonterminal_s52 _hdX52 (T_Nonterminal_vIn46 _hdOaroundsIn _hdOaugmentsIn _hdOuniq) in+ let !_tlOuniq = rule124 _hdIuniq in+ let !(T_Nonterminals_vOut35 _tlIoutput _tlIuniq) = inv_Nonterminals_s45 _tlX45 (T_Nonterminals_vIn35 _tlOaroundsIn _tlOaugmentsIn _tlOuniq) in+ let !_output = rule94 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule95 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule96 _tlIuniq in+ let !__result_ = T_Nonterminals_vOut35 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Nonterminals_s45 v35+ {-# NOINLINE[1] rule90 #-}+ rule90 = \ ((!_hdIcollect_nts) :: Set NontermIdent) ((!_tlIcollect_nts) :: Set NontermIdent) ->+ _hdIcollect_nts `Set.union` _tlIcollect_nts+ {-# NOINLINE[1] rule91 #-}+ rule91 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# NOINLINE[1] rule92 #-}+ rule92 = \ ((!_hdIinhMap') :: Map Identifier Attributes) ((!_tlIinhMap') :: Map Identifier Attributes) ->+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# NOINLINE[1] rule93 #-}+ rule93 = \ ((!_hdIsynMap') :: Map Identifier Attributes) ((!_tlIsynMap') :: Map Identifier Attributes) ->+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# NOINLINE[1] rule94 #-}+ rule94 = \ ((!_hdIoutput) :: Nonterminal) ((!_tlIoutput) :: Nonterminals) ->+ (:) _hdIoutput _tlIoutput+ {-# NOINLINE[1] rule95 #-}+ rule95 = \ !_output ->+ _output+ {-# NOINLINE[1] rule96 #-}+ rule96 = \ ((!_tlIuniq) :: Int) ->+ _tlIuniq+ {-# NOINLINE[1] rule97 #-}+ rule97 = \ ((!_lhsIaroundsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ _lhsIaroundsIn+ {-# NOINLINE[1] rule98 #-}+ rule98 = \ ((!_lhsIaugmentsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ _lhsIaugmentsIn+ {-# NOINLINE[1] rule99 #-}+ rule99 = \ ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# NOINLINE[1] rule100 #-}+ rule100 = \ ((!_lhsIcr) :: Bool) ->+ _lhsIcr+ {-# NOINLINE[1] rule101 #-}+ rule101 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule102 #-}+ rule102 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->+ _lhsImanualAttrOrderMap+ {-# NOINLINE[1] rule103 #-}+ rule103 = \ ((!_lhsImergesIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->+ _lhsImergesIn+ {-# NOINLINE[1] rule105 #-}+ rule105 = \ ((!_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# NOINLINE[1] rule106 #-}+ rule106 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule107 #-}+ rule107 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule108 #-}+ rule108 = \ ((!_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# NOINLINE[1] rule109 #-}+ rule109 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq+ {-# NOINLINE[1] rule110 #-}+ rule110 = \ ((!_lhsIuseMap) :: UseMap) ->+ _lhsIuseMap+ {-# NOINLINE[1] rule111 #-}+ rule111 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# NOINLINE[1] rule112 #-}+ rule112 = \ ((!_lhsIaroundsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ _lhsIaroundsIn+ {-# NOINLINE[1] rule113 #-}+ rule113 = \ ((!_lhsIaugmentsIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ _lhsIaugmentsIn+ {-# NOINLINE[1] rule114 #-}+ rule114 = \ ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# NOINLINE[1] rule115 #-}+ rule115 = \ ((!_lhsIcr) :: Bool) ->+ _lhsIcr+ {-# NOINLINE[1] rule116 #-}+ rule116 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule117 #-}+ rule117 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->+ _lhsImanualAttrOrderMap+ {-# NOINLINE[1] rule118 #-}+ rule118 = \ ((!_lhsImergesIn) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression)))) ->+ _lhsImergesIn+ {-# NOINLINE[1] rule120 #-}+ rule120 = \ ((!_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# NOINLINE[1] rule121 #-}+ rule121 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule122 #-}+ rule122 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule123 #-}+ rule123 = \ ((!_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# NOINLINE[1] rule124 #-}+ rule124 = \ ((!_hdIuniq) :: Int) ->+ _hdIuniq+ {-# NOINLINE[1] rule125 #-}+ rule125 = \ ((!_lhsIuseMap) :: UseMap) ->+ _lhsIuseMap+ {-# NOINLINE[1] rule126 #-}+ rule126 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_Nonterminals_Nil #-}+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil = T_Nonterminals (return st8) where+ {-# NOINLINE st8 #-}+ !st8 = let+ k8 :: K_Nonterminals_s8 t -> t+ k8 K_Nonterminals_v4 = v4+ k8 K_Nonterminals_v15 = v15+ k8 K_Nonterminals_v19 = v19+ v4 :: T_Nonterminals_v4 + v4 = \ !(T_Nonterminals_vIn4 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule127 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule128 () in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule129 () in+ let !_output = rule131 () in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule130 () in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule132 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule133 _lhsIuniq in+ let !__result_ = T_Nonterminals_vOut4 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOoutput _lhsOsynMap' _lhsOuniq+ in __result_ )+ v15 :: T_Nonterminals_v15 + v15 = \ !(T_Nonterminals_vIn15 ) -> (+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule129 () in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule130 () in+ let !__st_ = st28 ()+ !__result_ = T_Nonterminals_vOut15 _lhsOinhMap' _lhsOsynMap' __st_+ in __result_ )+ v19 :: T_Nonterminals_v19 + v19 = \ !(T_Nonterminals_vIn19 _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOcollect_nts :: Set NontermIdent+ !_lhsOcollect_nts = rule127 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule128 () in+ let _lhsOinhMap' :: Map Identifier Attributes+ !_lhsOinhMap' = rule129 () in+ let _lhsOsynMap' :: Map Identifier Attributes+ !_lhsOsynMap' = rule130 () in+ let !__st_ = st32 ()+ !__result_ = T_Nonterminals_vOut19 _lhsOcollect_nts _lhsOerrors _lhsOinhMap' _lhsOsynMap' __st_+ in __result_ )+ in C_Nonterminals_s8 k8+ {-# NOINLINE st28 #-}+ st28 = \ (_ :: ()) -> let+ k28 :: K_Nonterminals_s28 t -> t+ k28 K_Nonterminals_v16 = v16+ k28 K_Nonterminals_v34 = v34+ v16 :: T_Nonterminals_v16 + v16 = \ !(T_Nonterminals_vIn16 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule128 () in+ let !_output = rule131 () in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule132 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule133 _lhsIuniq in+ let !__result_ = T_Nonterminals_vOut16 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v34 :: T_Nonterminals_v34 + v34 = \ !(T_Nonterminals_vIn34 _lhsIconstructorTypeMap _lhsIcr _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsIo_rename _lhsIoptions _lhsIsynMap _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule128 () in+ let !__st_ = st45 ()+ !__result_ = T_Nonterminals_vOut34 _lhsOerrors __st_+ in __result_ )+ in C_Nonterminals_s28 k28+ {-# NOINLINE st32 #-}+ st32 = \ (_ :: ()) -> let+ v20 :: T_Nonterminals_v20 + v20 = \ !(T_Nonterminals_vIn20 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (+ let !_output = rule131 () in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule132 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule133 _lhsIuniq in+ let !__result_ = T_Nonterminals_vOut20 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Nonterminals_s32 v20+ {-# NOINLINE st45 #-}+ st45 = \ (_ :: ()) -> let+ v35 :: T_Nonterminals_v35 + v35 = \ !(T_Nonterminals_vIn35 _lhsIaroundsIn _lhsIaugmentsIn _lhsIuniq) -> (+ let !_output = rule131 () in+ let _lhsOoutput :: Nonterminals+ !_lhsOoutput = rule132 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule133 _lhsIuniq in+ let !__result_ = T_Nonterminals_vOut35 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Nonterminals_s45 v35+ {-# NOINLINE[1] rule127 #-}+ rule127 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule128 #-}+ rule128 = \ (_ :: ()) ->+ Seq.empty+ {-# NOINLINE[1] rule129 #-}+ rule129 = \ (_ :: ()) ->+ Map.empty+ {-# NOINLINE[1] rule130 #-}+ rule130 = \ (_ :: ()) ->+ Map.empty+ {-# NOINLINE[1] rule131 #-}+ rule131 = \ (_ :: ()) ->+ []+ {-# NOINLINE[1] rule132 #-}+ rule132 = \ !_output ->+ _output+ {-# NOINLINE[1] rule133 #-}+ rule133 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { con_Inh_Pattern :: !(ConstructorIdent), nt_Inh_Pattern :: !(NontermIdent) }+data Syn_Pattern = Syn_Pattern { containsVars_Syn_Pattern :: !(Bool), copy_Syn_Pattern :: !(Pattern), definedAttrs_Syn_Pattern :: !(Set (Identifier,Identifier)), errors_Syn_Pattern :: !(Seq Error), locals_Syn_Pattern :: !(Set Identifier), output_Syn_Pattern :: !(Pattern) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern !(T_Pattern act) !(Inh_Pattern _lhsIcon _lhsInt) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Pattern_vIn5 _lhsIcon _lhsInt+ !(T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput) <- return (inv_Pattern_s10 sem K_Pattern_v5 arg)+ return (Syn_Pattern _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr !name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product !pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias !field_ !attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore !pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s10 )+ }+data T_Pattern_s10 where C_Pattern_s10 :: {+ inv_Pattern_s10 :: !(forall t. K_Pattern_s10 t -> t)+ } -> T_Pattern_s10 +data T_Pattern_s11 = C_Pattern_s11+data T_Pattern_s35 = C_Pattern_s35+data T_Pattern_s36 = C_Pattern_s36+data T_Pattern_s40 = C_Pattern_s40+data T_Pattern_s50 = C_Pattern_s50+data T_Pattern_s55 where C_Pattern_s55 :: {+ inv_Pattern_s55 :: !(forall t. K_Pattern_s55 t -> t)+ } -> T_Pattern_s55 +data K_Pattern_s10 k where+ K_Pattern_v5 :: K_Pattern_s10 (T_Pattern_v5 )+ K_Pattern_v22 :: K_Pattern_s10 (T_Pattern_v22 )+ K_Pattern_v23 :: K_Pattern_s10 (T_Pattern_v23 )+ K_Pattern_v28 :: K_Pattern_s10 (T_Pattern_v28 )+ K_Pattern_v42 :: K_Pattern_s10 (T_Pattern_v42 )+ K_Pattern_v50 :: K_Pattern_s10 (T_Pattern_v50 )+data K_Pattern_s55 k where+ K_Pattern_v51 :: K_Pattern_s55 (T_Pattern_v51 )+ K_Pattern_v56 :: K_Pattern_s55 (T_Pattern_v56 )+type T_Pattern_v5 = (T_Pattern_vIn5 ) -> (T_Pattern_vOut5 )+data T_Pattern_vIn5 = T_Pattern_vIn5 !(ConstructorIdent) !(NontermIdent)+data T_Pattern_vOut5 = T_Pattern_vOut5 !(Bool) !(Pattern) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)+type T_Pattern_v22 = (T_Pattern_vIn22 ) -> (T_Pattern_vOut22 )+data T_Pattern_vIn22 = T_Pattern_vIn22 +data T_Pattern_vOut22 = T_Pattern_vOut22 !(Pattern) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)+type T_Pattern_v23 = (T_Pattern_vIn23 ) -> (T_Pattern_vOut23 )+data T_Pattern_vIn23 = T_Pattern_vIn23 +data T_Pattern_vOut23 = T_Pattern_vOut23 !(Bool) !(Pattern) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)+type T_Pattern_v28 = (T_Pattern_vIn28 ) -> (T_Pattern_vOut28 )+data T_Pattern_vIn28 = T_Pattern_vIn28 +data T_Pattern_vOut28 = T_Pattern_vOut28 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)+type T_Pattern_v42 = (T_Pattern_vIn42 ) -> (T_Pattern_vOut42 )+data T_Pattern_vIn42 = T_Pattern_vIn42 +data T_Pattern_vOut42 = T_Pattern_vOut42 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Pattern)+type T_Pattern_v50 = (T_Pattern_vIn50 ) -> (T_Pattern_vOut50 )+data T_Pattern_vIn50 = T_Pattern_vIn50 +data T_Pattern_vOut50 = T_Pattern_vOut50 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(T_Pattern_s55 )+type T_Pattern_v51 = (T_Pattern_vIn51 ) -> (T_Pattern_vOut51 )+data T_Pattern_vIn51 = T_Pattern_vIn51 +data T_Pattern_vOut51 = T_Pattern_vOut51 !(Bool) !(Pattern)+type T_Pattern_v56 = (T_Pattern_vIn56 ) -> (T_Pattern_vOut56 )+data T_Pattern_vIn56 = T_Pattern_vIn56 +data T_Pattern_vOut56 = T_Pattern_vOut56 !(Pattern)+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr !arg_name_ arg_pats_ = T_Pattern (return st10) where+ {-# NOINLINE st10 #-}+ !st10 = let+ k10 :: K_Pattern_s10 t -> t+ k10 K_Pattern_v5 = v5+ k10 K_Pattern_v22 = v22+ k10 K_Pattern_v23 = v23+ k10 K_Pattern_v28 = v28+ k10 K_Pattern_v42 = v42+ k10 K_Pattern_v50 = v50+ v5 :: T_Pattern_v5 + v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule134 _patsIcontainsVars in+ let !_copy = rule138 _patsIcopy arg_name_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule140 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule135 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule136 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule137 _patsIlocals in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v22 :: T_Pattern_v22 + v22 = \ !(T_Pattern_vIn22 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut38 _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v38 (T_Patterns_vIn38 ) in+ let !_copy = rule138 _patsIcopy arg_name_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule140 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule135 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule136 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule137 _patsIlocals in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v23 :: T_Pattern_v23 + v23 = \ !(T_Pattern_vIn23 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule134 _patsIcontainsVars in+ let !_copy = rule138 _patsIcopy arg_name_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule140 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule135 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule136 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule137 _patsIlocals in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v28 :: T_Pattern_v28 + v28 = \ !(T_Pattern_vIn28 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut41 _patsIcontainsVars _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v41 (T_Patterns_vIn41 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule134 _patsIcontainsVars in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule135 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule136 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule137 _patsIlocals in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v42 :: T_Pattern_v42 + v42 = \ !(T_Pattern_vIn42 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut49 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v49 (T_Patterns_vIn49 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule135 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule136 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule137 _patsIlocals in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v50 :: T_Pattern_v50 + v50 = \ !(T_Pattern_vIn50 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut54 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsX57) = inv_Patterns_s12 _patsX12 K_Patterns_v54 (T_Patterns_vIn54 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule135 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule136 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule137 _patsIlocals in+ let !__st_ = st55 _patsX57+ !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Pattern_s10 k10+ {-# NOINLINE st55 #-}+ st55 = \ !_patsX57 -> let+ k55 :: K_Pattern_s55 t -> t+ k55 K_Pattern_v51 = v51+ k55 K_Pattern_v56 = v56+ v51 :: T_Pattern_v51 + v51 = \ !(T_Pattern_vIn51 ) -> (+ let !(T_Patterns_vOut55 _patsIcontainsVars _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v55 (T_Patterns_vIn55 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule134 _patsIcontainsVars in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v56 :: T_Pattern_v56 + v56 = \ !(T_Pattern_vIn56 ) -> (+ let !(T_Patterns_vOut57 _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v57 (T_Patterns_vIn57 ) in+ let !_output = rule139 _patsIoutput arg_name_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule141 _output in+ let !__result_ = T_Pattern_vOut56 _lhsOoutput+ in __result_ )+ in C_Pattern_s55 k55+ {-# NOINLINE[1] rule134 #-}+ rule134 = \ ((!_patsIcontainsVars) :: Bool) ->+ _patsIcontainsVars+ {-# NOINLINE[1] rule135 #-}+ rule135 = \ ((!_patsIdefinedAttrs) :: Set (Identifier,Identifier)) ->+ _patsIdefinedAttrs+ {-# NOINLINE[1] rule136 #-}+ rule136 = \ ((!_patsIerrors) :: Seq Error) ->+ _patsIerrors+ {-# NOINLINE[1] rule137 #-}+ rule137 = \ ((!_patsIlocals) :: Set Identifier) ->+ _patsIlocals+ {-# NOINLINE[1] rule138 #-}+ rule138 = \ ((!_patsIcopy) :: Patterns) !name_ ->+ Constr name_ _patsIcopy+ {-# NOINLINE[1] rule139 #-}+ rule139 = \ ((!_patsIoutput) :: Patterns) !name_ ->+ Constr name_ _patsIoutput+ {-# NOINLINE[1] rule140 #-}+ rule140 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule141 #-}+ rule141 = \ !_output ->+ _output+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product !arg_pos_ arg_pats_ = T_Pattern (return st10) where+ {-# NOINLINE st10 #-}+ !st10 = let+ k10 :: K_Pattern_s10 t -> t+ k10 K_Pattern_v5 = v5+ k10 K_Pattern_v22 = v22+ k10 K_Pattern_v23 = v23+ k10 K_Pattern_v28 = v28+ k10 K_Pattern_v42 = v42+ k10 K_Pattern_v50 = v50+ v5 :: T_Pattern_v5 + v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule144 _patsIcontainsVars in+ let !_copy = rule148 _patsIcopy arg_pos_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule150 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule145 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule146 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule147 _patsIlocals in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v22 :: T_Pattern_v22 + v22 = \ !(T_Pattern_vIn22 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut38 _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v38 (T_Patterns_vIn38 ) in+ let !_copy = rule148 _patsIcopy arg_pos_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule150 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule145 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule146 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule147 _patsIlocals in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v23 :: T_Pattern_v23 + v23 = \ !(T_Pattern_vIn23 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut21 _patsIcontainsVars _patsIcopy _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v21 (T_Patterns_vIn21 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule144 _patsIcontainsVars in+ let !_copy = rule148 _patsIcopy arg_pos_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule150 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule145 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule146 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule147 _patsIlocals in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v28 :: T_Pattern_v28 + v28 = \ !(T_Pattern_vIn28 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut41 _patsIcontainsVars _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v41 (T_Patterns_vIn41 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule144 _patsIcontainsVars in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule145 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule146 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule147 _patsIlocals in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v42 :: T_Pattern_v42 + v42 = \ !(T_Pattern_vIn42 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut49 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsIoutput) = inv_Patterns_s12 _patsX12 K_Patterns_v49 (T_Patterns_vIn49 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule145 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule146 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule147 _patsIlocals in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v50 :: T_Pattern_v50 + v50 = \ !(T_Pattern_vIn50 ) -> (+ let !_patsX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_)) in+ let !(T_Patterns_vOut54 _patsIdefinedAttrs _patsIerrors _patsIlocals _patsX57) = inv_Patterns_s12 _patsX12 K_Patterns_v54 (T_Patterns_vIn54 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule145 _patsIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule146 _patsIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule147 _patsIlocals in+ let !__st_ = st55 _patsX57+ !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Pattern_s10 k10+ {-# NOINLINE st55 #-}+ st55 = \ !_patsX57 -> let+ k55 :: K_Pattern_s55 t -> t+ k55 K_Pattern_v51 = v51+ k55 K_Pattern_v56 = v56+ v51 :: T_Pattern_v51 + v51 = \ !(T_Pattern_vIn51 ) -> (+ let !(T_Patterns_vOut55 _patsIcontainsVars _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v55 (T_Patterns_vIn55 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule144 _patsIcontainsVars in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v56 :: T_Pattern_v56 + v56 = \ !(T_Pattern_vIn56 ) -> (+ let !(T_Patterns_vOut57 _patsIoutput) = inv_Patterns_s57 _patsX57 K_Patterns_v57 (T_Patterns_vIn57 ) in+ let !_output = rule149 _patsIoutput arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule151 _output in+ let !__result_ = T_Pattern_vOut56 _lhsOoutput+ in __result_ )+ in C_Pattern_s55 k55+ {-# NOINLINE[1] rule144 #-}+ rule144 = \ ((!_patsIcontainsVars) :: Bool) ->+ _patsIcontainsVars+ {-# NOINLINE[1] rule145 #-}+ rule145 = \ ((!_patsIdefinedAttrs) :: Set (Identifier,Identifier)) ->+ _patsIdefinedAttrs+ {-# NOINLINE[1] rule146 #-}+ rule146 = \ ((!_patsIerrors) :: Seq Error) ->+ _patsIerrors+ {-# NOINLINE[1] rule147 #-}+ rule147 = \ ((!_patsIlocals) :: Set Identifier) ->+ _patsIlocals+ {-# NOINLINE[1] rule148 #-}+ rule148 = \ ((!_patsIcopy) :: Patterns) !pos_ ->+ Product pos_ _patsIcopy+ {-# NOINLINE[1] rule149 #-}+ rule149 = \ ((!_patsIoutput) :: Patterns) !pos_ ->+ Product pos_ _patsIoutput+ {-# NOINLINE[1] rule150 #-}+ rule150 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule151 #-}+ rule151 = \ !_output ->+ _output+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias !arg_field_ !arg_attr_ arg_pat_ = T_Pattern (return st10) where+ {-# NOINLINE st10 #-}+ !st10 = let+ k10 :: K_Pattern_s10 t -> t+ k10 K_Pattern_v5 = v5+ k10 K_Pattern_v22 = v22+ k10 K_Pattern_v23 = v23+ k10 K_Pattern_v28 = v28+ k10 K_Pattern_v42 = v42+ k10 K_Pattern_v50 = v50+ v5 :: T_Pattern_v5 + v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule156 () in+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in+ let !_copy = rule158 _patIcopy arg_attr_ arg_field_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule160 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule154 _patIdefinedAttrs arg_attr_ arg_field_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule157 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule155 _patIlocals arg_attr_ arg_field_ in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v22 :: T_Pattern_v22 + v22 = \ !(T_Pattern_vIn22 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in+ let !_copy = rule158 _patIcopy arg_attr_ arg_field_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule160 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule154 _patIdefinedAttrs arg_attr_ arg_field_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule157 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule155 _patIlocals arg_attr_ arg_field_ in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v23 :: T_Pattern_v23 + v23 = \ !(T_Pattern_vIn23 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule156 () in+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in+ let !_copy = rule158 _patIcopy arg_attr_ arg_field_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule160 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule154 _patIdefinedAttrs arg_attr_ arg_field_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule157 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule155 _patIlocals arg_attr_ arg_field_ in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v28 :: T_Pattern_v28 + v28 = \ !(T_Pattern_vIn28 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule156 () in+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut42 _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v42 (T_Pattern_vIn42 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule154 _patIdefinedAttrs arg_attr_ arg_field_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule157 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule155 _patIlocals arg_attr_ arg_field_ in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v42 :: T_Pattern_v42 + v42 = \ !(T_Pattern_vIn42 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut42 _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v42 (T_Pattern_vIn42 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule154 _patIdefinedAttrs arg_attr_ arg_field_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule157 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule155 _patIlocals arg_attr_ arg_field_ in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v50 :: T_Pattern_v50 + v50 = \ !(T_Pattern_vIn50 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut50 _patIdefinedAttrs _patIerrors _patIlocals _patX55) = inv_Pattern_s10 _patX10 K_Pattern_v50 (T_Pattern_vIn50 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule154 _patIdefinedAttrs arg_attr_ arg_field_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule157 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule155 _patIlocals arg_attr_ arg_field_ in+ let !__st_ = st55 _patX55+ !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Pattern_s10 k10+ {-# NOINLINE st55 #-}+ st55 = \ !_patX55 -> let+ k55 :: K_Pattern_s55 t -> t+ k55 K_Pattern_v51 = v51+ k55 K_Pattern_v56 = v56+ v51 :: T_Pattern_v51 + v51 = \ !(T_Pattern_vIn51 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule156 () in+ let !(T_Pattern_vOut56 _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v56 (T_Pattern_vIn56 ) in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v56 :: T_Pattern_v56 + v56 = \ !(T_Pattern_vIn56 ) -> (+ let !(T_Pattern_vOut56 _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v56 (T_Pattern_vIn56 ) in+ let !_output = rule159 _patIoutput arg_attr_ arg_field_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule161 _output in+ let !__result_ = T_Pattern_vOut56 _lhsOoutput+ in __result_ )+ in C_Pattern_s55 k55+ {-# NOINLINE rule154 #-}+ {-# LINE 564 "./src-ag/DefaultRules.ag" #-}+ rule154 = \ ((!_patIdefinedAttrs) :: Set (Identifier,Identifier)) !attr_ !field_ ->+ {-# LINE 564 "./src-ag/DefaultRules.ag" #-}+ Set.insert (field_,attr_) _patIdefinedAttrs+ {-# LINE 2614 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule155 #-}+ {-# LINE 565 "./src-ag/DefaultRules.ag" #-}+ rule155 = \ ((!_patIlocals) :: Set Identifier) !attr_ !field_ ->+ {-# LINE 565 "./src-ag/DefaultRules.ag" #-}+ if field_ == _LOC+ then Set.insert attr_ _patIlocals+ else _patIlocals+ {-# LINE 2622 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE rule156 #-}+ {-# LINE 582 "./src-ag/DefaultRules.ag" #-}+ rule156 = \ (_ :: ()) ->+ {-# LINE 582 "./src-ag/DefaultRules.ag" #-}+ True+ {-# LINE 2628 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule157 #-}+ rule157 = \ ((!_patIerrors) :: Seq Error) ->+ _patIerrors+ {-# NOINLINE[1] rule158 #-}+ rule158 = \ ((!_patIcopy) :: Pattern) !attr_ !field_ ->+ Alias field_ attr_ _patIcopy+ {-# NOINLINE[1] rule159 #-}+ rule159 = \ ((!_patIoutput) :: Pattern) !attr_ !field_ ->+ Alias field_ attr_ _patIoutput+ {-# NOINLINE[1] rule160 #-}+ rule160 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule161 #-}+ rule161 = \ !_output ->+ _output+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st10) where+ {-# NOINLINE st10 #-}+ !st10 = let+ k10 :: K_Pattern_s10 t -> t+ k10 K_Pattern_v5 = v5+ k10 K_Pattern_v22 = v22+ k10 K_Pattern_v23 = v23+ k10 K_Pattern_v28 = v28+ k10 K_Pattern_v42 = v42+ k10 K_Pattern_v50 = v50+ v5 :: T_Pattern_v5 + v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut23 _patIcontainsVars _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v23 (T_Pattern_vIn23 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule164 _patIcontainsVars in+ let !_copy = rule168 _patIcopy in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule170 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule165 _patIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule166 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule167 _patIlocals in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v22 :: T_Pattern_v22 + v22 = \ !(T_Pattern_vIn22 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut22 _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v22 (T_Pattern_vIn22 ) in+ let !_copy = rule168 _patIcopy in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule170 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule165 _patIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule166 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule167 _patIlocals in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v23 :: T_Pattern_v23 + v23 = \ !(T_Pattern_vIn23 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut23 _patIcontainsVars _patIcopy _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v23 (T_Pattern_vIn23 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule164 _patIcontainsVars in+ let !_copy = rule168 _patIcopy in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule170 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule165 _patIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule166 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule167 _patIlocals in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v28 :: T_Pattern_v28 + v28 = \ !(T_Pattern_vIn28 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut28 _patIcontainsVars _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v28 (T_Pattern_vIn28 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule164 _patIcontainsVars in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule165 _patIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule166 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule167 _patIlocals in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v42 :: T_Pattern_v42 + v42 = \ !(T_Pattern_vIn42 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut42 _patIdefinedAttrs _patIerrors _patIlocals _patIoutput) = inv_Pattern_s10 _patX10 K_Pattern_v42 (T_Pattern_vIn42 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule165 _patIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule166 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule167 _patIlocals in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v50 :: T_Pattern_v50 + v50 = \ !(T_Pattern_vIn50 ) -> (+ let !_patX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) in+ let !(T_Pattern_vOut50 _patIdefinedAttrs _patIerrors _patIlocals _patX55) = inv_Pattern_s10 _patX10 K_Pattern_v50 (T_Pattern_vIn50 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule165 _patIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule166 _patIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule167 _patIlocals in+ let !__st_ = st55 _patX55+ !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Pattern_s10 k10+ {-# NOINLINE st55 #-}+ st55 = \ !_patX55 -> let+ k55 :: K_Pattern_s55 t -> t+ k55 K_Pattern_v51 = v51+ k55 K_Pattern_v56 = v56+ v51 :: T_Pattern_v51 + v51 = \ !(T_Pattern_vIn51 ) -> (+ let !(T_Pattern_vOut51 _patIcontainsVars _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v51 (T_Pattern_vIn51 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule164 _patIcontainsVars in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v56 :: T_Pattern_v56 + v56 = \ !(T_Pattern_vIn56 ) -> (+ let !(T_Pattern_vOut56 _patIoutput) = inv_Pattern_s55 _patX55 K_Pattern_v56 (T_Pattern_vIn56 ) in+ let !_output = rule169 _patIoutput in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule171 _output in+ let !__result_ = T_Pattern_vOut56 _lhsOoutput+ in __result_ )+ in C_Pattern_s55 k55+ {-# NOINLINE[1] rule164 #-}+ rule164 = \ ((!_patIcontainsVars) :: Bool) ->+ _patIcontainsVars+ {-# NOINLINE[1] rule165 #-}+ rule165 = \ ((!_patIdefinedAttrs) :: Set (Identifier,Identifier)) ->+ _patIdefinedAttrs+ {-# NOINLINE[1] rule166 #-}+ rule166 = \ ((!_patIerrors) :: Seq Error) ->+ _patIerrors+ {-# NOINLINE[1] rule167 #-}+ rule167 = \ ((!_patIlocals) :: Set Identifier) ->+ _patIlocals+ {-# NOINLINE[1] rule168 #-}+ rule168 = \ ((!_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# NOINLINE[1] rule169 #-}+ rule169 = \ ((!_patIoutput) :: Pattern) ->+ Irrefutable _patIoutput+ {-# NOINLINE[1] rule170 #-}+ rule170 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule171 #-}+ rule171 = \ !_output ->+ _output+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore !arg_pos_ = T_Pattern (return st10) where+ {-# NOINLINE st10 #-}+ !st10 = let+ k10 :: K_Pattern_s10 t -> t+ k10 K_Pattern_v5 = v5+ k10 K_Pattern_v22 = v22+ k10 K_Pattern_v23 = v23+ k10 K_Pattern_v28 = v28+ k10 K_Pattern_v42 = v42+ k10 K_Pattern_v50 = v50+ v5 :: T_Pattern_v5 + v5 = \ !(T_Pattern_vIn5 _lhsIcon _lhsInt) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule174 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule175 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule176 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule177 () in+ let !_copy = rule178 arg_pos_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule180 _copy in+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut5 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v22 :: T_Pattern_v22 + v22 = \ !(T_Pattern_vIn22 ) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule175 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule176 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule177 () in+ let !_copy = rule178 arg_pos_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule180 _copy in+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut22 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v23 :: T_Pattern_v23 + v23 = \ !(T_Pattern_vIn23 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule174 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule175 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule176 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule177 () in+ let !_copy = rule178 arg_pos_ in+ let _lhsOcopy :: Pattern+ !_lhsOcopy = rule180 _copy in+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut23 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v28 :: T_Pattern_v28 + v28 = \ !(T_Pattern_vIn28 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule174 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule175 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule176 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule177 () in+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut28 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v42 :: T_Pattern_v42 + v42 = \ !(T_Pattern_vIn42 ) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule175 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule176 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule177 () in+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut42 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v50 :: T_Pattern_v50 + v50 = \ !(T_Pattern_vIn50 ) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule175 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule176 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule177 () in+ let !__st_ = st55 ()+ !__result_ = T_Pattern_vOut50 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Pattern_s10 k10+ {-# NOINLINE st55 #-}+ st55 = \ (_ :: ()) -> let+ k55 :: K_Pattern_s55 t -> t+ k55 K_Pattern_v51 = v51+ k55 K_Pattern_v56 = v56+ v51 :: T_Pattern_v51 + v51 = \ !(T_Pattern_vIn51 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule174 () in+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut51 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v56 :: T_Pattern_v56 + v56 = \ !(T_Pattern_vIn56 ) -> (+ let !_output = rule179 arg_pos_ in+ let _lhsOoutput :: Pattern+ !_lhsOoutput = rule181 _output in+ let !__result_ = T_Pattern_vOut56 _lhsOoutput+ in __result_ )+ in C_Pattern_s55 k55+ {-# NOINLINE[1] rule174 #-}+ rule174 = \ (_ :: ()) ->+ False+ {-# NOINLINE[1] rule175 #-}+ rule175 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule176 #-}+ rule176 = \ (_ :: ()) ->+ Seq.empty+ {-# NOINLINE[1] rule177 #-}+ rule177 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule178 #-}+ rule178 = \ !pos_ ->+ Underscore pos_+ {-# NOINLINE[1] rule179 #-}+ rule179 = \ !pos_ ->+ Underscore pos_+ {-# NOINLINE[1] rule180 #-}+ rule180 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule181 #-}+ rule181 = \ !_output ->+ _output++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { con_Inh_Patterns :: !(ConstructorIdent), nt_Inh_Patterns :: !(NontermIdent) }+data Syn_Patterns = Syn_Patterns { containsVars_Syn_Patterns :: !(Bool), copy_Syn_Patterns :: !(Patterns), definedAttrs_Syn_Patterns :: !(Set (Identifier,Identifier)), errors_Syn_Patterns :: !(Seq Error), locals_Syn_Patterns :: !(Set Identifier), output_Syn_Patterns :: !(Patterns) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns !(T_Patterns act) !(Inh_Patterns _lhsIcon _lhsInt) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Patterns_vIn6 _lhsIcon _lhsInt+ !(T_Patterns_vOut6 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput) <- return (inv_Patterns_s12 sem K_Patterns_v6 arg)+ return (Syn_Patterns _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s12 )+ }+data T_Patterns_s12 where C_Patterns_s12 :: {+ inv_Patterns_s12 :: !(forall t. K_Patterns_s12 t -> t)+ } -> T_Patterns_s12 +data T_Patterns_s13 = C_Patterns_s13+data T_Patterns_s34 = C_Patterns_s34+data T_Patterns_s47 = C_Patterns_s47+data T_Patterns_s49 = C_Patterns_s49+data T_Patterns_s54 = C_Patterns_s54+data T_Patterns_s57 where C_Patterns_s57 :: {+ inv_Patterns_s57 :: !(forall t. K_Patterns_s57 t -> t)+ } -> T_Patterns_s57 +data K_Patterns_s12 k where+ K_Patterns_v6 :: K_Patterns_s12 (T_Patterns_v6 )+ K_Patterns_v21 :: K_Patterns_s12 (T_Patterns_v21 )+ K_Patterns_v38 :: K_Patterns_s12 (T_Patterns_v38 )+ K_Patterns_v41 :: K_Patterns_s12 (T_Patterns_v41 )+ K_Patterns_v49 :: K_Patterns_s12 (T_Patterns_v49 )+ K_Patterns_v54 :: K_Patterns_s12 (T_Patterns_v54 )+data K_Patterns_s57 k where+ K_Patterns_v55 :: K_Patterns_s57 (T_Patterns_v55 )+ K_Patterns_v57 :: K_Patterns_s57 (T_Patterns_v57 )+type T_Patterns_v6 = (T_Patterns_vIn6 ) -> (T_Patterns_vOut6 )+data T_Patterns_vIn6 = T_Patterns_vIn6 !(ConstructorIdent) !(NontermIdent)+data T_Patterns_vOut6 = T_Patterns_vOut6 !(Bool) !(Patterns) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)+type T_Patterns_v21 = (T_Patterns_vIn21 ) -> (T_Patterns_vOut21 )+data T_Patterns_vIn21 = T_Patterns_vIn21 +data T_Patterns_vOut21 = T_Patterns_vOut21 !(Bool) !(Patterns) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)+type T_Patterns_v38 = (T_Patterns_vIn38 ) -> (T_Patterns_vOut38 )+data T_Patterns_vIn38 = T_Patterns_vIn38 +data T_Patterns_vOut38 = T_Patterns_vOut38 !(Patterns) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)+type T_Patterns_v41 = (T_Patterns_vIn41 ) -> (T_Patterns_vOut41 )+data T_Patterns_vIn41 = T_Patterns_vIn41 +data T_Patterns_vOut41 = T_Patterns_vOut41 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)+type T_Patterns_v49 = (T_Patterns_vIn49 ) -> (T_Patterns_vOut49 )+data T_Patterns_vIn49 = T_Patterns_vIn49 +data T_Patterns_vOut49 = T_Patterns_vOut49 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Patterns)+type T_Patterns_v54 = (T_Patterns_vIn54 ) -> (T_Patterns_vOut54 )+data T_Patterns_vIn54 = T_Patterns_vIn54 +data T_Patterns_vOut54 = T_Patterns_vOut54 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(T_Patterns_s57 )+type T_Patterns_v55 = (T_Patterns_vIn55 ) -> (T_Patterns_vOut55 )+data T_Patterns_vIn55 = T_Patterns_vIn55 +data T_Patterns_vOut55 = T_Patterns_vOut55 !(Bool) !(Patterns)+type T_Patterns_v57 = (T_Patterns_vIn57 ) -> (T_Patterns_vOut57 )+data T_Patterns_vIn57 = T_Patterns_vIn57 +data T_Patterns_vOut57 = T_Patterns_vOut57 !(Patterns)+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st12) where+ {-# NOINLINE st12 #-}+ !st12 = let+ k12 :: K_Patterns_s12 t -> t+ k12 K_Patterns_v6 = v6+ k12 K_Patterns_v21 = v21+ k12 K_Patterns_v38 = v38+ k12 K_Patterns_v41 = v41+ k12 K_Patterns_v49 = v49+ k12 K_Patterns_v54 = v54+ v6 :: T_Patterns_v6 + v6 = \ !(T_Patterns_vIn6 _lhsIcon _lhsInt) -> (+ let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in+ let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in+ let !(T_Pattern_vOut23 _hdIcontainsVars _hdIcopy _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v23 (T_Pattern_vIn23 ) in+ let !(T_Patterns_vOut21 _tlIcontainsVars _tlIcopy _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v21 (T_Patterns_vIn21 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule182 _hdIcontainsVars _tlIcontainsVars in+ let !_copy = rule186 _hdIcopy _tlIcopy in+ let _lhsOcopy :: Patterns+ !_lhsOcopy = rule188 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule183 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule184 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule185 _hdIlocals _tlIlocals in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut6 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v21 :: T_Patterns_v21 + v21 = \ !(T_Patterns_vIn21 ) -> (+ let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in+ let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in+ let !(T_Pattern_vOut23 _hdIcontainsVars _hdIcopy _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v23 (T_Pattern_vIn23 ) in+ let !(T_Patterns_vOut21 _tlIcontainsVars _tlIcopy _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v21 (T_Patterns_vIn21 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule182 _hdIcontainsVars _tlIcontainsVars in+ let !_copy = rule186 _hdIcopy _tlIcopy in+ let _lhsOcopy :: Patterns+ !_lhsOcopy = rule188 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule183 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule184 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule185 _hdIlocals _tlIlocals in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut21 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v38 :: T_Patterns_v38 + v38 = \ !(T_Patterns_vIn38 ) -> (+ let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in+ let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in+ let !(T_Pattern_vOut22 _hdIcopy _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v22 (T_Pattern_vIn22 ) in+ let !(T_Patterns_vOut38 _tlIcopy _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v38 (T_Patterns_vIn38 ) in+ let !_copy = rule186 _hdIcopy _tlIcopy in+ let _lhsOcopy :: Patterns+ !_lhsOcopy = rule188 _copy in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule183 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule184 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule185 _hdIlocals _tlIlocals in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut38 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v41 :: T_Patterns_v41 + v41 = \ !(T_Patterns_vIn41 ) -> (+ let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in+ let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in+ let !(T_Pattern_vOut28 _hdIcontainsVars _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v28 (T_Pattern_vIn28 ) in+ let !(T_Patterns_vOut41 _tlIcontainsVars _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v41 (T_Patterns_vIn41 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule182 _hdIcontainsVars _tlIcontainsVars in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule183 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule184 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule185 _hdIlocals _tlIlocals in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut41 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v49 :: T_Patterns_v49 + v49 = \ !(T_Patterns_vIn49 ) -> (+ let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in+ let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in+ let !(T_Pattern_vOut42 _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIoutput) = inv_Pattern_s10 _hdX10 K_Pattern_v42 (T_Pattern_vIn42 ) in+ let !(T_Patterns_vOut49 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIoutput) = inv_Patterns_s12 _tlX12 K_Patterns_v49 (T_Patterns_vIn49 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule183 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule184 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule185 _hdIlocals _tlIlocals in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut49 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v54 :: T_Patterns_v54 + v54 = \ !(T_Patterns_vIn54 ) -> (+ let !_hdX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_)) in+ let !_tlX12 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_)) in+ let !(T_Pattern_vOut50 _hdIdefinedAttrs _hdIerrors _hdIlocals _hdX55) = inv_Pattern_s10 _hdX10 K_Pattern_v50 (T_Pattern_vIn50 ) in+ let !(T_Patterns_vOut54 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlX57) = inv_Patterns_s12 _tlX12 K_Patterns_v54 (T_Patterns_vIn54 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule183 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule184 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule185 _hdIlocals _tlIlocals in+ let !__st_ = st57 _hdX55 _tlX57+ !__result_ = T_Patterns_vOut54 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Patterns_s12 k12+ {-# NOINLINE st57 #-}+ st57 = \ !_hdX55 !_tlX57 -> let+ k57 :: K_Patterns_s57 t -> t+ k57 K_Patterns_v55 = v55+ k57 K_Patterns_v57 = v57+ v55 :: T_Patterns_v55 + v55 = \ !(T_Patterns_vIn55 ) -> (+ let !(T_Pattern_vOut51 _hdIcontainsVars _hdIoutput) = inv_Pattern_s55 _hdX55 K_Pattern_v51 (T_Pattern_vIn51 ) in+ let !(T_Patterns_vOut55 _tlIcontainsVars _tlIoutput) = inv_Patterns_s57 _tlX57 K_Patterns_v55 (T_Patterns_vIn55 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule182 _hdIcontainsVars _tlIcontainsVars in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut55 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v57 :: T_Patterns_v57 + v57 = \ !(T_Patterns_vIn57 ) -> (+ let !(T_Pattern_vOut56 _hdIoutput) = inv_Pattern_s55 _hdX55 K_Pattern_v56 (T_Pattern_vIn56 ) in+ let !(T_Patterns_vOut57 _tlIoutput) = inv_Patterns_s57 _tlX57 K_Patterns_v57 (T_Patterns_vIn57 ) in+ let !_output = rule187 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule189 _output in+ let !__result_ = T_Patterns_vOut57 _lhsOoutput+ in __result_ )+ in C_Patterns_s57 k57+ {-# NOINLINE[1] rule182 #-}+ rule182 = \ ((!_hdIcontainsVars) :: Bool) ((!_tlIcontainsVars) :: Bool) ->+ _hdIcontainsVars || _tlIcontainsVars+ {-# NOINLINE[1] rule183 #-}+ rule183 = \ ((!_hdIdefinedAttrs) :: Set (Identifier,Identifier)) ((!_tlIdefinedAttrs) :: Set (Identifier,Identifier)) ->+ _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+ {-# NOINLINE[1] rule184 #-}+ rule184 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# NOINLINE[1] rule185 #-}+ rule185 = \ ((!_hdIlocals) :: Set Identifier) ((!_tlIlocals) :: Set Identifier) ->+ _hdIlocals `Set.union` _tlIlocals+ {-# NOINLINE[1] rule186 #-}+ rule186 = \ ((!_hdIcopy) :: Pattern) ((!_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# NOINLINE[1] rule187 #-}+ rule187 = \ ((!_hdIoutput) :: Pattern) ((!_tlIoutput) :: Patterns) ->+ (:) _hdIoutput _tlIoutput+ {-# NOINLINE[1] rule188 #-}+ rule188 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule189 #-}+ rule189 = \ !_output ->+ _output+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st12) where+ {-# NOINLINE st12 #-}+ !st12 = let+ k12 :: K_Patterns_s12 t -> t+ k12 K_Patterns_v6 = v6+ k12 K_Patterns_v21 = v21+ k12 K_Patterns_v38 = v38+ k12 K_Patterns_v41 = v41+ k12 K_Patterns_v49 = v49+ k12 K_Patterns_v54 = v54+ v6 :: T_Patterns_v6 + v6 = \ !(T_Patterns_vIn6 _lhsIcon _lhsInt) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule194 () in+ let !_copy = rule198 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule195 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule196 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule197 () in+ let !_output = rule199 () in+ let _lhsOcopy :: Patterns+ !_lhsOcopy = rule200 _copy in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut6 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v21 :: T_Patterns_v21 + v21 = \ !(T_Patterns_vIn21 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule194 () in+ let !_copy = rule198 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule195 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule196 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule197 () in+ let !_output = rule199 () in+ let _lhsOcopy :: Patterns+ !_lhsOcopy = rule200 _copy in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut21 _lhsOcontainsVars _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v38 :: T_Patterns_v38 + v38 = \ !(T_Patterns_vIn38 ) -> (+ let !_copy = rule198 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule195 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule196 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule197 () in+ let !_output = rule199 () in+ let _lhsOcopy :: Patterns+ !_lhsOcopy = rule200 _copy in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut38 _lhsOcopy _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v41 :: T_Patterns_v41 + v41 = \ !(T_Patterns_vIn41 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule194 () in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule195 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule196 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule197 () in+ let !_output = rule199 () in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut41 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v49 :: T_Patterns_v49 + v49 = \ !(T_Patterns_vIn49 ) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule195 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule196 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule197 () in+ let !_output = rule199 () in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut49 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput+ in __result_ )+ v54 :: T_Patterns_v54 + v54 = \ !(T_Patterns_vIn54 ) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule195 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule196 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule197 () in+ let !__st_ = st57 ()+ !__result_ = T_Patterns_vOut54 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals __st_+ in __result_ )+ in C_Patterns_s12 k12+ {-# NOINLINE st57 #-}+ st57 = \ (_ :: ()) -> let+ k57 :: K_Patterns_s57 t -> t+ k57 K_Patterns_v55 = v55+ k57 K_Patterns_v57 = v57+ v55 :: T_Patterns_v55 + v55 = \ !(T_Patterns_vIn55 ) -> (+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule194 () in+ let !_output = rule199 () in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut55 _lhsOcontainsVars _lhsOoutput+ in __result_ )+ v57 :: T_Patterns_v57 + v57 = \ !(T_Patterns_vIn57 ) -> (+ let !_output = rule199 () in+ let _lhsOoutput :: Patterns+ !_lhsOoutput = rule201 _output in+ let !__result_ = T_Patterns_vOut57 _lhsOoutput+ in __result_ )+ in C_Patterns_s57 k57+ {-# NOINLINE[1] rule194 #-}+ rule194 = \ (_ :: ()) ->+ False+ {-# NOINLINE[1] rule195 #-}+ rule195 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule196 #-}+ rule196 = \ (_ :: ()) ->+ Seq.empty+ {-# NOINLINE[1] rule197 #-}+ rule197 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule198 #-}+ rule198 = \ (_ :: ()) ->+ []+ {-# NOINLINE[1] rule199 #-}+ rule199 = \ (_ :: ()) ->+ []+ {-# NOINLINE[1] rule200 #-}+ rule200 = \ !_copy ->+ _copy+ {-# NOINLINE[1] rule201 #-}+ rule201 = \ !_output ->+ _output++-- Production --------------------------------------------------+-- wrapper+data Inh_Production = Inh_Production { aroundsIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])), augmentsIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier [Expression])), constructorTypeMap_Inh_Production :: !(Map NontermIdent ConstructorType), cr_Inh_Production :: !(Bool), inh_Inh_Production :: !(Attributes), inhMap_Inh_Production :: !(Map Identifier Attributes), inhOrig_Inh_Production :: !(Attributes), manualAttrOrderMap_Inh_Production :: !(AttrOrderMap), mergesIn_Inh_Production :: !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))), nonterminals_Inh_Production :: !(Set NontermIdent), nt_Inh_Production :: !(NontermIdent), o_rename_Inh_Production :: !(Bool), options_Inh_Production :: !(Options), params_Inh_Production :: !([Identifier]), syn_Inh_Production :: !(Attributes), synMap_Inh_Production :: !(Map Identifier Attributes), synOrig_Inh_Production :: !(Attributes), typeSyns_Inh_Production :: !(TypeSyns), uniq_Inh_Production :: !(Int), useMap_Inh_Production :: !(Map Identifier (String,String,String)), wrappers_Inh_Production :: !(Set NontermIdent) }+data Syn_Production = Syn_Production { errors_Syn_Production :: !(Seq Error), output_Syn_Production :: !(Production), uniq_Syn_Production :: !(Int) }+{-# INLINABLE wrap_Production #-}+wrap_Production :: T_Production -> Inh_Production -> (Syn_Production )+wrap_Production !(T_Production act) !(Inh_Production _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Production_vIn7 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ !(T_Production_vOut7 _lhsOerrors _lhsOoutput _lhsOuniq) <- return (inv_Production_s14 sem K_Production_v7 arg)+ return (Syn_Production _lhsOerrors _lhsOoutput _lhsOuniq)+ )++-- cata+{-# INLINE sem_Production #-}+sem_Production :: Production -> T_Production +sem_Production ( Production !con_ !params_ !constraints_ children_ rules_ typeSigs_ !macro_ ) = sem_Production_Production con_ params_ constraints_ ( sem_Children children_ ) ( sem_Rules rules_ ) ( sem_TypeSigs typeSigs_ ) macro_++-- semantic domain+newtype T_Production = T_Production {+ attach_T_Production :: Identity (T_Production_s14 )+ }+data T_Production_s14 where C_Production_s14 :: {+ inv_Production_s14 :: !(forall t. K_Production_s14 t -> t)+ } -> T_Production_s14 +data T_Production_s15 = C_Production_s15+data T_Production_s38 = C_Production_s38+newtype T_Production_s48 = C_Production_s48 {+ inv_Production_s48 :: (T_Production_v40 )+ }+data K_Production_s14 k where+ K_Production_v7 :: K_Production_s14 (T_Production_v7 )+ K_Production_v25 :: K_Production_s14 (T_Production_v25 )+ K_Production_v39 :: K_Production_s14 (T_Production_v39 )+type T_Production_v7 = (T_Production_vIn7 ) -> (T_Production_vOut7 )+data T_Production_vIn7 = T_Production_vIn7 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Map NontermIdent ConstructorType) !(Bool) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(Set NontermIdent) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)+data T_Production_vOut7 = T_Production_vOut7 !(Seq Error) !(Production) !(Int)+type T_Production_v25 = (T_Production_vIn25 ) -> (T_Production_vOut25 )+data T_Production_vIn25 = T_Production_vIn25 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Map NontermIdent ConstructorType) !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)+data T_Production_vOut25 = T_Production_vOut25 !(Seq Error) !(Production) !(Int)+type T_Production_v39 = (T_Production_vIn39 ) -> (T_Production_vOut39 )+data T_Production_vIn39 = T_Production_vIn39 !(Map NontermIdent ConstructorType) !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Map Identifier (String,String,String)) !(Set NontermIdent)+data T_Production_vOut39 = T_Production_vOut39 !(Seq Error) !(T_Production_s48 )+type T_Production_v40 = (T_Production_vIn40 ) -> (T_Production_vOut40 )+data T_Production_vIn40 = T_Production_vIn40 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !([Identifier]) !(Int)+data T_Production_vOut40 = T_Production_vOut40 !(Production) !(Int)+{-# NOINLINE sem_Production_Production #-}+sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children -> T_Rules -> T_TypeSigs -> (MaybeMacro) -> T_Production +sem_Production_Production !arg_con_ !arg_params_ !arg_constraints_ arg_children_ arg_rules_ arg_typeSigs_ !arg_macro_ = T_Production (return st14) where+ {-# NOINLINE st14 #-}+ !st14 = let+ k14 :: K_Production_s14 t -> t+ k14 K_Production_v7 = v7+ k14 K_Production_v25 = v25+ k14 K_Production_v39 = v39+ v7 :: T_Production_v7 + v7 = \ !(T_Production_vIn7 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_childrenX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_)) in+ let !_rulesX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_)) in+ let !_typeSigsX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_)) in+ let !_childrenOinhMap = rule219 _lhsIinhMap in+ let !_mergesIn = rule214 _lhsImergesIn arg_con_ in+ let !_merged = rule215 _mergesIn in+ let !_childrenOmerged = rule220 _merged in+ let !_childrenOsynMap = rule223 _lhsIsynMap in+ let !_orderDeps = rule210 _lhsImanualAttrOrderMap _lhsInt arg_con_ in+ let !_typeSigsOnt = rule228 _lhsInt in+ let !_typeSigsOparams = rule229 _lhsIparams in+ let !_aroundsIn = rule213 _lhsIaroundsIn arg_con_ in+ let !_rulesOoptions = rule226 _lhsIoptions in+ let !_rulesOuniq = rule227 _lhsIuniq in+ let !_augmentsIn = rule212 _lhsIaugmentsIn arg_con_ in+ let !(T_Children_vOut14 _childrenIerrors _childrenIfields _childrenIinputs _childrenIoutput _childrenIoutputs) = inv_Children_s2 _childrenX2 K_Children_v14 (T_Children_vIn14 _childrenOinhMap _childrenOmerged _childrenOsynMap) in+ let !(T_Rules_vOut24 _rulesIdefinedAttrs _rulesIerrors _rulesIlocals _rulesIoutput _rulesIruleNames _rulesIuniq) = inv_Rules_s20 _rulesX20 K_Rules_v24 (T_Rules_vIn24 _rulesOoptions _rulesOuniq) in+ let !(T_TypeSigs_vOut12 _typeSigsIoutput) = inv_TypeSigs_s24 _typeSigsX24 (T_TypeSigs_vIn12 _typeSigsOnt _typeSigsOparams) in+ let !(!_newRls,!_errs) = rule205 _childrenIfields _childrenIinputs _childrenIoutputs _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers _rulesIdefinedAttrs _rulesIlocals arg_con_ in+ let !_orderErrs = rule211 _childrenIinputs _childrenIoutputs _lhsIinh _lhsInt _lhsIsyn _orderDeps _rulesIlocals _rulesIruleNames arg_con_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule204 _childrenIerrors _errs _orderErrs _rulesIerrors in+ let !_extra1 = rule206 _augmentsIn _newRls _rulesIoutput in+ let !_extra2 = rule207 _aroundsIn _extra1 in+ let !_extra3 = rule208 _extra2 _mergesIn in+ let _lhsOoutput :: Production+ !_lhsOoutput = rule209 _childrenIoutput _extra3 _typeSigsIoutput arg_con_ arg_constraints_ arg_macro_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule217 _rulesIuniq in+ let !__result_ = T_Production_vOut7 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v25 :: T_Production_v25 + v25 = \ !(T_Production_vIn25 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_childrenX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_)) in+ let !_rulesX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_)) in+ let !_typeSigsX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_)) in+ let !_childrenOinhMap = rule219 _lhsIinhMap in+ let !_mergesIn = rule214 _lhsImergesIn arg_con_ in+ let !_merged = rule215 _mergesIn in+ let !_childrenOmerged = rule220 _merged in+ let !_childrenOsynMap = rule223 _lhsIsynMap in+ let !_orderDeps = rule210 _lhsImanualAttrOrderMap _lhsInt arg_con_ in+ let !_typeSigsOnt = rule228 _lhsInt in+ let !_typeSigsOparams = rule229 _lhsIparams in+ let !_aroundsIn = rule213 _lhsIaroundsIn arg_con_ in+ let !_rulesOoptions = rule226 _lhsIoptions in+ let !_rulesOuniq = rule227 _lhsIuniq in+ let !_augmentsIn = rule212 _lhsIaugmentsIn arg_con_ in+ let !(T_Children_vOut14 _childrenIerrors _childrenIfields _childrenIinputs _childrenIoutput _childrenIoutputs) = inv_Children_s2 _childrenX2 K_Children_v14 (T_Children_vIn14 _childrenOinhMap _childrenOmerged _childrenOsynMap) in+ let !(T_Rules_vOut24 _rulesIdefinedAttrs _rulesIerrors _rulesIlocals _rulesIoutput _rulesIruleNames _rulesIuniq) = inv_Rules_s20 _rulesX20 K_Rules_v24 (T_Rules_vIn24 _rulesOoptions _rulesOuniq) in+ let !(T_TypeSigs_vOut12 _typeSigsIoutput) = inv_TypeSigs_s24 _typeSigsX24 (T_TypeSigs_vIn12 _typeSigsOnt _typeSigsOparams) in+ let !(!_newRls,!_errs) = rule205 _childrenIfields _childrenIinputs _childrenIoutputs _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers _rulesIdefinedAttrs _rulesIlocals arg_con_ in+ let !_orderErrs = rule211 _childrenIinputs _childrenIoutputs _lhsIinh _lhsInt _lhsIsyn _orderDeps _rulesIlocals _rulesIruleNames arg_con_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule204 _childrenIerrors _errs _orderErrs _rulesIerrors in+ let !_extra1 = rule206 _augmentsIn _newRls _rulesIoutput in+ let !_extra2 = rule207 _aroundsIn _extra1 in+ let !_extra3 = rule208 _extra2 _mergesIn in+ let _lhsOoutput :: Production+ !_lhsOoutput = rule209 _childrenIoutput _extra3 _typeSigsIoutput arg_con_ arg_constraints_ arg_macro_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule217 _rulesIuniq in+ let !__result_ = T_Production_vOut25 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v39 :: T_Production_v39 + v39 = \ !(T_Production_vIn39 _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let !_childrenX2 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_)) in+ let !_rulesX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_)) in+ let !_childrenOinhMap = rule219 _lhsIinhMap in+ let !_mergesIn = rule214 _lhsImergesIn arg_con_ in+ let !_merged = rule215 _mergesIn in+ let !_childrenOmerged = rule220 _merged in+ let !_childrenOsynMap = rule223 _lhsIsynMap in+ let !_orderDeps = rule210 _lhsImanualAttrOrderMap _lhsInt arg_con_ in+ let !(T_Children_vOut47 _childrenIerrors _childrenIfields _childrenIinputs _childrenIoutputs _childrenX53) = inv_Children_s2 _childrenX2 K_Children_v47 (T_Children_vIn47 _childrenOinhMap _childrenOmerged _childrenOsynMap) in+ let !(T_Rules_vOut30 _rulesIdefinedAttrs _rulesIerrors _rulesIlocals _rulesIruleNames _rulesX42) = inv_Rules_s20 _rulesX20 K_Rules_v30 (T_Rules_vIn30 ) in+ let !(!_newRls,!_errs) = rule205 _childrenIfields _childrenIinputs _childrenIoutputs _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers _rulesIdefinedAttrs _rulesIlocals arg_con_ in+ let !_orderErrs = rule211 _childrenIinputs _childrenIoutputs _lhsIinh _lhsInt _lhsIsyn _orderDeps _rulesIlocals _rulesIruleNames arg_con_ in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule204 _childrenIerrors _errs _orderErrs _rulesIerrors in+ let !__st_ = st48 _childrenX53 _lhsInt _lhsIoptions _mergesIn _newRls _rulesX42+ !__result_ = T_Production_vOut39 _lhsOerrors __st_+ in __result_ )+ in C_Production_s14 k14+ {-# NOINLINE st48 #-}+ st48 = \ !_childrenX53 ((!_lhsInt) :: NontermIdent) ((!_lhsIoptions) :: Options) !_mergesIn !_newRls !_rulesX42 -> let+ v40 :: T_Production_v40 + v40 = \ !(T_Production_vIn40 _lhsIaroundsIn _lhsIaugmentsIn _lhsIparams _lhsIuniq) -> (+ let !_typeSigsOnt = rule228 _lhsInt in+ let !_typeSigsX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_)) in+ let !_rulesOoptions = rule226 _lhsIoptions in+ let !_typeSigsOparams = rule229 _lhsIparams in+ let !_aroundsIn = rule213 _lhsIaroundsIn arg_con_ in+ let !_rulesOuniq = rule227 _lhsIuniq in+ let !_augmentsIn = rule212 _lhsIaugmentsIn arg_con_ in+ let !(T_Children_vOut48 _childrenIoutput) = inv_Children_s53 _childrenX53 (T_Children_vIn48 ) in+ let !(T_Rules_vOut31 _rulesIoutput _rulesIuniq) = inv_Rules_s42 _rulesX42 (T_Rules_vIn31 _rulesOoptions _rulesOuniq) in+ let !(T_TypeSigs_vOut12 _typeSigsIoutput) = inv_TypeSigs_s24 _typeSigsX24 (T_TypeSigs_vIn12 _typeSigsOnt _typeSigsOparams) in+ let !_extra1 = rule206 _augmentsIn _newRls _rulesIoutput in+ let !_extra2 = rule207 _aroundsIn _extra1 in+ let !_extra3 = rule208 _extra2 _mergesIn in+ let _lhsOoutput :: Production+ !_lhsOoutput = rule209 _childrenIoutput _extra3 _typeSigsIoutput arg_con_ arg_constraints_ arg_macro_ arg_params_ in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule217 _rulesIuniq in+ let !__result_ = T_Production_vOut40 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Production_s48 v40+ {-# NOINLINE[1] rule204 #-}+ {-# LINE 412 "./src-ag/DefaultRules.ag" #-}+ rule204 = \ ((!_childrenIerrors) :: Seq Error) !_errs !_orderErrs ((!_rulesIerrors) :: Seq Error) ->+ {-# LINE 412 "./src-ag/DefaultRules.ag" #-}+ _childrenIerrors >< _errs >< _rulesIerrors >< _orderErrs+ {-# LINE 3527 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule205 #-}+ {-# LINE 416 "./src-ag/DefaultRules.ag" #-}+ rule205 = \ ((!_childrenIfields) :: [(Identifier,Type,ChildKind)]) ((!_childrenIinputs) :: [(Identifier, Attributes)]) ((!_childrenIoutputs) :: [(Identifier, Attributes)]) ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((!_lhsIcr) :: Bool) ((!_lhsIinh) :: Attributes) ((!_lhsInt) :: NontermIdent) ((!_lhsIo_rename) :: Bool) ((!_lhsIoptions) :: Options) ((!_lhsIsyn) :: Attributes) ((!_lhsIsynOrig) :: Attributes) ((!_lhsItypeSyns) :: TypeSyns) ((!_lhsIuseMap) :: Map Identifier (String,String,String)) ((!_lhsIwrappers) :: Set NontermIdent) ((!_rulesIdefinedAttrs) :: Set (Identifier,Identifier)) ((!_rulesIlocals) :: Set Identifier) !con_ ->+ {-# LINE 416 "./src-ag/DefaultRules.ag" #-}+ let locals = _rulesIlocals+ initenv = Map.fromList ( [ (a,_ACHILD)+ | (a,_,_) <- _childrenIfields+ ]+ ++ attrs(_LHS, _lhsIinh)+ ++ [ (a,_LOC)+ | a <- Set.toList locals+ ]+ )+ attrs (n,as) = [ (a,n) | a <- Map.keys as ]+ envs = scanl (flip Map.union)+ initenv+ (map (Map.fromList . attrs ) _childrenIoutputs)+ child_envs = init envs+ lhs_env = last envs+ (selfAttrs, normalAttrs)+ = Map.partitionWithKey (\k _ -> maybe False isSELFNonterminal $ Map.lookup k _lhsIsynOrig) _lhsIsyn+ (_,undefAttrs)+ = removeDefined _rulesIdefinedAttrs (_LHS, normalAttrs)+ (useAttrs,others)+ = splitAttrs _lhsIuseMap undefAttrs+ (rules1, errors1)+ = concatRE $ map (copyRule _lhsIoptions _lhsIwrappers _lhsInt con_ _lhsIcr locals)+ (zip envs (map (removeDefined _rulesIdefinedAttrs) _childrenIinputs))+ uRules+ = map (useRule _lhsIoptions locals _childrenIoutputs) useAttrs+ selfLocRules+ = [ selfRule False attr $+ lexTokens _lhsIoptions noPos $+ constructor [(childSelf attr nm tp, nm) | (nm,tp,virt) <- _childrenIfields, childExists virt]+ | attr <- Map.keys selfAttrs+ , not (Set.member attr locals)+ ]+ where+ childSelf self nm tp+ = case tp of NT nt _ _ -> attrName nm self+ _ | nm `Set.member` locals -> locName nm+ | otherwise -> fieldName nm+ constructor fs+ = buildConExpr (ocaml _lhsIoptions) (clean _lhsIoptions) _lhsIconstructorTypeMap _lhsItypeSyns _lhsIo_rename _lhsInt con_ fs+ childExists ChildAttr = False+ childExists _ = True+ selfRules+ = [ selfRule True attr [mkLocVar attr noPos Nothing]+ | attr <- Map.keys selfAttrs+ , not (Set.member (_LHS,attr) _rulesIdefinedAttrs)+ ]+ (rules5, errs5)+ = copyRule _lhsIoptions+ _lhsIwrappers+ _lhsInt+ con_+ _lhsIcr+ locals+ (lhs_env, (_LHS, others))+ in (uRules++selfLocRules++selfRules++rules5++rules1, errors1><errs5)+ {-# LINE 3588 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule206 #-}+ {-# LINE 636 "./src-ag/DefaultRules.ag" #-}+ rule206 = \ !_augmentsIn !_newRls ((!_rulesIoutput) :: Rules) ->+ {-# LINE 636 "./src-ag/DefaultRules.ag" #-}+ foldr addAugments (_rulesIoutput ++ _newRls) (Map.assocs _augmentsIn )+ {-# LINE 3594 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule207 #-}+ {-# LINE 637 "./src-ag/DefaultRules.ag" #-}+ rule207 = \ !_aroundsIn !_extra1 ->+ {-# LINE 637 "./src-ag/DefaultRules.ag" #-}+ foldr addArounds _extra1 (Map.assocs _aroundsIn )+ {-# LINE 3600 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule208 #-}+ {-# LINE 638 "./src-ag/DefaultRules.ag" #-}+ rule208 = \ !_extra2 !_mergesIn ->+ {-# LINE 638 "./src-ag/DefaultRules.ag" #-}+ foldr addMerges _extra2 (Map.assocs _mergesIn )+ {-# LINE 3606 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule209 #-}+ {-# LINE 639 "./src-ag/DefaultRules.ag" #-}+ rule209 = \ ((!_childrenIoutput) :: Children) !_extra3 ((!_typeSigsIoutput) :: TypeSigs) !con_ !constraints_ !macro_ !params_ ->+ {-# LINE 639 "./src-ag/DefaultRules.ag" #-}+ Production con_ params_ constraints_ _childrenIoutput _extra3 _typeSigsIoutput macro_+ {-# LINE 3612 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule210 #-}+ {-# LINE 747 "./src-ag/DefaultRules.ag" #-}+ rule210 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ((!_lhsInt) :: NontermIdent) !con_ ->+ {-# LINE 747 "./src-ag/DefaultRules.ag" #-}+ Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrOrderMap+ {-# LINE 3618 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule211 #-}+ {-# LINE 750 "./src-ag/DefaultRules.ag" #-}+ rule211 = \ ((!_childrenIinputs) :: [(Identifier, Attributes)]) ((!_childrenIoutputs) :: [(Identifier, Attributes)]) ((!_lhsIinh) :: Attributes) ((!_lhsInt) :: NontermIdent) ((!_lhsIsyn) :: Attributes) !_orderDeps ((!_rulesIlocals) :: Set Identifier) ((!_rulesIruleNames) :: Set Identifier) !con_ ->+ {-# LINE 750 "./src-ag/DefaultRules.ag" #-}+ let chldOutMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIoutputs ]+ chldInMap = Map.fromList [ (k, Map.keysSet s) | (k,s) <- _childrenIinputs ]+ isInAttribute :: Identifier -> Identifier -> [Error]+ isInAttribute fld nm+ | fld == _LOC = if nm `Set.member` _rulesIlocals+ then []+ else [UndefAttr _lhsInt con_ fld nm False]+ | fld == _LHS = if nm `Map.member` _lhsIinh+ then []+ else [UndefAttr _lhsInt con_ fld nm False]+ | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldOutMap)+ then []+ else [UndefAttr _lhsInt con_ fld nm False]+ isOutAttribute :: Identifier -> Identifier -> [Error]+ isOutAttribute fld nm+ | fld == _LOC = if nm `Set.member` _rulesIlocals+ then []+ else [UndefAttr _lhsInt con_ fld nm True]+ | fld == _LHS = if nm `Map.member` _lhsIsyn+ then []+ else [UndefAttr _lhsInt con_ fld nm True]+ | otherwise = if nm `Set.member` (Map.findWithDefault Set.empty fld chldInMap)+ then []+ else [UndefAttr _lhsInt con_ fld nm True]+ existsRule nm = if nm `Set.member` _rulesIruleNames+ then []+ else [MissingNamedRule _lhsInt con_ nm]+ checkIn (OccAttr fld nm) = isInAttribute fld nm+ checkIn (OccRule nm) = existsRule nm+ checkOut (OccAttr fld nm) = isOutAttribute fld nm+ checkOut (OccRule nm) = existsRule nm+ in Seq.fromList . concat $+ [ checkIn occA ++ checkOut occB+ | (Dependency occA occB) <- _orderDeps+ ]+ {-# LINE 3658 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule212 #-}+ {-# LINE 805 "./src-ag/DefaultRules.ag" #-}+ rule212 = \ ((!_lhsIaugmentsIn) :: Map ConstructorIdent (Map Identifier [Expression])) !con_ ->+ {-# LINE 805 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaugmentsIn+ {-# LINE 3664 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule213 #-}+ {-# LINE 812 "./src-ag/DefaultRules.ag" #-}+ rule213 = \ ((!_lhsIaroundsIn) :: Map ConstructorIdent (Map Identifier [Expression])) !con_ ->+ {-# LINE 812 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundsIn+ {-# LINE 3670 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule214 #-}+ {-# LINE 820 "./src-ag/DefaultRules.ag" #-}+ rule214 = \ ((!_lhsImergesIn) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !con_ ->+ {-# LINE 820 "./src-ag/DefaultRules.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergesIn+ {-# LINE 3676 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule215 #-}+ {-# LINE 821 "./src-ag/DefaultRules.ag" #-}+ rule215 = \ !_mergesIn ->+ {-# LINE 821 "./src-ag/DefaultRules.ag" #-}+ Set.fromList [ c | (_,cs,_) <- Map.elems _mergesIn , c <- cs ]+ {-# LINE 3682 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule217 #-}+ rule217 = \ ((!_rulesIuniq) :: Int) ->+ _rulesIuniq+ {-# NOINLINE[1] rule219 #-}+ rule219 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule220 #-}+ rule220 = \ !_merged ->+ _merged+ {-# NOINLINE[1] rule223 #-}+ rule223 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule226 #-}+ rule226 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule227 #-}+ rule227 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq+ {-# NOINLINE[1] rule228 #-}+ rule228 = \ ((!_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# NOINLINE[1] rule229 #-}+ rule229 = \ ((!_lhsIparams) :: [Identifier]) ->+ _lhsIparams++-- Productions -------------------------------------------------+-- wrapper+data Inh_Productions = Inh_Productions { aroundsIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])), augmentsIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier [Expression])), constructorTypeMap_Inh_Productions :: !(Map NontermIdent ConstructorType), cr_Inh_Productions :: !(Bool), inh_Inh_Productions :: !(Attributes), inhMap_Inh_Productions :: !(Map Identifier Attributes), inhOrig_Inh_Productions :: !(Attributes), manualAttrOrderMap_Inh_Productions :: !(AttrOrderMap), mergesIn_Inh_Productions :: !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))), nonterminals_Inh_Productions :: !(Set NontermIdent), nt_Inh_Productions :: !(NontermIdent), o_rename_Inh_Productions :: !(Bool), options_Inh_Productions :: !(Options), params_Inh_Productions :: !([Identifier]), syn_Inh_Productions :: !(Attributes), synMap_Inh_Productions :: !(Map Identifier Attributes), synOrig_Inh_Productions :: !(Attributes), typeSyns_Inh_Productions :: !(TypeSyns), uniq_Inh_Productions :: !(Int), useMap_Inh_Productions :: !(Map Identifier (String,String,String)), wrappers_Inh_Productions :: !(Set NontermIdent) }+data Syn_Productions = Syn_Productions { errors_Syn_Productions :: !(Seq Error), output_Syn_Productions :: !(Productions), uniq_Syn_Productions :: !(Int) }+{-# INLINABLE wrap_Productions #-}+wrap_Productions :: T_Productions -> Inh_Productions -> (Syn_Productions )+wrap_Productions !(T_Productions act) !(Inh_Productions _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Productions_vIn8 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers+ !(T_Productions_vOut8 _lhsOerrors _lhsOoutput _lhsOuniq) <- return (inv_Productions_s16 sem K_Productions_v8 arg)+ return (Syn_Productions _lhsOerrors _lhsOoutput _lhsOuniq)+ )++-- cata+{-# NOINLINE sem_Productions #-}+sem_Productions :: Productions -> T_Productions +sem_Productions list = Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list)++-- semantic domain+newtype T_Productions = T_Productions {+ attach_T_Productions :: Identity (T_Productions_s16 )+ }+data T_Productions_s16 where C_Productions_s16 :: {+ inv_Productions_s16 :: !(forall t. K_Productions_s16 t -> t)+ } -> T_Productions_s16 +data T_Productions_s17 = C_Productions_s17+data T_Productions_s30 = C_Productions_s30+newtype T_Productions_s39 = C_Productions_s39 {+ inv_Productions_s39 :: (T_Productions_v27 )+ }+data K_Productions_s16 k where+ K_Productions_v8 :: K_Productions_s16 (T_Productions_v8 )+ K_Productions_v17 :: K_Productions_s16 (T_Productions_v17 )+ K_Productions_v26 :: K_Productions_s16 (T_Productions_v26 )+type T_Productions_v8 = (T_Productions_vIn8 ) -> (T_Productions_vOut8 )+data T_Productions_vIn8 = T_Productions_vIn8 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Map NontermIdent ConstructorType) !(Bool) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(Set NontermIdent) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)+data T_Productions_vOut8 = T_Productions_vOut8 !(Seq Error) !(Productions) !(Int)+type T_Productions_v17 = (T_Productions_vIn17 ) -> (T_Productions_vOut17 )+data T_Productions_vIn17 = T_Productions_vIn17 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !(Map NontermIdent ConstructorType) !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !([Identifier]) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Int) !(Map Identifier (String,String,String)) !(Set NontermIdent)+data T_Productions_vOut17 = T_Productions_vOut17 !(Seq Error) !(Productions) !(Int)+type T_Productions_v26 = (T_Productions_vIn26 ) -> (T_Productions_vOut26 )+data T_Productions_vIn26 = T_Productions_vIn26 !(Map NontermIdent ConstructorType) !(Bool) !(Attributes) !(Map Identifier Attributes) !(AttrOrderMap) !(Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) !(NontermIdent) !(Bool) !(Options) !(Attributes) !(Map Identifier Attributes) !(Attributes) !(TypeSyns) !(Map Identifier (String,String,String)) !(Set NontermIdent)+data T_Productions_vOut26 = T_Productions_vOut26 !(Seq Error) !(T_Productions_s39 )+type T_Productions_v27 = (T_Productions_vIn27 ) -> (T_Productions_vOut27 )+data T_Productions_vIn27 = T_Productions_vIn27 !(Map ConstructorIdent (Map Identifier [Expression])) !(Map ConstructorIdent (Map Identifier [Expression])) !([Identifier]) !(Int)+data T_Productions_vOut27 = T_Productions_vOut27 !(Productions) !(Int)+{-# NOINLINE sem_Productions_Cons #-}+sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions +sem_Productions_Cons arg_hd_ arg_tl_ = T_Productions (return st16) where+ {-# NOINLINE st16 #-}+ !st16 = let+ k16 :: K_Productions_s16 t -> t+ k16 K_Productions_v8 = v8+ k16 K_Productions_v17 = v17+ k16 K_Productions_v26 = v26+ v8 :: T_Productions_v8 + v8 = \ !(T_Productions_vIn8 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_hdX14 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_)) in+ let !_tlX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_)) in+ let !_hdOconstructorTypeMap = rule236 _lhsIconstructorTypeMap in+ let !_hdOcr = rule237 _lhsIcr in+ let !_hdOinh = rule238 _lhsIinh in+ let !_hdOinhMap = rule239 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule241 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule242 _lhsImergesIn in+ let !_hdOnt = rule244 _lhsInt in+ let !_hdOo_rename = rule245 _lhsIo_rename in+ let !_hdOoptions = rule246 _lhsIoptions in+ let !_hdOsyn = rule248 _lhsIsyn in+ let !_hdOsynMap = rule249 _lhsIsynMap in+ let !_hdOsynOrig = rule250 _lhsIsynOrig in+ let !_hdOtypeSyns = rule251 _lhsItypeSyns in+ let !_hdOuseMap = rule253 _lhsIuseMap in+ let !_hdOwrappers = rule254 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule257 _lhsIconstructorTypeMap in+ let !_tlOcr = rule258 _lhsIcr in+ let !_tlOinh = rule259 _lhsIinh in+ let !_tlOinhMap = rule260 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule262 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule263 _lhsImergesIn in+ let !_tlOnt = rule265 _lhsInt in+ let !_tlOo_rename = rule266 _lhsIo_rename in+ let !_tlOoptions = rule267 _lhsIoptions in+ let !_tlOsyn = rule269 _lhsIsyn in+ let !_tlOsynMap = rule270 _lhsIsynMap in+ let !_tlOsynOrig = rule271 _lhsIsynOrig in+ let !_tlOtypeSyns = rule272 _lhsItypeSyns in+ let !_tlOuseMap = rule274 _lhsIuseMap in+ let !_tlOwrappers = rule275 _lhsIwrappers in+ let !_hdOaroundsIn = rule234 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule235 _lhsIaugmentsIn in+ let !_hdOparams = rule247 _lhsIparams in+ let !_hdOuniq = rule252 _lhsIuniq in+ let !_tlOaroundsIn = rule255 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule256 _lhsIaugmentsIn in+ let !_tlOparams = rule268 _lhsIparams in+ let !(T_Production_vOut25 _hdIerrors _hdIoutput _hdIuniq) = inv_Production_s14 _hdX14 K_Production_v25 (T_Production_vIn25 _hdOaroundsIn _hdOaugmentsIn _hdOconstructorTypeMap _hdOcr _hdOinh _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnt _hdOo_rename _hdOoptions _hdOparams _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in+ let !(T_Productions_vOut26 _tlIerrors _tlX39) = inv_Productions_s16 _tlX16 K_Productions_v26 (T_Productions_vIn26 _tlOconstructorTypeMap _tlOcr _tlOinh _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnt _tlOo_rename _tlOoptions _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule230 _hdIerrors _tlIerrors in+ let !_tlOuniq = rule273 _hdIuniq in+ let !(T_Productions_vOut27 _tlIoutput _tlIuniq) = inv_Productions_s39 _tlX39 (T_Productions_vIn27 _tlOaroundsIn _tlOaugmentsIn _tlOparams _tlOuniq) in+ let !_output = rule231 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Productions+ !_lhsOoutput = rule232 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule233 _tlIuniq in+ let !__result_ = T_Productions_vOut8 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v17 :: T_Productions_v17 + v17 = \ !(T_Productions_vIn17 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let !_hdX14 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_)) in+ let !_tlX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_)) in+ let !_hdOconstructorTypeMap = rule236 _lhsIconstructorTypeMap in+ let !_hdOcr = rule237 _lhsIcr in+ let !_hdOinh = rule238 _lhsIinh in+ let !_hdOinhMap = rule239 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule241 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule242 _lhsImergesIn in+ let !_hdOnt = rule244 _lhsInt in+ let !_hdOo_rename = rule245 _lhsIo_rename in+ let !_hdOoptions = rule246 _lhsIoptions in+ let !_hdOsyn = rule248 _lhsIsyn in+ let !_hdOsynMap = rule249 _lhsIsynMap in+ let !_hdOsynOrig = rule250 _lhsIsynOrig in+ let !_hdOtypeSyns = rule251 _lhsItypeSyns in+ let !_hdOuseMap = rule253 _lhsIuseMap in+ let !_hdOwrappers = rule254 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule257 _lhsIconstructorTypeMap in+ let !_tlOcr = rule258 _lhsIcr in+ let !_tlOinh = rule259 _lhsIinh in+ let !_tlOinhMap = rule260 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule262 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule263 _lhsImergesIn in+ let !_tlOnt = rule265 _lhsInt in+ let !_tlOo_rename = rule266 _lhsIo_rename in+ let !_tlOoptions = rule267 _lhsIoptions in+ let !_tlOsyn = rule269 _lhsIsyn in+ let !_tlOsynMap = rule270 _lhsIsynMap in+ let !_tlOsynOrig = rule271 _lhsIsynOrig in+ let !_tlOtypeSyns = rule272 _lhsItypeSyns in+ let !_tlOuseMap = rule274 _lhsIuseMap in+ let !_tlOwrappers = rule275 _lhsIwrappers in+ let !_hdOaroundsIn = rule234 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule235 _lhsIaugmentsIn in+ let !_hdOparams = rule247 _lhsIparams in+ let !_hdOuniq = rule252 _lhsIuniq in+ let !_tlOaroundsIn = rule255 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule256 _lhsIaugmentsIn in+ let !_tlOparams = rule268 _lhsIparams in+ let !(T_Production_vOut25 _hdIerrors _hdIoutput _hdIuniq) = inv_Production_s14 _hdX14 K_Production_v25 (T_Production_vIn25 _hdOaroundsIn _hdOaugmentsIn _hdOconstructorTypeMap _hdOcr _hdOinh _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnt _hdOo_rename _hdOoptions _hdOparams _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuniq _hdOuseMap _hdOwrappers) in+ let !(T_Productions_vOut26 _tlIerrors _tlX39) = inv_Productions_s16 _tlX16 K_Productions_v26 (T_Productions_vIn26 _tlOconstructorTypeMap _tlOcr _tlOinh _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnt _tlOo_rename _tlOoptions _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule230 _hdIerrors _tlIerrors in+ let !_tlOuniq = rule273 _hdIuniq in+ let !(T_Productions_vOut27 _tlIoutput _tlIuniq) = inv_Productions_s39 _tlX39 (T_Productions_vIn27 _tlOaroundsIn _tlOaugmentsIn _tlOparams _tlOuniq) in+ let !_output = rule231 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Productions+ !_lhsOoutput = rule232 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule233 _tlIuniq in+ let !__result_ = T_Productions_vOut17 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v26 :: T_Productions_v26 + v26 = \ !(T_Productions_vIn26 _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let !_hdX14 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_)) in+ let !_tlX16 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_)) in+ let !_hdOconstructorTypeMap = rule236 _lhsIconstructorTypeMap in+ let !_hdOcr = rule237 _lhsIcr in+ let !_hdOinh = rule238 _lhsIinh in+ let !_hdOinhMap = rule239 _lhsIinhMap in+ let !_hdOmanualAttrOrderMap = rule241 _lhsImanualAttrOrderMap in+ let !_hdOmergesIn = rule242 _lhsImergesIn in+ let !_hdOnt = rule244 _lhsInt in+ let !_hdOo_rename = rule245 _lhsIo_rename in+ let !_hdOoptions = rule246 _lhsIoptions in+ let !_hdOsyn = rule248 _lhsIsyn in+ let !_hdOsynMap = rule249 _lhsIsynMap in+ let !_hdOsynOrig = rule250 _lhsIsynOrig in+ let !_hdOtypeSyns = rule251 _lhsItypeSyns in+ let !_hdOuseMap = rule253 _lhsIuseMap in+ let !_hdOwrappers = rule254 _lhsIwrappers in+ let !_tlOconstructorTypeMap = rule257 _lhsIconstructorTypeMap in+ let !_tlOcr = rule258 _lhsIcr in+ let !_tlOinh = rule259 _lhsIinh in+ let !_tlOinhMap = rule260 _lhsIinhMap in+ let !_tlOmanualAttrOrderMap = rule262 _lhsImanualAttrOrderMap in+ let !_tlOmergesIn = rule263 _lhsImergesIn in+ let !_tlOnt = rule265 _lhsInt in+ let !_tlOo_rename = rule266 _lhsIo_rename in+ let !_tlOoptions = rule267 _lhsIoptions in+ let !_tlOsyn = rule269 _lhsIsyn in+ let !_tlOsynMap = rule270 _lhsIsynMap in+ let !_tlOsynOrig = rule271 _lhsIsynOrig in+ let !_tlOtypeSyns = rule272 _lhsItypeSyns in+ let !_tlOuseMap = rule274 _lhsIuseMap in+ let !_tlOwrappers = rule275 _lhsIwrappers in+ let !(T_Production_vOut39 _hdIerrors _hdX48) = inv_Production_s14 _hdX14 K_Production_v39 (T_Production_vIn39 _hdOconstructorTypeMap _hdOcr _hdOinh _hdOinhMap _hdOmanualAttrOrderMap _hdOmergesIn _hdOnt _hdOo_rename _hdOoptions _hdOsyn _hdOsynMap _hdOsynOrig _hdOtypeSyns _hdOuseMap _hdOwrappers) in+ let !(T_Productions_vOut26 _tlIerrors _tlX39) = inv_Productions_s16 _tlX16 K_Productions_v26 (T_Productions_vIn26 _tlOconstructorTypeMap _tlOcr _tlOinh _tlOinhMap _tlOmanualAttrOrderMap _tlOmergesIn _tlOnt _tlOo_rename _tlOoptions _tlOsyn _tlOsynMap _tlOsynOrig _tlOtypeSyns _tlOuseMap _tlOwrappers) in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule230 _hdIerrors _tlIerrors in+ let !__st_ = st39 _hdX48 _tlX39+ !__result_ = T_Productions_vOut26 _lhsOerrors __st_+ in __result_ )+ in C_Productions_s16 k16+ {-# NOINLINE st39 #-}+ st39 = \ !_hdX48 !_tlX39 -> let+ v27 :: T_Productions_v27 + v27 = \ !(T_Productions_vIn27 _lhsIaroundsIn _lhsIaugmentsIn _lhsIparams _lhsIuniq) -> (+ let !_hdOaroundsIn = rule234 _lhsIaroundsIn in+ let !_hdOaugmentsIn = rule235 _lhsIaugmentsIn in+ let !_hdOparams = rule247 _lhsIparams in+ let !_hdOuniq = rule252 _lhsIuniq in+ let !_tlOaroundsIn = rule255 _lhsIaroundsIn in+ let !_tlOaugmentsIn = rule256 _lhsIaugmentsIn in+ let !_tlOparams = rule268 _lhsIparams in+ let !(T_Production_vOut40 _hdIoutput _hdIuniq) = inv_Production_s48 _hdX48 (T_Production_vIn40 _hdOaroundsIn _hdOaugmentsIn _hdOparams _hdOuniq) in+ let !_tlOuniq = rule273 _hdIuniq in+ let !(T_Productions_vOut27 _tlIoutput _tlIuniq) = inv_Productions_s39 _tlX39 (T_Productions_vIn27 _tlOaroundsIn _tlOaugmentsIn _tlOparams _tlOuniq) in+ let !_output = rule231 _hdIoutput _tlIoutput in+ let _lhsOoutput :: Productions+ !_lhsOoutput = rule232 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule233 _tlIuniq in+ let !__result_ = T_Productions_vOut27 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Productions_s39 v27+ {-# NOINLINE[1] rule230 #-}+ rule230 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# NOINLINE[1] rule231 #-}+ rule231 = \ ((!_hdIoutput) :: Production) ((!_tlIoutput) :: Productions) ->+ (:) _hdIoutput _tlIoutput+ {-# NOINLINE[1] rule232 #-}+ rule232 = \ !_output ->+ _output+ {-# NOINLINE[1] rule233 #-}+ rule233 = \ ((!_tlIuniq) :: Int) ->+ _tlIuniq+ {-# NOINLINE[1] rule234 #-}+ rule234 = \ ((!_lhsIaroundsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->+ _lhsIaroundsIn+ {-# NOINLINE[1] rule235 #-}+ rule235 = \ ((!_lhsIaugmentsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->+ _lhsIaugmentsIn+ {-# NOINLINE[1] rule236 #-}+ rule236 = \ ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# NOINLINE[1] rule237 #-}+ rule237 = \ ((!_lhsIcr) :: Bool) ->+ _lhsIcr+ {-# NOINLINE[1] rule238 #-}+ rule238 = \ ((!_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# NOINLINE[1] rule239 #-}+ rule239 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule241 #-}+ rule241 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->+ _lhsImanualAttrOrderMap+ {-# NOINLINE[1] rule242 #-}+ rule242 = \ ((!_lhsImergesIn) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->+ _lhsImergesIn+ {-# NOINLINE[1] rule244 #-}+ rule244 = \ ((!_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# NOINLINE[1] rule245 #-}+ rule245 = \ ((!_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# NOINLINE[1] rule246 #-}+ rule246 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule247 #-}+ rule247 = \ ((!_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# NOINLINE[1] rule248 #-}+ rule248 = \ ((!_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# NOINLINE[1] rule249 #-}+ rule249 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule250 #-}+ rule250 = \ ((!_lhsIsynOrig) :: Attributes) ->+ _lhsIsynOrig+ {-# NOINLINE[1] rule251 #-}+ rule251 = \ ((!_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# NOINLINE[1] rule252 #-}+ rule252 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq+ {-# NOINLINE[1] rule253 #-}+ rule253 = \ ((!_lhsIuseMap) :: Map Identifier (String,String,String)) ->+ _lhsIuseMap+ {-# NOINLINE[1] rule254 #-}+ rule254 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# NOINLINE[1] rule255 #-}+ rule255 = \ ((!_lhsIaroundsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->+ _lhsIaroundsIn+ {-# NOINLINE[1] rule256 #-}+ rule256 = \ ((!_lhsIaugmentsIn) :: Map ConstructorIdent (Map Identifier [Expression])) ->+ _lhsIaugmentsIn+ {-# NOINLINE[1] rule257 #-}+ rule257 = \ ((!_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# NOINLINE[1] rule258 #-}+ rule258 = \ ((!_lhsIcr) :: Bool) ->+ _lhsIcr+ {-# NOINLINE[1] rule259 #-}+ rule259 = \ ((!_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# NOINLINE[1] rule260 #-}+ rule260 = \ ((!_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# NOINLINE[1] rule262 #-}+ rule262 = \ ((!_lhsImanualAttrOrderMap) :: AttrOrderMap) ->+ _lhsImanualAttrOrderMap+ {-# NOINLINE[1] rule263 #-}+ rule263 = \ ((!_lhsImergesIn) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier],Expression))) ->+ _lhsImergesIn+ {-# NOINLINE[1] rule265 #-}+ rule265 = \ ((!_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# NOINLINE[1] rule266 #-}+ rule266 = \ ((!_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# NOINLINE[1] rule267 #-}+ rule267 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule268 #-}+ rule268 = \ ((!_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# NOINLINE[1] rule269 #-}+ rule269 = \ ((!_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# NOINLINE[1] rule270 #-}+ rule270 = \ ((!_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# NOINLINE[1] rule271 #-}+ rule271 = \ ((!_lhsIsynOrig) :: Attributes) ->+ _lhsIsynOrig+ {-# NOINLINE[1] rule272 #-}+ rule272 = \ ((!_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# NOINLINE[1] rule273 #-}+ rule273 = \ ((!_hdIuniq) :: Int) ->+ _hdIuniq+ {-# NOINLINE[1] rule274 #-}+ rule274 = \ ((!_lhsIuseMap) :: Map Identifier (String,String,String)) ->+ _lhsIuseMap+ {-# NOINLINE[1] rule275 #-}+ rule275 = \ ((!_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_Productions_Nil #-}+sem_Productions_Nil :: T_Productions +sem_Productions_Nil = T_Productions (return st16) where+ {-# NOINLINE st16 #-}+ !st16 = let+ k16 :: K_Productions_s16 t -> t+ k16 K_Productions_v8 = v8+ k16 K_Productions_v17 = v17+ k16 K_Productions_v26 = v26+ v8 :: T_Productions_v8 + v8 = \ !(T_Productions_vIn8 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsIinhOrig _lhsImanualAttrOrderMap _lhsImergesIn _lhsInonterminals _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule276 () in+ let !_output = rule277 () in+ let _lhsOoutput :: Productions+ !_lhsOoutput = rule278 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule279 _lhsIuniq in+ let !__result_ = T_Productions_vOut8 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v17 :: T_Productions_v17 + v17 = \ !(T_Productions_vIn17 _lhsIaroundsIn _lhsIaugmentsIn _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIparams _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuniq _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule276 () in+ let !_output = rule277 () in+ let _lhsOoutput :: Productions+ !_lhsOoutput = rule278 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule279 _lhsIuniq in+ let !__result_ = T_Productions_vOut17 _lhsOerrors _lhsOoutput _lhsOuniq+ in __result_ )+ v26 :: T_Productions_v26 + v26 = \ !(T_Productions_vIn26 _lhsIconstructorTypeMap _lhsIcr _lhsIinh _lhsIinhMap _lhsImanualAttrOrderMap _lhsImergesIn _lhsInt _lhsIo_rename _lhsIoptions _lhsIsyn _lhsIsynMap _lhsIsynOrig _lhsItypeSyns _lhsIuseMap _lhsIwrappers) -> (+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule276 () in+ let !__st_ = st39 ()+ !__result_ = T_Productions_vOut26 _lhsOerrors __st_+ in __result_ )+ in C_Productions_s16 k16+ {-# NOINLINE st39 #-}+ st39 = \ (_ :: ()) -> let+ v27 :: T_Productions_v27 + v27 = \ !(T_Productions_vIn27 _lhsIaroundsIn _lhsIaugmentsIn _lhsIparams _lhsIuniq) -> (+ let !_output = rule277 () in+ let _lhsOoutput :: Productions+ !_lhsOoutput = rule278 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule279 _lhsIuniq in+ let !__result_ = T_Productions_vOut27 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Productions_s39 v27+ {-# NOINLINE[1] rule276 #-}+ rule276 = \ (_ :: ()) ->+ Seq.empty+ {-# NOINLINE[1] rule277 #-}+ rule277 = \ (_ :: ()) ->+ []+ {-# NOINLINE[1] rule278 #-}+ rule278 = \ !_output ->+ _output+ {-# NOINLINE[1] rule279 #-}+ rule279 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq++-- Rule --------------------------------------------------------+-- wrapper+data Inh_Rule = Inh_Rule { con_Inh_Rule :: !(ConstructorIdent), constructorTypeMap_Inh_Rule :: !(Map NontermIdent ConstructorType), nt_Inh_Rule :: !(NontermIdent), options_Inh_Rule :: !(Options), uniq_Inh_Rule :: !(Int) }+data Syn_Rule = Syn_Rule { containsVars_Syn_Rule :: !(Bool), definedAttrs_Syn_Rule :: !(Set (Identifier,Identifier)), errors_Syn_Rule :: !(Seq Error), isPure_Syn_Rule :: !(Bool), locals_Syn_Rule :: !(Set Identifier), output_Syn_Rule :: !(Rule), outputs_Syn_Rule :: !(Rules), ruleNames_Syn_Rule :: !(Set Identifier), uniq_Syn_Rule :: !(Int) }+{-# INLINABLE wrap_Rule #-}+wrap_Rule :: T_Rule -> Inh_Rule -> (Syn_Rule )+wrap_Rule !(T_Rule act) !(Inh_Rule _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Rule_vIn9 _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq+ !(T_Rule_vOut9 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq) <- return (inv_Rule_s18 sem K_Rule_v9 arg)+ return (Syn_Rule _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq)+ )++-- cata+{-# INLINE sem_Rule #-}+sem_Rule :: Rule -> T_Rule +sem_Rule ( Rule !mbName_ pattern_ !rhs_ !owrt_ !origin_ !explicit_ !pure_ !identity_ !mbError_ !eager_ ) = sem_Rule_Rule mbName_ ( sem_Pattern pattern_ ) rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_++-- semantic domain+newtype T_Rule = T_Rule {+ attach_T_Rule :: Identity (T_Rule_s18 )+ }+data T_Rule_s18 where C_Rule_s18 :: {+ inv_Rule_s18 :: !(forall t. K_Rule_s18 t -> t)+ } -> T_Rule_s18 +data T_Rule_s19 = C_Rule_s19+data T_Rule_s41 = C_Rule_s41+newtype T_Rule_s51 = C_Rule_s51 {+ inv_Rule_s51 :: (T_Rule_v44 )+ }+data K_Rule_s18 k where+ K_Rule_v9 :: K_Rule_s18 (T_Rule_v9 )+ K_Rule_v29 :: K_Rule_s18 (T_Rule_v29 )+ K_Rule_v43 :: K_Rule_s18 (T_Rule_v43 )+type T_Rule_v9 = (T_Rule_vIn9 ) -> (T_Rule_vOut9 )+data T_Rule_vIn9 = T_Rule_vIn9 !(ConstructorIdent) !(Map NontermIdent ConstructorType) !(NontermIdent) !(Options) !(Int)+data T_Rule_vOut9 = T_Rule_vOut9 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Bool) !(Set Identifier) !(Rule) !(Rules) !(Set Identifier) !(Int)+type T_Rule_v29 = (T_Rule_vIn29 ) -> (T_Rule_vOut29 )+data T_Rule_vIn29 = T_Rule_vIn29 !(Options) !(Int)+data T_Rule_vOut29 = T_Rule_vOut29 !(Bool) !(Set (Identifier,Identifier)) !(Seq Error) !(Bool) !(Set Identifier) !(Rules) !(Set Identifier) !(Int)+type T_Rule_v43 = (T_Rule_vIn43 ) -> (T_Rule_vOut43 )+data T_Rule_vIn43 = T_Rule_vIn43 +data T_Rule_vOut43 = T_Rule_vOut43 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Set Identifier) !(T_Rule_s51 )+type T_Rule_v44 = (T_Rule_vIn44 ) -> (T_Rule_vOut44 )+data T_Rule_vIn44 = T_Rule_vIn44 !(Options) !(Int)+data T_Rule_vOut44 = T_Rule_vOut44 !(Bool) !(Bool) !(Rules) !(Int)+{-# NOINLINE sem_Rule_Rule #-}+sem_Rule_Rule :: (Maybe Identifier) -> T_Pattern -> (Expression) -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Bool) -> (Maybe Error) -> (Bool) -> T_Rule +sem_Rule_Rule !arg_mbName_ arg_pattern_ !arg_rhs_ !arg_owrt_ !arg_origin_ !arg_explicit_ !arg_pure_ !arg_identity_ !arg_mbError_ !arg_eager_ = T_Rule (return st18) where+ {-# NOINLINE st18 #-}+ !st18 = let+ k18 :: K_Rule_s18 t -> t+ k18 K_Rule_v9 = v9+ k18 K_Rule_v29 = v29+ k18 K_Rule_v43 = v43+ v9 :: T_Rule_v9 + v9 = \ !(T_Rule_vIn9 _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq) -> (+ let !_patternX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_)) in+ let _lhsOisPure :: Bool+ !_lhsOisPure = rule280 arg_pure_ in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule284 arg_mbName_ in+ let !(T_Pattern_vOut28 _patternIcontainsVars _patternIdefinedAttrs _patternIerrors _patternIlocals _patternIoutput) = inv_Pattern_s10 _patternX10 K_Pattern_v28 (T_Pattern_vIn28 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule285 _patternIcontainsVars in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule286 _patternIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule287 _patternIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule288 _patternIlocals in+ let !_output = rule289 _patternIoutput arg_eager_ arg_explicit_ arg_identity_ arg_mbError_ arg_mbName_ arg_origin_ arg_owrt_ arg_pure_ arg_rhs_ in+ let _lhsOoutput :: Rule+ !_lhsOoutput = rule290 _output in+ let !(!_output1,!_mbAlias) = rule281 _output in+ let _lhsOuniq :: Int+ !(!_outputs,!_lhsOuniq) = rule282 _lhsIoptions _lhsIuniq _output1 in+ let _lhsOoutputs :: Rules+ !_lhsOoutputs = rule283 _mbAlias _outputs in+ let !__result_ = T_Rule_vOut9 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutput _lhsOoutputs _lhsOruleNames _lhsOuniq+ in __result_ )+ v29 :: T_Rule_v29 + v29 = \ !(T_Rule_vIn29 _lhsIoptions _lhsIuniq) -> (+ let !_patternX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_)) in+ let _lhsOisPure :: Bool+ !_lhsOisPure = rule280 arg_pure_ in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule284 arg_mbName_ in+ let !(T_Pattern_vOut28 _patternIcontainsVars _patternIdefinedAttrs _patternIerrors _patternIlocals _patternIoutput) = inv_Pattern_s10 _patternX10 K_Pattern_v28 (T_Pattern_vIn28 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule285 _patternIcontainsVars in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule286 _patternIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule287 _patternIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule288 _patternIlocals in+ let !_output = rule289 _patternIoutput arg_eager_ arg_explicit_ arg_identity_ arg_mbError_ arg_mbName_ arg_origin_ arg_owrt_ arg_pure_ arg_rhs_ in+ let !(!_output1,!_mbAlias) = rule281 _output in+ let _lhsOuniq :: Int+ !(!_outputs,!_lhsOuniq) = rule282 _lhsIoptions _lhsIuniq _output1 in+ let _lhsOoutputs :: Rules+ !_lhsOoutputs = rule283 _mbAlias _outputs in+ let !__result_ = T_Rule_vOut29 _lhsOcontainsVars _lhsOdefinedAttrs _lhsOerrors _lhsOisPure _lhsOlocals _lhsOoutputs _lhsOruleNames _lhsOuniq+ in __result_ )+ v43 :: T_Rule_v43 + v43 = \ !(T_Rule_vIn43 ) -> (+ let !_patternX10 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_)) in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule284 arg_mbName_ in+ let !(T_Pattern_vOut50 _patternIdefinedAttrs _patternIerrors _patternIlocals _patternX55) = inv_Pattern_s10 _patternX10 K_Pattern_v50 (T_Pattern_vIn50 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule286 _patternIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule287 _patternIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule288 _patternIlocals in+ let !__st_ = st51 _patternX55+ !__result_ = T_Rule_vOut43 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOruleNames __st_+ in __result_ )+ in C_Rule_s18 k18+ {-# NOINLINE st51 #-}+ st51 = \ !_patternX55 -> let+ v44 :: T_Rule_v44 + v44 = \ !(T_Rule_vIn44 _lhsIoptions _lhsIuniq) -> (+ let _lhsOisPure :: Bool+ !_lhsOisPure = rule280 arg_pure_ in+ let !(T_Pattern_vOut51 _patternIcontainsVars _patternIoutput) = inv_Pattern_s55 _patternX55 K_Pattern_v51 (T_Pattern_vIn51 ) in+ let _lhsOcontainsVars :: Bool+ !_lhsOcontainsVars = rule285 _patternIcontainsVars in+ let !_output = rule289 _patternIoutput arg_eager_ arg_explicit_ arg_identity_ arg_mbError_ arg_mbName_ arg_origin_ arg_owrt_ arg_pure_ arg_rhs_ in+ let !(!_output1,!_mbAlias) = rule281 _output in+ let _lhsOuniq :: Int+ !(!_outputs,!_lhsOuniq) = rule282 _lhsIoptions _lhsIuniq _output1 in+ let _lhsOoutputs :: Rules+ !_lhsOoutputs = rule283 _mbAlias _outputs in+ let !__result_ = T_Rule_vOut44 _lhsOcontainsVars _lhsOisPure _lhsOoutputs _lhsOuniq+ in __result_ )+ in C_Rule_s51 v44+ {-# NOINLINE[1] rule280 #-}+ {-# LINE 585 "./src-ag/DefaultRules.ag" #-}+ rule280 = \ !pure_ ->+ {-# LINE 585 "./src-ag/DefaultRules.ag" #-}+ pure_+ {-# LINE 4271 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule281 #-}+ {-# LINE 652 "./src-ag/DefaultRules.ag" #-}+ rule281 = \ !_output ->+ {-# LINE 652 "./src-ag/DefaultRules.ag" #-}+ mkRuleAlias _output+ {-# LINE 4277 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule282 #-}+ {-# LINE 653 "./src-ag/DefaultRules.ag" #-}+ rule282 = \ ((!_lhsIoptions) :: Options) ((!_lhsIuniq) :: Int) !_output1 ->+ {-# LINE 653 "./src-ag/DefaultRules.ag" #-}+ if needsMultiRules _lhsIoptions+ then multiRule _output1 _lhsIuniq+ else ([_output1 ], _lhsIuniq)+ {-# LINE 4285 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule283 #-}+ {-# LINE 656 "./src-ag/DefaultRules.ag" #-}+ rule283 = \ !_mbAlias !_outputs ->+ {-# LINE 656 "./src-ag/DefaultRules.ag" #-}+ maybe [] return _mbAlias ++ _outputs+ {-# LINE 4291 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule284 #-}+ {-# LINE 741 "./src-ag/DefaultRules.ag" #-}+ rule284 = \ !mbName_ ->+ {-# LINE 741 "./src-ag/DefaultRules.ag" #-}+ case mbName_ of+ Nothing -> Set.empty+ Just nm -> Set.singleton nm+ {-# LINE 4299 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule285 #-}+ rule285 = \ ((!_patternIcontainsVars) :: Bool) ->+ _patternIcontainsVars+ {-# NOINLINE[1] rule286 #-}+ rule286 = \ ((!_patternIdefinedAttrs) :: Set (Identifier,Identifier)) ->+ _patternIdefinedAttrs+ {-# NOINLINE[1] rule287 #-}+ rule287 = \ ((!_patternIerrors) :: Seq Error) ->+ _patternIerrors+ {-# NOINLINE[1] rule288 #-}+ rule288 = \ ((!_patternIlocals) :: Set Identifier) ->+ _patternIlocals+ {-# NOINLINE[1] rule289 #-}+ rule289 = \ ((!_patternIoutput) :: Pattern) !eager_ !explicit_ !identity_ !mbError_ !mbName_ !origin_ !owrt_ !pure_ !rhs_ ->+ Rule mbName_ _patternIoutput rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_+ {-# INLINE rule290 #-}+ rule290 = \ !_output ->+ _output++-- Rules -------------------------------------------------------+-- wrapper+data Inh_Rules = Inh_Rules { con_Inh_Rules :: !(ConstructorIdent), constructorTypeMap_Inh_Rules :: !(Map NontermIdent ConstructorType), nt_Inh_Rules :: !(NontermIdent), options_Inh_Rules :: !(Options), uniq_Inh_Rules :: !(Int) }+data Syn_Rules = Syn_Rules { definedAttrs_Syn_Rules :: !(Set (Identifier,Identifier)), errors_Syn_Rules :: !(Seq Error), locals_Syn_Rules :: !(Set Identifier), output_Syn_Rules :: !(Rules), ruleNames_Syn_Rules :: !(Set Identifier), uniq_Syn_Rules :: !(Int) }+{-# INLINABLE wrap_Rules #-}+wrap_Rules :: T_Rules -> Inh_Rules -> (Syn_Rules )+wrap_Rules !(T_Rules act) !(Inh_Rules _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Rules_vIn10 _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq+ !(T_Rules_vOut10 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq) <- return (inv_Rules_s20 sem K_Rules_v10 arg)+ return (Syn_Rules _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq)+ )++-- cata+{-# NOINLINE sem_Rules #-}+sem_Rules :: Rules -> T_Rules +sem_Rules list = Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list)++-- semantic domain+newtype T_Rules = T_Rules {+ attach_T_Rules :: Identity (T_Rules_s20 )+ }+data T_Rules_s20 where C_Rules_s20 :: {+ inv_Rules_s20 :: !(forall t. K_Rules_s20 t -> t)+ } -> T_Rules_s20 +data T_Rules_s21 = C_Rules_s21+data T_Rules_s37 = C_Rules_s37+newtype T_Rules_s42 = C_Rules_s42 {+ inv_Rules_s42 :: (T_Rules_v31 )+ }+data K_Rules_s20 k where+ K_Rules_v10 :: K_Rules_s20 (T_Rules_v10 )+ K_Rules_v24 :: K_Rules_s20 (T_Rules_v24 )+ K_Rules_v30 :: K_Rules_s20 (T_Rules_v30 )+type T_Rules_v10 = (T_Rules_vIn10 ) -> (T_Rules_vOut10 )+data T_Rules_vIn10 = T_Rules_vIn10 !(ConstructorIdent) !(Map NontermIdent ConstructorType) !(NontermIdent) !(Options) !(Int)+data T_Rules_vOut10 = T_Rules_vOut10 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Rules) !(Set Identifier) !(Int)+type T_Rules_v24 = (T_Rules_vIn24 ) -> (T_Rules_vOut24 )+data T_Rules_vIn24 = T_Rules_vIn24 !(Options) !(Int)+data T_Rules_vOut24 = T_Rules_vOut24 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Rules) !(Set Identifier) !(Int)+type T_Rules_v30 = (T_Rules_vIn30 ) -> (T_Rules_vOut30 )+data T_Rules_vIn30 = T_Rules_vIn30 +data T_Rules_vOut30 = T_Rules_vOut30 !(Set (Identifier,Identifier)) !(Seq Error) !(Set Identifier) !(Set Identifier) !(T_Rules_s42 )+type T_Rules_v31 = (T_Rules_vIn31 ) -> (T_Rules_vOut31 )+data T_Rules_vIn31 = T_Rules_vIn31 !(Options) !(Int)+data T_Rules_vOut31 = T_Rules_vOut31 !(Rules) !(Int)+{-# NOINLINE sem_Rules_Cons #-}+sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules +sem_Rules_Cons arg_hd_ arg_tl_ = T_Rules (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ k20 :: K_Rules_s20 t -> t+ k20 K_Rules_v10 = v10+ k20 K_Rules_v24 = v24+ k20 K_Rules_v30 = v30+ v10 :: T_Rules_v10 + v10 = \ !(T_Rules_vIn10 _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq) -> (+ let !_hdX18 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_)) in+ let !_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_)) in+ let !_hdOoptions = rule303 _lhsIoptions in+ let !_hdOuniq = rule304 _lhsIuniq in+ let !_tlOoptions = rule308 _lhsIoptions in+ let !(T_Rule_vOut29 _hdIcontainsVars _hdIdefinedAttrs _hdIerrors _hdIisPure _hdIlocals _hdIoutputs _hdIruleNames _hdIuniq) = inv_Rule_s18 _hdX18 K_Rule_v29 (T_Rule_vIn29 _hdOoptions _hdOuniq) in+ let !(T_Rules_vOut30 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIruleNames _tlX42) = inv_Rules_s20 _tlX20 K_Rules_v30 (T_Rules_vIn30 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule294 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule295 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule296 _hdIlocals _tlIlocals in+ let !_tlOuniq = rule309 _hdIuniq in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule297 _hdIruleNames _tlIruleNames in+ let !(T_Rules_vOut31 _tlIoutput _tlIuniq) = inv_Rules_s42 _tlX42 (T_Rules_vIn31 _tlOoptions _tlOuniq) in+ let _lhsOoutput :: Rules+ !_lhsOoutput = rule293 _hdIcontainsVars _hdIisPure _hdIoutputs _tlIoutput in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule299 _tlIuniq in+ let !__result_ = T_Rules_vOut10 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq+ in __result_ )+ v24 :: T_Rules_v24 + v24 = \ !(T_Rules_vIn24 _lhsIoptions _lhsIuniq) -> (+ let !_hdX18 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_)) in+ let !_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_)) in+ let !_hdOoptions = rule303 _lhsIoptions in+ let !_hdOuniq = rule304 _lhsIuniq in+ let !_tlOoptions = rule308 _lhsIoptions in+ let !(T_Rule_vOut29 _hdIcontainsVars _hdIdefinedAttrs _hdIerrors _hdIisPure _hdIlocals _hdIoutputs _hdIruleNames _hdIuniq) = inv_Rule_s18 _hdX18 K_Rule_v29 (T_Rule_vIn29 _hdOoptions _hdOuniq) in+ let !(T_Rules_vOut30 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIruleNames _tlX42) = inv_Rules_s20 _tlX20 K_Rules_v30 (T_Rules_vIn30 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule294 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule295 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule296 _hdIlocals _tlIlocals in+ let !_tlOuniq = rule309 _hdIuniq in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule297 _hdIruleNames _tlIruleNames in+ let !(T_Rules_vOut31 _tlIoutput _tlIuniq) = inv_Rules_s42 _tlX42 (T_Rules_vIn31 _tlOoptions _tlOuniq) in+ let _lhsOoutput :: Rules+ !_lhsOoutput = rule293 _hdIcontainsVars _hdIisPure _hdIoutputs _tlIoutput in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule299 _tlIuniq in+ let !__result_ = T_Rules_vOut24 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq+ in __result_ )+ v30 :: T_Rules_v30 + v30 = \ !(T_Rules_vIn30 ) -> (+ let !_hdX18 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_)) in+ let !_tlX20 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_)) in+ let !(T_Rule_vOut43 _hdIdefinedAttrs _hdIerrors _hdIlocals _hdIruleNames _hdX51) = inv_Rule_s18 _hdX18 K_Rule_v43 (T_Rule_vIn43 ) in+ let !(T_Rules_vOut30 _tlIdefinedAttrs _tlIerrors _tlIlocals _tlIruleNames _tlX42) = inv_Rules_s20 _tlX20 K_Rules_v30 (T_Rules_vIn30 ) in+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule294 _hdIdefinedAttrs _tlIdefinedAttrs in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule295 _hdIerrors _tlIerrors in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule296 _hdIlocals _tlIlocals in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule297 _hdIruleNames _tlIruleNames in+ let !__st_ = st42 _hdX51 _tlX42+ !__result_ = T_Rules_vOut30 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOruleNames __st_+ in __result_ )+ in C_Rules_s20 k20+ {-# NOINLINE st42 #-}+ st42 = \ !_hdX51 !_tlX42 -> let+ v31 :: T_Rules_v31 + v31 = \ !(T_Rules_vIn31 _lhsIoptions _lhsIuniq) -> (+ let !_hdOoptions = rule303 _lhsIoptions in+ let !_hdOuniq = rule304 _lhsIuniq in+ let !_tlOoptions = rule308 _lhsIoptions in+ let !(T_Rule_vOut44 _hdIcontainsVars _hdIisPure _hdIoutputs _hdIuniq) = inv_Rule_s51 _hdX51 (T_Rule_vIn44 _hdOoptions _hdOuniq) in+ let !_tlOuniq = rule309 _hdIuniq in+ let !(T_Rules_vOut31 _tlIoutput _tlIuniq) = inv_Rules_s42 _tlX42 (T_Rules_vIn31 _tlOoptions _tlOuniq) in+ let _lhsOoutput :: Rules+ !_lhsOoutput = rule293 _hdIcontainsVars _hdIisPure _hdIoutputs _tlIoutput in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule299 _tlIuniq in+ let !__result_ = T_Rules_vOut31 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Rules_s42 v31+ {-# NOINLINE[1] rule293 #-}+ {-# LINE 648 "./src-ag/DefaultRules.ag" #-}+ rule293 = \ ((!_hdIcontainsVars) :: Bool) ((!_hdIisPure) :: Bool) ((!_hdIoutputs) :: Rules) ((!_tlIoutput) :: Rules) ->+ {-# LINE 648 "./src-ag/DefaultRules.ag" #-}+ if _hdIcontainsVars && _hdIisPure then _hdIoutputs ++ _tlIoutput else _tlIoutput+ {-# LINE 4465 "dist/build/DefaultRules.hs"#-}+ {-# NOINLINE[1] rule294 #-}+ rule294 = \ ((!_hdIdefinedAttrs) :: Set (Identifier,Identifier)) ((!_tlIdefinedAttrs) :: Set (Identifier,Identifier)) ->+ _hdIdefinedAttrs `Set.union` _tlIdefinedAttrs+ {-# NOINLINE[1] rule295 #-}+ rule295 = \ ((!_hdIerrors) :: Seq Error) ((!_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# NOINLINE[1] rule296 #-}+ rule296 = \ ((!_hdIlocals) :: Set Identifier) ((!_tlIlocals) :: Set Identifier) ->+ _hdIlocals `Set.union` _tlIlocals+ {-# NOINLINE[1] rule297 #-}+ rule297 = \ ((!_hdIruleNames) :: Set Identifier) ((!_tlIruleNames) :: Set Identifier) ->+ _hdIruleNames `Set.union` _tlIruleNames+ {-# NOINLINE[1] rule299 #-}+ rule299 = \ ((!_tlIuniq) :: Int) ->+ _tlIuniq+ {-# NOINLINE[1] rule303 #-}+ rule303 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule304 #-}+ rule304 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq+ {-# NOINLINE[1] rule308 #-}+ rule308 = \ ((!_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# NOINLINE[1] rule309 #-}+ rule309 = \ ((!_hdIuniq) :: Int) ->+ _hdIuniq+{-# NOINLINE sem_Rules_Nil #-}+sem_Rules_Nil :: T_Rules +sem_Rules_Nil = T_Rules (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ k20 :: K_Rules_s20 t -> t+ k20 K_Rules_v10 = v10+ k20 K_Rules_v24 = v24+ k20 K_Rules_v30 = v30+ v10 :: T_Rules_v10 + v10 = \ !(T_Rules_vIn10 _lhsIcon _lhsIconstructorTypeMap _lhsInt _lhsIoptions _lhsIuniq) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule310 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule311 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule312 () in+ let !_output = rule314 () in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule313 () in+ let _lhsOoutput :: Rules+ !_lhsOoutput = rule315 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule316 _lhsIuniq in+ let !__result_ = T_Rules_vOut10 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq+ in __result_ )+ v24 :: T_Rules_v24 + v24 = \ !(T_Rules_vIn24 _lhsIoptions _lhsIuniq) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule310 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule311 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule312 () in+ let !_output = rule314 () in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule313 () in+ let _lhsOoutput :: Rules+ !_lhsOoutput = rule315 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule316 _lhsIuniq in+ let !__result_ = T_Rules_vOut24 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOoutput _lhsOruleNames _lhsOuniq+ in __result_ )+ v30 :: T_Rules_v30 + v30 = \ !(T_Rules_vIn30 ) -> (+ let _lhsOdefinedAttrs :: Set (Identifier,Identifier)+ !_lhsOdefinedAttrs = rule310 () in+ let _lhsOerrors :: Seq Error+ !_lhsOerrors = rule311 () in+ let _lhsOlocals :: Set Identifier+ !_lhsOlocals = rule312 () in+ let _lhsOruleNames :: Set Identifier+ !_lhsOruleNames = rule313 () in+ let !__st_ = st42 ()+ !__result_ = T_Rules_vOut30 _lhsOdefinedAttrs _lhsOerrors _lhsOlocals _lhsOruleNames __st_+ in __result_ )+ in C_Rules_s20 k20+ {-# NOINLINE st42 #-}+ st42 = \ (_ :: ()) -> let+ v31 :: T_Rules_v31 + v31 = \ !(T_Rules_vIn31 _lhsIoptions _lhsIuniq) -> (+ let !_output = rule314 () in+ let _lhsOoutput :: Rules+ !_lhsOoutput = rule315 _output in+ let _lhsOuniq :: Int+ !_lhsOuniq = rule316 _lhsIuniq in+ let !__result_ = T_Rules_vOut31 _lhsOoutput _lhsOuniq+ in __result_ )+ in C_Rules_s42 v31+ {-# NOINLINE[1] rule310 #-}+ rule310 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule311 #-}+ rule311 = \ (_ :: ()) ->+ Seq.empty+ {-# NOINLINE[1] rule312 #-}+ rule312 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule313 #-}+ rule313 = \ (_ :: ()) ->+ Set.empty+ {-# NOINLINE[1] rule314 #-}+ rule314 = \ (_ :: ()) ->+ []+ {-# NOINLINE[1] rule315 #-}+ rule315 = \ !_output ->+ _output+ {-# NOINLINE[1] rule316 #-}+ rule316 = \ ((!_lhsIuniq) :: Int) ->+ _lhsIuniq++-- TypeSig -----------------------------------------------------+-- wrapper+data Inh_TypeSig = Inh_TypeSig { nt_Inh_TypeSig :: !(NontermIdent), params_Inh_TypeSig :: !([Identifier]) }+data Syn_TypeSig = Syn_TypeSig { output_Syn_TypeSig :: !(TypeSig) }+{-# INLINABLE wrap_TypeSig #-}+wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> (Syn_TypeSig )+wrap_TypeSig !(T_TypeSig act) !(Inh_TypeSig _lhsInt _lhsIparams) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_TypeSig_vIn11 _lhsInt _lhsIparams+ !(T_TypeSig_vOut11 _lhsOoutput) <- return (inv_TypeSig_s22 sem arg)+ return (Syn_TypeSig _lhsOoutput)+ )++-- cata+{-# INLINE sem_TypeSig #-}+sem_TypeSig :: TypeSig -> T_TypeSig +sem_TypeSig ( TypeSig !name_ !tp_ ) = sem_TypeSig_TypeSig name_ tp_++-- semantic domain+newtype T_TypeSig = T_TypeSig {+ attach_T_TypeSig :: Identity (T_TypeSig_s22 )+ }+newtype T_TypeSig_s22 = C_TypeSig_s22 {+ inv_TypeSig_s22 :: (T_TypeSig_v11 )+ }+data T_TypeSig_s23 = C_TypeSig_s23+type T_TypeSig_v11 = (T_TypeSig_vIn11 ) -> (T_TypeSig_vOut11 )+data T_TypeSig_vIn11 = T_TypeSig_vIn11 !(NontermIdent) !([Identifier])+data T_TypeSig_vOut11 = T_TypeSig_vOut11 !(TypeSig)+{-# NOINLINE sem_TypeSig_TypeSig #-}+sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig +sem_TypeSig_TypeSig !arg_name_ !arg_tp_ = T_TypeSig (return st22) where+ {-# NOINLINE st22 #-}+ !st22 = let+ v11 :: T_TypeSig_v11 + v11 = \ !(T_TypeSig_vIn11 _lhsInt _lhsIparams) -> (+ let !_tp1 = rule317 _lhsInt _lhsIparams arg_tp_ in+ let _lhsOoutput :: TypeSig+ !_lhsOoutput = rule318 _tp1 arg_name_ in+ let !__result_ = T_TypeSig_vOut11 _lhsOoutput+ in __result_ )+ in C_TypeSig_s22 v11+ {-# INLINE rule317 #-}+ {-# LINE 604 "./src-ag/DefaultRules.ag" #-}+ rule317 = \ ((!_lhsInt) :: NontermIdent) ((!_lhsIparams) :: [Identifier]) !tp_ ->+ {-# LINE 604 "./src-ag/DefaultRules.ag" #-}+ elimSelfId _lhsInt _lhsIparams tp_+ {-# LINE 4632 "dist/build/DefaultRules.hs"#-}+ {-# INLINE rule318 #-}+ {-# LINE 645 "./src-ag/DefaultRules.ag" #-}+ rule318 = \ !_tp1 !name_ ->+ {-# LINE 645 "./src-ag/DefaultRules.ag" #-}+ TypeSig name_ _tp1+ {-# LINE 4638 "dist/build/DefaultRules.hs"#-}++-- TypeSigs ----------------------------------------------------+-- wrapper+data Inh_TypeSigs = Inh_TypeSigs { nt_Inh_TypeSigs :: !(NontermIdent), params_Inh_TypeSigs :: !([Identifier]) }+data Syn_TypeSigs = Syn_TypeSigs { output_Syn_TypeSigs :: !(TypeSigs) }+{-# INLINABLE wrap_TypeSigs #-}+wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> (Syn_TypeSigs )+wrap_TypeSigs !(T_TypeSigs act) !(Inh_TypeSigs _lhsInt _lhsIparams) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_TypeSigs_vIn12 _lhsInt _lhsIparams+ !(T_TypeSigs_vOut12 _lhsOoutput) <- return (inv_TypeSigs_s24 sem arg)+ return (Syn_TypeSigs _lhsOoutput)+ )++-- cata+{-# NOINLINE sem_TypeSigs #-}+sem_TypeSigs :: TypeSigs -> T_TypeSigs +sem_TypeSigs list = Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list)++-- semantic domain+newtype T_TypeSigs = T_TypeSigs {+ attach_T_TypeSigs :: Identity (T_TypeSigs_s24 )+ }+newtype T_TypeSigs_s24 = C_TypeSigs_s24 {+ inv_TypeSigs_s24 :: (T_TypeSigs_v12 )+ }+data T_TypeSigs_s25 = C_TypeSigs_s25+type T_TypeSigs_v12 = (T_TypeSigs_vIn12 ) -> (T_TypeSigs_vOut12 )+data T_TypeSigs_vIn12 = T_TypeSigs_vIn12 !(NontermIdent) !([Identifier])+data T_TypeSigs_vOut12 = T_TypeSigs_vOut12 !(TypeSigs)+{-# NOINLINE sem_TypeSigs_Cons #-}+sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs +sem_TypeSigs_Cons arg_hd_ arg_tl_ = T_TypeSigs (return st24) where+ {-# NOINLINE st24 #-}+ !st24 = let+ v12 :: T_TypeSigs_v12 + v12 = \ !(T_TypeSigs_vIn12 _lhsInt _lhsIparams) -> (+ let !_hdX22 = Control.Monad.Identity.runIdentity (attach_T_TypeSig (arg_hd_)) in+ let !_tlX24 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_tl_)) in+ let !_hdOnt = rule322 _lhsInt in+ let !_hdOparams = rule323 _lhsIparams in+ let !_tlOnt = rule324 _lhsInt in+ let !_tlOparams = rule325 _lhsIparams in+ let !(T_TypeSig_vOut11 _hdIoutput) = inv_TypeSig_s22 _hdX22 (T_TypeSig_vIn11 _hdOnt _hdOparams) in+ let !(T_TypeSigs_vOut12 _tlIoutput) = inv_TypeSigs_s24 _tlX24 (T_TypeSigs_vIn12 _tlOnt _tlOparams) in+ let !_output = rule320 _hdIoutput _tlIoutput in+ let _lhsOoutput :: TypeSigs+ !_lhsOoutput = rule321 _output in+ let !__result_ = T_TypeSigs_vOut12 _lhsOoutput+ in __result_ )+ in C_TypeSigs_s24 v12+ {-# INLINE rule320 #-}+ rule320 = \ ((!_hdIoutput) :: TypeSig) ((!_tlIoutput) :: TypeSigs) ->+ (:) _hdIoutput _tlIoutput+ {-# INLINE rule321 #-}+ rule321 = \ !_output ->+ _output+ {-# INLINE rule322 #-}+ rule322 = \ ((!_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule323 #-}+ rule323 = \ ((!_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule324 #-}+ rule324 = \ ((!_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule325 #-}+ rule325 = \ ((!_lhsIparams) :: [Identifier]) ->+ _lhsIparams+{-# NOINLINE sem_TypeSigs_Nil #-}+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil = T_TypeSigs (return st24) where+ {-# NOINLINE st24 #-}+ !st24 = let+ v12 :: T_TypeSigs_v12 + v12 = \ !(T_TypeSigs_vIn12 _lhsInt _lhsIparams) -> (+ let !_output = rule326 () in+ let _lhsOoutput :: TypeSigs+ !_lhsOoutput = rule327 _output in+ let !__result_ = T_TypeSigs_vOut12 _lhsOoutput+ in __result_ )+ in C_TypeSigs_s24 v12+ {-# INLINE rule326 #-}+ rule326 = \ (_ :: ()) ->+ []+ {-# INLINE rule327 #-}+ rule327 = \ !_output -> _output
src-generated/Desugar.hs view
@@ -3,16 +3,16 @@ {-# LANGUAGE ScopedTypeVariables #-} module Desugar where-{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}+{-# LINE 2 "./src-ag/HsToken.ag" #-} --- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos import CommonTypes-import ErrorMessages+import UU.Scanner.Position(Pos)+{-# LINE 11 "dist/build/Desugar.hs" #-}++{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken {-# LINE 17 "dist/build/Desugar.hs" #-} {-# LINE 2 "./src-ag/Patterns.ag" #-}@@ -22,16 +22,16 @@ import CommonTypes (ConstructorIdent,Identifier) {-# LINE 24 "dist/build/Desugar.hs" #-} -{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 30 "dist/build/Desugar.hs" #-}--{-# LINE 2 "./src-ag/HsToken.ag" #-}+{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-} +-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos import CommonTypes-import UU.Scanner.Position(Pos)+import ErrorMessages {-# LINE 36 "dist/build/Desugar.hs" #-} {-# LINE 14 "./src-ag/Desugar.ag" #-}
src-generated/ErrorMessages.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/ErrorMessages.ag)+-- UUAGC 0.9.50 (src-ag/ErrorMessages.ag) module ErrorMessages where {-# LINE 2 "./src-ag/ErrorMessages.ag" #-}
src-generated/ExecutionPlan.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/ExecutionPlan.ag)+-- UUAGC 0.9.50 (src-ag/ExecutionPlan.ag) module ExecutionPlan where {-# LINE 2 "./src-ag/ExecutionPlan.ag" #-}
src-generated/ExecutionPlan2Caml.hs view
@@ -2,6123 +2,6146 @@ {-# LANGUAGE ScopedTypeVariables #-} module ExecutionPlan2Caml where-{-# LINE 2 "./src-ag/ExecutionPlan.ag" #-}---- VisitSyntax.ag imports-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-import ErrorMessages--import qualified Data.Set as Set-import Data.Set(Set)-import qualified Data.Map as Map-import Data.Map(Map)-{-# LINE 18 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 25 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 31 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 2 "./src-ag/HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 37 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 32 "./src-ag/ExecutionPlan2Caml.ag" #-}--import ExecutionPlan-import Pretty-import PPUtil-import Options-import Data.Monoid(mappend,mempty)-import Data.Maybe-import Data.Graph-import Debug.Trace-import System.IO-import System.Directory-import System.FilePath-import UU.Scanner.Position--import TokenDef-import HsToken-import ErrorMessages--import Data.Set (Set)-import qualified Data.Set as Set-import Data.Map (Map)-import qualified Data.Map as Map-import Data.Sequence(Seq)-import qualified Data.Sequence as Seq-import Data.Foldable(toList)-{-# LINE 65 "dist/build/ExecutionPlan2Caml.hs" #-}-import Control.Monad.Identity (Identity)-import qualified Control.Monad.Identity-{-# LINE 173 "./src-ag/ExecutionPlan2Caml.ag" #-}--ppRecordTp :: PP a => [a] -> PP_Doc-ppRecordTp es- | null es = text "unit"- | otherwise = pp_block "{" "}" "; " (map pp es)--ppRecordVal :: PP a => [a] -> PP_Doc-ppRecordVal es- | null es = text "()"- | otherwise = pp_block "{" "}" "; " (map pp es)--ppFieldsVal :: Bool -> [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)] -> PP_Doc-ppFieldsVal record fields- | null fields = text "()"- | record = ppRecordVal [ r >#< "=" >#< x | (r,x,_,_) <- fields ]- | otherwise = pp_block "(" ")" "," [ x | (_,x,_,_) <- fields ]--ppFieldsType :: Bool -> Bool -> [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)] -> PP_Doc-ppFieldsType record defor fields- | null fields = text "unit"- | record = ppRecordTp [ r >#< ":" >#< (if defor then d else f) | (r,_,d,f) <- fields ]- | otherwise = pp_block "(" ")" "*" [ if defor then d else f | (_,_,d,f) <- fields ]-{-# LINE 91 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 286 "./src-ag/ExecutionPlan2Caml.ag" #-}--ppTp :: Type -> PP_Doc-ppTp tp = case tp of- Haskell t -> pp t -- ocaml type- NT nt tps deforested- | nt == _SELF -> pp "?SELF?"- | null tps -> ppNontTp nt deforested- | otherwise -> pp_parens (ppSpaced (map pp_parens tps) >#< ppNontTp nt deforested)- Self -> pp "?SELF?"--ppNontTp :: NontermIdent -> Bool -> PP_Doc-ppNontTp nt True = pp "t_" >|< pp nt-ppNontTp nt False = pp nt---- multiple type parameters go into a tuple-ppTypeParams :: PP a => [a] -> PP_Doc-ppTypeParams [] = empty-ppTypeParams [x] = pp x-ppTypeParams xs = pp_block "(" ")" "," (map pp xs)-{-# LINE 113 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 359 "./src-ag/ExecutionPlan2Caml.ag" #-}---- convention for nonterminals to module names-modName :: NontermIdent -> PP_Doc-modName nt = pp "M_" >|< pp nt--ppFunDecl :: Bool -> PP_Doc -> [(PP_Doc,PP_Doc)] -> PP_Doc -> PP_Doc -> PP_Doc-ppFunDecl gensigs nm args resSig expr = body where- body = nm >#< ppSpaced (map arg args) >#< ppRes >#< "="- >-< indent 2 expr- arg (arg,tp) = ppArg gensigs arg tp- ppRes- | gensigs = ":" >#< resSig- | otherwise = empty--ppArg :: Bool -> PP_Doc -> PP_Doc -> PP_Doc-ppArg gensigs arg tp- | gensigs = pp_parens (arg >#< ":" >#< tp)- | otherwise = arg--{-# LINE 135 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 426 "./src-ag/ExecutionPlan2Caml.ag" #-}-type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)-{-# LINE 139 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 462 "./src-ag/ExecutionPlan2Caml.ag" #-}------- conventions------- type of the state of a node: a closure containing the children states and attributes,--- with code of type 'type_nt_sem' that represents the subsequent visits to successor states.-type_nt_state nt st = "s_" >|< nt >|< "_" >|< st---- type of a visit to a node (the initial, and when in a given state)--- an instance of this type is called the "semantics"-type_nt_sem_top nt = "t_" >|< nt-type_nt_sem nt st = type_nt_sem_top nt >|< "_s" >|< st---- type of a caller (contains visit selection + inputs + continuation)-type_caller nt st = "c_" >|< nt >|< "_s" >|< st---- names of records-nm_attach nt = "attach_">|< nt-nm_invoke nt st = "inv_" >|< nt >|< "_s" >|< st---- name of the type variable representing the result type of the continuation-cont_tvar = text "'cont__"----- order states in reverse topological order so that successor states are--- earlier in the resulting list.-orderStates :: StateIdentifier -> [VisitStateState] -> [StateIdentifier]-orderStates initial edges = res where- source = Map.singleton initial Set.empty -- ensures that the initial state is in graph even when there are no edges- targets = [ Map.singleton t Set.empty | (_,_,t) <- edges ]- deps = [ Map.singleton f (Set.singleton t) | (_,f,t) <- edges ]-- mp = Map.unionsWith Set.union (source : (targets ++ deps))- es = [ (f,f,Set.toList ts) | (f,ts) <- Map.toList mp ]- cps = stronglyConnComp es- res = flattenSCCs cps-{-# LINE 179 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 519 "./src-ag/ExecutionPlan2Caml.ag" #-}--type_caller_visit nt v = "c_" >|< nt >|< "_v" >|< v-con_visit nt v = "C_" >|< nt >|< "_v" >|< v---- field names-nm_inh nt v = "inh_" >|< nt >|< "_v" >|< v-nm_cont nt v = "cont_" >|< nt >|< "_v" >|< v-{-# LINE 189 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 565 "./src-ag/ExecutionPlan2Caml.ag" #-}---- more naming conventions-nm_inarg nm nt v = "i_" >|< nm >|< "_" >|< nt >|< "_v" >|< v-nm_outarg nm nt v = "o_" >|< nm >|< "_" >|< nt >|< "_v" >|< v-nm_outarg_cont = nm_outarg "_cont"--conNmTVisit nt vId = "t_" >|< nt >|< "_v" >|< vId-conNmTVisitIn nt vId = "t_" >|< nt >|< "_vIn" >|< vId-conNmTVisitOut nt vId = "t_" >|< nt >|< "_vOut" >|< vId---- todo: remove ppMonadType-ppMonadType :: Options -> PP_Doc-ppMonadType opts- | parallelInvoke opts = text "IO"- | otherwise = text "Identity"-{-# LINE 207 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 778 "./src-ag/ExecutionPlan2Caml.ag" #-}--nm_visit v = "__v" >|< v-nm_k st = "__k" >|< st-nm_st st = "__st" >|< st--mklets :: (PP b, PP c) => [b] -> c -> PP_Doc-mklets defs body = res where- ppLet def = "let" >#< def >#< "in"- res = vlist (map ppLet defs) >-< body-{-# LINE 219 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 820 "./src-ag/ExecutionPlan2Caml.ag" #-}--resultValName :: String-resultValName = "__result_"--nextStName :: String-nextStName = "__st_"-{-# LINE 228 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 961 "./src-ag/ExecutionPlan2Caml.ag" #-}--stname :: Identifier -> Int -> String-stname child st = "_" ++ getName child ++ "X" ++ show st---- should actually return some conversion info-compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool-compatibleAttach _ _ _ = True-{-# LINE 238 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 1028 "./src-ag/ExecutionPlan2Caml.ag" #-}--dummyPat :: Options -> Bool -> PP_Doc-dummyPat opts noArgs- | not noArgs = empty- | strictDummyToken opts = text "()"- | otherwise = text "(_ : unit)"--dummyArg :: Options -> Bool -> PP_Doc-dummyArg opts noArgs- | not noArgs = empty- | otherwise = text "()"--dummyType :: Options -> Bool -> PP_Doc-dummyType opts noArgs- | not noArgs = empty- | otherwise = text "unit"-{-# LINE 257 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 1104 "./src-ag/ExecutionPlan2Caml.ag" #-}--data NonLocalAttr- = AttrInh Identifier Identifier- | AttrSyn Identifier Identifier deriving Show--mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr-mkNonLocalAttr True = AttrInh -- True: inherited attr-mkNonLocalAttr False = AttrSyn--lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc-lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs-lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns---- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that--- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.--- However, for now we simply decide to return Nothing in this case, which skips the type annotation.-lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc-lookupType child name attrMp childMp- | noParameters childTp = Just ppDoc- | otherwise = Nothing- where- attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs- childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp- nonterm = extractNonterminal childTp- childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp- ppDoc = ppTp attrTp--noParameters :: Type -> Bool-noParameters (Haskell _) = True-noParameters (NT _ args _) = null args-{-# LINE 290 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 1201 "./src-ag/ExecutionPlan2Caml.ag" #-}--contNm = text "__cont_"-inpsNm = text "__inps_"---- a `compatibleKind` b means: can kind b be invoked from a-compatibleKind :: VisitKind -> VisitKind -> Bool-compatibleKind _ _ = True--compatibleRule :: VisitKind -> Bool -> Bool-compatibleRule (VisitPure _) False = False-compatibleRule _ _ = True-{-# LINE 304 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 1226 "./src-ag/ExecutionPlan2Caml.ag" #-}--unionWithSum = Map.unionWith (+)-{-# LINE 309 "dist/build/ExecutionPlan2Caml.hs" #-}--{-# LINE 1249 "./src-ag/ExecutionPlan2Caml.ag" #-}--uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)-uwSetUnion = Map.unionWith Set.union--uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)-uwMapUnion = Map.unionWith Map.union-{-# LINE 318 "dist/build/ExecutionPlan2Caml.hs" #-}--- EChild --------------------------------------------------------- wrapper-data Inh_EChild = Inh_EChild { allInitStates_Inh_EChild :: (Map NontermIdent Int), con_Inh_EChild :: (ConstructorIdent), mainFile_Inh_EChild :: (String), mainName_Inh_EChild :: (String), nt_Inh_EChild :: (NontermIdent), options_Inh_EChild :: (Options) }-data Syn_EChild = Syn_EChild { argnamesw_Syn_EChild :: ( PP_Doc ), childTypes_Syn_EChild :: (Map Identifier Type), childintros_Syn_EChild :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), sigs_Syn_EChild :: ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]), terminaldefs_Syn_EChild :: (Set String) }-{-# INLINABLE wrap_EChild #-}-wrap_EChild :: T_EChild -> Inh_EChild -> (Syn_EChild )-wrap_EChild (T_EChild act) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions- (T_EChild_vOut1 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs) <- return (inv_EChild_s2 sem arg)- return (Syn_EChild _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs)- )---- cata-{-# NOINLINE sem_EChild #-}-sem_EChild :: EChild -> T_EChild -sem_EChild ( EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ ) = sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_-sem_EChild ( ETerm name_ tp_ ) = sem_EChild_ETerm name_ tp_---- semantic domain-newtype T_EChild = T_EChild {- attach_T_EChild :: Identity (T_EChild_s2 )- }-newtype T_EChild_s2 = C_EChild_s2 {- inv_EChild_s2 :: (T_EChild_v1 )- }-data T_EChild_s3 = C_EChild_s3-type T_EChild_v1 = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )-data T_EChild_vIn1 = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (String) (String) (NontermIdent) (Options)-data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (Set String)-{-# NOINLINE sem_EChild_EChild #-}-sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild -sem_EChild_EChild arg_name_ arg_tp_ arg_kind_ arg_hasAround_ _ _ = T_EChild (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_EChild_v1 - v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let- _tpDocFor = rule0 arg_tp_- _tpDocDefor = rule1 arg_tp_- _fieldNm = rule2 _lhsIcon _lhsInt arg_name_- _childNm = rule3 arg_name_- _field = rule4 _childNm _fieldNm _tpDocDefor _tpDocFor- _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]- _lhsOsigs = rule5 _field arg_kind_- _lhsOargnamesw :: PP_Doc - _lhsOargnamesw = rule6 _lhsIoptions _nt arg_kind_ arg_name_- _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule7 _introcode arg_name_- _isDefor = rule8 arg_tp_- _valcode = rule9 _isDefor _lhsIoptions _nt arg_kind_ arg_name_- _aroundcode = rule10 arg_hasAround_ arg_name_- _introcode = rule11 _aroundcode _initSt _isDefor _lhsIoptions _nt _valcode arg_hasAround_ arg_kind_ arg_name_- _nt = rule12 arg_tp_- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule13 arg_name_ arg_tp_- _initSt = rule14 _lhsIallInitStates _nt- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule15 ()- __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs- in __result_ )- in C_EChild_s2 v1- {-# INLINE rule0 #-}- {-# LINE 276 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule0 = \ tp_ ->- {-# LINE 276 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTp $ removeDeforested tp_- {-# LINE 386 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule1 #-}- {-# LINE 277 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule1 = \ tp_ ->- {-# LINE 277 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTp $ forceDeforested tp_- {-# LINE 392 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule2 #-}- {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule2 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->- {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}- text $ recordFieldname _lhsInt _lhsIcon name_- {-# LINE 398 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule3 #-}- {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule3 = \ name_ ->- {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}- text (fieldname name_)- {-# LINE 404 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule4 #-}- {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule4 = \ _childNm _fieldNm _tpDocDefor _tpDocFor ->- {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}- (_fieldNm , _childNm , _tpDocDefor , _tpDocFor )- {-# LINE 410 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule5 #-}- {-# LINE 281 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule5 = \ _field kind_ ->- {-# LINE 281 "./src-ag/ExecutionPlan2Caml.ag" #-}- case kind_ of- ChildAttr -> []- _ -> [_field ]- {-# LINE 418 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule6 #-}- {-# LINE 394 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule6 = \ ((_lhsIoptions) :: Options) _nt kind_ name_ ->- {-# LINE 394 "./src-ag/ExecutionPlan2Caml.ag" #-}- case kind_ of- ChildSyntax -> "(" >#< prefix _lhsIoptions >|< _nt >#< name_ >|< "_" >#< ")"- ChildAttr -> empty- ChildReplace tp -> "(" >#< prefix _lhsIoptions >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"- {-# LINE 427 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule7 #-}- {-# LINE 921 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule7 = \ _introcode name_ ->- {-# LINE 921 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ _introcode- {-# LINE 433 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule8 #-}- {-# LINE 922 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule8 = \ tp_ ->- {-# LINE 922 "./src-ag/ExecutionPlan2Caml.ag" #-}- case tp_ of- NT _ _ defor -> defor- _ -> False- {-# LINE 441 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule9 #-}- {-# LINE 925 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule9 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->- {-# LINE 925 "./src-ag/ExecutionPlan2Caml.ag" #-}- case kind_ of- ChildSyntax -> name_ >|< "_"- ChildAttr ->- let head | not _isDefor = if lateHigherOrderBinding _lhsIoptions- then lateSemNtLabel _nt >#< lhsname True idLateBindingAttr- else prefix _lhsIoptions >|< _nt- | otherwise = empty- in pp_parens (head >#< instname name_)- ChildReplace _ ->- pp_parens (instname name_ >#< name_ >|< "_")- {-# LINE 456 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule10 #-}- {-# LINE 936 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule10 = \ hasAround_ name_ ->- {-# LINE 936 "./src-ag/ExecutionPlan2Caml.ag" #-}- if hasAround_- then locname name_ >|< "_around"- else empty- {-# LINE 464 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule11 #-}- {-# LINE 939 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule11 = \ _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->- {-# LINE 939 "./src-ag/ExecutionPlan2Caml.ag" #-}- \kind -> let pat = text $ stname name_ _initSt- attach = pp_parens (_aroundcode >#< _valcode ) >|< "." >|< nm_attach _nt >#< "()"- decl = pat >#< "=" >#< attach- in if compatibleAttach kind _nt _lhsIoptions- then Right ( "let" >#< decl >#< "in"- , Set.singleton (stname name_ _initSt )- , case kind_ of- ChildAttr -> Map.insert (instname name_) Nothing $- ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)- then id- else Map.insert (lhsname True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)- ) $- ( if hasAround_- then Map.insert (locname (name_) ++ "_around") Nothing- else id- ) $ Map.empty- ChildReplace _ -> Map.singleton (instname name_) Nothing- ChildSyntax -> Map.empty- )- else Left $ IncompatibleAttachKind name_ kind- {-# LINE 489 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule12 #-}- {-# LINE 959 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule12 = \ tp_ ->- {-# LINE 959 "./src-ag/ExecutionPlan2Caml.ag" #-}- extractNonterminal tp_- {-# LINE 495 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule13 #-}- {-# LINE 1421 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule13 = \ name_ tp_ ->- {-# LINE 1421 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ tp_- {-# LINE 501 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule14 #-}- {-# LINE 1465 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule14 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->- {-# LINE 1465 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates- {-# LINE 507 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule15 #-}- rule15 = \ (_ :: ()) ->- Set.empty-{-# NOINLINE sem_EChild_ETerm #-}-sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild -sem_EChild_ETerm arg_name_ arg_tp_ = T_EChild (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_EChild_v1 - v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let- _tpDocFor = rule16 arg_tp_- _tpDocDefor = rule17 arg_tp_- _fieldNm = rule18 _lhsIcon _lhsInt arg_name_- _childNm = rule19 arg_name_- _field = rule20 _childNm _fieldNm _tpDocDefor _tpDocFor- _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]- _lhsOsigs = rule21 _field- _lhsOargnamesw :: PP_Doc - _lhsOargnamesw = rule22 arg_name_- _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule23 arg_name_- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule24 arg_name_- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule25 arg_name_ arg_tp_- __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs- in __result_ )- in C_EChild_s2 v1- {-# INLINE rule16 #-}- {-# LINE 276 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule16 = \ tp_ ->- {-# LINE 276 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTp $ removeDeforested tp_- {-# LINE 541 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule17 #-}- {-# LINE 277 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule17 = \ tp_ ->- {-# LINE 277 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTp $ forceDeforested tp_- {-# LINE 547 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule18 #-}- {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule18 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->- {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}- text $ recordFieldname _lhsInt _lhsIcon name_- {-# LINE 553 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule19 #-}- {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule19 = \ name_ ->- {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}- text (fieldname name_)- {-# LINE 559 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule20 #-}- {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule20 = \ _childNm _fieldNm _tpDocDefor _tpDocFor ->- {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}- (_fieldNm , _childNm , _tpDocDefor , _tpDocFor )- {-# LINE 565 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule21 #-}- {-# LINE 284 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule21 = \ _field ->- {-# LINE 284 "./src-ag/ExecutionPlan2Caml.ag" #-}- [_field ]- {-# LINE 571 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule22 #-}- {-# LINE 398 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule22 = \ name_ ->- {-# LINE 398 "./src-ag/ExecutionPlan2Caml.ag" #-}- text $ fieldname name_- {-# LINE 577 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule23 #-}- {-# LINE 920 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule23 = \ name_ ->- {-# LINE 920 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ (\_ -> Right (empty, Set.empty, Map.empty))- {-# LINE 583 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule24 #-}- {-# LINE 1263 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule24 = \ name_ ->- {-# LINE 1263 "./src-ag/ExecutionPlan2Caml.ag" #-}- Set.singleton $ fieldname name_- {-# LINE 589 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule25 #-}- {-# LINE 1421 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule25 = \ name_ tp_ ->- {-# LINE 1421 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ tp_- {-# LINE 595 "dist/build/ExecutionPlan2Caml.hs"#-}---- EChildren ------------------------------------------------------ wrapper-data Inh_EChildren = Inh_EChildren { allInitStates_Inh_EChildren :: (Map NontermIdent Int), con_Inh_EChildren :: (ConstructorIdent), mainFile_Inh_EChildren :: (String), mainName_Inh_EChildren :: (String), nt_Inh_EChildren :: (NontermIdent), options_Inh_EChildren :: (Options) }-data Syn_EChildren = Syn_EChildren { argnamesw_Syn_EChildren :: ([PP_Doc]), childTypes_Syn_EChildren :: (Map Identifier Type), childintros_Syn_EChildren :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), sigs_Syn_EChildren :: ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]), terminaldefs_Syn_EChildren :: (Set String) }-{-# INLINABLE wrap_EChildren #-}-wrap_EChildren :: T_EChildren -> Inh_EChildren -> (Syn_EChildren )-wrap_EChildren (T_EChildren act) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions- (T_EChildren_vOut4 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs) <- return (inv_EChildren_s5 sem arg)- return (Syn_EChildren _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs)- )---- cata-{-# NOINLINE sem_EChildren #-}-sem_EChildren :: EChildren -> T_EChildren -sem_EChildren list = Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list)---- semantic domain-newtype T_EChildren = T_EChildren {- attach_T_EChildren :: Identity (T_EChildren_s5 )- }-newtype T_EChildren_s5 = C_EChildren_s5 {- inv_EChildren_s5 :: (T_EChildren_v4 )- }-data T_EChildren_s6 = C_EChildren_s6-type T_EChildren_v4 = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )-data T_EChildren_vIn4 = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (String) (String) (NontermIdent) (Options)-data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (Set String)-{-# NOINLINE sem_EChildren_Cons #-}-sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren -sem_EChildren_Cons arg_hd_ arg_tl_ = T_EChildren (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_EChildren_v4 - v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let- _hdX2 = Control.Monad.Identity.runIdentity (attach_T_EChild (arg_hd_))- _tlX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_tl_))- (T_EChild_vOut1 _hdIargnamesw _hdIchildTypes _hdIchildintros _hdIsigs _hdIterminaldefs) = inv_EChild_s2 _hdX2 (T_EChild_vIn1 _hdOallInitStates _hdOcon _hdOmainFile _hdOmainName _hdOnt _hdOoptions)- (T_EChildren_vOut4 _tlIargnamesw _tlIchildTypes _tlIchildintros _tlIsigs _tlIterminaldefs) = inv_EChildren_s5 _tlX5 (T_EChildren_vIn4 _tlOallInitStates _tlOcon _tlOmainFile _tlOmainName _tlOnt _tlOoptions)- _lhsOargnamesw :: [PP_Doc]- _lhsOargnamesw = rule26 _hdIargnamesw _tlIargnamesw- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule27 _hdIchildTypes _tlIchildTypes- _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule28 _hdIchildintros _tlIchildintros- _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]- _lhsOsigs = rule29 _hdIsigs _tlIsigs- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule30 _hdIterminaldefs _tlIterminaldefs- _hdOallInitStates = rule31 _lhsIallInitStates- _hdOcon = rule32 _lhsIcon- _hdOmainFile = rule33 _lhsImainFile- _hdOmainName = rule34 _lhsImainName- _hdOnt = rule35 _lhsInt- _hdOoptions = rule36 _lhsIoptions- _tlOallInitStates = rule37 _lhsIallInitStates- _tlOcon = rule38 _lhsIcon- _tlOmainFile = rule39 _lhsImainFile- _tlOmainName = rule40 _lhsImainName- _tlOnt = rule41 _lhsInt- _tlOoptions = rule42 _lhsIoptions- __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs- in __result_ )- in C_EChildren_s5 v4- {-# INLINE rule26 #-}- rule26 = \ ((_hdIargnamesw) :: PP_Doc ) ((_tlIargnamesw) :: [PP_Doc]) ->- _hdIargnamesw : _tlIargnamesw- {-# INLINE rule27 #-}- rule27 = \ ((_hdIchildTypes) :: Map Identifier Type) ((_tlIchildTypes) :: Map Identifier Type) ->- _hdIchildTypes `mappend` _tlIchildTypes- {-# INLINE rule28 #-}- rule28 = \ ((_hdIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((_tlIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _hdIchildintros `Map.union` _tlIchildintros- {-# INLINE rule29 #-}- rule29 = \ ((_hdIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ((_tlIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ->- _hdIsigs ++ _tlIsigs- {-# INLINE rule30 #-}- rule30 = \ ((_hdIterminaldefs) :: Set String) ((_tlIterminaldefs) :: Set String) ->- _hdIterminaldefs `Set.union` _tlIterminaldefs- {-# INLINE rule31 #-}- rule31 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule32 #-}- rule32 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule33 #-}- rule33 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule34 #-}- rule34 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule35 #-}- rule35 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule36 #-}- rule36 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule37 #-}- rule37 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule38 #-}- rule38 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule39 #-}- rule39 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule40 #-}- rule40 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule41 #-}- rule41 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule42 #-}- rule42 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions-{-# NOINLINE sem_EChildren_Nil #-}-sem_EChildren_Nil :: T_EChildren -sem_EChildren_Nil = T_EChildren (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_EChildren_v4 - v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let- _lhsOargnamesw :: [PP_Doc]- _lhsOargnamesw = rule43 ()- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule44 ()- _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule45 ()- _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]- _lhsOsigs = rule46 ()- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule47 ()- __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs- in __result_ )- in C_EChildren_s5 v4- {-# INLINE rule43 #-}- rule43 = \ (_ :: ()) ->- []- {-# INLINE rule44 #-}- rule44 = \ (_ :: ()) ->- mempty- {-# INLINE rule45 #-}- rule45 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule46 #-}- rule46 = \ (_ :: ()) ->- []- {-# INLINE rule47 #-}- rule47 = \ (_ :: ()) ->- Set.empty---- ENonterminal --------------------------------------------------- wrapper-data Inh_ENonterminal = Inh_ENonterminal { allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminal :: (String), mainName_Inh_ENonterminal :: (String), options_Inh_ENonterminal :: (Options), synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), typeSyns_Inh_ENonterminal :: (TypeSyns), wrappers_Inh_ENonterminal :: (Set NontermIdent) }-data Syn_ENonterminal = Syn_ENonterminal { childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), code_Syn_ENonterminal :: (PP_Doc), datas_Syn_ENonterminal :: (PP_Doc), errors_Syn_ENonterminal :: (Seq Error), fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), initStates_Syn_ENonterminal :: (Map NontermIdent Int), modules_Syn_ENonterminal :: (PP_Doc), semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_ENonterminal #-}-wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> (Syn_ENonterminal )-wrap_ENonterminal (T_ENonterminal act) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers- (T_ENonterminal_vOut7 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminal_s8 sem arg)- return (Syn_ENonterminal _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# INLINE sem_ENonterminal #-}-sem_ENonterminal :: ENonterminal -> T_ENonterminal -sem_ENonterminal ( ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ prods_ recursive_ hoInfo_ ) = sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ ( sem_EProductions prods_ ) recursive_ hoInfo_---- semantic domain-newtype T_ENonterminal = T_ENonterminal {- attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )- }-newtype T_ENonterminal_s8 = C_ENonterminal_s8 {- inv_ENonterminal_s8 :: (T_ENonterminal_v7 )- }-data T_ENonterminal_s9 = C_ENonterminal_s9-type T_ENonterminal_v7 = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )-data T_ENonterminal_vIn7 = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (TypeSyns) (Set NontermIdent)-data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_ENonterminal_ENonterminal #-}-sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> (Maybe VisitIdentifier) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal -sem_ENonterminal_ENonterminal arg_nt_ arg_params_ _ arg_initial_ arg_initialv_ arg_nextVisits_ arg_prevVisits_ arg_prods_ _ _ = T_ENonterminal (return st8) where- {-# NOINLINE st8 #-}- st8 = let- v7 :: T_ENonterminal_v7 - v7 = \ (T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) -> ( let- _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_prods_))- (T_EProductions_vOut16 _prodsIallvisits _prodsIchildvisit _prodsIcount _prodsIdatatype _prodsIdatatype_call _prodsIdatatype_con _prodsIerrors _prodsIfromToStates _prodsIsemFunBndDefs _prodsIsemFunBndTps _prodsIsem_nt _prodsIsem_prod _prodsIt_visits _prodsIvisitKinds _prodsIvisitdefs _prodsIvisituses) = inv_EProductions_s17 _prodsX17 (T_EProductions_vIn16 _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOprevVisits _prodsOrename _prodsOsynmap)- _prodsOrename = rule48 _lhsIoptions- _prodsOnt = rule49 arg_nt_- _prodsOparams = rule50 arg_params_- _lhsOdatas :: PP_Doc- _lhsOdatas = rule51 _c_states _datatypeNt _datatypeProds _hasWrapper _lhsIoptions _prodsIt_visits _t_init _t_states _wr_inh _wr_syn arg_nt_- _lhsOcode :: PP_Doc- _lhsOcode = rule52 _datatypeCon _hasWrapper _lhsIoptions _prodsIsem_prod _sem_nt _wrapper arg_nt_- _lhsOmodules :: PP_Doc- _lhsOmodules = rule53 _moduleDecl- _hasWrapper = rule54 _lhsIwrappers arg_nt_- _t_params = rule55 arg_params_- _aliasPre = rule56 _t_params arg_nt_- _aliasMod = rule57 _aliasPre arg_nt_- _datatypeNt = rule58 _aliasMod _aliasPre _lhsItypeSyns _prodsIdatatype _prodsIdatatype_call _t_params arg_nt_- _datatypeCon = rule59 _lhsItypeSyns _prodsIdatatype_con arg_nt_- _moduleDecl = rule60 _lhsItypeSyns arg_nt_- _datatypeProds = rule61 _prodsIdatatype- _fsemname = rule62 _lhsIoptions- _semname = rule63 _fsemname arg_nt_- _frecarg = rule64 _fsemname- _sem_param_tp = rule65 _t_params arg_nt_- _sem_res_tp = rule66 _t_params _t_type- _sem_tp = rule67 _sem_param_tp _sem_res_tp- _o_sigs = rule68 _lhsIoptions- _sem_nt_body = rule69 _prodsIsem_nt- _sem_nt = rule70 _frecarg _fsemname _lhsItypeSyns _o_sigs _sem_nt_body _sem_param_tp _sem_res_tp _semname arg_nt_- (Just _prodsOinhmap) = rule71 _lhsIinhmap arg_nt_- (Just _prodsOsynmap) = rule72 _lhsIsynmap arg_nt_- _prodsOallInhmap = rule73 _lhsIinhmap- _prodsOallSynmap = rule74 _lhsIsynmap- _allstates = rule75 _prodsIallvisits arg_initial_- _stvisits = rule76 _prodsIallvisits- _t_type = rule77 arg_nt_- _t_c_params = rule78 arg_params_- _t_init = rule79 _t_params _t_type arg_initial_ arg_nt_- _t_states = rule80 _allstates _t_c_params _t_params arg_nextVisits_ arg_nt_- _c_states = rule81 _allstates _prodsIallvisits _t_c_params arg_nextVisits_ arg_nt_- _wr_inh = rule82 _genwrap _wr_inhs1- _wr_syn = rule83 _genwrap _wr_syns- _genwrap = rule84 _t_params arg_nt_- _inhAttrs = rule85 _lhsIinhmap arg_nt_- _wr_inhs = rule86 _inhAttrs _wr_filter- _wr_inhs1 = rule87 _inhAttrs- _wr_filter = rule88 _lhsIoptions- _wr_syns = rule89 _lhsIsynmap arg_nt_- _wrapname = rule90 arg_nt_- _inhname = rule91 arg_nt_- _synname = rule92 arg_nt_- _firstVisitInfo = rule93 arg_initial_ arg_nextVisits_- _wrapArgSemTp = rule94 _t_params _t_type- _wrapArgInhTp = rule95 _inhname _t_params- _wrapArgPats = rule96 _wr_inhs1 arg_nt_- _wrapResTp = rule97 _synname _t_params- _wrapper = rule98 _o_sigs _wrapArgInhTp _wrapArgPats _wrapArgSemTp _wrapResTp _wrapname _wrapperPreamble- _wrapperPreamble = rule99 _lhsImainName _lhsIoptions _wrapperBody- _wrapperBody = rule100 _firstVisitInfo _wr_inhs _wr_syns arg_initial_ arg_initialv_ arg_nt_- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule101 _prodsIsemFunBndDefs _semFunBndDef- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule102 _prodsIsemFunBndTps _semFunBndTp- _semFunBndDef = rule103 _semFunBndNm _semname- _semFunBndTp = rule104 _semFunBndNm _sem_tp- _semFunBndNm = rule105 arg_nt_- _prodsOinitial = rule106 arg_initial_- _prodsOallstates = rule107 _allstates- _prodsOnextVisits = rule108 arg_nextVisits_- _prodsOprevVisits = rule109 arg_prevVisits_- _prodsOlocalAttrTypes = rule110 _lhsIlocalAttrTypes arg_nt_- _lhsOinitStates :: Map NontermIdent Int- _lhsOinitStates = rule111 arg_initial_ arg_nt_- _ntType = rule112 arg_nt_ arg_params_- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule113 _prodsIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule114 _prodsIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule115 _prodsIfromToStates- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule116 _prodsIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule117 _prodsIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule118 _prodsIvisituses- _prodsOallFromToStates = rule119 _lhsIallFromToStates- _prodsOallInitStates = rule120 _lhsIallInitStates- _prodsOallVisitKinds = rule121 _lhsIallVisitKinds- _prodsOallchildvisit = rule122 _lhsIallchildvisit- _prodsOavisitdefs = rule123 _lhsIavisitdefs- _prodsOavisituses = rule124 _lhsIavisituses- _prodsOmainFile = rule125 _lhsImainFile- _prodsOmainName = rule126 _lhsImainName- _prodsOntType = rule127 _ntType- _prodsOoptions = rule128 _lhsIoptions- __result_ = T_ENonterminal_vOut7 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_ENonterminal_s8 v7- {-# INLINE rule48 #-}- {-# LINE 76 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule48 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 76 "./src-ag/ExecutionPlan2Caml.ag" #-}- rename _lhsIoptions- {-# LINE 890 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule49 #-}- {-# LINE 84 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule49 = \ nt_ ->- {-# LINE 84 "./src-ag/ExecutionPlan2Caml.ag" #-}- nt_- {-# LINE 896 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule50 #-}- {-# LINE 94 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule50 = \ params_ ->- {-# LINE 94 "./src-ag/ExecutionPlan2Caml.ag" #-}- params_- {-# LINE 902 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule51 #-}- {-# LINE 113 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule51 = \ _c_states _datatypeNt _datatypeProds _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init _t_states _wr_inh _wr_syn nt_ ->- {-# LINE 113 "./src-ag/ExecutionPlan2Caml.ag" #-}- ( text ""- >-< "(* *** " ++ getName nt_ ++ " *** [data] *)")- >-< (if dataTypes _lhsIoptions- then pp "(* data *)"- >-< _datatypeNt- >-< _datatypeProds- >-< ""- else empty)- >-< (if _hasWrapper- then pp "(* wrapper *)"- >-< _wr_inh- >-< _wr_syn- >-< ""- else empty)- >-< (if semfuns _lhsIoptions- then pp "(* semantic domain *)"- >-< _t_init- >-< _t_states- >-< _c_states- >-< _prodsIt_visits- >-< ""- else empty)- {-# LINE 929 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule52 #-}- {-# LINE 136 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule52 = \ _datatypeCon _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) _sem_nt _wrapper nt_ ->- {-# LINE 136 "./src-ag/ExecutionPlan2Caml.ag" #-}- ( text ""- >-< "(* *** " ++ getName nt_ ++ " *** [code] *)")- >-< (if dataTypes _lhsIoptions- then pp "(* constructor functions *)"- >-< _datatypeCon- else empty)- >-< (if _hasWrapper- then pp "(* wrapper *)"- >-< _wrapper- >-< ""- else empty)- >-< (if folds _lhsIoptions- then "(* cata *)"- >-< _sem_nt- >-< ""- else empty)- >-< (if semfuns _lhsIoptions- then "(* semantic domain *)"- >-< _prodsIsem_prod- >-< ""- else empty)- {-# LINE 955 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule53 #-}- {-# LINE 161 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule53 = \ _moduleDecl ->- {-# LINE 161 "./src-ag/ExecutionPlan2Caml.ag" #-}- _moduleDecl- {-# LINE 961 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule54 #-}- {-# LINE 163 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule54 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->- {-# LINE 163 "./src-ag/ExecutionPlan2Caml.ag" #-}- nt_ `Set.member` _lhsIwrappers- {-# LINE 967 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule55 #-}- {-# LINE 214 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule55 = \ params_ ->- {-# LINE 214 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTypeParams params_- {-# LINE 973 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule56 #-}- {-# LINE 215 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule56 = \ _t_params nt_ ->- {-# LINE 215 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< _t_params >#< nt_ >#< "="- {-# LINE 979 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule57 #-}- {-# LINE 216 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule57 = \ _aliasPre nt_ ->- {-# LINE 216 "./src-ag/ExecutionPlan2Caml.ag" #-}- _aliasPre >#< modName nt_ >|< ".t"- {-# LINE 985 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule58 #-}- {-# LINE 218 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule58 = \ _aliasMod _aliasPre ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) ((_prodsIdatatype_call) :: [PP_Doc]) _t_params nt_ ->- {-# LINE 218 "./src-ag/ExecutionPlan2Caml.ag" #-}- case lookup nt_ _lhsItypeSyns of- Just (List t) -> _aliasPre >#< ppTp t >#< "list"- Just (Maybe t) -> _aliasPre >#< ppTp t >#< "option"- Just (Tuple ts) -> _aliasPre >#< (pp_block "(" ")" " * " $ map (ppTp . snd) ts)- Just (Map k v) -> _aliasMod- Just (IntMap t) -> _aliasMod- Just (OrdSet t) -> _aliasMod- Just IntSet -> _aliasMod- _ -> "and" >#< _t_params >#< nt_ >#< "="- >-< ( if null _prodsIdatatype- then pp "unit"- else indent 2 $ vlist _prodsIdatatype_call- )- {-# LINE 1003 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule59 #-}- {-# LINE 237 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule59 = \ ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype_con) :: [PP_Doc]) nt_ ->- {-# LINE 237 "./src-ag/ExecutionPlan2Caml.ag" #-}- case lookup nt_ _lhsItypeSyns of- Just _ -> empty- Nothing -> vlist _prodsIdatatype_con- {-# LINE 1011 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule60 #-}- {-# LINE 242 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule60 = \ ((_lhsItypeSyns) :: TypeSyns) nt_ ->- {-# LINE 242 "./src-ag/ExecutionPlan2Caml.ag" #-}- let ppModule :: PP a => a -> PP_Doc- ppModule expr = "module" >#< modName nt_ >#< "="- in case lookup nt_ _lhsItypeSyns of- Just (Map k _) -> ppModule ("Map.Make" >#< pp_parens (ppTp k))- Just (IntMap _) -> ppModule ("Map.Make ()")- Just (OrdSet t) -> ppModule ("Set.Make" >#< pp_parens (ppTp t))- Just IntSet -> ppModule ("Set.Make (struct type t = int let compare = Pervasives.compare end)")- _ -> empty- {-# LINE 1024 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule61 #-}- {-# LINE 251 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule61 = \ ((_prodsIdatatype) :: [PP_Doc]) ->- {-# LINE 251 "./src-ag/ExecutionPlan2Caml.ag" #-}- vlist _prodsIdatatype- {-# LINE 1030 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule62 #-}- {-# LINE 311 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule62 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 311 "./src-ag/ExecutionPlan2Caml.ag" #-}- \x -> prefix _lhsIoptions ++ show x- {-# LINE 1036 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule63 #-}- {-# LINE 312 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule63 = \ _fsemname nt_ ->- {-# LINE 312 "./src-ag/ExecutionPlan2Caml.ag" #-}- _fsemname nt_- {-# LINE 1042 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule64 #-}- {-# LINE 313 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule64 = \ _fsemname ->- {-# LINE 313 "./src-ag/ExecutionPlan2Caml.ag" #-}- \t x -> case t of- NT nt _ _ -> pp_parens (_fsemname nt >#< x)- _ -> x- {-# LINE 1050 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule65 #-}- {-# LINE 317 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule65 = \ _t_params nt_ ->- {-# LINE 317 "./src-ag/ExecutionPlan2Caml.ag" #-}- _t_params >#< nt_- {-# LINE 1056 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule66 #-}- {-# LINE 318 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule66 = \ _t_params _t_type ->- {-# LINE 318 "./src-ag/ExecutionPlan2Caml.ag" #-}- _t_params >#< _t_type- {-# LINE 1062 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule67 #-}- {-# LINE 319 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule67 = \ _sem_param_tp _sem_res_tp ->- {-# LINE 319 "./src-ag/ExecutionPlan2Caml.ag" #-}- _sem_param_tp >#< "->" >#< _sem_res_tp- {-# LINE 1068 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule68 #-}- {-# LINE 321 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule68 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 321 "./src-ag/ExecutionPlan2Caml.ag" #-}- typeSigs _lhsIoptions- {-# LINE 1074 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule69 #-}- {-# LINE 322 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule69 = \ ((_prodsIsem_nt) :: PP_Doc) ->- {-# LINE 322 "./src-ag/ExecutionPlan2Caml.ag" #-}- "match arg with" >-< (indent 2 $ _prodsIsem_nt)- {-# LINE 1080 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule70 #-}- {-# LINE 323 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule70 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) _o_sigs _sem_nt_body _sem_param_tp _sem_res_tp _semname nt_ ->- {-# LINE 323 "./src-ag/ExecutionPlan2Caml.ag" #-}- let genSem :: PP a => a -> PP_Doc -> PP_Doc- genSem nm body = "and" >#< ppFunDecl _o_sigs (pp _semname ) [(pp nm, _sem_param_tp )] _sem_res_tp body- genAlias alts = genSem (pp "arg") (pp "match arg with" >-< (indent 2 $ vlist $ map (pp "|" >#<) alts))- genMap v = let body = modName nt_ >|< ".fold" >#< _semname >|< "_Entry" >#< _semname >|< "_Nil" >#< els- els = case v of- NT nt _ _ -> pp_parens (modName nt_ >|< ".map" >#< _fsemname nt >#< "m")- _ -> pp "m"- in genSem "m" body- genSet mbNt = let body = "List.fold_right" >#< _semname >|< "_Entry" >#<- els (pp_parens (modName nt_ >|< ".elements" >#< "s")) >#< _semname >|< "_Nil"- els r = maybe r (\nt -> pp_parens ("List.map" >#< _fsemname nt >#< r)) mbNt- in genSem "s" body- in case lookup nt_ _lhsItypeSyns of- Just (List t) -> let body = "List.fold_right" >#< _semname >|< "_Cons" >#< els >#< _semname >|< "_Nil"- els = case t of- NT nt _ _ -> pp_parens ("List.map" >#< _fsemname nt >#< "list")- _ -> pp "list"- in genSem "list" body- Just (Tuple ts) -> let pat = pp_parens (ppCommas $ map fst ts)- body = _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (pp $ fst t)) ts)- in genSem pat body- Just (Map _ v) -> genMap v- Just (IntMap v) -> genMap v- Just (Maybe t) -> genAlias- [ "None" >#< "->" >#< "=" >#< _semname >|< "_Nothing"- , "Some" >#< "just" >#< "->" >#< _semname >|< "_Just" >#< _frecarg t (pp "just")- ]- Just (OrdSet t) -> genSet $ case t of- NT nt _ _ -> Just nt- _ -> Nothing- Just (IntSet) -> genSet Nothing- _ -> genSem "arg" _sem_nt_body- {-# LINE 1117 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule71 #-}- {-# LINE 418 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule71 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 418 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.lookup nt_ _lhsIinhmap- {-# LINE 1123 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule72 #-}- {-# LINE 419 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule72 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 419 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.lookup nt_ _lhsIsynmap- {-# LINE 1129 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule73 #-}- {-# LINE 420 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule73 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- {-# LINE 420 "./src-ag/ExecutionPlan2Caml.ag" #-}- _lhsIinhmap- {-# LINE 1135 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule74 #-}- {-# LINE 421 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule74 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- {-# LINE 421 "./src-ag/ExecutionPlan2Caml.ag" #-}- _lhsIsynmap- {-# LINE 1141 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule75 #-}- {-# LINE 442 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule75 = \ ((_prodsIallvisits) :: [VisitStateState]) initial_ ->- {-# LINE 442 "./src-ag/ExecutionPlan2Caml.ag" #-}- orderStates initial_ _prodsIallvisits- {-# LINE 1147 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule76 #-}- {-# LINE 443 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule76 = \ ((_prodsIallvisits) :: [VisitStateState]) ->- {-# LINE 443 "./src-ag/ExecutionPlan2Caml.ag" #-}- \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits- {-# LINE 1153 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule77 #-}- {-# LINE 444 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule77 = \ nt_ ->- {-# LINE 444 "./src-ag/ExecutionPlan2Caml.ag" #-}- type_nt_sem_top nt_- {-# LINE 1159 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule78 #-}- {-# LINE 445 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule78 = \ params_ ->- {-# LINE 445 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTypeParams (cont_tvar : map pp params_)- {-# LINE 1165 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule79 #-}- {-# LINE 448 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule79 = \ _t_params _t_type initial_ nt_ ->- {-# LINE 448 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< _t_params >#< _t_type >#< "=" >#< pp_braces ( nm_attach nt_ >#< ":" >#< "unit" >#< "->" >#< _t_params >#< type_nt_sem nt_ initial_)- {-# LINE 1171 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule80 #-}- {-# LINE 451 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule80 = \ _allstates _t_c_params _t_params nextVisits_ nt_ ->- {-# LINE 451 "./src-ag/ExecutionPlan2Caml.ag" #-}- vlist $ map (\st ->- let s_st = type_nt_state nt_ st- t_st = type_nt_sem nt_ st- c_st = type_caller nt_ st- nextVisits = Map.findWithDefault ManyVis st nextVisits_- decl = "and" >#< _t_params >#< t_st >#< "="- in case nextVisits of- NoneVis -> decl >#< "unit"- _ -> decl >#< ppRecordVal [ nm_invoke nt_ st >#< ":" >#< cont_tvar >#< "." >#< _t_c_params >#< c_st >#< "->" >#< cont_tvar ]- ) _allstates- {-# LINE 1186 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule81 #-}- {-# LINE 504 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule81 = \ _allstates ((_prodsIallvisits) :: [VisitStateState]) _t_c_params nextVisits_ nt_ ->- {-# LINE 504 "./src-ag/ExecutionPlan2Caml.ag" #-}- vlist $ map (\st ->- let nt_st = type_nt_state nt_ st- c_st = type_caller nt_ st- outg = filter (\(_,f,_) -> f == st) _prodsIallvisits- nextVisits = Map.findWithDefault ManyVis st nextVisits_- declHead = "and" >#< _t_c_params >#< c_st >#< "="- visitcons = vlist $ map (\(v,_,_) ->- "|" >#< con_visit nt_ v >#< "of" >#< _t_c_params >#< type_caller_visit nt_ v- ) outg- in case nextVisits of- NoneVis -> empty- OneVis v -> declHead >#< _t_c_params >#< type_caller_visit nt_ v- ManyVis -> declHead >-< indent 3 visitcons- ) _allstates- {-# LINE 1205 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule82 #-}- {-# LINE 586 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule82 = \ _genwrap _wr_inhs1 ->- {-# LINE 586 "./src-ag/ExecutionPlan2Caml.ag" #-}- _genwrap "inh" _wr_inhs1- {-# LINE 1211 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule83 #-}- {-# LINE 587 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule83 = \ _genwrap _wr_syns ->- {-# LINE 587 "./src-ag/ExecutionPlan2Caml.ag" #-}- _genwrap "syn" _wr_syns- {-# LINE 1217 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule84 #-}- {-# LINE 588 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule84 = \ _t_params nt_ ->- {-# LINE 588 "./src-ag/ExecutionPlan2Caml.ag" #-}- \nm attrs ->- "and" >#< _t_params >#< nm >|< "_" >|< nt_ >#< "=" >#< ppRecordTp- [ i >|< "_" >|< nm >|< "_" >|< nt_ >#< ":" >#< ppTp t | (i,t) <- attrs ]- {-# LINE 1225 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule85 #-}- {-# LINE 592 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule85 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 592 "./src-ag/ExecutionPlan2Caml.ag" #-}- fromJust $ Map.lookup nt_ _lhsIinhmap- {-# LINE 1231 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule86 #-}- {-# LINE 593 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule86 = \ _inhAttrs _wr_filter ->- {-# LINE 593 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.toList $ _wr_filter $ _inhAttrs- {-# LINE 1237 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule87 #-}- {-# LINE 594 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule87 = \ _inhAttrs ->- {-# LINE 594 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.toList _inhAttrs- {-# LINE 1243 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule88 #-}- {-# LINE 595 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule88 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 595 "./src-ag/ExecutionPlan2Caml.ag" #-}- if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions- then Map.delete idLateBindingAttr- else id- {-# LINE 1251 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule89 #-}- {-# LINE 598 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule89 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 598 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap- {-# LINE 1257 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule90 #-}- {-# LINE 600 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule90 = \ nt_ ->- {-# LINE 600 "./src-ag/ExecutionPlan2Caml.ag" #-}- text ("wrap_" ++ show nt_)- {-# LINE 1263 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule91 #-}- {-# LINE 601 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule91 = \ nt_ ->- {-# LINE 601 "./src-ag/ExecutionPlan2Caml.ag" #-}- text ("inh_" ++ show nt_)- {-# LINE 1269 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule92 #-}- {-# LINE 602 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule92 = \ nt_ ->- {-# LINE 602 "./src-ag/ExecutionPlan2Caml.ag" #-}- text ("syn_" ++ show nt_)- {-# LINE 1275 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule93 #-}- {-# LINE 603 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule93 = \ initial_ nextVisits_ ->- {-# LINE 603 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault ManyVis initial_ nextVisits_- {-# LINE 1281 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule94 #-}- {-# LINE 605 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule94 = \ _t_params _t_type ->- {-# LINE 605 "./src-ag/ExecutionPlan2Caml.ag" #-}- _t_params >#< _t_type- {-# LINE 1287 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule95 #-}- {-# LINE 606 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule95 = \ _inhname _t_params ->- {-# LINE 606 "./src-ag/ExecutionPlan2Caml.ag" #-}- _t_params >#< _inhname- {-# LINE 1293 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule96 #-}- {-# LINE 607 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule96 = \ _wr_inhs1 nt_ ->- {-# LINE 607 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppRecordVal [ i >|< "_inh_" >|< nt_ >#< "=" >#< lhsname True i | (i,_) <- _wr_inhs1 ]- {-# LINE 1299 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule97 #-}- {-# LINE 608 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule97 = \ _synname _t_params ->- {-# LINE 608 "./src-ag/ExecutionPlan2Caml.ag" #-}- _t_params >#< _synname- {-# LINE 1305 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule98 #-}- {-# LINE 609 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule98 = \ _o_sigs _wrapArgInhTp _wrapArgPats _wrapArgSemTp _wrapResTp _wrapname _wrapperPreamble ->- {-# LINE 609 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< ppFunDecl _o_sigs _wrapname [(pp "act", _wrapArgSemTp ), (_wrapArgPats , _wrapArgInhTp )] _wrapResTp _wrapperPreamble- {-# LINE 1311 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule99 #-}- {-# LINE 611 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule99 = \ ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _wrapperBody ->- {-# LINE 611 "./src-ag/ExecutionPlan2Caml.ag" #-}- ( if lateHigherOrderBinding _lhsIoptions- then "let" >#< lhsname True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName >#< "in"- else empty- )- >-< _wrapperBody- {-# LINE 1321 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule100 #-}- {-# LINE 617 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule100 = \ _firstVisitInfo _wr_inhs _wr_syns initial_ initialv_ nt_ ->- {-# LINE 617 "./src-ag/ExecutionPlan2Caml.ag" #-}- case initialv_ of- Nothing -> text "{ }"- Just initv ->- let attach = "let" >#< "sem" >#< "=" >#< "act." >|< nm_attach nt_ >#< "()" >#< "in"- pat = ppRecordVal [ nm_outarg i nt_ initv >#< "=" >#< lhsname False i | (i,_) <- _wr_syns ]- bld = ppRecordVal [ i >|< "_syn_" >|< nt_ >#< "=" >#< lhsname False i | (i,_) <- _wr_syns ]- res = "let res = function" >#< pat >#< "->" >#< bld >#< "in"- inps = "let" >#< "inps" >#< "=" >#< ppRecordVal [ nm_inarg i nt_ initv >#< "=" >#< lhsname True i | (i,_) <- _wr_inhs ] >#< "in"- arg = "let" >#< "arg" >#< "=" >#< argcon >#< argrec >#< "in"- argcon = case _firstVisitInfo of- ManyVis -> con_visit nt_ initv- _ -> empty- argrec = ppRecordVal- [ nm_inh nt_ initv >#< "=" >#< "inps"- , nm_cont nt_ initv >#< "=" >#< "res"- ]- invoke = "sem." >|< nm_invoke nt_ initial_ >#< "arg"- in attach >-< res >-< inps >-< arg >-< invoke- {-# LINE 1344 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule101 #-}- {-# LINE 646 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule101 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->- {-# LINE 646 "./src-ag/ExecutionPlan2Caml.ag" #-}- _semFunBndDef Seq.<| _prodsIsemFunBndDefs- {-# LINE 1350 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule102 #-}- {-# LINE 647 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule102 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->- {-# LINE 647 "./src-ag/ExecutionPlan2Caml.ag" #-}- _semFunBndTp Seq.<| _prodsIsemFunBndTps- {-# LINE 1356 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule103 #-}- {-# LINE 648 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule103 = \ _semFunBndNm _semname ->- {-# LINE 648 "./src-ag/ExecutionPlan2Caml.ag" #-}- _semFunBndNm >#< "=" >#< _semname- {-# LINE 1362 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule104 #-}- {-# LINE 649 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule104 = \ _semFunBndNm _sem_tp ->- {-# LINE 649 "./src-ag/ExecutionPlan2Caml.ag" #-}- _semFunBndNm >#< ":" >#< _sem_tp- {-# LINE 1368 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule105 #-}- {-# LINE 650 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule105 = \ nt_ ->- {-# LINE 650 "./src-ag/ExecutionPlan2Caml.ag" #-}- lateSemNtLabel nt_- {-# LINE 1374 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule106 #-}- {-# LINE 680 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule106 = \ initial_ ->- {-# LINE 680 "./src-ag/ExecutionPlan2Caml.ag" #-}- initial_- {-# LINE 1380 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule107 #-}- {-# LINE 681 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule107 = \ _allstates ->- {-# LINE 681 "./src-ag/ExecutionPlan2Caml.ag" #-}- _allstates- {-# LINE 1386 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule108 #-}- {-# LINE 1387 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule108 = \ nextVisits_ ->- {-# LINE 1387 "./src-ag/ExecutionPlan2Caml.ag" #-}- nextVisits_- {-# LINE 1392 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule109 #-}- {-# LINE 1388 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule109 = \ prevVisits_ ->- {-# LINE 1388 "./src-ag/ExecutionPlan2Caml.ag" #-}- prevVisits_- {-# LINE 1398 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule110 #-}- {-# LINE 1432 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule110 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->- {-# LINE 1432 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes- {-# LINE 1404 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule111 #-}- {-# LINE 1459 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule111 = \ initial_ nt_ ->- {-# LINE 1459 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton nt_ initial_- {-# LINE 1410 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule112 #-}- {-# LINE 1473 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule112 = \ nt_ params_ ->- {-# LINE 1473 "./src-ag/ExecutionPlan2Caml.ag" #-}- NT nt_ (map show params_) False- {-# LINE 1416 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule113 #-}- rule113 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _prodsIchildvisit- {-# INLINE rule114 #-}- rule114 = \ ((_prodsIerrors) :: Seq Error) ->- _prodsIerrors- {-# INLINE rule115 #-}- rule115 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _prodsIfromToStates- {-# INLINE rule116 #-}- rule116 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _prodsIvisitKinds- {-# INLINE rule117 #-}- rule117 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _prodsIvisitdefs- {-# INLINE rule118 #-}- rule118 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _prodsIvisituses- {-# INLINE rule119 #-}- rule119 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule120 #-}- rule120 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule121 #-}- rule121 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule122 #-}- rule122 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule123 #-}- rule123 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule124 #-}- rule124 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule125 #-}- rule125 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule126 #-}- rule126 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule127 #-}- rule127 = \ _ntType ->- _ntType- {-# INLINE rule128 #-}- rule128 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions---- ENonterminals -------------------------------------------------- wrapper-data Inh_ENonterminals = Inh_ENonterminals { allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminals :: (String), mainName_Inh_ENonterminals :: (String), options_Inh_ENonterminals :: (Options), synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), typeSyns_Inh_ENonterminals :: (TypeSyns), wrappers_Inh_ENonterminals :: (Set NontermIdent) }-data Syn_ENonterminals = Syn_ENonterminals { childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), code_Syn_ENonterminals :: (PP_Doc), datas_Syn_ENonterminals :: (PP_Doc), errors_Syn_ENonterminals :: (Seq Error), fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), initStates_Syn_ENonterminals :: (Map NontermIdent Int), modules_Syn_ENonterminals :: (PP_Doc), semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_ENonterminals #-}-wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> (Syn_ENonterminals )-wrap_ENonterminals (T_ENonterminals act) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers- (T_ENonterminals_vOut10 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminals_s11 sem arg)- return (Syn_ENonterminals _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# NOINLINE sem_ENonterminals #-}-sem_ENonterminals :: ENonterminals -> T_ENonterminals -sem_ENonterminals list = Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list)---- semantic domain-newtype T_ENonterminals = T_ENonterminals {- attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )- }-newtype T_ENonterminals_s11 = C_ENonterminals_s11 {- inv_ENonterminals_s11 :: (T_ENonterminals_v10 )- }-data T_ENonterminals_s12 = C_ENonterminals_s12-type T_ENonterminals_v10 = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )-data T_ENonterminals_vIn10 = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (TypeSyns) (Set NontermIdent)-data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_ENonterminals_Cons #-}-sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals -sem_ENonterminals_Cons arg_hd_ arg_tl_ = T_ENonterminals (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_ENonterminals_v10 - v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) -> ( let- _hdX8 = Control.Monad.Identity.runIdentity (attach_T_ENonterminal (arg_hd_))- _tlX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_tl_))- (T_ENonterminal_vOut7 _hdIchildvisit _hdIcode _hdIdatas _hdIerrors _hdIfromToStates _hdIinitStates _hdImodules _hdIsemFunBndDefs _hdIsemFunBndTps _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_ENonterminal_s8 _hdX8 (T_ENonterminal_vIn7 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOoptions _hdOsynmap _hdOtypeSyns _hdOwrappers)- (T_ENonterminals_vOut10 _tlIchildvisit _tlIcode _tlIdatas _tlIerrors _tlIfromToStates _tlIinitStates _tlImodules _tlIsemFunBndDefs _tlIsemFunBndTps _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_ENonterminals_s11 _tlX11 (T_ENonterminals_vIn10 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOoptions _tlOsynmap _tlOtypeSyns _tlOwrappers)- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule129 _hdIchildvisit _tlIchildvisit- _lhsOcode :: PP_Doc- _lhsOcode = rule130 _hdIcode _tlIcode- _lhsOdatas :: PP_Doc- _lhsOdatas = rule131 _hdIdatas _tlIdatas- _lhsOerrors :: Seq Error- _lhsOerrors = rule132 _hdIerrors _tlIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule133 _hdIfromToStates _tlIfromToStates- _lhsOinitStates :: Map NontermIdent Int- _lhsOinitStates = rule134 _hdIinitStates _tlIinitStates- _lhsOmodules :: PP_Doc- _lhsOmodules = rule135 _hdImodules _tlImodules- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule136 _hdIsemFunBndDefs _tlIsemFunBndDefs- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule137 _hdIsemFunBndTps _tlIsemFunBndTps- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule138 _hdIvisitKinds _tlIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule139 _hdIvisitdefs _tlIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule140 _hdIvisituses _tlIvisituses- _hdOallFromToStates = rule141 _lhsIallFromToStates- _hdOallInitStates = rule142 _lhsIallInitStates- _hdOallVisitKinds = rule143 _lhsIallVisitKinds- _hdOallchildvisit = rule144 _lhsIallchildvisit- _hdOavisitdefs = rule145 _lhsIavisitdefs- _hdOavisituses = rule146 _lhsIavisituses- _hdOinhmap = rule147 _lhsIinhmap- _hdOlocalAttrTypes = rule148 _lhsIlocalAttrTypes- _hdOmainFile = rule149 _lhsImainFile- _hdOmainName = rule150 _lhsImainName- _hdOoptions = rule151 _lhsIoptions- _hdOsynmap = rule152 _lhsIsynmap- _hdOtypeSyns = rule153 _lhsItypeSyns- _hdOwrappers = rule154 _lhsIwrappers- _tlOallFromToStates = rule155 _lhsIallFromToStates- _tlOallInitStates = rule156 _lhsIallInitStates- _tlOallVisitKinds = rule157 _lhsIallVisitKinds- _tlOallchildvisit = rule158 _lhsIallchildvisit- _tlOavisitdefs = rule159 _lhsIavisitdefs- _tlOavisituses = rule160 _lhsIavisituses- _tlOinhmap = rule161 _lhsIinhmap- _tlOlocalAttrTypes = rule162 _lhsIlocalAttrTypes- _tlOmainFile = rule163 _lhsImainFile- _tlOmainName = rule164 _lhsImainName- _tlOoptions = rule165 _lhsIoptions- _tlOsynmap = rule166 _lhsIsynmap- _tlOtypeSyns = rule167 _lhsItypeSyns- _tlOwrappers = rule168 _lhsIwrappers- __result_ = T_ENonterminals_vOut10 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_ENonterminals_s11 v10- {-# INLINE rule129 #-}- rule129 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _hdIchildvisit `Map.union` _tlIchildvisit- {-# INLINE rule130 #-}- rule130 = \ ((_hdIcode) :: PP_Doc) ((_tlIcode) :: PP_Doc) ->- _hdIcode >-< _tlIcode- {-# INLINE rule131 #-}- rule131 = \ ((_hdIdatas) :: PP_Doc) ((_tlIdatas) :: PP_Doc) ->- _hdIdatas >-< _tlIdatas- {-# INLINE rule132 #-}- rule132 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule133 #-}- rule133 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _hdIfromToStates `mappend` _tlIfromToStates- {-# INLINE rule134 #-}- rule134 = \ ((_hdIinitStates) :: Map NontermIdent Int) ((_tlIinitStates) :: Map NontermIdent Int) ->- _hdIinitStates `mappend` _tlIinitStates- {-# INLINE rule135 #-}- rule135 = \ ((_hdImodules) :: PP_Doc) ((_tlImodules) :: PP_Doc) ->- _hdImodules >-< _tlImodules- {-# INLINE rule136 #-}- rule136 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->- _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs- {-# INLINE rule137 #-}- rule137 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->- _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps- {-# INLINE rule138 #-}- rule138 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule139 #-}- rule139 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# INLINE rule140 #-}- rule140 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# INLINE rule141 #-}- rule141 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule142 #-}- rule142 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule143 #-}- rule143 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule144 #-}- rule144 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule145 #-}- rule145 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule146 #-}- rule146 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule147 #-}- rule147 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- _lhsIinhmap- {-# INLINE rule148 #-}- rule148 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- _lhsIlocalAttrTypes- {-# INLINE rule149 #-}- rule149 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule150 #-}- rule150 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule151 #-}- rule151 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule152 #-}- rule152 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- _lhsIsynmap- {-# INLINE rule153 #-}- rule153 = \ ((_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# INLINE rule154 #-}- rule154 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# INLINE rule155 #-}- rule155 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule156 #-}- rule156 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule157 #-}- rule157 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule158 #-}- rule158 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule159 #-}- rule159 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule160 #-}- rule160 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule161 #-}- rule161 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- _lhsIinhmap- {-# INLINE rule162 #-}- rule162 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- _lhsIlocalAttrTypes- {-# INLINE rule163 #-}- rule163 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule164 #-}- rule164 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule165 #-}- rule165 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule166 #-}- rule166 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- _lhsIsynmap- {-# INLINE rule167 #-}- rule167 = \ ((_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# INLINE rule168 #-}- rule168 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_ENonterminals_Nil #-}-sem_ENonterminals_Nil :: T_ENonterminals -sem_ENonterminals_Nil = T_ENonterminals (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_ENonterminals_v10 - v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) -> ( let- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule169 ()- _lhsOcode :: PP_Doc- _lhsOcode = rule170 ()- _lhsOdatas :: PP_Doc- _lhsOdatas = rule171 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule172 ()- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule173 ()- _lhsOinitStates :: Map NontermIdent Int- _lhsOinitStates = rule174 ()- _lhsOmodules :: PP_Doc- _lhsOmodules = rule175 ()- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule176 ()- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule177 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule178 ()- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule179 ()- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule180 ()- __result_ = T_ENonterminals_vOut10 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_ENonterminals_s11 v10- {-# INLINE rule169 #-}- rule169 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule170 #-}- rule170 = \ (_ :: ()) ->- empty- {-# INLINE rule171 #-}- rule171 = \ (_ :: ()) ->- empty- {-# INLINE rule172 #-}- rule172 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule173 #-}- rule173 = \ (_ :: ()) ->- mempty- {-# INLINE rule174 #-}- rule174 = \ (_ :: ()) ->- mempty- {-# INLINE rule175 #-}- rule175 = \ (_ :: ()) ->- empty- {-# INLINE rule176 #-}- rule176 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule177 #-}- rule177 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule178 #-}- rule178 = \ (_ :: ()) ->- mempty- {-# INLINE rule179 #-}- rule179 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule180 #-}- rule180 = \ (_ :: ()) ->- Map.empty---- EProduction ---------------------------------------------------- wrapper-data Inh_EProduction = Inh_EProduction { allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), allInitStates_Inh_EProduction :: (Map NontermIdent Int), allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allstates_Inh_EProduction :: ([StateIdentifier]), avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_EProduction :: (Attributes), initial_Inh_EProduction :: (StateIdentifier), localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProduction :: (String), mainName_Inh_EProduction :: (String), nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), nt_Inh_EProduction :: (NontermIdent), ntType_Inh_EProduction :: (Type), options_Inh_EProduction :: (Options), params_Inh_EProduction :: ([Identifier]), prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), rename_Inh_EProduction :: (Bool), synmap_Inh_EProduction :: (Attributes) }-data Syn_EProduction = Syn_EProduction { allvisits_Syn_EProduction :: ([VisitStateState]), childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), count_Syn_EProduction :: (Int), datatype_Syn_EProduction :: (PP_Doc), datatype_call_Syn_EProduction :: (PP_Doc), datatype_con_Syn_EProduction :: (PP_Doc), errors_Syn_EProduction :: (Seq Error), fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), semFunBndTps_Syn_EProduction :: (Seq PP_Doc), sem_nt_Syn_EProduction :: (PP_Doc), sem_prod_Syn_EProduction :: (PP_Doc), t_visits_Syn_EProduction :: (PP_Doc), visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_EProduction #-}-wrap_EProduction :: T_EProduction -> Inh_EProduction -> (Syn_EProduction )-wrap_EProduction (T_EProduction act) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap- (T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProduction_s14 sem arg)- return (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# INLINE sem_EProduction #-}-sem_EProduction :: EProduction -> T_EProduction -sem_EProduction ( EProduction con_ params_ constraints_ rules_ children_ visits_ ) = sem_EProduction_EProduction con_ params_ constraints_ ( sem_ERules rules_ ) ( sem_EChildren children_ ) ( sem_Visits visits_ )---- semantic domain-newtype T_EProduction = T_EProduction {- attach_T_EProduction :: Identity (T_EProduction_s14 )- }-newtype T_EProduction_s14 = C_EProduction_s14 {- inv_EProduction_s14 :: (T_EProduction_v13 )- }-data T_EProduction_s15 = C_EProduction_s15-type T_EProduction_v13 = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )-data T_EProduction_vIn13 = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ([StateIdentifier]) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes)-data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Int) (PP_Doc) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_EProduction_EProduction #-}-sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules -> T_EChildren -> T_Visits -> T_EProduction -sem_EProduction_EProduction arg_con_ arg_params_ _ arg_rules_ arg_children_ arg_visits_ = T_EProduction (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_EProduction_v13 - v13 = \ (T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) -> ( let- _rulesX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_rules_))- _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_children_))- _visitsX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_visits_))- (T_ERules_vOut22 _rulesIerrors _rulesImrules _rulesIruledefs _rulesIruleuses _rulesIsem_rules) = inv_ERules_s23 _rulesX23 (T_ERules_vIn22 _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOnt _rulesOoptions _rulesOruleKinds _rulesOsynmap _rulesOusageInfo)- (T_EChildren_vOut4 _childrenIargnamesw _childrenIchildTypes _childrenIchildintros _childrenIsigs _childrenIterminaldefs) = inv_EChildren_s5 _childrenX5 (T_EChildren_vIn4 _childrenOallInitStates _childrenOcon _childrenOmainFile _childrenOmainName _childrenOnt _childrenOoptions)- (T_Visits_vOut55 _visitsIallvisits _visitsIchildvisit _visitsIerrors _visitsIfromToStates _visitsIintramap _visitsIlazyIntras _visitsIruleKinds _visitsIruleUsage _visitsIsem_visit _visitsIt_visits _visitsIvisitKinds _visitsIvisitdefs _visitsIvisituses) = inv_Visits_s56 _visitsX56 (T_Visits_vIn55 _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs)- _childrenOcon = rule181 arg_con_- _rulesOcon = rule182 arg_con_- _visitsOcon = rule183 arg_con_- _o_records = rule184 _lhsIoptions- _t_params = rule185 _lhsIparams- _t_c_params = rule186 arg_params_- _conname = rule187 _lhsInt _lhsIrename arg_con_- _recname = rule188 _conname- _lhsOdatatype :: PP_Doc- _lhsOdatatype = rule189 _childrenIsigs _o_records _recname _t_params- _lhsOdatatype_call :: PP_Doc- _lhsOdatatype_call = rule190 _conname _recname _t_params- _lhsOdatatype_con :: PP_Doc- _lhsOdatatype_con = rule191 _childrenIsigs _conname _lhsInt _o_records _o_sigs _t_params arg_con_- _lhsOcount :: Int- _lhsOcount = rule192 ()- _lhsOsem_nt :: PP_Doc- _lhsOsem_nt = rule193 _childrenIargnamesw _childrenIsigs _lhsInt _lhsIoptions _lhsIrename _o_records arg_con_- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule194 _semFunBndDef- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule195 _semFunBndTp- _semFunBndDef = rule196 _semFunBndNm _semname- _semFunBndTp = rule197 _semFunBndNm _sem_tp- _semFunBndNm = rule198 _lhsInt arg_con_- _o_sigs = rule199 _lhsIoptions- _t_type = rule200 _lhsInt- _semname = rule201 _lhsInt _lhsIoptions arg_con_- _sem_res_tp = rule202 _t_params _t_type- _sem_tp = rule203 _childrenIsigs _sem_res_tp- _initializer = rule204 ()- _sem_prod = rule205 _childrenIsigs _o_sigs _prod_body _sem_res_tp _semname- _prod_body = rule206 _initializer _lhsIinitial _lhsInt _rulesIsem_rules _statefuns arg_con_- _statefuns = rule207 _genstfn _lhsIallstates- _genstfn = rule208 _lhsIinitial _lhsInextVisits _lhsInt _stargs _stks _stvs- _stargs = rule209 _childTypes _lhsIallInhmap _lhsIallSynmap _lhsIoptions _localAttrTypes _visitsIintramap- _stvisits = rule210 _visitsIallvisits- _stks = rule211 _lhsInextVisits _lhsInt _stvisits _t_c_params arg_con_- _stvs = rule212 _visitsIsem_visit- _visitsOmrules = rule213 _rulesImrules- _visitsOchildintros = rule214 _childrenIchildintros- _rulesOusageInfo = rule215 _visitsIruleUsage- _rulesOruleKinds = rule216 _visitsIruleKinds- _visitsOallintramap = rule217 _visitsIintramap- _visitsOterminaldefs = rule218 _childrenIterminaldefs- _visitsOruledefs = rule219 _rulesIruledefs- _visitsOruleuses = rule220 _rulesIruleuses- _lazyIntras = rule221 _visitsIlazyIntras- _childTypes = rule222 _childrenIchildTypes _lhsIntType- _localAttrTypes = rule223 _lhsIlocalAttrTypes arg_con_- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule224 _visitsIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule225 _rulesIerrors _visitsIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule226 _visitsIfromToStates- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule227 _visitsIt_visits- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule228 _visitsIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule229 _visitsIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule230 _visitsIvisituses- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule231 _visitsIallvisits- _lhsOsem_prod :: PP_Doc- _lhsOsem_prod = rule232 _sem_prod- _rulesOallInhmap = rule233 _lhsIallInhmap- _rulesOallSynmap = rule234 _lhsIallSynmap- _rulesOchildTypes = rule235 _childTypes- _rulesOinhmap = rule236 _lhsIinhmap- _rulesOlazyIntras = rule237 _lazyIntras- _rulesOlocalAttrTypes = rule238 _localAttrTypes- _rulesOmainFile = rule239 _lhsImainFile- _rulesOmainName = rule240 _lhsImainName- _rulesOnt = rule241 _lhsInt- _rulesOoptions = rule242 _lhsIoptions- _rulesOsynmap = rule243 _lhsIsynmap- _childrenOallInitStates = rule244 _lhsIallInitStates- _childrenOmainFile = rule245 _lhsImainFile- _childrenOmainName = rule246 _lhsImainName- _childrenOnt = rule247 _lhsInt- _childrenOoptions = rule248 _lhsIoptions- _visitsOallFromToStates = rule249 _lhsIallFromToStates- _visitsOallInhmap = rule250 _lhsIallInhmap- _visitsOallInitStates = rule251 _lhsIallInitStates- _visitsOallSynmap = rule252 _lhsIallSynmap- _visitsOallVisitKinds = rule253 _lhsIallVisitKinds- _visitsOallchildvisit = rule254 _lhsIallchildvisit- _visitsOavisitdefs = rule255 _lhsIavisitdefs- _visitsOavisituses = rule256 _lhsIavisituses- _visitsOchildTypes = rule257 _childTypes- _visitsOinhmap = rule258 _lhsIinhmap- _visitsOnextVisits = rule259 _lhsInextVisits- _visitsOnt = rule260 _lhsInt- _visitsOoptions = rule261 _lhsIoptions- _visitsOparams = rule262 _lhsIparams- _visitsOprevVisits = rule263 _lhsIprevVisits- _visitsOsynmap = rule264 _lhsIsynmap- __result_ = T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_EProduction_s14 v13- {-# INLINE rule181 #-}- {-# LINE 88 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule181 = \ con_ ->- {-# LINE 88 "./src-ag/ExecutionPlan2Caml.ag" #-}- con_- {-# LINE 1904 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule182 #-}- {-# LINE 89 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule182 = \ con_ ->- {-# LINE 89 "./src-ag/ExecutionPlan2Caml.ag" #-}- con_- {-# LINE 1910 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule183 #-}- {-# LINE 90 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule183 = \ con_ ->- {-# LINE 90 "./src-ag/ExecutionPlan2Caml.ag" #-}- con_- {-# LINE 1916 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule184 #-}- {-# LINE 257 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule184 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 257 "./src-ag/ExecutionPlan2Caml.ag" #-}- dataRecords _lhsIoptions- {-# LINE 1922 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule185 #-}- {-# LINE 258 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule185 = \ ((_lhsIparams) :: [Identifier]) ->- {-# LINE 258 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTypeParams _lhsIparams- {-# LINE 1928 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule186 #-}- {-# LINE 259 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule186 = \ params_ ->- {-# LINE 259 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTypeParams (cont_tvar : map pp params_)- {-# LINE 1934 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule187 #-}- {-# LINE 260 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule187 = \ ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->- {-# LINE 260 "./src-ag/ExecutionPlan2Caml.ag" #-}- conname _lhsIrename _lhsInt con_- {-# LINE 1940 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule188 #-}- {-# LINE 261 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule188 = \ _conname ->- {-# LINE 261 "./src-ag/ExecutionPlan2Caml.ag" #-}- pp "fields_" >|< _conname- {-# LINE 1946 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule189 #-}- {-# LINE 262 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule189 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _o_records _recname _t_params ->- {-# LINE 262 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< _t_params >#< _recname >#< "="- >#< ppFieldsType _o_records False _childrenIsigs- {-# LINE 1953 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule190 #-}- {-# LINE 264 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule190 = \ _conname _recname _t_params ->- {-# LINE 264 "./src-ag/ExecutionPlan2Caml.ag" #-}- pp "|" >#< _conname >#< "of" >#< pp_parens (_t_params >#< _recname )- {-# LINE 1959 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule191 #-}- {-# LINE 266 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule191 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _conname ((_lhsInt) :: NontermIdent) _o_records _o_sigs _t_params con_ ->- {-# LINE 266 "./src-ag/ExecutionPlan2Caml.ag" #-}- let funNm = _lhsInt >|< "_" >|< con_- decl = "and" >#< ppFunDecl _o_sigs funNm params (_t_params >#< _lhsInt) body- params = [ (x, t) | (_,x,_,t) <- _childrenIsigs ]- body = _conname >#< ppFieldsVal _o_records _childrenIsigs- in decl- {-# LINE 1969 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule192 #-}- {-# LINE 382 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule192 = \ (_ :: ()) ->- {-# LINE 382 "./src-ag/ExecutionPlan2Caml.ag" #-}- 1- {-# LINE 1975 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule193 #-}- {-# LINE 387 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule193 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _o_records con_ ->- {-# LINE 387 "./src-ag/ExecutionPlan2Caml.ag" #-}- "|" >#< conname _lhsIrename _lhsInt con_ >#< ppFieldsVal _o_records _childrenIsigs >#< "->" >#<- prefix _lhsIoptions >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw- {-# LINE 1982 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule194 #-}- {-# LINE 653 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule194 = \ _semFunBndDef ->- {-# LINE 653 "./src-ag/ExecutionPlan2Caml.ag" #-}- Seq.singleton _semFunBndDef- {-# LINE 1988 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule195 #-}- {-# LINE 654 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule195 = \ _semFunBndTp ->- {-# LINE 654 "./src-ag/ExecutionPlan2Caml.ag" #-}- Seq.singleton _semFunBndTp- {-# LINE 1994 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule196 #-}- {-# LINE 655 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule196 = \ _semFunBndNm _semname ->- {-# LINE 655 "./src-ag/ExecutionPlan2Caml.ag" #-}- _semFunBndNm >#< "=" >#< _semname- {-# LINE 2000 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule197 #-}- {-# LINE 656 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule197 = \ _semFunBndNm _sem_tp ->- {-# LINE 656 "./src-ag/ExecutionPlan2Caml.ag" #-}- _semFunBndNm >#< ":" >#< _sem_tp- {-# LINE 2006 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule198 #-}- {-# LINE 657 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule198 = \ ((_lhsInt) :: NontermIdent) con_ ->- {-# LINE 657 "./src-ag/ExecutionPlan2Caml.ag" #-}- lateSemConLabel _lhsInt con_- {-# LINE 2012 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule199 #-}- {-# LINE 684 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule199 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 684 "./src-ag/ExecutionPlan2Caml.ag" #-}- typeSigs _lhsIoptions- {-# LINE 2018 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule200 #-}- {-# LINE 685 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule200 = \ ((_lhsInt) :: NontermIdent) ->- {-# LINE 685 "./src-ag/ExecutionPlan2Caml.ag" #-}- type_nt_sem_top _lhsInt- {-# LINE 2024 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule201 #-}- {-# LINE 686 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule201 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) con_ ->- {-# LINE 686 "./src-ag/ExecutionPlan2Caml.ag" #-}- prefix _lhsIoptions >|< _lhsInt >|< "_" >|< con_- {-# LINE 2030 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule202 #-}- {-# LINE 687 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule202 = \ _t_params _t_type ->- {-# LINE 687 "./src-ag/ExecutionPlan2Caml.ag" #-}- _t_params >#< _t_type- {-# LINE 2036 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule203 #-}- {-# LINE 688 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule203 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _sem_res_tp ->- {-# LINE 688 "./src-ag/ExecutionPlan2Caml.ag" #-}- pp_block "" "" "->" [ d | (_,_,d,_) <- _childrenIsigs ] >#< "->" >#< _sem_res_tp- {-# LINE 2042 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule204 #-}- {-# LINE 691 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule204 = \ (_ :: ()) ->- {-# LINE 691 "./src-ag/ExecutionPlan2Caml.ag" #-}- empty- {-# LINE 2048 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule205 #-}- {-# LINE 697 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule205 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _o_sigs _prod_body _sem_res_tp _semname ->- {-# LINE 697 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< ppFunDecl _o_sigs _semname [ (x,d) | (_,x,d,_) <- _childrenIsigs ] _sem_res_tp _prod_body- {-# LINE 2054 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule206 #-}- {-# LINE 699 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule206 = \ _initializer ((_lhsIinitial) :: StateIdentifier) ((_lhsInt) :: NontermIdent) ((_rulesIsem_rules) :: PP_Doc) _statefuns con_ ->- {-# LINE 699 "./src-ag/ExecutionPlan2Caml.ag" #-}- _initializer- >-< "{" >#< nm_attach _lhsInt >#< "=" >#< "function () ->"- >-< indent 2- ( "(* rules of production" >#< con_ >#< "*)"- >-< _rulesIsem_rules- >-< "(* states of production" >#< con_ >#< "*)"- >-< vlist _statefuns- >-< nm_st _lhsIinitial- )- >#< "}"- {-# LINE 2069 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule207 #-}- {-# LINE 715 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule207 = \ _genstfn ((_lhsIallstates) :: [StateIdentifier]) ->- {-# LINE 715 "./src-ag/ExecutionPlan2Caml.ag" #-}- map _genstfn _lhsIallstates- {-# LINE 2075 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule208 #-}- {-# LINE 717 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule208 = \ ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) _stargs _stks _stvs ->- {-# LINE 717 "./src-ag/ExecutionPlan2Caml.ag" #-}- \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits- stNm = nm_st st- stDef body = "let" >#< stNm >#< (if st == _lhsIinitial then empty else _stargs st) >#< "="- >-< indent 2 body >#< "in"- in case nextVisitInfo of- NoneVis ->- if st == _lhsIinitial- then stDef (pp "unit")- else empty- _ -> stDef $ mklets (_stvs st ++ _stks st) $ ppRecordVal- [ nm_invoke _lhsInt st >#< "=" >#< nm_k st ]- {-# LINE 2091 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule209 #-}- {-# LINE 737 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule209 = \ _childTypes ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- {-# LINE 737 "./src-ag/ExecutionPlan2Caml.ag" #-}- \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap in ppSpaced- [ case mbAttr of- Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->- case Map.lookup nm _localAttrTypes of- Just tp -> pp_parens (strNm >#< ":" >#< ppTp tp)- Nothing -> pp strNm- Just attr | not (noPerStateTypeSigs _lhsIoptions) ->- case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of- Just tpDoc -> pp_parens (strNm >#< ":" >#< tpDoc)- Nothing -> pp strNm- _ -> pp strNm- | (strNm, mbAttr) <- Map.assocs attrs- ] >#< dummyPat _lhsIoptions (Map.null attrs)- {-# LINE 2109 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule210 #-}- {-# LINE 752 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule210 = \ ((_visitsIallvisits) :: [VisitStateState]) ->- {-# LINE 752 "./src-ag/ExecutionPlan2Caml.ag" #-}- \st -> filter (\(_,f,_) -> f == st) _visitsIallvisits- {-# LINE 2115 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule211 #-}- {-# LINE 754 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule211 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) _stvisits _t_c_params con_ ->- {-# LINE 754 "./src-ag/ExecutionPlan2Caml.ag" #-}- \st -> let stvisits = _stvisits st- def = ppFunDecl False (pp $ nm_k st)- [(pp "arg", _t_c_params >#< type_caller _lhsInt st)] (pp cont_tvar) body- nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits- body = case nextVisitInfo of- NoneVis -> text "?no next visit?"- OneVis v -> dispatch "arg" v- ManyVis -> let alt (v,_,_) = "|" >#< con_visit _lhsInt v >#< "chosen" >#< "->" >-< indent 2 (dispatch "chosen" v)- in "match arg with" >-< (indent 2 $ vlist $ map alt stvisits)- dispatch nm v = "let" >#< ppRecordVal- [ nm_inh _lhsInt v >#< "=" >#< "inp"- , nm_cont _lhsInt v >#< "=" >#< "cont" ]- >#< "=" >#< pp nm- >-< "in" >#< "cont" >#< pp_parens (nm_visit v >#< "inp")- in if null stvisits- then []- else [ "(* k-function for production" >#< con_ >#< " *)" >-< def ]- {-# LINE 2137 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule212 #-}- {-# LINE 775 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule212 = \ ((_visitsIsem_visit) :: [(StateIdentifier,PP_Doc)] ) ->- {-# LINE 775 "./src-ag/ExecutionPlan2Caml.ag" #-}- \st -> [ppf | (f,ppf) <- _visitsIsem_visit, f == st]- {-# LINE 2143 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule213 #-}- {-# LINE 776 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule213 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- {-# LINE 776 "./src-ag/ExecutionPlan2Caml.ag" #-}- _rulesImrules- {-# LINE 2149 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule214 #-}- {-# LINE 917 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule214 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- {-# LINE 917 "./src-ag/ExecutionPlan2Caml.ag" #-}- _childrenIchildintros- {-# LINE 2155 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule215 #-}- {-# LINE 1222 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule215 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->- {-# LINE 1222 "./src-ag/ExecutionPlan2Caml.ag" #-}- _visitsIruleUsage- {-# LINE 2161 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule216 #-}- {-# LINE 1237 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule216 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->- {-# LINE 1237 "./src-ag/ExecutionPlan2Caml.ag" #-}- _visitsIruleKinds- {-# LINE 2167 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule217 #-}- {-# LINE 1266 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule217 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- {-# LINE 1266 "./src-ag/ExecutionPlan2Caml.ag" #-}- _visitsIintramap- {-# LINE 2173 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule218 #-}- {-# LINE 1267 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule218 = \ ((_childrenIterminaldefs) :: Set String) ->- {-# LINE 1267 "./src-ag/ExecutionPlan2Caml.ag" #-}- _childrenIterminaldefs- {-# LINE 2179 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule219 #-}- {-# LINE 1291 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule219 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->- {-# LINE 1291 "./src-ag/ExecutionPlan2Caml.ag" #-}- _rulesIruledefs- {-# LINE 2185 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule220 #-}- {-# LINE 1292 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule220 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- {-# LINE 1292 "./src-ag/ExecutionPlan2Caml.ag" #-}- _rulesIruleuses- {-# LINE 2191 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule221 #-}- {-# LINE 1346 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule221 = \ ((_visitsIlazyIntras) :: Set String) ->- {-# LINE 1346 "./src-ag/ExecutionPlan2Caml.ag" #-}- _visitsIlazyIntras- {-# LINE 2197 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule222 #-}- {-# LINE 1418 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule222 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->- {-# LINE 1418 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes- {-# LINE 2203 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule223 #-}- {-# LINE 1435 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule223 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->- {-# LINE 1435 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes- {-# LINE 2209 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule224 #-}- rule224 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _visitsIchildvisit- {-# INLINE rule225 #-}- rule225 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->- _rulesIerrors Seq.>< _visitsIerrors- {-# INLINE rule226 #-}- rule226 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _visitsIfromToStates- {-# INLINE rule227 #-}- rule227 = \ ((_visitsIt_visits) :: PP_Doc) ->- _visitsIt_visits- {-# INLINE rule228 #-}- rule228 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _visitsIvisitKinds- {-# INLINE rule229 #-}- rule229 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _visitsIvisitdefs- {-# INLINE rule230 #-}- rule230 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _visitsIvisituses- {-# INLINE rule231 #-}- rule231 = \ ((_visitsIallvisits) :: [VisitStateState]) ->- _visitsIallvisits- {-# INLINE rule232 #-}- rule232 = \ _sem_prod ->- _sem_prod- {-# INLINE rule233 #-}- rule233 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule234 #-}- rule234 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule235 #-}- rule235 = \ _childTypes ->- _childTypes- {-# INLINE rule236 #-}- rule236 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule237 #-}- rule237 = \ _lazyIntras ->- _lazyIntras- {-# INLINE rule238 #-}- rule238 = \ _localAttrTypes ->- _localAttrTypes- {-# INLINE rule239 #-}- rule239 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule240 #-}- rule240 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule241 #-}- rule241 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule242 #-}- rule242 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule243 #-}- rule243 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule244 #-}- rule244 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule245 #-}- rule245 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule246 #-}- rule246 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule247 #-}- rule247 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule248 #-}- rule248 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule249 #-}- rule249 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule250 #-}- rule250 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule251 #-}- rule251 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule252 #-}- rule252 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule253 #-}- rule253 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule254 #-}- rule254 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule255 #-}- rule255 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule256 #-}- rule256 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule257 #-}- rule257 = \ _childTypes ->- _childTypes- {-# INLINE rule258 #-}- rule258 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule259 #-}- rule259 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule260 #-}- rule260 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule261 #-}- rule261 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule262 #-}- rule262 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule263 #-}- rule263 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule264 #-}- rule264 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap---- EProductions --------------------------------------------------- wrapper-data Inh_EProductions = Inh_EProductions { allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), allInitStates_Inh_EProductions :: (Map NontermIdent Int), allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allstates_Inh_EProductions :: ([StateIdentifier]), avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_EProductions :: (Attributes), initial_Inh_EProductions :: (StateIdentifier), localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProductions :: (String), mainName_Inh_EProductions :: (String), nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), nt_Inh_EProductions :: (NontermIdent), ntType_Inh_EProductions :: (Type), options_Inh_EProductions :: (Options), params_Inh_EProductions :: ([Identifier]), prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), rename_Inh_EProductions :: (Bool), synmap_Inh_EProductions :: (Attributes) }-data Syn_EProductions = Syn_EProductions { allvisits_Syn_EProductions :: ([VisitStateState]), childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), count_Syn_EProductions :: (Int), datatype_Syn_EProductions :: ([PP_Doc]), datatype_call_Syn_EProductions :: ([PP_Doc]), datatype_con_Syn_EProductions :: ([PP_Doc]), errors_Syn_EProductions :: (Seq Error), fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), semFunBndTps_Syn_EProductions :: (Seq PP_Doc), sem_nt_Syn_EProductions :: (PP_Doc), sem_prod_Syn_EProductions :: (PP_Doc), t_visits_Syn_EProductions :: (PP_Doc), visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_EProductions #-}-wrap_EProductions :: T_EProductions -> Inh_EProductions -> (Syn_EProductions )-wrap_EProductions (T_EProductions act) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap- (T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProductions_s17 sem arg)- return (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# NOINLINE sem_EProductions #-}-sem_EProductions :: EProductions -> T_EProductions -sem_EProductions list = Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list)---- semantic domain-newtype T_EProductions = T_EProductions {- attach_T_EProductions :: Identity (T_EProductions_s17 )- }-newtype T_EProductions_s17 = C_EProductions_s17 {- inv_EProductions_s17 :: (T_EProductions_v16 )- }-data T_EProductions_s18 = C_EProductions_s18-type T_EProductions_v16 = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )-data T_EProductions_vIn16 = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ([StateIdentifier]) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes)-data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Int) ([PP_Doc]) ([PP_Doc]) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_EProductions_Cons #-}-sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions -sem_EProductions_Cons arg_hd_ arg_tl_ = T_EProductions (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_EProductions_v16 - v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) -> ( let- _hdX14 = Control.Monad.Identity.runIdentity (attach_T_EProduction (arg_hd_))- _tlX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_tl_))- (T_EProduction_vOut13 _hdIallvisits _hdIchildvisit _hdIcount _hdIdatatype _hdIdatatype_call _hdIdatatype_con _hdIerrors _hdIfromToStates _hdIsemFunBndDefs _hdIsemFunBndTps _hdIsem_nt _hdIsem_prod _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_EProduction_s14 _hdX14 (T_EProduction_vIn13 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOprevVisits _hdOrename _hdOsynmap)- (T_EProductions_vOut16 _tlIallvisits _tlIchildvisit _tlIcount _tlIdatatype _tlIdatatype_call _tlIdatatype_con _tlIerrors _tlIfromToStates _tlIsemFunBndDefs _tlIsemFunBndTps _tlIsem_nt _tlIsem_prod _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_EProductions_s17 _tlX17 (T_EProductions_vIn16 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOprevVisits _tlOrename _tlOsynmap)- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule265 _hdIallvisits- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule266 _hdIt_visits- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule267 _hdIchildvisit _tlIchildvisit- _lhsOcount :: Int- _lhsOcount = rule268 _hdIcount _tlIcount- _lhsOdatatype :: [PP_Doc]- _lhsOdatatype = rule269 _hdIdatatype _tlIdatatype- _lhsOdatatype_call :: [PP_Doc]- _lhsOdatatype_call = rule270 _hdIdatatype_call _tlIdatatype_call- _lhsOdatatype_con :: [PP_Doc]- _lhsOdatatype_con = rule271 _hdIdatatype_con _tlIdatatype_con- _lhsOerrors :: Seq Error- _lhsOerrors = rule272 _hdIerrors _tlIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule273 _hdIfromToStates _tlIfromToStates- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule274 _hdIsemFunBndDefs _tlIsemFunBndDefs- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule275 _hdIsemFunBndTps _tlIsemFunBndTps- _lhsOsem_nt :: PP_Doc- _lhsOsem_nt = rule276 _hdIsem_nt _tlIsem_nt- _lhsOsem_prod :: PP_Doc- _lhsOsem_prod = rule277 _hdIsem_prod _tlIsem_prod- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule278 _hdIvisitKinds _tlIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule279 _hdIvisitdefs _tlIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule280 _hdIvisituses _tlIvisituses- _hdOallFromToStates = rule281 _lhsIallFromToStates- _hdOallInhmap = rule282 _lhsIallInhmap- _hdOallInitStates = rule283 _lhsIallInitStates- _hdOallSynmap = rule284 _lhsIallSynmap- _hdOallVisitKinds = rule285 _lhsIallVisitKinds- _hdOallchildvisit = rule286 _lhsIallchildvisit- _hdOallstates = rule287 _lhsIallstates- _hdOavisitdefs = rule288 _lhsIavisitdefs- _hdOavisituses = rule289 _lhsIavisituses- _hdOinhmap = rule290 _lhsIinhmap- _hdOinitial = rule291 _lhsIinitial- _hdOlocalAttrTypes = rule292 _lhsIlocalAttrTypes- _hdOmainFile = rule293 _lhsImainFile- _hdOmainName = rule294 _lhsImainName- _hdOnextVisits = rule295 _lhsInextVisits- _hdOnt = rule296 _lhsInt- _hdOntType = rule297 _lhsIntType- _hdOoptions = rule298 _lhsIoptions- _hdOparams = rule299 _lhsIparams- _hdOprevVisits = rule300 _lhsIprevVisits- _hdOrename = rule301 _lhsIrename- _hdOsynmap = rule302 _lhsIsynmap- _tlOallFromToStates = rule303 _lhsIallFromToStates- _tlOallInhmap = rule304 _lhsIallInhmap- _tlOallInitStates = rule305 _lhsIallInitStates- _tlOallSynmap = rule306 _lhsIallSynmap- _tlOallVisitKinds = rule307 _lhsIallVisitKinds- _tlOallchildvisit = rule308 _lhsIallchildvisit- _tlOallstates = rule309 _lhsIallstates- _tlOavisitdefs = rule310 _lhsIavisitdefs- _tlOavisituses = rule311 _lhsIavisituses- _tlOinhmap = rule312 _lhsIinhmap- _tlOinitial = rule313 _lhsIinitial- _tlOlocalAttrTypes = rule314 _lhsIlocalAttrTypes- _tlOmainFile = rule315 _lhsImainFile- _tlOmainName = rule316 _lhsImainName- _tlOnextVisits = rule317 _lhsInextVisits- _tlOnt = rule318 _lhsInt- _tlOntType = rule319 _lhsIntType- _tlOoptions = rule320 _lhsIoptions- _tlOparams = rule321 _lhsIparams- _tlOprevVisits = rule322 _lhsIprevVisits- _tlOrename = rule323 _lhsIrename- _tlOsynmap = rule324 _lhsIsynmap- __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_EProductions_s17 v16- {-# INLINE rule265 #-}- {-# LINE 437 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule265 = \ ((_hdIallvisits) :: [VisitStateState]) ->- {-# LINE 437 "./src-ag/ExecutionPlan2Caml.ag" #-}- _hdIallvisits- {-# LINE 2459 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule266 #-}- {-# LINE 532 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule266 = \ ((_hdIt_visits) :: PP_Doc) ->- {-# LINE 532 "./src-ag/ExecutionPlan2Caml.ag" #-}- _hdIt_visits- {-# LINE 2465 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule267 #-}- rule267 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _hdIchildvisit `Map.union` _tlIchildvisit- {-# INLINE rule268 #-}- rule268 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->- _hdIcount + _tlIcount- {-# INLINE rule269 #-}- rule269 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->- _hdIdatatype : _tlIdatatype- {-# INLINE rule270 #-}- rule270 = \ ((_hdIdatatype_call) :: PP_Doc) ((_tlIdatatype_call) :: [PP_Doc]) ->- _hdIdatatype_call : _tlIdatatype_call- {-# INLINE rule271 #-}- rule271 = \ ((_hdIdatatype_con) :: PP_Doc) ((_tlIdatatype_con) :: [PP_Doc]) ->- _hdIdatatype_con : _tlIdatatype_con- {-# INLINE rule272 #-}- rule272 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule273 #-}- rule273 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _hdIfromToStates `mappend` _tlIfromToStates- {-# INLINE rule274 #-}- rule274 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->- _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs- {-# INLINE rule275 #-}- rule275 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->- _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps- {-# INLINE rule276 #-}- rule276 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->- _hdIsem_nt >-< _tlIsem_nt- {-# INLINE rule277 #-}- rule277 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->- _hdIsem_prod >-< _tlIsem_prod- {-# INLINE rule278 #-}- rule278 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule279 #-}- rule279 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# INLINE rule280 #-}- rule280 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# INLINE rule281 #-}- rule281 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule282 #-}- rule282 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule283 #-}- rule283 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule284 #-}- rule284 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule285 #-}- rule285 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule286 #-}- rule286 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule287 #-}- rule287 = \ ((_lhsIallstates) :: [StateIdentifier]) ->- _lhsIallstates- {-# INLINE rule288 #-}- rule288 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule289 #-}- rule289 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule290 #-}- rule290 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule291 #-}- rule291 = \ ((_lhsIinitial) :: StateIdentifier) ->- _lhsIinitial- {-# INLINE rule292 #-}- rule292 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->- _lhsIlocalAttrTypes- {-# INLINE rule293 #-}- rule293 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule294 #-}- rule294 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule295 #-}- rule295 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule296 #-}- rule296 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule297 #-}- rule297 = \ ((_lhsIntType) :: Type) ->- _lhsIntType- {-# INLINE rule298 #-}- rule298 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule299 #-}- rule299 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule300 #-}- rule300 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule301 #-}- rule301 = \ ((_lhsIrename) :: Bool) ->- _lhsIrename- {-# INLINE rule302 #-}- rule302 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule303 #-}- rule303 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule304 #-}- rule304 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule305 #-}- rule305 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule306 #-}- rule306 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule307 #-}- rule307 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule308 #-}- rule308 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule309 #-}- rule309 = \ ((_lhsIallstates) :: [StateIdentifier]) ->- _lhsIallstates- {-# INLINE rule310 #-}- rule310 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule311 #-}- rule311 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule312 #-}- rule312 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule313 #-}- rule313 = \ ((_lhsIinitial) :: StateIdentifier) ->- _lhsIinitial- {-# INLINE rule314 #-}- rule314 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->- _lhsIlocalAttrTypes- {-# INLINE rule315 #-}- rule315 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule316 #-}- rule316 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule317 #-}- rule317 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule318 #-}- rule318 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule319 #-}- rule319 = \ ((_lhsIntType) :: Type) ->- _lhsIntType- {-# INLINE rule320 #-}- rule320 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule321 #-}- rule321 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule322 #-}- rule322 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule323 #-}- rule323 = \ ((_lhsIrename) :: Bool) ->- _lhsIrename- {-# INLINE rule324 #-}- rule324 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_EProductions_Nil #-}-sem_EProductions_Nil :: T_EProductions -sem_EProductions_Nil = T_EProductions (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_EProductions_v16 - v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) -> ( let- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule325 ()- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule326 ()- _lhsOcount :: Int- _lhsOcount = rule327 ()- _lhsOdatatype :: [PP_Doc]- _lhsOdatatype = rule328 ()- _lhsOdatatype_call :: [PP_Doc]- _lhsOdatatype_call = rule329 ()- _lhsOdatatype_con :: [PP_Doc]- _lhsOdatatype_con = rule330 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule331 ()- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule332 ()- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule333 ()- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule334 ()- _lhsOsem_nt :: PP_Doc- _lhsOsem_nt = rule335 ()- _lhsOsem_prod :: PP_Doc- _lhsOsem_prod = rule336 ()- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule337 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule338 ()- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule339 ()- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule340 ()- __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_EProductions_s17 v16- {-# INLINE rule325 #-}- {-# LINE 438 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule325 = \ (_ :: ()) ->- {-# LINE 438 "./src-ag/ExecutionPlan2Caml.ag" #-}- error "Every nonterminal should have at least 1 production"- {-# LINE 2687 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule326 #-}- rule326 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule327 #-}- rule327 = \ (_ :: ()) ->- 0- {-# INLINE rule328 #-}- rule328 = \ (_ :: ()) ->- []- {-# INLINE rule329 #-}- rule329 = \ (_ :: ()) ->- []- {-# INLINE rule330 #-}- rule330 = \ (_ :: ()) ->- []- {-# INLINE rule331 #-}- rule331 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule332 #-}- rule332 = \ (_ :: ()) ->- mempty- {-# INLINE rule333 #-}- rule333 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule334 #-}- rule334 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule335 #-}- rule335 = \ (_ :: ()) ->- empty- {-# INLINE rule336 #-}- rule336 = \ (_ :: ()) ->- empty- {-# INLINE rule337 #-}- rule337 = \ (_ :: ()) ->- empty- {-# INLINE rule338 #-}- rule338 = \ (_ :: ()) ->- mempty- {-# INLINE rule339 #-}- rule339 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule340 #-}- rule340 = \ (_ :: ()) ->- Map.empty---- ERule ---------------------------------------------------------- wrapper-data Inh_ERule = Inh_ERule { allInhmap_Inh_ERule :: (Map NontermIdent Attributes), allSynmap_Inh_ERule :: (Map NontermIdent Attributes), childTypes_Inh_ERule :: (Map Identifier Type), con_Inh_ERule :: (ConstructorIdent), inhmap_Inh_ERule :: (Attributes), lazyIntras_Inh_ERule :: (Set String), localAttrTypes_Inh_ERule :: (Map Identifier Type), mainFile_Inh_ERule :: (String), mainName_Inh_ERule :: (String), nt_Inh_ERule :: (NontermIdent), options_Inh_ERule :: (Options), ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), synmap_Inh_ERule :: (Attributes), usageInfo_Inh_ERule :: (Map Identifier Int) }-data Syn_ERule = Syn_ERule { errors_Syn_ERule :: (Seq Error), mrules_Syn_ERule :: (Map Identifier (VisitKind -> Either Error PP_Doc)), ruledefs_Syn_ERule :: (Map Identifier (Set String)), ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERule :: (PP_Doc) }-{-# INLINABLE wrap_ERule #-}-wrap_ERule :: T_ERule -> Inh_ERule -> (Syn_ERule )-wrap_ERule (T_ERule act) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo- (T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules) <- return (inv_ERule_s20 sem arg)- return (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules)- )---- cata-{-# INLINE sem_ERule #-}-sem_ERule :: ERule -> T_ERule -sem_ERule ( ERule name_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ mbError_ ) = sem_ERule_ERule name_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ mbError_---- semantic domain-newtype T_ERule = T_ERule {- attach_T_ERule :: Identity (T_ERule_s20 )- }-newtype T_ERule_s20 = C_ERule_s20 {- inv_ERule_s20 :: (T_ERule_v19 )- }-data T_ERule_s21 = C_ERule_s21-type T_ERule_v19 = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )-data T_ERule_vIn19 = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (Map Identifier Int)-data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc)-{-# NOINLINE sem_ERule_ERule #-}-sem_ERule_ERule :: (Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule -sem_ERule_ERule arg_name_ arg_pattern_ arg_rhs_ _ _ arg_explicit_ arg_pure_ arg_mbError_ = T_ERule (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_ERule_v19 - v19 = \ (T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) -> ( let- _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))- _rhsX29 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))- (T_Pattern_vOut40 _patternIattrTypes _patternIattrs _patternIcopy _patternIextraDefs _patternIisUnderscore _patternIsem_lhs) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 _patternOallInhmap _patternOallSynmap _patternOanyLazyKind _patternOinhmap _patternOlocalAttrTypes _patternOoptions _patternOsynmap)- (T_Expression_vOut28 _rhsIattrs _rhsIpos _rhsIsemfunc _rhsItks) = inv_Expression_s29 _rhsX29 (T_Expression_vIn28 )- _lhsOsem_rules :: PP_Doc- _lhsOsem_rules = rule341 _rulecode _used- _rulecode = rule342 _declHead _endpragma _genpragma _pragma _rhsIpos _rhsIsemfunc- _pragma = rule343 _lhsIoptions _rhsIpos- _endpragma = rule344 _lhsImainFile _lhsIoptions- _genpragma = rule345 _haspos _lhsIoptions arg_explicit_- _haspos = rule346 _rhsIpos- _declHead = rule347 _argPats _lhsIoptions _rhsIattrs arg_name_- _argPats = rule348 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIlocalAttrTypes _lhsIoptions _rhsIattrs- _argExprs = rule349 _rhsIattrs- _stepcode = rule350 _argExprs _lhsIoptions _patternIextraDefs _patternIsem_lhs _rhsIattrs arg_name_ arg_pure_- _lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)- _lhsOmrules = rule351 _stepcode arg_name_- _used = rule352 _lhsIusageInfo arg_name_- _kinds = rule353 _lhsIruleKinds arg_name_- _anyLazyKind = rule354 _kinds- _lhsOruledefs :: Map Identifier (Set String)- _lhsOruledefs = rule355 _patternIattrs arg_name_- _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))- _lhsOruleuses = rule356 _rhsIattrs arg_name_- _lhsOerrors :: Seq Error- _lhsOerrors = rule357 _used arg_mbError_- _patternOallInhmap = rule358 _lhsIallInhmap- _patternOallSynmap = rule359 _lhsIallSynmap- _patternOanyLazyKind = rule360 _anyLazyKind- _patternOinhmap = rule361 _lhsIinhmap- _patternOlocalAttrTypes = rule362 _lhsIlocalAttrTypes- _patternOoptions = rule363 _lhsIoptions- _patternOsynmap = rule364 _lhsIsynmap- __result_ = T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules- in __result_ )- in C_ERule_s20 v19- {-# INLINE rule341 #-}- {-# LINE 975 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule341 = \ _rulecode _used ->- {-# LINE 975 "./src-ag/ExecutionPlan2Caml.ag" #-}- if _used == 0- then empty- else _rulecode- {-# LINE 2814 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule342 #-}- {-# LINE 978 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule342 = \ _declHead _endpragma _genpragma _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) ->- {-# LINE 978 "./src-ag/ExecutionPlan2Caml.ag" #-}- ( if _genpragma- then _pragma- else empty- )- >-< _declHead- >-< indent ((column _rhsIpos - 2) `max` 2)- ( if _genpragma- then _pragma >-< _rhsIsemfunc >-< _endpragma- else _rhsIsemfunc- )- >#< "in"- {-# LINE 2830 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule343 #-}- {-# LINE 991 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule343 = \ ((_lhsIoptions) :: Options) ((_rhsIpos) :: Pos) ->- {-# LINE 991 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppLinePragma _lhsIoptions (line _rhsIpos) (file _rhsIpos)- {-# LINE 2836 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule344 #-}- {-# LINE 992 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule344 = \ ((_lhsImainFile) :: String) ((_lhsIoptions) :: Options) ->- {-# LINE 992 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppWithLineNr (\ln -> ppLinePragma _lhsIoptions (ln+1) _lhsImainFile)- {-# LINE 2842 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule345 #-}- {-# LINE 993 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule345 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->- {-# LINE 993 "./src-ag/ExecutionPlan2Caml.ag" #-}- genLinePragmas _lhsIoptions && explicit_ && _haspos- {-# LINE 2848 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule346 #-}- {-# LINE 994 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule346 = \ ((_rhsIpos) :: Pos) ->- {-# LINE 994 "./src-ag/ExecutionPlan2Caml.ag" #-}- line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))- {-# LINE 2854 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule347 #-}- {-# LINE 998 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule347 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->- {-# LINE 998 "./src-ag/ExecutionPlan2Caml.ag" #-}- "let" >#< name_ >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "="- {-# LINE 2860 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule348 #-}- {-# LINE 1000 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule348 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->- {-# LINE 1000 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppSpaced- [ case mbAttr of- Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->- case Map.lookup nm _lhsIlocalAttrTypes of- Just tp -> pp_parens (strNm >#< ":" >#< ppTp tp)- Nothing -> pp strNm- Just attr | not (noPerStateTypeSigs _lhsIoptions) ->- case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of- Just tpDoc -> pp_parens (strNm >#< ":" >#< tpDoc)- Nothing -> pp strNm- _ -> pp strNm- | (strNm, mbAttr) <- Map.assocs _rhsIattrs- ]- {-# LINE 2878 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule349 #-}- {-# LINE 1014 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule349 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->- {-# LINE 1014 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppSpaced $ Map.keys _rhsIattrs- {-# LINE 2884 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule350 #-}- {-# LINE 1015 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule350 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIextraDefs) :: [(PP_Doc,PP_Doc)]) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->- {-# LINE 1015 "./src-ag/ExecutionPlan2Caml.ag" #-}- \kind ->- let mkBind (pat,expr) = "let" >#< pat >#< "=" >#< expr >#< "in"- in if kind `compatibleRule` pure_- then Right $ mkBind (_patternIsem_lhs, name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs))- >-< vlist (map mkBind _patternIextraDefs)- else Left $ IncompatibleRuleKind name_ kind- {-# LINE 2895 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule351 #-}- {-# LINE 1022 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule351 = \ _stepcode name_ ->- {-# LINE 1022 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ _stepcode- {-# LINE 2901 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule352 #-}- {-# LINE 1224 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule352 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->- {-# LINE 1224 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault 0 name_ _lhsIusageInfo- {-# LINE 2907 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule353 #-}- {-# LINE 1240 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule353 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->- {-# LINE 1240 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault Set.empty name_ _lhsIruleKinds- {-# LINE 2913 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule354 #-}- {-# LINE 1241 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule354 = \ _kinds ->- {-# LINE 1241 "./src-ag/ExecutionPlan2Caml.ag" #-}- Set.fold (\k r -> isLazyKind k || r) False _kinds- {-# LINE 2919 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule355 #-}- {-# LINE 1287 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule355 = \ ((_patternIattrs) :: Set String) name_ ->- {-# LINE 1287 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ _patternIattrs- {-# LINE 2925 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule356 #-}- {-# LINE 1288 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule356 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->- {-# LINE 1288 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ _rhsIattrs- {-# LINE 2931 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule357 #-}- {-# LINE 1482 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule357 = \ _used mbError_ ->- {-# LINE 1482 "./src-ag/ExecutionPlan2Caml.ag" #-}- case mbError_ of- Just e | _used > 0 -> Seq.singleton e- _ -> Seq.empty- {-# LINE 2939 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule358 #-}- rule358 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule359 #-}- rule359 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule360 #-}- rule360 = \ _anyLazyKind ->- _anyLazyKind- {-# INLINE rule361 #-}- rule361 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule362 #-}- rule362 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule363 #-}- rule363 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule364 #-}- rule364 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap---- ERules --------------------------------------------------------- wrapper-data Inh_ERules = Inh_ERules { allInhmap_Inh_ERules :: (Map NontermIdent Attributes), allSynmap_Inh_ERules :: (Map NontermIdent Attributes), childTypes_Inh_ERules :: (Map Identifier Type), con_Inh_ERules :: (ConstructorIdent), inhmap_Inh_ERules :: (Attributes), lazyIntras_Inh_ERules :: (Set String), localAttrTypes_Inh_ERules :: (Map Identifier Type), mainFile_Inh_ERules :: (String), mainName_Inh_ERules :: (String), nt_Inh_ERules :: (NontermIdent), options_Inh_ERules :: (Options), ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), synmap_Inh_ERules :: (Attributes), usageInfo_Inh_ERules :: (Map Identifier Int) }-data Syn_ERules = Syn_ERules { errors_Syn_ERules :: (Seq Error), mrules_Syn_ERules :: (Map Identifier (VisitKind -> Either Error PP_Doc)), ruledefs_Syn_ERules :: (Map Identifier (Set String)), ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERules :: (PP_Doc) }-{-# INLINABLE wrap_ERules #-}-wrap_ERules :: T_ERules -> Inh_ERules -> (Syn_ERules )-wrap_ERules (T_ERules act) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo- (T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules) <- return (inv_ERules_s23 sem arg)- return (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules)- )---- cata-{-# NOINLINE sem_ERules #-}-sem_ERules :: ERules -> T_ERules -sem_ERules list = Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list)---- semantic domain-newtype T_ERules = T_ERules {- attach_T_ERules :: Identity (T_ERules_s23 )- }-newtype T_ERules_s23 = C_ERules_s23 {- inv_ERules_s23 :: (T_ERules_v22 )- }-data T_ERules_s24 = C_ERules_s24-type T_ERules_v22 = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )-data T_ERules_vIn22 = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (Map Identifier Int)-data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc)-{-# NOINLINE sem_ERules_Cons #-}-sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules -sem_ERules_Cons arg_hd_ arg_tl_ = T_ERules (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_ERules_v22 - v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) -> ( let- _hdX20 = Control.Monad.Identity.runIdentity (attach_T_ERule (arg_hd_))- _tlX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_tl_))- (T_ERule_vOut19 _hdIerrors _hdImrules _hdIruledefs _hdIruleuses _hdIsem_rules) = inv_ERule_s20 _hdX20 (T_ERule_vIn19 _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOnt _hdOoptions _hdOruleKinds _hdOsynmap _hdOusageInfo)- (T_ERules_vOut22 _tlIerrors _tlImrules _tlIruledefs _tlIruleuses _tlIsem_rules) = inv_ERules_s23 _tlX23 (T_ERules_vIn22 _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOnt _tlOoptions _tlOruleKinds _tlOsynmap _tlOusageInfo)- _lhsOerrors :: Seq Error- _lhsOerrors = rule365 _hdIerrors _tlIerrors- _lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)- _lhsOmrules = rule366 _hdImrules _tlImrules- _lhsOruledefs :: Map Identifier (Set String)- _lhsOruledefs = rule367 _hdIruledefs _tlIruledefs- _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))- _lhsOruleuses = rule368 _hdIruleuses _tlIruleuses- _lhsOsem_rules :: PP_Doc- _lhsOsem_rules = rule369 _hdIsem_rules _tlIsem_rules- _hdOallInhmap = rule370 _lhsIallInhmap- _hdOallSynmap = rule371 _lhsIallSynmap- _hdOchildTypes = rule372 _lhsIchildTypes- _hdOcon = rule373 _lhsIcon- _hdOinhmap = rule374 _lhsIinhmap- _hdOlazyIntras = rule375 _lhsIlazyIntras- _hdOlocalAttrTypes = rule376 _lhsIlocalAttrTypes- _hdOmainFile = rule377 _lhsImainFile- _hdOmainName = rule378 _lhsImainName- _hdOnt = rule379 _lhsInt- _hdOoptions = rule380 _lhsIoptions- _hdOruleKinds = rule381 _lhsIruleKinds- _hdOsynmap = rule382 _lhsIsynmap- _hdOusageInfo = rule383 _lhsIusageInfo- _tlOallInhmap = rule384 _lhsIallInhmap- _tlOallSynmap = rule385 _lhsIallSynmap- _tlOchildTypes = rule386 _lhsIchildTypes- _tlOcon = rule387 _lhsIcon- _tlOinhmap = rule388 _lhsIinhmap- _tlOlazyIntras = rule389 _lhsIlazyIntras- _tlOlocalAttrTypes = rule390 _lhsIlocalAttrTypes- _tlOmainFile = rule391 _lhsImainFile- _tlOmainName = rule392 _lhsImainName- _tlOnt = rule393 _lhsInt- _tlOoptions = rule394 _lhsIoptions- _tlOruleKinds = rule395 _lhsIruleKinds- _tlOsynmap = rule396 _lhsIsynmap- _tlOusageInfo = rule397 _lhsIusageInfo- __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules- in __result_ )- in C_ERules_s23 v22- {-# INLINE rule365 #-}- rule365 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule366 #-}- rule366 = \ ((_hdImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ((_tlImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _hdImrules `Map.union` _tlImrules- {-# INLINE rule367 #-}- rule367 = \ ((_hdIruledefs) :: Map Identifier (Set String)) ((_tlIruledefs) :: Map Identifier (Set String)) ->- _hdIruledefs `uwSetUnion` _tlIruledefs- {-# INLINE rule368 #-}- rule368 = \ ((_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _hdIruleuses `uwMapUnion` _tlIruleuses- {-# INLINE rule369 #-}- rule369 = \ ((_hdIsem_rules) :: PP_Doc) ((_tlIsem_rules) :: PP_Doc) ->- _hdIsem_rules >-< _tlIsem_rules- {-# INLINE rule370 #-}- rule370 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule371 #-}- rule371 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule372 #-}- rule372 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule373 #-}- rule373 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule374 #-}- rule374 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule375 #-}- rule375 = \ ((_lhsIlazyIntras) :: Set String) ->- _lhsIlazyIntras- {-# INLINE rule376 #-}- rule376 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule377 #-}- rule377 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule378 #-}- rule378 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule379 #-}- rule379 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule380 #-}- rule380 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule381 #-}- rule381 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _lhsIruleKinds- {-# INLINE rule382 #-}- rule382 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule383 #-}- rule383 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->- _lhsIusageInfo- {-# INLINE rule384 #-}- rule384 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule385 #-}- rule385 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule386 #-}- rule386 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule387 #-}- rule387 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule388 #-}- rule388 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule389 #-}- rule389 = \ ((_lhsIlazyIntras) :: Set String) ->- _lhsIlazyIntras- {-# INLINE rule390 #-}- rule390 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule391 #-}- rule391 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule392 #-}- rule392 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule393 #-}- rule393 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule394 #-}- rule394 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule395 #-}- rule395 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _lhsIruleKinds- {-# INLINE rule396 #-}- rule396 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule397 #-}- rule397 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->- _lhsIusageInfo-{-# NOINLINE sem_ERules_Nil #-}-sem_ERules_Nil :: T_ERules -sem_ERules_Nil = T_ERules (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_ERules_v22 - v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) -> ( let- _lhsOerrors :: Seq Error- _lhsOerrors = rule398 ()- _lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)- _lhsOmrules = rule399 ()- _lhsOruledefs :: Map Identifier (Set String)- _lhsOruledefs = rule400 ()- _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))- _lhsOruleuses = rule401 ()- _lhsOsem_rules :: PP_Doc- _lhsOsem_rules = rule402 ()- __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules- in __result_ )- in C_ERules_s23 v22- {-# INLINE rule398 #-}- rule398 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule399 #-}- rule399 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule400 #-}- rule400 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule401 #-}- rule401 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule402 #-}- rule402 = \ (_ :: ()) ->- empty---- ExecutionPlan -------------------------------------------------- wrapper-data Inh_ExecutionPlan = Inh_ExecutionPlan { inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ExecutionPlan :: (String), mainName_Inh_ExecutionPlan :: (String), options_Inh_ExecutionPlan :: (Options), synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes) }-data Syn_ExecutionPlan = Syn_ExecutionPlan { code_Syn_ExecutionPlan :: (PP_Doc), datas_Syn_ExecutionPlan :: (PP_Doc), errors_Syn_ExecutionPlan :: (Seq Error), modules_Syn_ExecutionPlan :: (PP_Doc) }-{-# INLINABLE wrap_ExecutionPlan #-}-wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> (Syn_ExecutionPlan )-wrap_ExecutionPlan (T_ExecutionPlan act) (Inh_ExecutionPlan _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ExecutionPlan_vIn25 _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap- (T_ExecutionPlan_vOut25 _lhsOcode _lhsOdatas _lhsOerrors _lhsOmodules) <- return (inv_ExecutionPlan_s26 sem arg)- return (Syn_ExecutionPlan _lhsOcode _lhsOdatas _lhsOerrors _lhsOmodules)- )---- cata-{-# INLINE sem_ExecutionPlan #-}-sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan -sem_ExecutionPlan ( ExecutionPlan nonts_ typeSyns_ wrappers_ derivings_ ) = sem_ExecutionPlan_ExecutionPlan ( sem_ENonterminals nonts_ ) typeSyns_ wrappers_ derivings_---- semantic domain-newtype T_ExecutionPlan = T_ExecutionPlan {- attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )- }-newtype T_ExecutionPlan_s26 = C_ExecutionPlan_s26 {- inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )- }-data T_ExecutionPlan_s27 = C_ExecutionPlan_s27-type T_ExecutionPlan_v25 = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )-data T_ExecutionPlan_vIn25 = T_ExecutionPlan_vIn25 (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes)-data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (PP_Doc) (PP_Doc) (Seq Error) (PP_Doc)-{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}-sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan -sem_ExecutionPlan_ExecutionPlan arg_nonts_ arg_typeSyns_ arg_wrappers_ _ = T_ExecutionPlan (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_ExecutionPlan_v25 - v25 = \ (T_ExecutionPlan_vIn25 _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap) -> ( let- _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_nonts_))- (T_ENonterminals_vOut10 _nontsIchildvisit _nontsIcode _nontsIdatas _nontsIerrors _nontsIfromToStates _nontsIinitStates _nontsImodules _nontsIsemFunBndDefs _nontsIsemFunBndTps _nontsIvisitKinds _nontsIvisitdefs _nontsIvisituses) = inv_ENonterminals_s11 _nontsX11 (T_ENonterminals_vIn10 _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOoptions _nontsOsynmap _nontsOtypeSyns _nontsOwrappers)- _lhsOcode :: PP_Doc- _lhsOcode = rule403 _nontsIcode _wrappersExtra- _lhsOdatas :: PP_Doc- _lhsOdatas = rule404 _commonExtra _nontsIdatas- _nontsOwrappers = rule405 arg_wrappers_- _nontsOtypeSyns = rule406 arg_typeSyns_- _wrappersExtra = rule407 _lateSemBndDef _lhsIoptions- _commonExtra = rule408 _lateSemBndTp _lhsIoptions- _lateSemBndTp = rule409 _lhsImainName _nontsIsemFunBndTps- _lateSemBndDef = rule410 _lhsImainName _nontsIsemFunBndDefs- _nontsOallchildvisit = rule411 _nontsIchildvisit- _nontsOavisitdefs = rule412 _nontsIvisitdefs- _nontsOavisituses = rule413 _nontsIvisituses- _nontsOallFromToStates = rule414 _nontsIfromToStates- _nontsOallVisitKinds = rule415 _nontsIvisitKinds- _nontsOallInitStates = rule416 _nontsIinitStates- _lhsOerrors :: Seq Error- _lhsOerrors = rule417 _nontsIerrors- _lhsOmodules :: PP_Doc- _lhsOmodules = rule418 _nontsImodules- _nontsOinhmap = rule419 _lhsIinhmap- _nontsOlocalAttrTypes = rule420 _lhsIlocalAttrTypes- _nontsOmainFile = rule421 _lhsImainFile- _nontsOmainName = rule422 _lhsImainName- _nontsOoptions = rule423 _lhsIoptions- _nontsOsynmap = rule424 _lhsIsynmap- __result_ = T_ExecutionPlan_vOut25 _lhsOcode _lhsOdatas _lhsOerrors _lhsOmodules- in __result_ )- in C_ExecutionPlan_s26 v25- {-# INLINE rule403 #-}- {-# LINE 103 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule403 = \ ((_nontsIcode) :: PP_Doc) _wrappersExtra ->- {-# LINE 103 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIcode >-< _wrappersExtra- {-# LINE 3252 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule404 #-}- {-# LINE 104 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule404 = \ _commonExtra ((_nontsIdatas) :: PP_Doc) ->- {-# LINE 104 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIdatas >-< _commonExtra- {-# LINE 3258 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule405 #-}- {-# LINE 110 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule405 = \ wrappers_ ->- {-# LINE 110 "./src-ag/ExecutionPlan2Caml.ag" #-}- wrappers_- {-# LINE 3264 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule406 #-}- {-# LINE 171 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule406 = \ typeSyns_ ->- {-# LINE 171 "./src-ag/ExecutionPlan2Caml.ag" #-}- typeSyns_- {-# LINE 3270 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule407 #-}- {-# LINE 661 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule407 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->- {-# LINE 661 "./src-ag/ExecutionPlan2Caml.ag" #-}- if lateHigherOrderBinding _lhsIoptions- then _lateSemBndDef- else empty- {-# LINE 3278 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule408 #-}- {-# LINE 664 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule408 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->- {-# LINE 664 "./src-ag/ExecutionPlan2Caml.ag" #-}- if lateHigherOrderBinding _lhsIoptions- then _lateSemBndTp- else empty- {-# LINE 3286 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule409 #-}- {-# LINE 667 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule409 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->- {-# LINE 667 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< ppRecordTp (toList _nontsIsemFunBndTps)- {-# LINE 3292 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule410 #-}- {-# LINE 668 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule410 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) ->- {-# LINE 668 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< lateBindingFieldNm _lhsImainName >#< ":" >#< lateBindingTypeNm _lhsImainName >#< "="- >-< (indent 2 $ ppRecordVal $ toList _nontsIsemFunBndDefs)- {-# LINE 3299 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule411 #-}- {-# LINE 1154 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule411 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- {-# LINE 1154 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIchildvisit- {-# LINE 3305 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule412 #-}- {-# LINE 1312 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule412 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- {-# LINE 1312 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIvisitdefs- {-# LINE 3311 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule413 #-}- {-# LINE 1313 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule413 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- {-# LINE 1313 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIvisituses- {-# LINE 3317 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule414 #-}- {-# LINE 1404 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule414 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- {-# LINE 1404 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIfromToStates- {-# LINE 3323 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule415 #-}- {-# LINE 1448 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule415 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- {-# LINE 1448 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIvisitKinds- {-# LINE 3329 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule416 #-}- {-# LINE 1462 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule416 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->- {-# LINE 1462 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nontsIinitStates- {-# LINE 3335 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule417 #-}- rule417 = \ ((_nontsIerrors) :: Seq Error) ->- _nontsIerrors- {-# INLINE rule418 #-}- rule418 = \ ((_nontsImodules) :: PP_Doc) ->- _nontsImodules- {-# INLINE rule419 #-}- rule419 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- _lhsIinhmap- {-# INLINE rule420 #-}- rule420 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- _lhsIlocalAttrTypes- {-# INLINE rule421 #-}- rule421 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule422 #-}- rule422 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule423 #-}- rule423 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule424 #-}- rule424 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- _lhsIsynmap---- Expression ----------------------------------------------------- wrapper-data Inh_Expression = Inh_Expression { }-data Syn_Expression = Syn_Expression { attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), pos_Syn_Expression :: (Pos), semfunc_Syn_Expression :: (PP_Doc), tks_Syn_Expression :: ([HsToken]) }-{-# INLINABLE wrap_Expression #-}-wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )-wrap_Expression (T_Expression act) (Inh_Expression ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Expression_vIn28 - (T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks) <- return (inv_Expression_s29 sem arg)- return (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks)- )---- cata-{-# INLINE sem_Expression #-}-sem_Expression :: Expression -> T_Expression -sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_---- semantic domain-newtype T_Expression = T_Expression {- attach_T_Expression :: Identity (T_Expression_s29 )- }-newtype T_Expression_s29 = C_Expression_s29 {- inv_Expression_s29 :: (T_Expression_v28 )- }-data T_Expression_s30 = C_Expression_s30-type T_Expression_v28 = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )-data T_Expression_vIn28 = T_Expression_vIn28 -data T_Expression_vOut28 = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])-{-# NOINLINE sem_Expression_Expression #-}-sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression -sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_Expression_v28 - v28 = \ (T_Expression_vIn28 ) -> ( let- _lhsOtks :: [HsToken]- _lhsOtks = rule425 arg_tks_- _lhsOpos :: Pos- _lhsOpos = rule426 arg_pos_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule427 arg_tks_- _lhsOsemfunc :: PP_Doc- _lhsOsemfunc = rule428 arg_tks_- __result_ = T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks- in __result_ )- in C_Expression_s29 v28- {-# INLINE rule425 #-}- {-# LINE 1026 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule425 = \ tks_ ->- {-# LINE 1026 "./src-ag/ExecutionPlan2Caml.ag" #-}- tks_- {-# LINE 3414 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule426 #-}- {-# LINE 1047 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule426 = \ pos_ ->- {-# LINE 1047 "./src-ag/ExecutionPlan2Caml.ag" #-}- pos_- {-# LINE 3420 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule427 #-}- {-# LINE 1139 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule427 = \ tks_ ->- {-# LINE 1139 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 3426 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule428 #-}- {-# LINE 1140 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule428 = \ tks_ ->- {-# LINE 1140 "./src-ag/ExecutionPlan2Caml.ag" #-}- vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 3432 "dist/build/ExecutionPlan2Caml.hs"#-}---- HsToken -------------------------------------------------------- wrapper-data Inh_HsToken = Inh_HsToken { }-data Syn_HsToken = Syn_HsToken { attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), tok_Syn_HsToken :: ((Pos,String)) }-{-# INLINABLE wrap_HsToken #-}-wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )-wrap_HsToken (T_HsToken act) (Inh_HsToken ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_HsToken_vIn31 - (T_HsToken_vOut31 _lhsOattrs _lhsOtok) <- return (inv_HsToken_s32 sem arg)- return (Syn_HsToken _lhsOattrs _lhsOtok)- )---- cata-{-# NOINLINE sem_HsToken #-}-sem_HsToken :: HsToken -> T_HsToken -sem_HsToken ( AGLocal var_ pos_ rdesc_ ) = sem_HsToken_AGLocal var_ pos_ rdesc_-sem_HsToken ( AGField field_ attr_ pos_ rdesc_ ) = sem_HsToken_AGField field_ attr_ pos_ rdesc_-sem_HsToken ( HsToken value_ pos_ ) = sem_HsToken_HsToken value_ pos_-sem_HsToken ( CharToken value_ pos_ ) = sem_HsToken_CharToken value_ pos_-sem_HsToken ( StrToken value_ pos_ ) = sem_HsToken_StrToken value_ pos_-sem_HsToken ( Err mesg_ pos_ ) = sem_HsToken_Err mesg_ pos_---- semantic domain-newtype T_HsToken = T_HsToken {- attach_T_HsToken :: Identity (T_HsToken_s32 )- }-newtype T_HsToken_s32 = C_HsToken_s32 {- inv_HsToken_s32 :: (T_HsToken_v31 )- }-data T_HsToken_s33 = C_HsToken_s33-type T_HsToken_v31 = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )-data T_HsToken_vIn31 = T_HsToken_vIn31 -data T_HsToken_vOut31 = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))-{-# NOINLINE sem_HsToken_AGLocal #-}-sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken -sem_HsToken_AGLocal arg_var_ arg_pos_ _ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule429 arg_var_- _tok = rule430 arg_pos_ arg_var_- _lhsOtok :: (Pos,String)- _lhsOtok = rule431 _tok- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule429 #-}- {-# LINE 1098 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule429 = \ var_ ->- {-# LINE 1098 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton (fieldname var_) Nothing- {-# LINE 3489 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule430 #-}- {-# LINE 1360 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule430 = \ pos_ var_ ->- {-# LINE 1360 "./src-ag/ExecutionPlan2Caml.ag" #-}- (pos_,fieldname var_)- {-# LINE 3495 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule431 #-}- rule431 = \ _tok ->- _tok-{-# NOINLINE sem_HsToken_AGField #-}-sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken -sem_HsToken_AGField arg_field_ arg_attr_ arg_pos_ arg_rdesc_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _mbAttr = rule432 arg_attr_ arg_field_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule433 _mbAttr arg_attr_ arg_field_- _addTrace = rule434 arg_attr_ arg_field_ arg_rdesc_- _lhsOtok :: (Pos,String)- _lhsOtok = rule435 _addTrace arg_attr_ arg_field_ arg_pos_- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule432 #-}- {-# LINE 1099 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule432 = \ attr_ field_ ->- {-# LINE 1099 "./src-ag/ExecutionPlan2Caml.ag" #-}- if field_ == _INST || field_ == _FIELD || field_ == _INST'- then Nothing- else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_- {-# LINE 3522 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule433 #-}- {-# LINE 1102 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule433 = \ _mbAttr attr_ field_ ->- {-# LINE 1102 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton (attrname True field_ attr_) _mbAttr- {-# LINE 3528 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule434 #-}- {-# LINE 1364 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule434 = \ attr_ field_ rdesc_ ->- {-# LINE 1364 "./src-ag/ExecutionPlan2Caml.ag" #-}- case rdesc_ of- Just d -> \x -> "(prerr_endline " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ "; " ++ x ++ ")"- Nothing -> id- {-# LINE 3536 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule435 #-}- {-# LINE 1367 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule435 = \ _addTrace attr_ field_ pos_ ->- {-# LINE 1367 "./src-ag/ExecutionPlan2Caml.ag" #-}- (pos_, _addTrace $ attrname True field_ attr_)- {-# LINE 3542 "dist/build/ExecutionPlan2Caml.hs"#-}-{-# NOINLINE sem_HsToken_HsToken #-}-sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken -sem_HsToken_HsToken arg_value_ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule436 arg_pos_ arg_value_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule437 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule436 #-}- {-# LINE 1369 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule436 = \ pos_ value_ ->- {-# LINE 1369 "./src-ag/ExecutionPlan2Caml.ag" #-}- (pos_, value_)- {-# LINE 3562 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule437 #-}- rule437 = \ (_ :: ()) ->- Map.empty-{-# NOINLINE sem_HsToken_CharToken #-}-sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken -sem_HsToken_CharToken arg_value_ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule438 arg_pos_ arg_value_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule439 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule438 #-}- {-# LINE 1371 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule438 = \ pos_ value_ ->- {-# LINE 1371 "./src-ag/ExecutionPlan2Caml.ag" #-}- (pos_, if null value_- then ""- else showCharShort (head value_)- )- {-# LINE 3588 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule439 #-}- rule439 = \ (_ :: ()) ->- Map.empty-{-# NOINLINE sem_HsToken_StrToken #-}-sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken -sem_HsToken_StrToken arg_value_ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule440 arg_pos_ arg_value_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule441 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule440 #-}- {-# LINE 1376 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule440 = \ pos_ value_ ->- {-# LINE 1376 "./src-ag/ExecutionPlan2Caml.ag" #-}- (pos_, showStrShort value_)- {-# LINE 3611 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule441 #-}- rule441 = \ (_ :: ()) ->- Map.empty-{-# NOINLINE sem_HsToken_Err #-}-sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken -sem_HsToken_Err _ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule442 arg_pos_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule443 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule442 #-}- {-# LINE 1377 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule442 = \ pos_ ->- {-# LINE 1377 "./src-ag/ExecutionPlan2Caml.ag" #-}- (pos_, "")- {-# LINE 3634 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule443 #-}- rule443 = \ (_ :: ()) ->- Map.empty---- HsTokens ------------------------------------------------------- wrapper-data Inh_HsTokens = Inh_HsTokens { }-data Syn_HsTokens = Syn_HsTokens { tks_Syn_HsTokens :: ([(Pos,String)]) }-{-# INLINABLE wrap_HsTokens #-}-wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )-wrap_HsTokens (T_HsTokens act) (Inh_HsTokens ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_HsTokens_vIn34 - (T_HsTokens_vOut34 _lhsOtks) <- return (inv_HsTokens_s35 sem arg)- return (Syn_HsTokens _lhsOtks)- )---- cata-{-# NOINLINE sem_HsTokens #-}-sem_HsTokens :: HsTokens -> T_HsTokens -sem_HsTokens list = Prelude.foldr sem_HsTokens_Cons sem_HsTokens_Nil (Prelude.map sem_HsToken list)---- semantic domain-newtype T_HsTokens = T_HsTokens {- attach_T_HsTokens :: Identity (T_HsTokens_s35 )- }-newtype T_HsTokens_s35 = C_HsTokens_s35 {- inv_HsTokens_s35 :: (T_HsTokens_v34 )- }-data T_HsTokens_s36 = C_HsTokens_s36-type T_HsTokens_v34 = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )-data T_HsTokens_vIn34 = T_HsTokens_vIn34 -data T_HsTokens_vOut34 = T_HsTokens_vOut34 ([(Pos,String)])-{-# NOINLINE sem_HsTokens_Cons #-}-sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens -sem_HsTokens_Cons arg_hd_ arg_tl_ = T_HsTokens (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_HsTokens_v34 - v34 = \ (T_HsTokens_vIn34 ) -> ( let- _hdX32 = Control.Monad.Identity.runIdentity (attach_T_HsToken (arg_hd_))- _tlX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tl_))- (T_HsToken_vOut31 _hdIattrs _hdItok) = inv_HsToken_s32 _hdX32 (T_HsToken_vIn31 )- (T_HsTokens_vOut34 _tlItks) = inv_HsTokens_s35 _tlX35 (T_HsTokens_vIn34 )- _lhsOtks :: [(Pos,String)]- _lhsOtks = rule444 _hdItok _tlItks- __result_ = T_HsTokens_vOut34 _lhsOtks- in __result_ )- in C_HsTokens_s35 v34- {-# INLINE rule444 #-}- {-# LINE 1356 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule444 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->- {-# LINE 1356 "./src-ag/ExecutionPlan2Caml.ag" #-}- _hdItok : _tlItks- {-# LINE 3690 "dist/build/ExecutionPlan2Caml.hs"#-}-{-# NOINLINE sem_HsTokens_Nil #-}-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil = T_HsTokens (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_HsTokens_v34 - v34 = \ (T_HsTokens_vIn34 ) -> ( let- _lhsOtks :: [(Pos,String)]- _lhsOtks = rule445 ()- __result_ = T_HsTokens_vOut34 _lhsOtks- in __result_ )- in C_HsTokens_s35 v34- {-# INLINE rule445 #-}- {-# LINE 1357 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule445 = \ (_ :: ()) ->- {-# LINE 1357 "./src-ag/ExecutionPlan2Caml.ag" #-}- []- {-# LINE 3708 "dist/build/ExecutionPlan2Caml.hs"#-}---- HsTokensRoot --------------------------------------------------- wrapper-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 act) (Inh_HsTokensRoot ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_HsTokensRoot_vIn37 - (T_HsTokensRoot_vOut37 ) <- return (inv_HsTokensRoot_s38 sem arg)- return (Syn_HsTokensRoot )- )---- cata-{-# INLINE sem_HsTokensRoot #-}-sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot -sem_HsTokensRoot ( HsTokensRoot tokens_ ) = sem_HsTokensRoot_HsTokensRoot ( sem_HsTokens tokens_ )---- semantic domain-newtype T_HsTokensRoot = T_HsTokensRoot {- attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )- }-newtype T_HsTokensRoot_s38 = C_HsTokensRoot_s38 {- inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )- }-data T_HsTokensRoot_s39 = C_HsTokensRoot_s39-type T_HsTokensRoot_v37 = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )-data T_HsTokensRoot_vIn37 = T_HsTokensRoot_vIn37 -data T_HsTokensRoot_vOut37 = T_HsTokensRoot_vOut37 -{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot arg_tokens_ = T_HsTokensRoot (return st38) where- {-# NOINLINE st38 #-}- st38 = let- v37 :: T_HsTokensRoot_v37 - v37 = \ (T_HsTokensRoot_vIn37 ) -> ( let- _tokensX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tokens_))- (T_HsTokens_vOut34 _tokensItks) = inv_HsTokens_s35 _tokensX35 (T_HsTokens_vIn34 )- __result_ = T_HsTokensRoot_vOut37 - in __result_ )- in C_HsTokensRoot_s38 v37---- Pattern -------------------------------------------------------- wrapper-data Inh_Pattern = Inh_Pattern { allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), anyLazyKind_Inh_Pattern :: (Bool), inhmap_Inh_Pattern :: (Attributes), localAttrTypes_Inh_Pattern :: (Map Identifier Type), options_Inh_Pattern :: (Options), synmap_Inh_Pattern :: (Attributes) }-data Syn_Pattern = Syn_Pattern { attrTypes_Syn_Pattern :: (PP_Doc), attrs_Syn_Pattern :: (Set String), copy_Syn_Pattern :: (Pattern), extraDefs_Syn_Pattern :: ([(PP_Doc,PP_Doc)]), isUnderscore_Syn_Pattern :: (Bool), sem_lhs_Syn_Pattern :: ( PP_Doc ) }-{-# INLINABLE wrap_Pattern #-}-wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )-wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap- (T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs) <- return (inv_Pattern_s41 sem arg)- return (Syn_Pattern _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs)- )---- cata-{-# NOINLINE sem_Pattern #-}-sem_Pattern :: Pattern -> T_Pattern -sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )-sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )-sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )-sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )-sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_---- semantic domain-newtype T_Pattern = T_Pattern {- attach_T_Pattern :: Identity (T_Pattern_s41 )- }-newtype T_Pattern_s41 = C_Pattern_s41 {- inv_Pattern_s41 :: (T_Pattern_v40 )- }-data T_Pattern_s42 = C_Pattern_s42-type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )-data T_Pattern_vIn40 = T_Pattern_vIn40 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)-data T_Pattern_vOut40 = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) ([(PP_Doc,PP_Doc)]) (Bool) ( PP_Doc )-{-# NOINLINE sem_Pattern_Constr #-}-sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern -sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIextraDefs _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule446 _patsIsem_lhs arg_name_- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule447 ()- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule448 _patsIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule449 _patsIattrs- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule450 _patsIextraDefs- _copy = rule451 _patsIcopy arg_name_- _lhsOcopy :: Pattern- _lhsOcopy = rule452 _copy- _patsOallInhmap = rule453 _lhsIallInhmap- _patsOallSynmap = rule454 _lhsIallSynmap- _patsOanyLazyKind = rule455 _lhsIanyLazyKind- _patsOinhmap = rule456 _lhsIinhmap- _patsOlocalAttrTypes = rule457 _lhsIlocalAttrTypes- _patsOoptions = rule458 _lhsIoptions- _patsOsynmap = rule459 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule446 #-}- {-# LINE 1064 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule446 = \ ((_patsIsem_lhs) :: [PP_Doc]) name_ ->- {-# LINE 1064 "./src-ag/ExecutionPlan2Caml.ag" #-}- pp_parens $ name_ >#< pp_block "(" ")" "," _patsIsem_lhs- {-# LINE 3824 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule447 #-}- {-# LINE 1073 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule447 = \ (_ :: ()) ->- {-# LINE 1073 "./src-ag/ExecutionPlan2Caml.ag" #-}- False- {-# LINE 3830 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule448 #-}- rule448 = \ ((_patsIattrTypes) :: PP_Doc) ->- _patsIattrTypes- {-# INLINE rule449 #-}- rule449 = \ ((_patsIattrs) :: Set String) ->- _patsIattrs- {-# INLINE rule450 #-}- rule450 = \ ((_patsIextraDefs) :: [(PP_Doc,PP_Doc)]) ->- _patsIextraDefs- {-# INLINE rule451 #-}- rule451 = \ ((_patsIcopy) :: Patterns) name_ ->- Constr name_ _patsIcopy- {-# INLINE rule452 #-}- rule452 = \ _copy ->- _copy- {-# INLINE rule453 #-}- rule453 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule454 #-}- rule454 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule455 #-}- rule455 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule456 #-}- rule456 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule457 #-}- rule457 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule458 #-}- rule458 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule459 #-}- rule459 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Product #-}-sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern -sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIextraDefs _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule460 _patsIsem_lhs- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule461 ()- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule462 _patsIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule463 _patsIattrs- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule464 _patsIextraDefs- _copy = rule465 _patsIcopy arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule466 _copy- _patsOallInhmap = rule467 _lhsIallInhmap- _patsOallSynmap = rule468 _lhsIallSynmap- _patsOanyLazyKind = rule469 _lhsIanyLazyKind- _patsOinhmap = rule470 _lhsIinhmap- _patsOlocalAttrTypes = rule471 _lhsIlocalAttrTypes- _patsOoptions = rule472 _lhsIoptions- _patsOsynmap = rule473 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule460 #-}- {-# LINE 1063 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule460 = \ ((_patsIsem_lhs) :: [PP_Doc]) ->- {-# LINE 1063 "./src-ag/ExecutionPlan2Caml.ag" #-}- pp_block "(" ")" "," _patsIsem_lhs- {-# LINE 3904 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule461 #-}- {-# LINE 1074 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule461 = \ (_ :: ()) ->- {-# LINE 1074 "./src-ag/ExecutionPlan2Caml.ag" #-}- False- {-# LINE 3910 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule462 #-}- rule462 = \ ((_patsIattrTypes) :: PP_Doc) ->- _patsIattrTypes- {-# INLINE rule463 #-}- rule463 = \ ((_patsIattrs) :: Set String) ->- _patsIattrs- {-# INLINE rule464 #-}- rule464 = \ ((_patsIextraDefs) :: [(PP_Doc,PP_Doc)]) ->- _patsIextraDefs- {-# INLINE rule465 #-}- rule465 = \ ((_patsIcopy) :: Patterns) pos_ ->- Product pos_ _patsIcopy- {-# INLINE rule466 #-}- rule466 = \ _copy ->- _copy- {-# INLINE rule467 #-}- rule467 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule468 #-}- rule468 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule469 #-}- rule469 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule470 #-}- rule470 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule471 #-}- rule471 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule472 #-}- rule472 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule473 #-}- rule473 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Alias #-}-sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern -sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIextraDefs _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)- _var = rule474 arg_attr_ arg_field_- _hasTp = rule475 _mbTp- _o_sigs = rule476 _lhsIoptions- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule477 _hasTp _mbTp _o_sigs _var- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule478 _patIisUnderscore _patIsem_lhs _var- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule479 ()- _lhsOattrs :: Set String- _lhsOattrs = rule480 _patIattrs arg_attr_ arg_field_- _mbTp = rule481 _lhsIlocalAttrTypes _lhsIsynmap arg_attr_ arg_field_- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule482 _mbTp _patIattrTypes arg_attr_ arg_field_- _copy = rule483 _patIcopy arg_attr_ arg_field_- _lhsOcopy :: Pattern- _lhsOcopy = rule484 _copy- _patOallInhmap = rule485 _lhsIallInhmap- _patOallSynmap = rule486 _lhsIallSynmap- _patOanyLazyKind = rule487 _lhsIanyLazyKind- _patOinhmap = rule488 _lhsIinhmap- _patOlocalAttrTypes = rule489 _lhsIlocalAttrTypes- _patOoptions = rule490 _lhsIoptions- _patOsynmap = rule491 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule474 #-}- {-# LINE 1055 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule474 = \ attr_ field_ ->- {-# LINE 1055 "./src-ag/ExecutionPlan2Caml.ag" #-}- text $ attrname False field_ attr_- {-# LINE 3988 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule475 #-}- {-# LINE 1056 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule475 = \ _mbTp ->- {-# LINE 1056 "./src-ag/ExecutionPlan2Caml.ag" #-}- isJust _mbTp- {-# LINE 3994 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule476 #-}- {-# LINE 1057 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule476 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1057 "./src-ag/ExecutionPlan2Caml.ag" #-}- typeSigs _lhsIoptions- {-# LINE 4000 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule477 #-}- {-# LINE 1059 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule477 = \ _hasTp _mbTp _o_sigs _var ->- {-# LINE 1059 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppArg (_hasTp && _o_sigs ) _var (maybe (text "?no type?") ppTp _mbTp )- {-# LINE 4006 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule478 #-}- {-# LINE 1060 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule478 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _var ->- {-# LINE 1060 "./src-ag/ExecutionPlan2Caml.ag" #-}- if _patIisUnderscore- then []- else [ (_patIsem_lhs, _var ) ]- {-# LINE 4014 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule479 #-}- {-# LINE 1075 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule479 = \ (_ :: ()) ->- {-# LINE 1075 "./src-ag/ExecutionPlan2Caml.ag" #-}- False- {-# LINE 4020 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule480 #-}- {-# LINE 1081 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule480 = \ ((_patIattrs) :: Set String) attr_ field_ ->- {-# LINE 1081 "./src-ag/ExecutionPlan2Caml.ag" #-}- Set.insert (attrname False field_ attr_) _patIattrs- {-# LINE 4026 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule481 #-}- {-# LINE 1087 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule481 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->- {-# LINE 1087 "./src-ag/ExecutionPlan2Caml.ag" #-}- if field_ == _LHS- then Map.lookup attr_ _lhsIsynmap- else if field_ == _LOC- then Map.lookup attr_ _lhsIlocalAttrTypes- else Nothing- {-# LINE 4036 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule482 #-}- {-# LINE 1092 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule482 = \ _mbTp ((_patIattrTypes) :: PP_Doc) attr_ field_ ->- {-# LINE 1092 "./src-ag/ExecutionPlan2Caml.ag" #-}- maybe empty (\tp -> (attrname False field_ attr_) >#< "::" >#< ppTp tp) _mbTp- >-< _patIattrTypes- {-# LINE 4043 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule483 #-}- rule483 = \ ((_patIcopy) :: Pattern) attr_ field_ ->- Alias field_ attr_ _patIcopy- {-# INLINE rule484 #-}- rule484 = \ _copy ->- _copy- {-# INLINE rule485 #-}- rule485 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule486 #-}- rule486 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule487 #-}- rule487 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule488 #-}- rule488 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule489 #-}- rule489 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule490 #-}- rule490 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule491 #-}- rule491 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Irrefutable #-}-sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern -sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIextraDefs _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule492 _patIsem_lhs- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule493 _patIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule494 _patIattrs- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule495 _patIextraDefs- _copy = rule496 _patIcopy- _lhsOcopy :: Pattern- _lhsOcopy = rule497 _copy- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule498 _patIisUnderscore- _patOallInhmap = rule499 _lhsIallInhmap- _patOallSynmap = rule500 _lhsIallSynmap- _patOanyLazyKind = rule501 _lhsIanyLazyKind- _patOinhmap = rule502 _lhsIinhmap- _patOlocalAttrTypes = rule503 _lhsIlocalAttrTypes- _patOoptions = rule504 _lhsIoptions- _patOsynmap = rule505 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule492 #-}- {-# LINE 1066 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule492 = \ ((_patIsem_lhs) :: PP_Doc ) ->- {-# LINE 1066 "./src-ag/ExecutionPlan2Caml.ag" #-}- pp_parens (text "lazy" >#< _patIsem_lhs)- {-# LINE 4108 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule493 #-}- rule493 = \ ((_patIattrTypes) :: PP_Doc) ->- _patIattrTypes- {-# INLINE rule494 #-}- rule494 = \ ((_patIattrs) :: Set String) ->- _patIattrs- {-# INLINE rule495 #-}- rule495 = \ ((_patIextraDefs) :: [(PP_Doc,PP_Doc)]) ->- _patIextraDefs- {-# INLINE rule496 #-}- rule496 = \ ((_patIcopy) :: Pattern) ->- Irrefutable _patIcopy- {-# INLINE rule497 #-}- rule497 = \ _copy ->- _copy- {-# INLINE rule498 #-}- rule498 = \ ((_patIisUnderscore) :: Bool) ->- _patIisUnderscore- {-# INLINE rule499 #-}- rule499 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule500 #-}- rule500 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule501 #-}- rule501 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule502 #-}- rule502 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule503 #-}- rule503 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule504 #-}- rule504 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule505 #-}- rule505 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Underscore #-}-sem_Pattern_Underscore :: (Pos) -> T_Pattern -sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule506 ()- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule507 ()- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule508 ()- _lhsOattrs :: Set String- _lhsOattrs = rule509 ()- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule510 ()- _copy = rule511 arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule512 _copy- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule506 #-}- {-# LINE 1065 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule506 = \ (_ :: ()) ->- {-# LINE 1065 "./src-ag/ExecutionPlan2Caml.ag" #-}- text "_"- {-# LINE 4176 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule507 #-}- {-# LINE 1076 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule507 = \ (_ :: ()) ->- {-# LINE 1076 "./src-ag/ExecutionPlan2Caml.ag" #-}- True- {-# LINE 4182 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule508 #-}- rule508 = \ (_ :: ()) ->- empty- {-# INLINE rule509 #-}- rule509 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule510 #-}- rule510 = \ (_ :: ()) ->- []- {-# INLINE rule511 #-}- rule511 = \ pos_ ->- Underscore pos_- {-# INLINE rule512 #-}- rule512 = \ _copy ->- _copy---- Patterns ------------------------------------------------------- wrapper-data Inh_Patterns = Inh_Patterns { allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), anyLazyKind_Inh_Patterns :: (Bool), inhmap_Inh_Patterns :: (Attributes), localAttrTypes_Inh_Patterns :: (Map Identifier Type), options_Inh_Patterns :: (Options), synmap_Inh_Patterns :: (Attributes) }-data Syn_Patterns = Syn_Patterns { attrTypes_Syn_Patterns :: (PP_Doc), attrs_Syn_Patterns :: (Set String), copy_Syn_Patterns :: (Patterns), extraDefs_Syn_Patterns :: ([(PP_Doc,PP_Doc)]), sem_lhs_Syn_Patterns :: ([PP_Doc]) }-{-# INLINABLE wrap_Patterns #-}-wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )-wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap- (T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs) <- return (inv_Patterns_s44 sem arg)- return (Syn_Patterns _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs)- )---- cata-{-# NOINLINE sem_Patterns #-}-sem_Patterns :: Patterns -> T_Patterns -sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)---- semantic domain-newtype T_Patterns = T_Patterns {- attach_T_Patterns :: Identity (T_Patterns_s44 )- }-newtype T_Patterns_s44 = C_Patterns_s44 {- inv_Patterns_s44 :: (T_Patterns_v43 )- }-data T_Patterns_s45 = C_Patterns_s45-type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )-data T_Patterns_vIn43 = T_Patterns_vIn43 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)-data T_Patterns_vOut43 = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([(PP_Doc,PP_Doc)]) ([PP_Doc])-{-# NOINLINE sem_Patterns_Cons #-}-sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns -sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_Patterns_v43 - v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))- _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))- (T_Pattern_vOut40 _hdIattrTypes _hdIattrs _hdIcopy _hdIextraDefs _hdIisUnderscore _hdIsem_lhs) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 _hdOallInhmap _hdOallSynmap _hdOanyLazyKind _hdOinhmap _hdOlocalAttrTypes _hdOoptions _hdOsynmap)- (T_Patterns_vOut43 _tlIattrTypes _tlIattrs _tlIcopy _tlIextraDefs _tlIsem_lhs) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 _tlOallInhmap _tlOallSynmap _tlOanyLazyKind _tlOinhmap _tlOlocalAttrTypes _tlOoptions _tlOsynmap)- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule513 _hdIattrTypes _tlIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule514 _hdIattrs _tlIattrs- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule515 _hdIextraDefs _tlIextraDefs- _lhsOsem_lhs :: [PP_Doc]- _lhsOsem_lhs = rule516 _hdIsem_lhs _tlIsem_lhs- _copy = rule517 _hdIcopy _tlIcopy- _lhsOcopy :: Patterns- _lhsOcopy = rule518 _copy- _hdOallInhmap = rule519 _lhsIallInhmap- _hdOallSynmap = rule520 _lhsIallSynmap- _hdOanyLazyKind = rule521 _lhsIanyLazyKind- _hdOinhmap = rule522 _lhsIinhmap- _hdOlocalAttrTypes = rule523 _lhsIlocalAttrTypes- _hdOoptions = rule524 _lhsIoptions- _hdOsynmap = rule525 _lhsIsynmap- _tlOallInhmap = rule526 _lhsIallInhmap- _tlOallSynmap = rule527 _lhsIallSynmap- _tlOanyLazyKind = rule528 _lhsIanyLazyKind- _tlOinhmap = rule529 _lhsIinhmap- _tlOlocalAttrTypes = rule530 _lhsIlocalAttrTypes- _tlOoptions = rule531 _lhsIoptions- _tlOsynmap = rule532 _lhsIsynmap- __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs- in __result_ )- in C_Patterns_s44 v43- {-# INLINE rule513 #-}- rule513 = \ ((_hdIattrTypes) :: PP_Doc) ((_tlIattrTypes) :: PP_Doc) ->- _hdIattrTypes >-< _tlIattrTypes- {-# INLINE rule514 #-}- rule514 = \ ((_hdIattrs) :: Set String) ((_tlIattrs) :: Set String) ->- _hdIattrs `Set.union` _tlIattrs- {-# INLINE rule515 #-}- rule515 = \ ((_hdIextraDefs) :: [(PP_Doc,PP_Doc)]) ((_tlIextraDefs) :: [(PP_Doc,PP_Doc)]) ->- _hdIextraDefs ++ _tlIextraDefs- {-# INLINE rule516 #-}- rule516 = \ ((_hdIsem_lhs) :: PP_Doc ) ((_tlIsem_lhs) :: [PP_Doc]) ->- _hdIsem_lhs : _tlIsem_lhs- {-# INLINE rule517 #-}- rule517 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->- (:) _hdIcopy _tlIcopy- {-# INLINE rule518 #-}- rule518 = \ _copy ->- _copy- {-# INLINE rule519 #-}- rule519 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule520 #-}- rule520 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule521 #-}- rule521 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule522 #-}- rule522 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule523 #-}- rule523 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule524 #-}- rule524 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule525 #-}- rule525 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule526 #-}- rule526 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule527 #-}- rule527 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule528 #-}- rule528 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule529 #-}- rule529 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule530 #-}- rule530 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule531 #-}- rule531 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule532 #-}- rule532 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Patterns_Nil #-}-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil = T_Patterns (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_Patterns_v43 - v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule533 ()- _lhsOattrs :: Set String- _lhsOattrs = rule534 ()- _lhsOextraDefs :: [(PP_Doc,PP_Doc)]- _lhsOextraDefs = rule535 ()- _lhsOsem_lhs :: [PP_Doc]- _lhsOsem_lhs = rule536 ()- _copy = rule537 ()- _lhsOcopy :: Patterns- _lhsOcopy = rule538 _copy- __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs- in __result_ )- in C_Patterns_s44 v43- {-# INLINE rule533 #-}- rule533 = \ (_ :: ()) ->- empty- {-# INLINE rule534 #-}- rule534 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule535 #-}- rule535 = \ (_ :: ()) ->- []- {-# INLINE rule536 #-}- rule536 = \ (_ :: ()) ->- []- {-# INLINE rule537 #-}- rule537 = \ (_ :: ()) ->- []- {-# INLINE rule538 #-}- rule538 = \ _copy ->- _copy---- Visit ---------------------------------------------------------- wrapper-data Inh_Visit = Inh_Visit { allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visit :: (Map NontermIdent Attributes), allInitStates_Inh_Visit :: (Map NontermIdent Int), allSynmap_Inh_Visit :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visit :: (Map Identifier Type), childintros_Inh_Visit :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visit :: (ConstructorIdent), inhmap_Inh_Visit :: (Attributes), mrules_Inh_Visit :: (Map Identifier (VisitKind -> Either Error PP_Doc)), nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), nt_Inh_Visit :: (NontermIdent), options_Inh_Visit :: (Options), params_Inh_Visit :: ([Identifier]), prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visit :: (Map Identifier (Set String)), ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visit :: (Attributes), terminaldefs_Inh_Visit :: (Set String) }-data Syn_Visit = Syn_Visit { allvisits_Syn_Visit :: ( VisitStateState ), childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), errors_Syn_Visit :: (Seq Error), fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visit :: (Set String), ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visit :: (Map Identifier Int), sem_visit_Syn_Visit :: ( (StateIdentifier,PP_Doc) ), t_visits_Syn_Visit :: (PP_Doc), visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_Visit #-}-wrap_Visit :: T_Visit -> Inh_Visit -> (Syn_Visit )-wrap_Visit (T_Visit act) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs- (T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visit_s47 sem arg)- return (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# INLINE sem_Visit #-}-sem_Visit :: Visit -> T_Visit -sem_Visit ( Visit ident_ from_ to_ inh_ syn_ steps_ kind_ ) = sem_Visit_Visit ident_ from_ to_ inh_ syn_ ( sem_VisitSteps steps_ ) kind_---- semantic domain-newtype T_Visit = T_Visit {- attach_T_Visit :: Identity (T_Visit_s47 )- }-newtype T_Visit_s47 = C_Visit_s47 {- inv_Visit_s47 :: (T_Visit_v46 )- }-data T_Visit_s48 = C_Visit_s48-type T_Visit_v46 = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )-data T_Visit_vIn46 = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)-data T_Visit_vOut46 = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,PP_Doc) ) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_Visit_Visit #-}-sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps -> (VisitKind) -> T_Visit -sem_Visit_Visit arg_ident_ arg_from_ arg_to_ arg_inh_ arg_syn_ arg_steps_ arg_kind_ = T_Visit (return st47) where- {-# NOINLINE st47 #-}- st47 = let- v46 :: T_Visit_v46 - v46 = \ (T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let- _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))- (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfollow _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)- _lhsOallvisits :: VisitStateState - _lhsOallvisits = rule539 arg_from_ arg_ident_ arg_to_- _nameTIn_visit = rule540 _lhsInt arg_ident_- _nameTOut_visit = rule541 _lhsInt arg_ident_- _nameNextState = rule542 _lhsInt arg_to_- _nameCaller_visit = rule543 _lhsInt arg_ident_- _nextVisitInfo = rule544 _lhsInextVisits arg_to_- _t_params = rule545 _lhsIparams- _t_c_params = rule546 _lhsIparams- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule547 _contpart _inhpart _lhsInt _nameCaller_visit _nameTIn_visit _nameTOut_visit _synpart _t_c_params _t_params arg_ident_- _contpart = rule548 _lhsInt _nameNextState _nextVisitInfo _t_params arg_ident_- _inhpart = rule549 _lhsIinhmap _ppTypeList arg_inh_- _synpart = rule550 _lhsIsynmap _ppTypeList arg_syn_- _ppTypeList = rule551 _lhsInt arg_ident_- _o_sigs = rule552 _lhsIoptions- _lhsOsem_visit :: (StateIdentifier,PP_Doc) - _lhsOsem_visit = rule553 _lhsInt _nameTIn_visit _nameTOut_visit _o_sigs _stepsIsem_steps _t_params arg_from_ arg_ident_ arg_inh_- _stepsOfollow = rule554 _nextStBuild _resultval- _nextArgsMp = rule555 _lhsIallintramap arg_to_- _nextArgs = rule556 _nextArgsMp- _nextStExp = rule557 _lhsIoptions _nextArgs _nextArgsMp arg_to_- _resultval = rule558 _lhsInt _nextStRefExp arg_ident_ arg_syn_- (_nextStBuild,_nextStRefExp) = rule559 _lhsInt _nextStExp _nextVisitInfo arg_ident_- _stepsOkind = rule560 arg_kind_- _stepsOindex = rule561 ()- _stepsOprevMaxSimRefs = rule562 ()- _stepsOuseParallel = rule563 ()- _prevVisitInfo = rule564 _lhsInextVisits arg_from_- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule565 _invokecode arg_ident_- _invokecode = rule566 _lhsInt _nameTOut_visit _nextVisitInfo _o_sigs _prevVisitInfo arg_from_ arg_ident_ arg_inh_ arg_kind_ arg_syn_ arg_to_- _thisintra = rule567 _defsAsMap _nextintra _uses- _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))- _lhsOintramap = rule568 _thisintra arg_from_- _nextintra = rule569 _lhsIallintramap arg_to_- _uses = rule570 _stepsIuses arg_syn_- _inhVarNms = rule571 arg_inh_- _defs = rule572 _inhVarNms _lhsIterminaldefs _stepsIdefs- _defsAsMap = rule573 _defs- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule574 arg_ident_ arg_syn_- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule575 arg_ident_ arg_inh_- _lazyIntrasInh = rule576 _inhVarNms _stepsIdefs arg_kind_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule577 _lazyIntrasInh _stepsIlazyIntras- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule578 arg_from_ arg_ident_ arg_to_- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule579 arg_ident_ arg_kind_- _lhsOerrors :: Seq Error- _lhsOerrors = rule580 _stepsIerrors- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule581 _stepsIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule582 _stepsIruleUsage- _stepsOallFromToStates = rule583 _lhsIallFromToStates- _stepsOallInitStates = rule584 _lhsIallInitStates- _stepsOallVisitKinds = rule585 _lhsIallVisitKinds- _stepsOallchildvisit = rule586 _lhsIallchildvisit- _stepsOavisitdefs = rule587 _lhsIavisitdefs- _stepsOavisituses = rule588 _lhsIavisituses- _stepsOchildTypes = rule589 _lhsIchildTypes- _stepsOchildintros = rule590 _lhsIchildintros- _stepsOmrules = rule591 _lhsImrules- _stepsOoptions = rule592 _lhsIoptions- _stepsOruledefs = rule593 _lhsIruledefs- _stepsOruleuses = rule594 _lhsIruleuses- __result_ = T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_Visit_s47 v46- {-# INLINE rule539 #-}- {-# LINE 434 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule539 = \ from_ ident_ to_ ->- {-# LINE 434 "./src-ag/ExecutionPlan2Caml.ag" #-}- (ident_, from_, to_)- {-# LINE 4484 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule540 #-}- {-# LINE 537 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule540 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 537 "./src-ag/ExecutionPlan2Caml.ag" #-}- conNmTVisitIn _lhsInt ident_- {-# LINE 4490 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule541 #-}- {-# LINE 538 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule541 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 538 "./src-ag/ExecutionPlan2Caml.ag" #-}- conNmTVisitOut _lhsInt ident_- {-# LINE 4496 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule542 #-}- {-# LINE 539 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule542 = \ ((_lhsInt) :: NontermIdent) to_ ->- {-# LINE 539 "./src-ag/ExecutionPlan2Caml.ag" #-}- type_nt_sem _lhsInt to_- {-# LINE 4502 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule543 #-}- {-# LINE 540 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule543 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 540 "./src-ag/ExecutionPlan2Caml.ag" #-}- type_caller_visit _lhsInt ident_- {-# LINE 4508 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule544 #-}- {-# LINE 542 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule544 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->- {-# LINE 542 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault ManyVis to_ _lhsInextVisits- {-# LINE 4514 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule545 #-}- {-# LINE 544 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule545 = \ ((_lhsIparams) :: [Identifier]) ->- {-# LINE 544 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTypeParams _lhsIparams- {-# LINE 4520 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule546 #-}- {-# LINE 545 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule546 = \ ((_lhsIparams) :: [Identifier]) ->- {-# LINE 545 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppTypeParams (cont_tvar : map pp _lhsIparams)- {-# LINE 4526 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule547 #-}- {-# LINE 549 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule547 = \ _contpart _inhpart ((_lhsInt) :: NontermIdent) _nameCaller_visit _nameTIn_visit _nameTOut_visit _synpart _t_c_params _t_params ident_ ->- {-# LINE 549 "./src-ag/ExecutionPlan2Caml.ag" #-}- "and" >#< _t_c_params >#< _nameCaller_visit >#< "=" >#< ppRecordTp- [ nm_inh _lhsInt ident_ >#< ":" >#< _t_params >#< conNmTVisitIn _lhsInt ident_- , nm_cont _lhsInt ident_ >#< ":" >#< _t_params >#< conNmTVisitOut _lhsInt ident_ >#< "->" >#< cont_tvar- ]- >-< "and" >#< _t_params >#< _nameTIn_visit >#< "=" >#< ppRecordTp _inhpart- >-< "and" >#< _t_params >#< _nameTOut_visit >#< "=" >#< ppRecordTp (_synpart ++ _contpart )- {-# LINE 4537 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule548 #-}- {-# LINE 556 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule548 = \ ((_lhsInt) :: NontermIdent) _nameNextState _nextVisitInfo _t_params ident_ ->- {-# LINE 556 "./src-ag/ExecutionPlan2Caml.ag" #-}- case _nextVisitInfo of- NoneVis -> []- _ -> [ nm_outarg_cont _lhsInt ident_ >#< ":" >#< _t_params >#< _nameNextState ]- {-# LINE 4545 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule549 #-}- {-# LINE 560 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule549 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->- {-# LINE 560 "./src-ag/ExecutionPlan2Caml.ag" #-}- _ppTypeList nm_inarg inh_ _lhsIinhmap- {-# LINE 4551 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule550 #-}- {-# LINE 561 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule550 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->- {-# LINE 561 "./src-ag/ExecutionPlan2Caml.ag" #-}- _ppTypeList nm_outarg syn_ _lhsIsynmap- {-# LINE 4557 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule551 #-}- {-# LINE 562 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule551 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 562 "./src-ag/ExecutionPlan2Caml.ag" #-}- \f s m -> map (\i -> case Map.lookup i m of- Just tp -> f i _lhsInt ident_ >#< ":" >#< ppTp tp ) $ Set.toList s- {-# LINE 4564 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule552 #-}- {-# LINE 796 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule552 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 796 "./src-ag/ExecutionPlan2Caml.ag" #-}- typeSigs _lhsIoptions- {-# LINE 4570 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule553 #-}- {-# LINE 797 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule553 = \ ((_lhsInt) :: NontermIdent) _nameTIn_visit _nameTOut_visit _o_sigs ((_stepsIsem_steps) :: PP_Doc) _t_params from_ ident_ inh_ ->- {-# LINE 797 "./src-ag/ExecutionPlan2Caml.ag" #-}- ( from_- , let resTp = _t_params >#< _nameTOut_visit- argTp = _t_params >#< _nameTIn_visit- argMatch = ppRecordVal [ nm_inarg i _lhsInt ident_ >#< "=" >#< lhsname True i | i <- Set.toList inh_ ]- in ppFunDecl _o_sigs (nm_visit ident_) [(argMatch, argTp)] resTp _stepsIsem_steps- )- {-# LINE 4581 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule554 #-}- {-# LINE 804 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule554 = \ _nextStBuild _resultval ->- {-# LINE 804 "./src-ag/ExecutionPlan2Caml.ag" #-}- _nextStBuild >-< _resultval- {-# LINE 4587 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule555 #-}- {-# LINE 806 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule555 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->- {-# LINE 806 "./src-ag/ExecutionPlan2Caml.ag" #-}- maybe Map.empty id $ Map.lookup to_ _lhsIallintramap- {-# LINE 4593 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule556 #-}- {-# LINE 807 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule556 = \ _nextArgsMp ->- {-# LINE 807 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppSpaced $ Map.keys $ _nextArgsMp- {-# LINE 4599 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule557 #-}- {-# LINE 808 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule557 = \ ((_lhsIoptions) :: Options) _nextArgs _nextArgsMp to_ ->- {-# LINE 808 "./src-ag/ExecutionPlan2Caml.ag" #-}- nm_st to_ >#< _nextArgs >#< dummyArg _lhsIoptions (Map.null _nextArgsMp )- {-# LINE 4605 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule558 #-}- {-# LINE 810 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule558 = \ ((_lhsInt) :: NontermIdent) _nextStRefExp ident_ syn_ ->- {-# LINE 810 "./src-ag/ExecutionPlan2Caml.ag" #-}- ppRecordVal- ( [ nm_outarg i _lhsInt ident_ >#< "=" >#< lhsname False i | i <- Set.toList syn_ ]- ++ [ _nextStRefExp ])- {-# LINE 4613 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule559 #-}- {-# LINE 815 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule559 = \ ((_lhsInt) :: NontermIdent) _nextStExp _nextVisitInfo ident_ ->- {-# LINE 815 "./src-ag/ExecutionPlan2Caml.ag" #-}- case _nextVisitInfo of- NoneVis -> (empty, empty)- _ -> ( "let" >#< nextStName >#< "=" >#< _nextStExp >#< "in"- , nm_outarg_cont _lhsInt ident_ >#< "=" >#< nextStName)- {-# LINE 4622 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule560 #-}- {-# LINE 830 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule560 = \ kind_ ->- {-# LINE 830 "./src-ag/ExecutionPlan2Caml.ag" #-}- kind_- {-# LINE 4628 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule561 #-}- {-# LINE 882 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule561 = \ (_ :: ()) ->- {-# LINE 882 "./src-ag/ExecutionPlan2Caml.ag" #-}- 0- {-# LINE 4634 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule562 #-}- {-# LINE 889 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule562 = \ (_ :: ()) ->- {-# LINE 889 "./src-ag/ExecutionPlan2Caml.ag" #-}- 0- {-# LINE 4640 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule563 #-}- {-# LINE 906 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule563 = \ (_ :: ()) ->- {-# LINE 906 "./src-ag/ExecutionPlan2Caml.ag" #-}- False- {-# LINE 4646 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule564 #-}- {-# LINE 1162 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule564 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->- {-# LINE 1162 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault ManyVis from_ _lhsInextVisits- {-# LINE 4652 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule565 #-}- {-# LINE 1163 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule565 = \ _invokecode ident_ ->- {-# LINE 1163 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton ident_ _invokecode- {-# LINE 4658 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule566 #-}- {-# LINE 1165 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule566 = \ ((_lhsInt) :: NontermIdent) _nameTOut_visit _nextVisitInfo _o_sigs _prevVisitInfo from_ ident_ inh_ kind_ syn_ to_ ->- {-# LINE 1165 "./src-ag/ExecutionPlan2Caml.ag" #-}- \chld childTp kind follow ->- let code = cont >-< inps >-< call- childNmTo = text $ stname chld to_- childNmFrom = text $ stname chld from_- childTpArgs = case childTp of- NT _ args _ -> args- _ -> error "generate visit call: type of the child is not a nonterminal!"- cont = "let" >#< contNm >#< ppArg _o_sigs (ppRecordVal cont_in) cont_in_tp >#< "="- >-< indent 2 follow- >#< "in"- cont_in = [ nm_outarg i _lhsInt ident_ >#< "=" >#< attrname True chld i | i <- Set.toList syn_ ]- ++ case _nextVisitInfo of- NoneVis -> []- _ -> [ nm_outarg_cont _lhsInt ident_ >#< "=" >#< childNmTo ]- cont_in_tp = ppTypeParams childTpArgs >#< _nameTOut_visit- inps = "let" >#< inpsNm >#< "=" >#< ppRecordVal- [ nm_inh _lhsInt ident_ >#< "=" >#< ppRecordVal inps_in- , nm_cont _lhsInt ident_ >#< "=" >#< contNm- ] >#< "in"- inps_in = [ nm_inarg i _lhsInt ident_ >#< "=" >#< attrname False chld i | i <- Set.toList inh_ ]- call = childNmFrom >|< "." >|< nm_invoke _lhsInt from_ >#< arg- arg = case _prevVisitInfo of- NoneVis -> error "error: invocation of a visit from a state that has no next visits"- OneVis _ -> pp inpsNm- ManyVis -> pp_parens (con_visit _lhsInt ident_ >#< inpsNm)- in if kind `compatibleKind` kind_- then Right code- else Left $ IncompatibleVisitKind chld ident_ kind kind_- {-# LINE 4691 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule567 #-}- {-# LINE 1270 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule567 = \ _defsAsMap _nextintra _uses ->- {-# LINE 1270 "./src-ag/ExecutionPlan2Caml.ag" #-}- (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap- {-# LINE 4697 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule568 #-}- {-# LINE 1271 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule568 = \ _thisintra from_ ->- {-# LINE 1271 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton from_ _thisintra- {-# LINE 4703 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule569 #-}- {-# LINE 1272 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule569 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->- {-# LINE 1272 "./src-ag/ExecutionPlan2Caml.ag" #-}- maybe Map.empty id $ Map.lookup to_ _lhsIallintramap- {-# LINE 4709 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule570 #-}- {-# LINE 1273 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule570 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->- {-# LINE 1273 "./src-ag/ExecutionPlan2Caml.ag" #-}- let mp1 = _stepsIuses- mp2 = Map.fromList [ (lhsname False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]- in mp1 `Map.union` mp2- {-# LINE 4717 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule571 #-}- {-# LINE 1276 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule571 = \ inh_ ->- {-# LINE 1276 "./src-ag/ExecutionPlan2Caml.ag" #-}- Set.map (lhsname True) inh_- {-# LINE 4723 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule572 #-}- {-# LINE 1277 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule572 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->- {-# LINE 1277 "./src-ag/ExecutionPlan2Caml.ag" #-}- _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs- {-# LINE 4729 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule573 #-}- {-# LINE 1278 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule573 = \ _defs ->- {-# LINE 1278 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]- {-# LINE 4735 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule574 #-}- {-# LINE 1302 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule574 = \ ident_ syn_ ->- {-# LINE 1302 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton ident_ syn_- {-# LINE 4741 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule575 #-}- {-# LINE 1303 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule575 = \ ident_ inh_ ->- {-# LINE 1303 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton ident_ inh_- {-# LINE 4747 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule576 #-}- {-# LINE 1335 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule576 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->- {-# LINE 1335 "./src-ag/ExecutionPlan2Caml.ag" #-}- case kind_ of- VisitPure False -> _inhVarNms `Set.union` _stepsIdefs- _ -> Set.empty- {-# LINE 4755 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule577 #-}- {-# LINE 1338 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule577 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->- {-# LINE 1338 "./src-ag/ExecutionPlan2Caml.ag" #-}- _lazyIntrasInh `Set.union` _stepsIlazyIntras- {-# LINE 4761 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule578 #-}- {-# LINE 1401 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule578 = \ from_ ident_ to_ ->- {-# LINE 1401 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton ident_ (from_, to_)- {-# LINE 4767 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule579 #-}- {-# LINE 1445 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule579 = \ ident_ kind_ ->- {-# LINE 1445 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton ident_ kind_- {-# LINE 4773 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule580 #-}- rule580 = \ ((_stepsIerrors) :: Seq Error) ->- _stepsIerrors- {-# INLINE rule581 #-}- rule581 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _stepsIruleKinds- {-# INLINE rule582 #-}- rule582 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->- _stepsIruleUsage- {-# INLINE rule583 #-}- rule583 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule584 #-}- rule584 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule585 #-}- rule585 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule586 #-}- rule586 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule587 #-}- rule587 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule588 #-}- rule588 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule589 #-}- rule589 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule590 #-}- rule590 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule591 #-}- rule591 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule592 #-}- rule592 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule593 #-}- rule593 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule594 #-}- rule594 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses---- VisitStep ------------------------------------------------------ wrapper-data Inh_VisitStep = Inh_VisitStep { allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitStep :: (Map NontermIdent Int), allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitStep :: (Map Identifier Type), childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), follow_Inh_VisitStep :: (PP_Doc), index_Inh_VisitStep :: (Int), isLast_Inh_VisitStep :: (Bool), kind_Inh_VisitStep :: (VisitKind), mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> Either Error PP_Doc)), options_Inh_VisitStep :: (Options), prevMaxSimRefs_Inh_VisitStep :: (Int), ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitStep :: (Bool) }-data Syn_VisitStep = Syn_VisitStep { defs_Syn_VisitStep :: (Set String), errors_Syn_VisitStep :: (Seq Error), index_Syn_VisitStep :: (Int), isLast_Syn_VisitStep :: (Bool), lazyIntras_Syn_VisitStep :: (Set String), prevMaxSimRefs_Syn_VisitStep :: (Int), ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitStep :: (Map Identifier Int), sem_steps_Syn_VisitStep :: (PP_Doc), uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }-{-# INLINABLE wrap_VisitStep #-}-wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> (Syn_VisitStep )-wrap_VisitStep (T_VisitStep act) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel- (T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds) <- return (inv_VisitStep_s50 sem arg)- return (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds)- )---- cata-{-# NOINLINE sem_VisitStep #-}-sem_VisitStep :: VisitStep -> T_VisitStep -sem_VisitStep ( Sem name_ ) = sem_VisitStep_Sem name_-sem_VisitStep ( ChildVisit child_ nonterm_ visit_ ) = sem_VisitStep_ChildVisit child_ nonterm_ visit_-sem_VisitStep ( PureGroup steps_ ordered_ ) = sem_VisitStep_PureGroup ( sem_VisitSteps steps_ ) ordered_-sem_VisitStep ( Sim steps_ ) = sem_VisitStep_Sim ( sem_VisitSteps steps_ )-sem_VisitStep ( ChildIntro child_ ) = sem_VisitStep_ChildIntro child_---- semantic domain-newtype T_VisitStep = T_VisitStep {- attach_T_VisitStep :: Identity (T_VisitStep_s50 )- }-newtype T_VisitStep_s50 = C_VisitStep_s50 {- inv_VisitStep_s50 :: (T_VisitStep_v49 )- }-data T_VisitStep_s51 = C_VisitStep_s51-type T_VisitStep_v49 = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )-data T_VisitStep_vIn49 = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)-data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)-{-# NOINLINE sem_VisitStep_Sem #-}-sem_VisitStep_Sem :: (Identifier) -> T_VisitStep -sem_VisitStep_Sem arg_name_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _ruleItf = rule595 _lhsImrules arg_name_- _lhsOerrors :: Seq Error- (_lhsOerrors,_sem_steps) = rule596 _lhsIkind _ruleItf- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule597 _lhsIfollow _sem_steps- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule598 arg_name_- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule599 _lhsIkind arg_name_- _lhsOdefs :: Set String- _lhsOdefs = rule600 _lhsIruledefs arg_name_- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule601 _lhsIruleuses arg_name_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule602 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule603 ()- _lhsOindex :: Int- _lhsOindex = rule604 _lhsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule605 _lhsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule606 _lhsIprevMaxSimRefs- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule595 #-}- {-# LINE 847 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule595 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) name_ ->- {-# LINE 847 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules- {-# LINE 4892 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule596 #-}- {-# LINE 848 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule596 = \ ((_lhsIkind) :: VisitKind) _ruleItf ->- {-# LINE 848 "./src-ag/ExecutionPlan2Caml.ag" #-}- case _ruleItf _lhsIkind of- Left e -> (Seq.singleton e, empty)- Right stmt -> (Seq.empty, stmt)- {-# LINE 4900 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule597 #-}- {-# LINE 851 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule597 = \ ((_lhsIfollow) :: PP_Doc) _sem_steps ->- {-# LINE 851 "./src-ag/ExecutionPlan2Caml.ag" #-}- _sem_steps >-< _lhsIfollow- {-# LINE 4906 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule598 #-}- {-# LINE 1223 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule598 = \ name_ ->- {-# LINE 1223 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ 1- {-# LINE 4912 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule599 #-}- {-# LINE 1233 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule599 = \ ((_lhsIkind) :: VisitKind) name_ ->- {-# LINE 1233 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.singleton name_ (Set.singleton _lhsIkind)- {-# LINE 4918 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule600 #-}- {-# LINE 1318 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule600 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->- {-# LINE 1318 "./src-ag/ExecutionPlan2Caml.ag" #-}- maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs- {-# LINE 4924 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule601 #-}- {-# LINE 1319 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule601 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->- {-# LINE 1319 "./src-ag/ExecutionPlan2Caml.ag" #-}- maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses- {-# LINE 4930 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule602 #-}- rule602 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule603 #-}- rule603 = \ (_ :: ()) ->- mempty- {-# INLINE rule604 #-}- rule604 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule605 #-}- rule605 = \ ((_lhsIisLast) :: Bool) ->- _lhsIisLast- {-# INLINE rule606 #-}- rule606 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs-{-# NOINLINE sem_VisitStep_ChildVisit #-}-sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep -sem_VisitStep_ChildVisit arg_child_ _ arg_visit_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _visitItf = rule607 _lhsIallchildvisit arg_visit_- _childType = rule608 _lhsIchildTypes arg_child_- _lhsOerrors :: Seq Error- _lhsOsem_steps :: PP_Doc- (_lhsOerrors,_lhsOsem_steps) = rule609 _childType _lhsIfollow _lhsIkind _visitItf arg_child_- _lhsOdefs :: Set String- _lhsOdefs = rule610 _lhsIavisitdefs _to arg_child_ arg_visit_- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule611 _from _lhsIavisituses arg_child_ arg_visit_- (_from,_to) = rule612 _lhsIallFromToStates arg_visit_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule613 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule614 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule615 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule616 ()- _lhsOindex :: Int- _lhsOindex = rule617 _lhsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule618 _lhsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule619 _lhsIprevMaxSimRefs- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule607 #-}- {-# LINE 858 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule607 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) visit_ ->- {-# LINE 858 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit- {-# LINE 4985 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule608 #-}- {-# LINE 859 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule608 = \ ((_lhsIchildTypes) :: Map Identifier Type) child_ ->- {-# LINE 859 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault (error ("type of child " ++ show child_ ++ " is not in the childTypes map! " ++ show _lhsIchildTypes)) child_ _lhsIchildTypes- {-# LINE 4991 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule609 #-}- {-# LINE 860 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule609 = \ _childType ((_lhsIfollow) :: PP_Doc) ((_lhsIkind) :: VisitKind) _visitItf child_ ->- {-# LINE 860 "./src-ag/ExecutionPlan2Caml.ag" #-}- case _visitItf child_ _childType _lhsIkind _lhsIfollow of- Left e -> (Seq.singleton e, empty)- Right steps -> (Seq.empty, steps)- {-# LINE 4999 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule610 #-}- {-# LINE 1320 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule610 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) _to child_ visit_ ->- {-# LINE 1320 "./src-ag/ExecutionPlan2Caml.ag" #-}- Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname True child_) $ Map.lookup visit_ _lhsIavisitdefs- {-# LINE 5005 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule611 #-}- {-# LINE 1321 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule611 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) child_ visit_ ->- {-# LINE 1321 "./src-ag/ExecutionPlan2Caml.ag" #-}- let convert attrs = Map.fromList [ (attrname False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]- in Map.insert (stname child_ _from) Nothing $ convert $- maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses- {-# LINE 5013 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule612 #-}- {-# LINE 1407 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule612 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->- {-# LINE 1407 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates- {-# LINE 5019 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule613 #-}- rule613 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule614 #-}- rule614 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule615 #-}- rule615 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule616 #-}- rule616 = \ (_ :: ()) ->- mempty- {-# INLINE rule617 #-}- rule617 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule618 #-}- rule618 = \ ((_lhsIisLast) :: Bool) ->- _lhsIisLast- {-# INLINE rule619 #-}- rule619 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs-{-# NOINLINE sem_VisitStep_PureGroup #-}-sem_VisitStep_PureGroup :: T_VisitSteps -> (Bool) -> T_VisitStep -sem_VisitStep_PureGroup arg_steps_ arg_ordered_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))- (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfollow _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)- _stepsOkind = rule620 arg_ordered_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule621 _stepsIdefs _stepsIlazyIntras arg_ordered_- _lhsOdefs :: Set String- _lhsOdefs = rule622 _stepsIdefs- _lhsOerrors :: Seq Error- _lhsOerrors = rule623 _stepsIerrors- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule624 _stepsIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule625 _stepsIruleUsage- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule626 _stepsIsem_steps- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule627 _stepsIuses- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule628 _stepsIvisitKinds- _lhsOindex :: Int- _lhsOindex = rule629 _stepsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule630 _stepsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule631 _stepsIprevMaxSimRefs- _stepsOallFromToStates = rule632 _lhsIallFromToStates- _stepsOallInitStates = rule633 _lhsIallInitStates- _stepsOallVisitKinds = rule634 _lhsIallVisitKinds- _stepsOallchildvisit = rule635 _lhsIallchildvisit- _stepsOavisitdefs = rule636 _lhsIavisitdefs- _stepsOavisituses = rule637 _lhsIavisituses- _stepsOchildTypes = rule638 _lhsIchildTypes- _stepsOchildintros = rule639 _lhsIchildintros- _stepsOfollow = rule640 _lhsIfollow- _stepsOindex = rule641 _lhsIindex- _stepsOmrules = rule642 _lhsImrules- _stepsOoptions = rule643 _lhsIoptions- _stepsOprevMaxSimRefs = rule644 _lhsIprevMaxSimRefs- _stepsOruledefs = rule645 _lhsIruledefs- _stepsOruleuses = rule646 _lhsIruleuses- _stepsOuseParallel = rule647 _lhsIuseParallel- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule620 #-}- {-# LINE 834 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule620 = \ ordered_ ->- {-# LINE 834 "./src-ag/ExecutionPlan2Caml.ag" #-}- VisitPure ordered_- {-# LINE 5097 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule621 #-}- {-# LINE 1341 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule621 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->- {-# LINE 1341 "./src-ag/ExecutionPlan2Caml.ag" #-}- if ordered_- then _stepsIlazyIntras- else _stepsIdefs- {-# LINE 5105 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule622 #-}- rule622 = \ ((_stepsIdefs) :: Set String) ->- _stepsIdefs- {-# INLINE rule623 #-}- rule623 = \ ((_stepsIerrors) :: Seq Error) ->- _stepsIerrors- {-# INLINE rule624 #-}- rule624 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _stepsIruleKinds- {-# INLINE rule625 #-}- rule625 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->- _stepsIruleUsage- {-# INLINE rule626 #-}- rule626 = \ ((_stepsIsem_steps) :: PP_Doc) ->- _stepsIsem_steps- {-# INLINE rule627 #-}- rule627 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->- _stepsIuses- {-# INLINE rule628 #-}- rule628 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _stepsIvisitKinds- {-# INLINE rule629 #-}- rule629 = \ ((_stepsIindex) :: Int) ->- _stepsIindex- {-# INLINE rule630 #-}- rule630 = \ ((_stepsIisLast) :: Bool) ->- _stepsIisLast- {-# INLINE rule631 #-}- rule631 = \ ((_stepsIprevMaxSimRefs) :: Int) ->- _stepsIprevMaxSimRefs- {-# INLINE rule632 #-}- rule632 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule633 #-}- rule633 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule634 #-}- rule634 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule635 #-}- rule635 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule636 #-}- rule636 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule637 #-}- rule637 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule638 #-}- rule638 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule639 #-}- rule639 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule640 #-}- rule640 = \ ((_lhsIfollow) :: PP_Doc) ->- _lhsIfollow- {-# INLINE rule641 #-}- rule641 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule642 #-}- rule642 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule643 #-}- rule643 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule644 #-}- rule644 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs- {-# INLINE rule645 #-}- rule645 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule646 #-}- rule646 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule647 #-}- rule647 = \ ((_lhsIuseParallel) :: Bool) ->- _lhsIuseParallel-{-# NOINLINE sem_VisitStep_Sim #-}-sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep -sem_VisitStep_Sim arg_steps_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))- (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfollow _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)- _stepsOindex = rule648 ()- _lhsOindex :: Int- _lhsOindex = rule649 _lhsIindex- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule650 _lhsIprevMaxSimRefs _stepsIindex _useParallel- _useParallel = rule651 _lhsIoptions _stepsIsize- _lhsOdefs :: Set String- _lhsOdefs = rule652 _stepsIdefs- _lhsOerrors :: Seq Error- _lhsOerrors = rule653 _stepsIerrors- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule654 _stepsIlazyIntras- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule655 _stepsIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule656 _stepsIruleUsage- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule657 _stepsIsem_steps- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule658 _stepsIuses- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule659 _stepsIvisitKinds- _lhsOisLast :: Bool- _lhsOisLast = rule660 _stepsIisLast- _stepsOallFromToStates = rule661 _lhsIallFromToStates- _stepsOallInitStates = rule662 _lhsIallInitStates- _stepsOallVisitKinds = rule663 _lhsIallVisitKinds- _stepsOallchildvisit = rule664 _lhsIallchildvisit- _stepsOavisitdefs = rule665 _lhsIavisitdefs- _stepsOavisituses = rule666 _lhsIavisituses- _stepsOchildTypes = rule667 _lhsIchildTypes- _stepsOchildintros = rule668 _lhsIchildintros- _stepsOfollow = rule669 _lhsIfollow- _stepsOkind = rule670 _lhsIkind- _stepsOmrules = rule671 _lhsImrules- _stepsOoptions = rule672 _lhsIoptions- _stepsOprevMaxSimRefs = rule673 _lhsIprevMaxSimRefs- _stepsOruledefs = rule674 _lhsIruledefs- _stepsOruleuses = rule675 _lhsIruleuses- _stepsOuseParallel = rule676 _useParallel- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule648 #-}- {-# LINE 883 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule648 = \ (_ :: ()) ->- {-# LINE 883 "./src-ag/ExecutionPlan2Caml.ag" #-}- 0- {-# LINE 5241 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule649 #-}- {-# LINE 884 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule649 = \ ((_lhsIindex) :: Int) ->- {-# LINE 884 "./src-ag/ExecutionPlan2Caml.ag" #-}- _lhsIindex- {-# LINE 5247 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule650 #-}- {-# LINE 891 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule650 = \ ((_lhsIprevMaxSimRefs) :: Int) ((_stepsIindex) :: Int) _useParallel ->- {-# LINE 891 "./src-ag/ExecutionPlan2Caml.ag" #-}- if _useParallel- then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)- else _lhsIprevMaxSimRefs- {-# LINE 5255 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule651 #-}- {-# LINE 907 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule651 = \ ((_lhsIoptions) :: Options) ((_stepsIsize) :: Int) ->- {-# LINE 907 "./src-ag/ExecutionPlan2Caml.ag" #-}- parallelInvoke _lhsIoptions && _stepsIsize > 1- {-# LINE 5261 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule652 #-}- rule652 = \ ((_stepsIdefs) :: Set String) ->- _stepsIdefs- {-# INLINE rule653 #-}- rule653 = \ ((_stepsIerrors) :: Seq Error) ->- _stepsIerrors- {-# INLINE rule654 #-}- rule654 = \ ((_stepsIlazyIntras) :: Set String) ->- _stepsIlazyIntras- {-# INLINE rule655 #-}- rule655 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _stepsIruleKinds- {-# INLINE rule656 #-}- rule656 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->- _stepsIruleUsage- {-# INLINE rule657 #-}- rule657 = \ ((_stepsIsem_steps) :: PP_Doc) ->- _stepsIsem_steps- {-# INLINE rule658 #-}- rule658 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->- _stepsIuses- {-# INLINE rule659 #-}- rule659 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _stepsIvisitKinds- {-# INLINE rule660 #-}- rule660 = \ ((_stepsIisLast) :: Bool) ->- _stepsIisLast- {-# INLINE rule661 #-}- rule661 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule662 #-}- rule662 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule663 #-}- rule663 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule664 #-}- rule664 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule665 #-}- rule665 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule666 #-}- rule666 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule667 #-}- rule667 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule668 #-}- rule668 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule669 #-}- rule669 = \ ((_lhsIfollow) :: PP_Doc) ->- _lhsIfollow- {-# INLINE rule670 #-}- rule670 = \ ((_lhsIkind) :: VisitKind) ->- _lhsIkind- {-# INLINE rule671 #-}- rule671 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule672 #-}- rule672 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule673 #-}- rule673 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs- {-# INLINE rule674 #-}- rule674 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule675 #-}- rule675 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule676 #-}- rule676 = \ _useParallel ->- _useParallel-{-# NOINLINE sem_VisitStep_ChildIntro #-}-sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep -sem_VisitStep_ChildIntro arg_child_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _attachItf = rule677 _lhsIchildintros arg_child_- _lhsOerrors :: Seq Error- _lhsOdefs :: Set String- _lhsOuses :: Map String (Maybe NonLocalAttr)- (_lhsOerrors,_sem_steps,_lhsOdefs,_lhsOuses) = rule678 _attachItf _lhsIkind- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule679 _lhsIfollow _sem_steps- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule680 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule681 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule682 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule683 ()- _lhsOindex :: Int- _lhsOindex = rule684 _lhsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule685 _lhsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule686 _lhsIprevMaxSimRefs- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule677 #-}- {-# LINE 852 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule677 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->- {-# LINE 852 "./src-ag/ExecutionPlan2Caml.ag" #-}- Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros- {-# LINE 5373 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule678 #-}- {-# LINE 854 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule678 = \ _attachItf ((_lhsIkind) :: VisitKind) ->- {-# LINE 854 "./src-ag/ExecutionPlan2Caml.ag" #-}- case _attachItf _lhsIkind of- Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)- Right (code, defs, uses) -> (Seq.empty, code, defs, uses)- {-# LINE 5381 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule679 #-}- {-# LINE 857 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule679 = \ ((_lhsIfollow) :: PP_Doc) _sem_steps ->- {-# LINE 857 "./src-ag/ExecutionPlan2Caml.ag" #-}- _sem_steps >-< _lhsIfollow- {-# LINE 5387 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule680 #-}- rule680 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule681 #-}- rule681 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule682 #-}- rule682 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule683 #-}- rule683 = \ (_ :: ()) ->- mempty- {-# INLINE rule684 #-}- rule684 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule685 #-}- rule685 = \ ((_lhsIisLast) :: Bool) ->- _lhsIisLast- {-# INLINE rule686 #-}- rule686 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs---- VisitSteps ----------------------------------------------------- wrapper-data Inh_VisitSteps = Inh_VisitSteps { allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitSteps :: (Map Identifier Type), childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), follow_Inh_VisitSteps :: (PP_Doc), index_Inh_VisitSteps :: (Int), kind_Inh_VisitSteps :: (VisitKind), mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> Either Error PP_Doc)), options_Inh_VisitSteps :: (Options), prevMaxSimRefs_Inh_VisitSteps :: (Int), ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitSteps :: (Bool) }-data Syn_VisitSteps = Syn_VisitSteps { defs_Syn_VisitSteps :: (Set String), errors_Syn_VisitSteps :: (Seq Error), index_Syn_VisitSteps :: (Int), isLast_Syn_VisitSteps :: (Bool), lazyIntras_Syn_VisitSteps :: (Set String), prevMaxSimRefs_Syn_VisitSteps :: (Int), ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitSteps :: (Map Identifier Int), sem_steps_Syn_VisitSteps :: (PP_Doc), size_Syn_VisitSteps :: (Int), uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }-{-# INLINABLE wrap_VisitSteps #-}-wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> (Syn_VisitSteps )-wrap_VisitSteps (T_VisitSteps act) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel- (T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds) <- return (inv_VisitSteps_s53 sem arg)- return (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds)- )---- cata-{-# NOINLINE sem_VisitSteps #-}-sem_VisitSteps :: VisitSteps -> T_VisitSteps -sem_VisitSteps list = Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list)---- semantic domain-newtype T_VisitSteps = T_VisitSteps {- attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )- }-newtype T_VisitSteps_s53 = C_VisitSteps_s53 {- inv_VisitSteps_s53 :: (T_VisitSteps_v52 )- }-data T_VisitSteps_s54 = C_VisitSteps_s54-type T_VisitSteps_v52 = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )-data T_VisitSteps_vIn52 = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Int) (VisitKind) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)-data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)-{-# NOINLINE sem_VisitSteps_Cons #-}-sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps -sem_VisitSteps_Cons arg_hd_ arg_tl_ = T_VisitSteps (return st53) where- {-# NOINLINE st53 #-}- st53 = let- v52 :: T_VisitSteps_v52 - v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _hdX50 = Control.Monad.Identity.runIdentity (attach_T_VisitStep (arg_hd_))- _tlX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_tl_))- (T_VisitStep_vOut49 _hdIdefs _hdIerrors _hdIindex _hdIisLast _hdIlazyIntras _hdIprevMaxSimRefs _hdIruleKinds _hdIruleUsage _hdIsem_steps _hdIuses _hdIvisitKinds) = inv_VisitStep_s50 _hdX50 (T_VisitStep_vIn49 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfollow _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOprevMaxSimRefs _hdOruledefs _hdOruleuses _hdOuseParallel)- (T_VisitSteps_vOut52 _tlIdefs _tlIerrors _tlIindex _tlIisLast _tlIlazyIntras _tlIprevMaxSimRefs _tlIruleKinds _tlIruleUsage _tlIsem_steps _tlIsize _tlIuses _tlIvisitKinds) = inv_VisitSteps_s53 _tlX53 (T_VisitSteps_vIn52 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfollow _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOprevMaxSimRefs _tlOruledefs _tlOruleuses _tlOuseParallel)- _hdOfollow = rule687 _tlIsem_steps- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule688 _hdIsem_steps- _lhsOsize :: Int- _lhsOsize = rule689 _tlIsize- _hdOindex = rule690 _lhsIindex- _tlOindex = rule691 _lhsIindex- _lhsOindex :: Int- _lhsOindex = rule692 _tlIindex- _lhsOisLast :: Bool- _lhsOisLast = rule693 ()- _hdOisLast = rule694 _tlIisLast- _lhsOdefs :: Set String- _lhsOdefs = rule695 _hdIdefs _tlIdefs- _lhsOerrors :: Seq Error- _lhsOerrors = rule696 _hdIerrors _tlIerrors- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule697 _hdIlazyIntras _tlIlazyIntras- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule698 _hdIruleKinds _tlIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule699 _hdIruleUsage _tlIruleUsage- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule700 _hdIuses _tlIuses- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule701 _hdIvisitKinds _tlIvisitKinds- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule702 _tlIprevMaxSimRefs- _hdOallFromToStates = rule703 _lhsIallFromToStates- _hdOallInitStates = rule704 _lhsIallInitStates- _hdOallVisitKinds = rule705 _lhsIallVisitKinds- _hdOallchildvisit = rule706 _lhsIallchildvisit- _hdOavisitdefs = rule707 _lhsIavisitdefs- _hdOavisituses = rule708 _lhsIavisituses- _hdOchildTypes = rule709 _lhsIchildTypes- _hdOchildintros = rule710 _lhsIchildintros- _hdOkind = rule711 _lhsIkind- _hdOmrules = rule712 _lhsImrules- _hdOoptions = rule713 _lhsIoptions- _hdOprevMaxSimRefs = rule714 _lhsIprevMaxSimRefs- _hdOruledefs = rule715 _lhsIruledefs- _hdOruleuses = rule716 _lhsIruleuses- _hdOuseParallel = rule717 _lhsIuseParallel- _tlOallFromToStates = rule718 _lhsIallFromToStates- _tlOallInitStates = rule719 _lhsIallInitStates- _tlOallVisitKinds = rule720 _lhsIallVisitKinds- _tlOallchildvisit = rule721 _lhsIallchildvisit- _tlOavisitdefs = rule722 _lhsIavisitdefs- _tlOavisituses = rule723 _lhsIavisituses- _tlOchildTypes = rule724 _lhsIchildTypes- _tlOchildintros = rule725 _lhsIchildintros- _tlOfollow = rule726 _lhsIfollow- _tlOkind = rule727 _lhsIkind- _tlOmrules = rule728 _lhsImrules- _tlOoptions = rule729 _lhsIoptions- _tlOprevMaxSimRefs = rule730 _hdIprevMaxSimRefs- _tlOruledefs = rule731 _lhsIruledefs- _tlOruleuses = rule732 _lhsIruleuses- _tlOuseParallel = rule733 _lhsIuseParallel- __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitSteps_s53 v52- {-# INLINE rule687 #-}- {-# LINE 842 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule687 = \ ((_tlIsem_steps) :: PP_Doc) ->- {-# LINE 842 "./src-ag/ExecutionPlan2Caml.ag" #-}- _tlIsem_steps- {-# LINE 5518 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule688 #-}- {-# LINE 843 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule688 = \ ((_hdIsem_steps) :: PP_Doc) ->- {-# LINE 843 "./src-ag/ExecutionPlan2Caml.ag" #-}- _hdIsem_steps- {-# LINE 5524 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule689 #-}- {-# LINE 874 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule689 = \ ((_tlIsize) :: Int) ->- {-# LINE 874 "./src-ag/ExecutionPlan2Caml.ag" #-}- 1 + _tlIsize- {-# LINE 5530 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule690 #-}- {-# LINE 879 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule690 = \ ((_lhsIindex) :: Int) ->- {-# LINE 879 "./src-ag/ExecutionPlan2Caml.ag" #-}- _lhsIindex- {-# LINE 5536 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule691 #-}- {-# LINE 880 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule691 = \ ((_lhsIindex) :: Int) ->- {-# LINE 880 "./src-ag/ExecutionPlan2Caml.ag" #-}- 1 + _lhsIindex- {-# LINE 5542 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule692 #-}- {-# LINE 881 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule692 = \ ((_tlIindex) :: Int) ->- {-# LINE 881 "./src-ag/ExecutionPlan2Caml.ag" #-}- _tlIindex- {-# LINE 5548 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule693 #-}- {-# LINE 900 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule693 = \ (_ :: ()) ->- {-# LINE 900 "./src-ag/ExecutionPlan2Caml.ag" #-}- False- {-# LINE 5554 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule694 #-}- {-# LINE 901 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule694 = \ ((_tlIisLast) :: Bool) ->- {-# LINE 901 "./src-ag/ExecutionPlan2Caml.ag" #-}- _tlIisLast- {-# LINE 5560 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule695 #-}- rule695 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->- _hdIdefs `Set.union` _tlIdefs- {-# INLINE rule696 #-}- rule696 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule697 #-}- rule697 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->- _hdIlazyIntras `Set.union` _tlIlazyIntras- {-# INLINE rule698 #-}- rule698 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->- _hdIruleKinds `unionWithMappend` _tlIruleKinds- {-# INLINE rule699 #-}- rule699 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->- _hdIruleUsage `unionWithSum` _tlIruleUsage- {-# INLINE rule700 #-}- rule700 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->- _hdIuses `Map.union` _tlIuses- {-# INLINE rule701 #-}- rule701 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule702 #-}- rule702 = \ ((_tlIprevMaxSimRefs) :: Int) ->- _tlIprevMaxSimRefs- {-# INLINE rule703 #-}- rule703 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule704 #-}- rule704 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule705 #-}- rule705 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule706 #-}- rule706 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule707 #-}- rule707 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule708 #-}- rule708 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule709 #-}- rule709 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule710 #-}- rule710 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule711 #-}- rule711 = \ ((_lhsIkind) :: VisitKind) ->- _lhsIkind- {-# INLINE rule712 #-}- rule712 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule713 #-}- rule713 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule714 #-}- rule714 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs- {-# INLINE rule715 #-}- rule715 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule716 #-}- rule716 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule717 #-}- rule717 = \ ((_lhsIuseParallel) :: Bool) ->- _lhsIuseParallel- {-# INLINE rule718 #-}- rule718 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule719 #-}- rule719 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule720 #-}- rule720 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule721 #-}- rule721 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule722 #-}- rule722 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule723 #-}- rule723 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule724 #-}- rule724 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule725 #-}- rule725 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule726 #-}- rule726 = \ ((_lhsIfollow) :: PP_Doc) ->- _lhsIfollow- {-# INLINE rule727 #-}- rule727 = \ ((_lhsIkind) :: VisitKind) ->- _lhsIkind- {-# INLINE rule728 #-}- rule728 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule729 #-}- rule729 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule730 #-}- rule730 = \ ((_hdIprevMaxSimRefs) :: Int) ->- _hdIprevMaxSimRefs- {-# INLINE rule731 #-}- rule731 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule732 #-}- rule732 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule733 #-}- rule733 = \ ((_lhsIuseParallel) :: Bool) ->- _lhsIuseParallel-{-# NOINLINE sem_VisitSteps_Nil #-}-sem_VisitSteps_Nil :: T_VisitSteps -sem_VisitSteps_Nil = T_VisitSteps (return st53) where- {-# NOINLINE st53 #-}- st53 = let- v52 :: T_VisitSteps_v52 - v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule734 _lhsIfollow- _lhsOsize :: Int- _lhsOsize = rule735 ()- _lhsOisLast :: Bool- _lhsOisLast = rule736 ()- _lhsOdefs :: Set String- _lhsOdefs = rule737 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule738 ()- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule739 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule740 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule741 ()- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule742 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule743 ()- _lhsOindex :: Int- _lhsOindex = rule744 _lhsIindex- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule745 _lhsIprevMaxSimRefs- __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitSteps_s53 v52- {-# INLINE rule734 #-}- {-# LINE 844 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule734 = \ ((_lhsIfollow) :: PP_Doc) ->- {-# LINE 844 "./src-ag/ExecutionPlan2Caml.ag" #-}- _lhsIfollow- {-# LINE 5717 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule735 #-}- {-# LINE 873 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule735 = \ (_ :: ()) ->- {-# LINE 873 "./src-ag/ExecutionPlan2Caml.ag" #-}- 0- {-# LINE 5723 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule736 #-}- {-# LINE 899 "./src-ag/ExecutionPlan2Caml.ag" #-}- rule736 = \ (_ :: ()) ->- {-# LINE 899 "./src-ag/ExecutionPlan2Caml.ag" #-}- True- {-# LINE 5729 "dist/build/ExecutionPlan2Caml.hs"#-}- {-# INLINE rule737 #-}- rule737 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule738 #-}- rule738 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule739 #-}- rule739 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule740 #-}- rule740 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule741 #-}- rule741 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule742 #-}- rule742 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule743 #-}- rule743 = \ (_ :: ()) ->- mempty- {-# INLINE rule744 #-}- rule744 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule745 #-}- rule745 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs---- Visits --------------------------------------------------------- wrapper-data Inh_Visits = Inh_Visits { allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visits :: (Map NontermIdent Attributes), allInitStates_Inh_Visits :: (Map NontermIdent Int), allSynmap_Inh_Visits :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visits :: (Map Identifier Type), childintros_Inh_Visits :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visits :: (ConstructorIdent), inhmap_Inh_Visits :: (Attributes), mrules_Inh_Visits :: (Map Identifier (VisitKind -> Either Error PP_Doc)), nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), nt_Inh_Visits :: (NontermIdent), options_Inh_Visits :: (Options), params_Inh_Visits :: ([Identifier]), prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visits :: (Map Identifier (Set String)), ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visits :: (Attributes), terminaldefs_Inh_Visits :: (Set String) }-data Syn_Visits = Syn_Visits { allvisits_Syn_Visits :: ([VisitStateState]), childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), errors_Syn_Visits :: (Seq Error), fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visits :: (Set String), ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visits :: (Map Identifier Int), sem_visit_Syn_Visits :: ( [(StateIdentifier,PP_Doc)] ), t_visits_Syn_Visits :: (PP_Doc), visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_Visits #-}-wrap_Visits :: T_Visits -> Inh_Visits -> (Syn_Visits )-wrap_Visits (T_Visits act) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs- (T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visits_s56 sem arg)- return (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# NOINLINE sem_Visits #-}-sem_Visits :: Visits -> T_Visits -sem_Visits list = Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list)---- semantic domain-newtype T_Visits = T_Visits {- attach_T_Visits :: Identity (T_Visits_s56 )- }-newtype T_Visits_s56 = C_Visits_s56 {- inv_Visits_s56 :: (T_Visits_v55 )- }-data T_Visits_s57 = C_Visits_s57-type T_Visits_v55 = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )-data T_Visits_vIn55 = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)-data T_Visits_vOut55 = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,PP_Doc)] ) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_Visits_Cons #-}-sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits -sem_Visits_Cons arg_hd_ arg_tl_ = T_Visits (return st56) where- {-# NOINLINE st56 #-}- st56 = let- v55 :: T_Visits_v55 - v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let- _hdX47 = Control.Monad.Identity.runIdentity (attach_T_Visit (arg_hd_))- _tlX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_tl_))- (T_Visit_vOut46 _hdIallvisits _hdIchildvisit _hdIerrors _hdIfromToStates _hdIintramap _hdIlazyIntras _hdIruleKinds _hdIruleUsage _hdIsem_visit _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_Visit_s47 _hdX47 (T_Visit_vIn46 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs)- (T_Visits_vOut55 _tlIallvisits _tlIchildvisit _tlIerrors _tlIfromToStates _tlIintramap _tlIlazyIntras _tlIruleKinds _tlIruleUsage _tlIsem_visit _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_Visits_s56 _tlX56 (T_Visits_vIn55 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs)- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule746 _hdIallvisits _tlIallvisits- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule747 _hdIchildvisit _tlIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule748 _hdIerrors _tlIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule749 _hdIfromToStates _tlIfromToStates- _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))- _lhsOintramap = rule750 _hdIintramap _tlIintramap- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule751 _hdIlazyIntras _tlIlazyIntras- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule752 _hdIruleKinds _tlIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule753 _hdIruleUsage _tlIruleUsage- _lhsOsem_visit :: [(StateIdentifier,PP_Doc)] - _lhsOsem_visit = rule754 _hdIsem_visit _tlIsem_visit- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule755 _hdIt_visits _tlIt_visits- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule756 _hdIvisitKinds _tlIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule757 _hdIvisitdefs _tlIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule758 _hdIvisituses _tlIvisituses- _hdOallFromToStates = rule759 _lhsIallFromToStates- _hdOallInhmap = rule760 _lhsIallInhmap- _hdOallInitStates = rule761 _lhsIallInitStates- _hdOallSynmap = rule762 _lhsIallSynmap- _hdOallVisitKinds = rule763 _lhsIallVisitKinds- _hdOallchildvisit = rule764 _lhsIallchildvisit- _hdOallintramap = rule765 _lhsIallintramap- _hdOavisitdefs = rule766 _lhsIavisitdefs- _hdOavisituses = rule767 _lhsIavisituses- _hdOchildTypes = rule768 _lhsIchildTypes- _hdOchildintros = rule769 _lhsIchildintros- _hdOcon = rule770 _lhsIcon- _hdOinhmap = rule771 _lhsIinhmap- _hdOmrules = rule772 _lhsImrules- _hdOnextVisits = rule773 _lhsInextVisits- _hdOnt = rule774 _lhsInt- _hdOoptions = rule775 _lhsIoptions- _hdOparams = rule776 _lhsIparams- _hdOprevVisits = rule777 _lhsIprevVisits- _hdOruledefs = rule778 _lhsIruledefs- _hdOruleuses = rule779 _lhsIruleuses- _hdOsynmap = rule780 _lhsIsynmap- _hdOterminaldefs = rule781 _lhsIterminaldefs- _tlOallFromToStates = rule782 _lhsIallFromToStates- _tlOallInhmap = rule783 _lhsIallInhmap- _tlOallInitStates = rule784 _lhsIallInitStates- _tlOallSynmap = rule785 _lhsIallSynmap- _tlOallVisitKinds = rule786 _lhsIallVisitKinds- _tlOallchildvisit = rule787 _lhsIallchildvisit- _tlOallintramap = rule788 _lhsIallintramap- _tlOavisitdefs = rule789 _lhsIavisitdefs- _tlOavisituses = rule790 _lhsIavisituses- _tlOchildTypes = rule791 _lhsIchildTypes- _tlOchildintros = rule792 _lhsIchildintros- _tlOcon = rule793 _lhsIcon- _tlOinhmap = rule794 _lhsIinhmap- _tlOmrules = rule795 _lhsImrules- _tlOnextVisits = rule796 _lhsInextVisits- _tlOnt = rule797 _lhsInt- _tlOoptions = rule798 _lhsIoptions- _tlOparams = rule799 _lhsIparams- _tlOprevVisits = rule800 _lhsIprevVisits- _tlOruledefs = rule801 _lhsIruledefs- _tlOruleuses = rule802 _lhsIruleuses- _tlOsynmap = rule803 _lhsIsynmap- _tlOterminaldefs = rule804 _lhsIterminaldefs- __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_Visits_s56 v55- {-# INLINE rule746 #-}- rule746 = \ ((_hdIallvisits) :: VisitStateState ) ((_tlIallvisits) :: [VisitStateState]) ->- _hdIallvisits : _tlIallvisits- {-# INLINE rule747 #-}- rule747 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _hdIchildvisit `Map.union` _tlIchildvisit- {-# INLINE rule748 #-}- rule748 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule749 #-}- rule749 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _hdIfromToStates `mappend` _tlIfromToStates- {-# INLINE rule750 #-}- rule750 = \ ((_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- _hdIintramap `uwMapUnion` _tlIintramap- {-# INLINE rule751 #-}- rule751 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->- _hdIlazyIntras `Set.union` _tlIlazyIntras- {-# INLINE rule752 #-}- rule752 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->- _hdIruleKinds `unionWithMappend` _tlIruleKinds- {-# INLINE rule753 #-}- rule753 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->- _hdIruleUsage `unionWithSum` _tlIruleUsage- {-# INLINE rule754 #-}- rule754 = \ ((_hdIsem_visit) :: (StateIdentifier,PP_Doc) ) ((_tlIsem_visit) :: [(StateIdentifier,PP_Doc)] ) ->- _hdIsem_visit : _tlIsem_visit- {-# INLINE rule755 #-}- rule755 = \ ((_hdIt_visits) :: PP_Doc) ((_tlIt_visits) :: PP_Doc) ->- _hdIt_visits >-< _tlIt_visits- {-# INLINE rule756 #-}- rule756 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule757 #-}- rule757 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# INLINE rule758 #-}- rule758 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# INLINE rule759 #-}- rule759 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule760 #-}- rule760 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule761 #-}- rule761 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule762 #-}- rule762 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule763 #-}- rule763 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule764 #-}- rule764 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule765 #-}- rule765 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- _lhsIallintramap- {-# INLINE rule766 #-}- rule766 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule767 #-}- rule767 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule768 #-}- rule768 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule769 #-}- rule769 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule770 #-}- rule770 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule771 #-}- rule771 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule772 #-}- rule772 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule773 #-}- rule773 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule774 #-}- rule774 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule775 #-}- rule775 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule776 #-}- rule776 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule777 #-}- rule777 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule778 #-}- rule778 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule779 #-}- rule779 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule780 #-}- rule780 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule781 #-}- rule781 = \ ((_lhsIterminaldefs) :: Set String) ->- _lhsIterminaldefs- {-# INLINE rule782 #-}- rule782 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule783 #-}- rule783 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule784 #-}- rule784 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule785 #-}- rule785 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule786 #-}- rule786 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule787 #-}- rule787 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->- _lhsIallchildvisit- {-# INLINE rule788 #-}- rule788 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- _lhsIallintramap- {-# INLINE rule789 #-}- rule789 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule790 #-}- rule790 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule791 #-}- rule791 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule792 #-}- rule792 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule793 #-}- rule793 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule794 #-}- rule794 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule795 #-}- rule795 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule796 #-}- rule796 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule797 #-}- rule797 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule798 #-}- rule798 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule799 #-}- rule799 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule800 #-}- rule800 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule801 #-}- rule801 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule802 #-}- rule802 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule803 #-}- rule803 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule804 #-}- rule804 = \ ((_lhsIterminaldefs) :: Set String) ->- _lhsIterminaldefs-{-# NOINLINE sem_Visits_Nil #-}-sem_Visits_Nil :: T_Visits -sem_Visits_Nil = T_Visits (return st56) where- {-# NOINLINE st56 #-}- st56 = let- v55 :: T_Visits_v55 - v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule805 ()- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)- _lhsOchildvisit = rule806 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule807 ()- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule808 ()- _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))- _lhsOintramap = rule809 ()- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule810 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule811 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule812 ()- _lhsOsem_visit :: [(StateIdentifier,PP_Doc)] - _lhsOsem_visit = rule813 ()- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule814 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule815 ()- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule816 ()- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule817 ()- __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_Visits_s56 v55- {-# INLINE rule805 #-}- rule805 = \ (_ :: ()) ->- []- {-# INLINE rule806 #-}- rule806 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule807 #-}- rule807 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule808 #-}- rule808 = \ (_ :: ()) ->- mempty- {-# INLINE rule809 #-}- rule809 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule810 #-}- rule810 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule811 #-}- rule811 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule812 #-}- rule812 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule813 #-}- rule813 = \ (_ :: ()) ->- []- {-# INLINE rule814 #-}- rule814 = \ (_ :: ()) ->- empty- {-# INLINE rule815 #-}- rule815 = \ (_ :: ()) ->- mempty- {-# INLINE rule816 #-}- rule816 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule817 #-}- rule817 = \ (_ :: ()) ->+{-# LINE 2 "./src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 10 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 16 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 23 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 2 "./src-ag/ExecutionPlan.ag" #-}++-- VisitSyntax.ag imports+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+import ErrorMessages++import qualified Data.Set as Set+import Data.Set(Set)+import qualified Data.Map as Map+import Data.Map(Map)+{-# LINE 37 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 32 "./src-ag/ExecutionPlan2Caml.ag" #-}++import ExecutionPlan+import Pretty+import PPUtil+import Options+import Data.Monoid(mappend,mempty)+import Data.Maybe+import Data.Graph+import Debug.Trace+import System.IO+import System.Directory+import System.FilePath+import UU.Scanner.Position++import TokenDef+import HsToken+import ErrorMessages++import Data.Set (Set)+import qualified Data.Set as Set+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Sequence(Seq)+import qualified Data.Sequence as Seq+import Data.Foldable(toList)+{-# LINE 65 "dist/build/ExecutionPlan2Caml.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 175 "./src-ag/ExecutionPlan2Caml.ag" #-}++ppRecordTp :: PP a => [a] -> PP_Doc+ppRecordTp es+ | null es = text "unit"+ | otherwise = pp_block "{" "}" "; " (map pp es)++ppRecordVal :: PP a => [a] -> PP_Doc+ppRecordVal es+ | null es = text "()"+ | otherwise = pp_block "{" "}" "; " (map pp es)++ppFieldsVal :: Bool -> [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)] -> PP_Doc+ppFieldsVal record fields+ | null fields = text "()"+ | record = ppRecordVal [ r >#< "=" >#< x | (r,x,_,_) <- fields ]+ | otherwise = pp_block "(" ")" "," [ x | (_,x,_,_) <- fields ]++ppFieldsType :: Bool -> Bool -> [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)] -> PP_Doc+ppFieldsType record defor fields+ | null fields = text "unit"+ | record = ppRecordTp [ r >#< ":" >#< (if defor then d else f) | (r,_,d,f) <- fields ]+ | otherwise = pp_block "(" ")" "*" [ if defor then d else f | (_,_,d,f) <- fields ]+{-# LINE 91 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 288 "./src-ag/ExecutionPlan2Caml.ag" #-}++ppTp :: Type -> PP_Doc+ppTp tp = case tp of+ Haskell t -> pp t -- ocaml type+ NT nt tps deforested+ | nt == _SELF -> pp "?SELF?"+ | null tps -> ppNontTp nt deforested+ | otherwise -> pp_parens (ppSpaced (map pp_parens tps) >#< ppNontTp nt deforested)+ Self -> pp "?SELF?"++ppNontTp :: NontermIdent -> Bool -> PP_Doc+ppNontTp nt True = pp "t_" >|< pp nt+ppNontTp nt False = pp nt++-- multiple type parameters go into a tuple+ppTypeParams :: PP a => [a] -> PP_Doc+ppTypeParams [] = empty+ppTypeParams [x] = pp x+ppTypeParams xs = pp_block "(" ")" "," (map pp xs)+{-# LINE 113 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 361 "./src-ag/ExecutionPlan2Caml.ag" #-}++-- convention for nonterminals to module names+modName :: NontermIdent -> PP_Doc+modName nt = pp "M_" >|< pp nt++ppFunDecl :: Bool -> PP_Doc -> [(PP_Doc,PP_Doc)] -> PP_Doc -> PP_Doc -> PP_Doc+ppFunDecl gensigs nm args resSig expr = body where+ body = nm >#< ppSpaced (map arg args) >#< ppRes >#< "="+ >-< indent 2 expr+ arg (arg,tp) = ppArg gensigs arg tp+ ppRes+ | gensigs = ":" >#< resSig+ | otherwise = empty++ppArg :: Bool -> PP_Doc -> PP_Doc -> PP_Doc+ppArg gensigs arg tp+ | gensigs = pp_parens (arg >#< ":" >#< tp)+ | otherwise = arg++{-# LINE 135 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 428 "./src-ag/ExecutionPlan2Caml.ag" #-}+type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)+{-# LINE 139 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 464 "./src-ag/ExecutionPlan2Caml.ag" #-}++--+-- conventions+--++-- type of the state of a node: a closure containing the children states and attributes,+-- with code of type 'type_nt_sem' that represents the subsequent visits to successor states.+type_nt_state nt st = "s_" >|< nt >|< "_" >|< st++-- type of a visit to a node (the initial, and when in a given state)+-- an instance of this type is called the "semantics"+type_nt_sem_top nt = "t_" >|< nt+type_nt_sem nt st = type_nt_sem_top nt >|< "_s" >|< st++-- type of a caller (contains visit selection + inputs + continuation)+type_caller nt st = "c_" >|< nt >|< "_s" >|< st++-- names of records+nm_attach nt = "attach_">|< nt+nm_invoke nt st = "inv_" >|< nt >|< "_s" >|< st++-- name of the type variable representing the result type of the continuation+cont_tvar = text "'cont__"+++-- order states in reverse topological order so that successor states are+-- earlier in the resulting list.+orderStates :: StateIdentifier -> [VisitStateState] -> [StateIdentifier]+orderStates initial edges = res where+ source = Map.singleton initial Set.empty -- ensures that the initial state is in graph even when there are no edges+ targets = [ Map.singleton t Set.empty | (_,_,t) <- edges ]+ deps = [ Map.singleton f (Set.singleton t) | (_,f,t) <- edges ]++ mp = Map.unionsWith Set.union (source : (targets ++ deps))+ es = [ (f,f,Set.toList ts) | (f,ts) <- Map.toList mp ]+ cps = stronglyConnComp es+ res = flattenSCCs cps+{-# LINE 179 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 521 "./src-ag/ExecutionPlan2Caml.ag" #-}++type_caller_visit nt v = "c_" >|< nt >|< "_v" >|< v+con_visit nt v = "C_" >|< nt >|< "_v" >|< v++-- field names+nm_inh nt v = "inh_" >|< nt >|< "_v" >|< v+nm_cont nt v = "cont_" >|< nt >|< "_v" >|< v+{-# LINE 189 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 567 "./src-ag/ExecutionPlan2Caml.ag" #-}++-- more naming conventions+nm_inarg nm nt v = "i_" >|< nm >|< "_" >|< nt >|< "_v" >|< v+nm_outarg nm nt v = "o_" >|< nm >|< "_" >|< nt >|< "_v" >|< v+nm_outarg_cont = nm_outarg "_cont"++conNmTVisit nt vId = "t_" >|< nt >|< "_v" >|< vId+conNmTVisitIn nt vId = "t_" >|< nt >|< "_vIn" >|< vId+conNmTVisitOut nt vId = "t_" >|< nt >|< "_vOut" >|< vId++-- todo: remove ppMonadType+ppMonadType :: Options -> PP_Doc+ppMonadType opts+ | parallelInvoke opts = text "IO"+ | otherwise = text "Identity"+{-# LINE 207 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 780 "./src-ag/ExecutionPlan2Caml.ag" #-}++nm_visit v = "__v" >|< v+nm_k st = "__k" >|< st+nm_st st = "__st" >|< st++mklets :: (PP b, PP c) => [b] -> c -> PP_Doc+mklets defs body = res where+ ppLet def = "let" >#< def >#< "in"+ res = vlist (map ppLet defs) >-< body+{-# LINE 219 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 822 "./src-ag/ExecutionPlan2Caml.ag" #-}++resultValName :: String+resultValName = "__result_"++nextStName :: String+nextStName = "__st_"+{-# LINE 228 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 963 "./src-ag/ExecutionPlan2Caml.ag" #-}++stname :: Identifier -> Int -> String+stname child st = "_" ++ getName child ++ "X" ++ show st++-- should actually return some conversion info+compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool+compatibleAttach _ _ _ = True+{-# LINE 238 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 1030 "./src-ag/ExecutionPlan2Caml.ag" #-}++dummyPat :: Options -> Bool -> PP_Doc+dummyPat opts noArgs+ | not noArgs = empty+ | strictDummyToken opts = text "()"+ | otherwise = text "(_ : unit)"++dummyArg :: Options -> Bool -> PP_Doc+dummyArg opts noArgs+ | not noArgs = empty+ | otherwise = text "()"++dummyType :: Options -> Bool -> PP_Doc+dummyType opts noArgs+ | not noArgs = empty+ | otherwise = text "unit"+{-# LINE 257 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 1106 "./src-ag/ExecutionPlan2Caml.ag" #-}++data NonLocalAttr+ = AttrInh Identifier Identifier+ | AttrSyn Identifier Identifier deriving Show++mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr+mkNonLocalAttr True = AttrInh -- True: inherited attr+mkNonLocalAttr False = AttrSyn++lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs+lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns++-- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that+-- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.+-- However, for now we simply decide to return Nothing in this case, which skips the type annotation.+lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupType child name attrMp childMp+ | noParameters childTp = Just ppDoc+ | otherwise = Nothing+ where+ attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs+ childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp+ nonterm = extractNonterminal childTp+ childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp+ ppDoc = ppTp attrTp++noParameters :: Type -> Bool+noParameters (Haskell _) = True+noParameters (NT _ args _) = null args+{-# LINE 290 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 1204 "./src-ag/ExecutionPlan2Caml.ag" #-}++contNm = text "__cont_"+inpsNm = text "__inps_"++-- a `compatibleKind` b means: can kind b be invoked from a+compatibleKind :: VisitKind -> VisitKind -> Bool+compatibleKind _ _ = True++compatibleRule :: VisitKind -> Bool -> Bool+compatibleRule (VisitPure _) False = False+compatibleRule _ _ = True+{-# LINE 304 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 1229 "./src-ag/ExecutionPlan2Caml.ag" #-}++unionWithSum = Map.unionWith (+)+{-# LINE 309 "dist/build/ExecutionPlan2Caml.hs" #-}++{-# LINE 1252 "./src-ag/ExecutionPlan2Caml.ag" #-}++uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)+uwSetUnion = Map.unionWith Set.union++uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)+uwMapUnion = Map.unionWith Map.union+{-# LINE 318 "dist/build/ExecutionPlan2Caml.hs" #-}+-- EChild ------------------------------------------------------+-- wrapper+data Inh_EChild = Inh_EChild { allInitStates_Inh_EChild :: (Map NontermIdent Int), con_Inh_EChild :: (ConstructorIdent), mainFile_Inh_EChild :: (String), mainName_Inh_EChild :: (String), nt_Inh_EChild :: (NontermIdent), options_Inh_EChild :: (Options) }+data Syn_EChild = Syn_EChild { argnamesw_Syn_EChild :: ( PP_Doc ), childTypes_Syn_EChild :: (Map Identifier Type), childintros_Syn_EChild :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), sigs_Syn_EChild :: ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]), terminaldefs_Syn_EChild :: (Set String) }+{-# INLINABLE wrap_EChild #-}+wrap_EChild :: T_EChild -> Inh_EChild -> (Syn_EChild )+wrap_EChild (T_EChild act) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions+ (T_EChild_vOut1 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs) <- return (inv_EChild_s2 sem arg)+ return (Syn_EChild _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs)+ )++-- cata+{-# NOINLINE sem_EChild #-}+sem_EChild :: EChild -> T_EChild +sem_EChild ( EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ ) = sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_+sem_EChild ( ETerm name_ tp_ ) = sem_EChild_ETerm name_ tp_++-- semantic domain+newtype T_EChild = T_EChild {+ attach_T_EChild :: Identity (T_EChild_s2 )+ }+newtype T_EChild_s2 = C_EChild_s2 {+ inv_EChild_s2 :: (T_EChild_v1 )+ }+data T_EChild_s3 = C_EChild_s3+type T_EChild_v1 = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )+data T_EChild_vIn1 = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (String) (String) (NontermIdent) (Options)+data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (Set String)+{-# NOINLINE sem_EChild_EChild #-}+sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild +sem_EChild_EChild arg_name_ arg_tp_ arg_kind_ arg_hasAround_ _ _ = T_EChild (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_EChild_v1 + v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let+ _tpDocFor = rule0 arg_tp_+ _tpDocDefor = rule1 arg_tp_+ _fieldNm = rule2 _lhsIcon _lhsInt arg_name_+ _childNm = rule3 arg_name_+ _field = rule4 _childNm _fieldNm _tpDocDefor _tpDocFor+ _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]+ _lhsOsigs = rule5 _field arg_kind_+ _lhsOargnamesw :: PP_Doc + _lhsOargnamesw = rule6 _lhsIoptions _nt arg_kind_ arg_name_+ _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule7 _introcode arg_name_+ _isDefor = rule8 arg_tp_+ _valcode = rule9 _isDefor _lhsIoptions _nt arg_kind_ arg_name_+ _aroundcode = rule10 _lhsIoptions arg_hasAround_ arg_name_+ _introcode = rule11 _aroundcode _initSt _isDefor _lhsIoptions _nt _valcode arg_hasAround_ arg_kind_ arg_name_+ _nt = rule12 arg_tp_+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule13 arg_name_ arg_tp_+ _initSt = rule14 _lhsIallInitStates _nt+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule15 ()+ __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs+ in __result_ )+ in C_EChild_s2 v1+ {-# INLINE rule0 #-}+ {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule0 = \ tp_ ->+ {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTp $ removeDeforested tp_+ {-# LINE 386 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule1 #-}+ {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule1 = \ tp_ ->+ {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTp $ forceDeforested tp_+ {-# LINE 392 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule2 #-}+ {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule2 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->+ {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text $ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 398 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule3 #-}+ {-# LINE 281 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule3 = \ name_ ->+ {-# LINE 281 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text (fieldname name_)+ {-# LINE 404 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule4 #-}+ {-# LINE 282 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule4 = \ _childNm _fieldNm _tpDocDefor _tpDocFor ->+ {-# LINE 282 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (_fieldNm , _childNm , _tpDocDefor , _tpDocFor )+ {-# LINE 410 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule5 #-}+ {-# LINE 283 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule5 = \ _field kind_ ->+ {-# LINE 283 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case kind_ of+ ChildAttr -> []+ _ -> [_field ]+ {-# LINE 418 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule6 #-}+ {-# LINE 396 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule6 = \ ((_lhsIoptions) :: Options) _nt kind_ name_ ->+ {-# LINE 396 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case kind_ of+ ChildSyntax -> "(" >#< prefix _lhsIoptions >|< _nt >#< name_ >|< "_" >#< ")"+ ChildAttr -> empty+ ChildReplace tp -> "(" >#< prefix _lhsIoptions >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"+ {-# LINE 427 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule7 #-}+ {-# LINE 923 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule7 = \ _introcode name_ ->+ {-# LINE 923 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ _introcode+ {-# LINE 433 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule8 #-}+ {-# LINE 924 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule8 = \ tp_ ->+ {-# LINE 924 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case tp_ of+ NT _ _ defor -> defor+ _ -> False+ {-# LINE 441 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule9 #-}+ {-# LINE 927 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule9 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->+ {-# LINE 927 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case kind_ of+ ChildSyntax -> name_ >|< "_"+ ChildAttr ->+ let head | not _isDefor = if lateHigherOrderBinding _lhsIoptions+ then lateSemNtLabel _nt >#< lhsname _lhsIoptions True idLateBindingAttr+ else prefix _lhsIoptions >|< _nt+ | otherwise = empty+ in pp_parens (head >#< instname name_)+ ChildReplace _ ->+ pp_parens (instname name_ >#< name_ >|< "_")+ {-# LINE 456 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule10 #-}+ {-# LINE 938 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule10 = \ ((_lhsIoptions) :: Options) hasAround_ name_ ->+ {-# LINE 938 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if hasAround_+ then locname _lhsIoptions name_ >|< "_around"+ else empty+ {-# LINE 464 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule11 #-}+ {-# LINE 941 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule11 = \ _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->+ {-# LINE 941 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \kind -> let pat = text $ stname name_ _initSt+ attach = pp_parens (_aroundcode >#< _valcode ) >|< "." >|< nm_attach _nt >#< "()"+ decl = pat >#< "=" >#< attach+ in if compatibleAttach kind _nt _lhsIoptions+ then Right ( "let" >#< decl >#< "in"+ , Set.singleton (stname name_ _initSt )+ , case kind_ of+ ChildAttr -> Map.insert (instname name_) Nothing $+ ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)+ then id+ else Map.insert (lhsname _lhsIoptions True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ ) $+ ( if hasAround_+ then Map.insert (locname _lhsIoptions (name_) ++ "_around") Nothing+ else id+ ) $ Map.empty+ ChildReplace _ -> Map.singleton (instname name_) Nothing+ ChildSyntax -> Map.empty+ )+ else Left $ IncompatibleAttachKind name_ kind+ {-# LINE 489 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule12 #-}+ {-# LINE 961 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule12 = \ tp_ ->+ {-# LINE 961 "./src-ag/ExecutionPlan2Caml.ag" #-}+ extractNonterminal tp_+ {-# LINE 495 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule13 #-}+ {-# LINE 1424 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule13 = \ name_ tp_ ->+ {-# LINE 1424 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 501 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule14 #-}+ {-# LINE 1468 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule14 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->+ {-# LINE 1468 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates+ {-# LINE 507 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule15 #-}+ rule15 = \ (_ :: ()) ->+ Set.empty+{-# NOINLINE sem_EChild_ETerm #-}+sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild +sem_EChild_ETerm arg_name_ arg_tp_ = T_EChild (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_EChild_v1 + v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let+ _tpDocFor = rule16 arg_tp_+ _tpDocDefor = rule17 arg_tp_+ _fieldNm = rule18 _lhsIcon _lhsInt arg_name_+ _childNm = rule19 arg_name_+ _field = rule20 _childNm _fieldNm _tpDocDefor _tpDocFor+ _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]+ _lhsOsigs = rule21 _field+ _lhsOargnamesw :: PP_Doc + _lhsOargnamesw = rule22 arg_name_+ _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule23 arg_name_+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule24 arg_name_+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule25 arg_name_ arg_tp_+ __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs+ in __result_ )+ in C_EChild_s2 v1+ {-# INLINE rule16 #-}+ {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule16 = \ tp_ ->+ {-# LINE 278 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTp $ removeDeforested tp_+ {-# LINE 541 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule17 #-}+ {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule17 = \ tp_ ->+ {-# LINE 279 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTp $ forceDeforested tp_+ {-# LINE 547 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule18 #-}+ {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule18 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->+ {-# LINE 280 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text $ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 553 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule19 #-}+ {-# LINE 281 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule19 = \ name_ ->+ {-# LINE 281 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text (fieldname name_)+ {-# LINE 559 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule20 #-}+ {-# LINE 282 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule20 = \ _childNm _fieldNm _tpDocDefor _tpDocFor ->+ {-# LINE 282 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (_fieldNm , _childNm , _tpDocDefor , _tpDocFor )+ {-# LINE 565 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule21 #-}+ {-# LINE 286 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule21 = \ _field ->+ {-# LINE 286 "./src-ag/ExecutionPlan2Caml.ag" #-}+ [_field ]+ {-# LINE 571 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule22 #-}+ {-# LINE 400 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule22 = \ name_ ->+ {-# LINE 400 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text $ fieldname name_+ {-# LINE 577 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule23 #-}+ {-# LINE 922 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule23 = \ name_ ->+ {-# LINE 922 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ (\_ -> Right (empty, Set.empty, Map.empty))+ {-# LINE 583 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule24 #-}+ {-# LINE 1266 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule24 = \ name_ ->+ {-# LINE 1266 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Set.singleton $ fieldname name_+ {-# LINE 589 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule25 #-}+ {-# LINE 1424 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule25 = \ name_ tp_ ->+ {-# LINE 1424 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 595 "dist/build/ExecutionPlan2Caml.hs"#-}++-- EChildren ---------------------------------------------------+-- wrapper+data Inh_EChildren = Inh_EChildren { allInitStates_Inh_EChildren :: (Map NontermIdent Int), con_Inh_EChildren :: (ConstructorIdent), mainFile_Inh_EChildren :: (String), mainName_Inh_EChildren :: (String), nt_Inh_EChildren :: (NontermIdent), options_Inh_EChildren :: (Options) }+data Syn_EChildren = Syn_EChildren { argnamesw_Syn_EChildren :: ([PP_Doc]), childTypes_Syn_EChildren :: (Map Identifier Type), childintros_Syn_EChildren :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), sigs_Syn_EChildren :: ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]), terminaldefs_Syn_EChildren :: (Set String) }+{-# INLINABLE wrap_EChildren #-}+wrap_EChildren :: T_EChildren -> Inh_EChildren -> (Syn_EChildren )+wrap_EChildren (T_EChildren act) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions+ (T_EChildren_vOut4 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs) <- return (inv_EChildren_s5 sem arg)+ return (Syn_EChildren _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs)+ )++-- cata+{-# NOINLINE sem_EChildren #-}+sem_EChildren :: EChildren -> T_EChildren +sem_EChildren list = Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list)++-- semantic domain+newtype T_EChildren = T_EChildren {+ attach_T_EChildren :: Identity (T_EChildren_s5 )+ }+newtype T_EChildren_s5 = C_EChildren_s5 {+ inv_EChildren_s5 :: (T_EChildren_v4 )+ }+data T_EChildren_s6 = C_EChildren_s6+type T_EChildren_v4 = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )+data T_EChildren_vIn4 = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (String) (String) (NontermIdent) (Options)+data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) (Set String)+{-# NOINLINE sem_EChildren_Cons #-}+sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren +sem_EChildren_Cons arg_hd_ arg_tl_ = T_EChildren (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_EChildren_v4 + v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let+ _hdX2 = Control.Monad.Identity.runIdentity (attach_T_EChild (arg_hd_))+ _tlX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_tl_))+ (T_EChild_vOut1 _hdIargnamesw _hdIchildTypes _hdIchildintros _hdIsigs _hdIterminaldefs) = inv_EChild_s2 _hdX2 (T_EChild_vIn1 _hdOallInitStates _hdOcon _hdOmainFile _hdOmainName _hdOnt _hdOoptions)+ (T_EChildren_vOut4 _tlIargnamesw _tlIchildTypes _tlIchildintros _tlIsigs _tlIterminaldefs) = inv_EChildren_s5 _tlX5 (T_EChildren_vIn4 _tlOallInitStates _tlOcon _tlOmainFile _tlOmainName _tlOnt _tlOoptions)+ _lhsOargnamesw :: [PP_Doc]+ _lhsOargnamesw = rule26 _hdIargnamesw _tlIargnamesw+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule27 _hdIchildTypes _tlIchildTypes+ _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule28 _hdIchildintros _tlIchildintros+ _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]+ _lhsOsigs = rule29 _hdIsigs _tlIsigs+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule30 _hdIterminaldefs _tlIterminaldefs+ _hdOallInitStates = rule31 _lhsIallInitStates+ _hdOcon = rule32 _lhsIcon+ _hdOmainFile = rule33 _lhsImainFile+ _hdOmainName = rule34 _lhsImainName+ _hdOnt = rule35 _lhsInt+ _hdOoptions = rule36 _lhsIoptions+ _tlOallInitStates = rule37 _lhsIallInitStates+ _tlOcon = rule38 _lhsIcon+ _tlOmainFile = rule39 _lhsImainFile+ _tlOmainName = rule40 _lhsImainName+ _tlOnt = rule41 _lhsInt+ _tlOoptions = rule42 _lhsIoptions+ __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs+ in __result_ )+ in C_EChildren_s5 v4+ {-# INLINE rule26 #-}+ rule26 = \ ((_hdIargnamesw) :: PP_Doc ) ((_tlIargnamesw) :: [PP_Doc]) ->+ _hdIargnamesw : _tlIargnamesw+ {-# INLINE rule27 #-}+ rule27 = \ ((_hdIchildTypes) :: Map Identifier Type) ((_tlIchildTypes) :: Map Identifier Type) ->+ _hdIchildTypes `mappend` _tlIchildTypes+ {-# INLINE rule28 #-}+ rule28 = \ ((_hdIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((_tlIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _hdIchildintros `Map.union` _tlIchildintros+ {-# INLINE rule29 #-}+ rule29 = \ ((_hdIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ((_tlIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ->+ _hdIsigs ++ _tlIsigs+ {-# INLINE rule30 #-}+ rule30 = \ ((_hdIterminaldefs) :: Set String) ((_tlIterminaldefs) :: Set String) ->+ _hdIterminaldefs `Set.union` _tlIterminaldefs+ {-# INLINE rule31 #-}+ rule31 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule32 #-}+ rule32 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule33 #-}+ rule33 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule34 #-}+ rule34 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule35 #-}+ rule35 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule36 #-}+ rule36 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule37 #-}+ rule37 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule38 #-}+ rule38 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule39 #-}+ rule39 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule40 #-}+ rule40 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule41 #-}+ rule41 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule42 #-}+ rule42 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_EChildren_Nil #-}+sem_EChildren_Nil :: T_EChildren +sem_EChildren_Nil = T_EChildren (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_EChildren_v4 + v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsImainFile _lhsImainName _lhsInt _lhsIoptions) -> ( let+ _lhsOargnamesw :: [PP_Doc]+ _lhsOargnamesw = rule43 ()+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule44 ()+ _lhsOchildintros :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule45 ()+ _lhsOsigs :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]+ _lhsOsigs = rule46 ()+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule47 ()+ __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOchildTypes _lhsOchildintros _lhsOsigs _lhsOterminaldefs+ in __result_ )+ in C_EChildren_s5 v4+ {-# INLINE rule43 #-}+ rule43 = \ (_ :: ()) ->+ []+ {-# INLINE rule44 #-}+ rule44 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule45 #-}+ rule45 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule46 #-}+ rule46 = \ (_ :: ()) ->+ []+ {-# INLINE rule47 #-}+ rule47 = \ (_ :: ()) ->+ Set.empty++-- ENonterminal ------------------------------------------------+-- wrapper+data Inh_ENonterminal = Inh_ENonterminal { allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminal :: (String), mainName_Inh_ENonterminal :: (String), options_Inh_ENonterminal :: (Options), synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), typeSyns_Inh_ENonterminal :: (TypeSyns), wrappers_Inh_ENonterminal :: (Set NontermIdent) }+data Syn_ENonterminal = Syn_ENonterminal { childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), code_Syn_ENonterminal :: (PP_Doc), datas_Syn_ENonterminal :: (PP_Doc), errors_Syn_ENonterminal :: (Seq Error), fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), initStates_Syn_ENonterminal :: (Map NontermIdent Int), modules_Syn_ENonterminal :: (PP_Doc), semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_ENonterminal #-}+wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> (Syn_ENonterminal )+wrap_ENonterminal (T_ENonterminal act) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers+ (T_ENonterminal_vOut7 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminal_s8 sem arg)+ return (Syn_ENonterminal _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_ENonterminal #-}+sem_ENonterminal :: ENonterminal -> T_ENonterminal +sem_ENonterminal ( ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ prods_ recursive_ hoInfo_ ) = sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ ( sem_EProductions prods_ ) recursive_ hoInfo_++-- semantic domain+newtype T_ENonterminal = T_ENonterminal {+ attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )+ }+newtype T_ENonterminal_s8 = C_ENonterminal_s8 {+ inv_ENonterminal_s8 :: (T_ENonterminal_v7 )+ }+data T_ENonterminal_s9 = C_ENonterminal_s9+type T_ENonterminal_v7 = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )+data T_ENonterminal_vIn7 = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (TypeSyns) (Set NontermIdent)+data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_ENonterminal_ENonterminal #-}+sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> (Maybe VisitIdentifier) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal +sem_ENonterminal_ENonterminal arg_nt_ arg_params_ _ arg_initial_ arg_initialv_ arg_nextVisits_ arg_prevVisits_ arg_prods_ _ _ = T_ENonterminal (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_ENonterminal_v7 + v7 = \ (T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) -> ( let+ _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_prods_))+ (T_EProductions_vOut16 _prodsIallvisits _prodsIchildvisit _prodsIcount _prodsIdatatype _prodsIdatatype_call _prodsIdatatype_con _prodsIerrors _prodsIfromToStates _prodsIsemFunBndDefs _prodsIsemFunBndTps _prodsIsem_nt _prodsIsem_prod _prodsIt_visits _prodsIvisitKinds _prodsIvisitdefs _prodsIvisituses) = inv_EProductions_s17 _prodsX17 (T_EProductions_vIn16 _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOprevVisits _prodsOrename _prodsOsynmap)+ _prodsOrename = rule48 _lhsIoptions+ _prodsOnt = rule49 arg_nt_+ _prodsOparams = rule50 arg_params_+ _lhsOdatas :: PP_Doc+ _lhsOdatas = rule51 _c_states _datatypeNt _datatypeProds _hasWrapper _lhsIoptions _prodsIt_visits _t_init _t_states _wr_inh _wr_syn arg_nt_+ _lhsOcode :: PP_Doc+ _lhsOcode = rule52 _datatypeCon _hasWrapper _lhsIoptions _prodsIsem_prod _sem_nt _wrapper arg_nt_+ _lhsOmodules :: PP_Doc+ _lhsOmodules = rule53 _moduleDecl+ _hasWrapper = rule54 _lhsIwrappers arg_nt_+ _t_params = rule55 arg_params_+ _aliasPre = rule56 _t_params arg_nt_+ _aliasMod = rule57 _aliasPre arg_nt_+ _datatypeNt = rule58 _aliasMod _aliasPre _lhsItypeSyns _prodsIdatatype _prodsIdatatype_call _t_params arg_nt_+ _datatypeCon = rule59 _lhsItypeSyns _prodsIdatatype_con arg_nt_+ _moduleDecl = rule60 _lhsItypeSyns arg_nt_+ _datatypeProds = rule61 _prodsIdatatype+ _fsemname = rule62 _lhsIoptions+ _semname = rule63 _fsemname arg_nt_+ _frecarg = rule64 _fsemname+ _sem_param_tp = rule65 _t_params arg_nt_+ _sem_res_tp = rule66 _t_params _t_type+ _sem_tp = rule67 _sem_param_tp _sem_res_tp+ _o_sigs = rule68 _lhsIoptions+ _sem_nt_body = rule69 _prodsIsem_nt+ _sem_nt = rule70 _frecarg _fsemname _lhsItypeSyns _o_sigs _sem_nt_body _sem_param_tp _sem_res_tp _semname arg_nt_+ (Just _prodsOinhmap) = rule71 _lhsIinhmap arg_nt_+ (Just _prodsOsynmap) = rule72 _lhsIsynmap arg_nt_+ _prodsOallInhmap = rule73 _lhsIinhmap+ _prodsOallSynmap = rule74 _lhsIsynmap+ _allstates = rule75 _prodsIallvisits arg_initial_+ _stvisits = rule76 _prodsIallvisits+ _t_type = rule77 arg_nt_+ _t_c_params = rule78 arg_params_+ _t_init = rule79 _t_params _t_type arg_initial_ arg_nt_+ _t_states = rule80 _allstates _t_c_params _t_params arg_nextVisits_ arg_nt_+ _c_states = rule81 _allstates _prodsIallvisits _t_c_params arg_nextVisits_ arg_nt_+ _wr_inh = rule82 _genwrap _wr_inhs1+ _wr_syn = rule83 _genwrap _wr_syns+ _genwrap = rule84 _t_params arg_nt_+ _inhAttrs = rule85 _lhsIinhmap arg_nt_+ _wr_inhs = rule86 _inhAttrs _wr_filter+ _wr_inhs1 = rule87 _inhAttrs+ _wr_filter = rule88 _lhsIoptions+ _wr_syns = rule89 _lhsIsynmap arg_nt_+ _wrapname = rule90 arg_nt_+ _inhname = rule91 arg_nt_+ _synname = rule92 arg_nt_+ _firstVisitInfo = rule93 arg_initial_ arg_nextVisits_+ _wrapArgSemTp = rule94 _t_params _t_type+ _wrapArgInhTp = rule95 _inhname _t_params+ _wrapArgPats = rule96 _lhsIoptions _wr_inhs1 arg_nt_+ _wrapResTp = rule97 _synname _t_params+ _wrapper = rule98 _o_sigs _wrapArgInhTp _wrapArgPats _wrapArgSemTp _wrapResTp _wrapname _wrapperPreamble+ _wrapperPreamble = rule99 _lhsImainName _lhsIoptions _wrapperBody+ _wrapperBody = rule100 _firstVisitInfo _lhsIoptions _wr_inhs _wr_syns arg_initial_ arg_initialv_ arg_nt_+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule101 _prodsIsemFunBndDefs _semFunBndDef+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule102 _prodsIsemFunBndTps _semFunBndTp+ _semFunBndDef = rule103 _semFunBndNm _semname+ _semFunBndTp = rule104 _semFunBndNm _sem_tp+ _semFunBndNm = rule105 arg_nt_+ _prodsOinitial = rule106 arg_initial_+ _prodsOallstates = rule107 _allstates+ _prodsOnextVisits = rule108 arg_nextVisits_+ _prodsOprevVisits = rule109 arg_prevVisits_+ _prodsOlocalAttrTypes = rule110 _lhsIlocalAttrTypes arg_nt_+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule111 arg_initial_ arg_nt_+ _ntType = rule112 arg_nt_ arg_params_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule113 _prodsIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule114 _prodsIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule115 _prodsIfromToStates+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule116 _prodsIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule117 _prodsIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule118 _prodsIvisituses+ _prodsOallFromToStates = rule119 _lhsIallFromToStates+ _prodsOallInitStates = rule120 _lhsIallInitStates+ _prodsOallVisitKinds = rule121 _lhsIallVisitKinds+ _prodsOallchildvisit = rule122 _lhsIallchildvisit+ _prodsOavisitdefs = rule123 _lhsIavisitdefs+ _prodsOavisituses = rule124 _lhsIavisituses+ _prodsOmainFile = rule125 _lhsImainFile+ _prodsOmainName = rule126 _lhsImainName+ _prodsOntType = rule127 _ntType+ _prodsOoptions = rule128 _lhsIoptions+ __result_ = T_ENonterminal_vOut7 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminal_s8 v7+ {-# INLINE rule48 #-}+ {-# LINE 78 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule48 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 78 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rename _lhsIoptions+ {-# LINE 890 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule49 #-}+ {-# LINE 86 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule49 = \ nt_ ->+ {-# LINE 86 "./src-ag/ExecutionPlan2Caml.ag" #-}+ nt_+ {-# LINE 896 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule50 #-}+ {-# LINE 96 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule50 = \ params_ ->+ {-# LINE 96 "./src-ag/ExecutionPlan2Caml.ag" #-}+ params_+ {-# LINE 902 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule51 #-}+ {-# LINE 115 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule51 = \ _c_states _datatypeNt _datatypeProds _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init _t_states _wr_inh _wr_syn nt_ ->+ {-# LINE 115 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ( text ""+ >-< "(* *** " ++ getName nt_ ++ " *** [data] *)")+ >-< (if dataTypes _lhsIoptions+ then pp "(* data *)"+ >-< _datatypeNt+ >-< _datatypeProds+ >-< ""+ else empty)+ >-< (if _hasWrapper+ then pp "(* wrapper *)"+ >-< _wr_inh+ >-< _wr_syn+ >-< ""+ else empty)+ >-< (if semfuns _lhsIoptions+ then pp "(* semantic domain *)"+ >-< _t_init+ >-< _t_states+ >-< _c_states+ >-< _prodsIt_visits+ >-< ""+ else empty)+ {-# LINE 929 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule52 #-}+ {-# LINE 138 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule52 = \ _datatypeCon _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) _sem_nt _wrapper nt_ ->+ {-# LINE 138 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ( text ""+ >-< "(* *** " ++ getName nt_ ++ " *** [code] *)")+ >-< (if dataTypes _lhsIoptions+ then pp "(* constructor functions *)"+ >-< _datatypeCon+ else empty)+ >-< (if _hasWrapper+ then pp "(* wrapper *)"+ >-< _wrapper+ >-< ""+ else empty)+ >-< (if folds _lhsIoptions+ then "(* cata *)"+ >-< _sem_nt+ >-< ""+ else empty)+ >-< (if semfuns _lhsIoptions+ then "(* semantic domain *)"+ >-< _prodsIsem_prod+ >-< ""+ else empty)+ {-# LINE 955 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule53 #-}+ {-# LINE 163 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule53 = \ _moduleDecl ->+ {-# LINE 163 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _moduleDecl+ {-# LINE 961 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule54 #-}+ {-# LINE 165 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule54 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->+ {-# LINE 165 "./src-ag/ExecutionPlan2Caml.ag" #-}+ nt_ `Set.member` _lhsIwrappers+ {-# LINE 967 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule55 #-}+ {-# LINE 216 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule55 = \ params_ ->+ {-# LINE 216 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTypeParams params_+ {-# LINE 973 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule56 #-}+ {-# LINE 217 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule56 = \ _t_params nt_ ->+ {-# LINE 217 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< _t_params >#< nt_ >#< "="+ {-# LINE 979 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule57 #-}+ {-# LINE 218 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule57 = \ _aliasPre nt_ ->+ {-# LINE 218 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _aliasPre >#< modName nt_ >|< ".t"+ {-# LINE 985 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule58 #-}+ {-# LINE 220 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule58 = \ _aliasMod _aliasPre ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) ((_prodsIdatatype_call) :: [PP_Doc]) _t_params nt_ ->+ {-# LINE 220 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case lookup nt_ _lhsItypeSyns of+ Just (List t) -> _aliasPre >#< ppTp t >#< "list"+ Just (Maybe t) -> _aliasPre >#< ppTp t >#< "option"+ Just (Tuple ts) -> _aliasPre >#< (pp_block "(" ")" " * " $ map (ppTp . snd) ts)+ Just (Map k v) -> _aliasMod+ Just (IntMap t) -> _aliasMod+ Just (OrdSet t) -> _aliasMod+ Just IntSet -> _aliasMod+ _ -> "and" >#< _t_params >#< nt_ >#< "="+ >-< ( if null _prodsIdatatype+ then pp "unit"+ else indent 2 $ vlist _prodsIdatatype_call+ )+ {-# LINE 1003 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule59 #-}+ {-# LINE 239 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule59 = \ ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype_con) :: [PP_Doc]) nt_ ->+ {-# LINE 239 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case lookup nt_ _lhsItypeSyns of+ Just _ -> empty+ Nothing -> vlist _prodsIdatatype_con+ {-# LINE 1011 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule60 #-}+ {-# LINE 244 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule60 = \ ((_lhsItypeSyns) :: TypeSyns) nt_ ->+ {-# LINE 244 "./src-ag/ExecutionPlan2Caml.ag" #-}+ let ppModule :: PP a => a -> PP_Doc+ ppModule expr = "module" >#< modName nt_ >#< "="+ in case lookup nt_ _lhsItypeSyns of+ Just (Map k _) -> ppModule ("Map.Make" >#< pp_parens (ppTp k))+ Just (IntMap _) -> ppModule ("Map.Make ()")+ Just (OrdSet t) -> ppModule ("Set.Make" >#< pp_parens (ppTp t))+ Just IntSet -> ppModule ("Set.Make (struct type t = int let compare = Pervasives.compare end)")+ _ -> empty+ {-# LINE 1024 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule61 #-}+ {-# LINE 253 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule61 = \ ((_prodsIdatatype) :: [PP_Doc]) ->+ {-# LINE 253 "./src-ag/ExecutionPlan2Caml.ag" #-}+ vlist _prodsIdatatype+ {-# LINE 1030 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule62 #-}+ {-# LINE 313 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule62 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 313 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \x -> prefix _lhsIoptions ++ show x+ {-# LINE 1036 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule63 #-}+ {-# LINE 314 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule63 = \ _fsemname nt_ ->+ {-# LINE 314 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _fsemname nt_+ {-# LINE 1042 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule64 #-}+ {-# LINE 315 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule64 = \ _fsemname ->+ {-# LINE 315 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \t x -> case t of+ NT nt _ _ -> pp_parens (_fsemname nt >#< x)+ _ -> x+ {-# LINE 1050 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule65 #-}+ {-# LINE 319 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule65 = \ _t_params nt_ ->+ {-# LINE 319 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _t_params >#< nt_+ {-# LINE 1056 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule66 #-}+ {-# LINE 320 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule66 = \ _t_params _t_type ->+ {-# LINE 320 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _t_params >#< _t_type+ {-# LINE 1062 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule67 #-}+ {-# LINE 321 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule67 = \ _sem_param_tp _sem_res_tp ->+ {-# LINE 321 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _sem_param_tp >#< "->" >#< _sem_res_tp+ {-# LINE 1068 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule68 #-}+ {-# LINE 323 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule68 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 323 "./src-ag/ExecutionPlan2Caml.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 1074 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule69 #-}+ {-# LINE 324 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule69 = \ ((_prodsIsem_nt) :: PP_Doc) ->+ {-# LINE 324 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "match arg with" >-< (indent 2 $ _prodsIsem_nt)+ {-# LINE 1080 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule70 #-}+ {-# LINE 325 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule70 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) _o_sigs _sem_nt_body _sem_param_tp _sem_res_tp _semname nt_ ->+ {-# LINE 325 "./src-ag/ExecutionPlan2Caml.ag" #-}+ let genSem :: PP a => a -> PP_Doc -> PP_Doc+ genSem nm body = "and" >#< ppFunDecl _o_sigs (pp _semname ) [(pp nm, _sem_param_tp )] _sem_res_tp body+ genAlias alts = genSem (pp "arg") (pp "match arg with" >-< (indent 2 $ vlist $ map (pp "|" >#<) alts))+ genMap v = let body = modName nt_ >|< ".fold" >#< _semname >|< "_Entry" >#< _semname >|< "_Nil" >#< els+ els = case v of+ NT nt _ _ -> pp_parens (modName nt_ >|< ".map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ in genSem "m" body+ genSet mbNt = let body = "List.fold_right" >#< _semname >|< "_Entry" >#<+ els (pp_parens (modName nt_ >|< ".elements" >#< "s")) >#< _semname >|< "_Nil"+ els r = maybe r (\nt -> pp_parens ("List.map" >#< _fsemname nt >#< r)) mbNt+ in genSem "s" body+ in case lookup nt_ _lhsItypeSyns of+ Just (List t) -> let body = "List.fold_right" >#< _semname >|< "_Cons" >#< els >#< _semname >|< "_Nil"+ els = case t of+ NT nt _ _ -> pp_parens ("List.map" >#< _fsemname nt >#< "list")+ _ -> pp "list"+ in genSem "list" body+ Just (Tuple ts) -> let pat = pp_parens (ppCommas $ map fst ts)+ body = _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (pp $ fst t)) ts)+ in genSem pat body+ Just (Map _ v) -> genMap v+ Just (IntMap v) -> genMap v+ Just (Maybe t) -> genAlias+ [ "None" >#< "->" >#< "=" >#< _semname >|< "_Nothing"+ , "Some" >#< "just" >#< "->" >#< _semname >|< "_Just" >#< _frecarg t (pp "just")+ ]+ Just (OrdSet t) -> genSet $ case t of+ NT nt _ _ -> Just nt+ _ -> Nothing+ Just (IntSet) -> genSet Nothing+ _ -> genSem "arg" _sem_nt_body+ {-# LINE 1117 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule71 #-}+ {-# LINE 420 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule71 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 420 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1123 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule72 #-}+ {-# LINE 421 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule72 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 421 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1129 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule73 #-}+ {-# LINE 422 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule73 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ {-# LINE 422 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _lhsIinhmap+ {-# LINE 1135 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule74 #-}+ {-# LINE 423 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule74 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ {-# LINE 423 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _lhsIsynmap+ {-# LINE 1141 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule75 #-}+ {-# LINE 444 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule75 = \ ((_prodsIallvisits) :: [VisitStateState]) initial_ ->+ {-# LINE 444 "./src-ag/ExecutionPlan2Caml.ag" #-}+ orderStates initial_ _prodsIallvisits+ {-# LINE 1147 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule76 #-}+ {-# LINE 445 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule76 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 445 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits+ {-# LINE 1153 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule77 #-}+ {-# LINE 446 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule77 = \ nt_ ->+ {-# LINE 446 "./src-ag/ExecutionPlan2Caml.ag" #-}+ type_nt_sem_top nt_+ {-# LINE 1159 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule78 #-}+ {-# LINE 447 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule78 = \ params_ ->+ {-# LINE 447 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTypeParams (cont_tvar : map pp params_)+ {-# LINE 1165 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule79 #-}+ {-# LINE 450 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule79 = \ _t_params _t_type initial_ nt_ ->+ {-# LINE 450 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< _t_params >#< _t_type >#< "=" >#< pp_braces ( nm_attach nt_ >#< ":" >#< "unit" >#< "->" >#< _t_params >#< type_nt_sem nt_ initial_)+ {-# LINE 1171 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule80 #-}+ {-# LINE 453 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule80 = \ _allstates _t_c_params _t_params nextVisits_ nt_ ->+ {-# LINE 453 "./src-ag/ExecutionPlan2Caml.ag" #-}+ vlist $ map (\st ->+ let s_st = type_nt_state nt_ st+ t_st = type_nt_sem nt_ st+ c_st = type_caller nt_ st+ nextVisits = Map.findWithDefault ManyVis st nextVisits_+ decl = "and" >#< _t_params >#< t_st >#< "="+ in case nextVisits of+ NoneVis -> decl >#< "unit"+ _ -> decl >#< ppRecordVal [ nm_invoke nt_ st >#< ":" >#< cont_tvar >#< "." >#< _t_c_params >#< c_st >#< "->" >#< cont_tvar ]+ ) _allstates+ {-# LINE 1186 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule81 #-}+ {-# LINE 506 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule81 = \ _allstates ((_prodsIallvisits) :: [VisitStateState]) _t_c_params nextVisits_ nt_ ->+ {-# LINE 506 "./src-ag/ExecutionPlan2Caml.ag" #-}+ vlist $ map (\st ->+ let nt_st = type_nt_state nt_ st+ c_st = type_caller nt_ st+ outg = filter (\(_,f,_) -> f == st) _prodsIallvisits+ nextVisits = Map.findWithDefault ManyVis st nextVisits_+ declHead = "and" >#< _t_c_params >#< c_st >#< "="+ visitcons = vlist $ map (\(v,_,_) ->+ "|" >#< con_visit nt_ v >#< "of" >#< _t_c_params >#< type_caller_visit nt_ v+ ) outg+ in case nextVisits of+ NoneVis -> empty+ OneVis v -> declHead >#< _t_c_params >#< type_caller_visit nt_ v+ ManyVis -> declHead >-< indent 3 visitcons+ ) _allstates+ {-# LINE 1205 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule82 #-}+ {-# LINE 588 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule82 = \ _genwrap _wr_inhs1 ->+ {-# LINE 588 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _genwrap "inh" _wr_inhs1+ {-# LINE 1211 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule83 #-}+ {-# LINE 589 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule83 = \ _genwrap _wr_syns ->+ {-# LINE 589 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _genwrap "syn" _wr_syns+ {-# LINE 1217 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule84 #-}+ {-# LINE 590 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule84 = \ _t_params nt_ ->+ {-# LINE 590 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \nm attrs ->+ "and" >#< _t_params >#< nm >|< "_" >|< nt_ >#< "=" >#< ppRecordTp+ [ i >|< "_" >|< nm >|< "_" >|< nt_ >#< ":" >#< ppTp t | (i,t) <- attrs ]+ {-# LINE 1225 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule85 #-}+ {-# LINE 594 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule85 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 594 "./src-ag/ExecutionPlan2Caml.ag" #-}+ fromJust $ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1231 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule86 #-}+ {-# LINE 595 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule86 = \ _inhAttrs _wr_filter ->+ {-# LINE 595 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.toList $ _wr_filter $ _inhAttrs+ {-# LINE 1237 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule87 #-}+ {-# LINE 596 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule87 = \ _inhAttrs ->+ {-# LINE 596 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.toList _inhAttrs+ {-# LINE 1243 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule88 #-}+ {-# LINE 597 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule88 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 597 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if kennedyWarren _lhsIoptions && lateHigherOrderBinding _lhsIoptions+ then Map.delete idLateBindingAttr+ else id+ {-# LINE 1251 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule89 #-}+ {-# LINE 600 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule89 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 600 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1257 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule90 #-}+ {-# LINE 602 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule90 = \ nt_ ->+ {-# LINE 602 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text ("wrap_" ++ show nt_)+ {-# LINE 1263 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule91 #-}+ {-# LINE 603 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule91 = \ nt_ ->+ {-# LINE 603 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text ("inh_" ++ show nt_)+ {-# LINE 1269 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule92 #-}+ {-# LINE 604 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule92 = \ nt_ ->+ {-# LINE 604 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text ("syn_" ++ show nt_)+ {-# LINE 1275 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule93 #-}+ {-# LINE 605 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule93 = \ initial_ nextVisits_ ->+ {-# LINE 605 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault ManyVis initial_ nextVisits_+ {-# LINE 1281 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule94 #-}+ {-# LINE 607 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule94 = \ _t_params _t_type ->+ {-# LINE 607 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _t_params >#< _t_type+ {-# LINE 1287 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule95 #-}+ {-# LINE 608 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule95 = \ _inhname _t_params ->+ {-# LINE 608 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _t_params >#< _inhname+ {-# LINE 1293 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule96 #-}+ {-# LINE 609 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule96 = \ ((_lhsIoptions) :: Options) _wr_inhs1 nt_ ->+ {-# LINE 609 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppRecordVal [ i >|< "_inh_" >|< nt_ >#< "=" >#< lhsname _lhsIoptions True i | (i,_) <- _wr_inhs1 ]+ {-# LINE 1299 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule97 #-}+ {-# LINE 610 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule97 = \ _synname _t_params ->+ {-# LINE 610 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _t_params >#< _synname+ {-# LINE 1305 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule98 #-}+ {-# LINE 611 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule98 = \ _o_sigs _wrapArgInhTp _wrapArgPats _wrapArgSemTp _wrapResTp _wrapname _wrapperPreamble ->+ {-# LINE 611 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< ppFunDecl _o_sigs _wrapname [(pp "act", _wrapArgSemTp ), (_wrapArgPats , _wrapArgInhTp )] _wrapResTp _wrapperPreamble+ {-# LINE 1311 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule99 #-}+ {-# LINE 613 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule99 = \ ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _wrapperBody ->+ {-# LINE 613 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ( if lateHigherOrderBinding _lhsIoptions+ then "let" >#< lhsname _lhsIoptions True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName >#< "in"+ else empty+ )+ >-< _wrapperBody+ {-# LINE 1321 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule100 #-}+ {-# LINE 619 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule100 = \ _firstVisitInfo ((_lhsIoptions) :: Options) _wr_inhs _wr_syns initial_ initialv_ nt_ ->+ {-# LINE 619 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case initialv_ of+ Nothing -> text "{ }"+ Just initv ->+ let attach = "let" >#< "sem" >#< "=" >#< "act." >|< nm_attach nt_ >#< "()" >#< "in"+ pat = ppRecordVal [ nm_outarg i nt_ initv >#< "=" >#< lhsname _lhsIoptions False i | (i,_) <- _wr_syns ]+ bld = ppRecordVal [ i >|< "_syn_" >|< nt_ >#< "=" >#< lhsname _lhsIoptions False i | (i,_) <- _wr_syns ]+ res = "let res = function" >#< pat >#< "->" >#< bld >#< "in"+ inps = "let" >#< "inps" >#< "=" >#< ppRecordVal [ nm_inarg i nt_ initv >#< "=" >#< lhsname _lhsIoptions True i | (i,_) <- _wr_inhs ] >#< "in"+ arg = "let" >#< "arg" >#< "=" >#< argcon >#< argrec >#< "in"+ argcon = case _firstVisitInfo of+ ManyVis -> con_visit nt_ initv+ _ -> empty+ argrec = ppRecordVal+ [ nm_inh nt_ initv >#< "=" >#< "inps"+ , nm_cont nt_ initv >#< "=" >#< "res"+ ]+ invoke = "sem." >|< nm_invoke nt_ initial_ >#< "arg"+ in attach >-< res >-< inps >-< arg >-< invoke+ {-# LINE 1344 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule101 #-}+ {-# LINE 648 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule101 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->+ {-# LINE 648 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _semFunBndDef Seq.<| _prodsIsemFunBndDefs+ {-# LINE 1350 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule102 #-}+ {-# LINE 649 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule102 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->+ {-# LINE 649 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _semFunBndTp Seq.<| _prodsIsemFunBndTps+ {-# LINE 1356 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule103 #-}+ {-# LINE 650 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule103 = \ _semFunBndNm _semname ->+ {-# LINE 650 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 1362 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule104 #-}+ {-# LINE 651 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule104 = \ _semFunBndNm _sem_tp ->+ {-# LINE 651 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _semFunBndNm >#< ":" >#< _sem_tp+ {-# LINE 1368 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule105 #-}+ {-# LINE 652 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule105 = \ nt_ ->+ {-# LINE 652 "./src-ag/ExecutionPlan2Caml.ag" #-}+ lateSemNtLabel nt_+ {-# LINE 1374 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule106 #-}+ {-# LINE 682 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule106 = \ initial_ ->+ {-# LINE 682 "./src-ag/ExecutionPlan2Caml.ag" #-}+ initial_+ {-# LINE 1380 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule107 #-}+ {-# LINE 683 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule107 = \ _allstates ->+ {-# LINE 683 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _allstates+ {-# LINE 1386 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule108 #-}+ {-# LINE 1390 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule108 = \ nextVisits_ ->+ {-# LINE 1390 "./src-ag/ExecutionPlan2Caml.ag" #-}+ nextVisits_+ {-# LINE 1392 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule109 #-}+ {-# LINE 1391 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule109 = \ prevVisits_ ->+ {-# LINE 1391 "./src-ag/ExecutionPlan2Caml.ag" #-}+ prevVisits_+ {-# LINE 1398 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule110 #-}+ {-# LINE 1435 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule110 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->+ {-# LINE 1435 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes+ {-# LINE 1404 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule111 #-}+ {-# LINE 1462 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule111 = \ initial_ nt_ ->+ {-# LINE 1462 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton nt_ initial_+ {-# LINE 1410 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule112 #-}+ {-# LINE 1476 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule112 = \ nt_ params_ ->+ {-# LINE 1476 "./src-ag/ExecutionPlan2Caml.ag" #-}+ NT nt_ (map show params_) False+ {-# LINE 1416 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule113 #-}+ rule113 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _prodsIchildvisit+ {-# INLINE rule114 #-}+ rule114 = \ ((_prodsIerrors) :: Seq Error) ->+ _prodsIerrors+ {-# INLINE rule115 #-}+ rule115 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _prodsIfromToStates+ {-# INLINE rule116 #-}+ rule116 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _prodsIvisitKinds+ {-# INLINE rule117 #-}+ rule117 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _prodsIvisitdefs+ {-# INLINE rule118 #-}+ rule118 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _prodsIvisituses+ {-# INLINE rule119 #-}+ rule119 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule120 #-}+ rule120 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule121 #-}+ rule121 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule122 #-}+ rule122 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule123 #-}+ rule123 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule124 #-}+ rule124 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule125 #-}+ rule125 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule126 #-}+ rule126 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule127 #-}+ rule127 = \ _ntType ->+ _ntType+ {-# INLINE rule128 #-}+ rule128 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- ENonterminals -----------------------------------------------+-- wrapper+data Inh_ENonterminals = Inh_ENonterminals { allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminals :: (String), mainName_Inh_ENonterminals :: (String), options_Inh_ENonterminals :: (Options), synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), typeSyns_Inh_ENonterminals :: (TypeSyns), wrappers_Inh_ENonterminals :: (Set NontermIdent) }+data Syn_ENonterminals = Syn_ENonterminals { childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), code_Syn_ENonterminals :: (PP_Doc), datas_Syn_ENonterminals :: (PP_Doc), errors_Syn_ENonterminals :: (Seq Error), fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), initStates_Syn_ENonterminals :: (Map NontermIdent Int), modules_Syn_ENonterminals :: (PP_Doc), semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_ENonterminals #-}+wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> (Syn_ENonterminals )+wrap_ENonterminals (T_ENonterminals act) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers+ (T_ENonterminals_vOut10 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminals_s11 sem arg)+ return (Syn_ENonterminals _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_ENonterminals #-}+sem_ENonterminals :: ENonterminals -> T_ENonterminals +sem_ENonterminals list = Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list)++-- semantic domain+newtype T_ENonterminals = T_ENonterminals {+ attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )+ }+newtype T_ENonterminals_s11 = C_ENonterminals_s11 {+ inv_ENonterminals_s11 :: (T_ENonterminals_v10 )+ }+data T_ENonterminals_s12 = C_ENonterminals_s12+type T_ENonterminals_v10 = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )+data T_ENonterminals_vIn10 = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (TypeSyns) (Set NontermIdent)+data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_ENonterminals_Cons #-}+sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals +sem_ENonterminals_Cons arg_hd_ arg_tl_ = T_ENonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_ENonterminals_v10 + v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) -> ( let+ _hdX8 = Control.Monad.Identity.runIdentity (attach_T_ENonterminal (arg_hd_))+ _tlX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_tl_))+ (T_ENonterminal_vOut7 _hdIchildvisit _hdIcode _hdIdatas _hdIerrors _hdIfromToStates _hdIinitStates _hdImodules _hdIsemFunBndDefs _hdIsemFunBndTps _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_ENonterminal_s8 _hdX8 (T_ENonterminal_vIn7 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOoptions _hdOsynmap _hdOtypeSyns _hdOwrappers)+ (T_ENonterminals_vOut10 _tlIchildvisit _tlIcode _tlIdatas _tlIerrors _tlIfromToStates _tlIinitStates _tlImodules _tlIsemFunBndDefs _tlIsemFunBndTps _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_ENonterminals_s11 _tlX11 (T_ENonterminals_vIn10 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOoptions _tlOsynmap _tlOtypeSyns _tlOwrappers)+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule129 _hdIchildvisit _tlIchildvisit+ _lhsOcode :: PP_Doc+ _lhsOcode = rule130 _hdIcode _tlIcode+ _lhsOdatas :: PP_Doc+ _lhsOdatas = rule131 _hdIdatas _tlIdatas+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule132 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule133 _hdIfromToStates _tlIfromToStates+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule134 _hdIinitStates _tlIinitStates+ _lhsOmodules :: PP_Doc+ _lhsOmodules = rule135 _hdImodules _tlImodules+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule136 _hdIsemFunBndDefs _tlIsemFunBndDefs+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule137 _hdIsemFunBndTps _tlIsemFunBndTps+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule138 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule139 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule140 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule141 _lhsIallFromToStates+ _hdOallInitStates = rule142 _lhsIallInitStates+ _hdOallVisitKinds = rule143 _lhsIallVisitKinds+ _hdOallchildvisit = rule144 _lhsIallchildvisit+ _hdOavisitdefs = rule145 _lhsIavisitdefs+ _hdOavisituses = rule146 _lhsIavisituses+ _hdOinhmap = rule147 _lhsIinhmap+ _hdOlocalAttrTypes = rule148 _lhsIlocalAttrTypes+ _hdOmainFile = rule149 _lhsImainFile+ _hdOmainName = rule150 _lhsImainName+ _hdOoptions = rule151 _lhsIoptions+ _hdOsynmap = rule152 _lhsIsynmap+ _hdOtypeSyns = rule153 _lhsItypeSyns+ _hdOwrappers = rule154 _lhsIwrappers+ _tlOallFromToStates = rule155 _lhsIallFromToStates+ _tlOallInitStates = rule156 _lhsIallInitStates+ _tlOallVisitKinds = rule157 _lhsIallVisitKinds+ _tlOallchildvisit = rule158 _lhsIallchildvisit+ _tlOavisitdefs = rule159 _lhsIavisitdefs+ _tlOavisituses = rule160 _lhsIavisituses+ _tlOinhmap = rule161 _lhsIinhmap+ _tlOlocalAttrTypes = rule162 _lhsIlocalAttrTypes+ _tlOmainFile = rule163 _lhsImainFile+ _tlOmainName = rule164 _lhsImainName+ _tlOoptions = rule165 _lhsIoptions+ _tlOsynmap = rule166 _lhsIsynmap+ _tlOtypeSyns = rule167 _lhsItypeSyns+ _tlOwrappers = rule168 _lhsIwrappers+ __result_ = T_ENonterminals_vOut10 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminals_s11 v10+ {-# INLINE rule129 #-}+ rule129 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule130 #-}+ rule130 = \ ((_hdIcode) :: PP_Doc) ((_tlIcode) :: PP_Doc) ->+ _hdIcode >-< _tlIcode+ {-# INLINE rule131 #-}+ rule131 = \ ((_hdIdatas) :: PP_Doc) ((_tlIdatas) :: PP_Doc) ->+ _hdIdatas >-< _tlIdatas+ {-# INLINE rule132 #-}+ rule132 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule133 #-}+ rule133 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule134 #-}+ rule134 = \ ((_hdIinitStates) :: Map NontermIdent Int) ((_tlIinitStates) :: Map NontermIdent Int) ->+ _hdIinitStates `mappend` _tlIinitStates+ {-# INLINE rule135 #-}+ rule135 = \ ((_hdImodules) :: PP_Doc) ((_tlImodules) :: PP_Doc) ->+ _hdImodules >-< _tlImodules+ {-# INLINE rule136 #-}+ rule136 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# INLINE rule137 #-}+ rule137 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# INLINE rule138 #-}+ rule138 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule139 #-}+ rule139 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule140 #-}+ rule140 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule141 #-}+ rule141 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule142 #-}+ rule142 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule143 #-}+ rule143 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule144 #-}+ rule144 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule145 #-}+ rule145 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule146 #-}+ rule146 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule147 #-}+ rule147 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule148 #-}+ rule148 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule149 #-}+ rule149 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule150 #-}+ rule150 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule151 #-}+ rule151 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule152 #-}+ rule152 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule153 #-}+ rule153 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule154 #-}+ rule154 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule155 #-}+ rule155 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule156 #-}+ rule156 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule157 #-}+ rule157 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule158 #-}+ rule158 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule159 #-}+ rule159 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule160 #-}+ rule160 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule161 #-}+ rule161 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule162 #-}+ rule162 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule163 #-}+ rule163 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule164 #-}+ rule164 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule165 #-}+ rule165 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule166 #-}+ rule166 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule167 #-}+ rule167 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule168 #-}+ rule168 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_ENonterminals_Nil #-}+sem_ENonterminals_Nil :: T_ENonterminals +sem_ENonterminals_Nil = T_ENonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_ENonterminals_v10 + v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItypeSyns _lhsIwrappers) -> ( let+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule169 ()+ _lhsOcode :: PP_Doc+ _lhsOcode = rule170 ()+ _lhsOdatas :: PP_Doc+ _lhsOdatas = rule171 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule172 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule173 ()+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule174 ()+ _lhsOmodules :: PP_Doc+ _lhsOmodules = rule175 ()+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule176 ()+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule177 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule178 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule179 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule180 ()+ __result_ = T_ENonterminals_vOut10 _lhsOchildvisit _lhsOcode _lhsOdatas _lhsOerrors _lhsOfromToStates _lhsOinitStates _lhsOmodules _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminals_s11 v10+ {-# INLINE rule169 #-}+ rule169 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule170 #-}+ rule170 = \ (_ :: ()) ->+ empty+ {-# INLINE rule171 #-}+ rule171 = \ (_ :: ()) ->+ empty+ {-# INLINE rule172 #-}+ rule172 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule173 #-}+ rule173 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule174 #-}+ rule174 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule175 #-}+ rule175 = \ (_ :: ()) ->+ empty+ {-# INLINE rule176 #-}+ rule176 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule177 #-}+ rule177 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule178 #-}+ rule178 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule179 #-}+ rule179 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule180 #-}+ rule180 = \ (_ :: ()) ->+ Map.empty++-- EProduction -------------------------------------------------+-- wrapper+data Inh_EProduction = Inh_EProduction { allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), allInitStates_Inh_EProduction :: (Map NontermIdent Int), allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allstates_Inh_EProduction :: ([StateIdentifier]), avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_EProduction :: (Attributes), initial_Inh_EProduction :: (StateIdentifier), localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProduction :: (String), mainName_Inh_EProduction :: (String), nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), nt_Inh_EProduction :: (NontermIdent), ntType_Inh_EProduction :: (Type), options_Inh_EProduction :: (Options), params_Inh_EProduction :: ([Identifier]), prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), rename_Inh_EProduction :: (Bool), synmap_Inh_EProduction :: (Attributes) }+data Syn_EProduction = Syn_EProduction { allvisits_Syn_EProduction :: ([VisitStateState]), childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), count_Syn_EProduction :: (Int), datatype_Syn_EProduction :: (PP_Doc), datatype_call_Syn_EProduction :: (PP_Doc), datatype_con_Syn_EProduction :: (PP_Doc), errors_Syn_EProduction :: (Seq Error), fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), semFunBndTps_Syn_EProduction :: (Seq PP_Doc), sem_nt_Syn_EProduction :: (PP_Doc), sem_prod_Syn_EProduction :: (PP_Doc), t_visits_Syn_EProduction :: (PP_Doc), visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_EProduction #-}+wrap_EProduction :: T_EProduction -> Inh_EProduction -> (Syn_EProduction )+wrap_EProduction (T_EProduction act) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap+ (T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProduction_s14 sem arg)+ return (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_EProduction #-}+sem_EProduction :: EProduction -> T_EProduction +sem_EProduction ( EProduction con_ params_ constraints_ rules_ children_ visits_ ) = sem_EProduction_EProduction con_ params_ constraints_ ( sem_ERules rules_ ) ( sem_EChildren children_ ) ( sem_Visits visits_ )++-- semantic domain+newtype T_EProduction = T_EProduction {+ attach_T_EProduction :: Identity (T_EProduction_s14 )+ }+newtype T_EProduction_s14 = C_EProduction_s14 {+ inv_EProduction_s14 :: (T_EProduction_v13 )+ }+data T_EProduction_s15 = C_EProduction_s15+type T_EProduction_v13 = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )+data T_EProduction_vIn13 = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ([StateIdentifier]) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes)+data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Int) (PP_Doc) (PP_Doc) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_EProduction_EProduction #-}+sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules -> T_EChildren -> T_Visits -> T_EProduction +sem_EProduction_EProduction arg_con_ arg_params_ _ arg_rules_ arg_children_ arg_visits_ = T_EProduction (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_EProduction_v13 + v13 = \ (T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) -> ( let+ _rulesX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_rules_))+ _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_children_))+ _visitsX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_visits_))+ (T_ERules_vOut22 _rulesIerrors _rulesImrules _rulesIruledefs _rulesIruleuses _rulesIsem_rules) = inv_ERules_s23 _rulesX23 (T_ERules_vIn22 _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOnt _rulesOoptions _rulesOruleKinds _rulesOsynmap _rulesOusageInfo)+ (T_EChildren_vOut4 _childrenIargnamesw _childrenIchildTypes _childrenIchildintros _childrenIsigs _childrenIterminaldefs) = inv_EChildren_s5 _childrenX5 (T_EChildren_vIn4 _childrenOallInitStates _childrenOcon _childrenOmainFile _childrenOmainName _childrenOnt _childrenOoptions)+ (T_Visits_vOut55 _visitsIallvisits _visitsIchildvisit _visitsIerrors _visitsIfromToStates _visitsIintramap _visitsIlazyIntras _visitsIruleKinds _visitsIruleUsage _visitsIsem_visit _visitsIt_visits _visitsIvisitKinds _visitsIvisitdefs _visitsIvisituses) = inv_Visits_s56 _visitsX56 (T_Visits_vIn55 _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs)+ _childrenOcon = rule181 arg_con_+ _rulesOcon = rule182 arg_con_+ _visitsOcon = rule183 arg_con_+ _o_records = rule184 _lhsIoptions+ _t_params = rule185 _lhsIparams+ _t_c_params = rule186 arg_params_+ _conname = rule187 _lhsInt _lhsIrename arg_con_+ _recname = rule188 _conname+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule189 _childrenIsigs _o_records _recname _t_params+ _lhsOdatatype_call :: PP_Doc+ _lhsOdatatype_call = rule190 _conname _recname _t_params+ _lhsOdatatype_con :: PP_Doc+ _lhsOdatatype_con = rule191 _childrenIsigs _conname _lhsInt _o_records _o_sigs _t_params arg_con_+ _lhsOcount :: Int+ _lhsOcount = rule192 ()+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule193 _childrenIargnamesw _childrenIsigs _lhsInt _lhsIoptions _lhsIrename _o_records arg_con_+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule194 _semFunBndDef+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule195 _semFunBndTp+ _semFunBndDef = rule196 _semFunBndNm _semname+ _semFunBndTp = rule197 _semFunBndNm _sem_tp+ _semFunBndNm = rule198 _lhsInt arg_con_+ _o_sigs = rule199 _lhsIoptions+ _t_type = rule200 _lhsInt+ _semname = rule201 _lhsInt _lhsIoptions arg_con_+ _sem_res_tp = rule202 _t_params _t_type+ _sem_tp = rule203 _childrenIsigs _sem_res_tp+ _initializer = rule204 ()+ _sem_prod = rule205 _childrenIsigs _o_sigs _prod_body _sem_res_tp _semname+ _prod_body = rule206 _initializer _lhsIinitial _lhsInt _rulesIsem_rules _statefuns arg_con_+ _statefuns = rule207 _genstfn _lhsIallstates+ _genstfn = rule208 _lhsIinitial _lhsInextVisits _lhsInt _stargs _stks _stvs+ _stargs = rule209 _childTypes _lhsIallInhmap _lhsIallSynmap _lhsIoptions _localAttrTypes _visitsIintramap+ _stvisits = rule210 _visitsIallvisits+ _stks = rule211 _lhsInextVisits _lhsInt _stvisits _t_c_params arg_con_+ _stvs = rule212 _visitsIsem_visit+ _visitsOmrules = rule213 _rulesImrules+ _visitsOchildintros = rule214 _childrenIchildintros+ _rulesOusageInfo = rule215 _visitsIruleUsage+ _rulesOruleKinds = rule216 _visitsIruleKinds+ _visitsOallintramap = rule217 _visitsIintramap+ _visitsOterminaldefs = rule218 _childrenIterminaldefs+ _visitsOruledefs = rule219 _rulesIruledefs+ _visitsOruleuses = rule220 _rulesIruleuses+ _lazyIntras = rule221 _visitsIlazyIntras+ _childTypes = rule222 _childrenIchildTypes _lhsIntType+ _localAttrTypes = rule223 _lhsIlocalAttrTypes arg_con_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule224 _visitsIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule225 _rulesIerrors _visitsIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule226 _visitsIfromToStates+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule227 _visitsIt_visits+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule228 _visitsIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule229 _visitsIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule230 _visitsIvisituses+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule231 _visitsIallvisits+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule232 _sem_prod+ _rulesOallInhmap = rule233 _lhsIallInhmap+ _rulesOallSynmap = rule234 _lhsIallSynmap+ _rulesOchildTypes = rule235 _childTypes+ _rulesOinhmap = rule236 _lhsIinhmap+ _rulesOlazyIntras = rule237 _lazyIntras+ _rulesOlocalAttrTypes = rule238 _localAttrTypes+ _rulesOmainFile = rule239 _lhsImainFile+ _rulesOmainName = rule240 _lhsImainName+ _rulesOnt = rule241 _lhsInt+ _rulesOoptions = rule242 _lhsIoptions+ _rulesOsynmap = rule243 _lhsIsynmap+ _childrenOallInitStates = rule244 _lhsIallInitStates+ _childrenOmainFile = rule245 _lhsImainFile+ _childrenOmainName = rule246 _lhsImainName+ _childrenOnt = rule247 _lhsInt+ _childrenOoptions = rule248 _lhsIoptions+ _visitsOallFromToStates = rule249 _lhsIallFromToStates+ _visitsOallInhmap = rule250 _lhsIallInhmap+ _visitsOallInitStates = rule251 _lhsIallInitStates+ _visitsOallSynmap = rule252 _lhsIallSynmap+ _visitsOallVisitKinds = rule253 _lhsIallVisitKinds+ _visitsOallchildvisit = rule254 _lhsIallchildvisit+ _visitsOavisitdefs = rule255 _lhsIavisitdefs+ _visitsOavisituses = rule256 _lhsIavisituses+ _visitsOchildTypes = rule257 _childTypes+ _visitsOinhmap = rule258 _lhsIinhmap+ _visitsOnextVisits = rule259 _lhsInextVisits+ _visitsOnt = rule260 _lhsInt+ _visitsOoptions = rule261 _lhsIoptions+ _visitsOparams = rule262 _lhsIparams+ _visitsOprevVisits = rule263 _lhsIprevVisits+ _visitsOsynmap = rule264 _lhsIsynmap+ __result_ = T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProduction_s14 v13+ {-# INLINE rule181 #-}+ {-# LINE 90 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule181 = \ con_ ->+ {-# LINE 90 "./src-ag/ExecutionPlan2Caml.ag" #-}+ con_+ {-# LINE 1904 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule182 #-}+ {-# LINE 91 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule182 = \ con_ ->+ {-# LINE 91 "./src-ag/ExecutionPlan2Caml.ag" #-}+ con_+ {-# LINE 1910 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule183 #-}+ {-# LINE 92 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule183 = \ con_ ->+ {-# LINE 92 "./src-ag/ExecutionPlan2Caml.ag" #-}+ con_+ {-# LINE 1916 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule184 #-}+ {-# LINE 259 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule184 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 259 "./src-ag/ExecutionPlan2Caml.ag" #-}+ dataRecords _lhsIoptions+ {-# LINE 1922 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule185 #-}+ {-# LINE 260 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule185 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 260 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTypeParams _lhsIparams+ {-# LINE 1928 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule186 #-}+ {-# LINE 261 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule186 = \ params_ ->+ {-# LINE 261 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTypeParams (cont_tvar : map pp params_)+ {-# LINE 1934 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule187 #-}+ {-# LINE 262 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule187 = \ ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->+ {-# LINE 262 "./src-ag/ExecutionPlan2Caml.ag" #-}+ conname _lhsIrename _lhsInt con_+ {-# LINE 1940 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule188 #-}+ {-# LINE 263 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule188 = \ _conname ->+ {-# LINE 263 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pp "fields_" >|< _conname+ {-# LINE 1946 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule189 #-}+ {-# LINE 264 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule189 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _o_records _recname _t_params ->+ {-# LINE 264 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< _t_params >#< _recname >#< "="+ >#< ppFieldsType _o_records False _childrenIsigs+ {-# LINE 1953 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule190 #-}+ {-# LINE 266 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule190 = \ _conname _recname _t_params ->+ {-# LINE 266 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pp "|" >#< _conname >#< "of" >#< pp_parens (_t_params >#< _recname )+ {-# LINE 1959 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule191 #-}+ {-# LINE 268 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule191 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _conname ((_lhsInt) :: NontermIdent) _o_records _o_sigs _t_params con_ ->+ {-# LINE 268 "./src-ag/ExecutionPlan2Caml.ag" #-}+ let funNm = _lhsInt >|< "_" >|< con_+ decl = "and" >#< ppFunDecl _o_sigs funNm params (_t_params >#< _lhsInt) body+ params = [ (x, t) | (_,x,_,t) <- _childrenIsigs ]+ body = _conname >#< ppFieldsVal _o_records _childrenIsigs+ in decl+ {-# LINE 1969 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule192 #-}+ {-# LINE 384 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule192 = \ (_ :: ()) ->+ {-# LINE 384 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 1+ {-# LINE 1975 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule193 #-}+ {-# LINE 389 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule193 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _o_records con_ ->+ {-# LINE 389 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "|" >#< conname _lhsIrename _lhsInt con_ >#< ppFieldsVal _o_records _childrenIsigs >#< "->" >#<+ prefix _lhsIoptions >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw+ {-# LINE 1982 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule194 #-}+ {-# LINE 655 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule194 = \ _semFunBndDef ->+ {-# LINE 655 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Seq.singleton _semFunBndDef+ {-# LINE 1988 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule195 #-}+ {-# LINE 656 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule195 = \ _semFunBndTp ->+ {-# LINE 656 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Seq.singleton _semFunBndTp+ {-# LINE 1994 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule196 #-}+ {-# LINE 657 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule196 = \ _semFunBndNm _semname ->+ {-# LINE 657 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 2000 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule197 #-}+ {-# LINE 658 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule197 = \ _semFunBndNm _sem_tp ->+ {-# LINE 658 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _semFunBndNm >#< ":" >#< _sem_tp+ {-# LINE 2006 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule198 #-}+ {-# LINE 659 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule198 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 659 "./src-ag/ExecutionPlan2Caml.ag" #-}+ lateSemConLabel _lhsInt con_+ {-# LINE 2012 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule199 #-}+ {-# LINE 686 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule199 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 686 "./src-ag/ExecutionPlan2Caml.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 2018 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule200 #-}+ {-# LINE 687 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule200 = \ ((_lhsInt) :: NontermIdent) ->+ {-# LINE 687 "./src-ag/ExecutionPlan2Caml.ag" #-}+ type_nt_sem_top _lhsInt+ {-# LINE 2024 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule201 #-}+ {-# LINE 688 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule201 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) con_ ->+ {-# LINE 688 "./src-ag/ExecutionPlan2Caml.ag" #-}+ prefix _lhsIoptions >|< _lhsInt >|< "_" >|< con_+ {-# LINE 2030 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule202 #-}+ {-# LINE 689 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule202 = \ _t_params _t_type ->+ {-# LINE 689 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _t_params >#< _t_type+ {-# LINE 2036 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule203 #-}+ {-# LINE 690 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule203 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _sem_res_tp ->+ {-# LINE 690 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pp_block "" "" "->" [ d | (_,_,d,_) <- _childrenIsigs ] >#< "->" >#< _sem_res_tp+ {-# LINE 2042 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule204 #-}+ {-# LINE 693 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule204 = \ (_ :: ()) ->+ {-# LINE 693 "./src-ag/ExecutionPlan2Caml.ag" #-}+ empty+ {-# LINE 2048 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule205 #-}+ {-# LINE 699 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule205 = \ ((_childrenIsigs) :: [(PP_Doc,PP_Doc,PP_Doc,PP_Doc)]) _o_sigs _prod_body _sem_res_tp _semname ->+ {-# LINE 699 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< ppFunDecl _o_sigs _semname [ (x,d) | (_,x,d,_) <- _childrenIsigs ] _sem_res_tp _prod_body+ {-# LINE 2054 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule206 #-}+ {-# LINE 701 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule206 = \ _initializer ((_lhsIinitial) :: StateIdentifier) ((_lhsInt) :: NontermIdent) ((_rulesIsem_rules) :: PP_Doc) _statefuns con_ ->+ {-# LINE 701 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _initializer+ >-< "{" >#< nm_attach _lhsInt >#< "=" >#< "function () ->"+ >-< indent 2+ ( "(* rules of production" >#< con_ >#< "*)"+ >-< _rulesIsem_rules+ >-< "(* states of production" >#< con_ >#< "*)"+ >-< vlist _statefuns+ >-< nm_st _lhsIinitial+ )+ >#< "}"+ {-# LINE 2069 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule207 #-}+ {-# LINE 717 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule207 = \ _genstfn ((_lhsIallstates) :: [StateIdentifier]) ->+ {-# LINE 717 "./src-ag/ExecutionPlan2Caml.ag" #-}+ map _genstfn _lhsIallstates+ {-# LINE 2075 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule208 #-}+ {-# LINE 719 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule208 = \ ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) _stargs _stks _stvs ->+ {-# LINE 719 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits+ stNm = nm_st st+ stDef body = "let" >#< stNm >#< (if st == _lhsIinitial then empty else _stargs st) >#< "="+ >-< indent 2 body >#< "in"+ in case nextVisitInfo of+ NoneVis ->+ if st == _lhsIinitial+ then stDef (pp "unit")+ else empty+ _ -> stDef $ mklets (_stvs st ++ _stks st) $ ppRecordVal+ [ nm_invoke _lhsInt st >#< "=" >#< nm_k st ]+ {-# LINE 2091 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule209 #-}+ {-# LINE 739 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule209 = \ _childTypes ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 739 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap in ppSpaced+ [ case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _localAttrTypes of+ Just tp -> pp_parens (strNm >#< ":" >#< ppTp tp)+ Nothing -> pp strNm+ Just attr | not (noPerStateTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of+ Just tpDoc -> pp_parens (strNm >#< ":" >#< tpDoc)+ Nothing -> pp strNm+ _ -> pp strNm+ | (strNm, mbAttr) <- Map.assocs attrs+ ] >#< dummyPat _lhsIoptions (Map.null attrs)+ {-# LINE 2109 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule210 #-}+ {-# LINE 754 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule210 = \ ((_visitsIallvisits) :: [VisitStateState]) ->+ {-# LINE 754 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \st -> filter (\(_,f,_) -> f == st) _visitsIallvisits+ {-# LINE 2115 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule211 #-}+ {-# LINE 756 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule211 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) _stvisits _t_c_params con_ ->+ {-# LINE 756 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \st -> let stvisits = _stvisits st+ def = ppFunDecl False (pp $ nm_k st)+ [(pp "arg", _t_c_params >#< type_caller _lhsInt st)] (pp cont_tvar) body+ nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits+ body = case nextVisitInfo of+ NoneVis -> text "?no next visit?"+ OneVis v -> dispatch "arg" v+ ManyVis -> let alt (v,_,_) = "|" >#< con_visit _lhsInt v >#< "chosen" >#< "->" >-< indent 2 (dispatch "chosen" v)+ in "match arg with" >-< (indent 2 $ vlist $ map alt stvisits)+ dispatch nm v = "let" >#< ppRecordVal+ [ nm_inh _lhsInt v >#< "=" >#< "inp"+ , nm_cont _lhsInt v >#< "=" >#< "cont" ]+ >#< "=" >#< pp nm+ >-< "in" >#< "cont" >#< pp_parens (nm_visit v >#< "inp")+ in if null stvisits+ then []+ else [ "(* k-function for production" >#< con_ >#< " *)" >-< def ]+ {-# LINE 2137 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule212 #-}+ {-# LINE 777 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule212 = \ ((_visitsIsem_visit) :: [(StateIdentifier,PP_Doc)] ) ->+ {-# LINE 777 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \st -> [ppf | (f,ppf) <- _visitsIsem_visit, f == st]+ {-# LINE 2143 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule213 #-}+ {-# LINE 778 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule213 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ {-# LINE 778 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _rulesImrules+ {-# LINE 2149 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule214 #-}+ {-# LINE 919 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule214 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ {-# LINE 919 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _childrenIchildintros+ {-# LINE 2155 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule215 #-}+ {-# LINE 1225 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule215 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->+ {-# LINE 1225 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _visitsIruleUsage+ {-# LINE 2161 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule216 #-}+ {-# LINE 1240 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule216 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ {-# LINE 1240 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _visitsIruleKinds+ {-# LINE 2167 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule217 #-}+ {-# LINE 1269 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule217 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 1269 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _visitsIintramap+ {-# LINE 2173 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule218 #-}+ {-# LINE 1270 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule218 = \ ((_childrenIterminaldefs) :: Set String) ->+ {-# LINE 1270 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _childrenIterminaldefs+ {-# LINE 2179 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule219 #-}+ {-# LINE 1294 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule219 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->+ {-# LINE 1294 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _rulesIruledefs+ {-# LINE 2185 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule220 #-}+ {-# LINE 1295 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule220 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 1295 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _rulesIruleuses+ {-# LINE 2191 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule221 #-}+ {-# LINE 1349 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule221 = \ ((_visitsIlazyIntras) :: Set String) ->+ {-# LINE 1349 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _visitsIlazyIntras+ {-# LINE 2197 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule222 #-}+ {-# LINE 1421 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule222 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->+ {-# LINE 1421 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes+ {-# LINE 2203 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule223 #-}+ {-# LINE 1438 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule223 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->+ {-# LINE 1438 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes+ {-# LINE 2209 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule224 #-}+ rule224 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _visitsIchildvisit+ {-# INLINE rule225 #-}+ rule225 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->+ _rulesIerrors Seq.>< _visitsIerrors+ {-# INLINE rule226 #-}+ rule226 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _visitsIfromToStates+ {-# INLINE rule227 #-}+ rule227 = \ ((_visitsIt_visits) :: PP_Doc) ->+ _visitsIt_visits+ {-# INLINE rule228 #-}+ rule228 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _visitsIvisitKinds+ {-# INLINE rule229 #-}+ rule229 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _visitsIvisitdefs+ {-# INLINE rule230 #-}+ rule230 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _visitsIvisituses+ {-# INLINE rule231 #-}+ rule231 = \ ((_visitsIallvisits) :: [VisitStateState]) ->+ _visitsIallvisits+ {-# INLINE rule232 #-}+ rule232 = \ _sem_prod ->+ _sem_prod+ {-# INLINE rule233 #-}+ rule233 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule234 #-}+ rule234 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule235 #-}+ rule235 = \ _childTypes ->+ _childTypes+ {-# INLINE rule236 #-}+ rule236 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule237 #-}+ rule237 = \ _lazyIntras ->+ _lazyIntras+ {-# INLINE rule238 #-}+ rule238 = \ _localAttrTypes ->+ _localAttrTypes+ {-# INLINE rule239 #-}+ rule239 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule240 #-}+ rule240 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule241 #-}+ rule241 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule242 #-}+ rule242 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule243 #-}+ rule243 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule244 #-}+ rule244 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule245 #-}+ rule245 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule246 #-}+ rule246 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule247 #-}+ rule247 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule248 #-}+ rule248 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule249 #-}+ rule249 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule250 #-}+ rule250 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule251 #-}+ rule251 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule252 #-}+ rule252 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule253 #-}+ rule253 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule254 #-}+ rule254 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule255 #-}+ rule255 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule256 #-}+ rule256 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule257 #-}+ rule257 = \ _childTypes ->+ _childTypes+ {-# INLINE rule258 #-}+ rule258 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule259 #-}+ rule259 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule260 #-}+ rule260 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule261 #-}+ rule261 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule262 #-}+ rule262 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule263 #-}+ rule263 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule264 #-}+ rule264 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap++-- EProductions ------------------------------------------------+-- wrapper+data Inh_EProductions = Inh_EProductions { allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), allInitStates_Inh_EProductions :: (Map NontermIdent Int), allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allstates_Inh_EProductions :: ([StateIdentifier]), avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), inhmap_Inh_EProductions :: (Attributes), initial_Inh_EProductions :: (StateIdentifier), localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProductions :: (String), mainName_Inh_EProductions :: (String), nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), nt_Inh_EProductions :: (NontermIdent), ntType_Inh_EProductions :: (Type), options_Inh_EProductions :: (Options), params_Inh_EProductions :: ([Identifier]), prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), rename_Inh_EProductions :: (Bool), synmap_Inh_EProductions :: (Attributes) }+data Syn_EProductions = Syn_EProductions { allvisits_Syn_EProductions :: ([VisitStateState]), childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), count_Syn_EProductions :: (Int), datatype_Syn_EProductions :: ([PP_Doc]), datatype_call_Syn_EProductions :: ([PP_Doc]), datatype_con_Syn_EProductions :: ([PP_Doc]), errors_Syn_EProductions :: (Seq Error), fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), semFunBndTps_Syn_EProductions :: (Seq PP_Doc), sem_nt_Syn_EProductions :: (PP_Doc), sem_prod_Syn_EProductions :: (PP_Doc), t_visits_Syn_EProductions :: (PP_Doc), visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_EProductions #-}+wrap_EProductions :: T_EProductions -> Inh_EProductions -> (Syn_EProductions )+wrap_EProductions (T_EProductions act) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap+ (T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProductions_s17 sem arg)+ return (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_EProductions #-}+sem_EProductions :: EProductions -> T_EProductions +sem_EProductions list = Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list)++-- semantic domain+newtype T_EProductions = T_EProductions {+ attach_T_EProductions :: Identity (T_EProductions_s17 )+ }+newtype T_EProductions_s17 = C_EProductions_s17 {+ inv_EProductions_s17 :: (T_EProductions_v16 )+ }+data T_EProductions_s18 = C_EProductions_s18+type T_EProductions_v16 = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )+data T_EProductions_vIn16 = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ([StateIdentifier]) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes)+data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Int) ([PP_Doc]) ([PP_Doc]) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_EProductions_Cons #-}+sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions +sem_EProductions_Cons arg_hd_ arg_tl_ = T_EProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_EProductions_v16 + v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) -> ( let+ _hdX14 = Control.Monad.Identity.runIdentity (attach_T_EProduction (arg_hd_))+ _tlX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_tl_))+ (T_EProduction_vOut13 _hdIallvisits _hdIchildvisit _hdIcount _hdIdatatype _hdIdatatype_call _hdIdatatype_con _hdIerrors _hdIfromToStates _hdIsemFunBndDefs _hdIsemFunBndTps _hdIsem_nt _hdIsem_prod _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_EProduction_s14 _hdX14 (T_EProduction_vIn13 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOprevVisits _hdOrename _hdOsynmap)+ (T_EProductions_vOut16 _tlIallvisits _tlIchildvisit _tlIcount _tlIdatatype _tlIdatatype_call _tlIdatatype_con _tlIerrors _tlIfromToStates _tlIsemFunBndDefs _tlIsemFunBndTps _tlIsem_nt _tlIsem_prod _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_EProductions_s17 _tlX17 (T_EProductions_vIn16 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOprevVisits _tlOrename _tlOsynmap)+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule265 _hdIallvisits+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule266 _hdIt_visits+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule267 _hdIchildvisit _tlIchildvisit+ _lhsOcount :: Int+ _lhsOcount = rule268 _hdIcount _tlIcount+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule269 _hdIdatatype _tlIdatatype+ _lhsOdatatype_call :: [PP_Doc]+ _lhsOdatatype_call = rule270 _hdIdatatype_call _tlIdatatype_call+ _lhsOdatatype_con :: [PP_Doc]+ _lhsOdatatype_con = rule271 _hdIdatatype_con _tlIdatatype_con+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule272 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule273 _hdIfromToStates _tlIfromToStates+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule274 _hdIsemFunBndDefs _tlIsemFunBndDefs+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule275 _hdIsemFunBndTps _tlIsemFunBndTps+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule276 _hdIsem_nt _tlIsem_nt+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule277 _hdIsem_prod _tlIsem_prod+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule278 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule279 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule280 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule281 _lhsIallFromToStates+ _hdOallInhmap = rule282 _lhsIallInhmap+ _hdOallInitStates = rule283 _lhsIallInitStates+ _hdOallSynmap = rule284 _lhsIallSynmap+ _hdOallVisitKinds = rule285 _lhsIallVisitKinds+ _hdOallchildvisit = rule286 _lhsIallchildvisit+ _hdOallstates = rule287 _lhsIallstates+ _hdOavisitdefs = rule288 _lhsIavisitdefs+ _hdOavisituses = rule289 _lhsIavisituses+ _hdOinhmap = rule290 _lhsIinhmap+ _hdOinitial = rule291 _lhsIinitial+ _hdOlocalAttrTypes = rule292 _lhsIlocalAttrTypes+ _hdOmainFile = rule293 _lhsImainFile+ _hdOmainName = rule294 _lhsImainName+ _hdOnextVisits = rule295 _lhsInextVisits+ _hdOnt = rule296 _lhsInt+ _hdOntType = rule297 _lhsIntType+ _hdOoptions = rule298 _lhsIoptions+ _hdOparams = rule299 _lhsIparams+ _hdOprevVisits = rule300 _lhsIprevVisits+ _hdOrename = rule301 _lhsIrename+ _hdOsynmap = rule302 _lhsIsynmap+ _tlOallFromToStates = rule303 _lhsIallFromToStates+ _tlOallInhmap = rule304 _lhsIallInhmap+ _tlOallInitStates = rule305 _lhsIallInitStates+ _tlOallSynmap = rule306 _lhsIallSynmap+ _tlOallVisitKinds = rule307 _lhsIallVisitKinds+ _tlOallchildvisit = rule308 _lhsIallchildvisit+ _tlOallstates = rule309 _lhsIallstates+ _tlOavisitdefs = rule310 _lhsIavisitdefs+ _tlOavisituses = rule311 _lhsIavisituses+ _tlOinhmap = rule312 _lhsIinhmap+ _tlOinitial = rule313 _lhsIinitial+ _tlOlocalAttrTypes = rule314 _lhsIlocalAttrTypes+ _tlOmainFile = rule315 _lhsImainFile+ _tlOmainName = rule316 _lhsImainName+ _tlOnextVisits = rule317 _lhsInextVisits+ _tlOnt = rule318 _lhsInt+ _tlOntType = rule319 _lhsIntType+ _tlOoptions = rule320 _lhsIoptions+ _tlOparams = rule321 _lhsIparams+ _tlOprevVisits = rule322 _lhsIprevVisits+ _tlOrename = rule323 _lhsIrename+ _tlOsynmap = rule324 _lhsIsynmap+ __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProductions_s17 v16+ {-# INLINE rule265 #-}+ {-# LINE 439 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule265 = \ ((_hdIallvisits) :: [VisitStateState]) ->+ {-# LINE 439 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _hdIallvisits+ {-# LINE 2459 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule266 #-}+ {-# LINE 534 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule266 = \ ((_hdIt_visits) :: PP_Doc) ->+ {-# LINE 534 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _hdIt_visits+ {-# LINE 2465 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule267 #-}+ rule267 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule268 #-}+ rule268 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->+ _hdIcount + _tlIcount+ {-# INLINE rule269 #-}+ rule269 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->+ _hdIdatatype : _tlIdatatype+ {-# INLINE rule270 #-}+ rule270 = \ ((_hdIdatatype_call) :: PP_Doc) ((_tlIdatatype_call) :: [PP_Doc]) ->+ _hdIdatatype_call : _tlIdatatype_call+ {-# INLINE rule271 #-}+ rule271 = \ ((_hdIdatatype_con) :: PP_Doc) ((_tlIdatatype_con) :: [PP_Doc]) ->+ _hdIdatatype_con : _tlIdatatype_con+ {-# INLINE rule272 #-}+ rule272 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule273 #-}+ rule273 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule274 #-}+ rule274 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# INLINE rule275 #-}+ rule275 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# INLINE rule276 #-}+ rule276 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->+ _hdIsem_nt >-< _tlIsem_nt+ {-# INLINE rule277 #-}+ rule277 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->+ _hdIsem_prod >-< _tlIsem_prod+ {-# INLINE rule278 #-}+ rule278 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule279 #-}+ rule279 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule280 #-}+ rule280 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule281 #-}+ rule281 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule282 #-}+ rule282 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule283 #-}+ rule283 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule284 #-}+ rule284 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule285 #-}+ rule285 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule286 #-}+ rule286 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule287 #-}+ rule287 = \ ((_lhsIallstates) :: [StateIdentifier]) ->+ _lhsIallstates+ {-# INLINE rule288 #-}+ rule288 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule289 #-}+ rule289 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule290 #-}+ rule290 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule291 #-}+ rule291 = \ ((_lhsIinitial) :: StateIdentifier) ->+ _lhsIinitial+ {-# INLINE rule292 #-}+ rule292 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule293 #-}+ rule293 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule294 #-}+ rule294 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule295 #-}+ rule295 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule296 #-}+ rule296 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule297 #-}+ rule297 = \ ((_lhsIntType) :: Type) ->+ _lhsIntType+ {-# INLINE rule298 #-}+ rule298 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule299 #-}+ rule299 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule300 #-}+ rule300 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule301 #-}+ rule301 = \ ((_lhsIrename) :: Bool) ->+ _lhsIrename+ {-# INLINE rule302 #-}+ rule302 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule303 #-}+ rule303 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule304 #-}+ rule304 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule305 #-}+ rule305 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule306 #-}+ rule306 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule307 #-}+ rule307 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule308 #-}+ rule308 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule309 #-}+ rule309 = \ ((_lhsIallstates) :: [StateIdentifier]) ->+ _lhsIallstates+ {-# INLINE rule310 #-}+ rule310 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule311 #-}+ rule311 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule312 #-}+ rule312 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule313 #-}+ rule313 = \ ((_lhsIinitial) :: StateIdentifier) ->+ _lhsIinitial+ {-# INLINE rule314 #-}+ rule314 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule315 #-}+ rule315 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule316 #-}+ rule316 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule317 #-}+ rule317 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule318 #-}+ rule318 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule319 #-}+ rule319 = \ ((_lhsIntType) :: Type) ->+ _lhsIntType+ {-# INLINE rule320 #-}+ rule320 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule321 #-}+ rule321 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule322 #-}+ rule322 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule323 #-}+ rule323 = \ ((_lhsIrename) :: Bool) ->+ _lhsIrename+ {-# INLINE rule324 #-}+ rule324 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_EProductions_Nil #-}+sem_EProductions_Nil :: T_EProductions +sem_EProductions_Nil = T_EProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_EProductions_v16 + v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap) -> ( let+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule325 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule326 ()+ _lhsOcount :: Int+ _lhsOcount = rule327 ()+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule328 ()+ _lhsOdatatype_call :: [PP_Doc]+ _lhsOdatatype_call = rule329 ()+ _lhsOdatatype_con :: [PP_Doc]+ _lhsOdatatype_con = rule330 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule331 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule332 ()+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule333 ()+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule334 ()+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule335 ()+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule336 ()+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule337 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule338 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule339 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule340 ()+ __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOdatatype_call _lhsOdatatype_con _lhsOerrors _lhsOfromToStates _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProductions_s17 v16+ {-# INLINE rule325 #-}+ {-# LINE 440 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule325 = \ (_ :: ()) ->+ {-# LINE 440 "./src-ag/ExecutionPlan2Caml.ag" #-}+ error "Every nonterminal should have at least 1 production"+ {-# LINE 2687 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule326 #-}+ rule326 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule327 #-}+ rule327 = \ (_ :: ()) ->+ 0+ {-# INLINE rule328 #-}+ rule328 = \ (_ :: ()) ->+ []+ {-# INLINE rule329 #-}+ rule329 = \ (_ :: ()) ->+ []+ {-# INLINE rule330 #-}+ rule330 = \ (_ :: ()) ->+ []+ {-# INLINE rule331 #-}+ rule331 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule332 #-}+ rule332 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule333 #-}+ rule333 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule334 #-}+ rule334 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule335 #-}+ rule335 = \ (_ :: ()) ->+ empty+ {-# INLINE rule336 #-}+ rule336 = \ (_ :: ()) ->+ empty+ {-# INLINE rule337 #-}+ rule337 = \ (_ :: ()) ->+ empty+ {-# INLINE rule338 #-}+ rule338 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule339 #-}+ rule339 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule340 #-}+ rule340 = \ (_ :: ()) ->+ Map.empty++-- ERule -------------------------------------------------------+-- wrapper+data Inh_ERule = Inh_ERule { allInhmap_Inh_ERule :: (Map NontermIdent Attributes), allSynmap_Inh_ERule :: (Map NontermIdent Attributes), childTypes_Inh_ERule :: (Map Identifier Type), con_Inh_ERule :: (ConstructorIdent), inhmap_Inh_ERule :: (Attributes), lazyIntras_Inh_ERule :: (Set String), localAttrTypes_Inh_ERule :: (Map Identifier Type), mainFile_Inh_ERule :: (String), mainName_Inh_ERule :: (String), nt_Inh_ERule :: (NontermIdent), options_Inh_ERule :: (Options), ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), synmap_Inh_ERule :: (Attributes), usageInfo_Inh_ERule :: (Map Identifier Int) }+data Syn_ERule = Syn_ERule { errors_Syn_ERule :: (Seq Error), mrules_Syn_ERule :: (Map Identifier (VisitKind -> Either Error PP_Doc)), ruledefs_Syn_ERule :: (Map Identifier (Set String)), ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERule :: (PP_Doc) }+{-# INLINABLE wrap_ERule #-}+wrap_ERule :: T_ERule -> Inh_ERule -> (Syn_ERule )+wrap_ERule (T_ERule act) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo+ (T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules) <- return (inv_ERule_s20 sem arg)+ return (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules)+ )++-- cata+{-# INLINE sem_ERule #-}+sem_ERule :: ERule -> T_ERule +sem_ERule ( ERule name_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ mbError_ ) = sem_ERule_ERule name_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ mbError_++-- semantic domain+newtype T_ERule = T_ERule {+ attach_T_ERule :: Identity (T_ERule_s20 )+ }+newtype T_ERule_s20 = C_ERule_s20 {+ inv_ERule_s20 :: (T_ERule_v19 )+ }+data T_ERule_s21 = C_ERule_s21+type T_ERule_v19 = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )+data T_ERule_vIn19 = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (Map Identifier Int)+data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc)+{-# NOINLINE sem_ERule_ERule #-}+sem_ERule_ERule :: (Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule +sem_ERule_ERule arg_name_ arg_pattern_ arg_rhs_ _ _ arg_explicit_ arg_pure_ arg_mbError_ = T_ERule (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_ERule_v19 + v19 = \ (T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) -> ( let+ _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))+ _rhsX29 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))+ (T_Pattern_vOut40 _patternIattrTypes _patternIattrs _patternIcopy _patternIextraDefs _patternIisUnderscore _patternIsem_lhs) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 _patternOallInhmap _patternOallSynmap _patternOanyLazyKind _patternOinhmap _patternOlocalAttrTypes _patternOoptions _patternOsynmap)+ (T_Expression_vOut28 _rhsIattrs _rhsIpos _rhsIsemfunc _rhsItks) = inv_Expression_s29 _rhsX29 (T_Expression_vIn28 _rhsOoptions)+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule341 _rulecode _used+ _rulecode = rule342 _declHead _endpragma _genpragma _pragma _rhsIpos _rhsIsemfunc+ _pragma = rule343 _lhsIoptions _rhsIpos+ _endpragma = rule344 _lhsImainFile _lhsIoptions+ _genpragma = rule345 _haspos _lhsIoptions arg_explicit_+ _haspos = rule346 _rhsIpos+ _declHead = rule347 _argPats _lhsIoptions _rhsIattrs arg_name_+ _argPats = rule348 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIlocalAttrTypes _lhsIoptions _rhsIattrs+ _argExprs = rule349 _rhsIattrs+ _stepcode = rule350 _argExprs _lhsIoptions _patternIextraDefs _patternIsem_lhs _rhsIattrs arg_name_ arg_pure_+ _lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)+ _lhsOmrules = rule351 _stepcode arg_name_+ _used = rule352 _lhsIusageInfo arg_name_+ _kinds = rule353 _lhsIruleKinds arg_name_+ _anyLazyKind = rule354 _kinds+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule355 _patternIattrs arg_name_+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule356 _rhsIattrs arg_name_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule357 _used arg_mbError_+ _patternOallInhmap = rule358 _lhsIallInhmap+ _patternOallSynmap = rule359 _lhsIallSynmap+ _patternOanyLazyKind = rule360 _anyLazyKind+ _patternOinhmap = rule361 _lhsIinhmap+ _patternOlocalAttrTypes = rule362 _lhsIlocalAttrTypes+ _patternOoptions = rule363 _lhsIoptions+ _patternOsynmap = rule364 _lhsIsynmap+ _rhsOoptions = rule365 _lhsIoptions+ __result_ = T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules+ in __result_ )+ in C_ERule_s20 v19+ {-# INLINE rule341 #-}+ {-# LINE 977 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule341 = \ _rulecode _used ->+ {-# LINE 977 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if _used == 0+ then empty+ else _rulecode+ {-# LINE 2815 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule342 #-}+ {-# LINE 980 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule342 = \ _declHead _endpragma _genpragma _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) ->+ {-# LINE 980 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ( if _genpragma+ then _pragma+ else empty+ )+ >-< _declHead+ >-< indent ((column _rhsIpos - 2) `max` 2)+ ( if _genpragma+ then _pragma >-< _rhsIsemfunc >-< _endpragma+ else _rhsIsemfunc+ )+ >#< "in"+ {-# LINE 2831 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule343 #-}+ {-# LINE 993 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule343 = \ ((_lhsIoptions) :: Options) ((_rhsIpos) :: Pos) ->+ {-# LINE 993 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppLinePragma _lhsIoptions (line _rhsIpos) (file _rhsIpos)+ {-# LINE 2837 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule344 #-}+ {-# LINE 994 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule344 = \ ((_lhsImainFile) :: String) ((_lhsIoptions) :: Options) ->+ {-# LINE 994 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppWithLineNr (\ln -> ppLinePragma _lhsIoptions (ln+1) _lhsImainFile)+ {-# LINE 2843 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule345 #-}+ {-# LINE 995 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule345 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->+ {-# LINE 995 "./src-ag/ExecutionPlan2Caml.ag" #-}+ genLinePragmas _lhsIoptions && explicit_ && _haspos+ {-# LINE 2849 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule346 #-}+ {-# LINE 996 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule346 = \ ((_rhsIpos) :: Pos) ->+ {-# LINE 996 "./src-ag/ExecutionPlan2Caml.ag" #-}+ line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))+ {-# LINE 2855 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule347 #-}+ {-# LINE 1000 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule347 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->+ {-# LINE 1000 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "let" >#< name_ >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "="+ {-# LINE 2861 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule348 #-}+ {-# LINE 1002 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule348 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ {-# LINE 1002 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppSpaced+ [ case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _lhsIlocalAttrTypes of+ Just tp -> pp_parens (strNm >#< ":" >#< ppTp tp)+ Nothing -> pp strNm+ Just attr | not (noPerStateTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of+ Just tpDoc -> pp_parens (strNm >#< ":" >#< tpDoc)+ Nothing -> pp strNm+ _ -> pp strNm+ | (strNm, mbAttr) <- Map.assocs _rhsIattrs+ ]+ {-# LINE 2879 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule349 #-}+ {-# LINE 1016 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule349 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ {-# LINE 1016 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppSpaced $ Map.keys _rhsIattrs+ {-# LINE 2885 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule350 #-}+ {-# LINE 1017 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule350 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIextraDefs) :: [(PP_Doc,PP_Doc)]) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->+ {-# LINE 1017 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \kind ->+ let mkBind (pat,expr) = "let" >#< pat >#< "=" >#< expr >#< "in"+ in if kind `compatibleRule` pure_+ then Right $ mkBind (_patternIsem_lhs, name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs))+ >-< vlist (map mkBind _patternIextraDefs)+ else Left $ IncompatibleRuleKind name_ kind+ {-# LINE 2896 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule351 #-}+ {-# LINE 1024 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule351 = \ _stepcode name_ ->+ {-# LINE 1024 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ _stepcode+ {-# LINE 2902 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule352 #-}+ {-# LINE 1227 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule352 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->+ {-# LINE 1227 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault 0 name_ _lhsIusageInfo+ {-# LINE 2908 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule353 #-}+ {-# LINE 1243 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule353 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->+ {-# LINE 1243 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault Set.empty name_ _lhsIruleKinds+ {-# LINE 2914 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule354 #-}+ {-# LINE 1244 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule354 = \ _kinds ->+ {-# LINE 1244 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Set.fold (\k r -> isLazyKind k || r) False _kinds+ {-# LINE 2920 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule355 #-}+ {-# LINE 1290 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule355 = \ ((_patternIattrs) :: Set String) name_ ->+ {-# LINE 1290 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ _patternIattrs+ {-# LINE 2926 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule356 #-}+ {-# LINE 1291 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule356 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->+ {-# LINE 1291 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ _rhsIattrs+ {-# LINE 2932 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule357 #-}+ {-# LINE 1485 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule357 = \ _used mbError_ ->+ {-# LINE 1485 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case mbError_ of+ Just e | _used > 0 -> Seq.singleton e+ _ -> Seq.empty+ {-# LINE 2940 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule358 #-}+ rule358 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule359 #-}+ rule359 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule360 #-}+ rule360 = \ _anyLazyKind ->+ _anyLazyKind+ {-# INLINE rule361 #-}+ rule361 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule362 #-}+ rule362 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule363 #-}+ rule363 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule364 #-}+ rule364 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule365 #-}+ rule365 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- ERules ------------------------------------------------------+-- wrapper+data Inh_ERules = Inh_ERules { allInhmap_Inh_ERules :: (Map NontermIdent Attributes), allSynmap_Inh_ERules :: (Map NontermIdent Attributes), childTypes_Inh_ERules :: (Map Identifier Type), con_Inh_ERules :: (ConstructorIdent), inhmap_Inh_ERules :: (Attributes), lazyIntras_Inh_ERules :: (Set String), localAttrTypes_Inh_ERules :: (Map Identifier Type), mainFile_Inh_ERules :: (String), mainName_Inh_ERules :: (String), nt_Inh_ERules :: (NontermIdent), options_Inh_ERules :: (Options), ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), synmap_Inh_ERules :: (Attributes), usageInfo_Inh_ERules :: (Map Identifier Int) }+data Syn_ERules = Syn_ERules { errors_Syn_ERules :: (Seq Error), mrules_Syn_ERules :: (Map Identifier (VisitKind -> Either Error PP_Doc)), ruledefs_Syn_ERules :: (Map Identifier (Set String)), ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERules :: (PP_Doc) }+{-# INLINABLE wrap_ERules #-}+wrap_ERules :: T_ERules -> Inh_ERules -> (Syn_ERules )+wrap_ERules (T_ERules act) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo+ (T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules) <- return (inv_ERules_s23 sem arg)+ return (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules)+ )++-- cata+{-# NOINLINE sem_ERules #-}+sem_ERules :: ERules -> T_ERules +sem_ERules list = Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list)++-- semantic domain+newtype T_ERules = T_ERules {+ attach_T_ERules :: Identity (T_ERules_s23 )+ }+newtype T_ERules_s23 = C_ERules_s23 {+ inv_ERules_s23 :: (T_ERules_v22 )+ }+data T_ERules_s24 = C_ERules_s24+type T_ERules_v22 = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )+data T_ERules_vIn22 = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (Map Identifier Int)+data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc)+{-# NOINLINE sem_ERules_Cons #-}+sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules +sem_ERules_Cons arg_hd_ arg_tl_ = T_ERules (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_ERules_v22 + v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) -> ( let+ _hdX20 = Control.Monad.Identity.runIdentity (attach_T_ERule (arg_hd_))+ _tlX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_tl_))+ (T_ERule_vOut19 _hdIerrors _hdImrules _hdIruledefs _hdIruleuses _hdIsem_rules) = inv_ERule_s20 _hdX20 (T_ERule_vIn19 _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOnt _hdOoptions _hdOruleKinds _hdOsynmap _hdOusageInfo)+ (T_ERules_vOut22 _tlIerrors _tlImrules _tlIruledefs _tlIruleuses _tlIsem_rules) = inv_ERules_s23 _tlX23 (T_ERules_vIn22 _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOnt _tlOoptions _tlOruleKinds _tlOsynmap _tlOusageInfo)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule366 _hdIerrors _tlIerrors+ _lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)+ _lhsOmrules = rule367 _hdImrules _tlImrules+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule368 _hdIruledefs _tlIruledefs+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule369 _hdIruleuses _tlIruleuses+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule370 _hdIsem_rules _tlIsem_rules+ _hdOallInhmap = rule371 _lhsIallInhmap+ _hdOallSynmap = rule372 _lhsIallSynmap+ _hdOchildTypes = rule373 _lhsIchildTypes+ _hdOcon = rule374 _lhsIcon+ _hdOinhmap = rule375 _lhsIinhmap+ _hdOlazyIntras = rule376 _lhsIlazyIntras+ _hdOlocalAttrTypes = rule377 _lhsIlocalAttrTypes+ _hdOmainFile = rule378 _lhsImainFile+ _hdOmainName = rule379 _lhsImainName+ _hdOnt = rule380 _lhsInt+ _hdOoptions = rule381 _lhsIoptions+ _hdOruleKinds = rule382 _lhsIruleKinds+ _hdOsynmap = rule383 _lhsIsynmap+ _hdOusageInfo = rule384 _lhsIusageInfo+ _tlOallInhmap = rule385 _lhsIallInhmap+ _tlOallSynmap = rule386 _lhsIallSynmap+ _tlOchildTypes = rule387 _lhsIchildTypes+ _tlOcon = rule388 _lhsIcon+ _tlOinhmap = rule389 _lhsIinhmap+ _tlOlazyIntras = rule390 _lhsIlazyIntras+ _tlOlocalAttrTypes = rule391 _lhsIlocalAttrTypes+ _tlOmainFile = rule392 _lhsImainFile+ _tlOmainName = rule393 _lhsImainName+ _tlOnt = rule394 _lhsInt+ _tlOoptions = rule395 _lhsIoptions+ _tlOruleKinds = rule396 _lhsIruleKinds+ _tlOsynmap = rule397 _lhsIsynmap+ _tlOusageInfo = rule398 _lhsIusageInfo+ __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules+ in __result_ )+ in C_ERules_s23 v22+ {-# INLINE rule366 #-}+ rule366 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule367 #-}+ rule367 = \ ((_hdImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ((_tlImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _hdImrules `Map.union` _tlImrules+ {-# INLINE rule368 #-}+ rule368 = \ ((_hdIruledefs) :: Map Identifier (Set String)) ((_tlIruledefs) :: Map Identifier (Set String)) ->+ _hdIruledefs `uwSetUnion` _tlIruledefs+ {-# INLINE rule369 #-}+ rule369 = \ ((_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _hdIruleuses `uwMapUnion` _tlIruleuses+ {-# INLINE rule370 #-}+ rule370 = \ ((_hdIsem_rules) :: PP_Doc) ((_tlIsem_rules) :: PP_Doc) ->+ _hdIsem_rules >-< _tlIsem_rules+ {-# INLINE rule371 #-}+ rule371 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule372 #-}+ rule372 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule373 #-}+ rule373 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule374 #-}+ rule374 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule375 #-}+ rule375 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule376 #-}+ rule376 = \ ((_lhsIlazyIntras) :: Set String) ->+ _lhsIlazyIntras+ {-# INLINE rule377 #-}+ rule377 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule378 #-}+ rule378 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule379 #-}+ rule379 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule380 #-}+ rule380 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule381 #-}+ rule381 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule382 #-}+ rule382 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _lhsIruleKinds+ {-# INLINE rule383 #-}+ rule383 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule384 #-}+ rule384 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->+ _lhsIusageInfo+ {-# INLINE rule385 #-}+ rule385 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule386 #-}+ rule386 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule387 #-}+ rule387 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule388 #-}+ rule388 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule389 #-}+ rule389 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule390 #-}+ rule390 = \ ((_lhsIlazyIntras) :: Set String) ->+ _lhsIlazyIntras+ {-# INLINE rule391 #-}+ rule391 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule392 #-}+ rule392 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule393 #-}+ rule393 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule395 #-}+ rule395 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule396 #-}+ rule396 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _lhsIruleKinds+ {-# INLINE rule397 #-}+ rule397 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule398 #-}+ rule398 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->+ _lhsIusageInfo+{-# NOINLINE sem_ERules_Nil #-}+sem_ERules_Nil :: T_ERules +sem_ERules_Nil = T_ERules (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_ERules_v22 + v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsIusageInfo) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule399 ()+ _lhsOmrules :: Map Identifier (VisitKind -> Either Error PP_Doc)+ _lhsOmrules = rule400 ()+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule401 ()+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule402 ()+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule403 ()+ __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules+ in __result_ )+ in C_ERules_s23 v22+ {-# INLINE rule399 #-}+ rule399 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule400 #-}+ rule400 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule401 #-}+ rule401 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule402 #-}+ rule402 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule403 #-}+ rule403 = \ (_ :: ()) ->+ empty++-- ExecutionPlan -----------------------------------------------+-- wrapper+data Inh_ExecutionPlan = Inh_ExecutionPlan { inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ExecutionPlan :: (String), mainName_Inh_ExecutionPlan :: (String), options_Inh_ExecutionPlan :: (Options), synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes) }+data Syn_ExecutionPlan = Syn_ExecutionPlan { code_Syn_ExecutionPlan :: (PP_Doc), datas_Syn_ExecutionPlan :: (PP_Doc), errors_Syn_ExecutionPlan :: (Seq Error), modules_Syn_ExecutionPlan :: (PP_Doc) }+{-# INLINABLE wrap_ExecutionPlan #-}+wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> (Syn_ExecutionPlan )+wrap_ExecutionPlan (T_ExecutionPlan act) (Inh_ExecutionPlan _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ExecutionPlan_vIn25 _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap+ (T_ExecutionPlan_vOut25 _lhsOcode _lhsOdatas _lhsOerrors _lhsOmodules) <- return (inv_ExecutionPlan_s26 sem arg)+ return (Syn_ExecutionPlan _lhsOcode _lhsOdatas _lhsOerrors _lhsOmodules)+ )++-- cata+{-# INLINE sem_ExecutionPlan #-}+sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan +sem_ExecutionPlan ( ExecutionPlan nonts_ typeSyns_ wrappers_ derivings_ ) = sem_ExecutionPlan_ExecutionPlan ( sem_ENonterminals nonts_ ) typeSyns_ wrappers_ derivings_++-- semantic domain+newtype T_ExecutionPlan = T_ExecutionPlan {+ attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )+ }+newtype T_ExecutionPlan_s26 = C_ExecutionPlan_s26 {+ inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )+ }+data T_ExecutionPlan_s27 = C_ExecutionPlan_s27+type T_ExecutionPlan_v25 = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )+data T_ExecutionPlan_vIn25 = T_ExecutionPlan_vIn25 (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes)+data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (PP_Doc) (PP_Doc) (Seq Error) (PP_Doc)+{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}+sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan +sem_ExecutionPlan_ExecutionPlan arg_nonts_ arg_typeSyns_ arg_wrappers_ _ = T_ExecutionPlan (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_ExecutionPlan_v25 + v25 = \ (T_ExecutionPlan_vIn25 _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap) -> ( let+ _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_nonts_))+ (T_ENonterminals_vOut10 _nontsIchildvisit _nontsIcode _nontsIdatas _nontsIerrors _nontsIfromToStates _nontsIinitStates _nontsImodules _nontsIsemFunBndDefs _nontsIsemFunBndTps _nontsIvisitKinds _nontsIvisitdefs _nontsIvisituses) = inv_ENonterminals_s11 _nontsX11 (T_ENonterminals_vIn10 _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOoptions _nontsOsynmap _nontsOtypeSyns _nontsOwrappers)+ _lhsOcode :: PP_Doc+ _lhsOcode = rule404 _nontsIcode _wrappersExtra+ _lhsOdatas :: PP_Doc+ _lhsOdatas = rule405 _commonExtra _nontsIdatas+ _nontsOwrappers = rule406 arg_wrappers_+ _nontsOtypeSyns = rule407 arg_typeSyns_+ _wrappersExtra = rule408 _lateSemBndDef _lhsIoptions+ _commonExtra = rule409 _lateSemBndTp _lhsIoptions+ _lateSemBndTp = rule410 _lhsImainName _nontsIsemFunBndTps+ _lateSemBndDef = rule411 _lhsImainName _nontsIsemFunBndDefs+ _nontsOallchildvisit = rule412 _nontsIchildvisit+ _nontsOavisitdefs = rule413 _nontsIvisitdefs+ _nontsOavisituses = rule414 _nontsIvisituses+ _nontsOallFromToStates = rule415 _nontsIfromToStates+ _nontsOallVisitKinds = rule416 _nontsIvisitKinds+ _nontsOallInitStates = rule417 _nontsIinitStates+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule418 _nontsIerrors+ _lhsOmodules :: PP_Doc+ _lhsOmodules = rule419 _nontsImodules+ _nontsOinhmap = rule420 _lhsIinhmap+ _nontsOlocalAttrTypes = rule421 _lhsIlocalAttrTypes+ _nontsOmainFile = rule422 _lhsImainFile+ _nontsOmainName = rule423 _lhsImainName+ _nontsOoptions = rule424 _lhsIoptions+ _nontsOsynmap = rule425 _lhsIsynmap+ __result_ = T_ExecutionPlan_vOut25 _lhsOcode _lhsOdatas _lhsOerrors _lhsOmodules+ in __result_ )+ in C_ExecutionPlan_s26 v25+ {-# INLINE rule404 #-}+ {-# LINE 105 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule404 = \ ((_nontsIcode) :: PP_Doc) _wrappersExtra ->+ {-# LINE 105 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIcode >-< _wrappersExtra+ {-# LINE 3256 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule405 #-}+ {-# LINE 106 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule405 = \ _commonExtra ((_nontsIdatas) :: PP_Doc) ->+ {-# LINE 106 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIdatas >-< _commonExtra+ {-# LINE 3262 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule406 #-}+ {-# LINE 112 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule406 = \ wrappers_ ->+ {-# LINE 112 "./src-ag/ExecutionPlan2Caml.ag" #-}+ wrappers_+ {-# LINE 3268 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule407 #-}+ {-# LINE 173 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule407 = \ typeSyns_ ->+ {-# LINE 173 "./src-ag/ExecutionPlan2Caml.ag" #-}+ typeSyns_+ {-# LINE 3274 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule408 #-}+ {-# LINE 663 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule408 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->+ {-# LINE 663 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then _lateSemBndDef+ else empty+ {-# LINE 3282 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule409 #-}+ {-# LINE 666 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule409 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->+ {-# LINE 666 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then _lateSemBndTp+ else empty+ {-# LINE 3290 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule410 #-}+ {-# LINE 669 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule410 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->+ {-# LINE 669 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< ppRecordTp (toList _nontsIsemFunBndTps)+ {-# LINE 3296 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule411 #-}+ {-# LINE 670 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule411 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) ->+ {-# LINE 670 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< lateBindingFieldNm _lhsImainName >#< ":" >#< lateBindingTypeNm _lhsImainName >#< "="+ >-< (indent 2 $ ppRecordVal $ toList _nontsIsemFunBndDefs)+ {-# LINE 3303 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule412 #-}+ {-# LINE 1157 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule412 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ {-# LINE 1157 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIchildvisit+ {-# LINE 3309 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule413 #-}+ {-# LINE 1315 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule413 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ {-# LINE 1315 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIvisitdefs+ {-# LINE 3315 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule414 #-}+ {-# LINE 1316 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule414 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ {-# LINE 1316 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIvisituses+ {-# LINE 3321 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule415 #-}+ {-# LINE 1407 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule415 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ {-# LINE 1407 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIfromToStates+ {-# LINE 3327 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule416 #-}+ {-# LINE 1451 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule416 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ {-# LINE 1451 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIvisitKinds+ {-# LINE 3333 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule417 #-}+ {-# LINE 1465 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule417 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->+ {-# LINE 1465 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nontsIinitStates+ {-# LINE 3339 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule418 #-}+ rule418 = \ ((_nontsIerrors) :: Seq Error) ->+ _nontsIerrors+ {-# INLINE rule419 #-}+ rule419 = \ ((_nontsImodules) :: PP_Doc) ->+ _nontsImodules+ {-# INLINE rule420 #-}+ rule420 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule421 #-}+ rule421 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule422 #-}+ rule422 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule423 #-}+ rule423 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule424 #-}+ rule424 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule425 #-}+ rule425 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap++-- Expression --------------------------------------------------+-- wrapper+data Inh_Expression = Inh_Expression { options_Inh_Expression :: (Options) }+data Syn_Expression = Syn_Expression { attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), pos_Syn_Expression :: (Pos), semfunc_Syn_Expression :: (PP_Doc), tks_Syn_Expression :: ([HsToken]) }+{-# INLINABLE wrap_Expression #-}+wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )+wrap_Expression (T_Expression act) (Inh_Expression _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Expression_vIn28 _lhsIoptions+ (T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks) <- return (inv_Expression_s29 sem arg)+ return (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks)+ )++-- cata+{-# INLINE sem_Expression #-}+sem_Expression :: Expression -> T_Expression +sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_++-- semantic domain+newtype T_Expression = T_Expression {+ attach_T_Expression :: Identity (T_Expression_s29 )+ }+newtype T_Expression_s29 = C_Expression_s29 {+ inv_Expression_s29 :: (T_Expression_v28 )+ }+data T_Expression_s30 = C_Expression_s30+type T_Expression_v28 = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )+data T_Expression_vIn28 = T_Expression_vIn28 (Options)+data T_Expression_vOut28 = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])+{-# NOINLINE sem_Expression_Expression #-}+sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression +sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_Expression_v28 + v28 = \ (T_Expression_vIn28 _lhsIoptions) -> ( let+ _lhsOtks :: [HsToken]+ _lhsOtks = rule426 arg_tks_+ _lhsOpos :: Pos+ _lhsOpos = rule427 arg_pos_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule428 _inhhstoken arg_tks_+ _lhsOsemfunc :: PP_Doc+ _lhsOsemfunc = rule429 _inhhstoken arg_tks_+ _inhhstoken = rule430 _lhsIoptions+ __result_ = T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks+ in __result_ )+ in C_Expression_s29 v28+ {-# INLINE rule426 #-}+ {-# LINE 1028 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule426 = \ tks_ ->+ {-# LINE 1028 "./src-ag/ExecutionPlan2Caml.ag" #-}+ tks_+ {-# LINE 3419 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule427 #-}+ {-# LINE 1049 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule427 = \ pos_ ->+ {-# LINE 1049 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pos_+ {-# LINE 3425 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule428 #-}+ {-# LINE 1141 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule428 = \ _inhhstoken tks_ ->+ {-# LINE 1141 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_+ {-# LINE 3431 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule429 #-}+ {-# LINE 1142 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule429 = \ _inhhstoken tks_ ->+ {-# LINE 1142 "./src-ag/ExecutionPlan2Caml.ag" #-}+ vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_+ {-# LINE 3437 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule430 #-}+ {-# LINE 1143 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule430 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1143 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Inh_HsToken _lhsIoptions+ {-# LINE 3443 "dist/build/ExecutionPlan2Caml.hs"#-}++-- HsToken -----------------------------------------------------+-- wrapper+data Inh_HsToken = Inh_HsToken { options_Inh_HsToken :: (Options) }+data Syn_HsToken = Syn_HsToken { attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), tok_Syn_HsToken :: ((Pos,String)) }+{-# INLINABLE wrap_HsToken #-}+wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )+wrap_HsToken (T_HsToken act) (Inh_HsToken _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsToken_vIn31 _lhsIoptions+ (T_HsToken_vOut31 _lhsOattrs _lhsOtok) <- return (inv_HsToken_s32 sem arg)+ return (Syn_HsToken _lhsOattrs _lhsOtok)+ )++-- cata+{-# NOINLINE sem_HsToken #-}+sem_HsToken :: HsToken -> T_HsToken +sem_HsToken ( AGLocal var_ pos_ rdesc_ ) = sem_HsToken_AGLocal var_ pos_ rdesc_+sem_HsToken ( AGField field_ attr_ pos_ rdesc_ ) = sem_HsToken_AGField field_ attr_ pos_ rdesc_+sem_HsToken ( HsToken value_ pos_ ) = sem_HsToken_HsToken value_ pos_+sem_HsToken ( CharToken value_ pos_ ) = sem_HsToken_CharToken value_ pos_+sem_HsToken ( StrToken value_ pos_ ) = sem_HsToken_StrToken value_ pos_+sem_HsToken ( Err mesg_ pos_ ) = sem_HsToken_Err mesg_ pos_++-- semantic domain+newtype T_HsToken = T_HsToken {+ attach_T_HsToken :: Identity (T_HsToken_s32 )+ }+newtype T_HsToken_s32 = C_HsToken_s32 {+ inv_HsToken_s32 :: (T_HsToken_v31 )+ }+data T_HsToken_s33 = C_HsToken_s33+type T_HsToken_v31 = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )+data T_HsToken_vIn31 = T_HsToken_vIn31 (Options)+data T_HsToken_vOut31 = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))+{-# NOINLINE sem_HsToken_AGLocal #-}+sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken +sem_HsToken_AGLocal arg_var_ arg_pos_ _ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule431 arg_var_+ _tok = rule432 arg_pos_ arg_var_+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule433 _tok+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule431 #-}+ {-# LINE 1100 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule431 = \ var_ ->+ {-# LINE 1100 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton (fieldname var_) Nothing+ {-# LINE 3500 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule432 #-}+ {-# LINE 1363 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule432 = \ pos_ var_ ->+ {-# LINE 1363 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (pos_,fieldname var_)+ {-# LINE 3506 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule433 #-}+ rule433 = \ _tok ->+ _tok+{-# NOINLINE sem_HsToken_AGField #-}+sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken +sem_HsToken_AGField arg_field_ arg_attr_ arg_pos_ arg_rdesc_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _mbAttr = rule434 arg_attr_ arg_field_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule435 _lhsIoptions _mbAttr arg_attr_ arg_field_+ _addTrace = rule436 arg_attr_ arg_field_ arg_rdesc_+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule437 _addTrace _lhsIoptions arg_attr_ arg_field_ arg_pos_+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule434 #-}+ {-# LINE 1101 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule434 = \ attr_ field_ ->+ {-# LINE 1101 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if field_ == _INST || field_ == _FIELD || field_ == _INST'+ then Nothing+ else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_+ {-# LINE 3533 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule435 #-}+ {-# LINE 1104 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule435 = \ ((_lhsIoptions) :: Options) _mbAttr attr_ field_ ->+ {-# LINE 1104 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton (attrname _lhsIoptions True field_ attr_) _mbAttr+ {-# LINE 3539 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule436 #-}+ {-# LINE 1367 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule436 = \ attr_ field_ rdesc_ ->+ {-# LINE 1367 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case rdesc_ of+ Just d -> \x -> "(prerr_endline " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ "; " ++ x ++ ")"+ Nothing -> id+ {-# LINE 3547 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule437 #-}+ {-# LINE 1370 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule437 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->+ {-# LINE 1370 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (pos_, _addTrace $ attrname _lhsIoptions True field_ attr_)+ {-# LINE 3553 "dist/build/ExecutionPlan2Caml.hs"#-}+{-# NOINLINE sem_HsToken_HsToken #-}+sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_HsToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule438 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule439 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule438 #-}+ {-# LINE 1372 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule438 = \ pos_ value_ ->+ {-# LINE 1372 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (pos_, value_)+ {-# LINE 3573 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule439 #-}+ rule439 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_CharToken #-}+sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_CharToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule440 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule441 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule440 #-}+ {-# LINE 1374 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule440 = \ pos_ value_ ->+ {-# LINE 1374 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (pos_, if null value_+ then ""+ else showCharShort (head value_)+ )+ {-# LINE 3599 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule441 #-}+ rule441 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_StrToken #-}+sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_StrToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule442 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule443 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule442 #-}+ {-# LINE 1379 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule442 = \ pos_ value_ ->+ {-# LINE 1379 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (pos_, showStrShort value_)+ {-# LINE 3622 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule443 #-}+ rule443 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_Err #-}+sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken +sem_HsToken_Err _ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule444 arg_pos_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule445 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule444 #-}+ {-# LINE 1380 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule444 = \ pos_ ->+ {-# LINE 1380 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (pos_, "")+ {-# LINE 3645 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule445 #-}+ rule445 = \ (_ :: ()) ->+ Map.empty++-- HsTokens ----------------------------------------------------+-- wrapper+data Inh_HsTokens = Inh_HsTokens { options_Inh_HsTokens :: (Options) }+data Syn_HsTokens = Syn_HsTokens { tks_Syn_HsTokens :: ([(Pos,String)]) }+{-# INLINABLE wrap_HsTokens #-}+wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )+wrap_HsTokens (T_HsTokens act) (Inh_HsTokens _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsTokens_vIn34 _lhsIoptions+ (T_HsTokens_vOut34 _lhsOtks) <- return (inv_HsTokens_s35 sem arg)+ return (Syn_HsTokens _lhsOtks)+ )++-- cata+{-# NOINLINE sem_HsTokens #-}+sem_HsTokens :: HsTokens -> T_HsTokens +sem_HsTokens list = Prelude.foldr sem_HsTokens_Cons sem_HsTokens_Nil (Prelude.map sem_HsToken list)++-- semantic domain+newtype T_HsTokens = T_HsTokens {+ attach_T_HsTokens :: Identity (T_HsTokens_s35 )+ }+newtype T_HsTokens_s35 = C_HsTokens_s35 {+ inv_HsTokens_s35 :: (T_HsTokens_v34 )+ }+data T_HsTokens_s36 = C_HsTokens_s36+type T_HsTokens_v34 = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )+data T_HsTokens_vIn34 = T_HsTokens_vIn34 (Options)+data T_HsTokens_vOut34 = T_HsTokens_vOut34 ([(Pos,String)])+{-# NOINLINE sem_HsTokens_Cons #-}+sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens +sem_HsTokens_Cons arg_hd_ arg_tl_ = T_HsTokens (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_HsTokens_v34 + v34 = \ (T_HsTokens_vIn34 _lhsIoptions) -> ( let+ _hdX32 = Control.Monad.Identity.runIdentity (attach_T_HsToken (arg_hd_))+ _tlX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tl_))+ (T_HsToken_vOut31 _hdIattrs _hdItok) = inv_HsToken_s32 _hdX32 (T_HsToken_vIn31 _hdOoptions)+ (T_HsTokens_vOut34 _tlItks) = inv_HsTokens_s35 _tlX35 (T_HsTokens_vIn34 _tlOoptions)+ _lhsOtks :: [(Pos,String)]+ _lhsOtks = rule446 _hdItok _tlItks+ _hdOoptions = rule447 _lhsIoptions+ _tlOoptions = rule448 _lhsIoptions+ __result_ = T_HsTokens_vOut34 _lhsOtks+ in __result_ )+ in C_HsTokens_s35 v34+ {-# INLINE rule446 #-}+ {-# LINE 1359 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule446 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->+ {-# LINE 1359 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _hdItok : _tlItks+ {-# LINE 3703 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule447 #-}+ rule447 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule448 #-}+ rule448 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_HsTokens_Nil #-}+sem_HsTokens_Nil :: T_HsTokens +sem_HsTokens_Nil = T_HsTokens (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_HsTokens_v34 + v34 = \ (T_HsTokens_vIn34 _lhsIoptions) -> ( let+ _lhsOtks :: [(Pos,String)]+ _lhsOtks = rule449 ()+ __result_ = T_HsTokens_vOut34 _lhsOtks+ in __result_ )+ in C_HsTokens_s35 v34+ {-# INLINE rule449 #-}+ {-# LINE 1360 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule449 = \ (_ :: ()) ->+ {-# LINE 1360 "./src-ag/ExecutionPlan2Caml.ag" #-}+ []+ {-# LINE 3727 "dist/build/ExecutionPlan2Caml.hs"#-}++-- HsTokensRoot ------------------------------------------------+-- wrapper+data Inh_HsTokensRoot = Inh_HsTokensRoot { options_Inh_HsTokensRoot :: (Options) }+data Syn_HsTokensRoot = Syn_HsTokensRoot { }+{-# INLINABLE wrap_HsTokensRoot #-}+wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> (Syn_HsTokensRoot )+wrap_HsTokensRoot (T_HsTokensRoot act) (Inh_HsTokensRoot _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsTokensRoot_vIn37 _lhsIoptions+ (T_HsTokensRoot_vOut37 ) <- return (inv_HsTokensRoot_s38 sem arg)+ return (Syn_HsTokensRoot )+ )++-- cata+{-# INLINE sem_HsTokensRoot #-}+sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot +sem_HsTokensRoot ( HsTokensRoot tokens_ ) = sem_HsTokensRoot_HsTokensRoot ( sem_HsTokens tokens_ )++-- semantic domain+newtype T_HsTokensRoot = T_HsTokensRoot {+ attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )+ }+newtype T_HsTokensRoot_s38 = C_HsTokensRoot_s38 {+ inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )+ }+data T_HsTokensRoot_s39 = C_HsTokensRoot_s39+type T_HsTokensRoot_v37 = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )+data T_HsTokensRoot_vIn37 = T_HsTokensRoot_vIn37 (Options)+data T_HsTokensRoot_vOut37 = T_HsTokensRoot_vOut37 +{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot +sem_HsTokensRoot_HsTokensRoot arg_tokens_ = T_HsTokensRoot (return st38) where+ {-# NOINLINE st38 #-}+ st38 = let+ v37 :: T_HsTokensRoot_v37 + v37 = \ (T_HsTokensRoot_vIn37 _lhsIoptions) -> ( let+ _tokensX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tokens_))+ (T_HsTokens_vOut34 _tokensItks) = inv_HsTokens_s35 _tokensX35 (T_HsTokens_vIn34 _tokensOoptions)+ _tokensOoptions = rule450 _lhsIoptions+ __result_ = T_HsTokensRoot_vOut37 + in __result_ )+ in C_HsTokensRoot_s38 v37+ {-# INLINE rule450 #-}+ rule450 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), anyLazyKind_Inh_Pattern :: (Bool), inhmap_Inh_Pattern :: (Attributes), localAttrTypes_Inh_Pattern :: (Map Identifier Type), options_Inh_Pattern :: (Options), synmap_Inh_Pattern :: (Attributes) }+data Syn_Pattern = Syn_Pattern { attrTypes_Syn_Pattern :: (PP_Doc), attrs_Syn_Pattern :: (Set String), copy_Syn_Pattern :: (Pattern), extraDefs_Syn_Pattern :: ([(PP_Doc,PP_Doc)]), isUnderscore_Syn_Pattern :: (Bool), sem_lhs_Syn_Pattern :: ( PP_Doc ) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ (T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs) <- return (inv_Pattern_s41 sem arg)+ return (Syn_Pattern _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s41 )+ }+newtype T_Pattern_s41 = C_Pattern_s41 {+ inv_Pattern_s41 :: (T_Pattern_v40 )+ }+data T_Pattern_s42 = C_Pattern_s42+type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )+data T_Pattern_vIn40 = T_Pattern_vIn40 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)+data T_Pattern_vOut40 = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) ([(PP_Doc,PP_Doc)]) (Bool) ( PP_Doc )+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIextraDefs _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule451 _patsIsem_lhs arg_name_+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule452 ()+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule453 _patsIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule454 _patsIattrs+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule455 _patsIextraDefs+ _copy = rule456 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule457 _copy+ _patsOallInhmap = rule458 _lhsIallInhmap+ _patsOallSynmap = rule459 _lhsIallSynmap+ _patsOanyLazyKind = rule460 _lhsIanyLazyKind+ _patsOinhmap = rule461 _lhsIinhmap+ _patsOlocalAttrTypes = rule462 _lhsIlocalAttrTypes+ _patsOoptions = rule463 _lhsIoptions+ _patsOsynmap = rule464 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule451 #-}+ {-# LINE 1066 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule451 = \ ((_patsIsem_lhs) :: [PP_Doc]) name_ ->+ {-# LINE 1066 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pp_parens $ name_ >#< pp_block "(" ")" "," _patsIsem_lhs+ {-# LINE 3847 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule452 #-}+ {-# LINE 1075 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule452 = \ (_ :: ()) ->+ {-# LINE 1075 "./src-ag/ExecutionPlan2Caml.ag" #-}+ False+ {-# LINE 3853 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule453 #-}+ rule453 = \ ((_patsIattrTypes) :: PP_Doc) ->+ _patsIattrTypes+ {-# INLINE rule454 #-}+ rule454 = \ ((_patsIattrs) :: Set String) ->+ _patsIattrs+ {-# INLINE rule455 #-}+ rule455 = \ ((_patsIextraDefs) :: [(PP_Doc,PP_Doc)]) ->+ _patsIextraDefs+ {-# INLINE rule456 #-}+ rule456 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule457 #-}+ rule457 = \ _copy ->+ _copy+ {-# INLINE rule458 #-}+ rule458 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule459 #-}+ rule459 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule460 #-}+ rule460 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule461 #-}+ rule461 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule462 #-}+ rule462 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule463 #-}+ rule463 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule464 #-}+ rule464 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIextraDefs _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule465 _patsIsem_lhs+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule466 ()+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule467 _patsIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule468 _patsIattrs+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule469 _patsIextraDefs+ _copy = rule470 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule471 _copy+ _patsOallInhmap = rule472 _lhsIallInhmap+ _patsOallSynmap = rule473 _lhsIallSynmap+ _patsOanyLazyKind = rule474 _lhsIanyLazyKind+ _patsOinhmap = rule475 _lhsIinhmap+ _patsOlocalAttrTypes = rule476 _lhsIlocalAttrTypes+ _patsOoptions = rule477 _lhsIoptions+ _patsOsynmap = rule478 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule465 #-}+ {-# LINE 1065 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule465 = \ ((_patsIsem_lhs) :: [PP_Doc]) ->+ {-# LINE 1065 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pp_block "(" ")" "," _patsIsem_lhs+ {-# LINE 3927 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule466 #-}+ {-# LINE 1076 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule466 = \ (_ :: ()) ->+ {-# LINE 1076 "./src-ag/ExecutionPlan2Caml.ag" #-}+ False+ {-# LINE 3933 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule467 #-}+ rule467 = \ ((_patsIattrTypes) :: PP_Doc) ->+ _patsIattrTypes+ {-# INLINE rule468 #-}+ rule468 = \ ((_patsIattrs) :: Set String) ->+ _patsIattrs+ {-# INLINE rule469 #-}+ rule469 = \ ((_patsIextraDefs) :: [(PP_Doc,PP_Doc)]) ->+ _patsIextraDefs+ {-# INLINE rule470 #-}+ rule470 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule471 #-}+ rule471 = \ _copy ->+ _copy+ {-# INLINE rule472 #-}+ rule472 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule473 #-}+ rule473 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule474 #-}+ rule474 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule475 #-}+ rule475 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule476 #-}+ rule476 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule477 #-}+ rule477 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule478 #-}+ rule478 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIextraDefs _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)+ _var = rule479 _lhsIoptions arg_attr_ arg_field_+ _hasTp = rule480 _mbTp+ _o_sigs = rule481 _lhsIoptions+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule482 _hasTp _mbTp _o_sigs _var+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule483 _patIisUnderscore _patIsem_lhs _var+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule484 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule485 _lhsIoptions _patIattrs arg_attr_ arg_field_+ _mbTp = rule486 _lhsIlocalAttrTypes _lhsIsynmap arg_attr_ arg_field_+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule487 _lhsIoptions _mbTp _patIattrTypes arg_attr_ arg_field_+ _copy = rule488 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule489 _copy+ _patOallInhmap = rule490 _lhsIallInhmap+ _patOallSynmap = rule491 _lhsIallSynmap+ _patOanyLazyKind = rule492 _lhsIanyLazyKind+ _patOinhmap = rule493 _lhsIinhmap+ _patOlocalAttrTypes = rule494 _lhsIlocalAttrTypes+ _patOoptions = rule495 _lhsIoptions+ _patOsynmap = rule496 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule479 #-}+ {-# LINE 1057 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule479 = \ ((_lhsIoptions) :: Options) attr_ field_ ->+ {-# LINE 1057 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text $ attrname _lhsIoptions False field_ attr_+ {-# LINE 4011 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule480 #-}+ {-# LINE 1058 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule480 = \ _mbTp ->+ {-# LINE 1058 "./src-ag/ExecutionPlan2Caml.ag" #-}+ isJust _mbTp+ {-# LINE 4017 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule481 #-}+ {-# LINE 1059 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule481 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1059 "./src-ag/ExecutionPlan2Caml.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 4023 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule482 #-}+ {-# LINE 1061 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule482 = \ _hasTp _mbTp _o_sigs _var ->+ {-# LINE 1061 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppArg (_hasTp && _o_sigs ) _var (maybe (text "?no type?") ppTp _mbTp )+ {-# LINE 4029 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule483 #-}+ {-# LINE 1062 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule483 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _var ->+ {-# LINE 1062 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if _patIisUnderscore+ then []+ else [ (_patIsem_lhs, _var ) ]+ {-# LINE 4037 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule484 #-}+ {-# LINE 1077 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule484 = \ (_ :: ()) ->+ {-# LINE 1077 "./src-ag/ExecutionPlan2Caml.ag" #-}+ False+ {-# LINE 4043 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule485 #-}+ {-# LINE 1083 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule485 = \ ((_lhsIoptions) :: Options) ((_patIattrs) :: Set String) attr_ field_ ->+ {-# LINE 1083 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Set.insert (attrname _lhsIoptions False field_ attr_) _patIattrs+ {-# LINE 4049 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule486 #-}+ {-# LINE 1089 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule486 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->+ {-# LINE 1089 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if field_ == _LHS+ then Map.lookup attr_ _lhsIsynmap+ else if field_ == _LOC+ then Map.lookup attr_ _lhsIlocalAttrTypes+ else Nothing+ {-# LINE 4059 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule487 #-}+ {-# LINE 1094 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule487 = \ ((_lhsIoptions) :: Options) _mbTp ((_patIattrTypes) :: PP_Doc) attr_ field_ ->+ {-# LINE 1094 "./src-ag/ExecutionPlan2Caml.ag" #-}+ maybe empty (\tp -> (attrname _lhsIoptions False field_ attr_) >#< "::" >#< ppTp tp) _mbTp+ >-< _patIattrTypes+ {-# LINE 4066 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule488 #-}+ rule488 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule489 #-}+ rule489 = \ _copy ->+ _copy+ {-# INLINE rule490 #-}+ rule490 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule491 #-}+ rule491 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule492 #-}+ rule492 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule493 #-}+ rule493 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule494 #-}+ rule494 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule495 #-}+ rule495 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule496 #-}+ rule496 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIextraDefs _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule497 _patIsem_lhs+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule498 _patIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule499 _patIattrs+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule500 _patIextraDefs+ _copy = rule501 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule502 _copy+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule503 _patIisUnderscore+ _patOallInhmap = rule504 _lhsIallInhmap+ _patOallSynmap = rule505 _lhsIallSynmap+ _patOanyLazyKind = rule506 _lhsIanyLazyKind+ _patOinhmap = rule507 _lhsIinhmap+ _patOlocalAttrTypes = rule508 _lhsIlocalAttrTypes+ _patOoptions = rule509 _lhsIoptions+ _patOsynmap = rule510 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule497 #-}+ {-# LINE 1068 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule497 = \ ((_patIsem_lhs) :: PP_Doc ) ->+ {-# LINE 1068 "./src-ag/ExecutionPlan2Caml.ag" #-}+ pp_parens (text "lazy" >#< _patIsem_lhs)+ {-# LINE 4131 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule498 #-}+ rule498 = \ ((_patIattrTypes) :: PP_Doc) ->+ _patIattrTypes+ {-# INLINE rule499 #-}+ rule499 = \ ((_patIattrs) :: Set String) ->+ _patIattrs+ {-# INLINE rule500 #-}+ rule500 = \ ((_patIextraDefs) :: [(PP_Doc,PP_Doc)]) ->+ _patIextraDefs+ {-# INLINE rule501 #-}+ rule501 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule502 #-}+ rule502 = \ _copy ->+ _copy+ {-# INLINE rule503 #-}+ rule503 = \ ((_patIisUnderscore) :: Bool) ->+ _patIisUnderscore+ {-# INLINE rule504 #-}+ rule504 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule505 #-}+ rule505 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule506 #-}+ rule506 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule507 #-}+ rule507 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule508 #-}+ rule508 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule509 #-}+ rule509 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule510 #-}+ rule510 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule511 ()+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule512 ()+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule513 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule514 ()+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule515 ()+ _copy = rule516 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule517 _copy+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule511 #-}+ {-# LINE 1067 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule511 = \ (_ :: ()) ->+ {-# LINE 1067 "./src-ag/ExecutionPlan2Caml.ag" #-}+ text "_"+ {-# LINE 4199 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule512 #-}+ {-# LINE 1078 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule512 = \ (_ :: ()) ->+ {-# LINE 1078 "./src-ag/ExecutionPlan2Caml.ag" #-}+ True+ {-# LINE 4205 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule513 #-}+ rule513 = \ (_ :: ()) ->+ empty+ {-# INLINE rule514 #-}+ rule514 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule515 #-}+ rule515 = \ (_ :: ()) ->+ []+ {-# INLINE rule516 #-}+ rule516 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule517 #-}+ rule517 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), anyLazyKind_Inh_Patterns :: (Bool), inhmap_Inh_Patterns :: (Attributes), localAttrTypes_Inh_Patterns :: (Map Identifier Type), options_Inh_Patterns :: (Options), synmap_Inh_Patterns :: (Attributes) }+data Syn_Patterns = Syn_Patterns { attrTypes_Syn_Patterns :: (PP_Doc), attrs_Syn_Patterns :: (Set String), copy_Syn_Patterns :: (Patterns), extraDefs_Syn_Patterns :: ([(PP_Doc,PP_Doc)]), sem_lhs_Syn_Patterns :: ([PP_Doc]) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ (T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs) <- return (inv_Patterns_s44 sem arg)+ return (Syn_Patterns _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s44 )+ }+newtype T_Patterns_s44 = C_Patterns_s44 {+ inv_Patterns_s44 :: (T_Patterns_v43 )+ }+data T_Patterns_s45 = C_Patterns_s45+type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )+data T_Patterns_vIn43 = T_Patterns_vIn43 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)+data T_Patterns_vOut43 = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([(PP_Doc,PP_Doc)]) ([PP_Doc])+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut40 _hdIattrTypes _hdIattrs _hdIcopy _hdIextraDefs _hdIisUnderscore _hdIsem_lhs) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 _hdOallInhmap _hdOallSynmap _hdOanyLazyKind _hdOinhmap _hdOlocalAttrTypes _hdOoptions _hdOsynmap)+ (T_Patterns_vOut43 _tlIattrTypes _tlIattrs _tlIcopy _tlIextraDefs _tlIsem_lhs) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 _tlOallInhmap _tlOallSynmap _tlOanyLazyKind _tlOinhmap _tlOlocalAttrTypes _tlOoptions _tlOsynmap)+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule518 _hdIattrTypes _tlIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule519 _hdIattrs _tlIattrs+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule520 _hdIextraDefs _tlIextraDefs+ _lhsOsem_lhs :: [PP_Doc]+ _lhsOsem_lhs = rule521 _hdIsem_lhs _tlIsem_lhs+ _copy = rule522 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule523 _copy+ _hdOallInhmap = rule524 _lhsIallInhmap+ _hdOallSynmap = rule525 _lhsIallSynmap+ _hdOanyLazyKind = rule526 _lhsIanyLazyKind+ _hdOinhmap = rule527 _lhsIinhmap+ _hdOlocalAttrTypes = rule528 _lhsIlocalAttrTypes+ _hdOoptions = rule529 _lhsIoptions+ _hdOsynmap = rule530 _lhsIsynmap+ _tlOallInhmap = rule531 _lhsIallInhmap+ _tlOallSynmap = rule532 _lhsIallSynmap+ _tlOanyLazyKind = rule533 _lhsIanyLazyKind+ _tlOinhmap = rule534 _lhsIinhmap+ _tlOlocalAttrTypes = rule535 _lhsIlocalAttrTypes+ _tlOoptions = rule536 _lhsIoptions+ _tlOsynmap = rule537 _lhsIsynmap+ __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule518 #-}+ rule518 = \ ((_hdIattrTypes) :: PP_Doc) ((_tlIattrTypes) :: PP_Doc) ->+ _hdIattrTypes >-< _tlIattrTypes+ {-# INLINE rule519 #-}+ rule519 = \ ((_hdIattrs) :: Set String) ((_tlIattrs) :: Set String) ->+ _hdIattrs `Set.union` _tlIattrs+ {-# INLINE rule520 #-}+ rule520 = \ ((_hdIextraDefs) :: [(PP_Doc,PP_Doc)]) ((_tlIextraDefs) :: [(PP_Doc,PP_Doc)]) ->+ _hdIextraDefs ++ _tlIextraDefs+ {-# INLINE rule521 #-}+ rule521 = \ ((_hdIsem_lhs) :: PP_Doc ) ((_tlIsem_lhs) :: [PP_Doc]) ->+ _hdIsem_lhs : _tlIsem_lhs+ {-# INLINE rule522 #-}+ rule522 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule523 #-}+ rule523 = \ _copy ->+ _copy+ {-# INLINE rule524 #-}+ rule524 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule525 #-}+ rule525 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule526 #-}+ rule526 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule527 #-}+ rule527 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule528 #-}+ rule528 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule529 #-}+ rule529 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule530 #-}+ rule530 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule531 #-}+ rule531 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule532 #-}+ rule532 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule533 #-}+ rule533 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule534 #-}+ rule534 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule535 #-}+ rule535 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule536 #-}+ rule536 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule537 #-}+ rule537 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule538 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule539 ()+ _lhsOextraDefs :: [(PP_Doc,PP_Doc)]+ _lhsOextraDefs = rule540 ()+ _lhsOsem_lhs :: [PP_Doc]+ _lhsOsem_lhs = rule541 ()+ _copy = rule542 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule543 _copy+ __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOextraDefs _lhsOsem_lhs+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule538 #-}+ rule538 = \ (_ :: ()) ->+ empty+ {-# INLINE rule539 #-}+ rule539 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule540 #-}+ rule540 = \ (_ :: ()) ->+ []+ {-# INLINE rule541 #-}+ rule541 = \ (_ :: ()) ->+ []+ {-# INLINE rule542 #-}+ rule542 = \ (_ :: ()) ->+ []+ {-# INLINE rule543 #-}+ rule543 = \ _copy ->+ _copy++-- Visit -------------------------------------------------------+-- wrapper+data Inh_Visit = Inh_Visit { allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visit :: (Map NontermIdent Attributes), allInitStates_Inh_Visit :: (Map NontermIdent Int), allSynmap_Inh_Visit :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visit :: (Map Identifier Type), childintros_Inh_Visit :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visit :: (ConstructorIdent), inhmap_Inh_Visit :: (Attributes), mrules_Inh_Visit :: (Map Identifier (VisitKind -> Either Error PP_Doc)), nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), nt_Inh_Visit :: (NontermIdent), options_Inh_Visit :: (Options), params_Inh_Visit :: ([Identifier]), prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visit :: (Map Identifier (Set String)), ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visit :: (Attributes), terminaldefs_Inh_Visit :: (Set String) }+data Syn_Visit = Syn_Visit { allvisits_Syn_Visit :: ( VisitStateState ), childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), errors_Syn_Visit :: (Seq Error), fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visit :: (Set String), ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visit :: (Map Identifier Int), sem_visit_Syn_Visit :: ( (StateIdentifier,PP_Doc) ), t_visits_Syn_Visit :: (PP_Doc), visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_Visit #-}+wrap_Visit :: T_Visit -> Inh_Visit -> (Syn_Visit )+wrap_Visit (T_Visit act) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ (T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visit_s47 sem arg)+ return (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_Visit #-}+sem_Visit :: Visit -> T_Visit +sem_Visit ( Visit ident_ from_ to_ inh_ syn_ steps_ kind_ ) = sem_Visit_Visit ident_ from_ to_ inh_ syn_ ( sem_VisitSteps steps_ ) kind_++-- semantic domain+newtype T_Visit = T_Visit {+ attach_T_Visit :: Identity (T_Visit_s47 )+ }+newtype T_Visit_s47 = C_Visit_s47 {+ inv_Visit_s47 :: (T_Visit_v46 )+ }+data T_Visit_s48 = C_Visit_s48+type T_Visit_v46 = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )+data T_Visit_vIn46 = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)+data T_Visit_vOut46 = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,PP_Doc) ) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_Visit_Visit #-}+sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps -> (VisitKind) -> T_Visit +sem_Visit_Visit arg_ident_ arg_from_ arg_to_ arg_inh_ arg_syn_ arg_steps_ arg_kind_ = T_Visit (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_Visit_v46 + v46 = \ (T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfollow _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)+ _lhsOallvisits :: VisitStateState + _lhsOallvisits = rule544 arg_from_ arg_ident_ arg_to_+ _nameTIn_visit = rule545 _lhsInt arg_ident_+ _nameTOut_visit = rule546 _lhsInt arg_ident_+ _nameNextState = rule547 _lhsInt arg_to_+ _nameCaller_visit = rule548 _lhsInt arg_ident_+ _nextVisitInfo = rule549 _lhsInextVisits arg_to_+ _t_params = rule550 _lhsIparams+ _t_c_params = rule551 _lhsIparams+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule552 _contpart _inhpart _lhsInt _nameCaller_visit _nameTIn_visit _nameTOut_visit _synpart _t_c_params _t_params arg_ident_+ _contpart = rule553 _lhsInt _nameNextState _nextVisitInfo _t_params arg_ident_+ _inhpart = rule554 _lhsIinhmap _ppTypeList arg_inh_+ _synpart = rule555 _lhsIsynmap _ppTypeList arg_syn_+ _ppTypeList = rule556 _lhsInt arg_ident_+ _o_sigs = rule557 _lhsIoptions+ _lhsOsem_visit :: (StateIdentifier,PP_Doc) + _lhsOsem_visit = rule558 _lhsInt _lhsIoptions _nameTIn_visit _nameTOut_visit _o_sigs _stepsIsem_steps _t_params arg_from_ arg_ident_ arg_inh_+ _stepsOfollow = rule559 _nextStBuild _resultval+ _nextArgsMp = rule560 _lhsIallintramap arg_to_+ _nextArgs = rule561 _nextArgsMp+ _nextStExp = rule562 _lhsIoptions _nextArgs _nextArgsMp arg_to_+ _resultval = rule563 _lhsInt _lhsIoptions _nextStRefExp arg_ident_ arg_syn_+ (_nextStBuild,_nextStRefExp) = rule564 _lhsInt _nextStExp _nextVisitInfo arg_ident_+ _stepsOkind = rule565 arg_kind_+ _stepsOindex = rule566 ()+ _stepsOprevMaxSimRefs = rule567 ()+ _stepsOuseParallel = rule568 ()+ _prevVisitInfo = rule569 _lhsInextVisits arg_from_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule570 _invokecode arg_ident_+ _invokecode = rule571 _lhsInt _lhsIoptions _nameTOut_visit _nextVisitInfo _o_sigs _prevVisitInfo arg_from_ arg_ident_ arg_inh_ arg_kind_ arg_syn_ arg_to_+ _thisintra = rule572 _defsAsMap _nextintra _uses+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule573 _thisintra arg_from_+ _nextintra = rule574 _lhsIallintramap arg_to_+ _uses = rule575 _lhsIoptions _stepsIuses arg_syn_+ _inhVarNms = rule576 _lhsIoptions arg_inh_+ _defs = rule577 _inhVarNms _lhsIterminaldefs _stepsIdefs+ _defsAsMap = rule578 _defs+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule579 arg_ident_ arg_syn_+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule580 arg_ident_ arg_inh_+ _lazyIntrasInh = rule581 _inhVarNms _stepsIdefs arg_kind_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule582 _lazyIntrasInh _stepsIlazyIntras+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule583 arg_from_ arg_ident_ arg_to_+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule584 arg_ident_ arg_kind_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule585 _stepsIerrors+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule586 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule587 _stepsIruleUsage+ _stepsOallFromToStates = rule588 _lhsIallFromToStates+ _stepsOallInitStates = rule589 _lhsIallInitStates+ _stepsOallVisitKinds = rule590 _lhsIallVisitKinds+ _stepsOallchildvisit = rule591 _lhsIallchildvisit+ _stepsOavisitdefs = rule592 _lhsIavisitdefs+ _stepsOavisituses = rule593 _lhsIavisituses+ _stepsOchildTypes = rule594 _lhsIchildTypes+ _stepsOchildintros = rule595 _lhsIchildintros+ _stepsOmrules = rule596 _lhsImrules+ _stepsOoptions = rule597 _lhsIoptions+ _stepsOruledefs = rule598 _lhsIruledefs+ _stepsOruleuses = rule599 _lhsIruleuses+ __result_ = T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visit_s47 v46+ {-# INLINE rule544 #-}+ {-# LINE 436 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule544 = \ from_ ident_ to_ ->+ {-# LINE 436 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (ident_, from_, to_)+ {-# LINE 4507 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule545 #-}+ {-# LINE 539 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule545 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 539 "./src-ag/ExecutionPlan2Caml.ag" #-}+ conNmTVisitIn _lhsInt ident_+ {-# LINE 4513 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule546 #-}+ {-# LINE 540 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule546 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 540 "./src-ag/ExecutionPlan2Caml.ag" #-}+ conNmTVisitOut _lhsInt ident_+ {-# LINE 4519 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule547 #-}+ {-# LINE 541 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule547 = \ ((_lhsInt) :: NontermIdent) to_ ->+ {-# LINE 541 "./src-ag/ExecutionPlan2Caml.ag" #-}+ type_nt_sem _lhsInt to_+ {-# LINE 4525 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule548 #-}+ {-# LINE 542 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule548 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 542 "./src-ag/ExecutionPlan2Caml.ag" #-}+ type_caller_visit _lhsInt ident_+ {-# LINE 4531 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule549 #-}+ {-# LINE 544 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule549 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->+ {-# LINE 544 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault ManyVis to_ _lhsInextVisits+ {-# LINE 4537 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule550 #-}+ {-# LINE 546 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule550 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 546 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTypeParams _lhsIparams+ {-# LINE 4543 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule551 #-}+ {-# LINE 547 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule551 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 547 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppTypeParams (cont_tvar : map pp _lhsIparams)+ {-# LINE 4549 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule552 #-}+ {-# LINE 551 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule552 = \ _contpart _inhpart ((_lhsInt) :: NontermIdent) _nameCaller_visit _nameTIn_visit _nameTOut_visit _synpart _t_c_params _t_params ident_ ->+ {-# LINE 551 "./src-ag/ExecutionPlan2Caml.ag" #-}+ "and" >#< _t_c_params >#< _nameCaller_visit >#< "=" >#< ppRecordTp+ [ nm_inh _lhsInt ident_ >#< ":" >#< _t_params >#< conNmTVisitIn _lhsInt ident_+ , nm_cont _lhsInt ident_ >#< ":" >#< _t_params >#< conNmTVisitOut _lhsInt ident_ >#< "->" >#< cont_tvar+ ]+ >-< "and" >#< _t_params >#< _nameTIn_visit >#< "=" >#< ppRecordTp _inhpart+ >-< "and" >#< _t_params >#< _nameTOut_visit >#< "=" >#< ppRecordTp (_synpart ++ _contpart )+ {-# LINE 4560 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule553 #-}+ {-# LINE 558 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule553 = \ ((_lhsInt) :: NontermIdent) _nameNextState _nextVisitInfo _t_params ident_ ->+ {-# LINE 558 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case _nextVisitInfo of+ NoneVis -> []+ _ -> [ nm_outarg_cont _lhsInt ident_ >#< ":" >#< _t_params >#< _nameNextState ]+ {-# LINE 4568 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule554 #-}+ {-# LINE 562 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule554 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->+ {-# LINE 562 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _ppTypeList nm_inarg inh_ _lhsIinhmap+ {-# LINE 4574 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule555 #-}+ {-# LINE 563 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule555 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->+ {-# LINE 563 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _ppTypeList nm_outarg syn_ _lhsIsynmap+ {-# LINE 4580 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule556 #-}+ {-# LINE 564 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule556 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 564 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \f s m -> map (\i -> case Map.lookup i m of+ Just tp -> f i _lhsInt ident_ >#< ":" >#< ppTp tp ) $ Set.toList s+ {-# LINE 4587 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule557 #-}+ {-# LINE 798 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule557 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 798 "./src-ag/ExecutionPlan2Caml.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 4593 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule558 #-}+ {-# LINE 799 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule558 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _o_sigs ((_stepsIsem_steps) :: PP_Doc) _t_params from_ ident_ inh_ ->+ {-# LINE 799 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ( from_+ , let resTp = _t_params >#< _nameTOut_visit+ argTp = _t_params >#< _nameTIn_visit+ argMatch = ppRecordVal [ nm_inarg i _lhsInt ident_ >#< "=" >#< lhsname _lhsIoptions True i | i <- Set.toList inh_ ]+ in ppFunDecl _o_sigs (nm_visit ident_) [(argMatch, argTp)] resTp _stepsIsem_steps+ )+ {-# LINE 4604 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule559 #-}+ {-# LINE 806 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule559 = \ _nextStBuild _resultval ->+ {-# LINE 806 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _nextStBuild >-< _resultval+ {-# LINE 4610 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule560 #-}+ {-# LINE 808 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule560 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->+ {-# LINE 808 "./src-ag/ExecutionPlan2Caml.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 4616 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule561 #-}+ {-# LINE 809 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule561 = \ _nextArgsMp ->+ {-# LINE 809 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppSpaced $ Map.keys $ _nextArgsMp+ {-# LINE 4622 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule562 #-}+ {-# LINE 810 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule562 = \ ((_lhsIoptions) :: Options) _nextArgs _nextArgsMp to_ ->+ {-# LINE 810 "./src-ag/ExecutionPlan2Caml.ag" #-}+ nm_st to_ >#< _nextArgs >#< dummyArg _lhsIoptions (Map.null _nextArgsMp )+ {-# LINE 4628 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule563 #-}+ {-# LINE 812 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule563 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nextStRefExp ident_ syn_ ->+ {-# LINE 812 "./src-ag/ExecutionPlan2Caml.ag" #-}+ ppRecordVal+ ( [ nm_outarg i _lhsInt ident_ >#< "=" >#< lhsname _lhsIoptions False i | i <- Set.toList syn_ ]+ ++ [ _nextStRefExp ])+ {-# LINE 4636 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule564 #-}+ {-# LINE 817 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule564 = \ ((_lhsInt) :: NontermIdent) _nextStExp _nextVisitInfo ident_ ->+ {-# LINE 817 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case _nextVisitInfo of+ NoneVis -> (empty, empty)+ _ -> ( "let" >#< nextStName >#< "=" >#< _nextStExp >#< "in"+ , nm_outarg_cont _lhsInt ident_ >#< "=" >#< nextStName)+ {-# LINE 4645 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule565 #-}+ {-# LINE 832 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule565 = \ kind_ ->+ {-# LINE 832 "./src-ag/ExecutionPlan2Caml.ag" #-}+ kind_+ {-# LINE 4651 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule566 #-}+ {-# LINE 884 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule566 = \ (_ :: ()) ->+ {-# LINE 884 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 0+ {-# LINE 4657 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule567 #-}+ {-# LINE 891 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule567 = \ (_ :: ()) ->+ {-# LINE 891 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 0+ {-# LINE 4663 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule568 #-}+ {-# LINE 908 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule568 = \ (_ :: ()) ->+ {-# LINE 908 "./src-ag/ExecutionPlan2Caml.ag" #-}+ False+ {-# LINE 4669 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule569 #-}+ {-# LINE 1165 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule569 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->+ {-# LINE 1165 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault ManyVis from_ _lhsInextVisits+ {-# LINE 4675 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule570 #-}+ {-# LINE 1166 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule570 = \ _invokecode ident_ ->+ {-# LINE 1166 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton ident_ _invokecode+ {-# LINE 4681 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule571 #-}+ {-# LINE 1168 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule571 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTOut_visit _nextVisitInfo _o_sigs _prevVisitInfo from_ ident_ inh_ kind_ syn_ to_ ->+ {-# LINE 1168 "./src-ag/ExecutionPlan2Caml.ag" #-}+ \chld childTp kind follow ->+ let code = cont >-< inps >-< call+ childNmTo = text $ stname chld to_+ childNmFrom = text $ stname chld from_+ childTpArgs = case childTp of+ NT _ args _ -> args+ _ -> error "generate visit call: type of the child is not a nonterminal!"+ cont = "let" >#< contNm >#< ppArg _o_sigs (ppRecordVal cont_in) cont_in_tp >#< "="+ >-< indent 2 follow+ >#< "in"+ cont_in = [ nm_outarg i _lhsInt ident_ >#< "=" >#< attrname _lhsIoptions True chld i | i <- Set.toList syn_ ]+ ++ case _nextVisitInfo of+ NoneVis -> []+ _ -> [ nm_outarg_cont _lhsInt ident_ >#< "=" >#< childNmTo ]+ cont_in_tp = ppTypeParams childTpArgs >#< _nameTOut_visit+ inps = "let" >#< inpsNm >#< "=" >#< ppRecordVal+ [ nm_inh _lhsInt ident_ >#< "=" >#< ppRecordVal inps_in+ , nm_cont _lhsInt ident_ >#< "=" >#< contNm+ ] >#< "in"+ inps_in = [ nm_inarg i _lhsInt ident_ >#< "=" >#< attrname _lhsIoptions False chld i | i <- Set.toList inh_ ]+ call = childNmFrom >|< "." >|< nm_invoke _lhsInt from_ >#< arg+ arg = case _prevVisitInfo of+ NoneVis -> error "error: invocation of a visit from a state that has no next visits"+ OneVis _ -> pp inpsNm+ ManyVis -> pp_parens (con_visit _lhsInt ident_ >#< inpsNm)+ in if kind `compatibleKind` kind_+ then Right code+ else Left $ IncompatibleVisitKind chld ident_ kind kind_+ {-# LINE 4714 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule572 #-}+ {-# LINE 1273 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule572 = \ _defsAsMap _nextintra _uses ->+ {-# LINE 1273 "./src-ag/ExecutionPlan2Caml.ag" #-}+ (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap+ {-# LINE 4720 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule573 #-}+ {-# LINE 1274 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule573 = \ _thisintra from_ ->+ {-# LINE 1274 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton from_ _thisintra+ {-# LINE 4726 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule574 #-}+ {-# LINE 1275 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule574 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->+ {-# LINE 1275 "./src-ag/ExecutionPlan2Caml.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 4732 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule575 #-}+ {-# LINE 1276 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule575 = \ ((_lhsIoptions) :: Options) ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->+ {-# LINE 1276 "./src-ag/ExecutionPlan2Caml.ag" #-}+ let mp1 = _stepsIuses+ mp2 = Map.fromList [ (lhsname _lhsIoptions False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]+ in mp1 `Map.union` mp2+ {-# LINE 4740 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule576 #-}+ {-# LINE 1279 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule576 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 1279 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Set.map (lhsname _lhsIoptions True) inh_+ {-# LINE 4746 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule577 #-}+ {-# LINE 1280 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule577 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->+ {-# LINE 1280 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs+ {-# LINE 4752 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule578 #-}+ {-# LINE 1281 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule578 = \ _defs ->+ {-# LINE 1281 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]+ {-# LINE 4758 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule579 #-}+ {-# LINE 1305 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule579 = \ ident_ syn_ ->+ {-# LINE 1305 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton ident_ syn_+ {-# LINE 4764 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule580 #-}+ {-# LINE 1306 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule580 = \ ident_ inh_ ->+ {-# LINE 1306 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton ident_ inh_+ {-# LINE 4770 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule581 #-}+ {-# LINE 1338 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule581 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->+ {-# LINE 1338 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case kind_ of+ VisitPure False -> _inhVarNms `Set.union` _stepsIdefs+ _ -> Set.empty+ {-# LINE 4778 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule582 #-}+ {-# LINE 1341 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule582 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->+ {-# LINE 1341 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _lazyIntrasInh `Set.union` _stepsIlazyIntras+ {-# LINE 4784 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule583 #-}+ {-# LINE 1404 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule583 = \ from_ ident_ to_ ->+ {-# LINE 1404 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton ident_ (from_, to_)+ {-# LINE 4790 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule584 #-}+ {-# LINE 1448 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule584 = \ ident_ kind_ ->+ {-# LINE 1448 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton ident_ kind_+ {-# LINE 4796 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule585 #-}+ rule585 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule586 #-}+ rule586 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule587 #-}+ rule587 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule588 #-}+ rule588 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule589 #-}+ rule589 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule590 #-}+ rule590 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule591 #-}+ rule591 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule592 #-}+ rule592 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule593 #-}+ rule593 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule594 #-}+ rule594 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule595 #-}+ rule595 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule596 #-}+ rule596 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule597 #-}+ rule597 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule598 #-}+ rule598 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule599 #-}+ rule599 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses++-- VisitStep ---------------------------------------------------+-- wrapper+data Inh_VisitStep = Inh_VisitStep { allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitStep :: (Map NontermIdent Int), allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitStep :: (Map Identifier Type), childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), follow_Inh_VisitStep :: (PP_Doc), index_Inh_VisitStep :: (Int), isLast_Inh_VisitStep :: (Bool), kind_Inh_VisitStep :: (VisitKind), mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> Either Error PP_Doc)), options_Inh_VisitStep :: (Options), prevMaxSimRefs_Inh_VisitStep :: (Int), ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitStep :: (Bool) }+data Syn_VisitStep = Syn_VisitStep { defs_Syn_VisitStep :: (Set String), errors_Syn_VisitStep :: (Seq Error), index_Syn_VisitStep :: (Int), isLast_Syn_VisitStep :: (Bool), lazyIntras_Syn_VisitStep :: (Set String), prevMaxSimRefs_Syn_VisitStep :: (Int), ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitStep :: (Map Identifier Int), sem_steps_Syn_VisitStep :: (PP_Doc), uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }+{-# INLINABLE wrap_VisitStep #-}+wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> (Syn_VisitStep )+wrap_VisitStep (T_VisitStep act) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel+ (T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds) <- return (inv_VisitStep_s50 sem arg)+ return (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds)+ )++-- cata+{-# NOINLINE sem_VisitStep #-}+sem_VisitStep :: VisitStep -> T_VisitStep +sem_VisitStep ( Sem name_ ) = sem_VisitStep_Sem name_+sem_VisitStep ( ChildVisit child_ nonterm_ visit_ ) = sem_VisitStep_ChildVisit child_ nonterm_ visit_+sem_VisitStep ( PureGroup steps_ ordered_ ) = sem_VisitStep_PureGroup ( sem_VisitSteps steps_ ) ordered_+sem_VisitStep ( Sim steps_ ) = sem_VisitStep_Sim ( sem_VisitSteps steps_ )+sem_VisitStep ( ChildIntro child_ ) = sem_VisitStep_ChildIntro child_++-- semantic domain+newtype T_VisitStep = T_VisitStep {+ attach_T_VisitStep :: Identity (T_VisitStep_s50 )+ }+newtype T_VisitStep_s50 = C_VisitStep_s50 {+ inv_VisitStep_s50 :: (T_VisitStep_v49 )+ }+data T_VisitStep_s51 = C_VisitStep_s51+type T_VisitStep_v49 = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )+data T_VisitStep_vIn49 = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)+data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)+{-# NOINLINE sem_VisitStep_Sem #-}+sem_VisitStep_Sem :: (Identifier) -> T_VisitStep +sem_VisitStep_Sem arg_name_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _ruleItf = rule600 _lhsImrules arg_name_+ _lhsOerrors :: Seq Error+ (_lhsOerrors,_sem_steps) = rule601 _lhsIkind _ruleItf+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule602 _lhsIfollow _sem_steps+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule603 arg_name_+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule604 _lhsIkind arg_name_+ _lhsOdefs :: Set String+ _lhsOdefs = rule605 _lhsIruledefs arg_name_+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule606 _lhsIruleuses arg_name_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule607 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule608 ()+ _lhsOindex :: Int+ _lhsOindex = rule609 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule610 _lhsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule611 _lhsIprevMaxSimRefs+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule600 #-}+ {-# LINE 849 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule600 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) name_ ->+ {-# LINE 849 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules+ {-# LINE 4915 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule601 #-}+ {-# LINE 850 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule601 = \ ((_lhsIkind) :: VisitKind) _ruleItf ->+ {-# LINE 850 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case _ruleItf _lhsIkind of+ Left e -> (Seq.singleton e, empty)+ Right stmt -> (Seq.empty, stmt)+ {-# LINE 4923 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule602 #-}+ {-# LINE 853 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule602 = \ ((_lhsIfollow) :: PP_Doc) _sem_steps ->+ {-# LINE 853 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _sem_steps >-< _lhsIfollow+ {-# LINE 4929 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule603 #-}+ {-# LINE 1226 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule603 = \ name_ ->+ {-# LINE 1226 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ 1+ {-# LINE 4935 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule604 #-}+ {-# LINE 1236 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule604 = \ ((_lhsIkind) :: VisitKind) name_ ->+ {-# LINE 1236 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.singleton name_ (Set.singleton _lhsIkind)+ {-# LINE 4941 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule605 #-}+ {-# LINE 1321 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule605 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->+ {-# LINE 1321 "./src-ag/ExecutionPlan2Caml.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs+ {-# LINE 4947 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule606 #-}+ {-# LINE 1322 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule606 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->+ {-# LINE 1322 "./src-ag/ExecutionPlan2Caml.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses+ {-# LINE 4953 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule607 #-}+ rule607 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule608 #-}+ rule608 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule609 #-}+ rule609 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule610 #-}+ rule610 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+ {-# INLINE rule611 #-}+ rule611 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+{-# NOINLINE sem_VisitStep_ChildVisit #-}+sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep +sem_VisitStep_ChildVisit arg_child_ _ arg_visit_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _visitItf = rule612 _lhsIallchildvisit arg_visit_+ _childType = rule613 _lhsIchildTypes arg_child_+ _lhsOerrors :: Seq Error+ _lhsOsem_steps :: PP_Doc+ (_lhsOerrors,_lhsOsem_steps) = rule614 _childType _lhsIfollow _lhsIkind _visitItf arg_child_+ _lhsOdefs :: Set String+ _lhsOdefs = rule615 _lhsIavisitdefs _lhsIoptions _to arg_child_ arg_visit_+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule616 _from _lhsIavisituses _lhsIoptions arg_child_ arg_visit_+ (_from,_to) = rule617 _lhsIallFromToStates arg_visit_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule618 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule619 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule620 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule621 ()+ _lhsOindex :: Int+ _lhsOindex = rule622 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule623 _lhsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule624 _lhsIprevMaxSimRefs+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule612 #-}+ {-# LINE 860 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule612 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) visit_ ->+ {-# LINE 860 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit+ {-# LINE 5008 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule613 #-}+ {-# LINE 861 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule613 = \ ((_lhsIchildTypes) :: Map Identifier Type) child_ ->+ {-# LINE 861 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault (error ("type of child " ++ show child_ ++ " is not in the childTypes map! " ++ show _lhsIchildTypes)) child_ _lhsIchildTypes+ {-# LINE 5014 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule614 #-}+ {-# LINE 862 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule614 = \ _childType ((_lhsIfollow) :: PP_Doc) ((_lhsIkind) :: VisitKind) _visitItf child_ ->+ {-# LINE 862 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case _visitItf child_ _childType _lhsIkind _lhsIfollow of+ Left e -> (Seq.singleton e, empty)+ Right steps -> (Seq.empty, steps)+ {-# LINE 5022 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule615 #-}+ {-# LINE 1323 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule615 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) _to child_ visit_ ->+ {-# LINE 1323 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname _lhsIoptions True child_) $ Map.lookup visit_ _lhsIavisitdefs+ {-# LINE 5028 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule616 #-}+ {-# LINE 1324 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule616 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) child_ visit_ ->+ {-# LINE 1324 "./src-ag/ExecutionPlan2Caml.ag" #-}+ let convert attrs = Map.fromList [ (attrname _lhsIoptions False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]+ in Map.insert (stname child_ _from) Nothing $ convert $+ maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses+ {-# LINE 5036 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule617 #-}+ {-# LINE 1410 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule617 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->+ {-# LINE 1410 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates+ {-# LINE 5042 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule618 #-}+ rule618 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule619 #-}+ rule619 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule620 #-}+ rule620 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule621 #-}+ rule621 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule622 #-}+ rule622 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule623 #-}+ rule623 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+ {-# INLINE rule624 #-}+ rule624 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+{-# NOINLINE sem_VisitStep_PureGroup #-}+sem_VisitStep_PureGroup :: T_VisitSteps -> (Bool) -> T_VisitStep +sem_VisitStep_PureGroup arg_steps_ arg_ordered_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfollow _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)+ _stepsOkind = rule625 arg_ordered_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule626 _stepsIdefs _stepsIlazyIntras arg_ordered_+ _lhsOdefs :: Set String+ _lhsOdefs = rule627 _stepsIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule628 _stepsIerrors+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule629 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule630 _stepsIruleUsage+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule631 _stepsIsem_steps+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule632 _stepsIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule633 _stepsIvisitKinds+ _lhsOindex :: Int+ _lhsOindex = rule634 _stepsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule635 _stepsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule636 _stepsIprevMaxSimRefs+ _stepsOallFromToStates = rule637 _lhsIallFromToStates+ _stepsOallInitStates = rule638 _lhsIallInitStates+ _stepsOallVisitKinds = rule639 _lhsIallVisitKinds+ _stepsOallchildvisit = rule640 _lhsIallchildvisit+ _stepsOavisitdefs = rule641 _lhsIavisitdefs+ _stepsOavisituses = rule642 _lhsIavisituses+ _stepsOchildTypes = rule643 _lhsIchildTypes+ _stepsOchildintros = rule644 _lhsIchildintros+ _stepsOfollow = rule645 _lhsIfollow+ _stepsOindex = rule646 _lhsIindex+ _stepsOmrules = rule647 _lhsImrules+ _stepsOoptions = rule648 _lhsIoptions+ _stepsOprevMaxSimRefs = rule649 _lhsIprevMaxSimRefs+ _stepsOruledefs = rule650 _lhsIruledefs+ _stepsOruleuses = rule651 _lhsIruleuses+ _stepsOuseParallel = rule652 _lhsIuseParallel+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule625 #-}+ {-# LINE 836 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule625 = \ ordered_ ->+ {-# LINE 836 "./src-ag/ExecutionPlan2Caml.ag" #-}+ VisitPure ordered_+ {-# LINE 5120 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule626 #-}+ {-# LINE 1344 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule626 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->+ {-# LINE 1344 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if ordered_+ then _stepsIlazyIntras+ else _stepsIdefs+ {-# LINE 5128 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule627 #-}+ rule627 = \ ((_stepsIdefs) :: Set String) ->+ _stepsIdefs+ {-# INLINE rule628 #-}+ rule628 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule629 #-}+ rule629 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule630 #-}+ rule630 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule631 #-}+ rule631 = \ ((_stepsIsem_steps) :: PP_Doc) ->+ _stepsIsem_steps+ {-# INLINE rule632 #-}+ rule632 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->+ _stepsIuses+ {-# INLINE rule633 #-}+ rule633 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _stepsIvisitKinds+ {-# INLINE rule634 #-}+ rule634 = \ ((_stepsIindex) :: Int) ->+ _stepsIindex+ {-# INLINE rule635 #-}+ rule635 = \ ((_stepsIisLast) :: Bool) ->+ _stepsIisLast+ {-# INLINE rule636 #-}+ rule636 = \ ((_stepsIprevMaxSimRefs) :: Int) ->+ _stepsIprevMaxSimRefs+ {-# INLINE rule637 #-}+ rule637 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule638 #-}+ rule638 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule639 #-}+ rule639 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule640 #-}+ rule640 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule641 #-}+ rule641 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule642 #-}+ rule642 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule643 #-}+ rule643 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule644 #-}+ rule644 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule645 #-}+ rule645 = \ ((_lhsIfollow) :: PP_Doc) ->+ _lhsIfollow+ {-# INLINE rule646 #-}+ rule646 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule647 #-}+ rule647 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule648 #-}+ rule648 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule649 #-}+ rule649 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+ {-# INLINE rule650 #-}+ rule650 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule651 #-}+ rule651 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule652 #-}+ rule652 = \ ((_lhsIuseParallel) :: Bool) ->+ _lhsIuseParallel+{-# NOINLINE sem_VisitStep_Sim #-}+sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep +sem_VisitStep_Sim arg_steps_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfollow _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)+ _stepsOindex = rule653 ()+ _lhsOindex :: Int+ _lhsOindex = rule654 _lhsIindex+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule655 _lhsIprevMaxSimRefs _stepsIindex _useParallel+ _useParallel = rule656 _lhsIoptions _stepsIsize+ _lhsOdefs :: Set String+ _lhsOdefs = rule657 _stepsIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule658 _stepsIerrors+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule659 _stepsIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule660 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule661 _stepsIruleUsage+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule662 _stepsIsem_steps+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule663 _stepsIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule664 _stepsIvisitKinds+ _lhsOisLast :: Bool+ _lhsOisLast = rule665 _stepsIisLast+ _stepsOallFromToStates = rule666 _lhsIallFromToStates+ _stepsOallInitStates = rule667 _lhsIallInitStates+ _stepsOallVisitKinds = rule668 _lhsIallVisitKinds+ _stepsOallchildvisit = rule669 _lhsIallchildvisit+ _stepsOavisitdefs = rule670 _lhsIavisitdefs+ _stepsOavisituses = rule671 _lhsIavisituses+ _stepsOchildTypes = rule672 _lhsIchildTypes+ _stepsOchildintros = rule673 _lhsIchildintros+ _stepsOfollow = rule674 _lhsIfollow+ _stepsOkind = rule675 _lhsIkind+ _stepsOmrules = rule676 _lhsImrules+ _stepsOoptions = rule677 _lhsIoptions+ _stepsOprevMaxSimRefs = rule678 _lhsIprevMaxSimRefs+ _stepsOruledefs = rule679 _lhsIruledefs+ _stepsOruleuses = rule680 _lhsIruleuses+ _stepsOuseParallel = rule681 _useParallel+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule653 #-}+ {-# LINE 885 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule653 = \ (_ :: ()) ->+ {-# LINE 885 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 0+ {-# LINE 5264 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule654 #-}+ {-# LINE 886 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule654 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 886 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _lhsIindex+ {-# LINE 5270 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule655 #-}+ {-# LINE 893 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule655 = \ ((_lhsIprevMaxSimRefs) :: Int) ((_stepsIindex) :: Int) _useParallel ->+ {-# LINE 893 "./src-ag/ExecutionPlan2Caml.ag" #-}+ if _useParallel+ then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)+ else _lhsIprevMaxSimRefs+ {-# LINE 5278 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule656 #-}+ {-# LINE 909 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule656 = \ ((_lhsIoptions) :: Options) ((_stepsIsize) :: Int) ->+ {-# LINE 909 "./src-ag/ExecutionPlan2Caml.ag" #-}+ parallelInvoke _lhsIoptions && _stepsIsize > 1+ {-# LINE 5284 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule657 #-}+ rule657 = \ ((_stepsIdefs) :: Set String) ->+ _stepsIdefs+ {-# INLINE rule658 #-}+ rule658 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule659 #-}+ rule659 = \ ((_stepsIlazyIntras) :: Set String) ->+ _stepsIlazyIntras+ {-# INLINE rule660 #-}+ rule660 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule661 #-}+ rule661 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule662 #-}+ rule662 = \ ((_stepsIsem_steps) :: PP_Doc) ->+ _stepsIsem_steps+ {-# INLINE rule663 #-}+ rule663 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->+ _stepsIuses+ {-# INLINE rule664 #-}+ rule664 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _stepsIvisitKinds+ {-# INLINE rule665 #-}+ rule665 = \ ((_stepsIisLast) :: Bool) ->+ _stepsIisLast+ {-# INLINE rule666 #-}+ rule666 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule667 #-}+ rule667 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule668 #-}+ rule668 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule669 #-}+ rule669 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule670 #-}+ rule670 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule671 #-}+ rule671 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule672 #-}+ rule672 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule673 #-}+ rule673 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule674 #-}+ rule674 = \ ((_lhsIfollow) :: PP_Doc) ->+ _lhsIfollow+ {-# INLINE rule675 #-}+ rule675 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule676 #-}+ rule676 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule677 #-}+ rule677 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule678 #-}+ rule678 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+ {-# INLINE rule679 #-}+ rule679 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule680 #-}+ rule680 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule681 #-}+ rule681 = \ _useParallel ->+ _useParallel+{-# NOINLINE sem_VisitStep_ChildIntro #-}+sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep +sem_VisitStep_ChildIntro arg_child_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _attachItf = rule682 _lhsIchildintros arg_child_+ _lhsOerrors :: Seq Error+ _lhsOdefs :: Set String+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ (_lhsOerrors,_sem_steps,_lhsOdefs,_lhsOuses) = rule683 _attachItf _lhsIkind+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule684 _lhsIfollow _sem_steps+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule685 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule686 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule687 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule688 ()+ _lhsOindex :: Int+ _lhsOindex = rule689 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule690 _lhsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule691 _lhsIprevMaxSimRefs+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule682 #-}+ {-# LINE 854 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule682 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->+ {-# LINE 854 "./src-ag/ExecutionPlan2Caml.ag" #-}+ Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros+ {-# LINE 5396 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule683 #-}+ {-# LINE 856 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule683 = \ _attachItf ((_lhsIkind) :: VisitKind) ->+ {-# LINE 856 "./src-ag/ExecutionPlan2Caml.ag" #-}+ case _attachItf _lhsIkind of+ Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)+ Right (code, defs, uses) -> (Seq.empty, code, defs, uses)+ {-# LINE 5404 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule684 #-}+ {-# LINE 859 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule684 = \ ((_lhsIfollow) :: PP_Doc) _sem_steps ->+ {-# LINE 859 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _sem_steps >-< _lhsIfollow+ {-# LINE 5410 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule685 #-}+ rule685 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule686 #-}+ rule686 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule687 #-}+ rule687 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule688 #-}+ rule688 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule689 #-}+ rule689 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule690 #-}+ rule690 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+ {-# INLINE rule691 #-}+ rule691 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs++-- VisitSteps --------------------------------------------------+-- wrapper+data Inh_VisitSteps = Inh_VisitSteps { allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitSteps :: (Map Identifier Type), childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), follow_Inh_VisitSteps :: (PP_Doc), index_Inh_VisitSteps :: (Int), kind_Inh_VisitSteps :: (VisitKind), mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> Either Error PP_Doc)), options_Inh_VisitSteps :: (Options), prevMaxSimRefs_Inh_VisitSteps :: (Int), ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitSteps :: (Bool) }+data Syn_VisitSteps = Syn_VisitSteps { defs_Syn_VisitSteps :: (Set String), errors_Syn_VisitSteps :: (Seq Error), index_Syn_VisitSteps :: (Int), isLast_Syn_VisitSteps :: (Bool), lazyIntras_Syn_VisitSteps :: (Set String), prevMaxSimRefs_Syn_VisitSteps :: (Int), ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitSteps :: (Map Identifier Int), sem_steps_Syn_VisitSteps :: (PP_Doc), size_Syn_VisitSteps :: (Int), uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }+{-# INLINABLE wrap_VisitSteps #-}+wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> (Syn_VisitSteps )+wrap_VisitSteps (T_VisitSteps act) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel+ (T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds) <- return (inv_VisitSteps_s53 sem arg)+ return (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds)+ )++-- cata+{-# NOINLINE sem_VisitSteps #-}+sem_VisitSteps :: VisitSteps -> T_VisitSteps +sem_VisitSteps list = Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list)++-- semantic domain+newtype T_VisitSteps = T_VisitSteps {+ attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )+ }+newtype T_VisitSteps_s53 = C_VisitSteps_s53 {+ inv_VisitSteps_s53 :: (T_VisitSteps_v52 )+ }+data T_VisitSteps_s54 = C_VisitSteps_s54+type T_VisitSteps_v52 = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )+data T_VisitSteps_vIn52 = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Int) (VisitKind) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)+data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)+{-# NOINLINE sem_VisitSteps_Cons #-}+sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps +sem_VisitSteps_Cons arg_hd_ arg_tl_ = T_VisitSteps (return st53) where+ {-# NOINLINE st53 #-}+ st53 = let+ v52 :: T_VisitSteps_v52 + v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _hdX50 = Control.Monad.Identity.runIdentity (attach_T_VisitStep (arg_hd_))+ _tlX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_tl_))+ (T_VisitStep_vOut49 _hdIdefs _hdIerrors _hdIindex _hdIisLast _hdIlazyIntras _hdIprevMaxSimRefs _hdIruleKinds _hdIruleUsage _hdIsem_steps _hdIuses _hdIvisitKinds) = inv_VisitStep_s50 _hdX50 (T_VisitStep_vIn49 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfollow _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOprevMaxSimRefs _hdOruledefs _hdOruleuses _hdOuseParallel)+ (T_VisitSteps_vOut52 _tlIdefs _tlIerrors _tlIindex _tlIisLast _tlIlazyIntras _tlIprevMaxSimRefs _tlIruleKinds _tlIruleUsage _tlIsem_steps _tlIsize _tlIuses _tlIvisitKinds) = inv_VisitSteps_s53 _tlX53 (T_VisitSteps_vIn52 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfollow _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOprevMaxSimRefs _tlOruledefs _tlOruleuses _tlOuseParallel)+ _hdOfollow = rule692 _tlIsem_steps+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule693 _hdIsem_steps+ _lhsOsize :: Int+ _lhsOsize = rule694 _tlIsize+ _hdOindex = rule695 _lhsIindex+ _tlOindex = rule696 _lhsIindex+ _lhsOindex :: Int+ _lhsOindex = rule697 _tlIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule698 ()+ _hdOisLast = rule699 _tlIisLast+ _lhsOdefs :: Set String+ _lhsOdefs = rule700 _hdIdefs _tlIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule701 _hdIerrors _tlIerrors+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule702 _hdIlazyIntras _tlIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule703 _hdIruleKinds _tlIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule704 _hdIruleUsage _tlIruleUsage+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule705 _hdIuses _tlIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule706 _hdIvisitKinds _tlIvisitKinds+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule707 _tlIprevMaxSimRefs+ _hdOallFromToStates = rule708 _lhsIallFromToStates+ _hdOallInitStates = rule709 _lhsIallInitStates+ _hdOallVisitKinds = rule710 _lhsIallVisitKinds+ _hdOallchildvisit = rule711 _lhsIallchildvisit+ _hdOavisitdefs = rule712 _lhsIavisitdefs+ _hdOavisituses = rule713 _lhsIavisituses+ _hdOchildTypes = rule714 _lhsIchildTypes+ _hdOchildintros = rule715 _lhsIchildintros+ _hdOkind = rule716 _lhsIkind+ _hdOmrules = rule717 _lhsImrules+ _hdOoptions = rule718 _lhsIoptions+ _hdOprevMaxSimRefs = rule719 _lhsIprevMaxSimRefs+ _hdOruledefs = rule720 _lhsIruledefs+ _hdOruleuses = rule721 _lhsIruleuses+ _hdOuseParallel = rule722 _lhsIuseParallel+ _tlOallFromToStates = rule723 _lhsIallFromToStates+ _tlOallInitStates = rule724 _lhsIallInitStates+ _tlOallVisitKinds = rule725 _lhsIallVisitKinds+ _tlOallchildvisit = rule726 _lhsIallchildvisit+ _tlOavisitdefs = rule727 _lhsIavisitdefs+ _tlOavisituses = rule728 _lhsIavisituses+ _tlOchildTypes = rule729 _lhsIchildTypes+ _tlOchildintros = rule730 _lhsIchildintros+ _tlOfollow = rule731 _lhsIfollow+ _tlOkind = rule732 _lhsIkind+ _tlOmrules = rule733 _lhsImrules+ _tlOoptions = rule734 _lhsIoptions+ _tlOprevMaxSimRefs = rule735 _hdIprevMaxSimRefs+ _tlOruledefs = rule736 _lhsIruledefs+ _tlOruleuses = rule737 _lhsIruleuses+ _tlOuseParallel = rule738 _lhsIuseParallel+ __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitSteps_s53 v52+ {-# INLINE rule692 #-}+ {-# LINE 844 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule692 = \ ((_tlIsem_steps) :: PP_Doc) ->+ {-# LINE 844 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _tlIsem_steps+ {-# LINE 5541 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule693 #-}+ {-# LINE 845 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule693 = \ ((_hdIsem_steps) :: PP_Doc) ->+ {-# LINE 845 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _hdIsem_steps+ {-# LINE 5547 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule694 #-}+ {-# LINE 876 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule694 = \ ((_tlIsize) :: Int) ->+ {-# LINE 876 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 1 + _tlIsize+ {-# LINE 5553 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule695 #-}+ {-# LINE 881 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule695 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 881 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _lhsIindex+ {-# LINE 5559 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule696 #-}+ {-# LINE 882 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule696 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 882 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 1 + _lhsIindex+ {-# LINE 5565 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule697 #-}+ {-# LINE 883 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule697 = \ ((_tlIindex) :: Int) ->+ {-# LINE 883 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _tlIindex+ {-# LINE 5571 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule698 #-}+ {-# LINE 902 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule698 = \ (_ :: ()) ->+ {-# LINE 902 "./src-ag/ExecutionPlan2Caml.ag" #-}+ False+ {-# LINE 5577 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule699 #-}+ {-# LINE 903 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule699 = \ ((_tlIisLast) :: Bool) ->+ {-# LINE 903 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _tlIisLast+ {-# LINE 5583 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule700 #-}+ rule700 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->+ _hdIdefs `Set.union` _tlIdefs+ {-# INLINE rule701 #-}+ rule701 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule702 #-}+ rule702 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# INLINE rule703 #-}+ rule703 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# INLINE rule704 #-}+ rule704 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# INLINE rule705 #-}+ rule705 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->+ _hdIuses `Map.union` _tlIuses+ {-# INLINE rule706 #-}+ rule706 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule707 #-}+ rule707 = \ ((_tlIprevMaxSimRefs) :: Int) ->+ _tlIprevMaxSimRefs+ {-# INLINE rule708 #-}+ rule708 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule709 #-}+ rule709 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule710 #-}+ rule710 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule711 #-}+ rule711 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule712 #-}+ rule712 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule713 #-}+ rule713 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule714 #-}+ rule714 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule715 #-}+ rule715 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule716 #-}+ rule716 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule717 #-}+ rule717 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule718 #-}+ rule718 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule719 #-}+ rule719 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+ {-# INLINE rule720 #-}+ rule720 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule721 #-}+ rule721 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule722 #-}+ rule722 = \ ((_lhsIuseParallel) :: Bool) ->+ _lhsIuseParallel+ {-# INLINE rule723 #-}+ rule723 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule724 #-}+ rule724 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule725 #-}+ rule725 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule726 #-}+ rule726 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule727 #-}+ rule727 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule728 #-}+ rule728 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule729 #-}+ rule729 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule730 #-}+ rule730 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule731 #-}+ rule731 = \ ((_lhsIfollow) :: PP_Doc) ->+ _lhsIfollow+ {-# INLINE rule732 #-}+ rule732 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule733 #-}+ rule733 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule734 #-}+ rule734 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule735 #-}+ rule735 = \ ((_hdIprevMaxSimRefs) :: Int) ->+ _hdIprevMaxSimRefs+ {-# INLINE rule736 #-}+ rule736 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule737 #-}+ rule737 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule738 #-}+ rule738 = \ ((_lhsIuseParallel) :: Bool) ->+ _lhsIuseParallel+{-# NOINLINE sem_VisitSteps_Nil #-}+sem_VisitSteps_Nil :: T_VisitSteps +sem_VisitSteps_Nil = T_VisitSteps (return st53) where+ {-# NOINLINE st53 #-}+ st53 = let+ v52 :: T_VisitSteps_v52 + v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfollow _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule739 _lhsIfollow+ _lhsOsize :: Int+ _lhsOsize = rule740 ()+ _lhsOisLast :: Bool+ _lhsOisLast = rule741 ()+ _lhsOdefs :: Set String+ _lhsOdefs = rule742 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule743 ()+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule744 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule745 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule746 ()+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule747 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule748 ()+ _lhsOindex :: Int+ _lhsOindex = rule749 _lhsIindex+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule750 _lhsIprevMaxSimRefs+ __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitSteps_s53 v52+ {-# INLINE rule739 #-}+ {-# LINE 846 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule739 = \ ((_lhsIfollow) :: PP_Doc) ->+ {-# LINE 846 "./src-ag/ExecutionPlan2Caml.ag" #-}+ _lhsIfollow+ {-# LINE 5740 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule740 #-}+ {-# LINE 875 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule740 = \ (_ :: ()) ->+ {-# LINE 875 "./src-ag/ExecutionPlan2Caml.ag" #-}+ 0+ {-# LINE 5746 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule741 #-}+ {-# LINE 901 "./src-ag/ExecutionPlan2Caml.ag" #-}+ rule741 = \ (_ :: ()) ->+ {-# LINE 901 "./src-ag/ExecutionPlan2Caml.ag" #-}+ True+ {-# LINE 5752 "dist/build/ExecutionPlan2Caml.hs"#-}+ {-# INLINE rule742 #-}+ rule742 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule743 #-}+ rule743 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule744 #-}+ rule744 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule745 #-}+ rule745 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule746 #-}+ rule746 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule747 #-}+ rule747 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule748 #-}+ rule748 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule749 #-}+ rule749 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule750 #-}+ rule750 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs++-- Visits ------------------------------------------------------+-- wrapper+data Inh_Visits = Inh_Visits { allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visits :: (Map NontermIdent Attributes), allInitStates_Inh_Visits :: (Map NontermIdent Int), allSynmap_Inh_Visits :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visits :: (Map Identifier Type), childintros_Inh_Visits :: (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visits :: (ConstructorIdent), inhmap_Inh_Visits :: (Attributes), mrules_Inh_Visits :: (Map Identifier (VisitKind -> Either Error PP_Doc)), nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), nt_Inh_Visits :: (NontermIdent), options_Inh_Visits :: (Options), params_Inh_Visits :: ([Identifier]), prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visits :: (Map Identifier (Set String)), ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visits :: (Attributes), terminaldefs_Inh_Visits :: (Set String) }+data Syn_Visits = Syn_Visits { allvisits_Syn_Visits :: ([VisitStateState]), childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)), errors_Syn_Visits :: (Seq Error), fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visits :: (Set String), ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visits :: (Map Identifier Int), sem_visit_Syn_Visits :: ( [(StateIdentifier,PP_Doc)] ), t_visits_Syn_Visits :: (PP_Doc), visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_Visits #-}+wrap_Visits :: T_Visits -> Inh_Visits -> (Syn_Visits )+wrap_Visits (T_Visits act) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ (T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visits_s56 sem arg)+ return (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_Visits #-}+sem_Visits :: Visits -> T_Visits +sem_Visits list = Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list)++-- semantic domain+newtype T_Visits = T_Visits {+ attach_T_Visits :: Identity (T_Visits_s56 )+ }+newtype T_Visits_s56 = C_Visits_s56 {+ inv_Visits_s56 :: (T_Visits_v55 )+ }+data T_Visits_s57 = C_Visits_s57+type T_Visits_v55 = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )+data T_Visits_vIn55 = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)+data T_Visits_vOut55 = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,PP_Doc)] ) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_Visits_Cons #-}+sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits +sem_Visits_Cons arg_hd_ arg_tl_ = T_Visits (return st56) where+ {-# NOINLINE st56 #-}+ st56 = let+ v55 :: T_Visits_v55 + v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _hdX47 = Control.Monad.Identity.runIdentity (attach_T_Visit (arg_hd_))+ _tlX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_tl_))+ (T_Visit_vOut46 _hdIallvisits _hdIchildvisit _hdIerrors _hdIfromToStates _hdIintramap _hdIlazyIntras _hdIruleKinds _hdIruleUsage _hdIsem_visit _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_Visit_s47 _hdX47 (T_Visit_vIn46 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs)+ (T_Visits_vOut55 _tlIallvisits _tlIchildvisit _tlIerrors _tlIfromToStates _tlIintramap _tlIlazyIntras _tlIruleKinds _tlIruleUsage _tlIsem_visit _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_Visits_s56 _tlX56 (T_Visits_vIn55 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs)+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule751 _hdIallvisits _tlIallvisits+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule752 _hdIchildvisit _tlIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule753 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule754 _hdIfromToStates _tlIfromToStates+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule755 _hdIintramap _tlIintramap+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule756 _hdIlazyIntras _tlIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule757 _hdIruleKinds _tlIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule758 _hdIruleUsage _tlIruleUsage+ _lhsOsem_visit :: [(StateIdentifier,PP_Doc)] + _lhsOsem_visit = rule759 _hdIsem_visit _tlIsem_visit+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule760 _hdIt_visits _tlIt_visits+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule761 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule762 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule763 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule764 _lhsIallFromToStates+ _hdOallInhmap = rule765 _lhsIallInhmap+ _hdOallInitStates = rule766 _lhsIallInitStates+ _hdOallSynmap = rule767 _lhsIallSynmap+ _hdOallVisitKinds = rule768 _lhsIallVisitKinds+ _hdOallchildvisit = rule769 _lhsIallchildvisit+ _hdOallintramap = rule770 _lhsIallintramap+ _hdOavisitdefs = rule771 _lhsIavisitdefs+ _hdOavisituses = rule772 _lhsIavisituses+ _hdOchildTypes = rule773 _lhsIchildTypes+ _hdOchildintros = rule774 _lhsIchildintros+ _hdOcon = rule775 _lhsIcon+ _hdOinhmap = rule776 _lhsIinhmap+ _hdOmrules = rule777 _lhsImrules+ _hdOnextVisits = rule778 _lhsInextVisits+ _hdOnt = rule779 _lhsInt+ _hdOoptions = rule780 _lhsIoptions+ _hdOparams = rule781 _lhsIparams+ _hdOprevVisits = rule782 _lhsIprevVisits+ _hdOruledefs = rule783 _lhsIruledefs+ _hdOruleuses = rule784 _lhsIruleuses+ _hdOsynmap = rule785 _lhsIsynmap+ _hdOterminaldefs = rule786 _lhsIterminaldefs+ _tlOallFromToStates = rule787 _lhsIallFromToStates+ _tlOallInhmap = rule788 _lhsIallInhmap+ _tlOallInitStates = rule789 _lhsIallInitStates+ _tlOallSynmap = rule790 _lhsIallSynmap+ _tlOallVisitKinds = rule791 _lhsIallVisitKinds+ _tlOallchildvisit = rule792 _lhsIallchildvisit+ _tlOallintramap = rule793 _lhsIallintramap+ _tlOavisitdefs = rule794 _lhsIavisitdefs+ _tlOavisituses = rule795 _lhsIavisituses+ _tlOchildTypes = rule796 _lhsIchildTypes+ _tlOchildintros = rule797 _lhsIchildintros+ _tlOcon = rule798 _lhsIcon+ _tlOinhmap = rule799 _lhsIinhmap+ _tlOmrules = rule800 _lhsImrules+ _tlOnextVisits = rule801 _lhsInextVisits+ _tlOnt = rule802 _lhsInt+ _tlOoptions = rule803 _lhsIoptions+ _tlOparams = rule804 _lhsIparams+ _tlOprevVisits = rule805 _lhsIprevVisits+ _tlOruledefs = rule806 _lhsIruledefs+ _tlOruleuses = rule807 _lhsIruleuses+ _tlOsynmap = rule808 _lhsIsynmap+ _tlOterminaldefs = rule809 _lhsIterminaldefs+ __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visits_s56 v55+ {-# INLINE rule751 #-}+ rule751 = \ ((_hdIallvisits) :: VisitStateState ) ((_tlIallvisits) :: [VisitStateState]) ->+ _hdIallvisits : _tlIallvisits+ {-# INLINE rule752 #-}+ rule752 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule753 #-}+ rule753 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule754 #-}+ rule754 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule755 #-}+ rule755 = \ ((_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _hdIintramap `uwMapUnion` _tlIintramap+ {-# INLINE rule756 #-}+ rule756 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# INLINE rule757 #-}+ rule757 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# INLINE rule758 #-}+ rule758 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# INLINE rule759 #-}+ rule759 = \ ((_hdIsem_visit) :: (StateIdentifier,PP_Doc) ) ((_tlIsem_visit) :: [(StateIdentifier,PP_Doc)] ) ->+ _hdIsem_visit : _tlIsem_visit+ {-# INLINE rule760 #-}+ rule760 = \ ((_hdIt_visits) :: PP_Doc) ((_tlIt_visits) :: PP_Doc) ->+ _hdIt_visits >-< _tlIt_visits+ {-# INLINE rule761 #-}+ rule761 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule762 #-}+ rule762 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule763 #-}+ rule763 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule764 #-}+ rule764 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule765 #-}+ rule765 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule766 #-}+ rule766 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule767 #-}+ rule767 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule768 #-}+ rule768 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule769 #-}+ rule769 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule770 #-}+ rule770 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIallintramap+ {-# INLINE rule771 #-}+ rule771 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule772 #-}+ rule772 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule773 #-}+ rule773 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule774 #-}+ rule774 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule775 #-}+ rule775 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule776 #-}+ rule776 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule777 #-}+ rule777 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule778 #-}+ rule778 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule779 #-}+ rule779 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule780 #-}+ rule780 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule781 #-}+ rule781 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule782 #-}+ rule782 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule783 #-}+ rule783 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule784 #-}+ rule784 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule785 #-}+ rule785 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule786 #-}+ rule786 = \ ((_lhsIterminaldefs) :: Set String) ->+ _lhsIterminaldefs+ {-# INLINE rule787 #-}+ rule787 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule788 #-}+ rule788 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule789 #-}+ rule789 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule790 #-}+ rule790 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule791 #-}+ rule791 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule792 #-}+ rule792 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)) ->+ _lhsIallchildvisit+ {-# INLINE rule793 #-}+ rule793 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIallintramap+ {-# INLINE rule794 #-}+ rule794 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule795 #-}+ rule795 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule796 #-}+ rule796 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule797 #-}+ rule797 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule798 #-}+ rule798 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule799 #-}+ rule799 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule800 #-}+ rule800 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule801 #-}+ rule801 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule802 #-}+ rule802 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule803 #-}+ rule803 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule804 #-}+ rule804 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule805 #-}+ rule805 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule806 #-}+ rule806 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule807 #-}+ rule807 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule808 #-}+ rule808 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule809 #-}+ rule809 = \ ((_lhsIterminaldefs) :: Set String) ->+ _lhsIterminaldefs+{-# NOINLINE sem_Visits_Nil #-}+sem_Visits_Nil :: T_Visits +sem_Visits_Nil = T_Visits (return st56) where+ {-# NOINLINE st56 #-}+ st56 = let+ v55 :: T_Visits_v55 + v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule810 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> Type -> VisitKind -> PP_Doc -> Either Error PP_Doc)+ _lhsOchildvisit = rule811 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule812 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule813 ()+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule814 ()+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule815 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule816 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule817 ()+ _lhsOsem_visit :: [(StateIdentifier,PP_Doc)] + _lhsOsem_visit = rule818 ()+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule819 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule820 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule821 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule822 ()+ __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visits_s56 v55+ {-# INLINE rule810 #-}+ rule810 = \ (_ :: ()) ->+ []+ {-# INLINE rule811 #-}+ rule811 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule812 #-}+ rule812 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule813 #-}+ rule813 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule814 #-}+ rule814 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule815 #-}+ rule815 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule816 #-}+ rule816 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule817 #-}+ rule817 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule818 #-}+ rule818 = \ (_ :: ()) ->+ []+ {-# INLINE rule819 #-}+ rule819 = \ (_ :: ()) ->+ empty+ {-# INLINE rule820 #-}+ rule820 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule821 #-}+ rule821 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule822 #-}+ rule822 = \ (_ :: ()) -> Map.empty
+ src-generated/ExecutionPlan2Clean.hs view
@@ -0,0 +1,7001 @@+{-# LANGUAGE Rank2Types, GADTs #-}+{-# LANGUAGE ScopedTypeVariables #-}++module ExecutionPlan2Clean where+{-# LINE 2 "./src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 10 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 16 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 23 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 2 "./src-ag/ExecutionPlan.ag" #-}++-- VisitSyntax.ag imports+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+import ErrorMessages++import qualified Data.Set as Set+import Data.Set(Set)+import qualified Data.Map as Map+import Data.Map(Map)+{-# LINE 37 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 7 "./src-ag/ExecutionPlan2Clean.ag" #-}++import ExecutionPlan+import Pretty+import PPUtil+import Options+import Data.Monoid(mappend,mempty)+import Data.Maybe+import Debug.Trace+import System.IO+import System.Directory+import System.FilePath+import UU.Scanner.Position++import TokenDef+import HsToken+import ErrorMessages++import Data.Set (Set)+import qualified Data.Set as Set+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Sequence(Seq)+import qualified Data.Sequence as Seq+import Data.Foldable(toList)+{-# LINE 64 "dist/build/ExecutionPlan2Clean.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 190 "./src-ag/ExecutionPlan2Clean.ag" #-}++classCtxsToDocs :: ClassContext -> [PP_Doc]+classCtxsToDocs = map toDoc where+ toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))++classConstrsToDocs :: [Type] -> [PP_Doc]+classConstrsToDocs = map ppTp++ppClasses :: [PP_Doc] -> PP_Doc+ppClasses [] = empty+ppClasses xs = "|" >#< pp_block "" "" "&" xs++ppQuants :: [Identifier] -> PP_Doc+ppQuants [] = empty+ppQuants ps = "E." >#< ppSpaced ps >#< ":"+{-# LINE 83 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 227 "./src-ag/ExecutionPlan2Clean.ag" #-}++-- first parameter indicates: generate a record or not+ppConFields :: Bool -> [PP_Doc] -> PP_Doc+ppConFields True flds = ppListSep "{" "}" ", " flds+ppConFields False flds = ppSpaced flds+{-# LINE 91 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 260 "./src-ag/ExecutionPlan2Clean.ag" #-}++ppTp :: Type -> PP_Doc+ppTp = text . typeToHaskellString Nothing []+{-# LINE 97 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 333 "./src-ag/ExecutionPlan2Clean.ag" #-}++isRecordConstructor :: NontermIdent -> Map NontermIdent ConstructorType -> Bool+isRecordConstructor nt ctm = Map.lookup nt ctm == Just RecordConstructor+{-# LINE 103 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 374 "./src-ag/ExecutionPlan2Clean.ag" #-}+type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)+{-# LINE 107 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 483 "./src-ag/ExecutionPlan2Clean.ag" #-}++conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId+conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId+conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId+conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId++ppMonadType :: Options -> PP_Doc+ppMonadType opts+ | parallelInvoke opts = text "IO"+ | otherwise = text "Identity"+{-# LINE 120 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 652 "./src-ag/ExecutionPlan2Clean.ag" #-}++ppDefor :: Type -> PP_Doc+ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)+ppDefor (Haskell s) = text s+{-# LINE 127 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 756 "./src-ag/ExecutionPlan2Clean.ag" #-}++mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc+mklet prefix defs body =+ prefix+ >-< indent (length (show prefix))+ ("let"+ >-< indent 4 defs+ >-< "in" >#< body)+{-# LINE 138 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 817 "./src-ag/ExecutionPlan2Clean.ag" #-}++resultValName :: String+resultValName = "ag__result_"++nextStName :: String+nextStName = "ag__st_"+{-# LINE 147 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 878 "./src-ag/ExecutionPlan2Clean.ag" #-}++parResultName :: String+parResultName = "__outcome_"++fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc+fmtDecl declPure fmt decl = case fmt of+ FormatLetDecl -> pp decl+ FormatLetLine -> "let" >#< decl >#< "in"+ FormatDo | declPure -> "let" >#< decl >#< "in"+ | otherwise -> pp decl+{-# LINE 160 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 992 "./src-ag/ExecutionPlan2Clean.ag" #-}++stname :: Identifier -> Int -> String+stname child st = "st_" ++ getName child ++ "X" ++ show st++-- should actually return some conversion info+compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool+compatibleAttach _ _ _ = True++unMon :: Options -> PP_Doc+unMon options+ | parallelInvoke options = text "'System.IO.Unsafe'.unsafePerformIO" -- IO monad+ | otherwise = text "'Control.Monad.Identity'.runIdentity" -- identity monad+{-# LINE 175 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1079 "./src-ag/ExecutionPlan2Clean.ag" #-}++dummyPat :: Options -> Bool -> PP_Doc+dummyPat opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = if strictDummyToken opts+ then text "Void"+ else text "(_)"+ | otherwise = let match | strictDummyToken opts = "!_"+ | otherwise = "_"+ in pp_parens (match >#< "::" >#< dummyType opts noArgs)+ where match | strictDummyToken opts = "(!_)"+ | otherwise = "_"++dummyArg :: Options -> Bool -> PP_Doc+dummyArg opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "Void"+ | otherwise = text "GHC.Prim.realWorld#"++dummyType :: Options -> Bool -> PP_Doc+dummyType opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "Void"+ | otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"+{-# LINE 202 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1105 "./src-ag/ExecutionPlan2Clean.ag" #-}++-- rules are "deinlined" to prevent needless code duplication.+-- if there is only a bit of duplication, we allow ghc to decide if it is worth it.+-- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.+ruleInlineThresholdSoft :: Int+ruleInlineThresholdSoft = 3++ruleInlineThresholdHard :: Int+ruleInlineThresholdHard = 5++reallyOftenUsedThreshold :: Int+reallyOftenUsedThreshold = 12+{-# LINE 217 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1172 "./src-ag/ExecutionPlan2Clean.ag" #-}++data NonLocalAttr+ = AttrInh Identifier Identifier+ | AttrSyn Identifier Identifier deriving Show++mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr+mkNonLocalAttr True = AttrInh -- True: inherited attr+mkNonLocalAttr False = AttrSyn++lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs+lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns++-- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that+-- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.+-- However, for now we simply decide to return Nothing in this case, which skips the type annotation.+lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupType child name attrMp childMp+ | noParameters childTp = Just ppDoc+ | otherwise = Nothing+ where+ attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs+ childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp+ nonterm = extractNonterminal childTp+ childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp+ ppDoc = ppTp attrTp++noParameters :: Type -> Bool+noParameters (Haskell _) = True+noParameters (NT _ args _) = null args+{-# LINE 250 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1259 "./src-ag/ExecutionPlan2Clean.ag" #-}++-- a `compatibleKind` b means: can kind b be invoked from a+compatibleKind :: VisitKind -> VisitKind -> Bool+compatibleKind _ _ = True++compatibleRule :: VisitKind -> Bool -> Bool+compatibleRule (VisitPure _) False = False+compatibleRule _ _ = True+{-# LINE 261 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1281 "./src-ag/ExecutionPlan2Clean.ag" #-}++unionWithSum = Map.unionWith (+)+{-# LINE 266 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1304 "./src-ag/ExecutionPlan2Clean.ag" #-}++uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)+uwSetUnion = Map.unionWith Set.union++uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)+uwMapUnion = Map.unionWith Map.union+{-# LINE 275 "dist/build/ExecutionPlan2Clean.hs" #-}++{-# LINE 1499 "./src-ag/ExecutionPlan2Clean.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""++writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output++cleanIclModuleHeader :: Options -> String -> String+cleanIclModuleHeader flags input+ = case moduleName flags+ of Name nm -> genMod nm+ Default -> genMod (defaultModuleName input)+ NoName -> ""+ where genMod x = "implementation module " ++ x ++cleanDclModuleHeader :: Options -> String -> Maybe String -> String+cleanDclModuleHeader flags input export+ = case moduleName flags+ of Name nm -> genMod nm+ Default -> genMod (defaultModuleName input)+ NoName -> ""+ where genMod x = "definition module " ++ x ++ genExp export x+ genExp Nothing _ = ""+ genExp (Just e) x = "(module " ++ x ++ ", module " ++ e ++ ")"++defaultModuleName :: String -> String+defaultModuleName = dropExtension++mkIclModuleHeader :: Maybe (String,String,String) -> String -> String -> String -> Bool -> String+mkIclModuleHeader Nothing defaultName suffix _ _+ = "implementation module " ++ defaultName ++ suffix+mkIclModuleHeader (Just (name, exports, imports)) _ suffix addExports replaceExports+ = "implementation module " ++ name ++ suffix ++ "\n" ++ imports ++ "\n"++mkDclModuleHeader :: Maybe (String,String,String) -> String -> String -> String -> Bool -> String+mkDclModuleHeader Nothing defaultName suffix _ _+ = "definition module " ++ defaultName ++ suffix+mkDclModuleHeader (Just (name, exports, _)) _ suffix addExports replaceExports+ = "definition module " ++ name ++ suffix ++ ex ++ "\n"+ where+ ex = if null exports || (replaceExports && null addExports)+ then ""+ else if null addExports+ then exports+ else if replaceExports+ then addExports+ else exports ++ "," ++ addExports+{-# LINE 336 "dist/build/ExecutionPlan2Clean.hs" #-}+-- EChild ------------------------------------------------------+-- wrapper+data Inh_EChild = Inh_EChild { allInitStates_Inh_EChild :: (Map NontermIdent Int), con_Inh_EChild :: (ConstructorIdent), constructorTypeMap_Inh_EChild :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String), importBlocks_Inh_EChild :: (PP_Doc), mainFile_Inh_EChild :: (String), mainName_Inh_EChild :: (String), nt_Inh_EChild :: (NontermIdent), options_Inh_EChild :: (Options), textBlocks_Inh_EChild :: (PP_Doc) }+data Syn_EChild = Syn_EChild { argnamesw_Syn_EChild :: ( PP_Doc ), argpats_Syn_EChild :: ( PP_Doc ), argtps_Syn_EChild :: ( PP_Doc ), childTypes_Syn_EChild :: (Map Identifier Type), childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), datatype_Syn_EChild :: (PP_Doc), recfields_Syn_EChild :: ( [Identifier] ), recordtype_Syn_EChild :: (PP_Doc), terminaldefs_Syn_EChild :: (Set String), usedArgs_Syn_EChild :: (Set String) }+{-# INLINABLE wrap_EChild #-}+wrap_EChild :: T_EChild -> Inh_EChild -> (Syn_EChild )+wrap_EChild (T_EChild act) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks+ (T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs) <- return (inv_EChild_s2 sem arg)+ return (Syn_EChild _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs)+ )++-- cata+{-# NOINLINE sem_EChild #-}+sem_EChild :: EChild -> T_EChild +sem_EChild ( EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ ) = sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_+sem_EChild ( ETerm name_ tp_ ) = sem_EChild_ETerm name_ tp_++-- semantic domain+newtype T_EChild = T_EChild {+ attach_T_EChild :: Identity (T_EChild_s2 )+ }+newtype T_EChild_s2 = C_EChild_s2 {+ inv_EChild_s2 :: (T_EChild_v1 )+ }+data T_EChild_s3 = C_EChild_s3+type T_EChild_v1 = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )+data T_EChild_vIn1 = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (String) (String) (NontermIdent) (Options) (PP_Doc)+data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) ( PP_Doc ) ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) ( [Identifier] ) (PP_Doc) (Set String) (Set String)+{-# NOINLINE sem_EChild_EChild #-}+sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild +sem_EChild_EChild arg_name_ arg_tp_ arg_kind_ arg_hasAround_ _ _ = T_EChild (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_EChild_v1 + v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks) -> ( let+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule0 _usedArgs_augmented_f1 _usedArgs_augmented_syn+ _usedArgs_augmented_f1 = rule1 arg_kind_ arg_name_+ _tpDoc = rule2 _addStrict arg_tp_+ _strNm = rule3 _lhsIcon _lhsInt arg_name_+ _field = rule4 _lhsIoptions _strNm _tpDoc+ _recordfield = rule5 _strNm _tpDoc+ _addStrict = rule6 _lhsIoptions+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule7 _field arg_kind_+ _lhsOrecordtype :: PP_Doc+ _lhsOrecordtype = rule8 _recordfield arg_kind_+ _lhsOargnamesw :: PP_Doc + _lhsOargnamesw = rule9 _nt arg_kind_ arg_name_+ _lhsOargtps :: PP_Doc + _lhsOargtps = rule10 arg_kind_ arg_tp_+ _argpats = rule11 arg_kind_ arg_name_+ _lhsOrecfields :: [Identifier] + _lhsOrecfields = rule12 arg_kind_ arg_name_+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule13 _introcode arg_name_+ _isDefor = rule14 arg_tp_+ _valcode = rule15 _isDefor _lhsIoptions _nt arg_kind_ arg_name_+ _aroundcode = rule16 _lhsIoptions arg_hasAround_ arg_name_+ _introcode = rule17 _addbang _aroundcode _initSt _isDefor _lhsIoptions _nt _valcode arg_hasAround_ arg_kind_ arg_name_+ _nt = rule18 arg_tp_+ _addbang = rule19 _lhsIoptions+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule20 arg_name_ arg_tp_+ _initSt = rule21 _lhsIallInitStates _nt+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule22 ()+ _usedArgs_augmented_syn = rule23 ()+ _lhsOargpats :: PP_Doc + _lhsOargpats = rule24 _argpats+ __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChild_s2 v1+ {-# INLINE rule0 #-}+ rule0 = \ _usedArgs_augmented_f1 _usedArgs_augmented_syn ->+ foldr ($) _usedArgs_augmented_syn [_usedArgs_augmented_f1]+ {-# INLINE rule1 #-}+ rule1 = \ kind_ name_ ->+ \s -> case kind_ of+ ChildSyntax -> Set.insert ("arg_" ++ show name_ ++ "_") s+ _ -> s+ {-# INLINE rule2 #-}+ {-# LINE 243 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule2 = \ _addStrict tp_ ->+ {-# LINE 243 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _addStrict $ pp_parens $ ppTp $ removeDeforested tp_+ {-# LINE 426 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule3 #-}+ {-# LINE 244 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule3 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->+ {-# LINE 244 "./src-ag/ExecutionPlan2Clean.ag" #-}+ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 432 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule4 #-}+ {-# LINE 245 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule4 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->+ {-# LINE 245 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if dataRecords _lhsIoptions+ then _strNm >#< "::" >#< _tpDoc+ else _tpDoc+ {-# LINE 440 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule5 #-}+ {-# LINE 248 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule5 = \ _strNm _tpDoc ->+ {-# LINE 248 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _strNm >#< "::" >#< _tpDoc+ {-# LINE 446 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule6 #-}+ {-# LINE 249 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule6 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 249 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if strictData _lhsIoptions then "!" >|< x else x+ {-# LINE 452 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule7 #-}+ {-# LINE 250 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule7 = \ _field kind_ ->+ {-# LINE 250 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildAttr -> empty+ _ -> _field+ {-# LINE 460 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule8 #-}+ {-# LINE 254 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule8 = \ _recordfield kind_ ->+ {-# LINE 254 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildAttr -> empty+ _ -> _recordfield+ {-# LINE 468 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule9 #-}+ {-# LINE 342 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule9 = \ _nt kind_ name_ ->+ {-# LINE 342 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildSyntax -> "(" >#< "sem_" >|< _nt >#< name_ >|< "_" >#< ")"+ ChildAttr -> empty+ ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"+ {-# LINE 477 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule10 #-}+ {-# LINE 633 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule10 = \ kind_ tp_ ->+ {-# LINE 633 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildSyntax -> pp_parens $ ppDefor tp_+ ChildReplace tp -> pp_parens $ ppDefor tp+ _ -> empty+ {-# LINE 486 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule11 #-}+ {-# LINE 637 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule11 = \ kind_ name_ ->+ {-# LINE 637 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildSyntax -> name_ >|< "_"+ ChildReplace _ -> name_ >|< "_"+ _ -> empty+ {-# LINE 495 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule12 #-}+ {-# LINE 642 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule12 = \ kind_ name_ ->+ {-# LINE 642 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildSyntax -> [name_]+ ChildReplace _ -> [name_]+ _ -> []+ {-# LINE 504 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule13 #-}+ {-# LINE 946 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule13 = \ _introcode name_ ->+ {-# LINE 946 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ _introcode+ {-# LINE 510 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule14 #-}+ {-# LINE 947 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule14 = \ tp_ ->+ {-# LINE 947 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case tp_ of+ NT _ _ defor -> defor+ _ -> False+ {-# LINE 518 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule15 #-}+ {-# LINE 950 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule15 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->+ {-# LINE 950 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ ChildSyntax -> "arg_" >|< name_ >|< "_"+ ChildAttr ->+ let prefix | not _isDefor = if lateHigherOrderBinding _lhsIoptions+ then lateSemNtLabel _nt >#< lhsname _lhsIoptions True idLateBindingAttr+ else "sem_" >|< _nt+ | otherwise = empty+ in pp_parens (prefix >#< instname name_)+ ChildReplace _ ->+ pp_parens (instname name_ >#< name_ >|< "_")+ {-# LINE 533 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule16 #-}+ {-# LINE 961 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule16 = \ ((_lhsIoptions) :: Options) hasAround_ name_ ->+ {-# LINE 961 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if hasAround_+ then locname _lhsIoptions name_ >|< "_around"+ else empty+ {-# LINE 541 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule17 #-}+ {-# LINE 964 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule17 = \ _addbang _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->+ {-# LINE 964 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \kind fmtMode ->+ let pat = text $ stname name_ _initSt+ patStrict = _addbang pat+ attach = "attach_T_" >|< _nt >#< pp_parens (_aroundcode >#< _valcode )+ runAttach = unMon _lhsIoptions >#< pp_parens attach+ decl = case kind of+ VisitPure False -> pat >#< "=" >#< runAttach+ VisitPure True -> patStrict >#< "=" >#< runAttach+ VisitMonadic -> attach >#< ">>= \\" >#< patStrict >#< "->"+ in if compatibleAttach kind _nt _lhsIoptions+ then Right ( fmtDecl False fmtMode decl+ , Set.singleton (stname name_ _initSt )+ , case kind_ of+ ChildAttr -> Map.insert (instname name_) Nothing $+ ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)+ then id+ else Map.insert (lhsname _lhsIoptions True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ ) $+ ( if hasAround_+ then Map.insert (locname _lhsIoptions (name_) ++ "_around") Nothing+ else id+ ) $ Map.empty+ ChildReplace _ -> Map.singleton (instname name_) Nothing+ ChildSyntax -> Map.empty+ )+ else Left $ IncompatibleAttachKind name_ kind+ {-# LINE 572 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule18 #-}+ {-# LINE 990 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule18 = \ tp_ ->+ {-# LINE 990 "./src-ag/ExecutionPlan2Clean.ag" #-}+ extractNonterminal tp_+ {-# LINE 578 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule19 #-}+ {-# LINE 1568 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule19 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1568 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 584 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule20 #-}+ {-# LINE 1620 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule20 = \ name_ tp_ ->+ {-# LINE 1620 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 590 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule21 #-}+ {-# LINE 1664 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule21 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->+ {-# LINE 1664 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates+ {-# LINE 596 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule22 #-}+ rule22 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule23 #-}+ rule23 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule24 #-}+ rule24 = \ _argpats ->+ _argpats+{-# NOINLINE sem_EChild_ETerm #-}+sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild +sem_EChild_ETerm arg_name_ arg_tp_ = T_EChild (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_EChild_v1 + v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks) -> ( let+ _tpDoc = rule25 _addStrict arg_tp_+ _strNm = rule26 _lhsIcon _lhsInt arg_name_+ _field = rule27 _lhsIoptions _strNm _tpDoc+ _recordfield = rule28 _strNm _tpDoc+ _addStrict = rule29 _lhsIoptions+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule30 _field+ _lhsOrecordtype :: PP_Doc+ _lhsOrecordtype = rule31 _recordfield+ _lhsOargnamesw :: PP_Doc + _lhsOargnamesw = rule32 arg_name_+ _lhsOargtps :: PP_Doc + _lhsOargtps = rule33 arg_tp_+ _argpats = rule34 _addbang arg_name_+ _lhsOrecfields :: [Identifier] + _lhsOrecfields = rule35 arg_name_+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule36 arg_name_+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule37 arg_name_+ _addbang = rule38 _lhsIoptions+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule39 arg_name_ arg_tp_+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule40 ()+ _lhsOargpats :: PP_Doc + _lhsOargpats = rule41 _argpats+ __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChild_s2 v1+ {-# INLINE rule25 #-}+ {-# LINE 243 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule25 = \ _addStrict tp_ ->+ {-# LINE 243 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _addStrict $ pp_parens $ ppTp $ removeDeforested tp_+ {-# LINE 648 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule26 #-}+ {-# LINE 244 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule26 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->+ {-# LINE 244 "./src-ag/ExecutionPlan2Clean.ag" #-}+ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 654 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule27 #-}+ {-# LINE 245 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule27 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->+ {-# LINE 245 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if dataRecords _lhsIoptions+ then _strNm >#< "::" >#< _tpDoc+ else _tpDoc+ {-# LINE 662 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule28 #-}+ {-# LINE 248 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule28 = \ _strNm _tpDoc ->+ {-# LINE 248 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _strNm >#< "::" >#< _tpDoc+ {-# LINE 668 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule29 #-}+ {-# LINE 249 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule29 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 249 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if strictData _lhsIoptions then "!" >|< x else x+ {-# LINE 674 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule30 #-}+ {-# LINE 257 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule30 = \ _field ->+ {-# LINE 257 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _field+ {-# LINE 680 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule31 #-}+ {-# LINE 258 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule31 = \ _recordfield ->+ {-# LINE 258 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _recordfield+ {-# LINE 686 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule32 #-}+ {-# LINE 346 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule32 = \ name_ ->+ {-# LINE 346 "./src-ag/ExecutionPlan2Clean.ag" #-}+ text $ fieldname name_+ {-# LINE 692 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule33 #-}+ {-# LINE 648 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule33 = \ tp_ ->+ {-# LINE 648 "./src-ag/ExecutionPlan2Clean.ag" #-}+ pp_parens $ show tp_+ {-# LINE 698 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule34 #-}+ {-# LINE 649 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule34 = \ _addbang name_ ->+ {-# LINE 649 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _addbang $ text $ fieldname name_+ {-# LINE 704 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule35 #-}+ {-# LINE 650 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule35 = \ name_ ->+ {-# LINE 650 "./src-ag/ExecutionPlan2Clean.ag" #-}+ [name_]+ {-# LINE 710 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule36 #-}+ {-# LINE 945 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule36 = \ name_ ->+ {-# LINE 945 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ (\_ _ -> Right (empty, Set.empty, Map.empty))+ {-# LINE 716 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule37 #-}+ {-# LINE 1318 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule37 = \ name_ ->+ {-# LINE 1318 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.singleton $ fieldname name_+ {-# LINE 722 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule38 #-}+ {-# LINE 1569 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule38 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1569 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 728 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule39 #-}+ {-# LINE 1620 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule39 = \ name_ tp_ ->+ {-# LINE 1620 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 734 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule40 #-}+ rule40 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule41 #-}+ rule41 = \ _argpats ->+ _argpats++-- EChildren ---------------------------------------------------+-- wrapper+data Inh_EChildren = Inh_EChildren { allInitStates_Inh_EChildren :: (Map NontermIdent Int), con_Inh_EChildren :: (ConstructorIdent), constructorTypeMap_Inh_EChildren :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String), importBlocks_Inh_EChildren :: (PP_Doc), mainFile_Inh_EChildren :: (String), mainName_Inh_EChildren :: (String), nt_Inh_EChildren :: (NontermIdent), options_Inh_EChildren :: (Options), textBlocks_Inh_EChildren :: (PP_Doc) }+data Syn_EChildren = Syn_EChildren { argnamesw_Syn_EChildren :: ([PP_Doc]), argpats_Syn_EChildren :: ( [PP_Doc] ), argtps_Syn_EChildren :: ( [PP_Doc] ), childTypes_Syn_EChildren :: (Map Identifier Type), childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), datatype_Syn_EChildren :: ([PP_Doc]), recfields_Syn_EChildren :: ( [Identifier] ), recordtype_Syn_EChildren :: ([PP_Doc]), terminaldefs_Syn_EChildren :: (Set String), usedArgs_Syn_EChildren :: (Set String) }+{-# INLINABLE wrap_EChildren #-}+wrap_EChildren :: T_EChildren -> Inh_EChildren -> (Syn_EChildren )+wrap_EChildren (T_EChildren act) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks+ (T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs) <- return (inv_EChildren_s5 sem arg)+ return (Syn_EChildren _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs)+ )++-- cata+{-# NOINLINE sem_EChildren #-}+sem_EChildren :: EChildren -> T_EChildren +sem_EChildren list = Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list)++-- semantic domain+newtype T_EChildren = T_EChildren {+ attach_T_EChildren :: Identity (T_EChildren_s5 )+ }+newtype T_EChildren_s5 = C_EChildren_s5 {+ inv_EChildren_s5 :: (T_EChildren_v4 )+ }+data T_EChildren_s6 = C_EChildren_s6+type T_EChildren_v4 = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )+data T_EChildren_vIn4 = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (String) (String) (NontermIdent) (Options) (PP_Doc)+data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) ( [PP_Doc] ) ( [PP_Doc] ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([PP_Doc]) ( [Identifier] ) ([PP_Doc]) (Set String) (Set String)+{-# NOINLINE sem_EChildren_Cons #-}+sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren +sem_EChildren_Cons arg_hd_ arg_tl_ = T_EChildren (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_EChildren_v4 + v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks) -> ( let+ _hdX2 = Control.Monad.Identity.runIdentity (attach_T_EChild (arg_hd_))+ _tlX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_tl_))+ (T_EChild_vOut1 _hdIargnamesw _hdIargpats _hdIargtps _hdIchildTypes _hdIchildintros _hdIdatatype _hdIrecfields _hdIrecordtype _hdIterminaldefs _hdIusedArgs) = inv_EChild_s2 _hdX2 (T_EChild_vIn1 _hdOallInitStates _hdOcon _hdOconstructorTypeMap _hdOdclModuleHeader _hdOiclModuleHeader _hdOimportBlocks _hdOmainFile _hdOmainName _hdOnt _hdOoptions _hdOtextBlocks)+ (T_EChildren_vOut4 _tlIargnamesw _tlIargpats _tlIargtps _tlIchildTypes _tlIchildintros _tlIdatatype _tlIrecfields _tlIrecordtype _tlIterminaldefs _tlIusedArgs) = inv_EChildren_s5 _tlX5 (T_EChildren_vIn4 _tlOallInitStates _tlOcon _tlOconstructorTypeMap _tlOdclModuleHeader _tlOiclModuleHeader _tlOimportBlocks _tlOmainFile _tlOmainName _tlOnt _tlOoptions _tlOtextBlocks)+ _lhsOargnamesw :: [PP_Doc]+ _lhsOargnamesw = rule42 _hdIargnamesw _tlIargnamesw+ _lhsOargpats :: [PP_Doc] + _lhsOargpats = rule43 _hdIargpats _tlIargpats+ _lhsOargtps :: [PP_Doc] + _lhsOargtps = rule44 _hdIargtps _tlIargtps+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule45 _hdIchildTypes _tlIchildTypes+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule46 _hdIchildintros _tlIchildintros+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule47 _hdIdatatype _tlIdatatype+ _lhsOrecfields :: [Identifier] + _lhsOrecfields = rule48 _hdIrecfields _tlIrecfields+ _lhsOrecordtype :: [PP_Doc]+ _lhsOrecordtype = rule49 _hdIrecordtype _tlIrecordtype+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule50 _hdIterminaldefs _tlIterminaldefs+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule51 _hdIusedArgs _tlIusedArgs+ _hdOallInitStates = rule52 _lhsIallInitStates+ _hdOcon = rule53 _lhsIcon+ _hdOconstructorTypeMap = rule54 _lhsIconstructorTypeMap+ _hdOdclModuleHeader = rule55 _lhsIdclModuleHeader+ _hdOiclModuleHeader = rule56 _lhsIiclModuleHeader+ _hdOimportBlocks = rule57 _lhsIimportBlocks+ _hdOmainFile = rule58 _lhsImainFile+ _hdOmainName = rule59 _lhsImainName+ _hdOnt = rule60 _lhsInt+ _hdOoptions = rule61 _lhsIoptions+ _hdOtextBlocks = rule62 _lhsItextBlocks+ _tlOallInitStates = rule63 _lhsIallInitStates+ _tlOcon = rule64 _lhsIcon+ _tlOconstructorTypeMap = rule65 _lhsIconstructorTypeMap+ _tlOdclModuleHeader = rule66 _lhsIdclModuleHeader+ _tlOiclModuleHeader = rule67 _lhsIiclModuleHeader+ _tlOimportBlocks = rule68 _lhsIimportBlocks+ _tlOmainFile = rule69 _lhsImainFile+ _tlOmainName = rule70 _lhsImainName+ _tlOnt = rule71 _lhsInt+ _tlOoptions = rule72 _lhsIoptions+ _tlOtextBlocks = rule73 _lhsItextBlocks+ __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChildren_s5 v4+ {-# INLINE rule42 #-}+ rule42 = \ ((_hdIargnamesw) :: PP_Doc ) ((_tlIargnamesw) :: [PP_Doc]) ->+ _hdIargnamesw : _tlIargnamesw+ {-# INLINE rule43 #-}+ rule43 = \ ((_hdIargpats) :: PP_Doc ) ((_tlIargpats) :: [PP_Doc] ) ->+ _hdIargpats : _tlIargpats+ {-# INLINE rule44 #-}+ rule44 = \ ((_hdIargtps) :: PP_Doc ) ((_tlIargtps) :: [PP_Doc] ) ->+ _hdIargtps : _tlIargtps+ {-# INLINE rule45 #-}+ rule45 = \ ((_hdIchildTypes) :: Map Identifier Type) ((_tlIchildTypes) :: Map Identifier Type) ->+ _hdIchildTypes `mappend` _tlIchildTypes+ {-# INLINE rule46 #-}+ rule46 = \ ((_hdIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((_tlIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _hdIchildintros `Map.union` _tlIchildintros+ {-# INLINE rule47 #-}+ rule47 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->+ _hdIdatatype : _tlIdatatype+ {-# INLINE rule48 #-}+ rule48 = \ ((_hdIrecfields) :: [Identifier] ) ((_tlIrecfields) :: [Identifier] ) ->+ _hdIrecfields ++ _tlIrecfields+ {-# INLINE rule49 #-}+ rule49 = \ ((_hdIrecordtype) :: PP_Doc) ((_tlIrecordtype) :: [PP_Doc]) ->+ _hdIrecordtype : _tlIrecordtype+ {-# INLINE rule50 #-}+ rule50 = \ ((_hdIterminaldefs) :: Set String) ((_tlIterminaldefs) :: Set String) ->+ _hdIterminaldefs `Set.union` _tlIterminaldefs+ {-# INLINE rule51 #-}+ rule51 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule52 #-}+ rule52 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule53 #-}+ rule53 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule54 #-}+ rule54 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule55 #-}+ rule55 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule56 #-}+ rule56 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule57 #-}+ rule57 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule58 #-}+ rule58 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule59 #-}+ rule59 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule60 #-}+ rule60 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule61 #-}+ rule61 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule62 #-}+ rule62 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule63 #-}+ rule63 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule64 #-}+ rule64 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule65 #-}+ rule65 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule66 #-}+ rule66 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule67 #-}+ rule67 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule68 #-}+ rule68 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule69 #-}+ rule69 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule70 #-}+ rule70 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule71 #-}+ rule71 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule72 #-}+ rule72 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule73 #-}+ rule73 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+{-# NOINLINE sem_EChildren_Nil #-}+sem_EChildren_Nil :: T_EChildren +sem_EChildren_Nil = T_EChildren (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_EChildren_v4 + v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsItextBlocks) -> ( let+ _lhsOargnamesw :: [PP_Doc]+ _lhsOargnamesw = rule74 ()+ _lhsOargpats :: [PP_Doc] + _lhsOargpats = rule75 ()+ _lhsOargtps :: [PP_Doc] + _lhsOargtps = rule76 ()+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule77 ()+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule78 ()+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule79 ()+ _lhsOrecfields :: [Identifier] + _lhsOrecfields = rule80 ()+ _lhsOrecordtype :: [PP_Doc]+ _lhsOrecordtype = rule81 ()+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule82 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule83 ()+ __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOrecfields _lhsOrecordtype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChildren_s5 v4+ {-# INLINE rule74 #-}+ rule74 = \ (_ :: ()) ->+ []+ {-# INLINE rule75 #-}+ rule75 = \ (_ :: ()) ->+ []+ {-# INLINE rule76 #-}+ rule76 = \ (_ :: ()) ->+ []+ {-# INLINE rule77 #-}+ rule77 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule78 #-}+ rule78 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule79 #-}+ rule79 = \ (_ :: ()) ->+ []+ {-# INLINE rule80 #-}+ rule80 = \ (_ :: ()) ->+ []+ {-# INLINE rule81 #-}+ rule81 = \ (_ :: ()) ->+ []+ {-# INLINE rule82 #-}+ rule82 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule83 #-}+ rule83 = \ (_ :: ()) ->+ Set.empty++-- ENonterminal ------------------------------------------------+-- wrapper+data Inh_ENonterminal = Inh_ENonterminal { allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), constructorTypeMap_Inh_ENonterminal :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String), derivings_Inh_ENonterminal :: (Derivings), iclModuleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String), importBlocks_Inh_ENonterminal :: (PP_Doc), inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminal :: (String), mainName_Inh_ENonterminal :: (String), options_Inh_ENonterminal :: (Options), synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), textBlocks_Inh_ENonterminal :: (PP_Doc), typeSyns_Inh_ENonterminal :: (TypeSyns), wrappers_Inh_ENonterminal :: (Set NontermIdent) }+data Syn_ENonterminal = Syn_ENonterminal { appendCommon_Syn_ENonterminal :: ( PP_Doc ), appendMain_Syn_ENonterminal :: ( PP_Doc ), childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_ENonterminal :: (Seq Error), fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_ENonterminal :: (IO ()), imports_Syn_ENonterminal :: ([PP_Doc]), initStates_Syn_ENonterminal :: (Map NontermIdent Int), output_Syn_ENonterminal :: (PP_Doc), output_dcl_Syn_ENonterminal :: (PP_Doc), semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_ENonterminal #-}+wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> (Syn_ENonterminal )+wrap_ENonterminal (T_ENonterminal act) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers+ (T_ENonterminal_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminal_s8 sem arg)+ return (Syn_ENonterminal _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_ENonterminal #-}+sem_ENonterminal :: ENonterminal -> T_ENonterminal +sem_ENonterminal ( ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ prods_ recursive_ hoInfo_ ) = sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ ( sem_EProductions prods_ ) recursive_ hoInfo_++-- semantic domain+newtype T_ENonterminal = T_ENonterminal {+ attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )+ }+newtype T_ENonterminal_s8 = C_ENonterminal_s8 {+ inv_ENonterminal_s8 :: (T_ENonterminal_v7 )+ }+data T_ENonterminal_s9 = C_ENonterminal_s9+type T_ENonterminal_v7 = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )+data T_ENonterminal_vIn7 = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (Derivings) (String -> String -> String -> Bool -> String) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)+data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 ( PP_Doc ) ( PP_Doc ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_ENonterminal_ENonterminal #-}+sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> (Maybe VisitIdentifier) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal +sem_ENonterminal_ENonterminal arg_nt_ arg_params_ arg_classCtxs_ arg_initial_ arg_initialv_ arg_nextVisits_ arg_prevVisits_ arg_prods_ _ _ = T_ENonterminal (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_ENonterminal_v7 + v7 = \ (T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let+ _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_prods_))+ (T_EProductions_vOut16 _prodsIallvisits _prodsIchildvisit _prodsIcount _prodsIdatatype _prodsIerrors _prodsIfromToStates _prodsIgenProdIO _prodsIimports _prodsIrecordtype _prodsIsemFunBndDefs _prodsIsemFunBndTps _prodsIsem_nt _prodsIsem_prod _prodsIsem_prod_tys _prodsIt_visits _prodsIvisitKinds _prodsIvisitdefs _prodsIvisituses) = inv_EProductions_s17 _prodsX17 (T_EProductions_vIn16 _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOclassCtxs _prodsOconstructorTypeMap _prodsOdclModuleHeader _prodsOiclModuleHeader _prodsOimportBlocks _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOprevVisits _prodsOrename _prodsOsynmap _prodsOtextBlocks)+ _prodsOrename = rule84 _lhsIoptions+ _prodsOnt = rule85 arg_nt_+ _prodsOparams = rule86 arg_params_+ _prodsOclassCtxs = rule87 arg_classCtxs_+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule88 _hasWrapper _k_states _lhsIoptions _prodsIsem_prod _sem_nt _t_init_icl _t_states_icl _wr_inh_icl _wr_syn_icl _wrapper_icl arg_nt_+ _hasWrapper = rule89 _lhsIwrappers arg_nt_+ _lhsOoutput_dcl :: PP_Doc+ _lhsOoutput_dcl = rule90 _datatype _hasWrapper _lhsIoptions _prodsIsem_prod_tys _prodsIt_visits _sem_tp _semname _t_init_dcl _t_states_dcl _wr_inh_dcl _wr_syn_dcl _wrapper_dcl arg_nt_+ _classPP = rule91 arg_classCtxs_+ _aliasPre = rule92 _classPP _t_params arg_nt_+ _datatype = rule93 _aliasPre _classPP _derivings _lhsIconstructorTypeMap _lhsItypeSyns _prodsIdatatype _prodsIrecordtype _t_params arg_nt_+ _derivings = rule94 _lhsIderivings arg_nt_+ _fsemname = rule95 ()+ _semname = rule96 _fsemname arg_nt_+ _frecarg = rule97 _fsemname+ _sem_tp = rule98 _classPP _quantPP _t_params _t_type arg_nt_+ _quantPP = rule99 arg_params_+ _sem_nt = rule100 _frecarg _fsemname _lhsItypeSyns _prodsIsem_nt _sem_tp _semname arg_nt_+ (Just _prodsOinhmap) = rule101 _lhsIinhmap arg_nt_+ (Just _prodsOsynmap) = rule102 _lhsIsynmap arg_nt_+ _prodsOallInhmap = rule103 _lhsIinhmap+ _prodsOallSynmap = rule104 _lhsIsynmap+ _outedges = rule105 _prodsIallvisits+ _inedges = rule106 _prodsIallvisits+ _allstates = rule107 _inedges _outedges arg_initial_+ _stvisits = rule108 _prodsIallvisits+ _t_type = rule109 arg_nt_+ _lt_type = rule110 arg_nt_+ _t_params = rule111 arg_params_+ _t_init_icl = rule112 _lt_type _t_init_dcl _t_type+ _t_init_dcl = rule113 _lhsIoptions _t_params _t_type arg_initial_+ _t_states_icl = rule114 _allstates arg_nextVisits_ arg_nt_+ _t_states_dcl = rule115 _allstates _t_params arg_nextVisits_ arg_nt_+ _k_type = rule116 arg_nt_+ _k_states = rule117 _allstates _k_type _prodsIallvisits _t_params _t_type arg_nextVisits_ arg_nt_+ _wr_inh_icl = rule118 _genwrap_icl _wr_inhs+ _wr_syn_icl = rule119 _genwrap_icl _wr_syns+ _genwrap_icl = rule120 _addbang arg_nt_+ _wr_inh_dcl = rule121 _genwrap_dcl _wr_inhs+ _wr_syn_dcl = rule122 _genwrap_dcl _wr_syns+ _genwrap_dcl = rule123 _addbang _t_params arg_nt_+ _synAttrs = rule124 _lhsIinhmap arg_nt_+ _wr_inhs = rule125 _synAttrs _wr_filter+ _wr_inhs1 = rule126 _synAttrs+ _wr_filter = rule127 _lhsIoptions+ _wr_syns = rule128 _lhsIsynmap arg_nt_+ _inhlist = rule129 _lhsIoptions _wr_inhs+ _inhlist1 = rule130 _lhsIoptions _wr_inhs1+ _synlist = rule131 _lhsIoptions _wr_syns+ _wrapname = rule132 arg_nt_+ _inhname = rule133 arg_nt_+ _synname = rule134 arg_nt_+ _firstVisitInfo = rule135 arg_initial_ arg_nextVisits_+ _wrapper_icl = rule136 _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type _lhsIallVisitKinds _lhsImainName _lhsIoptions _quantPP _synlist _synname _t_params _t_type _wrapname arg_initial_ arg_initialv_ arg_nt_+ _wrapper_dcl = rule137 _classPP _inhname _lhsIoptions _quantPP _synname _t_params _t_type _wrapname+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule138 _prodsIsemFunBndDefs _semFunBndDef+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule139 _prodsIsemFunBndTps _semFunBndTp+ _semFunBndDef = rule140 _semFunBndNm _semname+ _semFunBndTp = rule141 _semFunBndNm _sem_tp+ _semFunBndNm = rule142 arg_nt_+ _prodsOinitial = rule143 arg_initial_+ _prodsOallstates = rule144 _allstates+ _lhsOappendMain :: PP_Doc + _lhsOappendMain = rule145 _lhsIwrappers _sem_nt _wr_inh_icl _wr_syn_icl _wrapper_icl arg_nt_+ _lhsOappendCommon :: PP_Doc + _lhsOappendCommon = rule146 _datatype _k_states _lhsIoptions _prodsIt_visits _t_init_icl _t_states_icl+ _addbang = rule147 _lhsIoptions+ _addbangWrap = rule148 ()+ _prodsOnextVisits = rule149 arg_nextVisits_+ _prodsOprevVisits = rule150 arg_prevVisits_+ _prodsOlocalAttrTypes = rule151 _lhsIlocalAttrTypes arg_nt_+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule152 arg_initial_ arg_nt_+ _ntType = rule153 arg_nt_ arg_params_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule154 _prodsIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule155 _prodsIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule156 _prodsIfromToStates+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule157 _prodsIgenProdIO+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule158 _prodsIimports+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule159 _prodsIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule160 _prodsIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule161 _prodsIvisituses+ _prodsOallFromToStates = rule162 _lhsIallFromToStates+ _prodsOallInitStates = rule163 _lhsIallInitStates+ _prodsOallVisitKinds = rule164 _lhsIallVisitKinds+ _prodsOallchildvisit = rule165 _lhsIallchildvisit+ _prodsOavisitdefs = rule166 _lhsIavisitdefs+ _prodsOavisituses = rule167 _lhsIavisituses+ _prodsOconstructorTypeMap = rule168 _lhsIconstructorTypeMap+ _prodsOdclModuleHeader = rule169 _lhsIdclModuleHeader+ _prodsOiclModuleHeader = rule170 _lhsIiclModuleHeader+ _prodsOimportBlocks = rule171 _lhsIimportBlocks+ _prodsOmainFile = rule172 _lhsImainFile+ _prodsOmainName = rule173 _lhsImainName+ _prodsOntType = rule174 _ntType+ _prodsOoptions = rule175 _lhsIoptions+ _prodsOtextBlocks = rule176 _lhsItextBlocks+ __result_ = T_ENonterminal_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminal_s8 v7+ {-# INLINE rule84 #-}+ {-# LINE 58 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule84 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 58 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rename _lhsIoptions+ {-# LINE 1140 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule85 #-}+ {-# LINE 66 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule85 = \ nt_ ->+ {-# LINE 66 "./src-ag/ExecutionPlan2Clean.ag" #-}+ nt_+ {-# LINE 1146 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule86 #-}+ {-# LINE 78 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule86 = \ params_ ->+ {-# LINE 78 "./src-ag/ExecutionPlan2Clean.ag" #-}+ params_+ {-# LINE 1152 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule87 #-}+ {-# LINE 82 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule87 = \ classCtxs_ ->+ {-# LINE 82 "./src-ag/ExecutionPlan2Clean.ag" #-}+ classCtxs_+ {-# LINE 1158 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule88 #-}+ {-# LINE 102 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule88 = \ _hasWrapper _k_states ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) _sem_nt _t_init_icl _t_states_icl _wr_inh_icl _wr_syn_icl _wrapper_icl nt_ ->+ {-# LINE 102 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ("// " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')+ >-< (if _hasWrapper+ then "// wrapper"+ >-< _wr_inh_icl+ >-< _wr_syn_icl+ >-< _wrapper_icl+ >-< ""+ else empty)+ >-< (if folds _lhsIoptions+ then "// cata"+ >-< _sem_nt+ >-< ""+ else empty)+ >-< (if semfuns _lhsIoptions+ then "// semantic domain"+ >-< _t_init_icl+ >-< _t_states_icl+ >-< _k_states+ >-< _prodsIsem_prod+ >-< ""+ else empty)+ {-# LINE 1184 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule89 #-}+ {-# LINE 123 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule89 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->+ {-# LINE 123 "./src-ag/ExecutionPlan2Clean.ag" #-}+ nt_ `Set.member` _lhsIwrappers+ {-# LINE 1190 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule90 #-}+ {-# LINE 125 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule90 = \ _datatype _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIsem_prod_tys) :: PP_Doc) ((_prodsIt_visits) :: PP_Doc) _sem_tp _semname _t_init_dcl _t_states_dcl _wr_inh_dcl _wr_syn_dcl _wrapper_dcl nt_ ->+ {-# LINE 125 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ("// " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')+ >-< (if dataTypes _lhsIoptions+ then "// data"+ >-< _datatype+ >-< ""+ else empty)+ >-< (if _hasWrapper+ then "// wrapper"+ >-< _wr_inh_dcl+ >-< _wr_syn_dcl+ >-< _wrapper_dcl+ >-< ""+ else empty)+ >-< (if folds _lhsIoptions+ then "// cata"+ >-< _semname >#< "::" >#< _sem_tp+ >-< ""+ else empty)+ >-< (if semfuns _lhsIoptions+ then "// semantic domain"+ >-< _t_init_dcl+ >-< _t_states_dcl+ >-< _prodsIt_visits+ >-< _prodsIsem_prod_tys+ >-< ""+ else empty)+ {-# LINE 1221 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule91 #-}+ {-# LINE 163 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule91 = \ classCtxs_ ->+ {-# LINE 163 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppClasses $ classCtxsToDocs classCtxs_+ {-# LINE 1227 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule92 #-}+ {-# LINE 164 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule92 = \ _classPP _t_params nt_ ->+ {-# LINE 164 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "::" >#< _classPP >#< nt_ >#< _t_params >#< ":=="+ {-# LINE 1233 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule93 #-}+ {-# LINE 165 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule93 = \ _aliasPre _classPP _derivings ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) ((_prodsIrecordtype) :: PP_Doc) _t_params nt_ ->+ {-# LINE 165 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case lookup nt_ _lhsItypeSyns of+ Nothing -> "::" >#< _classPP >#< nt_ >#< _t_params+ >-< ( if null _prodsIdatatype+ then empty+ else if isRecordConstructor nt_ _lhsIconstructorTypeMap+ then indent 2 $ "=" >#< _prodsIrecordtype+ else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)+ : (map ("|" >#<) $ tail _prodsIdatatype))+ )+ >-< indent 2 _derivings+ Just (List t) -> _aliasPre >#< "[" >#< show t >#< "]"+ Just (Maybe t) -> _aliasPre >#< "Data.Maybe" >#< pp_parens (show t)+ Just (Tuple ts) -> _aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)+ Just (Either l r) -> _aliasPre >#< "Data.Either" >#< pp_parens (show l) >#< pp_parens (show r)+ Just (Map k v) -> _aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< pp_parens (show v)+ Just (IntMap t) -> _aliasPre >#< "Data.IntMap.IntMap" >#< pp_parens (show t)+ Just (OrdSet t) -> _aliasPre >#< "Data.Set.Set" >#< pp_parens (show t)+ Just IntSet -> _aliasPre >#< "Data.IntSet.IntSet"+ {-# LINE 1256 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule94 #-}+ {-# LINE 184 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule94 = \ ((_lhsIderivings) :: Derivings) nt_ ->+ {-# LINE 184 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case Map.lookup nt_ _lhsIderivings of+ Nothing -> empty+ Just s -> if Set.null s+ then empty+ else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)+ {-# LINE 1266 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule95 #-}+ {-# LINE 269 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule95 = \ (_ :: ()) ->+ {-# LINE 269 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> "sem_" ++ show x+ {-# LINE 1272 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule96 #-}+ {-# LINE 270 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule96 = \ _fsemname nt_ ->+ {-# LINE 270 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _fsemname nt_+ {-# LINE 1278 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule97 #-}+ {-# LINE 271 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule97 = \ _fsemname ->+ {-# LINE 271 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \t x -> case t of+ NT nt _ _ -> pp_parens (_fsemname nt >#< x)+ _ -> pp x+ {-# LINE 1286 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule98 #-}+ {-# LINE 277 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule98 = \ _classPP _quantPP _t_params _t_type nt_ ->+ {-# LINE 277 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _quantPP >#< _classPP >#< nt_ >#< _t_params >#< "->" >#< _t_type >#< _t_params+ {-# LINE 1292 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule99 #-}+ {-# LINE 278 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule99 = \ params_ ->+ {-# LINE 278 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppQuants params_+ {-# LINE 1298 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule100 #-}+ {-# LINE 280 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule100 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) ((_prodsIsem_nt) :: PP_Doc) _sem_tp _semname nt_ ->+ {-# LINE 280 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semname >#< "::" >#< _sem_tp+ >-< case lookup nt_ _lhsItypeSyns of+ Nothing -> _prodsIsem_nt+ Just (List t) -> _semname >#< "list" >#< "=" >#< "foldr" >#< _semname >|< "_Cons"+ >#< _semname >|< "_Nil"+ >#< case t of+ NT nt _ _ -> pp_parens ("map" >#< _fsemname nt >#< "list")+ _ -> pp "list"+ Just (Maybe t) -> _semname >#< "'Data.Maybe'.Nothing" >#< "=" >#< _semname >|< "_Nothing"+ >-< _semname >#< pp_parens ("'Data.Maybe'.Just just") >#< "="+ >#< _semname >|< "_Just" >#< _frecarg t "just"+ Just (Tuple ts) -> _semname >#< pp_parens (ppCommas $ map fst ts) >#< "="+ >#< _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)+ Just (Either l r) -> _semname >#< "('Data.Either'.Left left)" >#< "=" >#< _semname >|< "_Left" >#< _frecarg l "left"+ >-< _semname >#< "('Data.Either'.Right right)" >#< "=" >#< _semname >|< "_Right" >#< _frecarg r "right"+ Just (Map k v) -> _semname >#< "m" >#< "=" >#< "'Data.Map'.foldrWithKey"+ >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("'Data.Map'.map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ Just (IntMap v) -> _semname >#< "m" >#< "=" >#< "'Data.IntMap'.foldWithKey"+ >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("'Data.IntMap'.map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ Just (OrdSet t) -> _semname >#< "s" >#< "=" >#< "foldr" >#< _semname >|< "_Entry"+ >#< _semname >|< "_Nil"+ >#< pp_parens (+ ( case t of+ NT nt _ _ -> pp_parens ("map" >#< _fsemname nt)+ _ -> empty+ ) >#< pp_parens ("'Data.IntSet'.elems" >#< "s")+ )+ Just IntSet -> _semname >#< "s" >#< "=" >#< "foldr" >#< _semname >|< "_Entry"+ >#< _semname >|< "_Nil"+ >#< pp_parens ("'Data.IntSet'.elems" >#< "s")+ {-# LINE 1339 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule101 #-}+ {-# LINE 366 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule101 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 366 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1345 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule102 #-}+ {-# LINE 367 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule102 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 367 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1351 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule103 #-}+ {-# LINE 368 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule103 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ {-# LINE 368 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lhsIinhmap+ {-# LINE 1357 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule104 #-}+ {-# LINE 369 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule104 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ {-# LINE 369 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lhsIsynmap+ {-# LINE 1363 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule105 #-}+ {-# LINE 390 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule105 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 390 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits+ {-# LINE 1369 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule106 #-}+ {-# LINE 391 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule106 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 391 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits+ {-# LINE 1375 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule107 #-}+ {-# LINE 392 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule107 = \ _inedges _outedges initial_ ->+ {-# LINE 392 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.insert initial_ $ _inedges `Set.union` _outedges+ {-# LINE 1381 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule108 #-}+ {-# LINE 393 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule108 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 393 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits+ {-# LINE 1387 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule109 #-}+ {-# LINE 394 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule109 = \ nt_ ->+ {-# LINE 394 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "T_" >|< nt_+ {-# LINE 1393 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule110 #-}+ {-# LINE 395 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule110 = \ nt_ ->+ {-# LINE 395 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "t_" >|< nt_+ {-# LINE 1399 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule111 #-}+ {-# LINE 396 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule111 = \ params_ ->+ {-# LINE 396 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced params_+ {-# LINE 1405 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule112 #-}+ {-# LINE 397 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule112 = \ _lt_type _t_init_dcl _t_type ->+ {-# LINE 397 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _t_init_dcl >-<+ "attach_" >|< _t_type >#< pp_parens (_t_type >#< _lt_type ) >#< "=" >#< _lt_type+ {-# LINE 1412 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule113 #-}+ {-# LINE 399 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule113 = \ ((_lhsIoptions) :: Options) _t_params _t_type initial_ ->+ {-# LINE 399 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "::" >#< _t_type >#< _t_params >#< "=" >#< _t_type+ >#<+ pp_parens (+ ppMonadType _lhsIoptions >#< pp_parens (_t_type >|< "_s" >|< initial_ >#< _t_params ))+ {-# LINE 1421 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule114 #-}+ {-# LINE 403 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule114 = \ _allstates nextVisits_ nt_ ->+ {-# LINE 403 "./src-ag/ExecutionPlan2Clean.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ c_st = "C_" >|< nt_st+ inv_st = "inv_" >|< nt_st+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ in case nextVisit of+ NoneVis -> empty+ OneVis vId -> inv_st >#< pp_parens (c_st >#< "x") >#< "=" >#< "x"+ ManyVis -> empty+ ) $ Set.toList _allstates+ {-# LINE 1436 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule115 #-}+ {-# LINE 413 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule115 = \ _allstates _t_params nextVisits_ nt_ ->+ {-# LINE 413 "./src-ag/ExecutionPlan2Clean.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ t_st = "T_" >|< nt_st+ k_st = "K_" >|< nt_st+ c_st = "C_" >|< nt_st+ inv_st = "inv_" >|< nt_st+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ in case nextVisit of+ NoneVis -> "::" >#< t_st >#< _t_params >#< "=" >#< c_st+ OneVis vId -> "::" >#< t_st >#< _t_params >#< "=" >#< c_st >#< (pp_parens (conNmTVisit nt_ vId >#< _t_params ))+ ManyVis -> "::" >#< t_st >#< _t_params >#< "where" >#< c_st >#< "::"+ >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("E.t:" >#< k_st >#< _t_params >#< "t" >#< "->" >#< "t"))+ >#< "->" >#< t_st >#< _t_params+ ) $ Set.toList _allstates+ {-# LINE 1455 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule116 #-}+ {-# LINE 430 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule116 = \ nt_ ->+ {-# LINE 430 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "K_" ++ show nt_+ {-# LINE 1461 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule117 #-}+ {-# LINE 431 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule117 = \ _allstates _k_type ((_prodsIallvisits) :: [VisitStateState]) _t_params _t_type nextVisits_ nt_ ->+ {-# LINE 431 "./src-ag/ExecutionPlan2Clean.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ k_st = "K_" >|< nt_st+ outg = filter (\(v,f,t) -> f == st) _prodsIallvisits+ visitlist = vlist $ map (\(v,f,t) ->+ _k_type >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params >#< pp_parens (_t_type >|< "_v" >|< v >#< _t_params )+ ) outg+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ decl = "::" >#< k_st >#< "k" >#< _t_params >#< "where" >-< indent 3 visitlist+ in case nextVisit of+ NoneVis -> empty+ OneVis _ -> empty+ ManyVis -> decl+ ) $ Set.toList _allstates+ {-# LINE 1480 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule118 #-}+ {-# LINE 499 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule118 = \ _genwrap_icl _wr_inhs ->+ {-# LINE 499 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _genwrap_icl "Inh" _wr_inhs+ {-# LINE 1486 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule119 #-}+ {-# LINE 500 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule119 = \ _genwrap_icl _wr_syns ->+ {-# LINE 500 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _genwrap_icl "Syn" _wr_syns+ {-# LINE 1492 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule120 #-}+ {-# LINE 501 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule120 = \ _addbang nt_ ->+ {-# LINE 501 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \nm attr ->+ let tyConName = nm >|< "_" >|< nt_+ in (let (d, _, _) = foldr (\(i, t) (d, c, n) -> (d >-<+ i >|< "_" >|< tyConName >#< "::" >#< tyConName >#< "->" >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)+ >-< i >|< "_" >|< tyConName >#< pp_parens (tyConName >#< unwords (replicate (n - c - 1) "_" ++ ["x"] ++ replicate c "_")) >#< "= x"+ , c + 1, n)+ ) (empty, 0, length attr) attr+ in d)+ {-# LINE 1505 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule121 #-}+ {-# LINE 509 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule121 = \ _genwrap_dcl _wr_inhs ->+ {-# LINE 509 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _genwrap_dcl "Inh" _wr_inhs+ {-# LINE 1511 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule122 #-}+ {-# LINE 510 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule122 = \ _genwrap_dcl _wr_syns ->+ {-# LINE 510 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _genwrap_dcl "Syn" _wr_syns+ {-# LINE 1517 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule123 #-}+ {-# LINE 511 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule123 = \ _addbang _t_params nt_ ->+ {-# LINE 511 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \nm attr ->+ let tyConName = nm >|< "_" >|< nt_+ in "::" >#< tyConName >#< _t_params >#< "=" >#< tyConName+ >#< (ppSpaced $ map (\(_,t) -> _addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t) attr)+ >-<+ (let (d, _, _) = foldr (\(i, t) (d, c, n) -> (d >-<+ i >|< "_" >|< tyConName >#< "::" >#< tyConName >#< "->" >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)+ , c + 1, n)+ ) (empty, 0, length attr) attr+ in d)+ {-# LINE 1532 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule124 #-}+ {-# LINE 521 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule124 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 521 "./src-ag/ExecutionPlan2Clean.ag" #-}+ fromJust $ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1538 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule125 #-}+ {-# LINE 522 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule125 = \ _synAttrs _wr_filter ->+ {-# LINE 522 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.toList $ _wr_filter $ _synAttrs+ {-# LINE 1544 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule126 #-}+ {-# LINE 523 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule126 = \ _synAttrs ->+ {-# LINE 523 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.toList _synAttrs+ {-# LINE 1550 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule127 #-}+ {-# LINE 524 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule127 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 524 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then Map.delete idLateBindingAttr+ else id+ {-# LINE 1558 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule128 #-}+ {-# LINE 527 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule128 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 527 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1564 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule129 #-}+ {-# LINE 528 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule129 = \ ((_lhsIoptions) :: Options) _wr_inhs ->+ {-# LINE 528 "./src-ag/ExecutionPlan2Clean.ag" #-}+ map (lhsname _lhsIoptions True . fst) _wr_inhs+ {-# LINE 1570 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule130 #-}+ {-# LINE 529 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule130 = \ ((_lhsIoptions) :: Options) _wr_inhs1 ->+ {-# LINE 529 "./src-ag/ExecutionPlan2Clean.ag" #-}+ map (lhsname _lhsIoptions True . fst) _wr_inhs1+ {-# LINE 1576 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule131 #-}+ {-# LINE 530 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule131 = \ ((_lhsIoptions) :: Options) _wr_syns ->+ {-# LINE 530 "./src-ag/ExecutionPlan2Clean.ag" #-}+ map (lhsname _lhsIoptions False . fst) _wr_syns+ {-# LINE 1582 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule132 #-}+ {-# LINE 531 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule132 = \ nt_ ->+ {-# LINE 531 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "wrap_" ++ show nt_+ {-# LINE 1588 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule133 #-}+ {-# LINE 532 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule133 = \ nt_ ->+ {-# LINE 532 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "Inh_" ++ show nt_+ {-# LINE 1594 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule134 #-}+ {-# LINE 533 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule134 = \ nt_ ->+ {-# LINE 533 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "Syn_" ++ show nt_+ {-# LINE 1600 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule135 #-}+ {-# LINE 534 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule135 = \ initial_ nextVisits_ ->+ {-# LINE 534 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault ManyVis initial_ nextVisits_+ {-# LINE 1606 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule136 #-}+ {-# LINE 535 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule136 = \ _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _quantPP _synlist _synname _t_params _t_type _wrapname initial_ initialv_ nt_ ->+ {-# LINE 535 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params+ >#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))+ >-< (_wrapname >#< (_addbang $ pp_parens (_t_type >#< pp "act"))+ >#< (_addbang $ pp_parens (_inhname+ >#< (ppSpaced $ map (_addbangWrap . pp) _inhlist )) >#< "="))+ >-<+ indent 3 (case initialv_ of+ Nothing -> text _synname+ Just initv ->+ let inCon = conNmTVisitIn nt_ initv+ outCon = conNmTVisitOut nt_ initv+ pat = _addbang $ pp_parens $ pat0+ pat0 = outCon >#< ppSpaced _synlist+ arg = inCon >#< ppSpaced _inhlist1+ ind = case _firstVisitInfo of+ NoneVis -> error "wrapper: initial state should have a next visit but it has none"+ OneVis _ -> empty+ ManyVis -> _k_type >|< "_v" >|< initv+ extra = if dummyTokenVisit _lhsIoptions+ then pp $ dummyArg _lhsIoptions True+ else empty+ convert = case Map.lookup initv _lhsIallVisitKinds of+ Just kind -> case kind of+ VisitPure _ -> text "lift"+ VisitMonadic -> empty+ _ -> empty+ unMonad | monadicWrappers _lhsIoptions = empty+ | otherwise = unMon _lhsIoptions+ in unMonad >#< "("+ >-< indent 2+ ("act >>= \\" >#< _addbang (pp "sem") >#< "->"+ >-< "lift" >#< pp_parens arg >#< ">>= \\" >#< _addbangWrap (pp "arg") >#< "->"+ >-< convert >#< pp_parens ("inv_" >|< nt_ >|< "_s" >|< initial_ >#< "sem" >#< ind >#< "arg" >#< extra) >#< ">>= \\" >#< pat >#< "->"+ >-< "lift" >#< pp_parens (_synname >#< ppSpaced _synlist )+ )+ >-< ")" )+ >-< if lateHigherOrderBinding _lhsIoptions+ then indent 2 ("where" >#< lhsname _lhsIoptions True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)+ else empty+ {-# LINE 1650 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule137 #-}+ {-# LINE 575 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule137 = \ _classPP _inhname ((_lhsIoptions) :: Options) _quantPP _synname _t_params _t_type _wrapname ->+ {-# LINE 575 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params+ >#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))+ {-# LINE 1657 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule138 #-}+ {-# LINE 584 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule138 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->+ {-# LINE 584 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semFunBndDef Seq.<| _prodsIsemFunBndDefs+ {-# LINE 1663 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule139 #-}+ {-# LINE 585 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule139 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->+ {-# LINE 585 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semFunBndTp Seq.<| _prodsIsemFunBndTps+ {-# LINE 1669 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule140 #-}+ {-# LINE 586 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule140 = \ _semFunBndNm _semname ->+ {-# LINE 586 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 1675 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule141 #-}+ {-# LINE 587 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule141 = \ _semFunBndNm _sem_tp ->+ {-# LINE 587 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semFunBndNm >#< "::" >#< _sem_tp+ {-# LINE 1681 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule142 #-}+ {-# LINE 588 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule142 = \ nt_ ->+ {-# LINE 588 "./src-ag/ExecutionPlan2Clean.ag" #-}+ lateSemNtLabel nt_+ {-# LINE 1687 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule143 #-}+ {-# LINE 622 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule143 = \ initial_ ->+ {-# LINE 622 "./src-ag/ExecutionPlan2Clean.ag" #-}+ initial_+ {-# LINE 1693 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule144 #-}+ {-# LINE 623 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule144 = \ _allstates ->+ {-# LINE 623 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _allstates+ {-# LINE 1699 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule145 #-}+ {-# LINE 1469 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule145 = \ ((_lhsIwrappers) :: Set NontermIdent) _sem_nt _wr_inh_icl _wr_syn_icl _wrapper_icl nt_ ->+ {-# LINE 1469 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (if nt_ `Set.member` _lhsIwrappers+ then _wr_inh_icl+ >-< _wr_syn_icl+ >-< _wrapper_icl+ else empty)+ >-< _sem_nt+ {-# LINE 1710 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule146 #-}+ {-# LINE 1475 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule146 = \ _datatype _k_states ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init_icl _t_states_icl ->+ {-# LINE 1475 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (if dataTypes _lhsIoptions then _datatype else empty)+ >-< _t_init_icl+ >-< _t_states_icl+ >-< _k_states+ >-< _prodsIt_visits+ {-# LINE 1720 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule147 #-}+ {-# LINE 1566 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule147 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1566 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 1726 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule148 #-}+ {-# LINE 1574 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule148 = \ (_ :: ()) ->+ {-# LINE 1574 "./src-ag/ExecutionPlan2Clean.ag" #-}+ id+ {-# LINE 1732 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule149 #-}+ {-# LINE 1586 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule149 = \ nextVisits_ ->+ {-# LINE 1586 "./src-ag/ExecutionPlan2Clean.ag" #-}+ nextVisits_+ {-# LINE 1738 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule150 #-}+ {-# LINE 1587 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule150 = \ prevVisits_ ->+ {-# LINE 1587 "./src-ag/ExecutionPlan2Clean.ag" #-}+ prevVisits_+ {-# LINE 1744 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule151 #-}+ {-# LINE 1631 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule151 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->+ {-# LINE 1631 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes+ {-# LINE 1750 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule152 #-}+ {-# LINE 1658 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule152 = \ initial_ nt_ ->+ {-# LINE 1658 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton nt_ initial_+ {-# LINE 1756 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule153 #-}+ {-# LINE 1672 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule153 = \ nt_ params_ ->+ {-# LINE 1672 "./src-ag/ExecutionPlan2Clean.ag" #-}+ NT nt_ (map show params_) False+ {-# LINE 1762 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule154 #-}+ rule154 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _prodsIchildvisit+ {-# INLINE rule155 #-}+ rule155 = \ ((_prodsIerrors) :: Seq Error) ->+ _prodsIerrors+ {-# INLINE rule156 #-}+ rule156 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _prodsIfromToStates+ {-# INLINE rule157 #-}+ rule157 = \ ((_prodsIgenProdIO) :: IO ()) ->+ _prodsIgenProdIO+ {-# INLINE rule158 #-}+ rule158 = \ ((_prodsIimports) :: [PP_Doc]) ->+ _prodsIimports+ {-# INLINE rule159 #-}+ rule159 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _prodsIvisitKinds+ {-# INLINE rule160 #-}+ rule160 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _prodsIvisitdefs+ {-# INLINE rule161 #-}+ rule161 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _prodsIvisituses+ {-# INLINE rule162 #-}+ rule162 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule163 #-}+ rule163 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule164 #-}+ rule164 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule165 #-}+ rule165 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule166 #-}+ rule166 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule167 #-}+ rule167 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule168 #-}+ rule168 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule169 #-}+ rule169 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule170 #-}+ rule170 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule171 #-}+ rule171 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule172 #-}+ rule172 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule173 #-}+ rule173 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule174 #-}+ rule174 = \ _ntType ->+ _ntType+ {-# INLINE rule175 #-}+ rule175 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule176 #-}+ rule176 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks++-- ENonterminals -----------------------------------------------+-- wrapper+data Inh_ENonterminals = Inh_ENonterminals { allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), constructorTypeMap_Inh_ENonterminals :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String), derivings_Inh_ENonterminals :: (Derivings), iclModuleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String), importBlocks_Inh_ENonterminals :: (PP_Doc), inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminals :: (String), mainName_Inh_ENonterminals :: (String), options_Inh_ENonterminals :: (Options), synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), textBlocks_Inh_ENonterminals :: (PP_Doc), typeSyns_Inh_ENonterminals :: (TypeSyns), wrappers_Inh_ENonterminals :: (Set NontermIdent) }+data Syn_ENonterminals = Syn_ENonterminals { appendCommon_Syn_ENonterminals :: ([PP_Doc]), appendMain_Syn_ENonterminals :: ([PP_Doc]), childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_ENonterminals :: (Seq Error), fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_ENonterminals :: (IO ()), imports_Syn_ENonterminals :: ([PP_Doc]), initStates_Syn_ENonterminals :: (Map NontermIdent Int), output_Syn_ENonterminals :: (PP_Doc), output_dcl_Syn_ENonterminals :: (PP_Doc), semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_ENonterminals #-}+wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> (Syn_ENonterminals )+wrap_ENonterminals (T_ENonterminals act) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers+ (T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminals_s11 sem arg)+ return (Syn_ENonterminals _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_ENonterminals #-}+sem_ENonterminals :: ENonterminals -> T_ENonterminals +sem_ENonterminals list = Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list)++-- semantic domain+newtype T_ENonterminals = T_ENonterminals {+ attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )+ }+newtype T_ENonterminals_s11 = C_ENonterminals_s11 {+ inv_ENonterminals_s11 :: (T_ENonterminals_v10 )+ }+data T_ENonterminals_s12 = C_ENonterminals_s12+type T_ENonterminals_v10 = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )+data T_ENonterminals_vIn10 = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (Derivings) (String -> String -> String -> Bool -> String) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (Options) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)+data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 ([PP_Doc]) ([PP_Doc]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_ENonterminals_Cons #-}+sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals +sem_ENonterminals_Cons arg_hd_ arg_tl_ = T_ENonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_ENonterminals_v10 + v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let+ _hdX8 = Control.Monad.Identity.runIdentity (attach_T_ENonterminal (arg_hd_))+ _tlX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_tl_))+ (T_ENonterminal_vOut7 _hdIappendCommon _hdIappendMain _hdIchildvisit _hdIerrors _hdIfromToStates _hdIgenProdIO _hdIimports _hdIinitStates _hdIoutput _hdIoutput_dcl _hdIsemFunBndDefs _hdIsemFunBndTps _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_ENonterminal_s8 _hdX8 (T_ENonterminal_vIn7 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOconstructorTypeMap _hdOdclModuleHeader _hdOderivings _hdOiclModuleHeader _hdOimportBlocks _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOoptions _hdOsynmap _hdOtextBlocks _hdOtypeSyns _hdOwrappers)+ (T_ENonterminals_vOut10 _tlIappendCommon _tlIappendMain _tlIchildvisit _tlIerrors _tlIfromToStates _tlIgenProdIO _tlIimports _tlIinitStates _tlIoutput _tlIoutput_dcl _tlIsemFunBndDefs _tlIsemFunBndTps _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_ENonterminals_s11 _tlX11 (T_ENonterminals_vIn10 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOconstructorTypeMap _tlOdclModuleHeader _tlOderivings _tlOiclModuleHeader _tlOimportBlocks _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOoptions _tlOsynmap _tlOtextBlocks _tlOtypeSyns _tlOwrappers)+ _lhsOappendCommon :: [PP_Doc]+ _lhsOappendCommon = rule177 _hdIappendCommon _tlIappendCommon+ _lhsOappendMain :: [PP_Doc]+ _lhsOappendMain = rule178 _hdIappendMain _tlIappendMain+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule179 _hdIchildvisit _tlIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule180 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule181 _hdIfromToStates _tlIfromToStates+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule182 _hdIgenProdIO _tlIgenProdIO+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule183 _hdIimports _tlIimports+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule184 _hdIinitStates _tlIinitStates+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule185 _hdIoutput _tlIoutput+ _lhsOoutput_dcl :: PP_Doc+ _lhsOoutput_dcl = rule186 _hdIoutput_dcl _tlIoutput_dcl+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule187 _hdIsemFunBndDefs _tlIsemFunBndDefs+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule188 _hdIsemFunBndTps _tlIsemFunBndTps+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule189 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule190 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule191 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule192 _lhsIallFromToStates+ _hdOallInitStates = rule193 _lhsIallInitStates+ _hdOallVisitKinds = rule194 _lhsIallVisitKinds+ _hdOallchildvisit = rule195 _lhsIallchildvisit+ _hdOavisitdefs = rule196 _lhsIavisitdefs+ _hdOavisituses = rule197 _lhsIavisituses+ _hdOconstructorTypeMap = rule198 _lhsIconstructorTypeMap+ _hdOdclModuleHeader = rule199 _lhsIdclModuleHeader+ _hdOderivings = rule200 _lhsIderivings+ _hdOiclModuleHeader = rule201 _lhsIiclModuleHeader+ _hdOimportBlocks = rule202 _lhsIimportBlocks+ _hdOinhmap = rule203 _lhsIinhmap+ _hdOlocalAttrTypes = rule204 _lhsIlocalAttrTypes+ _hdOmainFile = rule205 _lhsImainFile+ _hdOmainName = rule206 _lhsImainName+ _hdOoptions = rule207 _lhsIoptions+ _hdOsynmap = rule208 _lhsIsynmap+ _hdOtextBlocks = rule209 _lhsItextBlocks+ _hdOtypeSyns = rule210 _lhsItypeSyns+ _hdOwrappers = rule211 _lhsIwrappers+ _tlOallFromToStates = rule212 _lhsIallFromToStates+ _tlOallInitStates = rule213 _lhsIallInitStates+ _tlOallVisitKinds = rule214 _lhsIallVisitKinds+ _tlOallchildvisit = rule215 _lhsIallchildvisit+ _tlOavisitdefs = rule216 _lhsIavisitdefs+ _tlOavisituses = rule217 _lhsIavisituses+ _tlOconstructorTypeMap = rule218 _lhsIconstructorTypeMap+ _tlOdclModuleHeader = rule219 _lhsIdclModuleHeader+ _tlOderivings = rule220 _lhsIderivings+ _tlOiclModuleHeader = rule221 _lhsIiclModuleHeader+ _tlOimportBlocks = rule222 _lhsIimportBlocks+ _tlOinhmap = rule223 _lhsIinhmap+ _tlOlocalAttrTypes = rule224 _lhsIlocalAttrTypes+ _tlOmainFile = rule225 _lhsImainFile+ _tlOmainName = rule226 _lhsImainName+ _tlOoptions = rule227 _lhsIoptions+ _tlOsynmap = rule228 _lhsIsynmap+ _tlOtextBlocks = rule229 _lhsItextBlocks+ _tlOtypeSyns = rule230 _lhsItypeSyns+ _tlOwrappers = rule231 _lhsIwrappers+ __result_ = T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminals_s11 v10+ {-# INLINE rule177 #-}+ rule177 = \ ((_hdIappendCommon) :: PP_Doc ) ((_tlIappendCommon) :: [PP_Doc]) ->+ _hdIappendCommon : _tlIappendCommon+ {-# INLINE rule178 #-}+ rule178 = \ ((_hdIappendMain) :: PP_Doc ) ((_tlIappendMain) :: [PP_Doc]) ->+ _hdIappendMain : _tlIappendMain+ {-# INLINE rule179 #-}+ rule179 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule180 #-}+ rule180 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule181 #-}+ rule181 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule182 #-}+ rule182 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->+ _hdIgenProdIO >> _tlIgenProdIO+ {-# INLINE rule183 #-}+ rule183 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->+ _hdIimports ++ _tlIimports+ {-# INLINE rule184 #-}+ rule184 = \ ((_hdIinitStates) :: Map NontermIdent Int) ((_tlIinitStates) :: Map NontermIdent Int) ->+ _hdIinitStates `mappend` _tlIinitStates+ {-# INLINE rule185 #-}+ rule185 = \ ((_hdIoutput) :: PP_Doc) ((_tlIoutput) :: PP_Doc) ->+ _hdIoutput >-< _tlIoutput+ {-# INLINE rule186 #-}+ rule186 = \ ((_hdIoutput_dcl) :: PP_Doc) ((_tlIoutput_dcl) :: PP_Doc) ->+ _hdIoutput_dcl >-< _tlIoutput_dcl+ {-# INLINE rule187 #-}+ rule187 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# INLINE rule188 #-}+ rule188 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# INLINE rule189 #-}+ rule189 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule190 #-}+ rule190 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule191 #-}+ rule191 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule192 #-}+ rule192 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule193 #-}+ rule193 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule194 #-}+ rule194 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule195 #-}+ rule195 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule196 #-}+ rule196 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule197 #-}+ rule197 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule198 #-}+ rule198 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule199 #-}+ rule199 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule200 #-}+ rule200 = \ ((_lhsIderivings) :: Derivings) ->+ _lhsIderivings+ {-# INLINE rule201 #-}+ rule201 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule202 #-}+ rule202 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule203 #-}+ rule203 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule204 #-}+ rule204 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule205 #-}+ rule205 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule206 #-}+ rule206 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule207 #-}+ rule207 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule208 #-}+ rule208 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule209 #-}+ rule209 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule210 #-}+ rule210 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule211 #-}+ rule211 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule212 #-}+ rule212 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule213 #-}+ rule213 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule214 #-}+ rule214 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule215 #-}+ rule215 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule216 #-}+ rule216 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule217 #-}+ rule217 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule218 #-}+ rule218 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule219 #-}+ rule219 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule220 #-}+ rule220 = \ ((_lhsIderivings) :: Derivings) ->+ _lhsIderivings+ {-# INLINE rule221 #-}+ rule221 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule222 #-}+ rule222 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule223 #-}+ rule223 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule224 #-}+ rule224 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule225 #-}+ rule225 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule226 #-}+ rule226 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule227 #-}+ rule227 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule228 #-}+ rule228 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule229 #-}+ rule229 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule230 #-}+ rule230 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule231 #-}+ rule231 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_ENonterminals_Nil #-}+sem_ENonterminals_Nil :: T_ENonterminals +sem_ENonterminals_Nil = T_ENonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_ENonterminals_v10 + v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIderivings _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let+ _lhsOappendCommon :: [PP_Doc]+ _lhsOappendCommon = rule232 ()+ _lhsOappendMain :: [PP_Doc]+ _lhsOappendMain = rule233 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule234 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule235 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule236 ()+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule237 ()+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule238 ()+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule239 ()+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule240 ()+ _lhsOoutput_dcl :: PP_Doc+ _lhsOoutput_dcl = rule241 ()+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule242 ()+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule243 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule244 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule245 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule246 ()+ __result_ = T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOoutput_dcl _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminals_s11 v10+ {-# INLINE rule232 #-}+ rule232 = \ (_ :: ()) ->+ []+ {-# INLINE rule233 #-}+ rule233 = \ (_ :: ()) ->+ []+ {-# INLINE rule234 #-}+ rule234 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule235 #-}+ rule235 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule236 #-}+ rule236 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule237 #-}+ rule237 = \ (_ :: ()) ->+ return ()+ {-# INLINE rule238 #-}+ rule238 = \ (_ :: ()) ->+ []+ {-# INLINE rule239 #-}+ rule239 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule240 #-}+ rule240 = \ (_ :: ()) ->+ empty+ {-# INLINE rule241 #-}+ rule241 = \ (_ :: ()) ->+ empty+ {-# INLINE rule242 #-}+ rule242 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule243 #-}+ rule243 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule244 #-}+ rule244 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule245 #-}+ rule245 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule246 #-}+ rule246 = \ (_ :: ()) ->+ Map.empty++-- EProduction -------------------------------------------------+-- wrapper+data Inh_EProduction = Inh_EProduction { allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), allInitStates_Inh_EProduction :: (Map NontermIdent Int), allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allstates_Inh_EProduction :: (Set StateIdentifier), avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), classCtxs_Inh_EProduction :: (ClassContext), constructorTypeMap_Inh_EProduction :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String), importBlocks_Inh_EProduction :: (PP_Doc), inhmap_Inh_EProduction :: (Attributes), initial_Inh_EProduction :: (StateIdentifier), localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProduction :: (String), mainName_Inh_EProduction :: (String), nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), nt_Inh_EProduction :: (NontermIdent), ntType_Inh_EProduction :: (Type), options_Inh_EProduction :: (Options), params_Inh_EProduction :: ([Identifier]), prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), rename_Inh_EProduction :: (Bool), synmap_Inh_EProduction :: (Attributes), textBlocks_Inh_EProduction :: (PP_Doc) }+data Syn_EProduction = Syn_EProduction { allvisits_Syn_EProduction :: ([VisitStateState]), childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), count_Syn_EProduction :: (Int), datatype_Syn_EProduction :: (PP_Doc), errors_Syn_EProduction :: (Seq Error), fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_EProduction :: (IO ()), imports_Syn_EProduction :: ([PP_Doc]), recordtype_Syn_EProduction :: (PP_Doc), semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), semFunBndTps_Syn_EProduction :: (Seq PP_Doc), sem_nt_Syn_EProduction :: (PP_Doc), sem_prod_Syn_EProduction :: (PP_Doc), sem_prod_tys_Syn_EProduction :: (PP_Doc), t_visits_Syn_EProduction :: (PP_Doc), visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_EProduction #-}+wrap_EProduction :: T_EProduction -> Inh_EProduction -> (Syn_EProduction )+wrap_EProduction (T_EProduction act) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks+ (T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProduction_s14 sem arg)+ return (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_EProduction #-}+sem_EProduction :: EProduction -> T_EProduction +sem_EProduction ( EProduction con_ params_ constraints_ rules_ children_ visits_ ) = sem_EProduction_EProduction con_ params_ constraints_ ( sem_ERules rules_ ) ( sem_EChildren children_ ) ( sem_Visits visits_ )++-- semantic domain+newtype T_EProduction = T_EProduction {+ attach_T_EProduction :: Identity (T_EProduction_s14 )+ }+newtype T_EProduction_s14 = C_EProduction_s14 {+ inv_EProduction_s14 :: (T_EProduction_v13 )+ }+data T_EProduction_s15 = C_EProduction_s15+type T_EProduction_v13 = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )+data T_EProduction_vIn13 = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)+data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_EProduction_EProduction #-}+sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules -> T_EChildren -> T_Visits -> T_EProduction +sem_EProduction_EProduction arg_con_ arg_params_ arg_constraints_ arg_rules_ arg_children_ arg_visits_ = T_EProduction (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_EProduction_v13 + v13 = \ (T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let+ _rulesX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_rules_))+ _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_children_))+ _visitsX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_visits_))+ (T_ERules_vOut22 _rulesIerrors _rulesImrules _rulesIruledefs _rulesIruleuses _rulesIsem_rules _rulesIusedArgs) = inv_ERules_s23 _rulesX23 (T_ERules_vIn22 _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOconstructorTypeMap _rulesOdclModuleHeader _rulesOiclModuleHeader _rulesOimportBlocks _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOnt _rulesOoptions _rulesOruleKinds _rulesOsynmap _rulesOtextBlocks _rulesOusageInfo)+ (T_EChildren_vOut4 _childrenIargnamesw _childrenIargpats _childrenIargtps _childrenIchildTypes _childrenIchildintros _childrenIdatatype _childrenIrecfields _childrenIrecordtype _childrenIterminaldefs _childrenIusedArgs) = inv_EChildren_s5 _childrenX5 (T_EChildren_vIn4 _childrenOallInitStates _childrenOcon _childrenOconstructorTypeMap _childrenOdclModuleHeader _childrenOiclModuleHeader _childrenOimportBlocks _childrenOmainFile _childrenOmainName _childrenOnt _childrenOoptions _childrenOtextBlocks)+ (T_Visits_vOut55 _visitsIallvisits _visitsIchildvisit _visitsIerrors _visitsIfromToStates _visitsIintramap _visitsIlazyIntras _visitsIruleKinds _visitsIruleUsage _visitsIsem_visit _visitsIt_visits _visitsIusedArgs _visitsIvisitKinds _visitsIvisitdefs _visitsIvisituses) = inv_Visits_s56 _visitsX56 (T_Visits_vIn55 _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs)+ _childrenOcon = rule247 arg_con_+ _rulesOcon = rule248 arg_con_+ _visitsOcon = rule249 arg_con_+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule250 _childrenIdatatype _classPP1 _lhsInt _lhsIoptions _lhsIrename _quantPP1 arg_con_+ _lhsOrecordtype :: PP_Doc+ _lhsOrecordtype = rule251 _childrenIrecordtype _classPP1 _quantPP1+ _classPP1 = rule252 arg_constraints_+ _quantPP1 = rule253 arg_params_+ _lhsOcount :: Int+ _lhsOcount = rule254 ()+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule255 _childrenIargnamesw _childrenIargpats _childrenIrecfields _lhsIconstructorTypeMap _lhsInt _lhsIrename arg_con_+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule256 _semFunBndDef+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule257 _semFunBndTp+ _semFunBndDef = rule258 _semFunBndNm _semname+ _semFunBndTp = rule259 _semFunBndNm _sem_tp+ _semFunBndNm = rule260 _lhsInt arg_con_+ _t_type = rule261 _lhsInt+ _t_params = rule262 _lhsIparams+ _usedArgs = rule263 _childrenIusedArgs _rulesIusedArgs _visitsIusedArgs+ _args = rule264 _childrenIargpats _usedArgs+ _semname = rule265 _lhsInt arg_con_+ _sem_tp = rule266 _childrenIargtps _classPP2 _quantPP2 _t_params _t_type+ _classPP2 = rule267 _lhsIclassCtxs arg_constraints_+ _quantPP2 = rule268 _lhsIparams arg_params_+ _lhsOsem_prod_tys :: PP_Doc+ _lhsOsem_prod_tys = rule269 _sem_tp _semname+ _sem_prod = rule270 _args _lhsIinitial _mbInitializer _mkSemBody _outerlet _sem_tp _semname _t_type+ _mkSemBody = rule271 ()+ _mbInitializer = rule272 _lhsIoptions+ _outerlet = rule273 _rulesIsem_rules _statefns+ _statefns = rule274 _genstfn _lhsIallstates+ _genstfn = rule275 _addbang _lhsIinitial _lhsInextVisits _lhsInt _lhsIprevVisits _stargs _stks _stvs+ _stargs = rule276 _addbang _childTypes _lazyIntras _lhsIallInhmap _lhsIallSynmap _lhsIoptions _localAttrTypes _visitsIintramap+ _stks = rule277 _lhsInt _stvisits _t_params+ _stvisits = rule278 _visitsIallvisits+ _stvs = rule279 _visitsIsem_visit+ _visitsOmrules = rule280 _rulesImrules+ _visitsOchildintros = rule281 _childrenIchildintros+ _rulesOusageInfo = rule282 _visitsIruleUsage+ _rulesOruleKinds = rule283 _visitsIruleKinds+ _visitsOallintramap = rule284 _visitsIintramap+ _visitsOterminaldefs = rule285 _childrenIterminaldefs+ _visitsOruledefs = rule286 _rulesIruledefs+ _visitsOruleuses = rule287 _rulesIruleuses+ _lazyIntras = rule288 _visitsIlazyIntras+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule289 _moduleName+ _moduleName = rule290 _lhsImainName _suffix+ _suffix = rule291 _lhsInt arg_con_+ _outputfile = rule292 _lhsImainFile _suffix+ _ppMonadImports = rule293 ()+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule294 _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainName _outputfile _ppMonadImports _sem_prod _semname _suffix+ _addbang = rule295 _lhsIoptions+ _childTypes = rule296 _childrenIchildTypes _lhsIntType+ _localAttrTypes = rule297 _lhsIlocalAttrTypes arg_con_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule298 _visitsIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule299 _rulesIerrors _visitsIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule300 _visitsIfromToStates+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule301 _visitsIt_visits+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule302 _visitsIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule303 _visitsIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule304 _visitsIvisituses+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule305 _visitsIallvisits+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule306 _sem_prod+ _rulesOallInhmap = rule307 _lhsIallInhmap+ _rulesOallSynmap = rule308 _lhsIallSynmap+ _rulesOchildTypes = rule309 _childTypes+ _rulesOconstructorTypeMap = rule310 _lhsIconstructorTypeMap+ _rulesOdclModuleHeader = rule311 _lhsIdclModuleHeader+ _rulesOiclModuleHeader = rule312 _lhsIiclModuleHeader+ _rulesOimportBlocks = rule313 _lhsIimportBlocks+ _rulesOinhmap = rule314 _lhsIinhmap+ _rulesOlazyIntras = rule315 _lazyIntras+ _rulesOlocalAttrTypes = rule316 _localAttrTypes+ _rulesOmainFile = rule317 _lhsImainFile+ _rulesOmainName = rule318 _lhsImainName+ _rulesOnt = rule319 _lhsInt+ _rulesOoptions = rule320 _lhsIoptions+ _rulesOsynmap = rule321 _lhsIsynmap+ _rulesOtextBlocks = rule322 _lhsItextBlocks+ _childrenOallInitStates = rule323 _lhsIallInitStates+ _childrenOconstructorTypeMap = rule324 _lhsIconstructorTypeMap+ _childrenOdclModuleHeader = rule325 _lhsIdclModuleHeader+ _childrenOiclModuleHeader = rule326 _lhsIiclModuleHeader+ _childrenOimportBlocks = rule327 _lhsIimportBlocks+ _childrenOmainFile = rule328 _lhsImainFile+ _childrenOmainName = rule329 _lhsImainName+ _childrenOnt = rule330 _lhsInt+ _childrenOoptions = rule331 _lhsIoptions+ _childrenOtextBlocks = rule332 _lhsItextBlocks+ _visitsOallFromToStates = rule333 _lhsIallFromToStates+ _visitsOallInhmap = rule334 _lhsIallInhmap+ _visitsOallInitStates = rule335 _lhsIallInitStates+ _visitsOallSynmap = rule336 _lhsIallSynmap+ _visitsOallVisitKinds = rule337 _lhsIallVisitKinds+ _visitsOallchildvisit = rule338 _lhsIallchildvisit+ _visitsOavisitdefs = rule339 _lhsIavisitdefs+ _visitsOavisituses = rule340 _lhsIavisituses+ _visitsOchildTypes = rule341 _childTypes+ _visitsOinhmap = rule342 _lhsIinhmap+ _visitsOnextVisits = rule343 _lhsInextVisits+ _visitsOnt = rule344 _lhsInt+ _visitsOoptions = rule345 _lhsIoptions+ _visitsOparams = rule346 _lhsIparams+ _visitsOprevVisits = rule347 _lhsIprevVisits+ _visitsOsynmap = rule348 _lhsIsynmap+ __result_ = T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProduction_s14 v13+ {-# INLINE rule247 #-}+ {-# LINE 72 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule247 = \ con_ ->+ {-# LINE 72 "./src-ag/ExecutionPlan2Clean.ag" #-}+ con_+ {-# LINE 2369 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule248 #-}+ {-# LINE 73 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule248 = \ con_ ->+ {-# LINE 73 "./src-ag/ExecutionPlan2Clean.ag" #-}+ con_+ {-# LINE 2375 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule249 #-}+ {-# LINE 74 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule249 = \ con_ ->+ {-# LINE 74 "./src-ag/ExecutionPlan2Clean.ag" #-}+ con_+ {-# LINE 2381 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule250 #-}+ {-# LINE 215 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule250 = \ ((_childrenIdatatype) :: [PP_Doc]) _classPP1 ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _quantPP1 con_ ->+ {-# LINE 215 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _quantPP1 >#< _classPP1+ >#< conname _lhsIrename _lhsInt con_+ >#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype+ {-# LINE 2389 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule251 #-}+ {-# LINE 218 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule251 = \ ((_childrenIrecordtype) :: [PP_Doc]) _classPP1 _quantPP1 ->+ {-# LINE 218 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _quantPP1 >#< _classPP1+ >#< ppConFields True _childrenIrecordtype+ {-# LINE 2396 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule252 #-}+ {-# LINE 220 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule252 = \ constraints_ ->+ {-# LINE 220 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppClasses (classConstrsToDocs constraints_)+ {-# LINE 2402 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule253 #-}+ {-# LINE 221 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule253 = \ params_ ->+ {-# LINE 221 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppQuants params_+ {-# LINE 2408 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule254 #-}+ {-# LINE 320 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule254 = \ (_ :: ()) ->+ {-# LINE 320 "./src-ag/ExecutionPlan2Clean.ag" #-}+ 1+ {-# LINE 2414 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule255 #-}+ {-# LINE 325 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule255 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIargpats) :: [PP_Doc] ) ((_childrenIrecfields) :: [Identifier] ) ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->+ {-# LINE 325 "./src-ag/ExecutionPlan2Clean.ag" #-}+ let lhs = "sem_" >|< _lhsInt+ rhs = "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw+ cnnm = conname _lhsIrename _lhsInt con_+ in if isRecordConstructor _lhsInt _lhsIconstructorTypeMap+ then lhs >#< "{" >#< cnnm >#< "|" >#<+ pp_block "" "" "," (zipWith (\l r -> l >#< "=" >#< r) _childrenIrecfields _childrenIargpats) >#< "}" >#< rhs+ else lhs >#< "(" >#< cnnm >#< ppSpaced _childrenIargpats >#< ")" >#< rhs+ {-# LINE 2426 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule256 #-}+ {-# LINE 591 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule256 = \ _semFunBndDef ->+ {-# LINE 591 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Seq.singleton _semFunBndDef+ {-# LINE 2432 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule257 #-}+ {-# LINE 592 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule257 = \ _semFunBndTp ->+ {-# LINE 592 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Seq.singleton _semFunBndTp+ {-# LINE 2438 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule258 #-}+ {-# LINE 593 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule258 = \ _semFunBndNm _semname ->+ {-# LINE 593 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 2444 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule259 #-}+ {-# LINE 594 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule259 = \ _semFunBndNm _sem_tp ->+ {-# LINE 594 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semFunBndNm >#< "::" >#< _sem_tp+ {-# LINE 2450 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule260 #-}+ {-# LINE 595 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule260 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 595 "./src-ag/ExecutionPlan2Clean.ag" #-}+ lateSemConLabel _lhsInt con_+ {-# LINE 2456 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule261 #-}+ {-# LINE 659 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule261 = \ ((_lhsInt) :: NontermIdent) ->+ {-# LINE 659 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "T_" >|< _lhsInt+ {-# LINE 2462 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule262 #-}+ {-# LINE 660 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule262 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 660 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced _lhsIparams+ {-# LINE 2468 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule263 #-}+ {-# LINE 661 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule263 = \ ((_childrenIusedArgs) :: Set String) ((_rulesIusedArgs) :: Set String) ((_visitsIusedArgs) :: Set String) ->+ {-# LINE 661 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _childrenIusedArgs `Set.union` _visitsIusedArgs `Set.union` _rulesIusedArgs+ {-# LINE 2474 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule264 #-}+ {-# LINE 664 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule264 = \ ((_childrenIargpats) :: [PP_Doc] ) _usedArgs ->+ {-# LINE 664 "./src-ag/ExecutionPlan2Clean.ag" #-}+ map (\x -> let (name,arg) = case show x of+ "" -> ("", empty)+ '!':name -> ("arg_" ++ name, "!arg_" >|< name)+ name -> ("arg_" ++ name, "arg_" >|< name)+ in if null name || name `Set.member` _usedArgs+ then arg+ else text "_") _childrenIargpats+ {-# LINE 2486 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule265 #-}+ {-# LINE 671 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule265 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 671 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "sem_" ++ show _lhsInt ++ "_" ++ show con_+ {-# LINE 2492 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule266 #-}+ {-# LINE 672 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule266 = \ ((_childrenIargtps) :: [PP_Doc] ) _classPP2 _quantPP2 _t_params _t_type ->+ {-# LINE 672 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _quantPP2 >#< _classPP2 >#< ppSpaced _childrenIargtps+ >#< (if length _childrenIargtps > 0 then "->" else "")+ >#< _t_type >#< _t_params+ {-# LINE 2500 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule267 #-}+ {-# LINE 675 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule267 = \ ((_lhsIclassCtxs) :: ClassContext) constraints_ ->+ {-# LINE 675 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)+ {-# LINE 2506 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule268 #-}+ {-# LINE 676 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule268 = \ ((_lhsIparams) :: [Identifier]) params_ ->+ {-# LINE 676 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppQuants (_lhsIparams ++ params_)+ {-# LINE 2512 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule269 #-}+ {-# LINE 678 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule269 = \ _sem_tp _semname ->+ {-# LINE 678 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semname >#< " ::" >#< _sem_tp+ {-# LINE 2518 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule270 #-}+ {-# LINE 680 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule270 = \ _args ((_lhsIinitial) :: StateIdentifier) _mbInitializer _mkSemBody _outerlet _sem_tp _semname _t_type ->+ {-# LINE 680 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _semname >#< " ::" >#< _sem_tp+ >-< _mkSemBody (_semname >#< ppSpaced _args >#< "=" >#< _t_type )+ _mbInitializer _outerlet ("lift" >#< "st" >|< _lhsIinitial)+ {-# LINE 2526 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule271 #-}+ {-# LINE 683 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule271 = \ (_ :: ()) ->+ {-# LINE 683 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \prefix mbInit outerlet ret ->+ case mbInit of+ Nothing -> prefix >#< pp_parens ret >#< "where"+ >-< indent 3 outerlet+ Just m -> prefix >#< "(" >#< "do"+ >-< indent 1 (+ m+ >-< "let"+ >-< indent 2 outerlet+ >-< ret )+ >-< indent 1 ")"+ {-# LINE 2542 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule272 #-}+ {-# LINE 695 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule272 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 695 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if parallelInvoke _lhsIoptions+ then (Nothing :: Maybe PP_Doc)+ else Nothing+ {-# LINE 2550 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule273 #-}+ {-# LINE 701 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule273 = \ ((_rulesIsem_rules) :: PP_Doc) _statefns ->+ {-# LINE 701 "./src-ag/ExecutionPlan2Clean.ag" #-}+ vlist _statefns >-< _rulesIsem_rules+ {-# LINE 2556 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule274 #-}+ {-# LINE 702 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule274 = \ _genstfn ((_lhsIallstates) :: Set StateIdentifier) ->+ {-# LINE 702 "./src-ag/ExecutionPlan2Clean.ag" #-}+ map _genstfn $ Set.toList _lhsIallstates+ {-# LINE 2562 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule275 #-}+ {-# LINE 703 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule275 = \ _addbang ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) _stargs _stks _stvs ->+ {-# LINE 703 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits+ prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits+ stNm = "st" >|< st+ lhs = bang stNm >#< "=" >#<+ (+ if st == _lhsIinitial+ then empty+ else "\\" >#< _stargs st >#< "->"+ )+ cCon = "C_" >|< _lhsInt >|< "_s" >|< st+ bang | st == _lhsIinitial = _addbang+ | otherwise = id+ in case nextVisitInfo of+ NoneVis ->+ if st == _lhsIinitial+ then lhs >#< cCon+ else empty+ OneVis vId -> mklet lhs (_stvs st False) (cCon >#< "v" >|< vId)+ ManyVis -> mklet lhs (_stks st >-< _stvs st True) (cCon >#< "k" >|< st)+ {-# LINE 2586 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule276 #-}+ {-# LINE 731 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule276 = \ _addbang _childTypes _lazyIntras ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 731 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap+ in ppSpaced [ let match | str `Set.member` _lazyIntras = pp str+ | otherwise = _addbang (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _localAttrTypes of+ Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerStateTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of+ Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs attrs+ ] >#< dummyPat _lhsIoptions (Map.null attrs)+ {-# LINE 2606 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule277 #-}+ {-# LINE 747 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule277 = \ ((_lhsInt) :: NontermIdent) _stvisits _t_params ->+ {-# LINE 747 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \st -> if null (_stvisits st)+ then empty+ else "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< _t_params >#< "t" >#< "->" >#< "t"+ >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="+ >#< "v" >|< v) $ _stvisits st)+ {-# LINE 2616 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule278 #-}+ {-# LINE 752 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule278 = \ ((_visitsIallvisits) :: [VisitStateState]) ->+ {-# LINE 752 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _visitsIallvisits+ {-# LINE 2622 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule279 #-}+ {-# LINE 753 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule279 = \ ((_visitsIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->+ {-# LINE 753 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]+ {-# LINE 2628 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule280 #-}+ {-# LINE 754 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule280 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ {-# LINE 754 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _rulesImrules+ {-# LINE 2634 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule281 #-}+ {-# LINE 942 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule281 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ {-# LINE 942 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _childrenIchildintros+ {-# LINE 2640 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule282 #-}+ {-# LINE 1277 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule282 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->+ {-# LINE 1277 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _visitsIruleUsage+ {-# LINE 2646 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule283 #-}+ {-# LINE 1292 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule283 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ {-# LINE 1292 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _visitsIruleKinds+ {-# LINE 2652 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule284 #-}+ {-# LINE 1321 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule284 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 1321 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _visitsIintramap+ {-# LINE 2658 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule285 #-}+ {-# LINE 1322 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule285 = \ ((_childrenIterminaldefs) :: Set String) ->+ {-# LINE 1322 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _childrenIterminaldefs+ {-# LINE 2664 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule286 #-}+ {-# LINE 1346 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule286 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->+ {-# LINE 1346 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _rulesIruledefs+ {-# LINE 2670 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule287 #-}+ {-# LINE 1347 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule287 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 1347 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _rulesIruleuses+ {-# LINE 2676 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule288 #-}+ {-# LINE 1401 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule288 = \ ((_visitsIlazyIntras) :: Set String) ->+ {-# LINE 1401 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _visitsIlazyIntras+ {-# LINE 2682 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule289 #-}+ {-# LINE 1486 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule289 = \ _moduleName ->+ {-# LINE 1486 "./src-ag/ExecutionPlan2Clean.ag" #-}+ [pp $ "import " ++ _moduleName ]+ {-# LINE 2688 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule290 #-}+ {-# LINE 1487 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule290 = \ ((_lhsImainName) :: String) _suffix ->+ {-# LINE 1487 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lhsImainName ++ _suffix+ {-# LINE 2694 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule291 #-}+ {-# LINE 1488 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule291 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 1488 "./src-ag/ExecutionPlan2Clean.ag" #-}+ '_' : show _lhsInt ++ ('_' : show con_)+ {-# LINE 2700 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule292 #-}+ {-# LINE 1489 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule292 = \ ((_lhsImainFile) :: String) _suffix ->+ {-# LINE 1489 "./src-ag/ExecutionPlan2Clean.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix )+ {-# LINE 2706 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule293 #-}+ {-# LINE 1490 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule293 = \ (_ :: ()) ->+ {-# LINE 1490 "./src-ag/ExecutionPlan2Clean.ag" #-}+ pp "import qualified Control.Monad.Identity"+ {-# LINE 2712 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule294 #-}+ {-# LINE 1491 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule294 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) _outputfile _ppMonadImports _sem_prod _semname _suffix ->+ {-# LINE 1491 "./src-ag/ExecutionPlan2Clean.ag" #-}+ writeModule _outputfile+ [ pp $ _lhsIiclModuleHeader _lhsImainName _suffix _semname True+ , _lhsIimportBlocks+ , _ppMonadImports+ , pp $ "import " ++ _lhsImainName ++ "_common"+ , _sem_prod+ ]+ {-# LINE 2724 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule295 #-}+ {-# LINE 1567 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule295 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1567 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 2730 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule296 #-}+ {-# LINE 1617 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule296 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->+ {-# LINE 1617 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes+ {-# LINE 2736 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule297 #-}+ {-# LINE 1634 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule297 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->+ {-# LINE 1634 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes+ {-# LINE 2742 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule298 #-}+ rule298 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _visitsIchildvisit+ {-# INLINE rule299 #-}+ rule299 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->+ _rulesIerrors Seq.>< _visitsIerrors+ {-# INLINE rule300 #-}+ rule300 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _visitsIfromToStates+ {-# INLINE rule301 #-}+ rule301 = \ ((_visitsIt_visits) :: PP_Doc) ->+ _visitsIt_visits+ {-# INLINE rule302 #-}+ rule302 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _visitsIvisitKinds+ {-# INLINE rule303 #-}+ rule303 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _visitsIvisitdefs+ {-# INLINE rule304 #-}+ rule304 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _visitsIvisituses+ {-# INLINE rule305 #-}+ rule305 = \ ((_visitsIallvisits) :: [VisitStateState]) ->+ _visitsIallvisits+ {-# INLINE rule306 #-}+ rule306 = \ _sem_prod ->+ _sem_prod+ {-# INLINE rule307 #-}+ rule307 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule308 #-}+ rule308 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule309 #-}+ rule309 = \ _childTypes ->+ _childTypes+ {-# INLINE rule310 #-}+ rule310 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule311 #-}+ rule311 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule312 #-}+ rule312 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule313 #-}+ rule313 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule314 #-}+ rule314 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule315 #-}+ rule315 = \ _lazyIntras ->+ _lazyIntras+ {-# INLINE rule316 #-}+ rule316 = \ _localAttrTypes ->+ _localAttrTypes+ {-# INLINE rule317 #-}+ rule317 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule318 #-}+ rule318 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule319 #-}+ rule319 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule320 #-}+ rule320 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule321 #-}+ rule321 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule322 #-}+ rule322 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule323 #-}+ rule323 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule324 #-}+ rule324 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule325 #-}+ rule325 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule326 #-}+ rule326 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule327 #-}+ rule327 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule328 #-}+ rule328 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule329 #-}+ rule329 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule330 #-}+ rule330 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule331 #-}+ rule331 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule332 #-}+ rule332 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule333 #-}+ rule333 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule334 #-}+ rule334 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule335 #-}+ rule335 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule336 #-}+ rule336 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule337 #-}+ rule337 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule338 #-}+ rule338 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule339 #-}+ rule339 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule340 #-}+ rule340 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule341 #-}+ rule341 = \ _childTypes ->+ _childTypes+ {-# INLINE rule342 #-}+ rule342 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule343 #-}+ rule343 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule344 #-}+ rule344 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule345 #-}+ rule345 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule346 #-}+ rule346 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule347 #-}+ rule347 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule348 #-}+ rule348 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap++-- EProductions ------------------------------------------------+-- wrapper+data Inh_EProductions = Inh_EProductions { allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), allInitStates_Inh_EProductions :: (Map NontermIdent Int), allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allstates_Inh_EProductions :: (Set StateIdentifier), avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), classCtxs_Inh_EProductions :: (ClassContext), constructorTypeMap_Inh_EProductions :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String), importBlocks_Inh_EProductions :: (PP_Doc), inhmap_Inh_EProductions :: (Attributes), initial_Inh_EProductions :: (StateIdentifier), localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProductions :: (String), mainName_Inh_EProductions :: (String), nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), nt_Inh_EProductions :: (NontermIdent), ntType_Inh_EProductions :: (Type), options_Inh_EProductions :: (Options), params_Inh_EProductions :: ([Identifier]), prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), rename_Inh_EProductions :: (Bool), synmap_Inh_EProductions :: (Attributes), textBlocks_Inh_EProductions :: (PP_Doc) }+data Syn_EProductions = Syn_EProductions { allvisits_Syn_EProductions :: ([VisitStateState]), childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), count_Syn_EProductions :: (Int), datatype_Syn_EProductions :: ([PP_Doc]), errors_Syn_EProductions :: (Seq Error), fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_EProductions :: (IO ()), imports_Syn_EProductions :: ([PP_Doc]), recordtype_Syn_EProductions :: (PP_Doc), semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), semFunBndTps_Syn_EProductions :: (Seq PP_Doc), sem_nt_Syn_EProductions :: (PP_Doc), sem_prod_Syn_EProductions :: (PP_Doc), sem_prod_tys_Syn_EProductions :: (PP_Doc), t_visits_Syn_EProductions :: (PP_Doc), visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_EProductions #-}+wrap_EProductions :: T_EProductions -> Inh_EProductions -> (Syn_EProductions )+wrap_EProductions (T_EProductions act) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks+ (T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProductions_s17 sem arg)+ return (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_EProductions #-}+sem_EProductions :: EProductions -> T_EProductions +sem_EProductions list = Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list)++-- semantic domain+newtype T_EProductions = T_EProductions {+ attach_T_EProductions :: Identity (T_EProductions_s17 )+ }+newtype T_EProductions_s17 = C_EProductions_s17 {+ inv_EProductions_s17 :: (T_EProductions_v16 )+ }+data T_EProductions_s18 = C_EProductions_s18+type T_EProductions_v16 = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )+data T_EProductions_vIn16 = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)+data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_EProductions_Cons #-}+sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions +sem_EProductions_Cons arg_hd_ arg_tl_ = T_EProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_EProductions_v16 + v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let+ _hdX14 = Control.Monad.Identity.runIdentity (attach_T_EProduction (arg_hd_))+ _tlX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_tl_))+ (T_EProduction_vOut13 _hdIallvisits _hdIchildvisit _hdIcount _hdIdatatype _hdIerrors _hdIfromToStates _hdIgenProdIO _hdIimports _hdIrecordtype _hdIsemFunBndDefs _hdIsemFunBndTps _hdIsem_nt _hdIsem_prod _hdIsem_prod_tys _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_EProduction_s14 _hdX14 (T_EProduction_vIn13 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOclassCtxs _hdOconstructorTypeMap _hdOdclModuleHeader _hdOiclModuleHeader _hdOimportBlocks _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOprevVisits _hdOrename _hdOsynmap _hdOtextBlocks)+ (T_EProductions_vOut16 _tlIallvisits _tlIchildvisit _tlIcount _tlIdatatype _tlIerrors _tlIfromToStates _tlIgenProdIO _tlIimports _tlIrecordtype _tlIsemFunBndDefs _tlIsemFunBndTps _tlIsem_nt _tlIsem_prod _tlIsem_prod_tys _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_EProductions_s17 _tlX17 (T_EProductions_vIn16 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOclassCtxs _tlOconstructorTypeMap _tlOdclModuleHeader _tlOiclModuleHeader _tlOimportBlocks _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOprevVisits _tlOrename _tlOsynmap _tlOtextBlocks)+ _lhsOrecordtype :: PP_Doc+ _lhsOrecordtype = rule349 _hdIrecordtype+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule350 _hdIallvisits+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule351 _hdIt_visits+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule352 _hdIchildvisit _tlIchildvisit+ _lhsOcount :: Int+ _lhsOcount = rule353 _hdIcount _tlIcount+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule354 _hdIdatatype _tlIdatatype+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule355 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule356 _hdIfromToStates _tlIfromToStates+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule357 _hdIgenProdIO _tlIgenProdIO+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule358 _hdIimports _tlIimports+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule359 _hdIsemFunBndDefs _tlIsemFunBndDefs+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule360 _hdIsemFunBndTps _tlIsemFunBndTps+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule361 _hdIsem_nt _tlIsem_nt+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule362 _hdIsem_prod _tlIsem_prod+ _lhsOsem_prod_tys :: PP_Doc+ _lhsOsem_prod_tys = rule363 _hdIsem_prod_tys _tlIsem_prod_tys+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule364 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule365 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule366 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule367 _lhsIallFromToStates+ _hdOallInhmap = rule368 _lhsIallInhmap+ _hdOallInitStates = rule369 _lhsIallInitStates+ _hdOallSynmap = rule370 _lhsIallSynmap+ _hdOallVisitKinds = rule371 _lhsIallVisitKinds+ _hdOallchildvisit = rule372 _lhsIallchildvisit+ _hdOallstates = rule373 _lhsIallstates+ _hdOavisitdefs = rule374 _lhsIavisitdefs+ _hdOavisituses = rule375 _lhsIavisituses+ _hdOclassCtxs = rule376 _lhsIclassCtxs+ _hdOconstructorTypeMap = rule377 _lhsIconstructorTypeMap+ _hdOdclModuleHeader = rule378 _lhsIdclModuleHeader+ _hdOiclModuleHeader = rule379 _lhsIiclModuleHeader+ _hdOimportBlocks = rule380 _lhsIimportBlocks+ _hdOinhmap = rule381 _lhsIinhmap+ _hdOinitial = rule382 _lhsIinitial+ _hdOlocalAttrTypes = rule383 _lhsIlocalAttrTypes+ _hdOmainFile = rule384 _lhsImainFile+ _hdOmainName = rule385 _lhsImainName+ _hdOnextVisits = rule386 _lhsInextVisits+ _hdOnt = rule387 _lhsInt+ _hdOntType = rule388 _lhsIntType+ _hdOoptions = rule389 _lhsIoptions+ _hdOparams = rule390 _lhsIparams+ _hdOprevVisits = rule391 _lhsIprevVisits+ _hdOrename = rule392 _lhsIrename+ _hdOsynmap = rule393 _lhsIsynmap+ _hdOtextBlocks = rule394 _lhsItextBlocks+ _tlOallFromToStates = rule395 _lhsIallFromToStates+ _tlOallInhmap = rule396 _lhsIallInhmap+ _tlOallInitStates = rule397 _lhsIallInitStates+ _tlOallSynmap = rule398 _lhsIallSynmap+ _tlOallVisitKinds = rule399 _lhsIallVisitKinds+ _tlOallchildvisit = rule400 _lhsIallchildvisit+ _tlOallstates = rule401 _lhsIallstates+ _tlOavisitdefs = rule402 _lhsIavisitdefs+ _tlOavisituses = rule403 _lhsIavisituses+ _tlOclassCtxs = rule404 _lhsIclassCtxs+ _tlOconstructorTypeMap = rule405 _lhsIconstructorTypeMap+ _tlOdclModuleHeader = rule406 _lhsIdclModuleHeader+ _tlOiclModuleHeader = rule407 _lhsIiclModuleHeader+ _tlOimportBlocks = rule408 _lhsIimportBlocks+ _tlOinhmap = rule409 _lhsIinhmap+ _tlOinitial = rule410 _lhsIinitial+ _tlOlocalAttrTypes = rule411 _lhsIlocalAttrTypes+ _tlOmainFile = rule412 _lhsImainFile+ _tlOmainName = rule413 _lhsImainName+ _tlOnextVisits = rule414 _lhsInextVisits+ _tlOnt = rule415 _lhsInt+ _tlOntType = rule416 _lhsIntType+ _tlOoptions = rule417 _lhsIoptions+ _tlOparams = rule418 _lhsIparams+ _tlOprevVisits = rule419 _lhsIprevVisits+ _tlOrename = rule420 _lhsIrename+ _tlOsynmap = rule421 _lhsIsynmap+ _tlOtextBlocks = rule422 _lhsItextBlocks+ __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProductions_s17 v16+ {-# INLINE rule349 #-}+ {-# LINE 224 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule349 = \ ((_hdIrecordtype) :: PP_Doc) ->+ {-# LINE 224 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _hdIrecordtype+ {-# LINE 3038 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule350 #-}+ {-# LINE 385 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule350 = \ ((_hdIallvisits) :: [VisitStateState]) ->+ {-# LINE 385 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _hdIallvisits+ {-# LINE 3044 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule351 #-}+ {-# LINE 450 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule351 = \ ((_hdIt_visits) :: PP_Doc) ->+ {-# LINE 450 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _hdIt_visits+ {-# LINE 3050 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule352 #-}+ rule352 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule353 #-}+ rule353 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->+ _hdIcount + _tlIcount+ {-# INLINE rule354 #-}+ rule354 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->+ _hdIdatatype : _tlIdatatype+ {-# INLINE rule355 #-}+ rule355 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule356 #-}+ rule356 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule357 #-}+ rule357 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->+ _hdIgenProdIO >> _tlIgenProdIO+ {-# INLINE rule358 #-}+ rule358 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->+ _hdIimports ++ _tlIimports+ {-# INLINE rule359 #-}+ rule359 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# INLINE rule360 #-}+ rule360 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# INLINE rule361 #-}+ rule361 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->+ _hdIsem_nt >-< _tlIsem_nt+ {-# INLINE rule362 #-}+ rule362 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->+ _hdIsem_prod >-< _tlIsem_prod+ {-# INLINE rule363 #-}+ rule363 = \ ((_hdIsem_prod_tys) :: PP_Doc) ((_tlIsem_prod_tys) :: PP_Doc) ->+ _hdIsem_prod_tys >-< _tlIsem_prod_tys+ {-# INLINE rule364 #-}+ rule364 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule365 #-}+ rule365 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule366 #-}+ rule366 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule367 #-}+ rule367 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule368 #-}+ rule368 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule369 #-}+ rule369 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule370 #-}+ rule370 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule371 #-}+ rule371 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule372 #-}+ rule372 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule373 #-}+ rule373 = \ ((_lhsIallstates) :: Set StateIdentifier) ->+ _lhsIallstates+ {-# INLINE rule374 #-}+ rule374 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule375 #-}+ rule375 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule376 #-}+ rule376 = \ ((_lhsIclassCtxs) :: ClassContext) ->+ _lhsIclassCtxs+ {-# INLINE rule377 #-}+ rule377 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule378 #-}+ rule378 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule379 #-}+ rule379 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule380 #-}+ rule380 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule381 #-}+ rule381 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule382 #-}+ rule382 = \ ((_lhsIinitial) :: StateIdentifier) ->+ _lhsIinitial+ {-# INLINE rule383 #-}+ rule383 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule384 #-}+ rule384 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule385 #-}+ rule385 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule386 #-}+ rule386 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule387 #-}+ rule387 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule388 #-}+ rule388 = \ ((_lhsIntType) :: Type) ->+ _lhsIntType+ {-# INLINE rule389 #-}+ rule389 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule390 #-}+ rule390 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule391 #-}+ rule391 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule392 #-}+ rule392 = \ ((_lhsIrename) :: Bool) ->+ _lhsIrename+ {-# INLINE rule393 #-}+ rule393 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule395 #-}+ rule395 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule396 #-}+ rule396 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule397 #-}+ rule397 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule398 #-}+ rule398 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule399 #-}+ rule399 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule400 #-}+ rule400 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule401 #-}+ rule401 = \ ((_lhsIallstates) :: Set StateIdentifier) ->+ _lhsIallstates+ {-# INLINE rule402 #-}+ rule402 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule403 #-}+ rule403 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule404 #-}+ rule404 = \ ((_lhsIclassCtxs) :: ClassContext) ->+ _lhsIclassCtxs+ {-# INLINE rule405 #-}+ rule405 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule406 #-}+ rule406 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule407 #-}+ rule407 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule408 #-}+ rule408 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule409 #-}+ rule409 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule410 #-}+ rule410 = \ ((_lhsIinitial) :: StateIdentifier) ->+ _lhsIinitial+ {-# INLINE rule411 #-}+ rule411 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule412 #-}+ rule412 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule413 #-}+ rule413 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule414 #-}+ rule414 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule415 #-}+ rule415 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule416 #-}+ rule416 = \ ((_lhsIntType) :: Type) ->+ _lhsIntType+ {-# INLINE rule417 #-}+ rule417 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule418 #-}+ rule418 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule419 #-}+ rule419 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule420 #-}+ rule420 = \ ((_lhsIrename) :: Bool) ->+ _lhsIrename+ {-# INLINE rule421 #-}+ rule421 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule422 #-}+ rule422 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+{-# NOINLINE sem_EProductions_Nil #-}+sem_EProductions_Nil :: T_EProductions +sem_EProductions_Nil = T_EProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_EProductions_v16 + v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let+ _lhsOrecordtype :: PP_Doc+ _lhsOrecordtype = rule423 ()+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule424 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule425 ()+ _lhsOcount :: Int+ _lhsOcount = rule426 ()+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule427 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule428 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule429 ()+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule430 ()+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule431 ()+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule432 ()+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule433 ()+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule434 ()+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule435 ()+ _lhsOsem_prod_tys :: PP_Doc+ _lhsOsem_prod_tys = rule436 ()+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule437 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule438 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule439 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule440 ()+ __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOrecordtype _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOsem_prod_tys _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProductions_s17 v16+ {-# INLINE rule423 #-}+ {-# LINE 225 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule423 = \ (_ :: ()) ->+ {-# LINE 225 "./src-ag/ExecutionPlan2Clean.ag" #-}+ empty+ {-# LINE 3315 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule424 #-}+ {-# LINE 386 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule424 = \ (_ :: ()) ->+ {-# LINE 386 "./src-ag/ExecutionPlan2Clean.ag" #-}+ error "Every nonterminal should have at least 1 production"+ {-# LINE 3321 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule425 #-}+ rule425 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule426 #-}+ rule426 = \ (_ :: ()) ->+ 0+ {-# INLINE rule427 #-}+ rule427 = \ (_ :: ()) ->+ []+ {-# INLINE rule428 #-}+ rule428 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule429 #-}+ rule429 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule430 #-}+ rule430 = \ (_ :: ()) ->+ return ()+ {-# INLINE rule431 #-}+ rule431 = \ (_ :: ()) ->+ []+ {-# INLINE rule432 #-}+ rule432 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule433 #-}+ rule433 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule434 #-}+ rule434 = \ (_ :: ()) ->+ empty+ {-# INLINE rule435 #-}+ rule435 = \ (_ :: ()) ->+ empty+ {-# INLINE rule436 #-}+ rule436 = \ (_ :: ()) ->+ empty+ {-# INLINE rule437 #-}+ rule437 = \ (_ :: ()) ->+ empty+ {-# INLINE rule438 #-}+ rule438 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule439 #-}+ rule439 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule440 #-}+ rule440 = \ (_ :: ()) ->+ Map.empty++-- ERule -------------------------------------------------------+-- wrapper+data Inh_ERule = Inh_ERule { allInhmap_Inh_ERule :: (Map NontermIdent Attributes), allSynmap_Inh_ERule :: (Map NontermIdent Attributes), childTypes_Inh_ERule :: (Map Identifier Type), con_Inh_ERule :: (ConstructorIdent), constructorTypeMap_Inh_ERule :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String), importBlocks_Inh_ERule :: (PP_Doc), inhmap_Inh_ERule :: (Attributes), lazyIntras_Inh_ERule :: (Set String), localAttrTypes_Inh_ERule :: (Map Identifier Type), mainFile_Inh_ERule :: (String), mainName_Inh_ERule :: (String), nt_Inh_ERule :: (NontermIdent), options_Inh_ERule :: (Options), ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), synmap_Inh_ERule :: (Attributes), textBlocks_Inh_ERule :: (PP_Doc), usageInfo_Inh_ERule :: (Map Identifier Int) }+data Syn_ERule = Syn_ERule { errors_Syn_ERule :: (Seq Error), mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), ruledefs_Syn_ERule :: (Map Identifier (Set String)), ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERule :: (PP_Doc), usedArgs_Syn_ERule :: (Set String) }+{-# INLINABLE wrap_ERule #-}+wrap_ERule :: T_ERule -> Inh_ERule -> (Syn_ERule )+wrap_ERule (T_ERule act) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo+ (T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs) <- return (inv_ERule_s20 sem arg)+ return (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs)+ )++-- cata+{-# INLINE sem_ERule #-}+sem_ERule :: ERule -> T_ERule +sem_ERule ( ERule name_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ mbError_ ) = sem_ERule_ERule name_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ mbError_++-- semantic domain+newtype T_ERule = T_ERule {+ attach_T_ERule :: Identity (T_ERule_s20 )+ }+newtype T_ERule_s20 = C_ERule_s20 {+ inv_ERule_s20 :: (T_ERule_v19 )+ }+data T_ERule_s21 = C_ERule_s21+type T_ERule_v19 = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )+data T_ERule_vIn19 = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)+data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)+{-# NOINLINE sem_ERule_ERule #-}+sem_ERule_ERule :: (Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule +sem_ERule_ERule arg_name_ arg_pattern_ arg_rhs_ _ _ arg_explicit_ arg_pure_ arg_mbError_ = T_ERule (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_ERule_v19 + v19 = \ (T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let+ _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))+ _rhsX29 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))+ (T_Pattern_vOut40 _patternIattrTypes _patternIattrs _patternIcopy _patternIisUnderscore _patternIsem_lhs) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 _patternOallInhmap _patternOallSynmap _patternOanyLazyKind _patternOinhmap _patternOlocalAttrTypes _patternOoptions _patternOsynmap)+ (T_Expression_vOut28 _rhsIattrs _rhsIpos _rhsIsemfunc _rhsItks) = inv_Expression_s29 _rhsX29 (T_Expression_vIn28 _rhsOoptions)+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule441 _usedArgs_augmented_f1 _usedArgs_augmented_syn+ _usedArgs_augmented_f1 = rule442 _rhsIattrs+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule443 _rulecode _used+ _rulecode = rule444 _endpragma _genpragma _lambda _pragma _rhsIpos _rhsIsemfunc+ _pragma = rule445 _rhsIpos+ _endpragma = rule446 _lhsImainFile+ _genpragma = rule447 _haspos _lhsIoptions arg_explicit_+ _haspos = rule448 _rhsIpos+ _lambda = rule449 _argPats _lhsIoptions _rhsIattrs arg_name_+ _argPats = rule450 _addbang1 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIlazyIntras _lhsIlocalAttrTypes _lhsIoptions _rhsIattrs+ _argExprs = rule451 _rhsIattrs+ _stepcode = rule452 _argExprs _lhsIoptions _patternIattrTypes _patternIsem_lhs _rhsIattrs arg_name_ arg_pure_+ _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ _lhsOmrules = rule453 _stepcode arg_name_+ _used = rule454 _lhsIusageInfo arg_name_+ _kinds = rule455 _lhsIruleKinds arg_name_+ _anyLazyKind = rule456 _kinds+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule457 _patternIattrs arg_name_+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule458 _rhsIattrs arg_name_+ _addbang = rule459 _lhsIoptions+ _addbang1 = rule460 _addbang _anyLazyKind+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule461 _used arg_mbError_+ _usedArgs_augmented_syn = rule462 ()+ _patternOallInhmap = rule463 _lhsIallInhmap+ _patternOallSynmap = rule464 _lhsIallSynmap+ _patternOanyLazyKind = rule465 _anyLazyKind+ _patternOinhmap = rule466 _lhsIinhmap+ _patternOlocalAttrTypes = rule467 _lhsIlocalAttrTypes+ _patternOoptions = rule468 _lhsIoptions+ _patternOsynmap = rule469 _lhsIsynmap+ _rhsOoptions = rule470 _lhsIoptions+ __result_ = T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs+ in __result_ )+ in C_ERule_s20 v19+ {-# INLINE rule441 #-}+ rule441 = \ _usedArgs_augmented_f1 _usedArgs_augmented_syn ->+ foldr ($) _usedArgs_augmented_syn [_usedArgs_augmented_f1]+ {-# INLINE rule442 #-}+ rule442 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ Set.union $ Map.keysSet $ Map.mapKeys (\a -> "arg_" ++ a) $ Map.filter isNothing _rhsIattrs+ {-# INLINE rule443 #-}+ {-# LINE 1011 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule443 = \ _rulecode _used ->+ {-# LINE 1011 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if _used == 0+ then empty+ else _rulecode+ {-# LINE 3464 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule444 #-}+ {-# LINE 1014 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule444 = \ _endpragma _genpragma _lambda _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) ->+ {-# LINE 1014 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ( if _genpragma+ then _pragma+ else empty+ )+ >-< _lambda+ >-< indent ((column _rhsIpos - 2) `max` 2)+ ( if _genpragma+ then _pragma >-< _rhsIsemfunc >-< _endpragma+ else _rhsIsemfunc+ )+ {-# LINE 3479 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule445 #-}+ {-# LINE 1026 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule445 = \ ((_rhsIpos) :: Pos) ->+ {-# LINE 1026 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "/*# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#*/"+ {-# LINE 3485 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule446 #-}+ {-# LINE 1027 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule446 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 1027 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppWithLineNr (\ln -> "/*# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#*/")+ {-# LINE 3491 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule447 #-}+ {-# LINE 1028 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule447 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->+ {-# LINE 1028 "./src-ag/ExecutionPlan2Clean.ag" #-}+ genLinePragmas _lhsIoptions && explicit_ && _haspos+ {-# LINE 3497 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule448 #-}+ {-# LINE 1029 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule448 = \ ((_rhsIpos) :: Pos) ->+ {-# LINE 1029 "./src-ag/ExecutionPlan2Clean.ag" #-}+ line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))+ {-# LINE 3503 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule449 #-}+ {-# LINE 1042 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule449 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->+ {-# LINE 1042 "./src-ag/ExecutionPlan2Clean.ag" #-}+ name_ >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "="+ {-# LINE 3509 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule450 #-}+ {-# LINE 1044 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule450 = \ _addbang1 ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlazyIntras) :: Set String) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ {-# LINE 1044 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str+ | otherwise = _addbang1 (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _lhsIlocalAttrTypes of+ Just tp -> pp_parens (pp_parens match)+ Nothing -> match+ Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of+ Just tpDoc -> pp_parens (pp_parens match)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs _rhsIattrs+ ]+ {-# LINE 3528 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule451 #-}+ {-# LINE 1058 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule451 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ {-# LINE 1058 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced [ case mbAttr of+ Nothing -> "arg_" >|< str+ _ -> text str+ | (str,mbAttr) <- Map.assocs _rhsIattrs+ ]+ {-# LINE 3538 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule452 #-}+ {-# LINE 1063 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule452 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIattrTypes) :: PP_Doc) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->+ {-# LINE 1063 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \kind fmtMode -> if kind `compatibleRule` pure_+ then Right $ let oper | pure_ = "="+ | otherwise = "<-"+ decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)+ tp = if pure_ && not (noPerRuleTypeSigs _lhsIoptions)+ then _patternIattrTypes+ else empty+ in fmtDecl pure_ fmtMode (tp >-< decl)+ else Left $ IncompatibleRuleKind name_ kind+ {-# LINE 3552 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule453 #-}+ {-# LINE 1073 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule453 = \ _stepcode name_ ->+ {-# LINE 1073 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ _stepcode+ {-# LINE 3558 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule454 #-}+ {-# LINE 1279 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule454 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->+ {-# LINE 1279 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault 0 name_ _lhsIusageInfo+ {-# LINE 3564 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule455 #-}+ {-# LINE 1295 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule455 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->+ {-# LINE 1295 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault Set.empty name_ _lhsIruleKinds+ {-# LINE 3570 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule456 #-}+ {-# LINE 1296 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule456 = \ _kinds ->+ {-# LINE 1296 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.fold (\k r -> isLazyKind k || r) False _kinds+ {-# LINE 3576 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule457 #-}+ {-# LINE 1342 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule457 = \ ((_patternIattrs) :: Set String) name_ ->+ {-# LINE 1342 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ _patternIattrs+ {-# LINE 3582 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule458 #-}+ {-# LINE 1343 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule458 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->+ {-# LINE 1343 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ _rhsIattrs+ {-# LINE 3588 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule459 #-}+ {-# LINE 1564 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule459 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1564 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 3594 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule460 #-}+ {-# LINE 1575 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule460 = \ _addbang _anyLazyKind ->+ {-# LINE 1575 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if _anyLazyKind then id else _addbang+ {-# LINE 3600 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule461 #-}+ {-# LINE 1681 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule461 = \ _used mbError_ ->+ {-# LINE 1681 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case mbError_ of+ Just e | _used > 0 -> Seq.singleton e+ _ -> Seq.empty+ {-# LINE 3608 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule462 #-}+ rule462 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule463 #-}+ rule463 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule464 #-}+ rule464 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule465 #-}+ rule465 = \ _anyLazyKind ->+ _anyLazyKind+ {-# INLINE rule466 #-}+ rule466 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule467 #-}+ rule467 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule468 #-}+ rule468 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule469 #-}+ rule469 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule470 #-}+ rule470 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- ERules ------------------------------------------------------+-- wrapper+data Inh_ERules = Inh_ERules { allInhmap_Inh_ERules :: (Map NontermIdent Attributes), allSynmap_Inh_ERules :: (Map NontermIdent Attributes), childTypes_Inh_ERules :: (Map Identifier Type), con_Inh_ERules :: (ConstructorIdent), constructorTypeMap_Inh_ERules :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String), importBlocks_Inh_ERules :: (PP_Doc), inhmap_Inh_ERules :: (Attributes), lazyIntras_Inh_ERules :: (Set String), localAttrTypes_Inh_ERules :: (Map Identifier Type), mainFile_Inh_ERules :: (String), mainName_Inh_ERules :: (String), nt_Inh_ERules :: (NontermIdent), options_Inh_ERules :: (Options), ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), synmap_Inh_ERules :: (Attributes), textBlocks_Inh_ERules :: (PP_Doc), usageInfo_Inh_ERules :: (Map Identifier Int) }+data Syn_ERules = Syn_ERules { errors_Syn_ERules :: (Seq Error), mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), ruledefs_Syn_ERules :: (Map Identifier (Set String)), ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERules :: (PP_Doc), usedArgs_Syn_ERules :: (Set String) }+{-# INLINABLE wrap_ERules #-}+wrap_ERules :: T_ERules -> Inh_ERules -> (Syn_ERules )+wrap_ERules (T_ERules act) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo+ (T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs) <- return (inv_ERules_s23 sem arg)+ return (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs)+ )++-- cata+{-# NOINLINE sem_ERules #-}+sem_ERules :: ERules -> T_ERules +sem_ERules list = Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list)++-- semantic domain+newtype T_ERules = T_ERules {+ attach_T_ERules :: Identity (T_ERules_s23 )+ }+newtype T_ERules_s23 = C_ERules_s23 {+ inv_ERules_s23 :: (T_ERules_v22 )+ }+data T_ERules_s24 = C_ERules_s24+type T_ERules_v22 = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )+data T_ERules_vIn22 = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (NontermIdent) (Options) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)+data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)+{-# NOINLINE sem_ERules_Cons #-}+sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules +sem_ERules_Cons arg_hd_ arg_tl_ = T_ERules (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_ERules_v22 + v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let+ _hdX20 = Control.Monad.Identity.runIdentity (attach_T_ERule (arg_hd_))+ _tlX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_tl_))+ (T_ERule_vOut19 _hdIerrors _hdImrules _hdIruledefs _hdIruleuses _hdIsem_rules _hdIusedArgs) = inv_ERule_s20 _hdX20 (T_ERule_vIn19 _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOconstructorTypeMap _hdOdclModuleHeader _hdOiclModuleHeader _hdOimportBlocks _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOnt _hdOoptions _hdOruleKinds _hdOsynmap _hdOtextBlocks _hdOusageInfo)+ (T_ERules_vOut22 _tlIerrors _tlImrules _tlIruledefs _tlIruleuses _tlIsem_rules _tlIusedArgs) = inv_ERules_s23 _tlX23 (T_ERules_vIn22 _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOconstructorTypeMap _tlOdclModuleHeader _tlOiclModuleHeader _tlOimportBlocks _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOnt _tlOoptions _tlOruleKinds _tlOsynmap _tlOtextBlocks _tlOusageInfo)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule471 _hdIerrors _tlIerrors+ _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ _lhsOmrules = rule472 _hdImrules _tlImrules+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule473 _hdIruledefs _tlIruledefs+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule474 _hdIruleuses _tlIruleuses+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule475 _hdIsem_rules _tlIsem_rules+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule476 _hdIusedArgs _tlIusedArgs+ _hdOallInhmap = rule477 _lhsIallInhmap+ _hdOallSynmap = rule478 _lhsIallSynmap+ _hdOchildTypes = rule479 _lhsIchildTypes+ _hdOcon = rule480 _lhsIcon+ _hdOconstructorTypeMap = rule481 _lhsIconstructorTypeMap+ _hdOdclModuleHeader = rule482 _lhsIdclModuleHeader+ _hdOiclModuleHeader = rule483 _lhsIiclModuleHeader+ _hdOimportBlocks = rule484 _lhsIimportBlocks+ _hdOinhmap = rule485 _lhsIinhmap+ _hdOlazyIntras = rule486 _lhsIlazyIntras+ _hdOlocalAttrTypes = rule487 _lhsIlocalAttrTypes+ _hdOmainFile = rule488 _lhsImainFile+ _hdOmainName = rule489 _lhsImainName+ _hdOnt = rule490 _lhsInt+ _hdOoptions = rule491 _lhsIoptions+ _hdOruleKinds = rule492 _lhsIruleKinds+ _hdOsynmap = rule493 _lhsIsynmap+ _hdOtextBlocks = rule494 _lhsItextBlocks+ _hdOusageInfo = rule495 _lhsIusageInfo+ _tlOallInhmap = rule496 _lhsIallInhmap+ _tlOallSynmap = rule497 _lhsIallSynmap+ _tlOchildTypes = rule498 _lhsIchildTypes+ _tlOcon = rule499 _lhsIcon+ _tlOconstructorTypeMap = rule500 _lhsIconstructorTypeMap+ _tlOdclModuleHeader = rule501 _lhsIdclModuleHeader+ _tlOiclModuleHeader = rule502 _lhsIiclModuleHeader+ _tlOimportBlocks = rule503 _lhsIimportBlocks+ _tlOinhmap = rule504 _lhsIinhmap+ _tlOlazyIntras = rule505 _lhsIlazyIntras+ _tlOlocalAttrTypes = rule506 _lhsIlocalAttrTypes+ _tlOmainFile = rule507 _lhsImainFile+ _tlOmainName = rule508 _lhsImainName+ _tlOnt = rule509 _lhsInt+ _tlOoptions = rule510 _lhsIoptions+ _tlOruleKinds = rule511 _lhsIruleKinds+ _tlOsynmap = rule512 _lhsIsynmap+ _tlOtextBlocks = rule513 _lhsItextBlocks+ _tlOusageInfo = rule514 _lhsIusageInfo+ __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs+ in __result_ )+ in C_ERules_s23 v22+ {-# INLINE rule471 #-}+ rule471 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule472 #-}+ rule472 = \ ((_hdImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ((_tlImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _hdImrules `Map.union` _tlImrules+ {-# INLINE rule473 #-}+ rule473 = \ ((_hdIruledefs) :: Map Identifier (Set String)) ((_tlIruledefs) :: Map Identifier (Set String)) ->+ _hdIruledefs `uwSetUnion` _tlIruledefs+ {-# INLINE rule474 #-}+ rule474 = \ ((_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _hdIruleuses `uwMapUnion` _tlIruleuses+ {-# INLINE rule475 #-}+ rule475 = \ ((_hdIsem_rules) :: PP_Doc) ((_tlIsem_rules) :: PP_Doc) ->+ _hdIsem_rules >-< _tlIsem_rules+ {-# INLINE rule476 #-}+ rule476 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule477 #-}+ rule477 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule478 #-}+ rule478 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule479 #-}+ rule479 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule480 #-}+ rule480 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule481 #-}+ rule481 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule482 #-}+ rule482 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule483 #-}+ rule483 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule484 #-}+ rule484 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule485 #-}+ rule485 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule486 #-}+ rule486 = \ ((_lhsIlazyIntras) :: Set String) ->+ _lhsIlazyIntras+ {-# INLINE rule487 #-}+ rule487 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule488 #-}+ rule488 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule489 #-}+ rule489 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule490 #-}+ rule490 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule491 #-}+ rule491 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule492 #-}+ rule492 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _lhsIruleKinds+ {-# INLINE rule493 #-}+ rule493 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule494 #-}+ rule494 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule495 #-}+ rule495 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->+ _lhsIusageInfo+ {-# INLINE rule496 #-}+ rule496 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule497 #-}+ rule497 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule498 #-}+ rule498 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule499 #-}+ rule499 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule500 #-}+ rule500 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule501 #-}+ rule501 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule502 #-}+ rule502 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule503 #-}+ rule503 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule504 #-}+ rule504 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule505 #-}+ rule505 = \ ((_lhsIlazyIntras) :: Set String) ->+ _lhsIlazyIntras+ {-# INLINE rule506 #-}+ rule506 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule507 #-}+ rule507 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule508 #-}+ rule508 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule509 #-}+ rule509 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule510 #-}+ rule510 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule511 #-}+ rule511 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _lhsIruleKinds+ {-# INLINE rule512 #-}+ rule512 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule513 #-}+ rule513 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule514 #-}+ rule514 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->+ _lhsIusageInfo+{-# NOINLINE sem_ERules_Nil #-}+sem_ERules_Nil :: T_ERules +sem_ERules_Nil = T_ERules (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_ERules_v22 + v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsInt _lhsIoptions _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule515 ()+ _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ _lhsOmrules = rule516 ()+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule517 ()+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule518 ()+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule519 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule520 ()+ __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs+ in __result_ )+ in C_ERules_s23 v22+ {-# INLINE rule515 #-}+ rule515 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule516 #-}+ rule516 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule517 #-}+ rule517 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule518 #-}+ rule518 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule519 #-}+ rule519 = \ (_ :: ()) ->+ empty+ {-# INLINE rule520 #-}+ rule520 = \ (_ :: ()) ->+ Set.empty++-- ExecutionPlan -----------------------------------------------+-- wrapper+data Inh_ExecutionPlan = Inh_ExecutionPlan { constructorTypeMap_Inh_ExecutionPlan :: (Map NontermIdent ConstructorType), dclModuleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String), iclModuleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String), importBlocks_Inh_ExecutionPlan :: (PP_Doc), inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainBlocksDoc_Inh_ExecutionPlan :: (PP_Doc), mainFile_Inh_ExecutionPlan :: (String), mainName_Inh_ExecutionPlan :: (String), options_Inh_ExecutionPlan :: (Options), synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc), textBlocks_Inh_ExecutionPlan :: (PP_Doc) }+data Syn_ExecutionPlan = Syn_ExecutionPlan { errors_Syn_ExecutionPlan :: (Seq Error), genIO_Syn_ExecutionPlan :: (IO ()), output_Syn_ExecutionPlan :: (PP_Doc), output_dcl_Syn_ExecutionPlan :: (PP_Doc) }+{-# INLINABLE wrap_ExecutionPlan #-}+wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> (Syn_ExecutionPlan )+wrap_ExecutionPlan (T_ExecutionPlan act) (Inh_ExecutionPlan _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ExecutionPlan_vIn25 _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks+ (T_ExecutionPlan_vOut25 _lhsOerrors _lhsOgenIO _lhsOoutput _lhsOoutput_dcl) <- return (inv_ExecutionPlan_s26 sem arg)+ return (Syn_ExecutionPlan _lhsOerrors _lhsOgenIO _lhsOoutput _lhsOoutput_dcl)+ )++-- cata+{-# INLINE sem_ExecutionPlan #-}+sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan +sem_ExecutionPlan ( ExecutionPlan nonts_ typeSyns_ wrappers_ derivings_ ) = sem_ExecutionPlan_ExecutionPlan ( sem_ENonterminals nonts_ ) typeSyns_ wrappers_ derivings_++-- semantic domain+newtype T_ExecutionPlan = T_ExecutionPlan {+ attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )+ }+newtype T_ExecutionPlan_s26 = C_ExecutionPlan_s26 {+ inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )+ }+data T_ExecutionPlan_s27 = C_ExecutionPlan_s27+type T_ExecutionPlan_v25 = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )+data T_ExecutionPlan_vIn25 = T_ExecutionPlan_vIn25 (Map NontermIdent ConstructorType) (String -> String -> String -> Bool -> String) (String -> String -> String -> Bool -> String) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (PP_Doc) (String) (String) (Options) (Map NontermIdent Attributes) (Map BlockInfo PP_Doc) (PP_Doc)+data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (Seq Error) (IO ()) (PP_Doc) (PP_Doc)+{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}+sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan +sem_ExecutionPlan_ExecutionPlan arg_nonts_ arg_typeSyns_ arg_wrappers_ arg_derivings_ = T_ExecutionPlan (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_ExecutionPlan_v25 + v25 = \ (T_ExecutionPlan_vIn25 _lhsIconstructorTypeMap _lhsIdclModuleHeader _lhsIiclModuleHeader _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsIoptions _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) -> ( let+ _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_nonts_))+ (T_ENonterminals_vOut10 _nontsIappendCommon _nontsIappendMain _nontsIchildvisit _nontsIerrors _nontsIfromToStates _nontsIgenProdIO _nontsIimports _nontsIinitStates _nontsIoutput _nontsIoutput_dcl _nontsIsemFunBndDefs _nontsIsemFunBndTps _nontsIvisitKinds _nontsIvisitdefs _nontsIvisituses) = inv_ENonterminals_s11 _nontsX11 (T_ENonterminals_vIn10 _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOconstructorTypeMap _nontsOdclModuleHeader _nontsOderivings _nontsOiclModuleHeader _nontsOimportBlocks _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOoptions _nontsOsynmap _nontsOtextBlocks _nontsOtypeSyns _nontsOwrappers)+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule521 _commonExtra _nontsIoutput _wrappersExtra+ _lhsOoutput_dcl :: PP_Doc+ _lhsOoutput_dcl = rule522 _nontsIoutput_dcl+ _nontsOwrappers = rule523 arg_wrappers_+ _nontsOtypeSyns = rule524 arg_typeSyns_+ _nontsOderivings = rule525 arg_derivings_+ _wrappersExtra = rule526 _lateSemBndDef _lhsIoptions+ _commonExtra = rule527 _lateSemBndTp _lhsIoptions+ _lateSemBndTp = rule528 _lhsImainName _nontsIsemFunBndTps+ _lateSemBndDef = rule529 _lhsImainName _nontsIsemFunBndDefs+ _nontsOallchildvisit = rule530 _nontsIchildvisit+ _nontsOavisitdefs = rule531 _nontsIvisitdefs+ _nontsOavisituses = rule532 _nontsIvisituses+ _lhsOgenIO :: IO ()+ _lhsOgenIO = rule533 _genCommonModule _genMainModule _nontsIgenProdIO+ _mainModuleFile = rule534 _lhsImainFile+ _ppMonadImports = rule535 ()+ _genMainModule = rule536 _lhsIiclModuleHeader _lhsImainBlocksDoc _lhsImainName _mainModuleFile _nontsIappendMain _nontsIimports _ppMonadImports _wrappersExtra+ _commonFile = rule537 _lhsImainFile+ _genCommonModule = rule538 _commonExtra _commonFile _lhsIiclModuleHeader _lhsIimportBlocks _lhsImainName _lhsItextBlocks _nontsIappendCommon _ppMonadImports+ _nontsOallFromToStates = rule539 _nontsIfromToStates+ _nontsOallVisitKinds = rule540 _nontsIvisitKinds+ _nontsOallInitStates = rule541 _nontsIinitStates+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule542 _nontsIerrors+ _nontsOconstructorTypeMap = rule543 _lhsIconstructorTypeMap+ _nontsOdclModuleHeader = rule544 _lhsIdclModuleHeader+ _nontsOiclModuleHeader = rule545 _lhsIiclModuleHeader+ _nontsOimportBlocks = rule546 _lhsIimportBlocks+ _nontsOinhmap = rule547 _lhsIinhmap+ _nontsOlocalAttrTypes = rule548 _lhsIlocalAttrTypes+ _nontsOmainFile = rule549 _lhsImainFile+ _nontsOmainName = rule550 _lhsImainName+ _nontsOoptions = rule551 _lhsIoptions+ _nontsOsynmap = rule552 _lhsIsynmap+ _nontsOtextBlocks = rule553 _lhsItextBlocks+ __result_ = T_ExecutionPlan_vOut25 _lhsOerrors _lhsOgenIO _lhsOoutput _lhsOoutput_dcl+ in __result_ )+ in C_ExecutionPlan_s26 v25+ {-# INLINE rule521 #-}+ {-# LINE 91 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule521 = \ _commonExtra ((_nontsIoutput) :: PP_Doc) _wrappersExtra ->+ {-# LINE 91 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIoutput >-< _commonExtra >-< _wrappersExtra+ {-# LINE 3988 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule522 #-}+ {-# LINE 92 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule522 = \ ((_nontsIoutput_dcl) :: PP_Doc) ->+ {-# LINE 92 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIoutput_dcl+ {-# LINE 3994 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule523 #-}+ {-# LINE 99 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule523 = \ wrappers_ ->+ {-# LINE 99 "./src-ag/ExecutionPlan2Clean.ag" #-}+ wrappers_+ {-# LINE 4000 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule524 #-}+ {-# LINE 159 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule524 = \ typeSyns_ ->+ {-# LINE 159 "./src-ag/ExecutionPlan2Clean.ag" #-}+ typeSyns_+ {-# LINE 4006 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule525 #-}+ {-# LINE 160 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule525 = \ derivings_ ->+ {-# LINE 160 "./src-ag/ExecutionPlan2Clean.ag" #-}+ derivings_+ {-# LINE 4012 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule526 #-}+ {-# LINE 599 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule526 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->+ {-# LINE 599 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then _lateSemBndDef+ else empty+ {-# LINE 4020 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule527 #-}+ {-# LINE 602 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule527 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->+ {-# LINE 602 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then _lateSemBndTp+ else empty+ {-# LINE 4028 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule528 #-}+ {-# LINE 605 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule528 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->+ {-# LINE 605 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "::" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)+ {-# LINE 4035 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule529 #-}+ {-# LINE 607 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule529 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) ->+ {-# LINE 607 "./src-ag/ExecutionPlan2Clean.ag" #-}+ lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName+ >-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )+ {-# LINE 4043 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule530 #-}+ {-# LINE 1223 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule530 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ {-# LINE 1223 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIchildvisit+ {-# LINE 4049 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule531 #-}+ {-# LINE 1367 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule531 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ {-# LINE 1367 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIvisitdefs+ {-# LINE 4055 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule532 #-}+ {-# LINE 1368 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule532 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ {-# LINE 1368 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIvisituses+ {-# LINE 4061 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule533 #-}+ {-# LINE 1439 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule533 = \ _genCommonModule _genMainModule ((_nontsIgenProdIO) :: IO ()) ->+ {-# LINE 1439 "./src-ag/ExecutionPlan2Clean.ag" #-}+ do _genMainModule+ _genCommonModule+ _nontsIgenProdIO+ {-# LINE 4069 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule534 #-}+ {-# LINE 1442 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule534 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 1442 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lhsImainFile+ {-# LINE 4075 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule535 #-}+ {-# LINE 1443 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule535 = \ (_ :: ()) ->+ {-# LINE 1443 "./src-ag/ExecutionPlan2Clean.ag" #-}+ pp "import qualified Control.Monad.Identity"+ {-# LINE 4081 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule536 #-}+ {-# LINE 1444 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule536 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) _mainModuleFile ((_nontsIappendMain) :: [PP_Doc]) ((_nontsIimports) :: [PP_Doc]) _ppMonadImports _wrappersExtra ->+ {-# LINE 1444 "./src-ag/ExecutionPlan2Clean.ag" #-}+ writeModule _mainModuleFile+ ( [ pp $ _lhsIiclModuleHeader _lhsImainName "" "" False+ , _ppMonadImports+ , pp $ "import " ++ _lhsImainName ++ "_common"+ ]+ ++ _nontsIimports+ ++ [_lhsImainBlocksDoc]+ ++ [_wrappersExtra ]+ ++ _nontsIappendMain+ )+ {-# LINE 4096 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule537 #-}+ {-# LINE 1454 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule537 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 1454 "./src-ag/ExecutionPlan2Clean.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")+ {-# LINE 4102 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule538 #-}+ {-# LINE 1455 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule538 = \ _commonExtra _commonFile ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsItextBlocks) :: PP_Doc) ((_nontsIappendCommon) :: [PP_Doc]) _ppMonadImports ->+ {-# LINE 1455 "./src-ag/ExecutionPlan2Clean.ag" #-}+ writeModule _commonFile+ ( [ pp $ _lhsIiclModuleHeader _lhsImainName "_common" "" True+ , _ppMonadImports+ , _lhsIimportBlocks+ , _lhsItextBlocks+ , _commonExtra+ ]+ ++ _nontsIappendCommon+ )+ {-# LINE 4116 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule539 #-}+ {-# LINE 1603 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule539 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ {-# LINE 1603 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIfromToStates+ {-# LINE 4122 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule540 #-}+ {-# LINE 1647 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule540 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ {-# LINE 1647 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIvisitKinds+ {-# LINE 4128 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule541 #-}+ {-# LINE 1661 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule541 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->+ {-# LINE 1661 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nontsIinitStates+ {-# LINE 4134 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule542 #-}+ rule542 = \ ((_nontsIerrors) :: Seq Error) ->+ _nontsIerrors+ {-# INLINE rule543 #-}+ rule543 = \ ((_lhsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _lhsIconstructorTypeMap+ {-# INLINE rule544 #-}+ rule544 = \ ((_lhsIdclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIdclModuleHeader+ {-# INLINE rule545 #-}+ rule545 = \ ((_lhsIiclModuleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsIiclModuleHeader+ {-# INLINE rule546 #-}+ rule546 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule547 #-}+ rule547 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule548 #-}+ rule548 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule549 #-}+ rule549 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule550 #-}+ rule550 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule551 #-}+ rule551 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule552 #-}+ rule552 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule553 #-}+ rule553 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks++-- Expression --------------------------------------------------+-- wrapper+data Inh_Expression = Inh_Expression { options_Inh_Expression :: (Options) }+data Syn_Expression = Syn_Expression { attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), pos_Syn_Expression :: (Pos), semfunc_Syn_Expression :: (PP_Doc), tks_Syn_Expression :: ([HsToken]) }+{-# INLINABLE wrap_Expression #-}+wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )+wrap_Expression (T_Expression act) (Inh_Expression _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Expression_vIn28 _lhsIoptions+ (T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks) <- return (inv_Expression_s29 sem arg)+ return (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks)+ )++-- cata+{-# INLINE sem_Expression #-}+sem_Expression :: Expression -> T_Expression +sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_++-- semantic domain+newtype T_Expression = T_Expression {+ attach_T_Expression :: Identity (T_Expression_s29 )+ }+newtype T_Expression_s29 = C_Expression_s29 {+ inv_Expression_s29 :: (T_Expression_v28 )+ }+data T_Expression_s30 = C_Expression_s30+type T_Expression_v28 = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )+data T_Expression_vIn28 = T_Expression_vIn28 (Options)+data T_Expression_vOut28 = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])+{-# NOINLINE sem_Expression_Expression #-}+sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression +sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_Expression_v28 + v28 = \ (T_Expression_vIn28 _lhsIoptions) -> ( let+ _lhsOtks :: [HsToken]+ _lhsOtks = rule554 arg_tks_+ _lhsOpos :: Pos+ _lhsOpos = rule555 arg_pos_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule556 _inhhstoken arg_tks_+ _lhsOsemfunc :: PP_Doc+ _lhsOsemfunc = rule557 _inhhstoken arg_tks_+ _inhhstoken = rule558 _lhsIoptions+ __result_ = T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks+ in __result_ )+ in C_Expression_s29 v28+ {-# INLINE rule554 #-}+ {-# LINE 1077 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule554 = \ tks_ ->+ {-# LINE 1077 "./src-ag/ExecutionPlan2Clean.ag" #-}+ tks_+ {-# LINE 4226 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule555 #-}+ {-# LINE 1120 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule555 = \ pos_ ->+ {-# LINE 1120 "./src-ag/ExecutionPlan2Clean.ag" #-}+ pos_+ {-# LINE 4232 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule556 #-}+ {-# LINE 1207 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule556 = \ _inhhstoken tks_ ->+ {-# LINE 1207 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_+ {-# LINE 4238 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule557 #-}+ {-# LINE 1208 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule557 = \ _inhhstoken tks_ ->+ {-# LINE 1208 "./src-ag/ExecutionPlan2Clean.ag" #-}+ vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_+ {-# LINE 4244 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule558 #-}+ {-# LINE 1209 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule558 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1209 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Inh_HsToken _lhsIoptions+ {-# LINE 4250 "dist/build/ExecutionPlan2Clean.hs"#-}++-- HsToken -----------------------------------------------------+-- wrapper+data Inh_HsToken = Inh_HsToken { options_Inh_HsToken :: (Options) }+data Syn_HsToken = Syn_HsToken { attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), tok_Syn_HsToken :: ((Pos,String)) }+{-# INLINABLE wrap_HsToken #-}+wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )+wrap_HsToken (T_HsToken act) (Inh_HsToken _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsToken_vIn31 _lhsIoptions+ (T_HsToken_vOut31 _lhsOattrs _lhsOtok) <- return (inv_HsToken_s32 sem arg)+ return (Syn_HsToken _lhsOattrs _lhsOtok)+ )++-- cata+{-# NOINLINE sem_HsToken #-}+sem_HsToken :: HsToken -> T_HsToken +sem_HsToken ( AGLocal var_ pos_ rdesc_ ) = sem_HsToken_AGLocal var_ pos_ rdesc_+sem_HsToken ( AGField field_ attr_ pos_ rdesc_ ) = sem_HsToken_AGField field_ attr_ pos_ rdesc_+sem_HsToken ( HsToken value_ pos_ ) = sem_HsToken_HsToken value_ pos_+sem_HsToken ( CharToken value_ pos_ ) = sem_HsToken_CharToken value_ pos_+sem_HsToken ( StrToken value_ pos_ ) = sem_HsToken_StrToken value_ pos_+sem_HsToken ( Err mesg_ pos_ ) = sem_HsToken_Err mesg_ pos_++-- semantic domain+newtype T_HsToken = T_HsToken {+ attach_T_HsToken :: Identity (T_HsToken_s32 )+ }+newtype T_HsToken_s32 = C_HsToken_s32 {+ inv_HsToken_s32 :: (T_HsToken_v31 )+ }+data T_HsToken_s33 = C_HsToken_s33+type T_HsToken_v31 = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )+data T_HsToken_vIn31 = T_HsToken_vIn31 (Options)+data T_HsToken_vOut31 = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))+{-# NOINLINE sem_HsToken_AGLocal #-}+sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken +sem_HsToken_AGLocal arg_var_ arg_pos_ _ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule559 arg_var_+ _tok = rule560 arg_pos_ arg_var_+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule561 _tok+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule559 #-}+ {-# LINE 1166 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule559 = \ var_ ->+ {-# LINE 1166 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton (fieldname var_) Nothing+ {-# LINE 4307 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule560 #-}+ {-# LINE 1412 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule560 = \ pos_ var_ ->+ {-# LINE 1412 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (pos_,fieldname var_)+ {-# LINE 4313 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule561 #-}+ rule561 = \ _tok ->+ _tok+{-# NOINLINE sem_HsToken_AGField #-}+sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken +sem_HsToken_AGField arg_field_ arg_attr_ arg_pos_ arg_rdesc_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _mbAttr = rule562 arg_attr_ arg_field_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule563 _lhsIoptions _mbAttr arg_attr_ arg_field_+ _addTrace = rule564 arg_attr_ arg_field_ arg_rdesc_+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule565 _addTrace _lhsIoptions arg_attr_ arg_field_ arg_pos_+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule562 #-}+ {-# LINE 1167 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule562 = \ attr_ field_ ->+ {-# LINE 1167 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if field_ == _INST || field_ == _FIELD || field_ == _INST'+ then Nothing+ else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_+ {-# LINE 4340 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule563 #-}+ {-# LINE 1170 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule563 = \ ((_lhsIoptions) :: Options) _mbAttr attr_ field_ ->+ {-# LINE 1170 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton (attrname _lhsIoptions True field_ attr_) _mbAttr+ {-# LINE 4346 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule564 #-}+ {-# LINE 1416 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule564 = \ attr_ field_ rdesc_ ->+ {-# LINE 1416 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case rdesc_ of+ Just d -> \x -> "(trace_n " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"+ Nothing -> id+ {-# LINE 4354 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule565 #-}+ {-# LINE 1419 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule565 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->+ {-# LINE 1419 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (pos_, _addTrace $ attrname _lhsIoptions True field_ attr_)+ {-# LINE 4360 "dist/build/ExecutionPlan2Clean.hs"#-}+{-# NOINLINE sem_HsToken_HsToken #-}+sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_HsToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule566 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule567 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule566 #-}+ {-# LINE 1421 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule566 = \ pos_ value_ ->+ {-# LINE 1421 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (pos_, value_)+ {-# LINE 4380 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule567 #-}+ rule567 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_CharToken #-}+sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_CharToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule568 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule569 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule568 #-}+ {-# LINE 1423 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule568 = \ pos_ value_ ->+ {-# LINE 1423 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (pos_, if null value_+ then ""+ else showCharShort (head value_)+ )+ {-# LINE 4406 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule569 #-}+ rule569 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_StrToken #-}+sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_StrToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule570 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule571 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule570 #-}+ {-# LINE 1428 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule570 = \ pos_ value_ ->+ {-# LINE 1428 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (pos_, showStrShort value_)+ {-# LINE 4429 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule571 #-}+ rule571 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_Err #-}+sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken +sem_HsToken_Err _ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule572 arg_pos_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule573 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule572 #-}+ {-# LINE 1429 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule572 = \ pos_ ->+ {-# LINE 1429 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (pos_, "")+ {-# LINE 4452 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule573 #-}+ rule573 = \ (_ :: ()) ->+ Map.empty++-- HsTokens ----------------------------------------------------+-- wrapper+data Inh_HsTokens = Inh_HsTokens { options_Inh_HsTokens :: (Options) }+data Syn_HsTokens = Syn_HsTokens { tks_Syn_HsTokens :: ([(Pos,String)]) }+{-# INLINABLE wrap_HsTokens #-}+wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )+wrap_HsTokens (T_HsTokens act) (Inh_HsTokens _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsTokens_vIn34 _lhsIoptions+ (T_HsTokens_vOut34 _lhsOtks) <- return (inv_HsTokens_s35 sem arg)+ return (Syn_HsTokens _lhsOtks)+ )++-- cata+{-# NOINLINE sem_HsTokens #-}+sem_HsTokens :: HsTokens -> T_HsTokens +sem_HsTokens list = Prelude.foldr sem_HsTokens_Cons sem_HsTokens_Nil (Prelude.map sem_HsToken list)++-- semantic domain+newtype T_HsTokens = T_HsTokens {+ attach_T_HsTokens :: Identity (T_HsTokens_s35 )+ }+newtype T_HsTokens_s35 = C_HsTokens_s35 {+ inv_HsTokens_s35 :: (T_HsTokens_v34 )+ }+data T_HsTokens_s36 = C_HsTokens_s36+type T_HsTokens_v34 = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )+data T_HsTokens_vIn34 = T_HsTokens_vIn34 (Options)+data T_HsTokens_vOut34 = T_HsTokens_vOut34 ([(Pos,String)])+{-# NOINLINE sem_HsTokens_Cons #-}+sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens +sem_HsTokens_Cons arg_hd_ arg_tl_ = T_HsTokens (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_HsTokens_v34 + v34 = \ (T_HsTokens_vIn34 _lhsIoptions) -> ( let+ _hdX32 = Control.Monad.Identity.runIdentity (attach_T_HsToken (arg_hd_))+ _tlX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tl_))+ (T_HsToken_vOut31 _hdIattrs _hdItok) = inv_HsToken_s32 _hdX32 (T_HsToken_vIn31 _hdOoptions)+ (T_HsTokens_vOut34 _tlItks) = inv_HsTokens_s35 _tlX35 (T_HsTokens_vIn34 _tlOoptions)+ _lhsOtks :: [(Pos,String)]+ _lhsOtks = rule574 _hdItok _tlItks+ _hdOoptions = rule575 _lhsIoptions+ _tlOoptions = rule576 _lhsIoptions+ __result_ = T_HsTokens_vOut34 _lhsOtks+ in __result_ )+ in C_HsTokens_s35 v34+ {-# INLINE rule574 #-}+ {-# LINE 1408 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule574 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->+ {-# LINE 1408 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _hdItok : _tlItks+ {-# LINE 4510 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule575 #-}+ rule575 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule576 #-}+ rule576 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_HsTokens_Nil #-}+sem_HsTokens_Nil :: T_HsTokens +sem_HsTokens_Nil = T_HsTokens (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_HsTokens_v34 + v34 = \ (T_HsTokens_vIn34 _lhsIoptions) -> ( let+ _lhsOtks :: [(Pos,String)]+ _lhsOtks = rule577 ()+ __result_ = T_HsTokens_vOut34 _lhsOtks+ in __result_ )+ in C_HsTokens_s35 v34+ {-# INLINE rule577 #-}+ {-# LINE 1409 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule577 = \ (_ :: ()) ->+ {-# LINE 1409 "./src-ag/ExecutionPlan2Clean.ag" #-}+ []+ {-# LINE 4534 "dist/build/ExecutionPlan2Clean.hs"#-}++-- HsTokensRoot ------------------------------------------------+-- wrapper+data Inh_HsTokensRoot = Inh_HsTokensRoot { options_Inh_HsTokensRoot :: (Options) }+data Syn_HsTokensRoot = Syn_HsTokensRoot { }+{-# INLINABLE wrap_HsTokensRoot #-}+wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> (Syn_HsTokensRoot )+wrap_HsTokensRoot (T_HsTokensRoot act) (Inh_HsTokensRoot _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsTokensRoot_vIn37 _lhsIoptions+ (T_HsTokensRoot_vOut37 ) <- return (inv_HsTokensRoot_s38 sem arg)+ return (Syn_HsTokensRoot )+ )++-- cata+{-# INLINE sem_HsTokensRoot #-}+sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot +sem_HsTokensRoot ( HsTokensRoot tokens_ ) = sem_HsTokensRoot_HsTokensRoot ( sem_HsTokens tokens_ )++-- semantic domain+newtype T_HsTokensRoot = T_HsTokensRoot {+ attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )+ }+newtype T_HsTokensRoot_s38 = C_HsTokensRoot_s38 {+ inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )+ }+data T_HsTokensRoot_s39 = C_HsTokensRoot_s39+type T_HsTokensRoot_v37 = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )+data T_HsTokensRoot_vIn37 = T_HsTokensRoot_vIn37 (Options)+data T_HsTokensRoot_vOut37 = T_HsTokensRoot_vOut37 +{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot +sem_HsTokensRoot_HsTokensRoot arg_tokens_ = T_HsTokensRoot (return st38) where+ {-# NOINLINE st38 #-}+ st38 = let+ v37 :: T_HsTokensRoot_v37 + v37 = \ (T_HsTokensRoot_vIn37 _lhsIoptions) -> ( let+ _tokensX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tokens_))+ (T_HsTokens_vOut34 _tokensItks) = inv_HsTokens_s35 _tokensX35 (T_HsTokens_vIn34 _tokensOoptions)+ _tokensOoptions = rule578 _lhsIoptions+ __result_ = T_HsTokensRoot_vOut37 + in __result_ )+ in C_HsTokensRoot_s38 v37+ {-# INLINE rule578 #-}+ rule578 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), anyLazyKind_Inh_Pattern :: (Bool), inhmap_Inh_Pattern :: (Attributes), localAttrTypes_Inh_Pattern :: (Map Identifier Type), options_Inh_Pattern :: (Options), synmap_Inh_Pattern :: (Attributes) }+data Syn_Pattern = Syn_Pattern { attrTypes_Syn_Pattern :: (PP_Doc), attrs_Syn_Pattern :: (Set String), copy_Syn_Pattern :: (Pattern), isUnderscore_Syn_Pattern :: (Bool), sem_lhs_Syn_Pattern :: ( PP_Doc ) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ (T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs) <- return (inv_Pattern_s41 sem arg)+ return (Syn_Pattern _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s41 )+ }+newtype T_Pattern_s41 = C_Pattern_s41 {+ inv_Pattern_s41 :: (T_Pattern_v40 )+ }+data T_Pattern_s42 = C_Pattern_s42+type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )+data T_Pattern_vIn40 = T_Pattern_vIn40 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)+data T_Pattern_vOut40 = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) (Bool) ( PP_Doc )+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule579 _addbang1 _patsIsem_lhs arg_name_+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule580 ()+ _addbang = rule581 _lhsIoptions+ _addbang1 = rule582 _addbang _lhsIanyLazyKind+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule583 _patsIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule584 _patsIattrs+ _copy = rule585 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule586 _copy+ _patsOallInhmap = rule587 _lhsIallInhmap+ _patsOallSynmap = rule588 _lhsIallSynmap+ _patsOanyLazyKind = rule589 _lhsIanyLazyKind+ _patsOinhmap = rule590 _lhsIinhmap+ _patsOlocalAttrTypes = rule591 _lhsIlocalAttrTypes+ _patsOoptions = rule592 _lhsIoptions+ _patsOsynmap = rule593 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule579 #-}+ {-# LINE 1134 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule579 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) name_ ->+ {-# LINE 1134 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _addbang1 $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs+ {-# LINE 4654 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule580 #-}+ {-# LINE 1141 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule580 = \ (_ :: ()) ->+ {-# LINE 1141 "./src-ag/ExecutionPlan2Clean.ag" #-}+ False+ {-# LINE 4660 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule581 #-}+ {-# LINE 1571 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule581 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1571 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4666 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule582 #-}+ {-# LINE 1576 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule582 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->+ {-# LINE 1576 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 4672 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule583 #-}+ rule583 = \ ((_patsIattrTypes) :: PP_Doc) ->+ _patsIattrTypes+ {-# INLINE rule584 #-}+ rule584 = \ ((_patsIattrs) :: Set String) ->+ _patsIattrs+ {-# INLINE rule585 #-}+ rule585 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule586 #-}+ rule586 = \ _copy ->+ _copy+ {-# INLINE rule587 #-}+ rule587 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule588 #-}+ rule588 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule589 #-}+ rule589 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule590 #-}+ rule590 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule591 #-}+ rule591 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule592 #-}+ rule592 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule593 #-}+ rule593 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule594 _addbang1 _patsIsem_lhs+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule595 ()+ _addbang = rule596 _lhsIoptions+ _addbang1 = rule597 _addbang _lhsIanyLazyKind+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule598 _patsIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule599 _patsIattrs+ _copy = rule600 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule601 _copy+ _patsOallInhmap = rule602 _lhsIallInhmap+ _patsOallSynmap = rule603 _lhsIallSynmap+ _patsOanyLazyKind = rule604 _lhsIanyLazyKind+ _patsOinhmap = rule605 _lhsIinhmap+ _patsOlocalAttrTypes = rule606 _lhsIlocalAttrTypes+ _patsOoptions = rule607 _lhsIoptions+ _patsOsynmap = rule608 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule594 #-}+ {-# LINE 1133 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule594 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) ->+ {-# LINE 1133 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _addbang1 $ pp_block "(" ")" "," _patsIsem_lhs+ {-# LINE 4743 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule595 #-}+ {-# LINE 1142 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule595 = \ (_ :: ()) ->+ {-# LINE 1142 "./src-ag/ExecutionPlan2Clean.ag" #-}+ False+ {-# LINE 4749 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule596 #-}+ {-# LINE 1571 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule596 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1571 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4755 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule597 #-}+ {-# LINE 1576 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule597 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->+ {-# LINE 1576 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 4761 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule598 #-}+ rule598 = \ ((_patsIattrTypes) :: PP_Doc) ->+ _patsIattrTypes+ {-# INLINE rule599 #-}+ rule599 = \ ((_patsIattrs) :: Set String) ->+ _patsIattrs+ {-# INLINE rule600 #-}+ rule600 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule601 #-}+ rule601 = \ _copy ->+ _copy+ {-# INLINE rule602 #-}+ rule602 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule603 #-}+ rule603 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule604 #-}+ rule604 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule605 #-}+ rule605 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule606 #-}+ rule606 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule607 #-}+ rule607 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule608 #-}+ rule608 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)+ _varPat = rule609 _lhsIoptions arg_attr_ arg_field_+ _patExpr = rule610 _patIisUnderscore _patIsem_lhs _varPat+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule611 _addbang1 _patExpr+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule612 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule613 _lhsIoptions _patIattrs arg_attr_ arg_field_+ _mbTp = rule614 _lhsIlocalAttrTypes _lhsIsynmap arg_attr_ arg_field_+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule615 ()+ _addbang = rule616 _lhsIoptions+ _addbang1 = rule617 _addbang _lhsIanyLazyKind+ _copy = rule618 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule619 _copy+ _patOallInhmap = rule620 _lhsIallInhmap+ _patOallSynmap = rule621 _lhsIallSynmap+ _patOanyLazyKind = rule622 _lhsIanyLazyKind+ _patOinhmap = rule623 _lhsIinhmap+ _patOlocalAttrTypes = rule624 _lhsIlocalAttrTypes+ _patOoptions = rule625 _lhsIoptions+ _patOsynmap = rule626 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule609 #-}+ {-# LINE 1128 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule609 = \ ((_lhsIoptions) :: Options) attr_ field_ ->+ {-# LINE 1128 "./src-ag/ExecutionPlan2Clean.ag" #-}+ text $ attrname _lhsIoptions False field_ attr_+ {-# LINE 4835 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule610 #-}+ {-# LINE 1129 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule610 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _varPat ->+ {-# LINE 1129 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if _patIisUnderscore+ then _varPat+ else _varPat >|< "@" >|< _patIsem_lhs+ {-# LINE 4843 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule611 #-}+ {-# LINE 1132 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule611 = \ _addbang1 _patExpr ->+ {-# LINE 1132 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _addbang1 _patExpr+ {-# LINE 4849 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule612 #-}+ {-# LINE 1143 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule612 = \ (_ :: ()) ->+ {-# LINE 1143 "./src-ag/ExecutionPlan2Clean.ag" #-}+ False+ {-# LINE 4855 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule613 #-}+ {-# LINE 1149 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule613 = \ ((_lhsIoptions) :: Options) ((_patIattrs) :: Set String) attr_ field_ ->+ {-# LINE 1149 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.insert (attrname _lhsIoptions False field_ attr_) _patIattrs+ {-# LINE 4861 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule614 #-}+ {-# LINE 1154 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule614 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->+ {-# LINE 1154 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if field_ == _LHS+ then Map.lookup attr_ _lhsIsynmap+ else if field_ == _LOC+ then Map.lookup attr_ _lhsIlocalAttrTypes+ else Nothing+ {-# LINE 4871 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule615 #-}+ {-# LINE 1159 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule615 = \ (_ :: ()) ->+ {-# LINE 1159 "./src-ag/ExecutionPlan2Clean.ag" #-}+ empty+ {-# LINE 4877 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule616 #-}+ {-# LINE 1571 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule616 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1571 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4883 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule617 #-}+ {-# LINE 1576 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule617 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->+ {-# LINE 1576 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 4889 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule618 #-}+ rule618 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule619 #-}+ rule619 = \ _copy ->+ _copy+ {-# INLINE rule620 #-}+ rule620 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule621 #-}+ rule621 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule622 #-}+ rule622 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule623 #-}+ rule623 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule624 #-}+ rule624 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule625 #-}+ rule625 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule626 #-}+ rule626 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule627 _patIsem_lhs+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule628 _patIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule629 _patIattrs+ _copy = rule630 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule631 _copy+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule632 _patIisUnderscore+ _patOallInhmap = rule633 _lhsIallInhmap+ _patOallSynmap = rule634 _lhsIallSynmap+ _patOanyLazyKind = rule635 _lhsIanyLazyKind+ _patOinhmap = rule636 _lhsIinhmap+ _patOlocalAttrTypes = rule637 _lhsIlocalAttrTypes+ _patOoptions = rule638 _lhsIoptions+ _patOsynmap = rule639 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule627 #-}+ {-# LINE 1136 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule627 = \ ((_patIsem_lhs) :: PP_Doc ) ->+ {-# LINE 1136 "./src-ag/ExecutionPlan2Clean.ag" #-}+ text "~" >|< pp_parens _patIsem_lhs+ {-# LINE 4952 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule628 #-}+ rule628 = \ ((_patIattrTypes) :: PP_Doc) ->+ _patIattrTypes+ {-# INLINE rule629 #-}+ rule629 = \ ((_patIattrs) :: Set String) ->+ _patIattrs+ {-# INLINE rule630 #-}+ rule630 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule631 #-}+ rule631 = \ _copy ->+ _copy+ {-# INLINE rule632 #-}+ rule632 = \ ((_patIisUnderscore) :: Bool) ->+ _patIisUnderscore+ {-# INLINE rule633 #-}+ rule633 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule634 #-}+ rule634 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule635 #-}+ rule635 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule636 #-}+ rule636 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule637 #-}+ rule637 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule638 #-}+ rule638 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule639 #-}+ rule639 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule640 ()+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule641 ()+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule642 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule643 ()+ _copy = rule644 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule645 _copy+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule640 #-}+ {-# LINE 1135 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule640 = \ (_ :: ()) ->+ {-# LINE 1135 "./src-ag/ExecutionPlan2Clean.ag" #-}+ text "_"+ {-# LINE 5015 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule641 #-}+ {-# LINE 1144 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule641 = \ (_ :: ()) ->+ {-# LINE 1144 "./src-ag/ExecutionPlan2Clean.ag" #-}+ True+ {-# LINE 5021 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule642 #-}+ rule642 = \ (_ :: ()) ->+ empty+ {-# INLINE rule643 #-}+ rule643 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule644 #-}+ rule644 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule645 #-}+ rule645 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), anyLazyKind_Inh_Patterns :: (Bool), inhmap_Inh_Patterns :: (Attributes), localAttrTypes_Inh_Patterns :: (Map Identifier Type), options_Inh_Patterns :: (Options), synmap_Inh_Patterns :: (Attributes) }+data Syn_Patterns = Syn_Patterns { attrTypes_Syn_Patterns :: (PP_Doc), attrs_Syn_Patterns :: (Set String), copy_Syn_Patterns :: (Patterns), sem_lhs_Syn_Patterns :: ([PP_Doc]) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ (T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs) <- return (inv_Patterns_s44 sem arg)+ return (Syn_Patterns _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s44 )+ }+newtype T_Patterns_s44 = C_Patterns_s44 {+ inv_Patterns_s44 :: (T_Patterns_v43 )+ }+data T_Patterns_s45 = C_Patterns_s45+type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )+data T_Patterns_vIn43 = T_Patterns_vIn43 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)+data T_Patterns_vOut43 = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([PP_Doc])+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut40 _hdIattrTypes _hdIattrs _hdIcopy _hdIisUnderscore _hdIsem_lhs) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 _hdOallInhmap _hdOallSynmap _hdOanyLazyKind _hdOinhmap _hdOlocalAttrTypes _hdOoptions _hdOsynmap)+ (T_Patterns_vOut43 _tlIattrTypes _tlIattrs _tlIcopy _tlIsem_lhs) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 _tlOallInhmap _tlOallSynmap _tlOanyLazyKind _tlOinhmap _tlOlocalAttrTypes _tlOoptions _tlOsynmap)+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule646 _hdIattrTypes _tlIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule647 _hdIattrs _tlIattrs+ _lhsOsem_lhs :: [PP_Doc]+ _lhsOsem_lhs = rule648 _hdIsem_lhs _tlIsem_lhs+ _copy = rule649 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule650 _copy+ _hdOallInhmap = rule651 _lhsIallInhmap+ _hdOallSynmap = rule652 _lhsIallSynmap+ _hdOanyLazyKind = rule653 _lhsIanyLazyKind+ _hdOinhmap = rule654 _lhsIinhmap+ _hdOlocalAttrTypes = rule655 _lhsIlocalAttrTypes+ _hdOoptions = rule656 _lhsIoptions+ _hdOsynmap = rule657 _lhsIsynmap+ _tlOallInhmap = rule658 _lhsIallInhmap+ _tlOallSynmap = rule659 _lhsIallSynmap+ _tlOanyLazyKind = rule660 _lhsIanyLazyKind+ _tlOinhmap = rule661 _lhsIinhmap+ _tlOlocalAttrTypes = rule662 _lhsIlocalAttrTypes+ _tlOoptions = rule663 _lhsIoptions+ _tlOsynmap = rule664 _lhsIsynmap+ __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule646 #-}+ rule646 = \ ((_hdIattrTypes) :: PP_Doc) ((_tlIattrTypes) :: PP_Doc) ->+ _hdIattrTypes >-< _tlIattrTypes+ {-# INLINE rule647 #-}+ rule647 = \ ((_hdIattrs) :: Set String) ((_tlIattrs) :: Set String) ->+ _hdIattrs `Set.union` _tlIattrs+ {-# INLINE rule648 #-}+ rule648 = \ ((_hdIsem_lhs) :: PP_Doc ) ((_tlIsem_lhs) :: [PP_Doc]) ->+ _hdIsem_lhs : _tlIsem_lhs+ {-# INLINE rule649 #-}+ rule649 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule650 #-}+ rule650 = \ _copy ->+ _copy+ {-# INLINE rule651 #-}+ rule651 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule652 #-}+ rule652 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule653 #-}+ rule653 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule654 #-}+ rule654 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule655 #-}+ rule655 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule656 #-}+ rule656 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule657 #-}+ rule657 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule658 #-}+ rule658 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule659 #-}+ rule659 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule660 #-}+ rule660 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule661 #-}+ rule661 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule662 #-}+ rule662 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule663 #-}+ rule663 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule664 #-}+ rule664 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule665 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule666 ()+ _lhsOsem_lhs :: [PP_Doc]+ _lhsOsem_lhs = rule667 ()+ _copy = rule668 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule669 _copy+ __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule665 #-}+ rule665 = \ (_ :: ()) ->+ empty+ {-# INLINE rule666 #-}+ rule666 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule667 #-}+ rule667 = \ (_ :: ()) ->+ []+ {-# INLINE rule668 #-}+ rule668 = \ (_ :: ()) ->+ []+ {-# INLINE rule669 #-}+ rule669 = \ _copy ->+ _copy++-- Visit -------------------------------------------------------+-- wrapper+data Inh_Visit = Inh_Visit { allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visit :: (Map NontermIdent Attributes), allInitStates_Inh_Visit :: (Map NontermIdent Int), allSynmap_Inh_Visit :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visit :: (Map Identifier Type), childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visit :: (ConstructorIdent), inhmap_Inh_Visit :: (Attributes), mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), nt_Inh_Visit :: (NontermIdent), options_Inh_Visit :: (Options), params_Inh_Visit :: ([Identifier]), prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visit :: (Map Identifier (Set String)), ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visit :: (Attributes), terminaldefs_Inh_Visit :: (Set String) }+data Syn_Visit = Syn_Visit { allvisits_Syn_Visit :: ( VisitStateState ), childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_Visit :: (Seq Error), fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visit :: (Set String), ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visit :: (Map Identifier Int), sem_visit_Syn_Visit :: ( (StateIdentifier,Bool -> PP_Doc) ), t_visits_Syn_Visit :: (PP_Doc), usedArgs_Syn_Visit :: (Set String), visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_Visit #-}+wrap_Visit :: T_Visit -> Inh_Visit -> (Syn_Visit )+wrap_Visit (T_Visit act) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ (T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visit_s47 sem arg)+ return (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_Visit #-}+sem_Visit :: Visit -> T_Visit +sem_Visit ( Visit ident_ from_ to_ inh_ syn_ steps_ kind_ ) = sem_Visit_Visit ident_ from_ to_ inh_ syn_ ( sem_VisitSteps steps_ ) kind_++-- semantic domain+newtype T_Visit = T_Visit {+ attach_T_Visit :: Identity (T_Visit_s47 )+ }+newtype T_Visit_s47 = C_Visit_s47 {+ inv_Visit_s47 :: (T_Visit_v46 )+ }+data T_Visit_s48 = C_Visit_s48+type T_Visit_v46 = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )+data T_Visit_vIn46 = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)+data T_Visit_vOut46 = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,Bool -> PP_Doc) ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_Visit_Visit #-}+sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps -> (VisitKind) -> T_Visit +sem_Visit_Visit arg_ident_ arg_from_ arg_to_ arg_inh_ arg_syn_ arg_steps_ arg_kind_ = T_Visit (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_Visit_v46 + v46 = \ (T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOruledefs _stepsOruleuses)+ _lhsOallvisits :: VisitStateState + _lhsOallvisits = rule670 arg_from_ arg_ident_ arg_to_+ _nameT_visit = rule671 _lhsInt arg_ident_+ _nameTIn_visit = rule672 _lhsInt arg_ident_+ _nameTOut_visit = rule673 _lhsInt arg_ident_+ _nameTNext_visit = rule674 _lhsInt arg_to_+ _nextVisitInfo = rule675 _lhsInextVisits arg_to_+ _typecon = rule676 _lhsIoptions arg_kind_+ _t_params = rule677 _lhsIparams+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule678 _addbang1 _inhpart _lhsIoptions _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon+ _inhpart = rule679 _lhsIinhmap _ppTypeList arg_inh_+ _synpart = rule680 _lhsIsynmap _ppTypeList arg_syn_+ _ppTypeList = rule681 _addbang1+ _lhsOsem_visit :: (StateIdentifier,Bool -> PP_Doc) + _lhsOsem_visit = rule682 _addbang _inhpats _lhsIoptions _nameTIn_visit _stepsClosing _stepsInitial _stepsIsem_steps arg_from_ arg_ident_+ _stepsInitial = rule683 arg_kind_+ _stepsClosing = rule684 _addbang _nextStBuild _resultval arg_kind_+ _vname = rule685 arg_ident_+ _inhpats = rule686 _lhsIoptions arg_inh_+ _inhargs = rule687 _lhsIoptions arg_inh_+ _synargs = rule688 _lhsIoptions arg_syn_+ _nextargsMp = rule689 _lhsIallintramap arg_to_+ _nextargs = rule690 _nextargsMp+ _nextst = rule691 _lhsIoptions _nextargs _nextargsMp arg_to_+ _resultval = rule692 _nameTOut_visit _nextStRef _synargs+ (_nextStBuild,_nextStRef) = rule693 _addbang _nextVisitInfo _nextst+ _stepsOkind = rule694 arg_kind_+ _stepsOfmtMode = rule695 arg_kind_+ _stepsOindex = rule696 ()+ _prevVisitInfo = rule697 _lhsInextVisits arg_from_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule698 _invokecode arg_ident_+ _invokecode = rule699 _addbang _inhargs _lhsInt _lhsIoptions _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo arg_from_ arg_ident_ arg_kind_ arg_syn_ arg_to_+ _thisintra = rule700 _defsAsMap _nextintra _uses+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule701 _thisintra arg_from_+ _nextintra = rule702 _lhsIallintramap arg_to_+ _uses = rule703 _lhsIoptions _stepsIuses arg_syn_+ _inhVarNms = rule704 _lhsIoptions arg_inh_+ _defs = rule705 _inhVarNms _lhsIterminaldefs _stepsIdefs+ _defsAsMap = rule706 _defs+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule707 arg_ident_ arg_syn_+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule708 arg_ident_ arg_inh_+ _lazyIntrasInh = rule709 _inhVarNms _stepsIdefs arg_kind_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule710 _lazyIntrasInh _stepsIlazyIntras+ _addbang = rule711 _lhsIoptions+ _addbang1 = rule712 _addbang arg_kind_+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule713 arg_from_ arg_ident_ arg_to_+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule714 arg_ident_ arg_kind_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule715 _stepsIerrors+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule716 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule717 _stepsIruleUsage+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule718 _stepsIusedArgs+ _stepsOallFromToStates = rule719 _lhsIallFromToStates+ _stepsOallInitStates = rule720 _lhsIallInitStates+ _stepsOallVisitKinds = rule721 _lhsIallVisitKinds+ _stepsOallchildvisit = rule722 _lhsIallchildvisit+ _stepsOavisitdefs = rule723 _lhsIavisitdefs+ _stepsOavisituses = rule724 _lhsIavisituses+ _stepsOchildTypes = rule725 _lhsIchildTypes+ _stepsOchildintros = rule726 _lhsIchildintros+ _stepsOmrules = rule727 _lhsImrules+ _stepsOoptions = rule728 _lhsIoptions+ _stepsOruledefs = rule729 _lhsIruledefs+ _stepsOruleuses = rule730 _lhsIruleuses+ __result_ = T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visit_s47 v46+ {-# INLINE rule670 #-}+ {-# LINE 382 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule670 = \ from_ ident_ to_ ->+ {-# LINE 382 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (ident_, from_, to_)+ {-# LINE 5316 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule671 #-}+ {-# LINE 453 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule671 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 453 "./src-ag/ExecutionPlan2Clean.ag" #-}+ conNmTVisit _lhsInt ident_+ {-# LINE 5322 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule672 #-}+ {-# LINE 454 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule672 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 454 "./src-ag/ExecutionPlan2Clean.ag" #-}+ conNmTVisitIn _lhsInt ident_+ {-# LINE 5328 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule673 #-}+ {-# LINE 455 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule673 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 455 "./src-ag/ExecutionPlan2Clean.ag" #-}+ conNmTVisitOut _lhsInt ident_+ {-# LINE 5334 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule674 #-}+ {-# LINE 456 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule674 = \ ((_lhsInt) :: NontermIdent) to_ ->+ {-# LINE 456 "./src-ag/ExecutionPlan2Clean.ag" #-}+ conNmTNextVisit _lhsInt to_+ {-# LINE 5340 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule675 #-}+ {-# LINE 458 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule675 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->+ {-# LINE 458 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault ManyVis to_ _lhsInextVisits+ {-# LINE 5346 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule676 #-}+ {-# LINE 459 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule676 = \ ((_lhsIoptions) :: Options) kind_ ->+ {-# LINE 459 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ VisitPure _ -> empty+ VisitMonadic -> ppMonadType _lhsIoptions+ {-# LINE 5354 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule677 #-}+ {-# LINE 463 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule677 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 463 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced _lhsIparams+ {-# LINE 5360 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule678 #-}+ {-# LINE 464 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule678 = \ _addbang1 _inhpart ((_lhsIoptions) :: Options) _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon ->+ {-# LINE 464 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "::" >#< _nameT_visit >#< _t_params >#< ":==" >#<+ pp_parens (_nameTIn_visit >#< _t_params )+ >#< ( if dummyTokenVisit _lhsIoptions+ then "->" >#< dummyType _lhsIoptions True+ else empty+ )+ >#< "->" >#< _typecon >#< pp_parens (_nameTOut_visit >#< _t_params )+ >-< "::" >#< _nameTIn_visit >#< _t_params >#< "=" >#< _nameTIn_visit >#<+ _inhpart+ >-< "::" >#< _nameTOut_visit >#< _t_params >#< "=" >#< _nameTOut_visit >#<+ _synpart >#< case _nextVisitInfo of+ NoneVis -> empty+ _ -> _addbang1 $ pp_parens (_nameTNext_visit >#< _t_params )+ {-# LINE 5378 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule679 #-}+ {-# LINE 478 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule679 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->+ {-# LINE 478 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _ppTypeList inh_ _lhsIinhmap+ {-# LINE 5384 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule680 #-}+ {-# LINE 479 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule680 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->+ {-# LINE 479 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _ppTypeList syn_ _lhsIsynmap+ {-# LINE 5390 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule681 #-}+ {-# LINE 480 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule681 = \ _addbang1 ->+ {-# LINE 480 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \s m -> ppSpaced $ map (\i -> _addbang1 $ pp_parens $ case Map.lookup i m of+ Just tp -> ppTp tp ) $ Set.toList s+ {-# LINE 5397 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule682 #-}+ {-# LINE 773 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule682 = \ _addbang _inhpats ((_lhsIoptions) :: Options) _nameTIn_visit _stepsClosing _stepsInitial ((_stepsIsem_steps) :: PP_Doc) from_ ident_ ->+ {-# LINE 773 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ( from_+ , \_ ->+ "v" >|< ident_ >#< (_addbang $ pp_parens (_nameTIn_visit >#< _inhpats )) >#< "="+ >#< ( if dummyTokenVisit _lhsIoptions+ then pp $ dummyPat _lhsIoptions True+ else empty+ )+ >-< indent 10 (_stepsInitial+ >-< indent 4 _stepsIsem_steps) >-< indent 10 _stepsClosing+ )+ {-# LINE 5412 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule683 #-}+ {-# LINE 791 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule683 = \ kind_ ->+ {-# LINE 791 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ VisitPure False -> text "let"+ VisitPure True -> empty+ VisitMonadic -> text "do"+ {-# LINE 5421 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule684 #-}+ {-# LINE 795 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule684 = \ _addbang _nextStBuild _resultval kind_ ->+ {-# LINE 795 "./src-ag/ExecutionPlan2Clean.ag" #-}+ let decls = _nextStBuild+ >-< _addbang (pp resultValName) >#< "=" >#< _resultval+ in case kind_ of+ VisitPure False -> indent 4 decls+ >-< "in" >#< resultValName+ VisitPure True -> "let" >#< decls+ >-< indent 1 ("in" >#< resultValName)+ VisitMonadic -> "let" >#< decls+ >-< "lift" >#< resultValName+ {-# LINE 5435 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule685 #-}+ {-# LINE 804 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule685 = \ ident_ ->+ {-# LINE 804 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "v" >|< ident_+ {-# LINE 5441 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule686 #-}+ {-# LINE 805 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule686 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 805 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced $ map (\arg -> pp $ attrname _lhsIoptions True _LHS arg) $ Set.toList inh_+ {-# LINE 5447 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule687 #-}+ {-# LINE 806 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule687 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 806 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \chn -> ppSpaced $ map (attrname _lhsIoptions False chn) $ Set.toList inh_+ {-# LINE 5453 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule688 #-}+ {-# LINE 807 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule688 = \ ((_lhsIoptions) :: Options) syn_ ->+ {-# LINE 807 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced $ map (\arg -> attrname _lhsIoptions False _LHS arg) $ Set.toList syn_+ {-# LINE 5459 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule689 #-}+ {-# LINE 808 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule689 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->+ {-# LINE 808 "./src-ag/ExecutionPlan2Clean.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 5465 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule690 #-}+ {-# LINE 809 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule690 = \ _nextargsMp ->+ {-# LINE 809 "./src-ag/ExecutionPlan2Clean.ag" #-}+ ppSpaced $ Map.keys $ _nextargsMp+ {-# LINE 5471 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule691 #-}+ {-# LINE 810 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule691 = \ ((_lhsIoptions) :: Options) _nextargs _nextargsMp to_ ->+ {-# LINE 810 "./src-ag/ExecutionPlan2Clean.ag" #-}+ "st" >|< to_ >#< _nextargs >#< dummyArg _lhsIoptions (Map.null _nextargsMp )+ {-# LINE 5477 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule692 #-}+ {-# LINE 811 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule692 = \ _nameTOut_visit _nextStRef _synargs ->+ {-# LINE 811 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _nameTOut_visit >#< _synargs >#< _nextStRef+ {-# LINE 5483 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule693 #-}+ {-# LINE 813 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule693 = \ _addbang _nextVisitInfo _nextst ->+ {-# LINE 813 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _nextVisitInfo of+ NoneVis -> (empty, empty)+ _ -> (_addbang (pp nextStName) >#< "=" >#< _nextst , pp nextStName)+ {-# LINE 5491 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule694 #-}+ {-# LINE 827 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule694 = \ kind_ ->+ {-# LINE 827 "./src-ag/ExecutionPlan2Clean.ag" #-}+ kind_+ {-# LINE 5497 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule695 #-}+ {-# LINE 868 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule695 = \ kind_ ->+ {-# LINE 868 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ VisitPure False -> FormatLetDecl+ VisitPure True -> FormatLetLine+ VisitMonadic -> FormatDo+ {-# LINE 5506 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule696 #-}+ {-# LINE 917 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule696 = \ (_ :: ()) ->+ {-# LINE 917 "./src-ag/ExecutionPlan2Clean.ag" #-}+ 0+ {-# LINE 5512 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule697 #-}+ {-# LINE 1227 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule697 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->+ {-# LINE 1227 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault ManyVis from_ _lhsInextVisits+ {-# LINE 5518 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule698 #-}+ {-# LINE 1228 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule698 = \ _invokecode ident_ ->+ {-# LINE 1228 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton ident_ _invokecode+ {-# LINE 5524 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule699 #-}+ {-# LINE 1229 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule699 = \ _addbang _inhargs ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo from_ ident_ kind_ syn_ to_ ->+ {-# LINE 1229 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \chn kind ->+ if kind `compatibleKind` kind_+ then Right $+ let pat | isLazyKind kind_ = pat0+ | otherwise = _addbang pat0+ pat0 = pp_parens pat1+ pat1 = _nameTOut_visit >#< (ppSpaced $ map (attrname _lhsIoptions True chn) $ Set.toList syn_)+ >#< cont+ cont = case _nextVisitInfo of+ NoneVis -> empty+ _ -> ch1+ ch0 = text $ stname chn from_+ ch1 = text $ stname chn to_+ expr = case (kind, kind_) of+ (VisitPure _, VisitPure _) -> expr0+ (VisitPure _, VisitMonadic) -> unMon _lhsIoptions >#< expr0+ (VisitMonadic, VisitPure _) -> "lift" >#< expr0+ (VisitMonadic, VisitMonadic) -> expr0+ expr0 = case _prevVisitInfo of+ NoneVis -> error "error: invocation of a visit from a state that has no next visits"+ OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args+ ManyVis -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0+ >#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args+ args = pp_parens args0 >#< args1+ args0 = _nameTIn_visit >#< _inhargs chn+ args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True+ | otherwise = empty+ in (pat, expr)+ else Left $ IncompatibleVisitKind chn ident_ kind kind_+ {-# LINE 5558 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule700 #-}+ {-# LINE 1325 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule700 = \ _defsAsMap _nextintra _uses ->+ {-# LINE 1325 "./src-ag/ExecutionPlan2Clean.ag" #-}+ (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap+ {-# LINE 5564 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule701 #-}+ {-# LINE 1326 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule701 = \ _thisintra from_ ->+ {-# LINE 1326 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton from_ _thisintra+ {-# LINE 5570 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule702 #-}+ {-# LINE 1327 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule702 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->+ {-# LINE 1327 "./src-ag/ExecutionPlan2Clean.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 5576 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule703 #-}+ {-# LINE 1328 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule703 = \ ((_lhsIoptions) :: Options) ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->+ {-# LINE 1328 "./src-ag/ExecutionPlan2Clean.ag" #-}+ let mp1 = _stepsIuses+ mp2 = Map.fromList [ (lhsname _lhsIoptions False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]+ in mp1 `Map.union` mp2+ {-# LINE 5584 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule704 #-}+ {-# LINE 1331 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule704 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 1331 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.map (lhsname _lhsIoptions True) inh_+ {-# LINE 5590 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule705 #-}+ {-# LINE 1332 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule705 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->+ {-# LINE 1332 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs+ {-# LINE 5596 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule706 #-}+ {-# LINE 1333 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule706 = \ _defs ->+ {-# LINE 1333 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]+ {-# LINE 5602 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule707 #-}+ {-# LINE 1357 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule707 = \ ident_ syn_ ->+ {-# LINE 1357 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton ident_ syn_+ {-# LINE 5608 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule708 #-}+ {-# LINE 1358 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule708 = \ ident_ inh_ ->+ {-# LINE 1358 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton ident_ inh_+ {-# LINE 5614 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule709 #-}+ {-# LINE 1390 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule709 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->+ {-# LINE 1390 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case kind_ of+ VisitPure False -> _inhVarNms `Set.union` _stepsIdefs+ _ -> Set.empty+ {-# LINE 5622 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule710 #-}+ {-# LINE 1393 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule710 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->+ {-# LINE 1393 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lazyIntrasInh `Set.union` _stepsIlazyIntras+ {-# LINE 5628 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule711 #-}+ {-# LINE 1565 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule711 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1565 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 5634 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule712 #-}+ {-# LINE 1573 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule712 = \ _addbang kind_ ->+ {-# LINE 1573 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if isLazyKind kind_ then id else _addbang+ {-# LINE 5640 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule713 #-}+ {-# LINE 1600 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule713 = \ from_ ident_ to_ ->+ {-# LINE 1600 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton ident_ (from_, to_)+ {-# LINE 5646 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule714 #-}+ {-# LINE 1644 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule714 = \ ident_ kind_ ->+ {-# LINE 1644 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton ident_ kind_+ {-# LINE 5652 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule715 #-}+ rule715 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule716 #-}+ rule716 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule717 #-}+ rule717 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule718 #-}+ rule718 = \ ((_stepsIusedArgs) :: Set String) ->+ _stepsIusedArgs+ {-# INLINE rule719 #-}+ rule719 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule720 #-}+ rule720 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule721 #-}+ rule721 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule722 #-}+ rule722 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule723 #-}+ rule723 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule724 #-}+ rule724 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule725 #-}+ rule725 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule726 #-}+ rule726 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule727 #-}+ rule727 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule728 #-}+ rule728 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule729 #-}+ rule729 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule730 #-}+ rule730 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses++-- VisitStep ---------------------------------------------------+-- wrapper+data Inh_VisitStep = Inh_VisitStep { allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitStep :: (Map NontermIdent Int), allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitStep :: (Map Identifier Type), childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), fmtMode_Inh_VisitStep :: (FormatMode), index_Inh_VisitStep :: (Int), isLast_Inh_VisitStep :: (Bool), kind_Inh_VisitStep :: (VisitKind), mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), options_Inh_VisitStep :: (Options), ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))) }+data Syn_VisitStep = Syn_VisitStep { defs_Syn_VisitStep :: (Set String), errors_Syn_VisitStep :: (Seq Error), index_Syn_VisitStep :: (Int), isLast_Syn_VisitStep :: (Bool), lazyIntras_Syn_VisitStep :: (Set String), ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitStep :: (Map Identifier Int), sem_steps_Syn_VisitStep :: (PP_Doc), usedArgs_Syn_VisitStep :: (Set String), uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }+{-# INLINABLE wrap_VisitStep #-}+wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> (Syn_VisitStep )+wrap_VisitStep (T_VisitStep act) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses+ (T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds) <- return (inv_VisitStep_s50 sem arg)+ return (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds)+ )++-- cata+{-# NOINLINE sem_VisitStep #-}+sem_VisitStep :: VisitStep -> T_VisitStep +sem_VisitStep ( Sem name_ ) = sem_VisitStep_Sem name_+sem_VisitStep ( ChildVisit child_ nonterm_ visit_ ) = sem_VisitStep_ChildVisit child_ nonterm_ visit_+sem_VisitStep ( PureGroup steps_ ordered_ ) = sem_VisitStep_PureGroup ( sem_VisitSteps steps_ ) ordered_+sem_VisitStep ( Sim steps_ ) = sem_VisitStep_Sim ( sem_VisitSteps steps_ )+sem_VisitStep ( ChildIntro child_ ) = sem_VisitStep_ChildIntro child_++-- semantic domain+newtype T_VisitStep = T_VisitStep {+ attach_T_VisitStep :: Identity (T_VisitStep_s50 )+ }+newtype T_VisitStep_s50 = C_VisitStep_s50 {+ inv_VisitStep_s50 :: (T_VisitStep_v49 )+ }+data T_VisitStep_s51 = C_VisitStep_s51+type T_VisitStep_v49 = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )+data T_VisitStep_vIn49 = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr)))+data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)+{-# NOINLINE sem_VisitStep_Sem #-}+sem_VisitStep_Sem :: (Identifier) -> T_VisitStep +sem_VisitStep_Sem arg_name_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _ruleItf = rule731 _lhsImrules arg_name_+ _lhsOerrors :: Seq Error+ (_lhsOerrors,_sem_steps) = rule732 _lhsIfmtMode _lhsIkind _ruleItf+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule733 arg_name_+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule734 _lhsIkind arg_name_+ _lhsOdefs :: Set String+ _lhsOdefs = rule735 _lhsIruledefs arg_name_+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule736 _lhsIruleuses arg_name_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule737 ()+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule738 _sem_steps+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule739 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule740 ()+ _lhsOindex :: Int+ _lhsOindex = rule741 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule742 _lhsIisLast+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule731 #-}+ {-# LINE 836 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule731 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) name_ ->+ {-# LINE 836 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules+ {-# LINE 5774 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule732 #-}+ {-# LINE 837 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule732 = \ ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _ruleItf ->+ {-# LINE 837 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _ruleItf _lhsIkind _lhsIfmtMode of+ Left e -> (Seq.singleton e, empty)+ Right stmt -> (Seq.empty, stmt)+ {-# LINE 5782 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule733 #-}+ {-# LINE 1278 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule733 = \ name_ ->+ {-# LINE 1278 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ 1+ {-# LINE 5788 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule734 #-}+ {-# LINE 1288 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule734 = \ ((_lhsIkind) :: VisitKind) name_ ->+ {-# LINE 1288 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.singleton name_ (Set.singleton _lhsIkind)+ {-# LINE 5794 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule735 #-}+ {-# LINE 1373 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule735 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->+ {-# LINE 1373 "./src-ag/ExecutionPlan2Clean.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs+ {-# LINE 5800 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule736 #-}+ {-# LINE 1374 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule736 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->+ {-# LINE 1374 "./src-ag/ExecutionPlan2Clean.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses+ {-# LINE 5806 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule737 #-}+ rule737 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule738 #-}+ rule738 = \ _sem_steps ->+ _sem_steps+ {-# INLINE rule739 #-}+ rule739 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule740 #-}+ rule740 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule741 #-}+ rule741 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule742 #-}+ rule742 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+{-# NOINLINE sem_VisitStep_ChildVisit #-}+sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep +sem_VisitStep_ChildVisit arg_child_ _ arg_visit_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _visitItf = rule743 _lhsIallchildvisit arg_visit_+ _lhsOerrors :: Seq Error+ (_lhsOerrors,_patPP,_exprPP) = rule744 _lhsIkind _visitItf arg_child_+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule745 _exprPP _lhsIfmtMode _lhsIkind _patPP+ _convToMonad = rule746 _callKind+ _callKind = rule747 _lhsIallVisitKinds arg_visit_+ _lhsOdefs :: Set String+ _lhsOdefs = rule748 _lhsIavisitdefs _lhsIoptions _to arg_child_ arg_visit_+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule749 _from _lhsIavisituses _lhsIoptions arg_child_ arg_visit_+ _addbang = rule750 _lhsIoptions+ (_from,_to) = rule751 _lhsIallFromToStates arg_visit_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule752 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule753 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule754 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule755 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule756 ()+ _lhsOindex :: Int+ _lhsOindex = rule757 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule758 _lhsIisLast+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule743 #-}+ {-# LINE 845 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule743 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) visit_ ->+ {-# LINE 845 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit+ {-# LINE 5867 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule744 #-}+ {-# LINE 846 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule744 = \ ((_lhsIkind) :: VisitKind) _visitItf child_ ->+ {-# LINE 846 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _visitItf child_ _lhsIkind of+ Left e -> (Seq.singleton e, empty, empty)+ Right (pat,expr) -> (Seq.empty, pat, expr)+ {-# LINE 5875 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule745 #-}+ {-# LINE 850 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule745 = \ _exprPP ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _patPP ->+ {-# LINE 850 "./src-ag/ExecutionPlan2Clean.ag" #-}+ let decl = case _lhsIkind of+ VisitPure _ -> _patPP >#< "=" >#< _exprPP+ VisitMonadic -> _exprPP >#< ">>= \\" >#< _patPP >#< "->"+ in fmtDecl False _lhsIfmtMode decl+ {-# LINE 5884 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule746 #-}+ {-# LINE 854 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule746 = \ _callKind ->+ {-# LINE 854 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _callKind of+ VisitPure _ -> text "lift"+ VisitMonadic -> empty+ {-# LINE 5892 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule747 #-}+ {-# LINE 857 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule747 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) visit_ ->+ {-# LINE 857 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds+ {-# LINE 5898 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule748 #-}+ {-# LINE 1375 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule748 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) _to child_ visit_ ->+ {-# LINE 1375 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname _lhsIoptions True child_) $ Map.lookup visit_ _lhsIavisitdefs+ {-# LINE 5904 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule749 #-}+ {-# LINE 1376 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule749 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) child_ visit_ ->+ {-# LINE 1376 "./src-ag/ExecutionPlan2Clean.ag" #-}+ let convert attrs = Map.fromList [ (attrname _lhsIoptions False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]+ in Map.insert (stname child_ _from) Nothing $ convert $+ maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses+ {-# LINE 5912 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule750 #-}+ {-# LINE 1570 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule750 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1570 "./src-ag/ExecutionPlan2Clean.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 5918 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule751 #-}+ {-# LINE 1606 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule751 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->+ {-# LINE 1606 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates+ {-# LINE 5924 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule752 #-}+ rule752 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule753 #-}+ rule753 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule754 #-}+ rule754 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule755 #-}+ rule755 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule756 #-}+ rule756 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule757 #-}+ rule757 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule758 #-}+ rule758 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+{-# NOINLINE sem_VisitStep_PureGroup #-}+sem_VisitStep_PureGroup :: T_VisitSteps -> (Bool) -> T_VisitStep +sem_VisitStep_PureGroup arg_steps_ arg_ordered_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOruledefs _stepsOruleuses)+ _stepsOkind = rule759 arg_ordered_+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule760 _lhsIfmtMode _stepsIsem_steps+ _stepsOfmtMode = rule761 _lhsIfmtMode+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule762 _stepsIdefs _stepsIlazyIntras arg_ordered_+ _lhsOdefs :: Set String+ _lhsOdefs = rule763 _stepsIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule764 _stepsIerrors+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule765 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule766 _stepsIruleUsage+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule767 _stepsIusedArgs+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule768 _stepsIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule769 _stepsIvisitKinds+ _lhsOindex :: Int+ _lhsOindex = rule770 _stepsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule771 _stepsIisLast+ _stepsOallFromToStates = rule772 _lhsIallFromToStates+ _stepsOallInitStates = rule773 _lhsIallInitStates+ _stepsOallVisitKinds = rule774 _lhsIallVisitKinds+ _stepsOallchildvisit = rule775 _lhsIallchildvisit+ _stepsOavisitdefs = rule776 _lhsIavisitdefs+ _stepsOavisituses = rule777 _lhsIavisituses+ _stepsOchildTypes = rule778 _lhsIchildTypes+ _stepsOchildintros = rule779 _lhsIchildintros+ _stepsOindex = rule780 _lhsIindex+ _stepsOmrules = rule781 _lhsImrules+ _stepsOoptions = rule782 _lhsIoptions+ _stepsOruledefs = rule783 _lhsIruledefs+ _stepsOruleuses = rule784 _lhsIruleuses+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule759 #-}+ {-# LINE 831 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule759 = \ ordered_ ->+ {-# LINE 831 "./src-ag/ExecutionPlan2Clean.ag" #-}+ VisitPure ordered_+ {-# LINE 6000 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule760 #-}+ {-# LINE 859 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule760 = \ ((_lhsIfmtMode) :: FormatMode) ((_stepsIsem_steps) :: PP_Doc) ->+ {-# LINE 859 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _lhsIfmtMode of+ FormatDo -> "let" >#< _stepsIsem_steps+ _ -> _stepsIsem_steps+ {-# LINE 6008 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule761 #-}+ {-# LINE 874 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule761 = \ ((_lhsIfmtMode) :: FormatMode) ->+ {-# LINE 874 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _lhsIfmtMode of+ FormatDo -> FormatLetDecl+ mode -> mode+ {-# LINE 6016 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule762 #-}+ {-# LINE 1396 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule762 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->+ {-# LINE 1396 "./src-ag/ExecutionPlan2Clean.ag" #-}+ if ordered_+ then _stepsIlazyIntras+ else _stepsIdefs+ {-# LINE 6024 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule763 #-}+ rule763 = \ ((_stepsIdefs) :: Set String) ->+ _stepsIdefs+ {-# INLINE rule764 #-}+ rule764 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule765 #-}+ rule765 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule766 #-}+ rule766 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule767 #-}+ rule767 = \ ((_stepsIusedArgs) :: Set String) ->+ _stepsIusedArgs+ {-# INLINE rule768 #-}+ rule768 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->+ _stepsIuses+ {-# INLINE rule769 #-}+ rule769 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _stepsIvisitKinds+ {-# INLINE rule770 #-}+ rule770 = \ ((_stepsIindex) :: Int) ->+ _stepsIindex+ {-# INLINE rule771 #-}+ rule771 = \ ((_stepsIisLast) :: Bool) ->+ _stepsIisLast+ {-# INLINE rule772 #-}+ rule772 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule773 #-}+ rule773 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule774 #-}+ rule774 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule775 #-}+ rule775 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule776 #-}+ rule776 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule777 #-}+ rule777 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule778 #-}+ rule778 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule779 #-}+ rule779 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule780 #-}+ rule780 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule781 #-}+ rule781 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule782 #-}+ rule782 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule783 #-}+ rule783 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule784 #-}+ rule784 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+{-# NOINLINE sem_VisitStep_Sim #-}+sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep +sem_VisitStep_Sim arg_steps_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOruledefs _stepsOruleuses)+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule785 _stepsIsem_steps+ _stepsOindex = rule786 ()+ _lhsOindex :: Int+ _lhsOindex = rule787 _lhsIindex+ _isMonadic = rule788 _lhsIkind+ _lhsOdefs :: Set String+ _lhsOdefs = rule789 _stepsIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule790 _stepsIerrors+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule791 _stepsIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule792 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule793 _stepsIruleUsage+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule794 _stepsIusedArgs+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule795 _stepsIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule796 _stepsIvisitKinds+ _lhsOisLast :: Bool+ _lhsOisLast = rule797 _stepsIisLast+ _stepsOallFromToStates = rule798 _lhsIallFromToStates+ _stepsOallInitStates = rule799 _lhsIallInitStates+ _stepsOallVisitKinds = rule800 _lhsIallVisitKinds+ _stepsOallchildvisit = rule801 _lhsIallchildvisit+ _stepsOavisitdefs = rule802 _lhsIavisitdefs+ _stepsOavisituses = rule803 _lhsIavisituses+ _stepsOchildTypes = rule804 _lhsIchildTypes+ _stepsOchildintros = rule805 _lhsIchildintros+ _stepsOfmtMode = rule806 _lhsIfmtMode+ _stepsOkind = rule807 _lhsIkind+ _stepsOmrules = rule808 _lhsImrules+ _stepsOoptions = rule809 _lhsIoptions+ _stepsOruledefs = rule810 _lhsIruledefs+ _stepsOruleuses = rule811 _lhsIruleuses+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule785 #-}+ {-# LINE 858 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule785 = \ ((_stepsIsem_steps) :: PP_Doc) ->+ {-# LINE 858 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _stepsIsem_steps+ {-# LINE 6146 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule786 #-}+ {-# LINE 918 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule786 = \ (_ :: ()) ->+ {-# LINE 918 "./src-ag/ExecutionPlan2Clean.ag" #-}+ 0+ {-# LINE 6152 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule787 #-}+ {-# LINE 919 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule787 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 919 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lhsIindex+ {-# LINE 6158 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule788 #-}+ {-# LINE 930 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule788 = \ ((_lhsIkind) :: VisitKind) ->+ {-# LINE 930 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _lhsIkind of+ VisitMonadic -> True+ _ -> False+ {-# LINE 6166 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule789 #-}+ rule789 = \ ((_stepsIdefs) :: Set String) ->+ _stepsIdefs+ {-# INLINE rule790 #-}+ rule790 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule791 #-}+ rule791 = \ ((_stepsIlazyIntras) :: Set String) ->+ _stepsIlazyIntras+ {-# INLINE rule792 #-}+ rule792 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule793 #-}+ rule793 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule794 #-}+ rule794 = \ ((_stepsIusedArgs) :: Set String) ->+ _stepsIusedArgs+ {-# INLINE rule795 #-}+ rule795 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->+ _stepsIuses+ {-# INLINE rule796 #-}+ rule796 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _stepsIvisitKinds+ {-# INLINE rule797 #-}+ rule797 = \ ((_stepsIisLast) :: Bool) ->+ _stepsIisLast+ {-# INLINE rule798 #-}+ rule798 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule799 #-}+ rule799 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule800 #-}+ rule800 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule801 #-}+ rule801 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule802 #-}+ rule802 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule803 #-}+ rule803 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule804 #-}+ rule804 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule805 #-}+ rule805 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule806 #-}+ rule806 = \ ((_lhsIfmtMode) :: FormatMode) ->+ _lhsIfmtMode+ {-# INLINE rule807 #-}+ rule807 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule808 #-}+ rule808 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule809 #-}+ rule809 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule810 #-}+ rule810 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule811 #-}+ rule811 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+{-# NOINLINE sem_VisitStep_ChildIntro #-}+sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep +sem_VisitStep_ChildIntro arg_child_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _attachItf = rule812 _lhsIchildintros arg_child_+ _lhsOerrors :: Seq Error+ _lhsOsem_steps :: PP_Doc+ _lhsOdefs :: Set String+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ (_lhsOerrors,_lhsOsem_steps,_lhsOdefs,_lhsOuses) = rule813 _attachItf _lhsIfmtMode _lhsIkind+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule814 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule815 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule816 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule817 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule818 ()+ _lhsOindex :: Int+ _lhsOindex = rule819 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule820 _lhsIisLast+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule812 #-}+ {-# LINE 840 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule812 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->+ {-# LINE 840 "./src-ag/ExecutionPlan2Clean.ag" #-}+ Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros+ {-# LINE 6271 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule813 #-}+ {-# LINE 842 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule813 = \ _attachItf ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) ->+ {-# LINE 842 "./src-ag/ExecutionPlan2Clean.ag" #-}+ case _attachItf _lhsIkind _lhsIfmtMode of+ Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)+ Right (code, defs, uses) -> (Seq.empty, code, defs, uses)+ {-# LINE 6279 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule814 #-}+ rule814 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule815 #-}+ rule815 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule816 #-}+ rule816 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule817 #-}+ rule817 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule818 #-}+ rule818 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule819 #-}+ rule819 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule820 #-}+ rule820 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast++-- VisitSteps --------------------------------------------------+-- wrapper+data Inh_VisitSteps = Inh_VisitSteps { allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitSteps :: (Map Identifier Type), childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), fmtMode_Inh_VisitSteps :: (FormatMode), index_Inh_VisitSteps :: (Int), kind_Inh_VisitSteps :: (VisitKind), mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), options_Inh_VisitSteps :: (Options), ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))) }+data Syn_VisitSteps = Syn_VisitSteps { defs_Syn_VisitSteps :: (Set String), errors_Syn_VisitSteps :: (Seq Error), index_Syn_VisitSteps :: (Int), isLast_Syn_VisitSteps :: (Bool), lazyIntras_Syn_VisitSteps :: (Set String), ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitSteps :: (Map Identifier Int), sem_steps_Syn_VisitSteps :: (PP_Doc), size_Syn_VisitSteps :: (Int), usedArgs_Syn_VisitSteps :: (Set String), uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }+{-# INLINABLE wrap_VisitSteps #-}+wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> (Syn_VisitSteps )+wrap_VisitSteps (T_VisitSteps act) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses+ (T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOusedArgs _lhsOuses _lhsOvisitKinds) <- return (inv_VisitSteps_s53 sem arg)+ return (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOusedArgs _lhsOuses _lhsOvisitKinds)+ )++-- cata+{-# NOINLINE sem_VisitSteps #-}+sem_VisitSteps :: VisitSteps -> T_VisitSteps +sem_VisitSteps list = Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list)++-- semantic domain+newtype T_VisitSteps = T_VisitSteps {+ attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )+ }+newtype T_VisitSteps_s53 = C_VisitSteps_s53 {+ inv_VisitSteps_s53 :: (T_VisitSteps_v52 )+ }+data T_VisitSteps_s54 = C_VisitSteps_s54+type T_VisitSteps_v52 = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )+data T_VisitSteps_vIn52 = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr)))+data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)+{-# NOINLINE sem_VisitSteps_Cons #-}+sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps +sem_VisitSteps_Cons arg_hd_ arg_tl_ = T_VisitSteps (return st53) where+ {-# NOINLINE st53 #-}+ st53 = let+ v52 :: T_VisitSteps_v52 + v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _hdX50 = Control.Monad.Identity.runIdentity (attach_T_VisitStep (arg_hd_))+ _tlX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_tl_))+ (T_VisitStep_vOut49 _hdIdefs _hdIerrors _hdIindex _hdIisLast _hdIlazyIntras _hdIruleKinds _hdIruleUsage _hdIsem_steps _hdIusedArgs _hdIuses _hdIvisitKinds) = inv_VisitStep_s50 _hdX50 (T_VisitStep_vIn49 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfmtMode _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOruledefs _hdOruleuses)+ (T_VisitSteps_vOut52 _tlIdefs _tlIerrors _tlIindex _tlIisLast _tlIlazyIntras _tlIruleKinds _tlIruleUsage _tlIsem_steps _tlIsize _tlIusedArgs _tlIuses _tlIvisitKinds) = inv_VisitSteps_s53 _tlX53 (T_VisitSteps_vIn52 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfmtMode _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOruledefs _tlOruleuses)+ _lhsOsize :: Int+ _lhsOsize = rule821 _tlIsize+ _hdOindex = rule822 _lhsIindex+ _tlOindex = rule823 _lhsIindex+ _lhsOindex :: Int+ _lhsOindex = rule824 _tlIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule825 ()+ _hdOisLast = rule826 _tlIisLast+ _lhsOdefs :: Set String+ _lhsOdefs = rule827 _hdIdefs _tlIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule828 _hdIerrors _tlIerrors+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule829 _hdIlazyIntras _tlIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule830 _hdIruleKinds _tlIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule831 _hdIruleUsage _tlIruleUsage+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule832 _hdIsem_steps _tlIsem_steps+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule833 _hdIusedArgs _tlIusedArgs+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule834 _hdIuses _tlIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule835 _hdIvisitKinds _tlIvisitKinds+ _hdOallFromToStates = rule836 _lhsIallFromToStates+ _hdOallInitStates = rule837 _lhsIallInitStates+ _hdOallVisitKinds = rule838 _lhsIallVisitKinds+ _hdOallchildvisit = rule839 _lhsIallchildvisit+ _hdOavisitdefs = rule840 _lhsIavisitdefs+ _hdOavisituses = rule841 _lhsIavisituses+ _hdOchildTypes = rule842 _lhsIchildTypes+ _hdOchildintros = rule843 _lhsIchildintros+ _hdOfmtMode = rule844 _lhsIfmtMode+ _hdOkind = rule845 _lhsIkind+ _hdOmrules = rule846 _lhsImrules+ _hdOoptions = rule847 _lhsIoptions+ _hdOruledefs = rule848 _lhsIruledefs+ _hdOruleuses = rule849 _lhsIruleuses+ _tlOallFromToStates = rule850 _lhsIallFromToStates+ _tlOallInitStates = rule851 _lhsIallInitStates+ _tlOallVisitKinds = rule852 _lhsIallVisitKinds+ _tlOallchildvisit = rule853 _lhsIallchildvisit+ _tlOavisitdefs = rule854 _lhsIavisitdefs+ _tlOavisituses = rule855 _lhsIavisituses+ _tlOchildTypes = rule856 _lhsIchildTypes+ _tlOchildintros = rule857 _lhsIchildintros+ _tlOfmtMode = rule858 _lhsIfmtMode+ _tlOkind = rule859 _lhsIkind+ _tlOmrules = rule860 _lhsImrules+ _tlOoptions = rule861 _lhsIoptions+ _tlOruledefs = rule862 _lhsIruledefs+ _tlOruleuses = rule863 _lhsIruleuses+ __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitSteps_s53 v52+ {-# INLINE rule821 #-}+ {-# LINE 909 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule821 = \ ((_tlIsize) :: Int) ->+ {-# LINE 909 "./src-ag/ExecutionPlan2Clean.ag" #-}+ 1 + _tlIsize+ {-# LINE 6406 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule822 #-}+ {-# LINE 914 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule822 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 914 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _lhsIindex+ {-# LINE 6412 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule823 #-}+ {-# LINE 915 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule823 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 915 "./src-ag/ExecutionPlan2Clean.ag" #-}+ 1 + _lhsIindex+ {-# LINE 6418 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule824 #-}+ {-# LINE 916 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule824 = \ ((_tlIindex) :: Int) ->+ {-# LINE 916 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _tlIindex+ {-# LINE 6424 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule825 #-}+ {-# LINE 926 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule825 = \ (_ :: ()) ->+ {-# LINE 926 "./src-ag/ExecutionPlan2Clean.ag" #-}+ False+ {-# LINE 6430 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule826 #-}+ {-# LINE 927 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule826 = \ ((_tlIisLast) :: Bool) ->+ {-# LINE 927 "./src-ag/ExecutionPlan2Clean.ag" #-}+ _tlIisLast+ {-# LINE 6436 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule827 #-}+ rule827 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->+ _hdIdefs `Set.union` _tlIdefs+ {-# INLINE rule828 #-}+ rule828 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule829 #-}+ rule829 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# INLINE rule830 #-}+ rule830 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# INLINE rule831 #-}+ rule831 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# INLINE rule832 #-}+ rule832 = \ ((_hdIsem_steps) :: PP_Doc) ((_tlIsem_steps) :: PP_Doc) ->+ _hdIsem_steps >-< _tlIsem_steps+ {-# INLINE rule833 #-}+ rule833 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule834 #-}+ rule834 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->+ _hdIuses `Map.union` _tlIuses+ {-# INLINE rule835 #-}+ rule835 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule836 #-}+ rule836 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule837 #-}+ rule837 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule838 #-}+ rule838 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule839 #-}+ rule839 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule840 #-}+ rule840 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule841 #-}+ rule841 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule842 #-}+ rule842 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule843 #-}+ rule843 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule844 #-}+ rule844 = \ ((_lhsIfmtMode) :: FormatMode) ->+ _lhsIfmtMode+ {-# INLINE rule845 #-}+ rule845 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule846 #-}+ rule846 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule847 #-}+ rule847 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule848 #-}+ rule848 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule849 #-}+ rule849 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule850 #-}+ rule850 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule851 #-}+ rule851 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule852 #-}+ rule852 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule853 #-}+ rule853 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule854 #-}+ rule854 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule855 #-}+ rule855 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule856 #-}+ rule856 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule857 #-}+ rule857 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule858 #-}+ rule858 = \ ((_lhsIfmtMode) :: FormatMode) ->+ _lhsIfmtMode+ {-# INLINE rule859 #-}+ rule859 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule860 #-}+ rule860 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule861 #-}+ rule861 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule862 #-}+ rule862 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule863 #-}+ rule863 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+{-# NOINLINE sem_VisitSteps_Nil #-}+sem_VisitSteps_Nil :: T_VisitSteps +sem_VisitSteps_Nil = T_VisitSteps (return st53) where+ {-# NOINLINE st53 #-}+ st53 = let+ v52 :: T_VisitSteps_v52 + v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIruledefs _lhsIruleuses) -> ( let+ _lhsOsize :: Int+ _lhsOsize = rule864 ()+ _lhsOisLast :: Bool+ _lhsOisLast = rule865 ()+ _lhsOdefs :: Set String+ _lhsOdefs = rule866 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule867 ()+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule868 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule869 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule870 ()+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule871 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule872 ()+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule873 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule874 ()+ _lhsOindex :: Int+ _lhsOindex = rule875 _lhsIindex+ __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitSteps_s53 v52+ {-# INLINE rule864 #-}+ {-# LINE 908 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule864 = \ (_ :: ()) ->+ {-# LINE 908 "./src-ag/ExecutionPlan2Clean.ag" #-}+ 0+ {-# LINE 6587 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule865 #-}+ {-# LINE 925 "./src-ag/ExecutionPlan2Clean.ag" #-}+ rule865 = \ (_ :: ()) ->+ {-# LINE 925 "./src-ag/ExecutionPlan2Clean.ag" #-}+ True+ {-# LINE 6593 "dist/build/ExecutionPlan2Clean.hs"#-}+ {-# INLINE rule866 #-}+ rule866 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule867 #-}+ rule867 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule868 #-}+ rule868 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule869 #-}+ rule869 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule870 #-}+ rule870 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule871 #-}+ rule871 = \ (_ :: ()) ->+ empty+ {-# INLINE rule872 #-}+ rule872 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule873 #-}+ rule873 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule874 #-}+ rule874 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule875 #-}+ rule875 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex++-- Visits ------------------------------------------------------+-- wrapper+data Inh_Visits = Inh_Visits { allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visits :: (Map NontermIdent Attributes), allInitStates_Inh_Visits :: (Map NontermIdent Int), allSynmap_Inh_Visits :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visits :: (Map Identifier Type), childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visits :: (ConstructorIdent), inhmap_Inh_Visits :: (Attributes), mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), nt_Inh_Visits :: (NontermIdent), options_Inh_Visits :: (Options), params_Inh_Visits :: ([Identifier]), prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visits :: (Map Identifier (Set String)), ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visits :: (Attributes), terminaldefs_Inh_Visits :: (Set String) }+data Syn_Visits = Syn_Visits { allvisits_Syn_Visits :: ([VisitStateState]), childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_Visits :: (Seq Error), fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visits :: (Set String), ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visits :: (Map Identifier Int), sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ), t_visits_Syn_Visits :: (PP_Doc), usedArgs_Syn_Visits :: (Set String), visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_Visits #-}+wrap_Visits :: T_Visits -> Inh_Visits -> (Syn_Visits )+wrap_Visits (T_Visits act) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ (T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visits_s56 sem arg)+ return (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_Visits #-}+sem_Visits :: Visits -> T_Visits +sem_Visits list = Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list)++-- semantic domain+newtype T_Visits = T_Visits {+ attach_T_Visits :: Identity (T_Visits_s56 )+ }+newtype T_Visits_s56 = C_Visits_s56 {+ inv_Visits_s56 :: (T_Visits_v55 )+ }+data T_Visits_s57 = C_Visits_s57+type T_Visits_v55 = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )+data T_Visits_vIn55 = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)+data T_Visits_vOut55 = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,Bool -> PP_Doc)] ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_Visits_Cons #-}+sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits +sem_Visits_Cons arg_hd_ arg_tl_ = T_Visits (return st56) where+ {-# NOINLINE st56 #-}+ st56 = let+ v55 :: T_Visits_v55 + v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _hdX47 = Control.Monad.Identity.runIdentity (attach_T_Visit (arg_hd_))+ _tlX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_tl_))+ (T_Visit_vOut46 _hdIallvisits _hdIchildvisit _hdIerrors _hdIfromToStates _hdIintramap _hdIlazyIntras _hdIruleKinds _hdIruleUsage _hdIsem_visit _hdIt_visits _hdIusedArgs _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_Visit_s47 _hdX47 (T_Visit_vIn46 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs)+ (T_Visits_vOut55 _tlIallvisits _tlIchildvisit _tlIerrors _tlIfromToStates _tlIintramap _tlIlazyIntras _tlIruleKinds _tlIruleUsage _tlIsem_visit _tlIt_visits _tlIusedArgs _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_Visits_s56 _tlX56 (T_Visits_vIn55 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs)+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule876 _hdIallvisits _tlIallvisits+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule877 _hdIchildvisit _tlIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule878 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule879 _hdIfromToStates _tlIfromToStates+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule880 _hdIintramap _tlIintramap+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule881 _hdIlazyIntras _tlIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule882 _hdIruleKinds _tlIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule883 _hdIruleUsage _tlIruleUsage+ _lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)] + _lhsOsem_visit = rule884 _hdIsem_visit _tlIsem_visit+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule885 _hdIt_visits _tlIt_visits+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule886 _hdIusedArgs _tlIusedArgs+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule887 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule888 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule889 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule890 _lhsIallFromToStates+ _hdOallInhmap = rule891 _lhsIallInhmap+ _hdOallInitStates = rule892 _lhsIallInitStates+ _hdOallSynmap = rule893 _lhsIallSynmap+ _hdOallVisitKinds = rule894 _lhsIallVisitKinds+ _hdOallchildvisit = rule895 _lhsIallchildvisit+ _hdOallintramap = rule896 _lhsIallintramap+ _hdOavisitdefs = rule897 _lhsIavisitdefs+ _hdOavisituses = rule898 _lhsIavisituses+ _hdOchildTypes = rule899 _lhsIchildTypes+ _hdOchildintros = rule900 _lhsIchildintros+ _hdOcon = rule901 _lhsIcon+ _hdOinhmap = rule902 _lhsIinhmap+ _hdOmrules = rule903 _lhsImrules+ _hdOnextVisits = rule904 _lhsInextVisits+ _hdOnt = rule905 _lhsInt+ _hdOoptions = rule906 _lhsIoptions+ _hdOparams = rule907 _lhsIparams+ _hdOprevVisits = rule908 _lhsIprevVisits+ _hdOruledefs = rule909 _lhsIruledefs+ _hdOruleuses = rule910 _lhsIruleuses+ _hdOsynmap = rule911 _lhsIsynmap+ _hdOterminaldefs = rule912 _lhsIterminaldefs+ _tlOallFromToStates = rule913 _lhsIallFromToStates+ _tlOallInhmap = rule914 _lhsIallInhmap+ _tlOallInitStates = rule915 _lhsIallInitStates+ _tlOallSynmap = rule916 _lhsIallSynmap+ _tlOallVisitKinds = rule917 _lhsIallVisitKinds+ _tlOallchildvisit = rule918 _lhsIallchildvisit+ _tlOallintramap = rule919 _lhsIallintramap+ _tlOavisitdefs = rule920 _lhsIavisitdefs+ _tlOavisituses = rule921 _lhsIavisituses+ _tlOchildTypes = rule922 _lhsIchildTypes+ _tlOchildintros = rule923 _lhsIchildintros+ _tlOcon = rule924 _lhsIcon+ _tlOinhmap = rule925 _lhsIinhmap+ _tlOmrules = rule926 _lhsImrules+ _tlOnextVisits = rule927 _lhsInextVisits+ _tlOnt = rule928 _lhsInt+ _tlOoptions = rule929 _lhsIoptions+ _tlOparams = rule930 _lhsIparams+ _tlOprevVisits = rule931 _lhsIprevVisits+ _tlOruledefs = rule932 _lhsIruledefs+ _tlOruleuses = rule933 _lhsIruleuses+ _tlOsynmap = rule934 _lhsIsynmap+ _tlOterminaldefs = rule935 _lhsIterminaldefs+ __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visits_s56 v55+ {-# INLINE rule876 #-}+ rule876 = \ ((_hdIallvisits) :: VisitStateState ) ((_tlIallvisits) :: [VisitStateState]) ->+ _hdIallvisits : _tlIallvisits+ {-# INLINE rule877 #-}+ rule877 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule878 #-}+ rule878 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule879 #-}+ rule879 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule880 #-}+ rule880 = \ ((_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _hdIintramap `uwMapUnion` _tlIintramap+ {-# INLINE rule881 #-}+ rule881 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# INLINE rule882 #-}+ rule882 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# INLINE rule883 #-}+ rule883 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# INLINE rule884 #-}+ rule884 = \ ((_hdIsem_visit) :: (StateIdentifier,Bool -> PP_Doc) ) ((_tlIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->+ _hdIsem_visit : _tlIsem_visit+ {-# INLINE rule885 #-}+ rule885 = \ ((_hdIt_visits) :: PP_Doc) ((_tlIt_visits) :: PP_Doc) ->+ _hdIt_visits >-< _tlIt_visits+ {-# INLINE rule886 #-}+ rule886 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule887 #-}+ rule887 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule888 #-}+ rule888 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule889 #-}+ rule889 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule890 #-}+ rule890 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule891 #-}+ rule891 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule892 #-}+ rule892 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule893 #-}+ rule893 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule894 #-}+ rule894 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule895 #-}+ rule895 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule896 #-}+ rule896 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIallintramap+ {-# INLINE rule897 #-}+ rule897 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule898 #-}+ rule898 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule899 #-}+ rule899 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule900 #-}+ rule900 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule901 #-}+ rule901 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule902 #-}+ rule902 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule903 #-}+ rule903 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule904 #-}+ rule904 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule905 #-}+ rule905 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule906 #-}+ rule906 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule907 #-}+ rule907 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule908 #-}+ rule908 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule909 #-}+ rule909 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule910 #-}+ rule910 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule911 #-}+ rule911 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule912 #-}+ rule912 = \ ((_lhsIterminaldefs) :: Set String) ->+ _lhsIterminaldefs+ {-# INLINE rule913 #-}+ rule913 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule914 #-}+ rule914 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule915 #-}+ rule915 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule916 #-}+ rule916 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule917 #-}+ rule917 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule918 #-}+ rule918 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule919 #-}+ rule919 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIallintramap+ {-# INLINE rule920 #-}+ rule920 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule921 #-}+ rule921 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule922 #-}+ rule922 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule923 #-}+ rule923 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule924 #-}+ rule924 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule925 #-}+ rule925 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule926 #-}+ rule926 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule927 #-}+ rule927 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule928 #-}+ rule928 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule929 #-}+ rule929 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule930 #-}+ rule930 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule931 #-}+ rule931 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule932 #-}+ rule932 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule933 #-}+ rule933 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule934 #-}+ rule934 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule935 #-}+ rule935 = \ ((_lhsIterminaldefs) :: Set String) ->+ _lhsIterminaldefs+{-# NOINLINE sem_Visits_Nil #-}+sem_Visits_Nil :: T_Visits +sem_Visits_Nil = T_Visits (return st56) where+ {-# NOINLINE st56 #-}+ st56 = let+ v55 :: T_Visits_v55 + v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule936 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule937 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule938 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule939 ()+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule940 ()+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule941 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule942 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule943 ()+ _lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)] + _lhsOsem_visit = rule944 ()+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule945 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule946 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule947 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule948 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule949 ()+ __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visits_s56 v55+ {-# INLINE rule936 #-}+ rule936 = \ (_ :: ()) ->+ []+ {-# INLINE rule937 #-}+ rule937 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule938 #-}+ rule938 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule939 #-}+ rule939 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule940 #-}+ rule940 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule941 #-}+ rule941 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule942 #-}+ rule942 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule943 #-}+ rule943 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule944 #-}+ rule944 = \ (_ :: ()) ->+ []+ {-# INLINE rule945 #-}+ rule945 = \ (_ :: ()) ->+ empty+ {-# INLINE rule946 #-}+ rule946 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule947 #-}+ rule947 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule948 #-}+ rule948 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule949 #-}+ rule949 = \ (_ :: ()) ->+ Map.empty
src-generated/ExecutionPlan2Hs.hs view
@@ -2,6973 +2,6996 @@ {-# LANGUAGE ScopedTypeVariables #-} module ExecutionPlan2Hs where-{-# LINE 2 "./src-ag/ExecutionPlan.ag" #-}---- VisitSyntax.ag imports-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import CommonTypes-import ErrorMessages--import qualified Data.Set as Set-import Data.Set(Set)-import qualified Data.Map as Map-import Data.Map(Map)-{-# LINE 18 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 25 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 31 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 2 "./src-ag/HsToken.ag" #-}--import CommonTypes-import UU.Scanner.Position(Pos)-{-# LINE 37 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 7 "./src-ag/ExecutionPlan2Hs.ag" #-}--import ExecutionPlan-import Pretty-import PPUtil-import Options-import Data.Monoid(mappend,mempty)-import Data.Maybe-import Debug.Trace-import System.IO-import System.Directory-import System.FilePath-import UU.Scanner.Position--import TokenDef-import HsToken-import ErrorMessages--import Data.Set (Set)-import qualified Data.Set as Set-import Data.Map (Map)-import qualified Data.Map as Map-import Data.Sequence(Seq)-import qualified Data.Sequence as Seq-import Data.Foldable(toList)-{-# LINE 64 "dist/build/ExecutionPlan2Hs.hs" #-}-import Control.Monad.Identity (Identity)-import qualified Control.Monad.Identity-{-# LINE 161 "./src-ag/ExecutionPlan2Hs.ag" #-}--classCtxsToDocs :: ClassContext -> [PP_Doc]-classCtxsToDocs = map toDoc where- toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))--classConstrsToDocs :: [Type] -> [PP_Doc]-classConstrsToDocs = map ppTp--ppClasses :: [PP_Doc] -> PP_Doc-ppClasses [] = empty-ppClasses xs = pp_block "(" ")" "," xs >#< "=>"--ppQuants :: [Identifier] -> PP_Doc-ppQuants [] = empty-ppQuants ps = "forall" >#< ppSpaced ps >#< "."-{-# LINE 83 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 190 "./src-ag/ExecutionPlan2Hs.ag" #-}---- first parameter indicates: generate a record or not-ppConFields :: Bool -> [PP_Doc] -> PP_Doc-ppConFields True flds = ppListSep "{" "}" ", " flds-ppConFields False flds = ppSpaced flds-{-# LINE 91 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 216 "./src-ag/ExecutionPlan2Hs.ag" #-}--ppTp :: Type -> PP_Doc-ppTp = text . typeToHaskellString Nothing []-{-# LINE 97 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 330 "./src-ag/ExecutionPlan2Hs.ag" #-}-type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)-{-# LINE 101 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 426 "./src-ag/ExecutionPlan2Hs.ag" #-}--conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId-conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId-conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId-conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId--ppMonadType :: Options -> PP_Doc-ppMonadType opts- | parallelInvoke opts = text "IO"- | otherwise = text "Identity"-{-# LINE 114 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 576 "./src-ag/ExecutionPlan2Hs.ag" #-}--ppDefor :: Type -> PP_Doc-ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)-ppDefor (Haskell s) = text s-{-# LINE 121 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 700 "./src-ag/ExecutionPlan2Hs.ag" #-}--mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc-mklet prefix defs body =- prefix >#< "let"- >-< indent 3 defs- >-< indent 2 "in" >#< body-{-# LINE 130 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 766 "./src-ag/ExecutionPlan2Hs.ag" #-}--resultValName :: String-resultValName = "__result_"--nextStName :: String-nextStName = "__st_"-{-# LINE 139 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 837 "./src-ag/ExecutionPlan2Hs.ag" #-}--parResultName :: String-parResultName = "__outcome_"--fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc-fmtDecl declPure fmt decl = case fmt of- FormatLetDecl -> pp decl- FormatLetLine -> "let" >#< decl >#< "in"- FormatDo | declPure -> "let" >#< decl- | otherwise -> pp decl-{-# LINE 152 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 963 "./src-ag/ExecutionPlan2Hs.ag" #-}--stname :: Identifier -> Int -> String-stname child st = "_" ++ getName child ++ "X" ++ show st---- should actually return some conversion info-compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool-compatibleAttach _ _ _ = True--unMon :: Options -> PP_Doc-unMon options- | parallelInvoke options = text "System.IO.Unsafe.unsafePerformIO" -- IO monad- | otherwise = text "Control.Monad.Identity.runIdentity" -- identity monad-{-# LINE 167 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1071 "./src-ag/ExecutionPlan2Hs.ag" #-}--dummyPat :: Options -> Bool -> PP_Doc-dummyPat opts noArgs- | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples- | tupleAsDummyToken opts = if strictDummyToken opts- then text "()"- else text "(_ :: ())"- | otherwise = let match | strictDummyToken opts = "!_"- | otherwise = "_"- in pp_parens (match >#< "::" >#< dummyType opts noArgs)- where match | strictDummyToken opts = "(!_)"- | otherwise = "_"--dummyArg :: Options -> Bool -> PP_Doc-dummyArg opts noArgs- | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples- | tupleAsDummyToken opts = text "()"- | otherwise = text "GHC.Prim.realWorld#"--dummyType :: Options -> Bool -> PP_Doc-dummyType opts noArgs- | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples- | tupleAsDummyToken opts = text "()"- | otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"-{-# LINE 194 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1097 "./src-ag/ExecutionPlan2Hs.ag" #-}---- rules are "deinlined" to prevent needless code duplication.--- if there is only a bit of duplication, we allow ghc to decide if it is worth it.--- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.-ruleInlineThresholdSoft :: Int-ruleInlineThresholdSoft = 3--ruleInlineThresholdHard :: Int-ruleInlineThresholdHard = 5--reallyOftenUsedThreshold :: Int-reallyOftenUsedThreshold = 12-{-# LINE 209 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1163 "./src-ag/ExecutionPlan2Hs.ag" #-}--data NonLocalAttr- = AttrInh Identifier Identifier- | AttrSyn Identifier Identifier deriving Show--mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr-mkNonLocalAttr True = AttrInh -- True: inherited attr-mkNonLocalAttr False = AttrSyn--lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc-lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs-lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns---- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that--- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.--- However, for now we simply decide to return Nothing in this case, which skips the type annotation.-lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc-lookupType child name attrMp childMp- | noParameters childTp = Just ppDoc- | otherwise = Nothing- where- attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs- childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp- nonterm = extractNonterminal childTp- childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp- ppDoc = ppTp attrTp--noParameters :: Type -> Bool-noParameters (Haskell _) = True-noParameters (NT _ args _) = null args-{-# LINE 242 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1249 "./src-ag/ExecutionPlan2Hs.ag" #-}---- a `compatibleKind` b means: can kind b be invoked from a-compatibleKind :: VisitKind -> VisitKind -> Bool-compatibleKind _ _ = True--compatibleRule :: VisitKind -> Bool -> Bool-compatibleRule (VisitPure _) False = False-compatibleRule _ _ = True-{-# LINE 253 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1271 "./src-ag/ExecutionPlan2Hs.ag" #-}--unionWithSum = Map.unionWith (+)-{-# LINE 258 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1294 "./src-ag/ExecutionPlan2Hs.ag" #-}--uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)-uwSetUnion = Map.unionWith Set.union--uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)-uwMapUnion = Map.unionWith Map.union-{-# LINE 267 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1511 "./src-ag/ExecutionPlan2Hs.ag" #-}--renderDocs :: [PP_Doc] -> String-renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""--writeModule :: FilePath -> [PP_Doc] -> IO ()-writeModule path docs- = do bExists <- doesFileExist path- if bExists- then do input <- readFile path- seq (length input) (return ())- if input /= output- then dumpIt- else return ()- else dumpIt- where- output = renderDocs docs- dumpIt = writeFile path output-{-# LINE 287 "dist/build/ExecutionPlan2Hs.hs" #-}--{-# LINE 1658 "./src-ag/ExecutionPlan2Hs.ag" #-}--ppNoInline :: PP a => a -> PP_Doc-ppNoInline = ppPragmaBinding "NOINLINE"--ppInline :: PP a => a -> PP_Doc-ppInline = ppPragmaBinding "INLINE"--ppInlinable :: PP a => a -> PP_Doc-ppInlinable = ppPragmaBinding "INLINABLE"--ppPragmaBinding :: (PP a, PP b) => a -> b -> PP_Doc-ppPragmaBinding pragma nm = "{-#" >#< pragma >#< nm >#< "#-}"--ppCostCentre :: PP a => a -> PP_Doc-ppCostCentre nm = "{-#" >#< "SCC" >#< "\"" >|< nm >|< "\"" >#< "#-}"--warrenFlagsPP :: Options -> PP_Doc-warrenFlagsPP options = vlist- [ pp "{-# LANGUAGE Rank2Types, GADTs #-}"- , if bangpats options- then pp "{-# LANGUAGE BangPatterns #-}"- else empty- , if noPerRuleTypeSigs options && noPerStateTypeSigs options- then empty- else pp "{-# LANGUAGE ScopedTypeVariables #-}"- , if tupleAsDummyToken options- then empty- else pp "{-# LANGUAGE ScopedTypeVariables, MagicHash #-}"- , -- not that the meaning of "unbox" is here that strict fields in data types may be- -- unboxed if possible. This may affect user-defined data types declared in the module.- -- Unfortunately, we cannot turn it on for only the AG generated data types without- -- causing a zillion of warnings.- if unbox options && bangpats options- then pp $ "{-# OPTIONS_GHC -funbox-strict-fields -fstrictness #-}"- else empty- , if parallelInvoke options && not (noEagerBlackholing options)- then pp $ "{-# OPTIONS_GHC -feager-blackholing #-}"- else empty- ]-{-# LINE 329 "dist/build/ExecutionPlan2Hs.hs" #-}--- EChild --------------------------------------------------------- wrapper-data Inh_EChild = Inh_EChild { allInitStates_Inh_EChild :: (Map NontermIdent Int), con_Inh_EChild :: (ConstructorIdent), importBlocks_Inh_EChild :: (PP_Doc), mainFile_Inh_EChild :: (String), mainName_Inh_EChild :: (String), moduleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String), nt_Inh_EChild :: (NontermIdent), options_Inh_EChild :: (Options), pragmaBlocks_Inh_EChild :: (String), textBlocks_Inh_EChild :: (PP_Doc) }-data Syn_EChild = Syn_EChild { argnamesw_Syn_EChild :: ( PP_Doc ), argpats_Syn_EChild :: ( PP_Doc ), argtps_Syn_EChild :: ( PP_Doc ), childTypes_Syn_EChild :: (Map Identifier Type), childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), datatype_Syn_EChild :: (PP_Doc), terminaldefs_Syn_EChild :: (Set String), usedArgs_Syn_EChild :: (Set String) }-{-# INLINABLE wrap_EChild #-}-wrap_EChild :: T_EChild -> Inh_EChild -> (Syn_EChild )-wrap_EChild (T_EChild act) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks- (T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs) <- return (inv_EChild_s2 sem arg)- return (Syn_EChild _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs)- )---- cata-{-# NOINLINE sem_EChild #-}-sem_EChild :: EChild -> T_EChild -sem_EChild ( EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ ) = sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_-sem_EChild ( ETerm name_ tp_ ) = sem_EChild_ETerm name_ tp_---- semantic domain-newtype T_EChild = T_EChild {- attach_T_EChild :: Identity (T_EChild_s2 )- }-newtype T_EChild_s2 = C_EChild_s2 {- inv_EChild_s2 :: (T_EChild_v1 )- }-data T_EChild_s3 = C_EChild_s3-type T_EChild_v1 = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )-data T_EChild_vIn1 = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (PP_Doc)-data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) ( PP_Doc ) ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Set String) (Set String)-{-# NOINLINE sem_EChild_EChild #-}-sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild -sem_EChild_EChild arg_name_ arg_tp_ arg_kind_ arg_hasAround_ _ _ = T_EChild (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_EChild_v1 - v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule0 _usedArgs_augmented_f1 _usedArgs_augmented_syn- _usedArgs_augmented_f1 = rule1 arg_kind_ arg_name_- _tpDoc = rule2 _addStrict arg_tp_- _strNm = rule3 _lhsIcon _lhsInt arg_name_- _field = rule4 _lhsIoptions _strNm _tpDoc- _addStrict = rule5 _lhsIoptions- _lhsOdatatype :: PP_Doc- _lhsOdatatype = rule6 _field arg_kind_- _lhsOargnamesw :: PP_Doc - _lhsOargnamesw = rule7 _nt arg_kind_ arg_name_- _lhsOargtps :: PP_Doc - _lhsOargtps = rule8 arg_kind_ arg_tp_- _argpats = rule9 arg_kind_ arg_name_- _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule10 _introcode arg_name_- _isDefor = rule11 arg_tp_- _valcode = rule12 _isDefor _lhsIoptions _nt arg_kind_ arg_name_- _aroundcode = rule13 arg_hasAround_ arg_name_- _introcode = rule14 _addbang _aroundcode _initSt _isDefor _lhsIoptions _nt _valcode arg_hasAround_ arg_kind_ arg_name_- _nt = rule15 arg_tp_- _addbang = rule16 _lhsIoptions- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule17 arg_name_ arg_tp_- _initSt = rule18 _lhsIallInitStates _nt- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule19 ()- _usedArgs_augmented_syn = rule20 ()- _lhsOargpats :: PP_Doc - _lhsOargpats = rule21 _argpats- __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs- in __result_ )- in C_EChild_s2 v1- {-# INLINE rule0 #-}- rule0 = \ _usedArgs_augmented_f1 _usedArgs_augmented_syn ->- foldr ($) _usedArgs_augmented_syn [_usedArgs_augmented_f1]- {-# INLINE rule1 #-}- rule1 = \ kind_ name_ ->- \s -> case kind_ of- ChildSyntax -> Set.insert ("arg_" ++ show name_ ++ "_") s- _ -> s- {-# INLINE rule2 #-}- {-# LINE 204 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule2 = \ _addStrict tp_ ->- {-# LINE 204 "./src-ag/ExecutionPlan2Hs.ag" #-}- _addStrict $ pp_parens $ ppTp $ removeDeforested tp_- {-# LINE 414 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule3 #-}- {-# LINE 205 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule3 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->- {-# LINE 205 "./src-ag/ExecutionPlan2Hs.ag" #-}- recordFieldname _lhsInt _lhsIcon name_- {-# LINE 420 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule4 #-}- {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule4 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->- {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}- if dataRecords _lhsIoptions- then _strNm >#< "::" >#< _tpDoc- else _tpDoc- {-# LINE 428 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule5 #-}- {-# LINE 209 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule5 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 209 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if strictData _lhsIoptions then "!" >|< x else x- {-# LINE 434 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule6 #-}- {-# LINE 210 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule6 = \ _field kind_ ->- {-# LINE 210 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildAttr -> empty- _ -> _field- {-# LINE 442 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule7 #-}- {-# LINE 298 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule7 = \ _nt kind_ name_ ->- {-# LINE 298 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> "(" >#< "sem_" >|< _nt >#< name_ >|< "_" >#< ")"- ChildAttr -> empty- ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"- {-# LINE 451 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule8 #-}- {-# LINE 565 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule8 = \ kind_ tp_ ->- {-# LINE 565 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> ppDefor tp_ >#< "->"- ChildReplace tp -> ppDefor tp >#< "->"- _ -> empty- {-# LINE 460 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule9 #-}- {-# LINE 569 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule9 = \ kind_ name_ ->- {-# LINE 569 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> name_ >|< "_"- ChildReplace _ -> name_ >|< "_"- _ -> empty- {-# LINE 469 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule10 #-}- {-# LINE 917 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule10 = \ _introcode name_ ->- {-# LINE 917 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _introcode- {-# LINE 475 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule11 #-}- {-# LINE 918 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule11 = \ tp_ ->- {-# LINE 918 "./src-ag/ExecutionPlan2Hs.ag" #-}- case tp_ of- NT _ _ defor -> defor- _ -> False- {-# LINE 483 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule12 #-}- {-# LINE 921 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule12 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->- {-# LINE 921 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- ChildSyntax -> "arg_" >|< name_ >|< "_"- ChildAttr ->- let prefix | not _isDefor = if lateHigherOrderBinding _lhsIoptions- then lateSemNtLabel _nt >#< lhsname True idLateBindingAttr- else "sem_" >|< _nt- | otherwise = empty- in pp_parens (prefix >#< instname name_)- ChildReplace _ ->- pp_parens (instname name_ >#< name_ >|< "_")- {-# LINE 498 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule13 #-}- {-# LINE 932 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule13 = \ hasAround_ name_ ->- {-# LINE 932 "./src-ag/ExecutionPlan2Hs.ag" #-}- if hasAround_- then locname name_ >|< "_around"- else empty- {-# LINE 506 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule14 #-}- {-# LINE 935 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule14 = \ _addbang _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->- {-# LINE 935 "./src-ag/ExecutionPlan2Hs.ag" #-}- \kind fmtMode ->- let pat = text $ stname name_ _initSt- patStrict = _addbang pat- attach = "attach_T_" >|< _nt >#< pp_parens (_aroundcode >#< _valcode )- runAttach = unMon _lhsIoptions >#< pp_parens attach- decl = case kind of- VisitPure False -> pat >#< "=" >#< runAttach- VisitPure True -> patStrict >#< "=" >#< runAttach- VisitMonadic -> patStrict >#< "<-" >#< attach- in if compatibleAttach kind _nt _lhsIoptions- then Right ( fmtDecl False fmtMode decl- , Set.singleton (stname name_ _initSt )- , case kind_ of- ChildAttr -> Map.insert (instname name_) Nothing $- ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)- then id- else Map.insert (lhsname True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)- ) $- ( if hasAround_- then Map.insert (locname (name_) ++ "_around") Nothing- else id- ) $ Map.empty- ChildReplace _ -> Map.singleton (instname name_) Nothing- ChildSyntax -> Map.empty- )- else Left $ IncompatibleAttachKind name_ kind- {-# LINE 537 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule15 #-}- {-# LINE 961 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule15 = \ tp_ ->- {-# LINE 961 "./src-ag/ExecutionPlan2Hs.ag" #-}- extractNonterminal tp_- {-# LINE 543 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule16 #-}- {-# LINE 1539 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule16 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1539 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 549 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule17 #-}- {-# LINE 1591 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule17 = \ name_ tp_ ->- {-# LINE 1591 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ tp_- {-# LINE 555 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule18 #-}- {-# LINE 1635 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule18 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->- {-# LINE 1635 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates- {-# LINE 561 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule19 #-}- rule19 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule20 #-}- rule20 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule21 #-}- rule21 = \ _argpats ->- _argpats-{-# NOINLINE sem_EChild_ETerm #-}-sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild -sem_EChild_ETerm arg_name_ arg_tp_ = T_EChild (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_EChild_v1 - v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let- _tpDoc = rule22 _addStrict arg_tp_- _strNm = rule23 _lhsIcon _lhsInt arg_name_- _field = rule24 _lhsIoptions _strNm _tpDoc- _addStrict = rule25 _lhsIoptions- _lhsOdatatype :: PP_Doc- _lhsOdatatype = rule26 _field- _lhsOargnamesw :: PP_Doc - _lhsOargnamesw = rule27 arg_name_- _lhsOargtps :: PP_Doc - _lhsOargtps = rule28 arg_tp_- _argpats = rule29 _addbang arg_name_- _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule30 arg_name_- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule31 arg_name_- _addbang = rule32 _lhsIoptions- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule33 arg_name_ arg_tp_- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule34 ()- _lhsOargpats :: PP_Doc - _lhsOargpats = rule35 _argpats- __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs- in __result_ )- in C_EChild_s2 v1- {-# INLINE rule22 #-}- {-# LINE 204 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule22 = \ _addStrict tp_ ->- {-# LINE 204 "./src-ag/ExecutionPlan2Hs.ag" #-}- _addStrict $ pp_parens $ ppTp $ removeDeforested tp_- {-# LINE 608 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule23 #-}- {-# LINE 205 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule23 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->- {-# LINE 205 "./src-ag/ExecutionPlan2Hs.ag" #-}- recordFieldname _lhsInt _lhsIcon name_- {-# LINE 614 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule24 #-}- {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule24 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->- {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}- if dataRecords _lhsIoptions- then _strNm >#< "::" >#< _tpDoc- else _tpDoc- {-# LINE 622 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule25 #-}- {-# LINE 209 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule25 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 209 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if strictData _lhsIoptions then "!" >|< x else x- {-# LINE 628 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule26 #-}- {-# LINE 214 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule26 = \ _field ->- {-# LINE 214 "./src-ag/ExecutionPlan2Hs.ag" #-}- _field- {-# LINE 634 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule27 #-}- {-# LINE 302 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule27 = \ name_ ->- {-# LINE 302 "./src-ag/ExecutionPlan2Hs.ag" #-}- text $ fieldname name_- {-# LINE 640 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule28 #-}- {-# LINE 573 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule28 = \ tp_ ->- {-# LINE 573 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pp_parens $ show tp_) >#< "->"- {-# LINE 646 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule29 #-}- {-# LINE 574 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule29 = \ _addbang name_ ->- {-# LINE 574 "./src-ag/ExecutionPlan2Hs.ag" #-}- _addbang $ text $ fieldname name_- {-# LINE 652 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule30 #-}- {-# LINE 916 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule30 = \ name_ ->- {-# LINE 916 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ (\_ _ -> Right (empty, Set.empty, Map.empty))- {-# LINE 658 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule31 #-}- {-# LINE 1308 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule31 = \ name_ ->- {-# LINE 1308 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.singleton $ fieldname name_- {-# LINE 664 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule32 #-}- {-# LINE 1540 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule32 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1540 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 670 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule33 #-}- {-# LINE 1591 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule33 = \ name_ tp_ ->- {-# LINE 1591 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ tp_- {-# LINE 676 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule34 #-}- rule34 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule35 #-}- rule35 = \ _argpats ->- _argpats---- EChildren ------------------------------------------------------ wrapper-data Inh_EChildren = Inh_EChildren { allInitStates_Inh_EChildren :: (Map NontermIdent Int), con_Inh_EChildren :: (ConstructorIdent), importBlocks_Inh_EChildren :: (PP_Doc), mainFile_Inh_EChildren :: (String), mainName_Inh_EChildren :: (String), moduleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String), nt_Inh_EChildren :: (NontermIdent), options_Inh_EChildren :: (Options), pragmaBlocks_Inh_EChildren :: (String), textBlocks_Inh_EChildren :: (PP_Doc) }-data Syn_EChildren = Syn_EChildren { argnamesw_Syn_EChildren :: ([PP_Doc]), argpats_Syn_EChildren :: ( [PP_Doc] ), argtps_Syn_EChildren :: ( [PP_Doc] ), childTypes_Syn_EChildren :: (Map Identifier Type), childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), datatype_Syn_EChildren :: ([PP_Doc]), terminaldefs_Syn_EChildren :: (Set String), usedArgs_Syn_EChildren :: (Set String) }-{-# INLINABLE wrap_EChildren #-}-wrap_EChildren :: T_EChildren -> Inh_EChildren -> (Syn_EChildren )-wrap_EChildren (T_EChildren act) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks- (T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs) <- return (inv_EChildren_s5 sem arg)- return (Syn_EChildren _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs)- )---- cata-{-# NOINLINE sem_EChildren #-}-sem_EChildren :: EChildren -> T_EChildren -sem_EChildren list = Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list)---- semantic domain-newtype T_EChildren = T_EChildren {- attach_T_EChildren :: Identity (T_EChildren_s5 )- }-newtype T_EChildren_s5 = C_EChildren_s5 {- inv_EChildren_s5 :: (T_EChildren_v4 )- }-data T_EChildren_s6 = C_EChildren_s6-type T_EChildren_v4 = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )-data T_EChildren_vIn4 = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (PP_Doc)-data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) ( [PP_Doc] ) ( [PP_Doc] ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([PP_Doc]) (Set String) (Set String)-{-# NOINLINE sem_EChildren_Cons #-}-sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren -sem_EChildren_Cons arg_hd_ arg_tl_ = T_EChildren (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_EChildren_v4 - v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let- _hdX2 = Control.Monad.Identity.runIdentity (attach_T_EChild (arg_hd_))- _tlX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_tl_))- (T_EChild_vOut1 _hdIargnamesw _hdIargpats _hdIargtps _hdIchildTypes _hdIchildintros _hdIdatatype _hdIterminaldefs _hdIusedArgs) = inv_EChild_s2 _hdX2 (T_EChild_vIn1 _hdOallInitStates _hdOcon _hdOimportBlocks _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOtextBlocks)- (T_EChildren_vOut4 _tlIargnamesw _tlIargpats _tlIargtps _tlIchildTypes _tlIchildintros _tlIdatatype _tlIterminaldefs _tlIusedArgs) = inv_EChildren_s5 _tlX5 (T_EChildren_vIn4 _tlOallInitStates _tlOcon _tlOimportBlocks _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOtextBlocks)- _lhsOargnamesw :: [PP_Doc]- _lhsOargnamesw = rule36 _hdIargnamesw _tlIargnamesw- _lhsOargpats :: [PP_Doc] - _lhsOargpats = rule37 _hdIargpats _tlIargpats- _lhsOargtps :: [PP_Doc] - _lhsOargtps = rule38 _hdIargtps _tlIargtps- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule39 _hdIchildTypes _tlIchildTypes- _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule40 _hdIchildintros _tlIchildintros- _lhsOdatatype :: [PP_Doc]- _lhsOdatatype = rule41 _hdIdatatype _tlIdatatype- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule42 _hdIterminaldefs _tlIterminaldefs- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule43 _hdIusedArgs _tlIusedArgs- _hdOallInitStates = rule44 _lhsIallInitStates- _hdOcon = rule45 _lhsIcon- _hdOimportBlocks = rule46 _lhsIimportBlocks- _hdOmainFile = rule47 _lhsImainFile- _hdOmainName = rule48 _lhsImainName- _hdOmoduleHeader = rule49 _lhsImoduleHeader- _hdOnt = rule50 _lhsInt- _hdOoptions = rule51 _lhsIoptions- _hdOpragmaBlocks = rule52 _lhsIpragmaBlocks- _hdOtextBlocks = rule53 _lhsItextBlocks- _tlOallInitStates = rule54 _lhsIallInitStates- _tlOcon = rule55 _lhsIcon- _tlOimportBlocks = rule56 _lhsIimportBlocks- _tlOmainFile = rule57 _lhsImainFile- _tlOmainName = rule58 _lhsImainName- _tlOmoduleHeader = rule59 _lhsImoduleHeader- _tlOnt = rule60 _lhsInt- _tlOoptions = rule61 _lhsIoptions- _tlOpragmaBlocks = rule62 _lhsIpragmaBlocks- _tlOtextBlocks = rule63 _lhsItextBlocks- __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs- in __result_ )- in C_EChildren_s5 v4- {-# INLINE rule36 #-}- rule36 = \ ((_hdIargnamesw) :: PP_Doc ) ((_tlIargnamesw) :: [PP_Doc]) ->- _hdIargnamesw : _tlIargnamesw- {-# INLINE rule37 #-}- rule37 = \ ((_hdIargpats) :: PP_Doc ) ((_tlIargpats) :: [PP_Doc] ) ->- _hdIargpats : _tlIargpats- {-# INLINE rule38 #-}- rule38 = \ ((_hdIargtps) :: PP_Doc ) ((_tlIargtps) :: [PP_Doc] ) ->- _hdIargtps : _tlIargtps- {-# INLINE rule39 #-}- rule39 = \ ((_hdIchildTypes) :: Map Identifier Type) ((_tlIchildTypes) :: Map Identifier Type) ->- _hdIchildTypes `mappend` _tlIchildTypes- {-# INLINE rule40 #-}- rule40 = \ ((_hdIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((_tlIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _hdIchildintros `Map.union` _tlIchildintros- {-# INLINE rule41 #-}- rule41 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->- _hdIdatatype : _tlIdatatype- {-# INLINE rule42 #-}- rule42 = \ ((_hdIterminaldefs) :: Set String) ((_tlIterminaldefs) :: Set String) ->- _hdIterminaldefs `Set.union` _tlIterminaldefs- {-# INLINE rule43 #-}- rule43 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->- _hdIusedArgs `Set.union` _tlIusedArgs- {-# INLINE rule44 #-}- rule44 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule45 #-}- rule45 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule46 #-}- rule46 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule47 #-}- rule47 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule48 #-}- rule48 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule49 #-}- rule49 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule50 #-}- rule50 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule51 #-}- rule51 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule52 #-}- rule52 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule53 #-}- rule53 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule54 #-}- rule54 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule55 #-}- rule55 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule56 #-}- rule56 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule57 #-}- rule57 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule58 #-}- rule58 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule59 #-}- rule59 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule60 #-}- rule60 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule61 #-}- rule61 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule62 #-}- rule62 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule63 #-}- rule63 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks-{-# NOINLINE sem_EChildren_Nil #-}-sem_EChildren_Nil :: T_EChildren -sem_EChildren_Nil = T_EChildren (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_EChildren_v4 - v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let- _lhsOargnamesw :: [PP_Doc]- _lhsOargnamesw = rule64 ()- _lhsOargpats :: [PP_Doc] - _lhsOargpats = rule65 ()- _lhsOargtps :: [PP_Doc] - _lhsOargtps = rule66 ()- _lhsOchildTypes :: Map Identifier Type- _lhsOchildTypes = rule67 ()- _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))- _lhsOchildintros = rule68 ()- _lhsOdatatype :: [PP_Doc]- _lhsOdatatype = rule69 ()- _lhsOterminaldefs :: Set String- _lhsOterminaldefs = rule70 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule71 ()- __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs- in __result_ )- in C_EChildren_s5 v4- {-# INLINE rule64 #-}- rule64 = \ (_ :: ()) ->- []- {-# INLINE rule65 #-}- rule65 = \ (_ :: ()) ->- []- {-# INLINE rule66 #-}- rule66 = \ (_ :: ()) ->- []- {-# INLINE rule67 #-}- rule67 = \ (_ :: ()) ->- mempty- {-# INLINE rule68 #-}- rule68 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule69 #-}- rule69 = \ (_ :: ()) ->- []- {-# INLINE rule70 #-}- rule70 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule71 #-}- rule71 = \ (_ :: ()) ->- Set.empty---- ENonterminal --------------------------------------------------- wrapper-data Inh_ENonterminal = Inh_ENonterminal { allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), derivings_Inh_ENonterminal :: (Derivings), importBlocks_Inh_ENonterminal :: (PP_Doc), inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminal :: (String), mainName_Inh_ENonterminal :: (String), moduleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String), options_Inh_ENonterminal :: (Options), pragmaBlocks_Inh_ENonterminal :: (String), synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), textBlocks_Inh_ENonterminal :: (PP_Doc), typeSyns_Inh_ENonterminal :: (TypeSyns), wrappers_Inh_ENonterminal :: (Set NontermIdent) }-data Syn_ENonterminal = Syn_ENonterminal { appendCommon_Syn_ENonterminal :: ( PP_Doc ), appendMain_Syn_ENonterminal :: ( PP_Doc ), childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_ENonterminal :: (Seq Error), fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_ENonterminal :: (IO ()), imports_Syn_ENonterminal :: ([PP_Doc]), initStates_Syn_ENonterminal :: (Map NontermIdent Int), output_Syn_ENonterminal :: (PP_Doc), semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_ENonterminal #-}-wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> (Syn_ENonterminal )-wrap_ENonterminal (T_ENonterminal act) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers- (T_ENonterminal_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminal_s8 sem arg)- return (Syn_ENonterminal _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# INLINE sem_ENonterminal #-}-sem_ENonterminal :: ENonterminal -> T_ENonterminal -sem_ENonterminal ( ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ prods_ recursive_ hoInfo_ ) = sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ ( sem_EProductions prods_ ) recursive_ hoInfo_---- semantic domain-newtype T_ENonterminal = T_ENonterminal {- attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )- }-newtype T_ENonterminal_s8 = C_ENonterminal_s8 {- inv_ENonterminal_s8 :: (T_ENonterminal_v7 )- }-data T_ENonterminal_s9 = C_ENonterminal_s9-type T_ENonterminal_v7 = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )-data T_ENonterminal_vIn7 = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Derivings) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)-data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 ( PP_Doc ) ( PP_Doc ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_ENonterminal_ENonterminal #-}-sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> (Maybe VisitIdentifier) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal -sem_ENonterminal_ENonterminal arg_nt_ arg_params_ arg_classCtxs_ arg_initial_ arg_initialv_ arg_nextVisits_ arg_prevVisits_ arg_prods_ arg_recursive_ _ = T_ENonterminal (return st8) where- {-# NOINLINE st8 #-}- st8 = let- v7 :: T_ENonterminal_v7 - v7 = \ (T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let- _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_prods_))- (T_EProductions_vOut16 _prodsIallvisits _prodsIchildvisit _prodsIcount _prodsIdatatype _prodsIerrors _prodsIfromToStates _prodsIgenProdIO _prodsIimports _prodsIsemFunBndDefs _prodsIsemFunBndTps _prodsIsem_nt _prodsIsem_prod _prodsIt_visits _prodsIvisitKinds _prodsIvisitdefs _prodsIvisituses) = inv_EProductions_s17 _prodsX17 (T_EProductions_vIn16 _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOclassCtxs _prodsOimportBlocks _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOmoduleHeader _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOpragmaBlocks _prodsOprevVisits _prodsOrename _prodsOsynmap _prodsOtextBlocks)- _prodsOrename = rule72 _lhsIoptions- _prodsOnt = rule73 arg_nt_- _prodsOparams = rule74 arg_params_- _prodsOclassCtxs = rule75 arg_classCtxs_- _lhsOoutput :: PP_Doc- _lhsOoutput = rule76 _datatype _hasWrapper _k_states _lhsIoptions _prodsIsem_prod _prodsIt_visits _sem_nt _t_init _t_states _wr_inh _wr_syn _wrapper arg_nt_- _hasWrapper = rule77 _lhsIwrappers arg_nt_- _classPP = rule78 arg_classCtxs_- _aliasPre = rule79 _classPP _t_params arg_nt_- _datatype = rule80 _aliasPre _classPP _derivings _lhsItypeSyns _prodsIdatatype _t_params arg_nt_- _derivings = rule81 _lhsIderivings arg_nt_- _fsemname = rule82 ()- _semname = rule83 _fsemname arg_nt_- _frecarg = rule84 _fsemname- _sem_tp = rule85 _classPP _quantPP _t_params _t_type arg_nt_- _quantPP = rule86 arg_params_- _sem_nt = rule87 _frecarg _fsemname _lhsItypeSyns _prodsIsem_nt _semPragma _sem_tp _semname arg_nt_- _inlineNt = rule88 _hasWrapper _lhsIoptions _prodsIcount arg_recursive_- _semPragma = rule89 _inlineNt _lhsIoptions _semname- (Just _prodsOinhmap) = rule90 _lhsIinhmap arg_nt_- (Just _prodsOsynmap) = rule91 _lhsIsynmap arg_nt_- _prodsOallInhmap = rule92 _lhsIinhmap- _prodsOallSynmap = rule93 _lhsIsynmap- _outedges = rule94 _prodsIallvisits- _inedges = rule95 _prodsIallvisits- _allstates = rule96 _inedges _outedges arg_initial_- _stvisits = rule97 _prodsIallvisits- _t_type = rule98 arg_nt_- _t_params = rule99 arg_params_- _t_init = rule100 _lhsIoptions _t_params _t_type arg_initial_- _t_states = rule101 _allstates _t_params arg_nextVisits_ arg_nt_- _k_type = rule102 arg_nt_- _k_states = rule103 _allstates _k_type _prodsIallvisits _t_params _t_type arg_nextVisits_ arg_nt_- _wr_inh = rule104 _genwrap _wr_inhs- _wr_syn = rule105 _genwrap _wr_syns- _genwrap = rule106 _addbang _t_params arg_nt_- _synAttrs = rule107 _lhsIinhmap arg_nt_- _wr_inhs = rule108 _synAttrs _wr_filter- _wr_inhs1 = rule109 _synAttrs- _wr_filter = rule110 _lhsIoptions- _wr_syns = rule111 _lhsIsynmap arg_nt_- _inhlist = rule112 _wr_inhs- _inhlist1 = rule113 _wr_inhs1- _synlist = rule114 _wr_syns- _wrapname = rule115 arg_nt_- _inhname = rule116 arg_nt_- _synname = rule117 arg_nt_- _firstVisitInfo = rule118 arg_initial_ arg_nextVisits_- _wrapper = rule119 _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type _lhsIallVisitKinds _lhsImainName _lhsIoptions _quantPP _synlist _synname _t_params _t_type _wrapPragma _wrapname arg_initial_ arg_initialv_ arg_nt_- _wrapPragma = rule120 _lhsIoptions _wrapname- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule121 _prodsIsemFunBndDefs _semFunBndDef- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule122 _prodsIsemFunBndTps _semFunBndTp- _semFunBndDef = rule123 _semFunBndNm _semname- _semFunBndTp = rule124 _semFunBndNm _sem_tp- _semFunBndNm = rule125 arg_nt_- _prodsOinitial = rule126 arg_initial_- _prodsOallstates = rule127 _allstates- _lhsOappendMain :: PP_Doc - _lhsOappendMain = rule128 _lhsIwrappers _sem_nt _wr_inh _wr_syn _wrapper arg_nt_- _lhsOappendCommon :: PP_Doc - _lhsOappendCommon = rule129 _datatype _k_states _lhsIoptions _prodsIt_visits _t_init _t_states- _addbang = rule130 _lhsIoptions- _addbangWrap = rule131 ()- _prodsOnextVisits = rule132 arg_nextVisits_- _prodsOprevVisits = rule133 arg_prevVisits_- _prodsOlocalAttrTypes = rule134 _lhsIlocalAttrTypes arg_nt_- _lhsOinitStates :: Map NontermIdent Int- _lhsOinitStates = rule135 arg_initial_ arg_nt_- _ntType = rule136 arg_nt_ arg_params_- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule137 _prodsIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule138 _prodsIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule139 _prodsIfromToStates- _lhsOgenProdIO :: IO ()- _lhsOgenProdIO = rule140 _prodsIgenProdIO- _lhsOimports :: [PP_Doc]- _lhsOimports = rule141 _prodsIimports- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule142 _prodsIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule143 _prodsIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule144 _prodsIvisituses- _prodsOallFromToStates = rule145 _lhsIallFromToStates- _prodsOallInitStates = rule146 _lhsIallInitStates- _prodsOallVisitKinds = rule147 _lhsIallVisitKinds- _prodsOallchildvisit = rule148 _lhsIallchildvisit- _prodsOavisitdefs = rule149 _lhsIavisitdefs- _prodsOavisituses = rule150 _lhsIavisituses- _prodsOimportBlocks = rule151 _lhsIimportBlocks- _prodsOmainFile = rule152 _lhsImainFile- _prodsOmainName = rule153 _lhsImainName- _prodsOmoduleHeader = rule154 _lhsImoduleHeader- _prodsOntType = rule155 _ntType- _prodsOoptions = rule156 _lhsIoptions- _prodsOpragmaBlocks = rule157 _lhsIpragmaBlocks- _prodsOtextBlocks = rule158 _lhsItextBlocks- __result_ = T_ENonterminal_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_ENonterminal_s8 v7- {-# INLINE rule72 #-}- {-# LINE 55 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule72 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 55 "./src-ag/ExecutionPlan2Hs.ag" #-}- rename _lhsIoptions- {-# LINE 1047 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule73 #-}- {-# LINE 63 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule73 = \ nt_ ->- {-# LINE 63 "./src-ag/ExecutionPlan2Hs.ag" #-}- nt_- {-# LINE 1053 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule74 #-}- {-# LINE 75 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule74 = \ params_ ->- {-# LINE 75 "./src-ag/ExecutionPlan2Hs.ag" #-}- params_- {-# LINE 1059 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule75 #-}- {-# LINE 79 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule75 = \ classCtxs_ ->- {-# LINE 79 "./src-ag/ExecutionPlan2Hs.ag" #-}- classCtxs_- {-# LINE 1065 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule76 #-}- {-# LINE 96 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule76 = \ _datatype _hasWrapper _k_states ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) ((_prodsIt_visits) :: PP_Doc) _sem_nt _t_init _t_states _wr_inh _wr_syn _wrapper nt_ ->- {-# LINE 96 "./src-ag/ExecutionPlan2Hs.ag" #-}- ("-- " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')- >-< (if dataTypes _lhsIoptions- then "-- data"- >-< _datatype- >-< ""- else empty)- >-< (if _hasWrapper- then "-- wrapper"- >-< _wr_inh- >-< _wr_syn- >-< _wrapper- >-< ""- else empty)- >-< (if folds _lhsIoptions- then "-- cata"- >-< _sem_nt- >-< ""- else empty)- >-< (if semfuns _lhsIoptions- then "-- semantic domain"- >-< _t_init- >-< _t_states- >-< _k_states- >-< _prodsIt_visits- >-< _prodsIsem_prod- >-< ""- else empty)- {-# LINE 1097 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule77 #-}- {-# LINE 123 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule77 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->- {-# LINE 123 "./src-ag/ExecutionPlan2Hs.ag" #-}- nt_ `Set.member` _lhsIwrappers- {-# LINE 1103 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule78 #-}- {-# LINE 136 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule78 = \ classCtxs_ ->- {-# LINE 136 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppClasses $ classCtxsToDocs classCtxs_- {-# LINE 1109 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule79 #-}- {-# LINE 137 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule79 = \ _classPP _t_params nt_ ->- {-# LINE 137 "./src-ag/ExecutionPlan2Hs.ag" #-}- "type" >#< _classPP >#< nt_ >#< _t_params >#< "="- {-# LINE 1115 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule80 #-}- {-# LINE 138 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule80 = \ _aliasPre _classPP _derivings ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) _t_params nt_ ->- {-# LINE 138 "./src-ag/ExecutionPlan2Hs.ag" #-}- case lookup nt_ _lhsItypeSyns of- Nothing -> "data" >#< _classPP >#< nt_ >#< _t_params- >-< ( if null _prodsIdatatype- then empty- else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)- : (map ("|" >#<) $ tail _prodsIdatatype))- )- >-< indent 2 _derivings- Just (List t) -> _aliasPre >#< "[" >#< show t >#< "]"- Just (Maybe t) -> _aliasPre >#< "Maybe" >#< show t- Just (Tuple ts) -> _aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)- Just (Either l r) -> _aliasPre >#< "Either" >#< show l >#< show r- Just (Map k v) -> _aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< show v- Just (IntMap t) -> _aliasPre >#< "Data.IntMap.IntMap" >#< show t- Just (OrdSet t) -> _aliasPre >#< "Data.Set.Set" >#< show t- Just IntSet -> _aliasPre >#< "Data.IntSet.IntSet"- {-# LINE 1136 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule81 #-}- {-# LINE 155 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule81 = \ ((_lhsIderivings) :: Derivings) nt_ ->- {-# LINE 155 "./src-ag/ExecutionPlan2Hs.ag" #-}- case Map.lookup nt_ _lhsIderivings of- Nothing -> empty- Just s -> if Set.null s- then empty- else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)- {-# LINE 1146 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule82 #-}- {-# LINE 225 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule82 = \ (_ :: ()) ->- {-# LINE 225 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> "sem_" ++ show x- {-# LINE 1152 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule83 #-}- {-# LINE 226 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule83 = \ _fsemname nt_ ->- {-# LINE 226 "./src-ag/ExecutionPlan2Hs.ag" #-}- _fsemname nt_- {-# LINE 1158 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule84 #-}- {-# LINE 227 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule84 = \ _fsemname ->- {-# LINE 227 "./src-ag/ExecutionPlan2Hs.ag" #-}- \t x -> case t of- NT nt _ _ -> pp_parens (_fsemname nt >#< x)- _ -> pp x- {-# LINE 1166 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule85 #-}- {-# LINE 233 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule85 = \ _classPP _quantPP _t_params _t_type nt_ ->- {-# LINE 233 "./src-ag/ExecutionPlan2Hs.ag" #-}- _quantPP >#< _classPP >#< nt_ >#< _t_params >#< "->" >#< _t_type >#< _t_params- {-# LINE 1172 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule86 #-}- {-# LINE 234 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule86 = \ params_ ->- {-# LINE 234 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppQuants params_- {-# LINE 1178 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule87 #-}- {-# LINE 235 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule87 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) ((_prodsIsem_nt) :: PP_Doc) _semPragma _sem_tp _semname nt_ ->- {-# LINE 235 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semPragma- >-< _semname >#< "::" >#< _sem_tp- >-< case lookup nt_ _lhsItypeSyns of- Nothing -> _prodsIsem_nt- Just (List t) -> _semname >#< "list" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Cons"- >#< _semname >|< "_Nil"- >#< case t of- NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt >#< "list")- _ -> pp "list"- Just (Maybe t) -> _semname >#< "Prelude.Nothing" >#< "=" >#< _semname >|< "_Nothing"- >-< _semname >#< pp_parens ("Prelude.Just just") >#< "="- >#< _semname >|< "_Just" >#< _frecarg t "just"- Just (Tuple ts) -> _semname >#< pp_parens (ppCommas $ map fst ts) >#< "="- >#< _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)- Just (Either l r) -> _semname >#< "(Prelude.Left left)" >#< "=" >#< _semname >|< "_Left" >#< _frecarg l "left"- >-< _semname >#< "(Prelude.Right right)" >#< "=" >#< _semname >|< "_Right" >#< _frecarg r "right"- Just (Map k v) -> _semname >#< "m" >#< "=" >#< "Data.Map.foldrWithKey"- >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"- >#< case v of- NT nt _ _ -> pp_parens ("Data.Map.map" >#< _fsemname nt >#< "m")- _ -> pp "m"- Just (IntMap v) -> _semname >#< "m" >#< "=" >#< "Data.IntMap.foldWithKey"- >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"- >#< case v of- NT nt _ _ -> pp_parens ("Data.IntMap.map" >#< _fsemname nt >#< "m")- _ -> pp "m"- Just (OrdSet t) -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"- >#< _semname >|< "_Nil"- >#< pp_parens (- ( case t of- NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt)- _ -> empty- ) >#< pp_parens ("Data.IntSet.elems" >#< "s")- )- Just IntSet -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"- >#< _semname >|< "_Nil"- >#< pp_parens ("Data.IntSet.elems" >#< "s")- {-# LINE 1220 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule88 #-}- {-# LINE 275 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule88 = \ _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIcount) :: Int) recursive_ ->- {-# LINE 275 "./src-ag/ExecutionPlan2Hs.ag" #-}- not (lateHigherOrderBinding _lhsIoptions) && not recursive_ && (_prodsIcount == 1 || (aggressiveInlinePragmas _lhsIoptions && not _hasWrapper ))- {-# LINE 1226 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule89 #-}- {-# LINE 276 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule89 = \ _inlineNt ((_lhsIoptions) :: Options) _semname ->- {-# LINE 276 "./src-ag/ExecutionPlan2Hs.ag" #-}- if noInlinePragmas _lhsIoptions- then empty- else if _inlineNt- then ppInline _semname- else if helpInlining _lhsIoptions && not (lateHigherOrderBinding _lhsIoptions)- then ppInlinable _semname- else ppNoInline _semname- {-# LINE 1238 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule90 #-}- {-# LINE 322 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule90 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 322 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.lookup nt_ _lhsIinhmap- {-# LINE 1244 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule91 #-}- {-# LINE 323 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule91 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 323 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.lookup nt_ _lhsIsynmap- {-# LINE 1250 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule92 #-}- {-# LINE 324 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule92 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- {-# LINE 324 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIinhmap- {-# LINE 1256 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule93 #-}- {-# LINE 325 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule93 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- {-# LINE 325 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIsynmap- {-# LINE 1262 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule94 #-}- {-# LINE 346 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule94 = \ ((_prodsIallvisits) :: [VisitStateState]) ->- {-# LINE 346 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits- {-# LINE 1268 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule95 #-}- {-# LINE 347 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule95 = \ ((_prodsIallvisits) :: [VisitStateState]) ->- {-# LINE 347 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits- {-# LINE 1274 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule96 #-}- {-# LINE 348 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule96 = \ _inedges _outedges initial_ ->- {-# LINE 348 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.insert initial_ $ _inedges `Set.union` _outedges- {-# LINE 1280 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule97 #-}- {-# LINE 349 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule97 = \ ((_prodsIallvisits) :: [VisitStateState]) ->- {-# LINE 349 "./src-ag/ExecutionPlan2Hs.ag" #-}- \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits- {-# LINE 1286 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule98 #-}- {-# LINE 350 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule98 = \ nt_ ->- {-# LINE 350 "./src-ag/ExecutionPlan2Hs.ag" #-}- "T_" >|< nt_- {-# LINE 1292 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule99 #-}- {-# LINE 351 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule99 = \ params_ ->- {-# LINE 351 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced params_- {-# LINE 1298 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule100 #-}- {-# LINE 352 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule100 = \ ((_lhsIoptions) :: Options) _t_params _t_type initial_ ->- {-# LINE 352 "./src-ag/ExecutionPlan2Hs.ag" #-}- "newtype" >#< _t_type >#< _t_params >#< "=" >#< _t_type >#<- pp_braces (- "attach_">|< _t_type >#< "::"- >#< ppMonadType _lhsIoptions >#< pp_parens (_t_type >|< "_s" >|< initial_ >#< _t_params ))- {-# LINE 1307 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule101 #-}- {-# LINE 356 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule101 = \ _allstates _t_params nextVisits_ nt_ ->- {-# LINE 356 "./src-ag/ExecutionPlan2Hs.ag" #-}- vlist $ map (\st ->- let nt_st = nt_ >|< "_s" >|< st- t_st = "T_" >|< nt_st- k_st = "K_" >|< nt_st- c_st = "C_" >|< nt_st- inv_st = "inv_" >|< nt_st- nextVisit = Map.findWithDefault ManyVis st nextVisits_- in case nextVisit of- NoneVis -> "data" >#< t_st >#< _t_params >#< "=" >#< c_st- OneVis vId -> "newtype" >#< t_st >#< _t_params >#< "=" >#< c_st- >#< (pp_braces $ inv_st >#< "::" >#< pp_parens (conNmTVisit nt_ vId >#< _t_params ))- ManyVis -> "data" >#< t_st >#< _t_params >#< "where" >#< c_st >#< "::"- >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("forall t." >#< k_st >#< _t_params >#< "t" >#< "->" >#< "t"))- >#< "->" >#< t_st >#< _t_params- ) $ Set.toList _allstates- {-# LINE 1327 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule102 #-}- {-# LINE 374 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule102 = \ nt_ ->- {-# LINE 374 "./src-ag/ExecutionPlan2Hs.ag" #-}- "K_" ++ show nt_- {-# LINE 1333 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule103 #-}- {-# LINE 375 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule103 = \ _allstates _k_type ((_prodsIallvisits) :: [VisitStateState]) _t_params _t_type nextVisits_ nt_ ->- {-# LINE 375 "./src-ag/ExecutionPlan2Hs.ag" #-}- vlist $ map (\st ->- let nt_st = nt_ >|< "_s" >|< st- k_st = "K_" >|< nt_st- outg = filter (\(v,f,t) -> f == st) _prodsIallvisits- visitlist = vlist $ map (\(v,f,t) ->- _k_type >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params >#< pp_parens (_t_type >|< "_v" >|< v >#< _t_params )- ) outg- nextVisit = Map.findWithDefault ManyVis st nextVisits_- decl = "data" >#< k_st >#< "k" >#< _t_params >#< "where" >-< indent 3 visitlist- in case nextVisit of- NoneVis -> empty- OneVis _ -> empty- ManyVis -> decl- ) $ Set.toList _allstates- {-# LINE 1352 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule104 #-}- {-# LINE 442 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule104 = \ _genwrap _wr_inhs ->- {-# LINE 442 "./src-ag/ExecutionPlan2Hs.ag" #-}- _genwrap "Inh" _wr_inhs- {-# LINE 1358 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule105 #-}- {-# LINE 443 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule105 = \ _genwrap _wr_syns ->- {-# LINE 443 "./src-ag/ExecutionPlan2Hs.ag" #-}- _genwrap "Syn" _wr_syns- {-# LINE 1364 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule106 #-}- {-# LINE 444 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule106 = \ _addbang _t_params nt_ ->- {-# LINE 444 "./src-ag/ExecutionPlan2Hs.ag" #-}- \nm attr -> "data" >#< nm >|< "_" >|< nt_ >#< _t_params >#< "=" >#< nm >|< "_" >|< nt_ >#< "{"- >#< (ppCommas $ map (\(i,t) -> i >|< "_" >|< nm >|< "_" >|< nt_ >#< "::"- >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)) attr) >#< "}"- {-# LINE 1372 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule107 #-}- {-# LINE 447 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule107 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 447 "./src-ag/ExecutionPlan2Hs.ag" #-}- fromJust $ Map.lookup nt_ _lhsIinhmap- {-# LINE 1378 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule108 #-}- {-# LINE 448 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule108 = \ _synAttrs _wr_filter ->- {-# LINE 448 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.toList $ _wr_filter $ _synAttrs- {-# LINE 1384 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule109 #-}- {-# LINE 449 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule109 = \ _synAttrs ->- {-# LINE 449 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.toList _synAttrs- {-# LINE 1390 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule110 #-}- {-# LINE 450 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule110 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 450 "./src-ag/ExecutionPlan2Hs.ag" #-}- if lateHigherOrderBinding _lhsIoptions- then Map.delete idLateBindingAttr- else id- {-# LINE 1398 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule111 #-}- {-# LINE 453 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule111 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->- {-# LINE 453 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap- {-# LINE 1404 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule112 #-}- {-# LINE 454 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule112 = \ _wr_inhs ->- {-# LINE 454 "./src-ag/ExecutionPlan2Hs.ag" #-}- map (lhsname True . fst) _wr_inhs- {-# LINE 1410 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule113 #-}- {-# LINE 455 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule113 = \ _wr_inhs1 ->- {-# LINE 455 "./src-ag/ExecutionPlan2Hs.ag" #-}- map (lhsname True . fst) _wr_inhs1- {-# LINE 1416 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule114 #-}- {-# LINE 456 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule114 = \ _wr_syns ->- {-# LINE 456 "./src-ag/ExecutionPlan2Hs.ag" #-}- map (lhsname False . fst) _wr_syns- {-# LINE 1422 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule115 #-}- {-# LINE 457 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule115 = \ nt_ ->- {-# LINE 457 "./src-ag/ExecutionPlan2Hs.ag" #-}- "wrap_" ++ show nt_- {-# LINE 1428 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule116 #-}- {-# LINE 458 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule116 = \ nt_ ->- {-# LINE 458 "./src-ag/ExecutionPlan2Hs.ag" #-}- "Inh_" ++ show nt_- {-# LINE 1434 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule117 #-}- {-# LINE 459 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule117 = \ nt_ ->- {-# LINE 459 "./src-ag/ExecutionPlan2Hs.ag" #-}- "Syn_" ++ show nt_- {-# LINE 1440 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule118 #-}- {-# LINE 460 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule118 = \ initial_ nextVisits_ ->- {-# LINE 460 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault ManyVis initial_ nextVisits_- {-# LINE 1446 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule119 #-}- {-# LINE 461 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule119 = \ _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _quantPP _synlist _synname _t_params _t_type _wrapPragma _wrapname initial_ initialv_ nt_ ->- {-# LINE 461 "./src-ag/ExecutionPlan2Hs.ag" #-}- _wrapPragma- >-< (_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params >#< "->"- >#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))- >-< (_wrapname >#< (_addbang $ pp_parens (_t_type >#< pp "act"))- >#< (_addbang $ pp_parens (_inhname- >#< (ppSpaced $ map (_addbangWrap . pp) _inhlist )) >#< "="))- >-<- indent 3 (case initialv_ of- Nothing -> _synname >#< " { }"- Just initv ->- let inCon = conNmTVisitIn nt_ initv- outCon = conNmTVisitOut nt_ initv- pat = _addbang $ pp_parens $ pat0- pat0 = outCon >#< ppSpaced _synlist- arg = inCon >#< ppSpaced _inhlist1- ind = case _firstVisitInfo of- NoneVis -> error "wrapper: initial state should have a next visit but it has none"- OneVis _ -> empty- ManyVis -> _k_type >|< "_v" >|< initv- extra = if dummyTokenVisit _lhsIoptions- then pp $ dummyArg _lhsIoptions True- else empty- convert = case Map.lookup initv _lhsIallVisitKinds of- Just kind -> case kind of- VisitPure _ -> text "return"- VisitMonadic -> empty- unMonad | monadicWrappers _lhsIoptions = empty- | otherwise = unMon _lhsIoptions- in unMonad >#< "("- >-< indent 2 (- "do" >#< ( _addbang (pp "sem") >#< "<-" >#< "act"- >-< "let" >#< _addbangWrap (pp "arg") >#< "=" >#< arg- >-< pat >#< "<-" >#< convert >#< pp_parens ("inv_" >|< nt_ >|< "_s" >|< initial_ >#< "sem" >#< ind >#< "arg" >#< extra)- >-< "return" >#< pp_parens (_synname >#< ppSpaced _synlist )- )- )- >-< ")" )- >-< if lateHigherOrderBinding _lhsIoptions- then indent 2 ("where" >#< lhsname True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)- else empty- {-# LINE 1491 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule120 #-}- {-# LINE 502 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule120 = \ ((_lhsIoptions) :: Options) _wrapname ->- {-# LINE 502 "./src-ag/ExecutionPlan2Hs.ag" #-}- if parallelInvoke _lhsIoptions && not (monadicWrappers _lhsIoptions)- then ppNoInline _wrapname- else if noInlinePragmas _lhsIoptions- then empty- else ppInlinable _wrapname- {-# LINE 1501 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule121 #-}- {-# LINE 514 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule121 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->- {-# LINE 514 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndDef Seq.<| _prodsIsemFunBndDefs- {-# LINE 1507 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule122 #-}- {-# LINE 515 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule122 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->- {-# LINE 515 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndTp Seq.<| _prodsIsemFunBndTps- {-# LINE 1513 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule123 #-}- {-# LINE 516 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule123 = \ _semFunBndNm _semname ->- {-# LINE 516 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "=" >#< _semname- {-# LINE 1519 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule124 #-}- {-# LINE 517 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule124 = \ _semFunBndNm _sem_tp ->- {-# LINE 517 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "::" >#< _sem_tp- {-# LINE 1525 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule125 #-}- {-# LINE 518 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule125 = \ nt_ ->- {-# LINE 518 "./src-ag/ExecutionPlan2Hs.ag" #-}- lateSemNtLabel nt_- {-# LINE 1531 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule126 #-}- {-# LINE 556 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule126 = \ initial_ ->- {-# LINE 556 "./src-ag/ExecutionPlan2Hs.ag" #-}- initial_- {-# LINE 1537 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule127 #-}- {-# LINE 557 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule127 = \ _allstates ->- {-# LINE 557 "./src-ag/ExecutionPlan2Hs.ag" #-}- _allstates- {-# LINE 1543 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule128 #-}- {-# LINE 1471 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule128 = \ ((_lhsIwrappers) :: Set NontermIdent) _sem_nt _wr_inh _wr_syn _wrapper nt_ ->- {-# LINE 1471 "./src-ag/ExecutionPlan2Hs.ag" #-}- (if nt_ `Set.member` _lhsIwrappers- then _wr_inh- >-< _wr_syn- >-< _wrapper- else empty)- >-< _sem_nt- {-# LINE 1554 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule129 #-}- {-# LINE 1477 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule129 = \ _datatype _k_states ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init _t_states ->- {-# LINE 1477 "./src-ag/ExecutionPlan2Hs.ag" #-}- (if dataTypes _lhsIoptions then _datatype else empty)- >-< _t_init- >-< _t_states- >-< _k_states- >-< _prodsIt_visits- {-# LINE 1564 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule130 #-}- {-# LINE 1537 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule130 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1537 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 1570 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule131 #-}- {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule131 = \ (_ :: ()) ->- {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}- id- {-# LINE 1576 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule132 #-}- {-# LINE 1557 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule132 = \ nextVisits_ ->- {-# LINE 1557 "./src-ag/ExecutionPlan2Hs.ag" #-}- nextVisits_- {-# LINE 1582 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule133 #-}- {-# LINE 1558 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule133 = \ prevVisits_ ->- {-# LINE 1558 "./src-ag/ExecutionPlan2Hs.ag" #-}- prevVisits_- {-# LINE 1588 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule134 #-}- {-# LINE 1602 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule134 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->- {-# LINE 1602 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes- {-# LINE 1594 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule135 #-}- {-# LINE 1629 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule135 = \ initial_ nt_ ->- {-# LINE 1629 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton nt_ initial_- {-# LINE 1600 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule136 #-}- {-# LINE 1643 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule136 = \ nt_ params_ ->- {-# LINE 1643 "./src-ag/ExecutionPlan2Hs.ag" #-}- NT nt_ (map show params_) False- {-# LINE 1606 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule137 #-}- rule137 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _prodsIchildvisit- {-# INLINE rule138 #-}- rule138 = \ ((_prodsIerrors) :: Seq Error) ->- _prodsIerrors- {-# INLINE rule139 #-}- rule139 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _prodsIfromToStates- {-# INLINE rule140 #-}- rule140 = \ ((_prodsIgenProdIO) :: IO ()) ->- _prodsIgenProdIO- {-# INLINE rule141 #-}- rule141 = \ ((_prodsIimports) :: [PP_Doc]) ->- _prodsIimports- {-# INLINE rule142 #-}- rule142 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _prodsIvisitKinds- {-# INLINE rule143 #-}- rule143 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _prodsIvisitdefs- {-# INLINE rule144 #-}- rule144 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _prodsIvisituses- {-# INLINE rule145 #-}- rule145 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule146 #-}- rule146 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule147 #-}- rule147 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule148 #-}- rule148 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule149 #-}- rule149 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule150 #-}- rule150 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule151 #-}- rule151 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule152 #-}- rule152 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule153 #-}- rule153 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule154 #-}- rule154 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule155 #-}- rule155 = \ _ntType ->- _ntType- {-# INLINE rule156 #-}- rule156 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule157 #-}- rule157 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule158 #-}- rule158 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks---- ENonterminals -------------------------------------------------- wrapper-data Inh_ENonterminals = Inh_ENonterminals { allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), derivings_Inh_ENonterminals :: (Derivings), importBlocks_Inh_ENonterminals :: (PP_Doc), inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminals :: (String), mainName_Inh_ENonterminals :: (String), moduleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String), options_Inh_ENonterminals :: (Options), pragmaBlocks_Inh_ENonterminals :: (String), synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), textBlocks_Inh_ENonterminals :: (PP_Doc), typeSyns_Inh_ENonterminals :: (TypeSyns), wrappers_Inh_ENonterminals :: (Set NontermIdent) }-data Syn_ENonterminals = Syn_ENonterminals { appendCommon_Syn_ENonterminals :: ([PP_Doc]), appendMain_Syn_ENonterminals :: ([PP_Doc]), childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_ENonterminals :: (Seq Error), fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_ENonterminals :: (IO ()), imports_Syn_ENonterminals :: ([PP_Doc]), initStates_Syn_ENonterminals :: (Map NontermIdent Int), output_Syn_ENonterminals :: (PP_Doc), semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_ENonterminals #-}-wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> (Syn_ENonterminals )-wrap_ENonterminals (T_ENonterminals act) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers- (T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminals_s11 sem arg)- return (Syn_ENonterminals _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# NOINLINE sem_ENonterminals #-}-sem_ENonterminals :: ENonterminals -> T_ENonterminals -sem_ENonterminals list = Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list)---- semantic domain-newtype T_ENonterminals = T_ENonterminals {- attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )- }-newtype T_ENonterminals_s11 = C_ENonterminals_s11 {- inv_ENonterminals_s11 :: (T_ENonterminals_v10 )- }-data T_ENonterminals_s12 = C_ENonterminals_s12-type T_ENonterminals_v10 = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )-data T_ENonterminals_vIn10 = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Derivings) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)-data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 ([PP_Doc]) ([PP_Doc]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_ENonterminals_Cons #-}-sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals -sem_ENonterminals_Cons arg_hd_ arg_tl_ = T_ENonterminals (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_ENonterminals_v10 - v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let- _hdX8 = Control.Monad.Identity.runIdentity (attach_T_ENonterminal (arg_hd_))- _tlX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_tl_))- (T_ENonterminal_vOut7 _hdIappendCommon _hdIappendMain _hdIchildvisit _hdIerrors _hdIfromToStates _hdIgenProdIO _hdIimports _hdIinitStates _hdIoutput _hdIsemFunBndDefs _hdIsemFunBndTps _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_ENonterminal_s8 _hdX8 (T_ENonterminal_vIn7 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOderivings _hdOimportBlocks _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOoptions _hdOpragmaBlocks _hdOsynmap _hdOtextBlocks _hdOtypeSyns _hdOwrappers)- (T_ENonterminals_vOut10 _tlIappendCommon _tlIappendMain _tlIchildvisit _tlIerrors _tlIfromToStates _tlIgenProdIO _tlIimports _tlIinitStates _tlIoutput _tlIsemFunBndDefs _tlIsemFunBndTps _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_ENonterminals_s11 _tlX11 (T_ENonterminals_vIn10 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOderivings _tlOimportBlocks _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOoptions _tlOpragmaBlocks _tlOsynmap _tlOtextBlocks _tlOtypeSyns _tlOwrappers)- _lhsOappendCommon :: [PP_Doc]- _lhsOappendCommon = rule159 _hdIappendCommon _tlIappendCommon- _lhsOappendMain :: [PP_Doc]- _lhsOappendMain = rule160 _hdIappendMain _tlIappendMain- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule161 _hdIchildvisit _tlIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule162 _hdIerrors _tlIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule163 _hdIfromToStates _tlIfromToStates- _lhsOgenProdIO :: IO ()- _lhsOgenProdIO = rule164 _hdIgenProdIO _tlIgenProdIO- _lhsOimports :: [PP_Doc]- _lhsOimports = rule165 _hdIimports _tlIimports- _lhsOinitStates :: Map NontermIdent Int- _lhsOinitStates = rule166 _hdIinitStates _tlIinitStates- _lhsOoutput :: PP_Doc- _lhsOoutput = rule167 _hdIoutput _tlIoutput- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule168 _hdIsemFunBndDefs _tlIsemFunBndDefs- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule169 _hdIsemFunBndTps _tlIsemFunBndTps- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule170 _hdIvisitKinds _tlIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule171 _hdIvisitdefs _tlIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule172 _hdIvisituses _tlIvisituses- _hdOallFromToStates = rule173 _lhsIallFromToStates- _hdOallInitStates = rule174 _lhsIallInitStates- _hdOallVisitKinds = rule175 _lhsIallVisitKinds- _hdOallchildvisit = rule176 _lhsIallchildvisit- _hdOavisitdefs = rule177 _lhsIavisitdefs- _hdOavisituses = rule178 _lhsIavisituses- _hdOderivings = rule179 _lhsIderivings- _hdOimportBlocks = rule180 _lhsIimportBlocks- _hdOinhmap = rule181 _lhsIinhmap- _hdOlocalAttrTypes = rule182 _lhsIlocalAttrTypes- _hdOmainFile = rule183 _lhsImainFile- _hdOmainName = rule184 _lhsImainName- _hdOmoduleHeader = rule185 _lhsImoduleHeader- _hdOoptions = rule186 _lhsIoptions- _hdOpragmaBlocks = rule187 _lhsIpragmaBlocks- _hdOsynmap = rule188 _lhsIsynmap- _hdOtextBlocks = rule189 _lhsItextBlocks- _hdOtypeSyns = rule190 _lhsItypeSyns- _hdOwrappers = rule191 _lhsIwrappers- _tlOallFromToStates = rule192 _lhsIallFromToStates- _tlOallInitStates = rule193 _lhsIallInitStates- _tlOallVisitKinds = rule194 _lhsIallVisitKinds- _tlOallchildvisit = rule195 _lhsIallchildvisit- _tlOavisitdefs = rule196 _lhsIavisitdefs- _tlOavisituses = rule197 _lhsIavisituses- _tlOderivings = rule198 _lhsIderivings- _tlOimportBlocks = rule199 _lhsIimportBlocks- _tlOinhmap = rule200 _lhsIinhmap- _tlOlocalAttrTypes = rule201 _lhsIlocalAttrTypes- _tlOmainFile = rule202 _lhsImainFile- _tlOmainName = rule203 _lhsImainName- _tlOmoduleHeader = rule204 _lhsImoduleHeader- _tlOoptions = rule205 _lhsIoptions- _tlOpragmaBlocks = rule206 _lhsIpragmaBlocks- _tlOsynmap = rule207 _lhsIsynmap- _tlOtextBlocks = rule208 _lhsItextBlocks- _tlOtypeSyns = rule209 _lhsItypeSyns- _tlOwrappers = rule210 _lhsIwrappers- __result_ = T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_ENonterminals_s11 v10- {-# INLINE rule159 #-}- rule159 = \ ((_hdIappendCommon) :: PP_Doc ) ((_tlIappendCommon) :: [PP_Doc]) ->- _hdIappendCommon : _tlIappendCommon- {-# INLINE rule160 #-}- rule160 = \ ((_hdIappendMain) :: PP_Doc ) ((_tlIappendMain) :: [PP_Doc]) ->- _hdIappendMain : _tlIappendMain- {-# INLINE rule161 #-}- rule161 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _hdIchildvisit `Map.union` _tlIchildvisit- {-# INLINE rule162 #-}- rule162 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule163 #-}- rule163 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _hdIfromToStates `mappend` _tlIfromToStates- {-# INLINE rule164 #-}- rule164 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->- _hdIgenProdIO >> _tlIgenProdIO- {-# INLINE rule165 #-}- rule165 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->- _hdIimports ++ _tlIimports- {-# INLINE rule166 #-}- rule166 = \ ((_hdIinitStates) :: Map NontermIdent Int) ((_tlIinitStates) :: Map NontermIdent Int) ->- _hdIinitStates `mappend` _tlIinitStates- {-# INLINE rule167 #-}- rule167 = \ ((_hdIoutput) :: PP_Doc) ((_tlIoutput) :: PP_Doc) ->- _hdIoutput >-< _tlIoutput- {-# INLINE rule168 #-}- rule168 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->- _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs- {-# INLINE rule169 #-}- rule169 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->- _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps- {-# INLINE rule170 #-}- rule170 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule171 #-}- rule171 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# INLINE rule172 #-}- rule172 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# INLINE rule173 #-}- rule173 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule174 #-}- rule174 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule175 #-}- rule175 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule176 #-}- rule176 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule177 #-}- rule177 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule178 #-}- rule178 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule179 #-}- rule179 = \ ((_lhsIderivings) :: Derivings) ->- _lhsIderivings- {-# INLINE rule180 #-}- rule180 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule181 #-}- rule181 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- _lhsIinhmap- {-# INLINE rule182 #-}- rule182 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- _lhsIlocalAttrTypes- {-# INLINE rule183 #-}- rule183 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule184 #-}- rule184 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule185 #-}- rule185 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule186 #-}- rule186 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule187 #-}- rule187 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule188 #-}- rule188 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- _lhsIsynmap- {-# INLINE rule189 #-}- rule189 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule190 #-}- rule190 = \ ((_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# INLINE rule191 #-}- rule191 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# INLINE rule192 #-}- rule192 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule193 #-}- rule193 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule194 #-}- rule194 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule195 #-}- rule195 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule196 #-}- rule196 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule197 #-}- rule197 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule198 #-}- rule198 = \ ((_lhsIderivings) :: Derivings) ->- _lhsIderivings- {-# INLINE rule199 #-}- rule199 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule200 #-}- rule200 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- _lhsIinhmap- {-# INLINE rule201 #-}- rule201 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- _lhsIlocalAttrTypes- {-# INLINE rule202 #-}- rule202 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule203 #-}- rule203 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule204 #-}- rule204 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule205 #-}- rule205 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule206 #-}- rule206 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule207 #-}- rule207 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- _lhsIsynmap- {-# INLINE rule208 #-}- rule208 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule209 #-}- rule209 = \ ((_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# INLINE rule210 #-}- rule210 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_ENonterminals_Nil #-}-sem_ENonterminals_Nil :: T_ENonterminals -sem_ENonterminals_Nil = T_ENonterminals (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_ENonterminals_v10 - v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let- _lhsOappendCommon :: [PP_Doc]- _lhsOappendCommon = rule211 ()- _lhsOappendMain :: [PP_Doc]- _lhsOappendMain = rule212 ()- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule213 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule214 ()- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule215 ()- _lhsOgenProdIO :: IO ()- _lhsOgenProdIO = rule216 ()- _lhsOimports :: [PP_Doc]- _lhsOimports = rule217 ()- _lhsOinitStates :: Map NontermIdent Int- _lhsOinitStates = rule218 ()- _lhsOoutput :: PP_Doc- _lhsOoutput = rule219 ()- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule220 ()- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule221 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule222 ()- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule223 ()- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule224 ()- __result_ = T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_ENonterminals_s11 v10- {-# INLINE rule211 #-}- rule211 = \ (_ :: ()) ->- []- {-# INLINE rule212 #-}- rule212 = \ (_ :: ()) ->- []- {-# INLINE rule213 #-}- rule213 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule214 #-}- rule214 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule215 #-}- rule215 = \ (_ :: ()) ->- mempty- {-# INLINE rule216 #-}- rule216 = \ (_ :: ()) ->- return ()- {-# INLINE rule217 #-}- rule217 = \ (_ :: ()) ->- []- {-# INLINE rule218 #-}- rule218 = \ (_ :: ()) ->- mempty- {-# INLINE rule219 #-}- rule219 = \ (_ :: ()) ->- empty- {-# INLINE rule220 #-}- rule220 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule221 #-}- rule221 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule222 #-}- rule222 = \ (_ :: ()) ->- mempty- {-# INLINE rule223 #-}- rule223 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule224 #-}- rule224 = \ (_ :: ()) ->- Map.empty---- EProduction ---------------------------------------------------- wrapper-data Inh_EProduction = Inh_EProduction { allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), allInitStates_Inh_EProduction :: (Map NontermIdent Int), allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allstates_Inh_EProduction :: (Set StateIdentifier), avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), classCtxs_Inh_EProduction :: (ClassContext), importBlocks_Inh_EProduction :: (PP_Doc), inhmap_Inh_EProduction :: (Attributes), initial_Inh_EProduction :: (StateIdentifier), localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProduction :: (String), mainName_Inh_EProduction :: (String), moduleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String), nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), nt_Inh_EProduction :: (NontermIdent), ntType_Inh_EProduction :: (Type), options_Inh_EProduction :: (Options), params_Inh_EProduction :: ([Identifier]), pragmaBlocks_Inh_EProduction :: (String), prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), rename_Inh_EProduction :: (Bool), synmap_Inh_EProduction :: (Attributes), textBlocks_Inh_EProduction :: (PP_Doc) }-data Syn_EProduction = Syn_EProduction { allvisits_Syn_EProduction :: ([VisitStateState]), childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), count_Syn_EProduction :: (Int), datatype_Syn_EProduction :: (PP_Doc), errors_Syn_EProduction :: (Seq Error), fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_EProduction :: (IO ()), imports_Syn_EProduction :: ([PP_Doc]), semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), semFunBndTps_Syn_EProduction :: (Seq PP_Doc), sem_nt_Syn_EProduction :: (PP_Doc), sem_prod_Syn_EProduction :: (PP_Doc), t_visits_Syn_EProduction :: (PP_Doc), visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_EProduction #-}-wrap_EProduction :: T_EProduction -> Inh_EProduction -> (Syn_EProduction )-wrap_EProduction (T_EProduction act) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks- (T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProduction_s14 sem arg)- return (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# INLINE sem_EProduction #-}-sem_EProduction :: EProduction -> T_EProduction -sem_EProduction ( EProduction con_ params_ constraints_ rules_ children_ visits_ ) = sem_EProduction_EProduction con_ params_ constraints_ ( sem_ERules rules_ ) ( sem_EChildren children_ ) ( sem_Visits visits_ )---- semantic domain-newtype T_EProduction = T_EProduction {- attach_T_EProduction :: Identity (T_EProduction_s14 )- }-newtype T_EProduction_s14 = C_EProduction_s14 {- inv_EProduction_s14 :: (T_EProduction_v13 )- }-data T_EProduction_s15 = C_EProduction_s15-type T_EProduction_v13 = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )-data T_EProduction_vIn13 = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (String -> String -> String -> Bool -> String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (String) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)-data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_EProduction_EProduction #-}-sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules -> T_EChildren -> T_Visits -> T_EProduction -sem_EProduction_EProduction arg_con_ arg_params_ arg_constraints_ arg_rules_ arg_children_ arg_visits_ = T_EProduction (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_EProduction_v13 - v13 = \ (T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let- _rulesX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_rules_))- _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_children_))- _visitsX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_visits_))- (T_ERules_vOut22 _rulesIerrors _rulesImrules _rulesIruledefs _rulesIruleuses _rulesIsem_rules _rulesIusedArgs) = inv_ERules_s23 _rulesX23 (T_ERules_vIn22 _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOimportBlocks _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOmoduleHeader _rulesOnt _rulesOoptions _rulesOpragmaBlocks _rulesOruleKinds _rulesOsynmap _rulesOtextBlocks _rulesOusageInfo)- (T_EChildren_vOut4 _childrenIargnamesw _childrenIargpats _childrenIargtps _childrenIchildTypes _childrenIchildintros _childrenIdatatype _childrenIterminaldefs _childrenIusedArgs) = inv_EChildren_s5 _childrenX5 (T_EChildren_vIn4 _childrenOallInitStates _childrenOcon _childrenOimportBlocks _childrenOmainFile _childrenOmainName _childrenOmoduleHeader _childrenOnt _childrenOoptions _childrenOpragmaBlocks _childrenOtextBlocks)- (T_Visits_vOut55 _visitsIallvisits _visitsIchildvisit _visitsIerrors _visitsIfromToStates _visitsIintramap _visitsIlazyIntras _visitsIruleKinds _visitsIruleUsage _visitsIsem_visit _visitsIt_visits _visitsIusedArgs _visitsIvisitKinds _visitsIvisitdefs _visitsIvisituses) = inv_Visits_s56 _visitsX56 (T_Visits_vIn55 _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs)- _childrenOcon = rule225 arg_con_- _rulesOcon = rule226 arg_con_- _visitsOcon = rule227 arg_con_- _lhsOdatatype :: PP_Doc- _lhsOdatatype = rule228 _childrenIdatatype _classPP1 _lhsInt _lhsIoptions _lhsIrename _quantPP1 arg_con_- _classPP1 = rule229 arg_constraints_- _quantPP1 = rule230 arg_params_- _lhsOcount :: Int- _lhsOcount = rule231 ()- _lhsOsem_nt :: PP_Doc- _lhsOsem_nt = rule232 _childrenIargnamesw _childrenIargpats _lhsInt _lhsIrename arg_con_- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule233 _semFunBndDef- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule234 _semFunBndTp- _semFunBndDef = rule235 _semFunBndNm _semname- _semFunBndTp = rule236 _semFunBndNm _sem_tp- _semFunBndNm = rule237 _lhsInt arg_con_- _t_type = rule238 _lhsInt- _t_params = rule239 _lhsIparams- _usedArgs = rule240 _childrenIusedArgs _rulesIusedArgs _visitsIusedArgs- _args = rule241 _childrenIargpats _usedArgs- _semname = rule242 _lhsInt arg_con_- _sem_tp = rule243 _childrenIargtps _classPP2 _quantPP2 _t_params _t_type- _classPP2 = rule244 _lhsIclassCtxs arg_constraints_- _quantPP2 = rule245 _lhsIparams arg_params_- _sem_prod = rule246 _args _lhsIinitial _mbInitializer _mkSemBody _outerlet _scc _semInlinePragma _sem_tp _semname _t_type- _mkSemBody = rule247 ()- _mbInitializer = rule248 _lhsIoptions- _scc = rule249 _lhsIoptions _semname- _semInlinePragma = rule250 _lhsIoptions _semname- _outerlet = rule251 _rulesIsem_rules _statefns- _statefns = rule252 _genstfn _lhsIallstates- _genstfn = rule253 _addbang _lhsIinitial _lhsInextVisits _lhsInt _lhsIoptions _lhsIprevVisits _stargs _stks _stvs- _stargs = rule254 _addbang _childTypes _lazyIntras _lhsIallInhmap _lhsIallSynmap _lhsIoptions _localAttrTypes _visitsIintramap- _stks = rule255 _lhsInt _lhsIoptions _stvisits _t_params- _stvisits = rule256 _visitsIallvisits- _stvs = rule257 _visitsIsem_visit- _visitsOmrules = rule258 _rulesImrules- _visitsOchildintros = rule259 _childrenIchildintros- _rulesOusageInfo = rule260 _visitsIruleUsage- _rulesOruleKinds = rule261 _visitsIruleKinds- _visitsOallintramap = rule262 _visitsIintramap- _visitsOterminaldefs = rule263 _childrenIterminaldefs- _visitsOruledefs = rule264 _rulesIruledefs- _visitsOruleuses = rule265 _rulesIruleuses- _lazyIntras = rule266 _visitsIlazyIntras- _lhsOimports :: [PP_Doc]- _lhsOimports = rule267 _moduleName- _moduleName = rule268 _lhsImainName _suffix- _suffix = rule269 _lhsInt arg_con_- _outputfile = rule270 _lhsImainFile _suffix- _ppMonadImports = rule271 _lhsIoptions- _lhsOgenProdIO :: IO ()- _lhsOgenProdIO = rule272 _lhsIimportBlocks _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _outputfile _ppMonadImports _sem_prod _semname _suffix- _addbang = rule273 _lhsIoptions- _childTypes = rule274 _childrenIchildTypes _lhsIntType- _localAttrTypes = rule275 _lhsIlocalAttrTypes arg_con_- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule276 _visitsIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule277 _rulesIerrors _visitsIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule278 _visitsIfromToStates- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule279 _visitsIt_visits- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule280 _visitsIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule281 _visitsIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule282 _visitsIvisituses- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule283 _visitsIallvisits- _lhsOsem_prod :: PP_Doc- _lhsOsem_prod = rule284 _sem_prod- _rulesOallInhmap = rule285 _lhsIallInhmap- _rulesOallSynmap = rule286 _lhsIallSynmap- _rulesOchildTypes = rule287 _childTypes- _rulesOimportBlocks = rule288 _lhsIimportBlocks- _rulesOinhmap = rule289 _lhsIinhmap- _rulesOlazyIntras = rule290 _lazyIntras- _rulesOlocalAttrTypes = rule291 _localAttrTypes- _rulesOmainFile = rule292 _lhsImainFile- _rulesOmainName = rule293 _lhsImainName- _rulesOmoduleHeader = rule294 _lhsImoduleHeader- _rulesOnt = rule295 _lhsInt- _rulesOoptions = rule296 _lhsIoptions- _rulesOpragmaBlocks = rule297 _lhsIpragmaBlocks- _rulesOsynmap = rule298 _lhsIsynmap- _rulesOtextBlocks = rule299 _lhsItextBlocks- _childrenOallInitStates = rule300 _lhsIallInitStates- _childrenOimportBlocks = rule301 _lhsIimportBlocks- _childrenOmainFile = rule302 _lhsImainFile- _childrenOmainName = rule303 _lhsImainName- _childrenOmoduleHeader = rule304 _lhsImoduleHeader- _childrenOnt = rule305 _lhsInt- _childrenOoptions = rule306 _lhsIoptions- _childrenOpragmaBlocks = rule307 _lhsIpragmaBlocks- _childrenOtextBlocks = rule308 _lhsItextBlocks- _visitsOallFromToStates = rule309 _lhsIallFromToStates- _visitsOallInhmap = rule310 _lhsIallInhmap- _visitsOallInitStates = rule311 _lhsIallInitStates- _visitsOallSynmap = rule312 _lhsIallSynmap- _visitsOallVisitKinds = rule313 _lhsIallVisitKinds- _visitsOallchildvisit = rule314 _lhsIallchildvisit- _visitsOavisitdefs = rule315 _lhsIavisitdefs- _visitsOavisituses = rule316 _lhsIavisituses- _visitsOchildTypes = rule317 _childTypes- _visitsOinhmap = rule318 _lhsIinhmap- _visitsOnextVisits = rule319 _lhsInextVisits- _visitsOnt = rule320 _lhsInt- _visitsOoptions = rule321 _lhsIoptions- _visitsOparams = rule322 _lhsIparams- _visitsOprevVisits = rule323 _lhsIprevVisits- _visitsOsynmap = rule324 _lhsIsynmap- __result_ = T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_EProduction_s14 v13- {-# INLINE rule225 #-}- {-# LINE 69 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule225 = \ con_ ->- {-# LINE 69 "./src-ag/ExecutionPlan2Hs.ag" #-}- con_- {-# LINE 2188 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule226 #-}- {-# LINE 70 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule226 = \ con_ ->- {-# LINE 70 "./src-ag/ExecutionPlan2Hs.ag" #-}- con_- {-# LINE 2194 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule227 #-}- {-# LINE 71 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule227 = \ con_ ->- {-# LINE 71 "./src-ag/ExecutionPlan2Hs.ag" #-}- con_- {-# LINE 2200 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule228 #-}- {-# LINE 184 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule228 = \ ((_childrenIdatatype) :: [PP_Doc]) _classPP1 ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _quantPP1 con_ ->- {-# LINE 184 "./src-ag/ExecutionPlan2Hs.ag" #-}- _quantPP1 >#< _classPP1- >#< conname _lhsIrename _lhsInt con_- >#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype- {-# LINE 2208 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule229 #-}- {-# LINE 187 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule229 = \ constraints_ ->- {-# LINE 187 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppClasses (classConstrsToDocs constraints_)- {-# LINE 2214 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule230 #-}- {-# LINE 188 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule230 = \ params_ ->- {-# LINE 188 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppQuants params_- {-# LINE 2220 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule231 #-}- {-# LINE 286 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule231 = \ (_ :: ()) ->- {-# LINE 286 "./src-ag/ExecutionPlan2Hs.ag" #-}- 1- {-# LINE 2226 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule232 #-}- {-# LINE 291 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule232 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIargpats) :: [PP_Doc] ) ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->- {-# LINE 291 "./src-ag/ExecutionPlan2Hs.ag" #-}- "sem_" >|< _lhsInt >#< "(" >#< conname _lhsIrename _lhsInt con_ >#< ppSpaced _childrenIargpats >#< ")"- >#< "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw- {-# LINE 2233 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule233 #-}- {-# LINE 521 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule233 = \ _semFunBndDef ->- {-# LINE 521 "./src-ag/ExecutionPlan2Hs.ag" #-}- Seq.singleton _semFunBndDef- {-# LINE 2239 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule234 #-}- {-# LINE 522 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule234 = \ _semFunBndTp ->- {-# LINE 522 "./src-ag/ExecutionPlan2Hs.ag" #-}- Seq.singleton _semFunBndTp- {-# LINE 2245 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule235 #-}- {-# LINE 523 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule235 = \ _semFunBndNm _semname ->- {-# LINE 523 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "=" >#< _semname- {-# LINE 2251 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule236 #-}- {-# LINE 524 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule236 = \ _semFunBndNm _sem_tp ->- {-# LINE 524 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semFunBndNm >#< "::" >#< _sem_tp- {-# LINE 2257 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule237 #-}- {-# LINE 525 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule237 = \ ((_lhsInt) :: NontermIdent) con_ ->- {-# LINE 525 "./src-ag/ExecutionPlan2Hs.ag" #-}- lateSemConLabel _lhsInt con_- {-# LINE 2263 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule238 #-}- {-# LINE 583 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule238 = \ ((_lhsInt) :: NontermIdent) ->- {-# LINE 583 "./src-ag/ExecutionPlan2Hs.ag" #-}- "T_" >|< _lhsInt- {-# LINE 2269 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule239 #-}- {-# LINE 584 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule239 = \ ((_lhsIparams) :: [Identifier]) ->- {-# LINE 584 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced _lhsIparams- {-# LINE 2275 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule240 #-}- {-# LINE 585 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule240 = \ ((_childrenIusedArgs) :: Set String) ((_rulesIusedArgs) :: Set String) ((_visitsIusedArgs) :: Set String) ->- {-# LINE 585 "./src-ag/ExecutionPlan2Hs.ag" #-}- _childrenIusedArgs `Set.union` _visitsIusedArgs `Set.union` _rulesIusedArgs- {-# LINE 2281 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule241 #-}- {-# LINE 588 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule241 = \ ((_childrenIargpats) :: [PP_Doc] ) _usedArgs ->- {-# LINE 588 "./src-ag/ExecutionPlan2Hs.ag" #-}- map (\x -> let (name,arg) = case show x of- "" -> ("", empty)- '!':name -> ("arg_" ++ name, "!arg_" >|< name)- name -> ("arg_" ++ name, "arg_" >|< name)- in if null name || name `Set.member` _usedArgs- then arg- else text "_") _childrenIargpats- {-# LINE 2293 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule242 #-}- {-# LINE 595 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule242 = \ ((_lhsInt) :: NontermIdent) con_ ->- {-# LINE 595 "./src-ag/ExecutionPlan2Hs.ag" #-}- "sem_" ++ show _lhsInt ++ "_" ++ show con_- {-# LINE 2299 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule243 #-}- {-# LINE 596 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule243 = \ ((_childrenIargtps) :: [PP_Doc] ) _classPP2 _quantPP2 _t_params _t_type ->- {-# LINE 596 "./src-ag/ExecutionPlan2Hs.ag" #-}- _quantPP2 >#< _classPP2 >#< ppSpaced _childrenIargtps >#< _t_type >#< _t_params- {-# LINE 2305 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule244 #-}- {-# LINE 597 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule244 = \ ((_lhsIclassCtxs) :: ClassContext) constraints_ ->- {-# LINE 597 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)- {-# LINE 2311 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule245 #-}- {-# LINE 598 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule245 = \ ((_lhsIparams) :: [Identifier]) params_ ->- {-# LINE 598 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppQuants (_lhsIparams ++ params_)- {-# LINE 2317 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule246 #-}- {-# LINE 599 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule246 = \ _args ((_lhsIinitial) :: StateIdentifier) _mbInitializer _mkSemBody _outerlet _scc _semInlinePragma _sem_tp _semname _t_type ->- {-# LINE 599 "./src-ag/ExecutionPlan2Hs.ag" #-}- _semInlinePragma- >-< _semname >#< "::" >#< _sem_tp- >-< _mkSemBody (_semname >#< ppSpaced _args >#< "=" >#< _scc >#< _t_type )- _mbInitializer _outerlet ("return" >#< "st" >|< _lhsIinitial)- {-# LINE 2326 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule247 #-}- {-# LINE 603 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule247 = \ (_ :: ()) ->- {-# LINE 603 "./src-ag/ExecutionPlan2Hs.ag" #-}- \prefix mbInit outerlet ret ->- case mbInit of- Nothing -> prefix >#< pp_parens ret >#< "where"- >-< indent 3 outerlet- Just m -> prefix >#< "(" >#< "do"- >-< indent 1 (- m- >-< "let"- >-< indent 2 outerlet- >-< ret )- >-< indent 1 ")"- {-# LINE 2342 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule248 #-}- {-# LINE 615 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule248 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 615 "./src-ag/ExecutionPlan2Hs.ag" #-}- if parallelInvoke _lhsIoptions- then (Nothing :: Maybe PP_Doc)- else Nothing- {-# LINE 2350 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule249 #-}- {-# LINE 621 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule249 = \ ((_lhsIoptions) :: Options) _semname ->- {-# LINE 621 "./src-ag/ExecutionPlan2Hs.ag" #-}- if genCostCentres _lhsIoptions- then ppCostCentre _semname- else empty- {-# LINE 2358 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule250 #-}- {-# LINE 624 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule250 = \ ((_lhsIoptions) :: Options) _semname ->- {-# LINE 624 "./src-ag/ExecutionPlan2Hs.ag" #-}- if noInlinePragmas _lhsIoptions- then empty- else ppNoInline _semname- {-# LINE 2366 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule251 #-}- {-# LINE 627 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule251 = \ ((_rulesIsem_rules) :: PP_Doc) _statefns ->- {-# LINE 627 "./src-ag/ExecutionPlan2Hs.ag" #-}- vlist _statefns >-< _rulesIsem_rules- {-# LINE 2372 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule252 #-}- {-# LINE 628 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule252 = \ _genstfn ((_lhsIallstates) :: Set StateIdentifier) ->- {-# LINE 628 "./src-ag/ExecutionPlan2Hs.ag" #-}- map _genstfn $ Set.toList _lhsIallstates- {-# LINE 2378 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule253 #-}- {-# LINE 629 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule253 = \ _addbang ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) _stargs _stks _stvs ->- {-# LINE 629 "./src-ag/ExecutionPlan2Hs.ag" #-}- \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits- prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits- stNm = "st" >|< st- lhs = pragma >-< bang stNm >#< "=" >#<- (- if st == _lhsIinitial- then empty- else "\\" >#< _stargs st >#< "->"- )- pragma = if noInlinePragmas _lhsIoptions- then empty- else if helpInlining _lhsIoptions- then case prevVisitInfo of- ManyVis -> ppNoInline stNm- OneVis _ -> if aggressiveInlinePragmas _lhsIoptions- then ppInline stNm- else ppInlinable stNm- NoneVis -> if st /= _lhsIinitial- then error ("State " ++ show st ++ " is not reachable from the initial state.")- else if aggressiveInlinePragmas _lhsIoptions- then ppInline stNm- else ppInlinable stNm- else ppNoInline stNm- cCon = "C_" >|< _lhsInt >|< "_s" >|< st- bang | st == _lhsIinitial = _addbang- | otherwise = id- in case nextVisitInfo of- NoneVis ->- if st == _lhsIinitial- then lhs >#< cCon- else empty- OneVis vId -> mklet lhs (_stvs st False) (cCon >#< "v" >|< vId)- ManyVis -> mklet lhs (_stks st >-< _stvs st True) (cCon >#< "k" >|< st)- {-# LINE 2416 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule254 #-}- {-# LINE 671 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule254 = \ _addbang _childTypes _lazyIntras ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- {-# LINE 671 "./src-ag/ExecutionPlan2Hs.ag" #-}- \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap- in ppSpaced [ let match | str `Set.member` _lazyIntras = pp str- | otherwise = _addbang (pp str)- in case mbAttr of- Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->- case Map.lookup nm _localAttrTypes of- Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)- Nothing -> match- Just attr | not (noPerStateTypeSigs _lhsIoptions) ->- case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of- Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)- Nothing -> match- _ -> match- | (str,mbAttr) <- Map.assocs attrs- ] >#< dummyPat _lhsIoptions (Map.null attrs)- {-# LINE 2436 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule255 #-}- {-# LINE 687 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule255 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _stvisits _t_params ->- {-# LINE 687 "./src-ag/ExecutionPlan2Hs.ag" #-}- \st -> if null (_stvisits st)- then empty- else ( if not (noInlinePragmas _lhsIoptions) && helpInlining _lhsIoptions- then ppNoInline ("k" >|< st)- else empty- )- >-< "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< _t_params >#< "t" >#< "->" >#< "t"- >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="- >#< "v" >|< v) $ _stvisits st)- {-# LINE 2450 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule256 #-}- {-# LINE 696 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule256 = \ ((_visitsIallvisits) :: [VisitStateState]) ->- {-# LINE 696 "./src-ag/ExecutionPlan2Hs.ag" #-}- \st -> filter (\(v,f,t) -> f == st) _visitsIallvisits- {-# LINE 2456 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule257 #-}- {-# LINE 697 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule257 = \ ((_visitsIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->- {-# LINE 697 "./src-ag/ExecutionPlan2Hs.ag" #-}- \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]- {-# LINE 2462 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule258 #-}- {-# LINE 698 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule258 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- {-# LINE 698 "./src-ag/ExecutionPlan2Hs.ag" #-}- _rulesImrules- {-# LINE 2468 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule259 #-}- {-# LINE 913 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule259 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- {-# LINE 913 "./src-ag/ExecutionPlan2Hs.ag" #-}- _childrenIchildintros- {-# LINE 2474 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule260 #-}- {-# LINE 1267 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule260 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->- {-# LINE 1267 "./src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIruleUsage- {-# LINE 2480 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule261 #-}- {-# LINE 1282 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule261 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->- {-# LINE 1282 "./src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIruleKinds- {-# LINE 2486 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule262 #-}- {-# LINE 1311 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule262 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- {-# LINE 1311 "./src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIintramap- {-# LINE 2492 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule263 #-}- {-# LINE 1312 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule263 = \ ((_childrenIterminaldefs) :: Set String) ->- {-# LINE 1312 "./src-ag/ExecutionPlan2Hs.ag" #-}- _childrenIterminaldefs- {-# LINE 2498 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule264 #-}- {-# LINE 1336 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule264 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->- {-# LINE 1336 "./src-ag/ExecutionPlan2Hs.ag" #-}- _rulesIruledefs- {-# LINE 2504 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule265 #-}- {-# LINE 1337 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule265 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- {-# LINE 1337 "./src-ag/ExecutionPlan2Hs.ag" #-}- _rulesIruleuses- {-# LINE 2510 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule266 #-}- {-# LINE 1391 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule266 = \ ((_visitsIlazyIntras) :: Set String) ->- {-# LINE 1391 "./src-ag/ExecutionPlan2Hs.ag" #-}- _visitsIlazyIntras- {-# LINE 2516 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule267 #-}- {-# LINE 1488 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule267 = \ _moduleName ->- {-# LINE 1488 "./src-ag/ExecutionPlan2Hs.ag" #-}- [pp $ "import " ++ _moduleName ]- {-# LINE 2522 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule268 #-}- {-# LINE 1489 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule268 = \ ((_lhsImainName) :: String) _suffix ->- {-# LINE 1489 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainName ++ _suffix- {-# LINE 2528 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule269 #-}- {-# LINE 1490 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule269 = \ ((_lhsInt) :: NontermIdent) con_ ->- {-# LINE 1490 "./src-ag/ExecutionPlan2Hs.ag" #-}- "_" ++ show _lhsInt ++ "_" ++ show con_- {-# LINE 2534 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule270 #-}- {-# LINE 1491 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule270 = \ ((_lhsImainFile) :: String) _suffix ->- {-# LINE 1491 "./src-ag/ExecutionPlan2Hs.ag" #-}- replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix )- {-# LINE 2540 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule271 #-}- {-# LINE 1492 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule271 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1492 "./src-ag/ExecutionPlan2Hs.ag" #-}- if parallelInvoke _lhsIoptions- then pp "import qualified System.IO.Unsafe(unsafePerformIO)"- >-< pp "import System.IO(IO)"- >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"- else pp "import Control.Monad.Identity"- {-# LINE 2550 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule272 #-}- {-# LINE 1497 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule272 = \ ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptions) :: Options) ((_lhsIpragmaBlocks) :: String) _outputfile _ppMonadImports _sem_prod _semname _suffix ->- {-# LINE 1497 "./src-ag/ExecutionPlan2Hs.ag" #-}- writeModule _outputfile- [ warrenFlagsPP _lhsIoptions- , pp $ _lhsIpragmaBlocks- , pp $ _lhsImoduleHeader _lhsImainName _suffix _semname True- , _lhsIimportBlocks- , _ppMonadImports- , ( if tupleAsDummyToken _lhsIoptions- then empty- else pp "import GHC.Prim"- )- , pp $ "import " ++ _lhsImainName ++ "_common"- , _sem_prod- ]- {-# LINE 2568 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule273 #-}- {-# LINE 1538 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule273 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1538 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 2574 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule274 #-}- {-# LINE 1588 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule274 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->- {-# LINE 1588 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes- {-# LINE 2580 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule275 #-}- {-# LINE 1605 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule275 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->- {-# LINE 1605 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes- {-# LINE 2586 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule276 #-}- rule276 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _visitsIchildvisit- {-# INLINE rule277 #-}- rule277 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->- _rulesIerrors Seq.>< _visitsIerrors- {-# INLINE rule278 #-}- rule278 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _visitsIfromToStates- {-# INLINE rule279 #-}- rule279 = \ ((_visitsIt_visits) :: PP_Doc) ->- _visitsIt_visits- {-# INLINE rule280 #-}- rule280 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _visitsIvisitKinds- {-# INLINE rule281 #-}- rule281 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _visitsIvisitdefs- {-# INLINE rule282 #-}- rule282 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _visitsIvisituses- {-# INLINE rule283 #-}- rule283 = \ ((_visitsIallvisits) :: [VisitStateState]) ->- _visitsIallvisits- {-# INLINE rule284 #-}- rule284 = \ _sem_prod ->- _sem_prod- {-# INLINE rule285 #-}- rule285 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule286 #-}- rule286 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule287 #-}- rule287 = \ _childTypes ->- _childTypes- {-# INLINE rule288 #-}- rule288 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule289 #-}- rule289 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule290 #-}- rule290 = \ _lazyIntras ->- _lazyIntras- {-# INLINE rule291 #-}- rule291 = \ _localAttrTypes ->- _localAttrTypes- {-# INLINE rule292 #-}- rule292 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule293 #-}- rule293 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule294 #-}- rule294 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule295 #-}- rule295 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule296 #-}- rule296 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule297 #-}- rule297 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule298 #-}- rule298 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule299 #-}- rule299 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule300 #-}- rule300 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule301 #-}- rule301 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule302 #-}- rule302 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule303 #-}- rule303 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule304 #-}- rule304 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule305 #-}- rule305 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule306 #-}- rule306 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule307 #-}- rule307 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule308 #-}- rule308 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule309 #-}- rule309 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule310 #-}- rule310 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule311 #-}- rule311 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule312 #-}- rule312 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule313 #-}- rule313 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule314 #-}- rule314 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule315 #-}- rule315 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule316 #-}- rule316 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule317 #-}- rule317 = \ _childTypes ->- _childTypes- {-# INLINE rule318 #-}- rule318 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule319 #-}- rule319 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule320 #-}- rule320 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule321 #-}- rule321 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule322 #-}- rule322 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule323 #-}- rule323 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule324 #-}- rule324 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap---- EProductions --------------------------------------------------- wrapper-data Inh_EProductions = Inh_EProductions { allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), allInitStates_Inh_EProductions :: (Map NontermIdent Int), allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allstates_Inh_EProductions :: (Set StateIdentifier), avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), classCtxs_Inh_EProductions :: (ClassContext), importBlocks_Inh_EProductions :: (PP_Doc), inhmap_Inh_EProductions :: (Attributes), initial_Inh_EProductions :: (StateIdentifier), localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProductions :: (String), mainName_Inh_EProductions :: (String), moduleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String), nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), nt_Inh_EProductions :: (NontermIdent), ntType_Inh_EProductions :: (Type), options_Inh_EProductions :: (Options), params_Inh_EProductions :: ([Identifier]), pragmaBlocks_Inh_EProductions :: (String), prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), rename_Inh_EProductions :: (Bool), synmap_Inh_EProductions :: (Attributes), textBlocks_Inh_EProductions :: (PP_Doc) }-data Syn_EProductions = Syn_EProductions { allvisits_Syn_EProductions :: ([VisitStateState]), childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), count_Syn_EProductions :: (Int), datatype_Syn_EProductions :: ([PP_Doc]), errors_Syn_EProductions :: (Seq Error), fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_EProductions :: (IO ()), imports_Syn_EProductions :: ([PP_Doc]), semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), semFunBndTps_Syn_EProductions :: (Seq PP_Doc), sem_nt_Syn_EProductions :: (PP_Doc), sem_prod_Syn_EProductions :: (PP_Doc), t_visits_Syn_EProductions :: (PP_Doc), visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_EProductions #-}-wrap_EProductions :: T_EProductions -> Inh_EProductions -> (Syn_EProductions )-wrap_EProductions (T_EProductions act) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks- (T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProductions_s17 sem arg)- return (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# NOINLINE sem_EProductions #-}-sem_EProductions :: EProductions -> T_EProductions -sem_EProductions list = Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list)---- semantic domain-newtype T_EProductions = T_EProductions {- attach_T_EProductions :: Identity (T_EProductions_s17 )- }-newtype T_EProductions_s17 = C_EProductions_s17 {- inv_EProductions_s17 :: (T_EProductions_v16 )- }-data T_EProductions_s18 = C_EProductions_s18-type T_EProductions_v16 = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )-data T_EProductions_vIn16 = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (String -> String -> String -> Bool -> String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (String) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)-data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_EProductions_Cons #-}-sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions -sem_EProductions_Cons arg_hd_ arg_tl_ = T_EProductions (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_EProductions_v16 - v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let- _hdX14 = Control.Monad.Identity.runIdentity (attach_T_EProduction (arg_hd_))- _tlX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_tl_))- (T_EProduction_vOut13 _hdIallvisits _hdIchildvisit _hdIcount _hdIdatatype _hdIerrors _hdIfromToStates _hdIgenProdIO _hdIimports _hdIsemFunBndDefs _hdIsemFunBndTps _hdIsem_nt _hdIsem_prod _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_EProduction_s14 _hdX14 (T_EProduction_vIn13 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOclassCtxs _hdOimportBlocks _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOpragmaBlocks _hdOprevVisits _hdOrename _hdOsynmap _hdOtextBlocks)- (T_EProductions_vOut16 _tlIallvisits _tlIchildvisit _tlIcount _tlIdatatype _tlIerrors _tlIfromToStates _tlIgenProdIO _tlIimports _tlIsemFunBndDefs _tlIsemFunBndTps _tlIsem_nt _tlIsem_prod _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_EProductions_s17 _tlX17 (T_EProductions_vIn16 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOclassCtxs _tlOimportBlocks _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOpragmaBlocks _tlOprevVisits _tlOrename _tlOsynmap _tlOtextBlocks)- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule325 _hdIallvisits- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule326 _hdIt_visits- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule327 _hdIchildvisit _tlIchildvisit- _lhsOcount :: Int- _lhsOcount = rule328 _hdIcount _tlIcount- _lhsOdatatype :: [PP_Doc]- _lhsOdatatype = rule329 _hdIdatatype _tlIdatatype- _lhsOerrors :: Seq Error- _lhsOerrors = rule330 _hdIerrors _tlIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule331 _hdIfromToStates _tlIfromToStates- _lhsOgenProdIO :: IO ()- _lhsOgenProdIO = rule332 _hdIgenProdIO _tlIgenProdIO- _lhsOimports :: [PP_Doc]- _lhsOimports = rule333 _hdIimports _tlIimports- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule334 _hdIsemFunBndDefs _tlIsemFunBndDefs- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule335 _hdIsemFunBndTps _tlIsemFunBndTps- _lhsOsem_nt :: PP_Doc- _lhsOsem_nt = rule336 _hdIsem_nt _tlIsem_nt- _lhsOsem_prod :: PP_Doc- _lhsOsem_prod = rule337 _hdIsem_prod _tlIsem_prod- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule338 _hdIvisitKinds _tlIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule339 _hdIvisitdefs _tlIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule340 _hdIvisituses _tlIvisituses- _hdOallFromToStates = rule341 _lhsIallFromToStates- _hdOallInhmap = rule342 _lhsIallInhmap- _hdOallInitStates = rule343 _lhsIallInitStates- _hdOallSynmap = rule344 _lhsIallSynmap- _hdOallVisitKinds = rule345 _lhsIallVisitKinds- _hdOallchildvisit = rule346 _lhsIallchildvisit- _hdOallstates = rule347 _lhsIallstates- _hdOavisitdefs = rule348 _lhsIavisitdefs- _hdOavisituses = rule349 _lhsIavisituses- _hdOclassCtxs = rule350 _lhsIclassCtxs- _hdOimportBlocks = rule351 _lhsIimportBlocks- _hdOinhmap = rule352 _lhsIinhmap- _hdOinitial = rule353 _lhsIinitial- _hdOlocalAttrTypes = rule354 _lhsIlocalAttrTypes- _hdOmainFile = rule355 _lhsImainFile- _hdOmainName = rule356 _lhsImainName- _hdOmoduleHeader = rule357 _lhsImoduleHeader- _hdOnextVisits = rule358 _lhsInextVisits- _hdOnt = rule359 _lhsInt- _hdOntType = rule360 _lhsIntType- _hdOoptions = rule361 _lhsIoptions- _hdOparams = rule362 _lhsIparams- _hdOpragmaBlocks = rule363 _lhsIpragmaBlocks- _hdOprevVisits = rule364 _lhsIprevVisits- _hdOrename = rule365 _lhsIrename- _hdOsynmap = rule366 _lhsIsynmap- _hdOtextBlocks = rule367 _lhsItextBlocks- _tlOallFromToStates = rule368 _lhsIallFromToStates- _tlOallInhmap = rule369 _lhsIallInhmap- _tlOallInitStates = rule370 _lhsIallInitStates- _tlOallSynmap = rule371 _lhsIallSynmap- _tlOallVisitKinds = rule372 _lhsIallVisitKinds- _tlOallchildvisit = rule373 _lhsIallchildvisit- _tlOallstates = rule374 _lhsIallstates- _tlOavisitdefs = rule375 _lhsIavisitdefs- _tlOavisituses = rule376 _lhsIavisituses- _tlOclassCtxs = rule377 _lhsIclassCtxs- _tlOimportBlocks = rule378 _lhsIimportBlocks- _tlOinhmap = rule379 _lhsIinhmap- _tlOinitial = rule380 _lhsIinitial- _tlOlocalAttrTypes = rule381 _lhsIlocalAttrTypes- _tlOmainFile = rule382 _lhsImainFile- _tlOmainName = rule383 _lhsImainName- _tlOmoduleHeader = rule384 _lhsImoduleHeader- _tlOnextVisits = rule385 _lhsInextVisits- _tlOnt = rule386 _lhsInt- _tlOntType = rule387 _lhsIntType- _tlOoptions = rule388 _lhsIoptions- _tlOparams = rule389 _lhsIparams- _tlOpragmaBlocks = rule390 _lhsIpragmaBlocks- _tlOprevVisits = rule391 _lhsIprevVisits- _tlOrename = rule392 _lhsIrename- _tlOsynmap = rule393 _lhsIsynmap- _tlOtextBlocks = rule394 _lhsItextBlocks- __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_EProductions_s17 v16- {-# INLINE rule325 #-}- {-# LINE 341 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule325 = \ ((_hdIallvisits) :: [VisitStateState]) ->- {-# LINE 341 "./src-ag/ExecutionPlan2Hs.ag" #-}- _hdIallvisits- {-# LINE 2870 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule326 #-}- {-# LINE 394 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule326 = \ ((_hdIt_visits) :: PP_Doc) ->- {-# LINE 394 "./src-ag/ExecutionPlan2Hs.ag" #-}- _hdIt_visits- {-# LINE 2876 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule327 #-}- rule327 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _hdIchildvisit `Map.union` _tlIchildvisit- {-# INLINE rule328 #-}- rule328 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->- _hdIcount + _tlIcount- {-# INLINE rule329 #-}- rule329 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->- _hdIdatatype : _tlIdatatype- {-# INLINE rule330 #-}- rule330 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule331 #-}- rule331 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _hdIfromToStates `mappend` _tlIfromToStates- {-# INLINE rule332 #-}- rule332 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->- _hdIgenProdIO >> _tlIgenProdIO- {-# INLINE rule333 #-}- rule333 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->- _hdIimports ++ _tlIimports- {-# INLINE rule334 #-}- rule334 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->- _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs- {-# INLINE rule335 #-}- rule335 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->- _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps- {-# INLINE rule336 #-}- rule336 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->- _hdIsem_nt >-< _tlIsem_nt- {-# INLINE rule337 #-}- rule337 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->- _hdIsem_prod >-< _tlIsem_prod- {-# INLINE rule338 #-}- rule338 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule339 #-}- rule339 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# INLINE rule340 #-}- rule340 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# INLINE rule341 #-}- rule341 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule342 #-}- rule342 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule343 #-}- rule343 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule344 #-}- rule344 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule345 #-}- rule345 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule346 #-}- rule346 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule347 #-}- rule347 = \ ((_lhsIallstates) :: Set StateIdentifier) ->- _lhsIallstates- {-# INLINE rule348 #-}- rule348 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule349 #-}- rule349 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule350 #-}- rule350 = \ ((_lhsIclassCtxs) :: ClassContext) ->- _lhsIclassCtxs- {-# INLINE rule351 #-}- rule351 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule352 #-}- rule352 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule353 #-}- rule353 = \ ((_lhsIinitial) :: StateIdentifier) ->- _lhsIinitial- {-# INLINE rule354 #-}- rule354 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->- _lhsIlocalAttrTypes- {-# INLINE rule355 #-}- rule355 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule356 #-}- rule356 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule357 #-}- rule357 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule358 #-}- rule358 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule359 #-}- rule359 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule360 #-}- rule360 = \ ((_lhsIntType) :: Type) ->- _lhsIntType- {-# INLINE rule361 #-}- rule361 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule362 #-}- rule362 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule363 #-}- rule363 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule364 #-}- rule364 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule365 #-}- rule365 = \ ((_lhsIrename) :: Bool) ->- _lhsIrename- {-# INLINE rule366 #-}- rule366 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule367 #-}- rule367 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule368 #-}- rule368 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule369 #-}- rule369 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule370 #-}- rule370 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule371 #-}- rule371 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule372 #-}- rule372 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule373 #-}- rule373 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule374 #-}- rule374 = \ ((_lhsIallstates) :: Set StateIdentifier) ->- _lhsIallstates- {-# INLINE rule375 #-}- rule375 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule376 #-}- rule376 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule377 #-}- rule377 = \ ((_lhsIclassCtxs) :: ClassContext) ->- _lhsIclassCtxs- {-# INLINE rule378 #-}- rule378 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule379 #-}- rule379 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule380 #-}- rule380 = \ ((_lhsIinitial) :: StateIdentifier) ->- _lhsIinitial- {-# INLINE rule381 #-}- rule381 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->- _lhsIlocalAttrTypes- {-# INLINE rule382 #-}- rule382 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule383 #-}- rule383 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule384 #-}- rule384 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule385 #-}- rule385 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule386 #-}- rule386 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule387 #-}- rule387 = \ ((_lhsIntType) :: Type) ->- _lhsIntType- {-# INLINE rule388 #-}- rule388 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule389 #-}- rule389 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule390 #-}- rule390 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule391 #-}- rule391 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule392 #-}- rule392 = \ ((_lhsIrename) :: Bool) ->- _lhsIrename- {-# INLINE rule393 #-}- rule393 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule394 #-}- rule394 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks-{-# NOINLINE sem_EProductions_Nil #-}-sem_EProductions_Nil :: T_EProductions -sem_EProductions_Nil = T_EProductions (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_EProductions_v16 - v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule395 ()- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule396 ()- _lhsOcount :: Int- _lhsOcount = rule397 ()- _lhsOdatatype :: [PP_Doc]- _lhsOdatatype = rule398 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule399 ()- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule400 ()- _lhsOgenProdIO :: IO ()- _lhsOgenProdIO = rule401 ()- _lhsOimports :: [PP_Doc]- _lhsOimports = rule402 ()- _lhsOsemFunBndDefs :: Seq PP_Doc- _lhsOsemFunBndDefs = rule403 ()- _lhsOsemFunBndTps :: Seq PP_Doc- _lhsOsemFunBndTps = rule404 ()- _lhsOsem_nt :: PP_Doc- _lhsOsem_nt = rule405 ()- _lhsOsem_prod :: PP_Doc- _lhsOsem_prod = rule406 ()- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule407 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule408 ()- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule409 ()- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule410 ()- __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_EProductions_s17 v16- {-# INLINE rule395 #-}- {-# LINE 342 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule395 = \ (_ :: ()) ->- {-# LINE 342 "./src-ag/ExecutionPlan2Hs.ag" #-}- error "Every nonterminal should have at least 1 production"- {-# LINE 3128 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule396 #-}- rule396 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule397 #-}- rule397 = \ (_ :: ()) ->- 0- {-# INLINE rule398 #-}- rule398 = \ (_ :: ()) ->- []- {-# INLINE rule399 #-}- rule399 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule400 #-}- rule400 = \ (_ :: ()) ->- mempty- {-# INLINE rule401 #-}- rule401 = \ (_ :: ()) ->- return ()- {-# INLINE rule402 #-}- rule402 = \ (_ :: ()) ->- []- {-# INLINE rule403 #-}- rule403 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule404 #-}- rule404 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule405 #-}- rule405 = \ (_ :: ()) ->- empty- {-# INLINE rule406 #-}- rule406 = \ (_ :: ()) ->- empty- {-# INLINE rule407 #-}- rule407 = \ (_ :: ()) ->- empty- {-# INLINE rule408 #-}- rule408 = \ (_ :: ()) ->- mempty- {-# INLINE rule409 #-}- rule409 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule410 #-}- rule410 = \ (_ :: ()) ->- Map.empty---- ERule ---------------------------------------------------------- wrapper-data Inh_ERule = Inh_ERule { allInhmap_Inh_ERule :: (Map NontermIdent Attributes), allSynmap_Inh_ERule :: (Map NontermIdent Attributes), childTypes_Inh_ERule :: (Map Identifier Type), con_Inh_ERule :: (ConstructorIdent), importBlocks_Inh_ERule :: (PP_Doc), inhmap_Inh_ERule :: (Attributes), lazyIntras_Inh_ERule :: (Set String), localAttrTypes_Inh_ERule :: (Map Identifier Type), mainFile_Inh_ERule :: (String), mainName_Inh_ERule :: (String), moduleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String), nt_Inh_ERule :: (NontermIdent), options_Inh_ERule :: (Options), pragmaBlocks_Inh_ERule :: (String), ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), synmap_Inh_ERule :: (Attributes), textBlocks_Inh_ERule :: (PP_Doc), usageInfo_Inh_ERule :: (Map Identifier Int) }-data Syn_ERule = Syn_ERule { errors_Syn_ERule :: (Seq Error), mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), ruledefs_Syn_ERule :: (Map Identifier (Set String)), ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERule :: (PP_Doc), usedArgs_Syn_ERule :: (Set String) }-{-# INLINABLE wrap_ERule #-}-wrap_ERule :: T_ERule -> Inh_ERule -> (Syn_ERule )-wrap_ERule (T_ERule act) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo- (T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs) <- return (inv_ERule_s20 sem arg)- return (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs)- )---- cata-{-# INLINE sem_ERule #-}-sem_ERule :: ERule -> T_ERule -sem_ERule ( ERule name_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ mbError_ ) = sem_ERule_ERule name_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ mbError_---- semantic domain-newtype T_ERule = T_ERule {- attach_T_ERule :: Identity (T_ERule_s20 )- }-newtype T_ERule_s20 = C_ERule_s20 {- inv_ERule_s20 :: (T_ERule_v19 )- }-data T_ERule_s21 = C_ERule_s21-type T_ERule_v19 = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )-data T_ERule_vIn19 = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)-data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)-{-# NOINLINE sem_ERule_ERule #-}-sem_ERule_ERule :: (Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule -sem_ERule_ERule arg_name_ arg_pattern_ arg_rhs_ _ _ arg_explicit_ arg_pure_ arg_mbError_ = T_ERule (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_ERule_v19 - v19 = \ (T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let- _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))- _rhsX29 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))- (T_Pattern_vOut40 _patternIattrTypes _patternIattrs _patternIcopy _patternIisUnderscore _patternIsem_lhs) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 _patternOallInhmap _patternOallSynmap _patternOanyLazyKind _patternOinhmap _patternOlocalAttrTypes _patternOoptions _patternOsynmap)- (T_Expression_vOut28 _rhsIattrs _rhsIpos _rhsIsemfunc _rhsItks) = inv_Expression_s29 _rhsX29 (T_Expression_vIn28 )- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule411 _usedArgs_augmented_f1 _usedArgs_augmented_syn- _usedArgs_augmented_f1 = rule412 _rhsIattrs- _lhsOsem_rules :: PP_Doc- _lhsOsem_rules = rule413 _rulePragma _rulecode _used- _rulecode = rule414 _endpragma _genpragma _lambda _pragma _rhsIpos _rhsIsemfunc _scc- _rulePragma = rule415 _lhsIoptions _used arg_explicit_ arg_name_- _scc = rule416 _lhsIcon _lhsInt _lhsIoptions _rhsIpos arg_explicit_ arg_name_ arg_pure_- _pragma = rule417 _rhsIpos- _endpragma = rule418 _lhsImainFile- _genpragma = rule419 _haspos _lhsIoptions arg_explicit_- _haspos = rule420 _rhsIpos- _lambda = rule421 _argPats _lhsIoptions _rhsIattrs arg_name_- _argPats = rule422 _addbang1 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIlazyIntras _lhsIlocalAttrTypes _lhsIoptions _rhsIattrs- _argExprs = rule423 _rhsIattrs- _stepcode = rule424 _argExprs _lhsIoptions _patternIattrTypes _patternIsem_lhs _rhsIattrs arg_name_ arg_pure_- _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- _lhsOmrules = rule425 _stepcode arg_name_- _used = rule426 _lhsIusageInfo arg_name_- _kinds = rule427 _lhsIruleKinds arg_name_- _anyLazyKind = rule428 _kinds- _lhsOruledefs :: Map Identifier (Set String)- _lhsOruledefs = rule429 _patternIattrs arg_name_- _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))- _lhsOruleuses = rule430 _rhsIattrs arg_name_- _addbang = rule431 _lhsIoptions- _addbang1 = rule432 _addbang _anyLazyKind- _lhsOerrors :: Seq Error- _lhsOerrors = rule433 _used arg_mbError_- _usedArgs_augmented_syn = rule434 ()- _patternOallInhmap = rule435 _lhsIallInhmap- _patternOallSynmap = rule436 _lhsIallSynmap- _patternOanyLazyKind = rule437 _anyLazyKind- _patternOinhmap = rule438 _lhsIinhmap- _patternOlocalAttrTypes = rule439 _lhsIlocalAttrTypes- _patternOoptions = rule440 _lhsIoptions- _patternOsynmap = rule441 _lhsIsynmap- __result_ = T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs- in __result_ )- in C_ERule_s20 v19- {-# INLINE rule411 #-}- rule411 = \ _usedArgs_augmented_f1 _usedArgs_augmented_syn ->- foldr ($) _usedArgs_augmented_syn [_usedArgs_augmented_f1]- {-# INLINE rule412 #-}- rule412 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->- Set.union $ Map.keysSet $ Map.mapKeys (\a -> "arg_" ++ a) $ Map.filter isNothing _rhsIattrs- {-# INLINE rule413 #-}- {-# LINE 982 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule413 = \ _rulePragma _rulecode _used ->- {-# LINE 982 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _used == 0- then empty- else _rulePragma >-< _rulecode- {-# LINE 3269 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule414 #-}- {-# LINE 985 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule414 = \ _endpragma _genpragma _lambda _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) _scc ->- {-# LINE 985 "./src-ag/ExecutionPlan2Hs.ag" #-}- ( if _genpragma- then _pragma- else empty- )- >-< _lambda >#< _scc- >-< indent ((column _rhsIpos - 2) `max` 2)- ( if _genpragma- then _pragma >-< _rhsIsemfunc >-< _endpragma- else _rhsIsemfunc- )- {-# LINE 3284 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule415 #-}- {-# LINE 997 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule415 = \ ((_lhsIoptions) :: Options) _used explicit_ name_ ->- {-# LINE 997 "./src-ag/ExecutionPlan2Hs.ag" #-}- ( let reallyInlineStr = "INLINE"- reallyNoInlineStr = "NOINLINE"- in if noInlinePragmas _lhsIoptions- then empty- else if _used == 1- then ppPragmaBinding reallyInlineStr name_- else if helpInlining _lhsIoptions- then if not explicit_ && _used <= reallyOftenUsedThreshold- then ppPragmaBinding "INLINE[1]" name_- else if _used > ruleInlineThresholdSoft && explicit_- then if _used > ruleInlineThresholdHard- then ppPragmaBinding reallyNoInlineStr name_- else if aggressiveInlinePragmas _lhsIoptions- then ppPragmaBinding "NOINLINE[2]" name_- else ppNoInline name_- else if aggressiveInlinePragmas _lhsIoptions- then ppPragmaBinding "NOINLINE[1]" name_- else ppNoInline name_- else if not explicit_ || _used <= ruleInlineThresholdSoft- then ppPragmaBinding "NOINLINE[1]" name_- else ppNoInline name_- )- {-# LINE 3311 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule416 #-}- {-# LINE 1019 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule416 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_rhsIpos) :: Pos) explicit_ name_ pure_ ->- {-# LINE 1019 "./src-ag/ExecutionPlan2Hs.ag" #-}- if genCostCentres _lhsIoptions && explicit_ && pure_ && not (noPerRuleCostCentres _lhsIoptions)- then ppCostCentre (name_ >|< "_" >|< line _rhsIpos >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)- else empty- {-# LINE 3319 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule417 #-}- {-# LINE 1022 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule417 = \ ((_rhsIpos) :: Pos) ->- {-# LINE 1022 "./src-ag/ExecutionPlan2Hs.ag" #-}- "{-# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#-}"- {-# LINE 3325 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule418 #-}- {-# LINE 1023 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule418 = \ ((_lhsImainFile) :: String) ->- {-# LINE 1023 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppWithLineNr (\ln -> "{-# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#-}")- {-# LINE 3331 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule419 #-}- {-# LINE 1024 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule419 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->- {-# LINE 1024 "./src-ag/ExecutionPlan2Hs.ag" #-}- genLinePragmas _lhsIoptions && explicit_ && _haspos- {-# LINE 3337 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule420 #-}- {-# LINE 1025 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule420 = \ ((_rhsIpos) :: Pos) ->- {-# LINE 1025 "./src-ag/ExecutionPlan2Hs.ag" #-}- line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))- {-# LINE 3343 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule421 #-}- {-# LINE 1034 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule421 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->- {-# LINE 1034 "./src-ag/ExecutionPlan2Hs.ag" #-}- name_ >#< "=" >#< "\\" >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "->"- {-# LINE 3349 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule422 #-}- {-# LINE 1036 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule422 = \ _addbang1 ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlazyIntras) :: Set String) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->- {-# LINE 1036 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str- | otherwise = _addbang1 (pp str)- in case mbAttr of- Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->- case Map.lookup nm _lhsIlocalAttrTypes of- Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)- Nothing -> match- Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->- case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of- Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)- Nothing -> match- _ -> match- | (str,mbAttr) <- Map.assocs _rhsIattrs- ]- {-# LINE 3368 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule423 #-}- {-# LINE 1050 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule423 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->- {-# LINE 1050 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced [ case mbAttr of- Nothing -> "arg_" >|< str- _ -> text str- | (str,mbAttr) <- Map.assocs _rhsIattrs- ]- {-# LINE 3378 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule424 #-}- {-# LINE 1055 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule424 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIattrTypes) :: PP_Doc) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->- {-# LINE 1055 "./src-ag/ExecutionPlan2Hs.ag" #-}- \kind fmtMode -> if kind `compatibleRule` pure_- then Right $ let oper | pure_ = "="- | otherwise = "<-"- decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)- tp = if pure_ && not (noPerRuleTypeSigs _lhsIoptions)- then _patternIattrTypes- else empty- in fmtDecl pure_ fmtMode (tp >-< decl)- else Left $ IncompatibleRuleKind name_ kind- {-# LINE 3392 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule425 #-}- {-# LINE 1065 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule425 = \ _stepcode name_ ->- {-# LINE 1065 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _stepcode- {-# LINE 3398 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule426 #-}- {-# LINE 1269 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule426 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->- {-# LINE 1269 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault 0 name_ _lhsIusageInfo- {-# LINE 3404 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule427 #-}- {-# LINE 1285 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule427 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->- {-# LINE 1285 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault Set.empty name_ _lhsIruleKinds- {-# LINE 3410 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule428 #-}- {-# LINE 1286 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule428 = \ _kinds ->- {-# LINE 1286 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.fold (\k r -> isLazyKind k || r) False _kinds- {-# LINE 3416 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule429 #-}- {-# LINE 1332 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule429 = \ ((_patternIattrs) :: Set String) name_ ->- {-# LINE 1332 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _patternIattrs- {-# LINE 3422 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule430 #-}- {-# LINE 1333 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule430 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->- {-# LINE 1333 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ _rhsIattrs- {-# LINE 3428 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule431 #-}- {-# LINE 1535 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule431 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1535 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 3434 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule432 #-}- {-# LINE 1546 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule432 = \ _addbang _anyLazyKind ->- {-# LINE 1546 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _anyLazyKind then id else _addbang- {-# LINE 3440 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule433 #-}- {-# LINE 1652 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule433 = \ _used mbError_ ->- {-# LINE 1652 "./src-ag/ExecutionPlan2Hs.ag" #-}- case mbError_ of- Just e | _used > 0 -> Seq.singleton e- _ -> Seq.empty- {-# LINE 3448 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule434 #-}- rule434 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule435 #-}- rule435 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule436 #-}- rule436 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule437 #-}- rule437 = \ _anyLazyKind ->- _anyLazyKind- {-# INLINE rule438 #-}- rule438 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule439 #-}- rule439 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule440 #-}- rule440 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule441 #-}- rule441 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap---- ERules --------------------------------------------------------- wrapper-data Inh_ERules = Inh_ERules { allInhmap_Inh_ERules :: (Map NontermIdent Attributes), allSynmap_Inh_ERules :: (Map NontermIdent Attributes), childTypes_Inh_ERules :: (Map Identifier Type), con_Inh_ERules :: (ConstructorIdent), importBlocks_Inh_ERules :: (PP_Doc), inhmap_Inh_ERules :: (Attributes), lazyIntras_Inh_ERules :: (Set String), localAttrTypes_Inh_ERules :: (Map Identifier Type), mainFile_Inh_ERules :: (String), mainName_Inh_ERules :: (String), moduleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String), nt_Inh_ERules :: (NontermIdent), options_Inh_ERules :: (Options), pragmaBlocks_Inh_ERules :: (String), ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), synmap_Inh_ERules :: (Attributes), textBlocks_Inh_ERules :: (PP_Doc), usageInfo_Inh_ERules :: (Map Identifier Int) }-data Syn_ERules = Syn_ERules { errors_Syn_ERules :: (Seq Error), mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), ruledefs_Syn_ERules :: (Map Identifier (Set String)), ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERules :: (PP_Doc), usedArgs_Syn_ERules :: (Set String) }-{-# INLINABLE wrap_ERules #-}-wrap_ERules :: T_ERules -> Inh_ERules -> (Syn_ERules )-wrap_ERules (T_ERules act) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo- (T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs) <- return (inv_ERules_s23 sem arg)- return (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs)- )---- cata-{-# NOINLINE sem_ERules #-}-sem_ERules :: ERules -> T_ERules -sem_ERules list = Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list)---- semantic domain-newtype T_ERules = T_ERules {- attach_T_ERules :: Identity (T_ERules_s23 )- }-newtype T_ERules_s23 = C_ERules_s23 {- inv_ERules_s23 :: (T_ERules_v22 )- }-data T_ERules_s24 = C_ERules_s24-type T_ERules_v22 = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )-data T_ERules_vIn22 = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)-data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)-{-# NOINLINE sem_ERules_Cons #-}-sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules -sem_ERules_Cons arg_hd_ arg_tl_ = T_ERules (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_ERules_v22 - v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let- _hdX20 = Control.Monad.Identity.runIdentity (attach_T_ERule (arg_hd_))- _tlX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_tl_))- (T_ERule_vOut19 _hdIerrors _hdImrules _hdIruledefs _hdIruleuses _hdIsem_rules _hdIusedArgs) = inv_ERule_s20 _hdX20 (T_ERule_vIn19 _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOimportBlocks _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOruleKinds _hdOsynmap _hdOtextBlocks _hdOusageInfo)- (T_ERules_vOut22 _tlIerrors _tlImrules _tlIruledefs _tlIruleuses _tlIsem_rules _tlIusedArgs) = inv_ERules_s23 _tlX23 (T_ERules_vIn22 _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOimportBlocks _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOruleKinds _tlOsynmap _tlOtextBlocks _tlOusageInfo)- _lhsOerrors :: Seq Error- _lhsOerrors = rule442 _hdIerrors _tlIerrors- _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- _lhsOmrules = rule443 _hdImrules _tlImrules- _lhsOruledefs :: Map Identifier (Set String)- _lhsOruledefs = rule444 _hdIruledefs _tlIruledefs- _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))- _lhsOruleuses = rule445 _hdIruleuses _tlIruleuses- _lhsOsem_rules :: PP_Doc- _lhsOsem_rules = rule446 _hdIsem_rules _tlIsem_rules- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule447 _hdIusedArgs _tlIusedArgs- _hdOallInhmap = rule448 _lhsIallInhmap- _hdOallSynmap = rule449 _lhsIallSynmap- _hdOchildTypes = rule450 _lhsIchildTypes- _hdOcon = rule451 _lhsIcon- _hdOimportBlocks = rule452 _lhsIimportBlocks- _hdOinhmap = rule453 _lhsIinhmap- _hdOlazyIntras = rule454 _lhsIlazyIntras- _hdOlocalAttrTypes = rule455 _lhsIlocalAttrTypes- _hdOmainFile = rule456 _lhsImainFile- _hdOmainName = rule457 _lhsImainName- _hdOmoduleHeader = rule458 _lhsImoduleHeader- _hdOnt = rule459 _lhsInt- _hdOoptions = rule460 _lhsIoptions- _hdOpragmaBlocks = rule461 _lhsIpragmaBlocks- _hdOruleKinds = rule462 _lhsIruleKinds- _hdOsynmap = rule463 _lhsIsynmap- _hdOtextBlocks = rule464 _lhsItextBlocks- _hdOusageInfo = rule465 _lhsIusageInfo- _tlOallInhmap = rule466 _lhsIallInhmap- _tlOallSynmap = rule467 _lhsIallSynmap- _tlOchildTypes = rule468 _lhsIchildTypes- _tlOcon = rule469 _lhsIcon- _tlOimportBlocks = rule470 _lhsIimportBlocks- _tlOinhmap = rule471 _lhsIinhmap- _tlOlazyIntras = rule472 _lhsIlazyIntras- _tlOlocalAttrTypes = rule473 _lhsIlocalAttrTypes- _tlOmainFile = rule474 _lhsImainFile- _tlOmainName = rule475 _lhsImainName- _tlOmoduleHeader = rule476 _lhsImoduleHeader- _tlOnt = rule477 _lhsInt- _tlOoptions = rule478 _lhsIoptions- _tlOpragmaBlocks = rule479 _lhsIpragmaBlocks- _tlOruleKinds = rule480 _lhsIruleKinds- _tlOsynmap = rule481 _lhsIsynmap- _tlOtextBlocks = rule482 _lhsItextBlocks- _tlOusageInfo = rule483 _lhsIusageInfo- __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs- in __result_ )- in C_ERules_s23 v22- {-# INLINE rule442 #-}- rule442 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule443 #-}- rule443 = \ ((_hdImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ((_tlImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _hdImrules `Map.union` _tlImrules- {-# INLINE rule444 #-}- rule444 = \ ((_hdIruledefs) :: Map Identifier (Set String)) ((_tlIruledefs) :: Map Identifier (Set String)) ->- _hdIruledefs `uwSetUnion` _tlIruledefs- {-# INLINE rule445 #-}- rule445 = \ ((_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _hdIruleuses `uwMapUnion` _tlIruleuses- {-# INLINE rule446 #-}- rule446 = \ ((_hdIsem_rules) :: PP_Doc) ((_tlIsem_rules) :: PP_Doc) ->- _hdIsem_rules >-< _tlIsem_rules- {-# INLINE rule447 #-}- rule447 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->- _hdIusedArgs `Set.union` _tlIusedArgs- {-# INLINE rule448 #-}- rule448 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule449 #-}- rule449 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule450 #-}- rule450 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule451 #-}- rule451 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule452 #-}- rule452 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule453 #-}- rule453 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule454 #-}- rule454 = \ ((_lhsIlazyIntras) :: Set String) ->- _lhsIlazyIntras- {-# INLINE rule455 #-}- rule455 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule456 #-}- rule456 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule457 #-}- rule457 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule458 #-}- rule458 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule459 #-}- rule459 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule460 #-}- rule460 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule461 #-}- rule461 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule462 #-}- rule462 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _lhsIruleKinds- {-# INLINE rule463 #-}- rule463 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule464 #-}- rule464 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule465 #-}- rule465 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->- _lhsIusageInfo- {-# INLINE rule466 #-}- rule466 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule467 #-}- rule467 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule468 #-}- rule468 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule469 #-}- rule469 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule470 #-}- rule470 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule471 #-}- rule471 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule472 #-}- rule472 = \ ((_lhsIlazyIntras) :: Set String) ->- _lhsIlazyIntras- {-# INLINE rule473 #-}- rule473 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule474 #-}- rule474 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule475 #-}- rule475 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule476 #-}- rule476 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule477 #-}- rule477 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule478 #-}- rule478 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule479 #-}- rule479 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule480 #-}- rule480 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _lhsIruleKinds- {-# INLINE rule481 #-}- rule481 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule482 #-}- rule482 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks- {-# INLINE rule483 #-}- rule483 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->- _lhsIusageInfo-{-# NOINLINE sem_ERules_Nil #-}-sem_ERules_Nil :: T_ERules -sem_ERules_Nil = T_ERules (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_ERules_v22 - v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let- _lhsOerrors :: Seq Error- _lhsOerrors = rule484 ()- _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)- _lhsOmrules = rule485 ()- _lhsOruledefs :: Map Identifier (Set String)- _lhsOruledefs = rule486 ()- _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))- _lhsOruleuses = rule487 ()- _lhsOsem_rules :: PP_Doc- _lhsOsem_rules = rule488 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule489 ()- __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs- in __result_ )- in C_ERules_s23 v22- {-# INLINE rule484 #-}- rule484 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule485 #-}- rule485 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule486 #-}- rule486 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule487 #-}- rule487 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule488 #-}- rule488 = \ (_ :: ()) ->- empty- {-# INLINE rule489 #-}- rule489 = \ (_ :: ()) ->- Set.empty---- ExecutionPlan -------------------------------------------------- wrapper-data Inh_ExecutionPlan = Inh_ExecutionPlan { importBlocks_Inh_ExecutionPlan :: (PP_Doc), inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainBlocksDoc_Inh_ExecutionPlan :: (PP_Doc), mainFile_Inh_ExecutionPlan :: (String), mainName_Inh_ExecutionPlan :: (String), moduleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String), options_Inh_ExecutionPlan :: (Options), pragmaBlocks_Inh_ExecutionPlan :: (String), synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc), textBlocks_Inh_ExecutionPlan :: (PP_Doc) }-data Syn_ExecutionPlan = Syn_ExecutionPlan { errors_Syn_ExecutionPlan :: (Seq Error), genIO_Syn_ExecutionPlan :: (IO ()), output_Syn_ExecutionPlan :: (PP_Doc) }-{-# INLINABLE wrap_ExecutionPlan #-}-wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> (Syn_ExecutionPlan )-wrap_ExecutionPlan (T_ExecutionPlan act) (Inh_ExecutionPlan _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ExecutionPlan_vIn25 _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks- (T_ExecutionPlan_vOut25 _lhsOerrors _lhsOgenIO _lhsOoutput) <- return (inv_ExecutionPlan_s26 sem arg)- return (Syn_ExecutionPlan _lhsOerrors _lhsOgenIO _lhsOoutput)- )---- cata-{-# INLINE sem_ExecutionPlan #-}-sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan -sem_ExecutionPlan ( ExecutionPlan nonts_ typeSyns_ wrappers_ derivings_ ) = sem_ExecutionPlan_ExecutionPlan ( sem_ENonterminals nonts_ ) typeSyns_ wrappers_ derivings_---- semantic domain-newtype T_ExecutionPlan = T_ExecutionPlan {- attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )- }-newtype T_ExecutionPlan_s26 = C_ExecutionPlan_s26 {- inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )- }-data T_ExecutionPlan_s27 = C_ExecutionPlan_s27-type T_ExecutionPlan_v25 = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )-data T_ExecutionPlan_vIn25 = T_ExecutionPlan_vIn25 (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (Map BlockInfo PP_Doc) (PP_Doc)-data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (Seq Error) (IO ()) (PP_Doc)-{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}-sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan -sem_ExecutionPlan_ExecutionPlan arg_nonts_ arg_typeSyns_ arg_wrappers_ arg_derivings_ = T_ExecutionPlan (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_ExecutionPlan_v25 - v25 = \ (T_ExecutionPlan_vIn25 _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) -> ( let- _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_nonts_))- (T_ENonterminals_vOut10 _nontsIappendCommon _nontsIappendMain _nontsIchildvisit _nontsIerrors _nontsIfromToStates _nontsIgenProdIO _nontsIimports _nontsIinitStates _nontsIoutput _nontsIsemFunBndDefs _nontsIsemFunBndTps _nontsIvisitKinds _nontsIvisitdefs _nontsIvisituses) = inv_ENonterminals_s11 _nontsX11 (T_ENonterminals_vIn10 _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOderivings _nontsOimportBlocks _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOmoduleHeader _nontsOoptions _nontsOpragmaBlocks _nontsOsynmap _nontsOtextBlocks _nontsOtypeSyns _nontsOwrappers)- _lhsOoutput :: PP_Doc- _lhsOoutput = rule490 _commonExtra _nontsIoutput _wrappersExtra- _nontsOwrappers = rule491 arg_wrappers_- _nontsOtypeSyns = rule492 arg_typeSyns_- _nontsOderivings = rule493 arg_derivings_- _wrappersExtra = rule494 _lateSemBndDef _lhsIoptions- _commonExtra = rule495 _lateSemBndTp _lhsIoptions- _lateSemBndTp = rule496 _lhsImainName _nontsIsemFunBndTps- _lateSemBndDef = rule497 _lhsImainName _lhsIoptions _nontsIsemFunBndDefs arg_wrappers_- _nontsOallchildvisit = rule498 _nontsIchildvisit- _nontsOavisitdefs = rule499 _nontsIvisitdefs- _nontsOavisituses = rule500 _nontsIvisituses- _lhsOgenIO :: IO ()- _lhsOgenIO = rule501 _genCommonModule _genMainModule _nontsIgenProdIO- _mainModuleFile = rule502 _lhsImainFile- _ppMonadImports = rule503 _lhsIoptions- _genMainModule = rule504 _lhsImainBlocksDoc _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _mainModuleFile _nontsIappendMain _nontsIimports _ppMonadImports _wrappersExtra- _commonFile = rule505 _lhsImainFile- _genCommonModule = rule506 _commonExtra _commonFile _lhsIimportBlocks _lhsImainName _lhsImoduleHeader _lhsIpragmaBlocks _lhsItextBlocks _nontsIappendCommon _ppMonadImports- _nontsOallFromToStates = rule507 _nontsIfromToStates- _nontsOallVisitKinds = rule508 _nontsIvisitKinds- _nontsOallInitStates = rule509 _nontsIinitStates- _lhsOerrors :: Seq Error- _lhsOerrors = rule510 _nontsIerrors- _nontsOimportBlocks = rule511 _lhsIimportBlocks- _nontsOinhmap = rule512 _lhsIinhmap- _nontsOlocalAttrTypes = rule513 _lhsIlocalAttrTypes- _nontsOmainFile = rule514 _lhsImainFile- _nontsOmainName = rule515 _lhsImainName- _nontsOmoduleHeader = rule516 _lhsImoduleHeader- _nontsOoptions = rule517 _lhsIoptions- _nontsOpragmaBlocks = rule518 _lhsIpragmaBlocks- _nontsOsynmap = rule519 _lhsIsynmap- _nontsOtextBlocks = rule520 _lhsItextBlocks- __result_ = T_ExecutionPlan_vOut25 _lhsOerrors _lhsOgenIO _lhsOoutput- in __result_ )- in C_ExecutionPlan_s26 v25- {-# INLINE rule490 #-}- {-# LINE 87 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule490 = \ _commonExtra ((_nontsIoutput) :: PP_Doc) _wrappersExtra ->- {-# LINE 87 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIoutput >-< _commonExtra >-< _wrappersExtra- {-# LINE 3814 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule491 #-}- {-# LINE 93 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule491 = \ wrappers_ ->- {-# LINE 93 "./src-ag/ExecutionPlan2Hs.ag" #-}- wrappers_- {-# LINE 3820 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule492 #-}- {-# LINE 132 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule492 = \ typeSyns_ ->- {-# LINE 132 "./src-ag/ExecutionPlan2Hs.ag" #-}- typeSyns_- {-# LINE 3826 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule493 #-}- {-# LINE 133 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule493 = \ derivings_ ->- {-# LINE 133 "./src-ag/ExecutionPlan2Hs.ag" #-}- derivings_- {-# LINE 3832 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule494 #-}- {-# LINE 529 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule494 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->- {-# LINE 529 "./src-ag/ExecutionPlan2Hs.ag" #-}- if lateHigherOrderBinding _lhsIoptions- then _lateSemBndDef- else empty- {-# LINE 3840 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule495 #-}- {-# LINE 532 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule495 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->- {-# LINE 532 "./src-ag/ExecutionPlan2Hs.ag" #-}- if lateHigherOrderBinding _lhsIoptions- then _lateSemBndTp- else empty- {-# LINE 3848 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule496 #-}- {-# LINE 535 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule496 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->- {-# LINE 535 "./src-ag/ExecutionPlan2Hs.ag" #-}- "data" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName- >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)- {-# LINE 3855 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule497 #-}- {-# LINE 537 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule497 = \ ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) wrappers_ ->- {-# LINE 537 "./src-ag/ExecutionPlan2Hs.ag" #-}- ( if noInlinePragmas _lhsIoptions- then empty- else if helpInlining _lhsIoptions && Set.size wrappers_ == 1- then ppInline $ lateBindingFieldNm _lhsImainName- else ppNoInline $ lateBindingFieldNm _lhsImainName- )- >-< lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName- >-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName- >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )- {-# LINE 3869 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule498 #-}- {-# LINE 1213 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule498 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- {-# LINE 1213 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIchildvisit- {-# LINE 3875 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule499 #-}- {-# LINE 1357 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule499 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- {-# LINE 1357 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIvisitdefs- {-# LINE 3881 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule500 #-}- {-# LINE 1358 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule500 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- {-# LINE 1358 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIvisituses- {-# LINE 3887 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule501 #-}- {-# LINE 1429 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule501 = \ _genCommonModule _genMainModule ((_nontsIgenProdIO) :: IO ()) ->- {-# LINE 1429 "./src-ag/ExecutionPlan2Hs.ag" #-}- do _genMainModule- _genCommonModule- _nontsIgenProdIO- {-# LINE 3895 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule502 #-}- {-# LINE 1432 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule502 = \ ((_lhsImainFile) :: String) ->- {-# LINE 1432 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsImainFile- {-# LINE 3901 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule503 #-}- {-# LINE 1433 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule503 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1433 "./src-ag/ExecutionPlan2Hs.ag" #-}- ( if tupleAsDummyToken _lhsIoptions- then empty- else pp "import GHC.Prim"- )- >-< if parallelInvoke _lhsIoptions- then pp "import qualified System.IO.Unsafe(unsafePerformIO)"- >-< pp "import System.IO(IO)"- >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"- else pp "import Control.Monad.Identity"- {-# LINE 3915 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule504 #-}- {-# LINE 1442 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule504 = \ ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptions) :: Options) ((_lhsIpragmaBlocks) :: String) _mainModuleFile ((_nontsIappendMain) :: [PP_Doc]) ((_nontsIimports) :: [PP_Doc]) _ppMonadImports _wrappersExtra ->- {-# LINE 1442 "./src-ag/ExecutionPlan2Hs.ag" #-}- writeModule _mainModuleFile- ( [ warrenFlagsPP _lhsIoptions- , pp $ _lhsIpragmaBlocks- , pp $ _lhsImoduleHeader _lhsImainName "" "" False- , _ppMonadImports- , pp $ "import " ++ _lhsImainName ++ "_common"- ]- ++ _nontsIimports- ++ [_lhsImainBlocksDoc]- ++ [_wrappersExtra ]- ++ _nontsIappendMain- )- {-# LINE 3932 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule505 #-}- {-# LINE 1454 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule505 = \ ((_lhsImainFile) :: String) ->- {-# LINE 1454 "./src-ag/ExecutionPlan2Hs.ag" #-}- replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")- {-# LINE 3938 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule506 #-}- {-# LINE 1455 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule506 = \ _commonExtra _commonFile ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlocks) :: PP_Doc) ((_nontsIappendCommon) :: [PP_Doc]) _ppMonadImports ->- {-# LINE 1455 "./src-ag/ExecutionPlan2Hs.ag" #-}- writeModule _commonFile- ( [ pp $ "{-# LANGUAGE Rank2Types, GADTs #-}"- , pp $ _lhsIpragmaBlocks- , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True- , _ppMonadImports- , _lhsIimportBlocks- , _lhsItextBlocks- , _commonExtra- ]- ++ _nontsIappendCommon- )- {-# LINE 3954 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule507 #-}- {-# LINE 1574 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule507 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- {-# LINE 1574 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIfromToStates- {-# LINE 3960 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule508 #-}- {-# LINE 1618 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule508 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- {-# LINE 1618 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIvisitKinds- {-# LINE 3966 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule509 #-}- {-# LINE 1632 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule509 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->- {-# LINE 1632 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nontsIinitStates- {-# LINE 3972 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule510 #-}- rule510 = \ ((_nontsIerrors) :: Seq Error) ->- _nontsIerrors- {-# INLINE rule511 #-}- rule511 = \ ((_lhsIimportBlocks) :: PP_Doc) ->- _lhsIimportBlocks- {-# INLINE rule512 #-}- rule512 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->- _lhsIinhmap- {-# INLINE rule513 #-}- rule513 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->- _lhsIlocalAttrTypes- {-# INLINE rule514 #-}- rule514 = \ ((_lhsImainFile) :: String) ->- _lhsImainFile- {-# INLINE rule515 #-}- rule515 = \ ((_lhsImainName) :: String) ->- _lhsImainName- {-# INLINE rule516 #-}- rule516 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->- _lhsImoduleHeader- {-# INLINE rule517 #-}- rule517 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule518 #-}- rule518 = \ ((_lhsIpragmaBlocks) :: String) ->- _lhsIpragmaBlocks- {-# INLINE rule519 #-}- rule519 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->- _lhsIsynmap- {-# INLINE rule520 #-}- rule520 = \ ((_lhsItextBlocks) :: PP_Doc) ->- _lhsItextBlocks---- Expression ----------------------------------------------------- wrapper-data Inh_Expression = Inh_Expression { }-data Syn_Expression = Syn_Expression { attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), pos_Syn_Expression :: (Pos), semfunc_Syn_Expression :: (PP_Doc), tks_Syn_Expression :: ([HsToken]) }-{-# INLINABLE wrap_Expression #-}-wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )-wrap_Expression (T_Expression act) (Inh_Expression ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Expression_vIn28 - (T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks) <- return (inv_Expression_s29 sem arg)- return (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks)- )---- cata-{-# INLINE sem_Expression #-}-sem_Expression :: Expression -> T_Expression -sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_---- semantic domain-newtype T_Expression = T_Expression {- attach_T_Expression :: Identity (T_Expression_s29 )- }-newtype T_Expression_s29 = C_Expression_s29 {- inv_Expression_s29 :: (T_Expression_v28 )- }-data T_Expression_s30 = C_Expression_s30-type T_Expression_v28 = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )-data T_Expression_vIn28 = T_Expression_vIn28 -data T_Expression_vOut28 = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])-{-# NOINLINE sem_Expression_Expression #-}-sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression -sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_Expression_v28 - v28 = \ (T_Expression_vIn28 ) -> ( let- _lhsOtks :: [HsToken]- _lhsOtks = rule521 arg_tks_- _lhsOpos :: Pos- _lhsOpos = rule522 arg_pos_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule523 arg_tks_- _lhsOsemfunc :: PP_Doc- _lhsOsemfunc = rule524 arg_tks_- __result_ = T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks- in __result_ )- in C_Expression_s29 v28- {-# INLINE rule521 #-}- {-# LINE 1069 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule521 = \ tks_ ->- {-# LINE 1069 "./src-ag/ExecutionPlan2Hs.ag" #-}- tks_- {-# LINE 4060 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule522 #-}- {-# LINE 1112 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule522 = \ pos_ ->- {-# LINE 1112 "./src-ag/ExecutionPlan2Hs.ag" #-}- pos_- {-# LINE 4066 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule523 #-}- {-# LINE 1198 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule523 = \ tks_ ->- {-# LINE 1198 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 4072 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule524 #-}- {-# LINE 1199 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule524 = \ tks_ ->- {-# LINE 1199 "./src-ag/ExecutionPlan2Hs.ag" #-}- vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) Inh_HsToken)) tks_- {-# LINE 4078 "dist/build/ExecutionPlan2Hs.hs"#-}---- HsToken -------------------------------------------------------- wrapper-data Inh_HsToken = Inh_HsToken { }-data Syn_HsToken = Syn_HsToken { attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), tok_Syn_HsToken :: ((Pos,String)) }-{-# INLINABLE wrap_HsToken #-}-wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )-wrap_HsToken (T_HsToken act) (Inh_HsToken ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_HsToken_vIn31 - (T_HsToken_vOut31 _lhsOattrs _lhsOtok) <- return (inv_HsToken_s32 sem arg)- return (Syn_HsToken _lhsOattrs _lhsOtok)- )---- cata-{-# NOINLINE sem_HsToken #-}-sem_HsToken :: HsToken -> T_HsToken -sem_HsToken ( AGLocal var_ pos_ rdesc_ ) = sem_HsToken_AGLocal var_ pos_ rdesc_-sem_HsToken ( AGField field_ attr_ pos_ rdesc_ ) = sem_HsToken_AGField field_ attr_ pos_ rdesc_-sem_HsToken ( HsToken value_ pos_ ) = sem_HsToken_HsToken value_ pos_-sem_HsToken ( CharToken value_ pos_ ) = sem_HsToken_CharToken value_ pos_-sem_HsToken ( StrToken value_ pos_ ) = sem_HsToken_StrToken value_ pos_-sem_HsToken ( Err mesg_ pos_ ) = sem_HsToken_Err mesg_ pos_---- semantic domain-newtype T_HsToken = T_HsToken {- attach_T_HsToken :: Identity (T_HsToken_s32 )- }-newtype T_HsToken_s32 = C_HsToken_s32 {- inv_HsToken_s32 :: (T_HsToken_v31 )- }-data T_HsToken_s33 = C_HsToken_s33-type T_HsToken_v31 = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )-data T_HsToken_vIn31 = T_HsToken_vIn31 -data T_HsToken_vOut31 = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))-{-# NOINLINE sem_HsToken_AGLocal #-}-sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken -sem_HsToken_AGLocal arg_var_ arg_pos_ _ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule525 arg_var_- _tok = rule526 arg_pos_ arg_var_- _lhsOtok :: (Pos,String)- _lhsOtok = rule527 _tok- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule525 #-}- {-# LINE 1157 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule525 = \ var_ ->- {-# LINE 1157 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton (fieldname var_) Nothing- {-# LINE 4135 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule526 #-}- {-# LINE 1402 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule526 = \ pos_ var_ ->- {-# LINE 1402 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pos_,fieldname var_)- {-# LINE 4141 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule527 #-}- rule527 = \ _tok ->- _tok-{-# NOINLINE sem_HsToken_AGField #-}-sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken -sem_HsToken_AGField arg_field_ arg_attr_ arg_pos_ arg_rdesc_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _mbAttr = rule528 arg_attr_ arg_field_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule529 _mbAttr arg_attr_ arg_field_- _addTrace = rule530 arg_attr_ arg_field_ arg_rdesc_- _lhsOtok :: (Pos,String)- _lhsOtok = rule531 _addTrace arg_attr_ arg_field_ arg_pos_- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule528 #-}- {-# LINE 1158 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule528 = \ attr_ field_ ->- {-# LINE 1158 "./src-ag/ExecutionPlan2Hs.ag" #-}- if field_ == _INST || field_ == _FIELD || field_ == _INST'- then Nothing- else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_- {-# LINE 4168 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule529 #-}- {-# LINE 1161 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule529 = \ _mbAttr attr_ field_ ->- {-# LINE 1161 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton (attrname True field_ attr_) _mbAttr- {-# LINE 4174 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule530 #-}- {-# LINE 1406 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule530 = \ attr_ field_ rdesc_ ->- {-# LINE 1406 "./src-ag/ExecutionPlan2Hs.ag" #-}- case rdesc_ of- Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"- Nothing -> id- {-# LINE 4182 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule531 #-}- {-# LINE 1409 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule531 = \ _addTrace attr_ field_ pos_ ->- {-# LINE 1409 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, _addTrace $ attrname True field_ attr_)- {-# LINE 4188 "dist/build/ExecutionPlan2Hs.hs"#-}-{-# NOINLINE sem_HsToken_HsToken #-}-sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken -sem_HsToken_HsToken arg_value_ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule532 arg_pos_ arg_value_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule533 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule532 #-}- {-# LINE 1411 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule532 = \ pos_ value_ ->- {-# LINE 1411 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, value_)- {-# LINE 4208 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule533 #-}- rule533 = \ (_ :: ()) ->- Map.empty-{-# NOINLINE sem_HsToken_CharToken #-}-sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken -sem_HsToken_CharToken arg_value_ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule534 arg_pos_ arg_value_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule535 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule534 #-}- {-# LINE 1413 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule534 = \ pos_ value_ ->- {-# LINE 1413 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, if null value_- then ""- else showCharShort (head value_)- )- {-# LINE 4234 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule535 #-}- rule535 = \ (_ :: ()) ->- Map.empty-{-# NOINLINE sem_HsToken_StrToken #-}-sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken -sem_HsToken_StrToken arg_value_ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule536 arg_pos_ arg_value_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule537 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule536 #-}- {-# LINE 1418 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule536 = \ pos_ value_ ->- {-# LINE 1418 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, showStrShort value_)- {-# LINE 4257 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule537 #-}- rule537 = \ (_ :: ()) ->- Map.empty-{-# NOINLINE sem_HsToken_Err #-}-sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken -sem_HsToken_Err _ arg_pos_ = T_HsToken (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_HsToken_v31 - v31 = \ (T_HsToken_vIn31 ) -> ( let- _lhsOtok :: (Pos,String)- _lhsOtok = rule538 arg_pos_- _lhsOattrs :: Map String (Maybe NonLocalAttr)- _lhsOattrs = rule539 ()- __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok- in __result_ )- in C_HsToken_s32 v31- {-# INLINE rule538 #-}- {-# LINE 1419 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule538 = \ pos_ ->- {-# LINE 1419 "./src-ag/ExecutionPlan2Hs.ag" #-}- (pos_, "")- {-# LINE 4280 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule539 #-}- rule539 = \ (_ :: ()) ->- Map.empty---- HsTokens ------------------------------------------------------- wrapper-data Inh_HsTokens = Inh_HsTokens { }-data Syn_HsTokens = Syn_HsTokens { tks_Syn_HsTokens :: ([(Pos,String)]) }-{-# INLINABLE wrap_HsTokens #-}-wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )-wrap_HsTokens (T_HsTokens act) (Inh_HsTokens ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_HsTokens_vIn34 - (T_HsTokens_vOut34 _lhsOtks) <- return (inv_HsTokens_s35 sem arg)- return (Syn_HsTokens _lhsOtks)- )---- cata-{-# NOINLINE sem_HsTokens #-}-sem_HsTokens :: HsTokens -> T_HsTokens -sem_HsTokens list = Prelude.foldr sem_HsTokens_Cons sem_HsTokens_Nil (Prelude.map sem_HsToken list)---- semantic domain-newtype T_HsTokens = T_HsTokens {- attach_T_HsTokens :: Identity (T_HsTokens_s35 )- }-newtype T_HsTokens_s35 = C_HsTokens_s35 {- inv_HsTokens_s35 :: (T_HsTokens_v34 )- }-data T_HsTokens_s36 = C_HsTokens_s36-type T_HsTokens_v34 = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )-data T_HsTokens_vIn34 = T_HsTokens_vIn34 -data T_HsTokens_vOut34 = T_HsTokens_vOut34 ([(Pos,String)])-{-# NOINLINE sem_HsTokens_Cons #-}-sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens -sem_HsTokens_Cons arg_hd_ arg_tl_ = T_HsTokens (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_HsTokens_v34 - v34 = \ (T_HsTokens_vIn34 ) -> ( let- _hdX32 = Control.Monad.Identity.runIdentity (attach_T_HsToken (arg_hd_))- _tlX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tl_))- (T_HsToken_vOut31 _hdIattrs _hdItok) = inv_HsToken_s32 _hdX32 (T_HsToken_vIn31 )- (T_HsTokens_vOut34 _tlItks) = inv_HsTokens_s35 _tlX35 (T_HsTokens_vIn34 )- _lhsOtks :: [(Pos,String)]- _lhsOtks = rule540 _hdItok _tlItks- __result_ = T_HsTokens_vOut34 _lhsOtks- in __result_ )- in C_HsTokens_s35 v34- {-# INLINE rule540 #-}- {-# LINE 1398 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule540 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->- {-# LINE 1398 "./src-ag/ExecutionPlan2Hs.ag" #-}- _hdItok : _tlItks- {-# LINE 4336 "dist/build/ExecutionPlan2Hs.hs"#-}-{-# NOINLINE sem_HsTokens_Nil #-}-sem_HsTokens_Nil :: T_HsTokens -sem_HsTokens_Nil = T_HsTokens (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_HsTokens_v34 - v34 = \ (T_HsTokens_vIn34 ) -> ( let- _lhsOtks :: [(Pos,String)]- _lhsOtks = rule541 ()- __result_ = T_HsTokens_vOut34 _lhsOtks- in __result_ )- in C_HsTokens_s35 v34- {-# INLINE rule541 #-}- {-# LINE 1399 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule541 = \ (_ :: ()) ->- {-# LINE 1399 "./src-ag/ExecutionPlan2Hs.ag" #-}- []- {-# LINE 4354 "dist/build/ExecutionPlan2Hs.hs"#-}---- HsTokensRoot --------------------------------------------------- wrapper-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 act) (Inh_HsTokensRoot ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_HsTokensRoot_vIn37 - (T_HsTokensRoot_vOut37 ) <- return (inv_HsTokensRoot_s38 sem arg)- return (Syn_HsTokensRoot )- )---- cata-{-# INLINE sem_HsTokensRoot #-}-sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot -sem_HsTokensRoot ( HsTokensRoot tokens_ ) = sem_HsTokensRoot_HsTokensRoot ( sem_HsTokens tokens_ )---- semantic domain-newtype T_HsTokensRoot = T_HsTokensRoot {- attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )- }-newtype T_HsTokensRoot_s38 = C_HsTokensRoot_s38 {- inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )- }-data T_HsTokensRoot_s39 = C_HsTokensRoot_s39-type T_HsTokensRoot_v37 = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )-data T_HsTokensRoot_vIn37 = T_HsTokensRoot_vIn37 -data T_HsTokensRoot_vOut37 = T_HsTokensRoot_vOut37 -{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}-sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot -sem_HsTokensRoot_HsTokensRoot arg_tokens_ = T_HsTokensRoot (return st38) where- {-# NOINLINE st38 #-}- st38 = let- v37 :: T_HsTokensRoot_v37 - v37 = \ (T_HsTokensRoot_vIn37 ) -> ( let- _tokensX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tokens_))- (T_HsTokens_vOut34 _tokensItks) = inv_HsTokens_s35 _tokensX35 (T_HsTokens_vIn34 )- __result_ = T_HsTokensRoot_vOut37 - in __result_ )- in C_HsTokensRoot_s38 v37---- Pattern -------------------------------------------------------- wrapper-data Inh_Pattern = Inh_Pattern { allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), anyLazyKind_Inh_Pattern :: (Bool), inhmap_Inh_Pattern :: (Attributes), localAttrTypes_Inh_Pattern :: (Map Identifier Type), options_Inh_Pattern :: (Options), synmap_Inh_Pattern :: (Attributes) }-data Syn_Pattern = Syn_Pattern { attrTypes_Syn_Pattern :: (PP_Doc), attrs_Syn_Pattern :: (Set String), copy_Syn_Pattern :: (Pattern), isUnderscore_Syn_Pattern :: (Bool), sem_lhs_Syn_Pattern :: ( PP_Doc ) }-{-# INLINABLE wrap_Pattern #-}-wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )-wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap- (T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs) <- return (inv_Pattern_s41 sem arg)- return (Syn_Pattern _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs)- )---- cata-{-# NOINLINE sem_Pattern #-}-sem_Pattern :: Pattern -> T_Pattern -sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )-sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )-sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )-sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )-sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_---- semantic domain-newtype T_Pattern = T_Pattern {- attach_T_Pattern :: Identity (T_Pattern_s41 )- }-newtype T_Pattern_s41 = C_Pattern_s41 {- inv_Pattern_s41 :: (T_Pattern_v40 )- }-data T_Pattern_s42 = C_Pattern_s42-type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )-data T_Pattern_vIn40 = T_Pattern_vIn40 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)-data T_Pattern_vOut40 = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) (Bool) ( PP_Doc )-{-# NOINLINE sem_Pattern_Constr #-}-sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern -sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule542 _addbang1 _patsIsem_lhs arg_name_- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule543 ()- _addbang = rule544 _lhsIoptions- _addbang1 = rule545 _addbang _lhsIanyLazyKind- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule546 _patsIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule547 _patsIattrs- _copy = rule548 _patsIcopy arg_name_- _lhsOcopy :: Pattern- _lhsOcopy = rule549 _copy- _patsOallInhmap = rule550 _lhsIallInhmap- _patsOallSynmap = rule551 _lhsIallSynmap- _patsOanyLazyKind = rule552 _lhsIanyLazyKind- _patsOinhmap = rule553 _lhsIinhmap- _patsOlocalAttrTypes = rule554 _lhsIlocalAttrTypes- _patsOoptions = rule555 _lhsIoptions- _patsOsynmap = rule556 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule542 #-}- {-# LINE 1126 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule542 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) name_ ->- {-# LINE 1126 "./src-ag/ExecutionPlan2Hs.ag" #-}- _addbang1 $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs- {-# LINE 4470 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule543 #-}- {-# LINE 1133 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule543 = \ (_ :: ()) ->- {-# LINE 1133 "./src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 4476 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule544 #-}- {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule544 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 4482 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule545 #-}- {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule545 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->- {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _lhsIanyLazyKind then id else _addbang- {-# LINE 4488 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule546 #-}- rule546 = \ ((_patsIattrTypes) :: PP_Doc) ->- _patsIattrTypes- {-# INLINE rule547 #-}- rule547 = \ ((_patsIattrs) :: Set String) ->- _patsIattrs- {-# INLINE rule548 #-}- rule548 = \ ((_patsIcopy) :: Patterns) name_ ->- Constr name_ _patsIcopy- {-# INLINE rule549 #-}- rule549 = \ _copy ->- _copy- {-# INLINE rule550 #-}- rule550 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule551 #-}- rule551 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule552 #-}- rule552 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule553 #-}- rule553 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule554 #-}- rule554 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule555 #-}- rule555 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule556 #-}- rule556 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Product #-}-sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern -sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule557 _addbang1 _patsIsem_lhs- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule558 ()- _addbang = rule559 _lhsIoptions- _addbang1 = rule560 _addbang _lhsIanyLazyKind- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule561 _patsIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule562 _patsIattrs- _copy = rule563 _patsIcopy arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule564 _copy- _patsOallInhmap = rule565 _lhsIallInhmap- _patsOallSynmap = rule566 _lhsIallSynmap- _patsOanyLazyKind = rule567 _lhsIanyLazyKind- _patsOinhmap = rule568 _lhsIinhmap- _patsOlocalAttrTypes = rule569 _lhsIlocalAttrTypes- _patsOoptions = rule570 _lhsIoptions- _patsOsynmap = rule571 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule557 #-}- {-# LINE 1125 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule557 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) ->- {-# LINE 1125 "./src-ag/ExecutionPlan2Hs.ag" #-}- _addbang1 $ pp_block "(" ")" "," _patsIsem_lhs- {-# LINE 4559 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule558 #-}- {-# LINE 1134 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule558 = \ (_ :: ()) ->- {-# LINE 1134 "./src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 4565 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule559 #-}- {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule559 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 4571 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule560 #-}- {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule560 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->- {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _lhsIanyLazyKind then id else _addbang- {-# LINE 4577 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule561 #-}- rule561 = \ ((_patsIattrTypes) :: PP_Doc) ->- _patsIattrTypes- {-# INLINE rule562 #-}- rule562 = \ ((_patsIattrs) :: Set String) ->- _patsIattrs- {-# INLINE rule563 #-}- rule563 = \ ((_patsIcopy) :: Patterns) pos_ ->- Product pos_ _patsIcopy- {-# INLINE rule564 #-}- rule564 = \ _copy ->- _copy- {-# INLINE rule565 #-}- rule565 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule566 #-}- rule566 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule567 #-}- rule567 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule568 #-}- rule568 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule569 #-}- rule569 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule570 #-}- rule570 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule571 #-}- rule571 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Alias #-}-sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern -sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)- _varPat = rule572 arg_attr_ arg_field_- _patExpr = rule573 _patIisUnderscore _patIsem_lhs _varPat- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule574 _addbang1 _patExpr- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule575 ()- _lhsOattrs :: Set String- _lhsOattrs = rule576 _patIattrs arg_attr_ arg_field_- _mbTp = rule577 _lhsIlocalAttrTypes _lhsIsynmap arg_attr_ arg_field_- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule578 _mbTp _patIattrTypes arg_attr_ arg_field_- _addbang = rule579 _lhsIoptions- _addbang1 = rule580 _addbang _lhsIanyLazyKind- _copy = rule581 _patIcopy arg_attr_ arg_field_- _lhsOcopy :: Pattern- _lhsOcopy = rule582 _copy- _patOallInhmap = rule583 _lhsIallInhmap- _patOallSynmap = rule584 _lhsIallSynmap- _patOanyLazyKind = rule585 _lhsIanyLazyKind- _patOinhmap = rule586 _lhsIinhmap- _patOlocalAttrTypes = rule587 _lhsIlocalAttrTypes- _patOoptions = rule588 _lhsIoptions- _patOsynmap = rule589 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule572 #-}- {-# LINE 1120 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule572 = \ attr_ field_ ->- {-# LINE 1120 "./src-ag/ExecutionPlan2Hs.ag" #-}- text $ attrname False field_ attr_- {-# LINE 4651 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule573 #-}- {-# LINE 1121 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule573 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _varPat ->- {-# LINE 1121 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _patIisUnderscore- then _varPat- else _varPat >|< "@" >|< _patIsem_lhs- {-# LINE 4659 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule574 #-}- {-# LINE 1124 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule574 = \ _addbang1 _patExpr ->- {-# LINE 1124 "./src-ag/ExecutionPlan2Hs.ag" #-}- _addbang1 _patExpr- {-# LINE 4665 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule575 #-}- {-# LINE 1135 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule575 = \ (_ :: ()) ->- {-# LINE 1135 "./src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 4671 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule576 #-}- {-# LINE 1141 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule576 = \ ((_patIattrs) :: Set String) attr_ field_ ->- {-# LINE 1141 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.insert (attrname False field_ attr_) _patIattrs- {-# LINE 4677 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule577 #-}- {-# LINE 1146 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule577 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->- {-# LINE 1146 "./src-ag/ExecutionPlan2Hs.ag" #-}- if field_ == _LHS- then Map.lookup attr_ _lhsIsynmap- else if field_ == _LOC- then Map.lookup attr_ _lhsIlocalAttrTypes- else Nothing- {-# LINE 4687 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule578 #-}- {-# LINE 1151 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule578 = \ _mbTp ((_patIattrTypes) :: PP_Doc) attr_ field_ ->- {-# LINE 1151 "./src-ag/ExecutionPlan2Hs.ag" #-}- maybe empty (\tp -> (attrname False field_ attr_) >#< "::" >#< ppTp tp) _mbTp- >-< _patIattrTypes- {-# LINE 4694 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule579 #-}- {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule579 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 4700 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule580 #-}- {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule580 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->- {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _lhsIanyLazyKind then id else _addbang- {-# LINE 4706 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule581 #-}- rule581 = \ ((_patIcopy) :: Pattern) attr_ field_ ->- Alias field_ attr_ _patIcopy- {-# INLINE rule582 #-}- rule582 = \ _copy ->- _copy- {-# INLINE rule583 #-}- rule583 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule584 #-}- rule584 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule585 #-}- rule585 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule586 #-}- rule586 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule587 #-}- rule587 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule588 #-}- rule588 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule589 #-}- rule589 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Irrefutable #-}-sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern -sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule590 _patIsem_lhs- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule591 _patIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule592 _patIattrs- _copy = rule593 _patIcopy- _lhsOcopy :: Pattern- _lhsOcopy = rule594 _copy- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule595 _patIisUnderscore- _patOallInhmap = rule596 _lhsIallInhmap- _patOallSynmap = rule597 _lhsIallSynmap- _patOanyLazyKind = rule598 _lhsIanyLazyKind- _patOinhmap = rule599 _lhsIinhmap- _patOlocalAttrTypes = rule600 _lhsIlocalAttrTypes- _patOoptions = rule601 _lhsIoptions- _patOsynmap = rule602 _lhsIsynmap- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule590 #-}- {-# LINE 1128 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule590 = \ ((_patIsem_lhs) :: PP_Doc ) ->- {-# LINE 1128 "./src-ag/ExecutionPlan2Hs.ag" #-}- text "~" >|< pp_parens _patIsem_lhs- {-# LINE 4769 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule591 #-}- rule591 = \ ((_patIattrTypes) :: PP_Doc) ->- _patIattrTypes- {-# INLINE rule592 #-}- rule592 = \ ((_patIattrs) :: Set String) ->- _patIattrs- {-# INLINE rule593 #-}- rule593 = \ ((_patIcopy) :: Pattern) ->- Irrefutable _patIcopy- {-# INLINE rule594 #-}- rule594 = \ _copy ->- _copy- {-# INLINE rule595 #-}- rule595 = \ ((_patIisUnderscore) :: Bool) ->- _patIisUnderscore- {-# INLINE rule596 #-}- rule596 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule597 #-}- rule597 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule598 #-}- rule598 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule599 #-}- rule599 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule600 #-}- rule600 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule601 #-}- rule601 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule602 #-}- rule602 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Pattern_Underscore #-}-sem_Pattern_Underscore :: (Pos) -> T_Pattern -sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _lhsOsem_lhs :: PP_Doc - _lhsOsem_lhs = rule603 ()- _lhsOisUnderscore :: Bool- _lhsOisUnderscore = rule604 ()- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule605 ()- _lhsOattrs :: Set String- _lhsOattrs = rule606 ()- _copy = rule607 arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule608 _copy- __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule603 #-}- {-# LINE 1127 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule603 = \ (_ :: ()) ->- {-# LINE 1127 "./src-ag/ExecutionPlan2Hs.ag" #-}- text "_"- {-# LINE 4832 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule604 #-}- {-# LINE 1136 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule604 = \ (_ :: ()) ->- {-# LINE 1136 "./src-ag/ExecutionPlan2Hs.ag" #-}- True- {-# LINE 4838 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule605 #-}- rule605 = \ (_ :: ()) ->- empty- {-# INLINE rule606 #-}- rule606 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule607 #-}- rule607 = \ pos_ ->- Underscore pos_- {-# INLINE rule608 #-}- rule608 = \ _copy ->- _copy---- Patterns ------------------------------------------------------- wrapper-data Inh_Patterns = Inh_Patterns { allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), anyLazyKind_Inh_Patterns :: (Bool), inhmap_Inh_Patterns :: (Attributes), localAttrTypes_Inh_Patterns :: (Map Identifier Type), options_Inh_Patterns :: (Options), synmap_Inh_Patterns :: (Attributes) }-data Syn_Patterns = Syn_Patterns { attrTypes_Syn_Patterns :: (PP_Doc), attrs_Syn_Patterns :: (Set String), copy_Syn_Patterns :: (Patterns), sem_lhs_Syn_Patterns :: ([PP_Doc]) }-{-# INLINABLE wrap_Patterns #-}-wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )-wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap- (T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs) <- return (inv_Patterns_s44 sem arg)- return (Syn_Patterns _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs)- )---- cata-{-# NOINLINE sem_Patterns #-}-sem_Patterns :: Patterns -> T_Patterns -sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)---- semantic domain-newtype T_Patterns = T_Patterns {- attach_T_Patterns :: Identity (T_Patterns_s44 )- }-newtype T_Patterns_s44 = C_Patterns_s44 {- inv_Patterns_s44 :: (T_Patterns_v43 )- }-data T_Patterns_s45 = C_Patterns_s45-type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )-data T_Patterns_vIn43 = T_Patterns_vIn43 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)-data T_Patterns_vOut43 = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([PP_Doc])-{-# NOINLINE sem_Patterns_Cons #-}-sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns -sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_Patterns_v43 - v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))- _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))- (T_Pattern_vOut40 _hdIattrTypes _hdIattrs _hdIcopy _hdIisUnderscore _hdIsem_lhs) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 _hdOallInhmap _hdOallSynmap _hdOanyLazyKind _hdOinhmap _hdOlocalAttrTypes _hdOoptions _hdOsynmap)- (T_Patterns_vOut43 _tlIattrTypes _tlIattrs _tlIcopy _tlIsem_lhs) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 _tlOallInhmap _tlOallSynmap _tlOanyLazyKind _tlOinhmap _tlOlocalAttrTypes _tlOoptions _tlOsynmap)- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule609 _hdIattrTypes _tlIattrTypes- _lhsOattrs :: Set String- _lhsOattrs = rule610 _hdIattrs _tlIattrs- _lhsOsem_lhs :: [PP_Doc]- _lhsOsem_lhs = rule611 _hdIsem_lhs _tlIsem_lhs- _copy = rule612 _hdIcopy _tlIcopy- _lhsOcopy :: Patterns- _lhsOcopy = rule613 _copy- _hdOallInhmap = rule614 _lhsIallInhmap- _hdOallSynmap = rule615 _lhsIallSynmap- _hdOanyLazyKind = rule616 _lhsIanyLazyKind- _hdOinhmap = rule617 _lhsIinhmap- _hdOlocalAttrTypes = rule618 _lhsIlocalAttrTypes- _hdOoptions = rule619 _lhsIoptions- _hdOsynmap = rule620 _lhsIsynmap- _tlOallInhmap = rule621 _lhsIallInhmap- _tlOallSynmap = rule622 _lhsIallSynmap- _tlOanyLazyKind = rule623 _lhsIanyLazyKind- _tlOinhmap = rule624 _lhsIinhmap- _tlOlocalAttrTypes = rule625 _lhsIlocalAttrTypes- _tlOoptions = rule626 _lhsIoptions- _tlOsynmap = rule627 _lhsIsynmap- __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs- in __result_ )- in C_Patterns_s44 v43- {-# INLINE rule609 #-}- rule609 = \ ((_hdIattrTypes) :: PP_Doc) ((_tlIattrTypes) :: PP_Doc) ->- _hdIattrTypes >-< _tlIattrTypes- {-# INLINE rule610 #-}- rule610 = \ ((_hdIattrs) :: Set String) ((_tlIattrs) :: Set String) ->- _hdIattrs `Set.union` _tlIattrs- {-# INLINE rule611 #-}- rule611 = \ ((_hdIsem_lhs) :: PP_Doc ) ((_tlIsem_lhs) :: [PP_Doc]) ->- _hdIsem_lhs : _tlIsem_lhs- {-# INLINE rule612 #-}- rule612 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->- (:) _hdIcopy _tlIcopy- {-# INLINE rule613 #-}- rule613 = \ _copy ->- _copy- {-# INLINE rule614 #-}- rule614 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule615 #-}- rule615 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule616 #-}- rule616 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule617 #-}- rule617 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule618 #-}- rule618 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule619 #-}- rule619 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule620 #-}- rule620 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule621 #-}- rule621 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule622 #-}- rule622 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule623 #-}- rule623 = \ ((_lhsIanyLazyKind) :: Bool) ->- _lhsIanyLazyKind- {-# INLINE rule624 #-}- rule624 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule625 #-}- rule625 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->- _lhsIlocalAttrTypes- {-# INLINE rule626 #-}- rule626 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule627 #-}- rule627 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap-{-# NOINLINE sem_Patterns_Nil #-}-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil = T_Patterns (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_Patterns_v43 - v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let- _lhsOattrTypes :: PP_Doc- _lhsOattrTypes = rule628 ()- _lhsOattrs :: Set String- _lhsOattrs = rule629 ()- _lhsOsem_lhs :: [PP_Doc]- _lhsOsem_lhs = rule630 ()- _copy = rule631 ()- _lhsOcopy :: Patterns- _lhsOcopy = rule632 _copy- __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs- in __result_ )- in C_Patterns_s44 v43- {-# INLINE rule628 #-}- rule628 = \ (_ :: ()) ->- empty- {-# INLINE rule629 #-}- rule629 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule630 #-}- rule630 = \ (_ :: ()) ->- []- {-# INLINE rule631 #-}- rule631 = \ (_ :: ()) ->- []- {-# INLINE rule632 #-}- rule632 = \ _copy ->- _copy---- Visit ---------------------------------------------------------- wrapper-data Inh_Visit = Inh_Visit { allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visit :: (Map NontermIdent Attributes), allInitStates_Inh_Visit :: (Map NontermIdent Int), allSynmap_Inh_Visit :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visit :: (Map Identifier Type), childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visit :: (ConstructorIdent), inhmap_Inh_Visit :: (Attributes), mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), nt_Inh_Visit :: (NontermIdent), options_Inh_Visit :: (Options), params_Inh_Visit :: ([Identifier]), prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visit :: (Map Identifier (Set String)), ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visit :: (Attributes), terminaldefs_Inh_Visit :: (Set String) }-data Syn_Visit = Syn_Visit { allvisits_Syn_Visit :: ( VisitStateState ), childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_Visit :: (Seq Error), fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visit :: (Set String), ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visit :: (Map Identifier Int), sem_visit_Syn_Visit :: ( (StateIdentifier,Bool -> PP_Doc) ), t_visits_Syn_Visit :: (PP_Doc), usedArgs_Syn_Visit :: (Set String), visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_Visit #-}-wrap_Visit :: T_Visit -> Inh_Visit -> (Syn_Visit )-wrap_Visit (T_Visit act) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs- (T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visit_s47 sem arg)- return (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# INLINE sem_Visit #-}-sem_Visit :: Visit -> T_Visit -sem_Visit ( Visit ident_ from_ to_ inh_ syn_ steps_ kind_ ) = sem_Visit_Visit ident_ from_ to_ inh_ syn_ ( sem_VisitSteps steps_ ) kind_---- semantic domain-newtype T_Visit = T_Visit {- attach_T_Visit :: Identity (T_Visit_s47 )- }-newtype T_Visit_s47 = C_Visit_s47 {- inv_Visit_s47 :: (T_Visit_v46 )- }-data T_Visit_s48 = C_Visit_s48-type T_Visit_v46 = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )-data T_Visit_vIn46 = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)-data T_Visit_vOut46 = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,Bool -> PP_Doc) ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_Visit_Visit #-}-sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps -> (VisitKind) -> T_Visit -sem_Visit_Visit arg_ident_ arg_from_ arg_to_ arg_inh_ arg_syn_ arg_steps_ arg_kind_ = T_Visit (return st47) where- {-# NOINLINE st47 #-}- st47 = let- v46 :: T_Visit_v46 - v46 = \ (T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let- _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))- (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIsync_steps _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)- _lhsOallvisits :: VisitStateState - _lhsOallvisits = rule633 arg_from_ arg_ident_ arg_to_- _nameT_visit = rule634 _lhsInt arg_ident_- _nameTIn_visit = rule635 _lhsInt arg_ident_- _nameTOut_visit = rule636 _lhsInt arg_ident_- _nameTNext_visit = rule637 _lhsInt arg_to_- _nextVisitInfo = rule638 _lhsInextVisits arg_to_- _typecon = rule639 _lhsIoptions arg_kind_- _t_params = rule640 _lhsIparams- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule641 _addbang1 _inhpart _lhsIoptions _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon- _inhpart = rule642 _lhsIinhmap _ppTypeList arg_inh_- _synpart = rule643 _lhsIsynmap _ppTypeList arg_syn_- _ppTypeList = rule644 _addbang1- _lhsOsem_visit :: (StateIdentifier,Bool -> PP_Doc) - _lhsOsem_visit = rule645 _addbang _inhpats _lhsIcon _lhsInt _lhsIoptions _nameTIn_visit _nameT_visit _stepsClosing _stepsInitial _stepsIsem_steps _t_params _vname arg_from_ arg_ident_- _stepsInitial = rule646 arg_kind_- _stepsClosing = rule647 _addbang _nextStBuild _resultval arg_kind_- _vname = rule648 arg_ident_- _inhpats = rule649 arg_inh_- _inhargs = rule650 arg_inh_- _synargs = rule651 arg_syn_- _nextargsMp = rule652 _lhsIallintramap arg_to_- _nextargs = rule653 _nextargsMp- _nextst = rule654 _lhsIoptions _nextargs _nextargsMp arg_to_- _resultval = rule655 _nameTOut_visit _nextStRef _synargs- (_nextStBuild,_nextStRef) = rule656 _addbang _nextVisitInfo _nextst- _stepsOkind = rule657 arg_kind_- _stepsOfmtMode = rule658 arg_kind_- _stepsOindex = rule659 ()- _stepsOprevMaxSimRefs = rule660 ()- _stepsOuseParallel = rule661 ()- _prevVisitInfo = rule662 _lhsInextVisits arg_from_- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule663 _invokecode arg_ident_- _invokecode = rule664 _addbang _inhargs _lhsInt _lhsIoptions _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo arg_from_ arg_ident_ arg_kind_ arg_syn_ arg_to_- _thisintra = rule665 _defsAsMap _nextintra _uses- _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))- _lhsOintramap = rule666 _thisintra arg_from_- _nextintra = rule667 _lhsIallintramap arg_to_- _uses = rule668 _stepsIuses arg_syn_- _inhVarNms = rule669 arg_inh_- _defs = rule670 _inhVarNms _lhsIterminaldefs _stepsIdefs- _defsAsMap = rule671 _defs- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule672 arg_ident_ arg_syn_- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule673 arg_ident_ arg_inh_- _lazyIntrasInh = rule674 _inhVarNms _stepsIdefs arg_kind_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule675 _lazyIntrasInh _stepsIlazyIntras- _addbang = rule676 _lhsIoptions- _addbang1 = rule677 _addbang arg_kind_- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule678 arg_from_ arg_ident_ arg_to_- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule679 arg_ident_ arg_kind_- _lhsOerrors :: Seq Error- _lhsOerrors = rule680 _stepsIerrors- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule681 _stepsIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule682 _stepsIruleUsage- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule683 _stepsIusedArgs- _stepsOallFromToStates = rule684 _lhsIallFromToStates- _stepsOallInitStates = rule685 _lhsIallInitStates- _stepsOallVisitKinds = rule686 _lhsIallVisitKinds- _stepsOallchildvisit = rule687 _lhsIallchildvisit- _stepsOavisitdefs = rule688 _lhsIavisitdefs- _stepsOavisituses = rule689 _lhsIavisituses- _stepsOchildTypes = rule690 _lhsIchildTypes- _stepsOchildintros = rule691 _lhsIchildintros- _stepsOmrules = rule692 _lhsImrules- _stepsOoptions = rule693 _lhsIoptions- _stepsOruledefs = rule694 _lhsIruledefs- _stepsOruleuses = rule695 _lhsIruleuses- __result_ = T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_Visit_s47 v46- {-# INLINE rule633 #-}- {-# LINE 338 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule633 = \ from_ ident_ to_ ->- {-# LINE 338 "./src-ag/ExecutionPlan2Hs.ag" #-}- (ident_, from_, to_)- {-# LINE 5135 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule634 #-}- {-# LINE 397 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule634 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 397 "./src-ag/ExecutionPlan2Hs.ag" #-}- conNmTVisit _lhsInt ident_- {-# LINE 5141 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule635 #-}- {-# LINE 398 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule635 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 398 "./src-ag/ExecutionPlan2Hs.ag" #-}- conNmTVisitIn _lhsInt ident_- {-# LINE 5147 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule636 #-}- {-# LINE 399 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule636 = \ ((_lhsInt) :: NontermIdent) ident_ ->- {-# LINE 399 "./src-ag/ExecutionPlan2Hs.ag" #-}- conNmTVisitOut _lhsInt ident_- {-# LINE 5153 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule637 #-}- {-# LINE 400 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule637 = \ ((_lhsInt) :: NontermIdent) to_ ->- {-# LINE 400 "./src-ag/ExecutionPlan2Hs.ag" #-}- conNmTNextVisit _lhsInt to_- {-# LINE 5159 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule638 #-}- {-# LINE 402 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule638 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->- {-# LINE 402 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault ManyVis to_ _lhsInextVisits- {-# LINE 5165 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule639 #-}- {-# LINE 403 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule639 = \ ((_lhsIoptions) :: Options) kind_ ->- {-# LINE 403 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure _ -> empty- VisitMonadic -> ppMonadType _lhsIoptions- {-# LINE 5173 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule640 #-}- {-# LINE 407 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule640 = \ ((_lhsIparams) :: [Identifier]) ->- {-# LINE 407 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced _lhsIparams- {-# LINE 5179 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule641 #-}- {-# LINE 408 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule641 = \ _addbang1 _inhpart ((_lhsIoptions) :: Options) _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon ->- {-# LINE 408 "./src-ag/ExecutionPlan2Hs.ag" #-}- "type" >#< _nameT_visit >#< _t_params >#< "=" >#<- pp_parens (_nameTIn_visit >#< _t_params )- >#< ( if dummyTokenVisit _lhsIoptions- then "->" >#< dummyType _lhsIoptions True- else empty- )- >#< "->" >#< _typecon >#< pp_parens (_nameTOut_visit >#< _t_params )- >-< "data" >#< _nameTIn_visit >#< _t_params >#< "=" >#< _nameTIn_visit >#<- _inhpart- >-< "data" >#< _nameTOut_visit >#< _t_params >#< "=" >#< _nameTOut_visit >#<- _synpart >#< case _nextVisitInfo of- NoneVis -> empty- _ -> _addbang1 $ pp_parens (_nameTNext_visit >#< _t_params )- {-# LINE 5197 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule642 #-}- {-# LINE 421 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule642 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->- {-# LINE 421 "./src-ag/ExecutionPlan2Hs.ag" #-}- _ppTypeList inh_ _lhsIinhmap- {-# LINE 5203 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule643 #-}- {-# LINE 422 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule643 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->- {-# LINE 422 "./src-ag/ExecutionPlan2Hs.ag" #-}- _ppTypeList syn_ _lhsIsynmap- {-# LINE 5209 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule644 #-}- {-# LINE 423 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule644 = \ _addbang1 ->- {-# LINE 423 "./src-ag/ExecutionPlan2Hs.ag" #-}- \s m -> ppSpaced $ map (\i -> _addbang1 $ pp_parens $ case Map.lookup i m of- Just tp -> ppTp tp ) $ Set.toList s- {-# LINE 5216 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule645 #-}- {-# LINE 715 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule645 = \ _addbang _inhpats ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameT_visit _stepsClosing _stepsInitial ((_stepsIsem_steps) :: PP_Doc) _t_params _vname from_ ident_ ->- {-# LINE 715 "./src-ag/ExecutionPlan2Hs.ag" #-}- ( from_- , \addInlinePragma ->- ( if noInlinePragmas _lhsIoptions- then empty- else if addInlinePragma && aggressiveInlinePragmas _lhsIoptions- then ppInline _vname- else if helpInlining _lhsIoptions- then ppNoInline _vname- else empty- )- >-< "v" >|< ident_ >#< "::" >#< _nameT_visit >#< _t_params- >-< "v" >|< ident_ >#< "=" >#< "\\" >#< (_addbang $ pp_parens (_nameTIn_visit >#< _inhpats ))- >#< ( if dummyTokenVisit _lhsIoptions- then pp $ dummyPat _lhsIoptions True- else empty- )- >#< "->"- >#< ( if genCostCentres _lhsIoptions- then ppCostCentre (_vname >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)- else empty- ) >#< "(" >#< _stepsInitial- >-< indent 3 (_stepsIsem_steps >-< _stepsClosing >#< ")")- )- {-# LINE 5244 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule646 #-}- {-# LINE 740 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule646 = \ kind_ ->- {-# LINE 740 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure False -> text "let"- VisitPure True -> empty- VisitMonadic -> text "do"- {-# LINE 5253 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule647 #-}- {-# LINE 744 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule647 = \ _addbang _nextStBuild _resultval kind_ ->- {-# LINE 744 "./src-ag/ExecutionPlan2Hs.ag" #-}- let decls = _nextStBuild- >-< _addbang (pp resultValName) >#< "=" >#< _resultval- in case kind_ of- VisitPure False -> decls- >-< "in" >#< resultValName- VisitPure True -> "let" >#< decls- >-< indent 1 ("in" >#< resultValName)- VisitMonadic -> "let" >#< decls- >-< "return" >#< resultValName- {-# LINE 5267 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule648 #-}- {-# LINE 753 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule648 = \ ident_ ->- {-# LINE 753 "./src-ag/ExecutionPlan2Hs.ag" #-}- "v" >|< ident_- {-# LINE 5273 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule649 #-}- {-# LINE 754 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule649 = \ inh_ ->- {-# LINE 754 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ map (\arg -> pp $ attrname True _LHS arg) $ Set.toList inh_- {-# LINE 5279 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule650 #-}- {-# LINE 755 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule650 = \ inh_ ->- {-# LINE 755 "./src-ag/ExecutionPlan2Hs.ag" #-}- \chn -> ppSpaced $ map (attrname False chn) $ Set.toList inh_- {-# LINE 5285 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule651 #-}- {-# LINE 756 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule651 = \ syn_ ->- {-# LINE 756 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ map (\arg -> attrname False _LHS arg) $ Set.toList syn_- {-# LINE 5291 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule652 #-}- {-# LINE 757 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule652 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->- {-# LINE 757 "./src-ag/ExecutionPlan2Hs.ag" #-}- maybe Map.empty id $ Map.lookup to_ _lhsIallintramap- {-# LINE 5297 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule653 #-}- {-# LINE 758 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule653 = \ _nextargsMp ->- {-# LINE 758 "./src-ag/ExecutionPlan2Hs.ag" #-}- ppSpaced $ Map.keys $ _nextargsMp- {-# LINE 5303 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule654 #-}- {-# LINE 759 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule654 = \ ((_lhsIoptions) :: Options) _nextargs _nextargsMp to_ ->- {-# LINE 759 "./src-ag/ExecutionPlan2Hs.ag" #-}- "st" >|< to_ >#< _nextargs >#< dummyArg _lhsIoptions (Map.null _nextargsMp )- {-# LINE 5309 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule655 #-}- {-# LINE 760 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule655 = \ _nameTOut_visit _nextStRef _synargs ->- {-# LINE 760 "./src-ag/ExecutionPlan2Hs.ag" #-}- _nameTOut_visit >#< _synargs >#< _nextStRef- {-# LINE 5315 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule656 #-}- {-# LINE 762 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule656 = \ _addbang _nextVisitInfo _nextst ->- {-# LINE 762 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _nextVisitInfo of- NoneVis -> (empty, empty)- _ -> (_addbang (pp nextStName) >#< "=" >#< _nextst , pp nextStName)- {-# LINE 5323 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule657 #-}- {-# LINE 776 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule657 = \ kind_ ->- {-# LINE 776 "./src-ag/ExecutionPlan2Hs.ag" #-}- kind_- {-# LINE 5329 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule658 #-}- {-# LINE 827 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule658 = \ kind_ ->- {-# LINE 827 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure False -> FormatLetDecl- VisitPure True -> FormatLetLine- VisitMonadic -> FormatDo- {-# LINE 5338 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule659 #-}- {-# LINE 876 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule659 = \ (_ :: ()) ->- {-# LINE 876 "./src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 5344 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule660 #-}- {-# LINE 883 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule660 = \ (_ :: ()) ->- {-# LINE 883 "./src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 5350 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule661 #-}- {-# LINE 899 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule661 = \ (_ :: ()) ->- {-# LINE 899 "./src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 5356 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule662 #-}- {-# LINE 1217 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule662 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->- {-# LINE 1217 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault ManyVis from_ _lhsInextVisits- {-# LINE 5362 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule663 #-}- {-# LINE 1218 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule663 = \ _invokecode ident_ ->- {-# LINE 1218 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ _invokecode- {-# LINE 5368 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule664 #-}- {-# LINE 1219 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule664 = \ _addbang _inhargs ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo from_ ident_ kind_ syn_ to_ ->- {-# LINE 1219 "./src-ag/ExecutionPlan2Hs.ag" #-}- \chn kind ->- if kind `compatibleKind` kind_- then Right $- let pat | isLazyKind kind_ = pat0- | otherwise = _addbang pat0- pat0 = pp_parens pat1- pat1 = _nameTOut_visit >#< (ppSpaced $ map (attrname True chn) $ Set.toList syn_)- >#< cont- cont = case _nextVisitInfo of- NoneVis -> empty- _ -> ch1- ch0 = text $ stname chn from_- ch1 = text $ stname chn to_- expr = case (kind, kind_) of- (VisitPure _, VisitPure _) -> expr0- (VisitPure _, VisitMonadic) -> unMon _lhsIoptions >#< expr0- (VisitMonadic, VisitPure _) -> "return" >#< expr0- (VisitMonadic, VisitMonadic) -> expr0- expr0 = case _prevVisitInfo of- NoneVis -> error "error: invocation of a visit from a state that has no next visits"- OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args- ManyVis -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0- >#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args- args = pp_parens args0 >#< args1- args0 = _nameTIn_visit >#< _inhargs chn- args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True- | otherwise = empty- in (pat, expr)- else Left $ IncompatibleVisitKind chn ident_ kind kind_- {-# LINE 5402 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule665 #-}- {-# LINE 1315 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule665 = \ _defsAsMap _nextintra _uses ->- {-# LINE 1315 "./src-ag/ExecutionPlan2Hs.ag" #-}- (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap- {-# LINE 5408 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule666 #-}- {-# LINE 1316 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule666 = \ _thisintra from_ ->- {-# LINE 1316 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton from_ _thisintra- {-# LINE 5414 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule667 #-}- {-# LINE 1317 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule667 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->- {-# LINE 1317 "./src-ag/ExecutionPlan2Hs.ag" #-}- maybe Map.empty id $ Map.lookup to_ _lhsIallintramap- {-# LINE 5420 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule668 #-}- {-# LINE 1318 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule668 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->- {-# LINE 1318 "./src-ag/ExecutionPlan2Hs.ag" #-}- let mp1 = _stepsIuses- mp2 = Map.fromList [ (lhsname False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]- in mp1 `Map.union` mp2- {-# LINE 5428 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule669 #-}- {-# LINE 1321 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule669 = \ inh_ ->- {-# LINE 1321 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.map (lhsname True) inh_- {-# LINE 5434 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule670 #-}- {-# LINE 1322 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule670 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->- {-# LINE 1322 "./src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs- {-# LINE 5440 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule671 #-}- {-# LINE 1323 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule671 = \ _defs ->- {-# LINE 1323 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]- {-# LINE 5446 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule672 #-}- {-# LINE 1347 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule672 = \ ident_ syn_ ->- {-# LINE 1347 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ syn_- {-# LINE 5452 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule673 #-}- {-# LINE 1348 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule673 = \ ident_ inh_ ->- {-# LINE 1348 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ inh_- {-# LINE 5458 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule674 #-}- {-# LINE 1380 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule674 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->- {-# LINE 1380 "./src-ag/ExecutionPlan2Hs.ag" #-}- case kind_ of- VisitPure False -> _inhVarNms `Set.union` _stepsIdefs- _ -> Set.empty- {-# LINE 5466 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule675 #-}- {-# LINE 1383 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule675 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->- {-# LINE 1383 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lazyIntrasInh `Set.union` _stepsIlazyIntras- {-# LINE 5472 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule676 #-}- {-# LINE 1536 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule676 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1536 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 5478 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule677 #-}- {-# LINE 1544 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule677 = \ _addbang kind_ ->- {-# LINE 1544 "./src-ag/ExecutionPlan2Hs.ag" #-}- if isLazyKind kind_ then id else _addbang- {-# LINE 5484 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule678 #-}- {-# LINE 1571 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule678 = \ from_ ident_ to_ ->- {-# LINE 1571 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ (from_, to_)- {-# LINE 5490 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule679 #-}- {-# LINE 1615 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule679 = \ ident_ kind_ ->- {-# LINE 1615 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton ident_ kind_- {-# LINE 5496 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule680 #-}- rule680 = \ ((_stepsIerrors) :: Seq Error) ->- _stepsIerrors- {-# INLINE rule681 #-}- rule681 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _stepsIruleKinds- {-# INLINE rule682 #-}- rule682 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->- _stepsIruleUsage- {-# INLINE rule683 #-}- rule683 = \ ((_stepsIusedArgs) :: Set String) ->- _stepsIusedArgs- {-# INLINE rule684 #-}- rule684 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule685 #-}- rule685 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule686 #-}- rule686 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule687 #-}- rule687 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule688 #-}- rule688 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule689 #-}- rule689 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule690 #-}- rule690 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule691 #-}- rule691 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule692 #-}- rule692 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule693 #-}- rule693 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule694 #-}- rule694 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule695 #-}- rule695 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses---- VisitStep ------------------------------------------------------ wrapper-data Inh_VisitStep = Inh_VisitStep { allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitStep :: (Map NontermIdent Int), allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitStep :: (Map Identifier Type), childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), fmtMode_Inh_VisitStep :: (FormatMode), index_Inh_VisitStep :: (Int), isLast_Inh_VisitStep :: (Bool), kind_Inh_VisitStep :: (VisitKind), mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), options_Inh_VisitStep :: (Options), prevMaxSimRefs_Inh_VisitStep :: (Int), ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitStep :: (Bool) }-data Syn_VisitStep = Syn_VisitStep { defs_Syn_VisitStep :: (Set String), errors_Syn_VisitStep :: (Seq Error), index_Syn_VisitStep :: (Int), isLast_Syn_VisitStep :: (Bool), lazyIntras_Syn_VisitStep :: (Set String), prevMaxSimRefs_Syn_VisitStep :: (Int), ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitStep :: (Map Identifier Int), sem_steps_Syn_VisitStep :: (PP_Doc), sync_steps_Syn_VisitStep :: (PP_Doc), usedArgs_Syn_VisitStep :: (Set String), uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }-{-# INLINABLE wrap_VisitStep #-}-wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> (Syn_VisitStep )-wrap_VisitStep (T_VisitStep act) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel- (T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds) <- return (inv_VisitStep_s50 sem arg)- return (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds)- )---- cata-{-# NOINLINE sem_VisitStep #-}-sem_VisitStep :: VisitStep -> T_VisitStep -sem_VisitStep ( Sem name_ ) = sem_VisitStep_Sem name_-sem_VisitStep ( ChildVisit child_ nonterm_ visit_ ) = sem_VisitStep_ChildVisit child_ nonterm_ visit_-sem_VisitStep ( PureGroup steps_ ordered_ ) = sem_VisitStep_PureGroup ( sem_VisitSteps steps_ ) ordered_-sem_VisitStep ( Sim steps_ ) = sem_VisitStep_Sim ( sem_VisitSteps steps_ )-sem_VisitStep ( ChildIntro child_ ) = sem_VisitStep_ChildIntro child_---- semantic domain-newtype T_VisitStep = T_VisitStep {- attach_T_VisitStep :: Identity (T_VisitStep_s50 )- }-newtype T_VisitStep_s50 = C_VisitStep_s50 {- inv_VisitStep_s50 :: (T_VisitStep_v49 )- }-data T_VisitStep_s51 = C_VisitStep_s51-type T_VisitStep_v49 = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )-data T_VisitStep_vIn49 = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)-data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)-{-# NOINLINE sem_VisitStep_Sem #-}-sem_VisitStep_Sem :: (Identifier) -> T_VisitStep -sem_VisitStep_Sem arg_name_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _ruleItf = rule696 _lhsImrules arg_name_- _lhsOerrors :: Seq Error- (_lhsOerrors,_sem_steps) = rule697 _lhsIfmtMode _lhsIkind _ruleItf- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule698 arg_name_- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule699 _lhsIkind arg_name_- _lhsOdefs :: Set String- _lhsOdefs = rule700 _lhsIruledefs arg_name_- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule701 _lhsIruleuses arg_name_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule702 ()- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule703 _sem_steps- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule704 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule705 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule706 ()- _lhsOindex :: Int- _lhsOindex = rule707 _lhsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule708 _lhsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule709 _lhsIprevMaxSimRefs- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule696 #-}- {-# LINE 785 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule696 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) name_ ->- {-# LINE 785 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules- {-# LINE 5622 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule697 #-}- {-# LINE 786 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule697 = \ ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _ruleItf ->- {-# LINE 786 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _ruleItf _lhsIkind _lhsIfmtMode of- Left e -> (Seq.singleton e, empty)- Right stmt -> (Seq.empty, stmt)- {-# LINE 5630 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule698 #-}- {-# LINE 1268 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule698 = \ name_ ->- {-# LINE 1268 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ 1- {-# LINE 5636 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule699 #-}- {-# LINE 1278 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule699 = \ ((_lhsIkind) :: VisitKind) name_ ->- {-# LINE 1278 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.singleton name_ (Set.singleton _lhsIkind)- {-# LINE 5642 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule700 #-}- {-# LINE 1363 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule700 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->- {-# LINE 1363 "./src-ag/ExecutionPlan2Hs.ag" #-}- maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs- {-# LINE 5648 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule701 #-}- {-# LINE 1364 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule701 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->- {-# LINE 1364 "./src-ag/ExecutionPlan2Hs.ag" #-}- maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses- {-# LINE 5654 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule702 #-}- rule702 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule703 #-}- rule703 = \ _sem_steps ->- _sem_steps- {-# INLINE rule704 #-}- rule704 = \ (_ :: ()) ->- empty- {-# INLINE rule705 #-}- rule705 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule706 #-}- rule706 = \ (_ :: ()) ->- mempty- {-# INLINE rule707 #-}- rule707 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule708 #-}- rule708 = \ ((_lhsIisLast) :: Bool) ->- _lhsIisLast- {-# INLINE rule709 #-}- rule709 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs-{-# NOINLINE sem_VisitStep_ChildVisit #-}-sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep -sem_VisitStep_ChildVisit arg_child_ _ arg_visit_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _visitItf = rule710 _lhsIallchildvisit arg_visit_- _lhsOerrors :: Seq Error- (_lhsOerrors,_patPP,_exprPP) = rule711 _lhsIkind _visitItf arg_child_- _useParallel = rule712 _lhsIisLast _lhsIuseParallel- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule713 _addbang _convToMonad _exprPP _lhsIfmtMode _lhsIindex _lhsIkind _patPP _useParallel- _convToMonad = rule714 _callKind- _callKind = rule715 _lhsIallVisitKinds arg_visit_- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule716 _lhsIindex _patPP _useParallel- _lhsOdefs :: Set String- _lhsOdefs = rule717 _lhsIavisitdefs _to arg_child_ arg_visit_- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule718 _from _lhsIavisituses arg_child_ arg_visit_- _addbang = rule719 _lhsIoptions- (_from,_to) = rule720 _lhsIallFromToStates arg_visit_- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule721 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule722 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule723 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule724 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule725 ()- _lhsOindex :: Int- _lhsOindex = rule726 _lhsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule727 _lhsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule728 _lhsIprevMaxSimRefs- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule710 #-}- {-# LINE 794 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule710 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) visit_ ->- {-# LINE 794 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit- {-# LINE 5726 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule711 #-}- {-# LINE 795 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule711 = \ ((_lhsIkind) :: VisitKind) _visitItf child_ ->- {-# LINE 795 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _visitItf child_ _lhsIkind of- Left e -> (Seq.singleton e, empty, empty)- Right (pat,expr) -> (Seq.empty, pat, expr)- {-# LINE 5734 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule712 #-}- {-# LINE 799 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule712 = \ ((_lhsIisLast) :: Bool) ((_lhsIuseParallel) :: Bool) ->- {-# LINE 799 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIuseParallel && not _lhsIisLast- {-# LINE 5740 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule713 #-}- {-# LINE 800 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule713 = \ _addbang _convToMonad _exprPP ((_lhsIfmtMode) :: FormatMode) ((_lhsIindex) :: Int) ((_lhsIkind) :: VisitKind) _patPP _useParallel ->- {-# LINE 800 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _useParallel- then _addbang ("sync_" >|< _lhsIindex) >#< "<- newEmptyMVar"- >-< "forkIO" >#< pp_parens (_convToMonad >#< pp_parens _exprPP >#< ">>= \\" >#< _addbang (pp parResultName) >#< " -> putMVar sync_" >|< _lhsIindex >#< parResultName)- else let decl = case _lhsIkind of- VisitPure _ -> _patPP >#< "=" >#< _exprPP- VisitMonadic -> _patPP >#< "<-" >#< _exprPP- in fmtDecl False _lhsIfmtMode decl- {-# LINE 5752 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule714 #-}- {-# LINE 807 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule714 = \ _callKind ->- {-# LINE 807 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _callKind of- VisitPure _ -> text "return"- VisitMonadic -> empty- {-# LINE 5760 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule715 #-}- {-# LINE 810 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule715 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) visit_ ->- {-# LINE 810 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds- {-# LINE 5766 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule716 #-}- {-# LINE 818 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule716 = \ ((_lhsIindex) :: Int) _patPP _useParallel ->- {-# LINE 818 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _useParallel- then _patPP >#< "<-" >#< "takeMVar sync_" >|< _lhsIindex- else empty- {-# LINE 5774 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule717 #-}- {-# LINE 1365 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule717 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) _to child_ visit_ ->- {-# LINE 1365 "./src-ag/ExecutionPlan2Hs.ag" #-}- Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname True child_) $ Map.lookup visit_ _lhsIavisitdefs- {-# LINE 5780 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule718 #-}- {-# LINE 1366 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule718 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) child_ visit_ ->- {-# LINE 1366 "./src-ag/ExecutionPlan2Hs.ag" #-}- let convert attrs = Map.fromList [ (attrname False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]- in Map.insert (stname child_ _from) Nothing $ convert $- maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses- {-# LINE 5788 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule719 #-}- {-# LINE 1541 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule719 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 1541 "./src-ag/ExecutionPlan2Hs.ag" #-}- \x -> if bangpats _lhsIoptions then "!" >|< x else x- {-# LINE 5794 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule720 #-}- {-# LINE 1577 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule720 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->- {-# LINE 1577 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates- {-# LINE 5800 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule721 #-}- rule721 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule722 #-}- rule722 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule723 #-}- rule723 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule724 #-}- rule724 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule725 #-}- rule725 = \ (_ :: ()) ->- mempty- {-# INLINE rule726 #-}- rule726 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule727 #-}- rule727 = \ ((_lhsIisLast) :: Bool) ->- _lhsIisLast- {-# INLINE rule728 #-}- rule728 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs-{-# NOINLINE sem_VisitStep_PureGroup #-}-sem_VisitStep_PureGroup :: T_VisitSteps -> (Bool) -> T_VisitStep -sem_VisitStep_PureGroup arg_steps_ arg_ordered_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))- (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIsync_steps _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)- _stepsOkind = rule729 arg_ordered_- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule730 _lhsIfmtMode _stepsIsem_steps- _stepsOfmtMode = rule731 _lhsIfmtMode- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule732 _stepsIdefs _stepsIlazyIntras arg_ordered_- _lhsOdefs :: Set String- _lhsOdefs = rule733 _stepsIdefs- _lhsOerrors :: Seq Error- _lhsOerrors = rule734 _stepsIerrors- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule735 _stepsIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule736 _stepsIruleUsage- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule737 _stepsIsync_steps- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule738 _stepsIusedArgs- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule739 _stepsIuses- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule740 _stepsIvisitKinds- _lhsOindex :: Int- _lhsOindex = rule741 _stepsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule742 _stepsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule743 _stepsIprevMaxSimRefs- _stepsOallFromToStates = rule744 _lhsIallFromToStates- _stepsOallInitStates = rule745 _lhsIallInitStates- _stepsOallVisitKinds = rule746 _lhsIallVisitKinds- _stepsOallchildvisit = rule747 _lhsIallchildvisit- _stepsOavisitdefs = rule748 _lhsIavisitdefs- _stepsOavisituses = rule749 _lhsIavisituses- _stepsOchildTypes = rule750 _lhsIchildTypes- _stepsOchildintros = rule751 _lhsIchildintros- _stepsOindex = rule752 _lhsIindex- _stepsOmrules = rule753 _lhsImrules- _stepsOoptions = rule754 _lhsIoptions- _stepsOprevMaxSimRefs = rule755 _lhsIprevMaxSimRefs- _stepsOruledefs = rule756 _lhsIruledefs- _stepsOruleuses = rule757 _lhsIruleuses- _stepsOuseParallel = rule758 _lhsIuseParallel- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule729 #-}- {-# LINE 780 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule729 = \ ordered_ ->- {-# LINE 780 "./src-ag/ExecutionPlan2Hs.ag" #-}- VisitPure ordered_- {-# LINE 5885 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule730 #-}- {-# LINE 812 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule730 = \ ((_lhsIfmtMode) :: FormatMode) ((_stepsIsem_steps) :: PP_Doc) ->- {-# LINE 812 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _lhsIfmtMode of- FormatDo -> "let" >#< _stepsIsem_steps- _ -> _stepsIsem_steps- {-# LINE 5893 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule731 #-}- {-# LINE 833 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule731 = \ ((_lhsIfmtMode) :: FormatMode) ->- {-# LINE 833 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _lhsIfmtMode of- FormatDo -> FormatLetDecl- mode -> mode- {-# LINE 5901 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule732 #-}- {-# LINE 1386 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule732 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->- {-# LINE 1386 "./src-ag/ExecutionPlan2Hs.ag" #-}- if ordered_- then _stepsIlazyIntras- else _stepsIdefs- {-# LINE 5909 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule733 #-}- rule733 = \ ((_stepsIdefs) :: Set String) ->- _stepsIdefs- {-# INLINE rule734 #-}- rule734 = \ ((_stepsIerrors) :: Seq Error) ->- _stepsIerrors- {-# INLINE rule735 #-}- rule735 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _stepsIruleKinds- {-# INLINE rule736 #-}- rule736 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->- _stepsIruleUsage- {-# INLINE rule737 #-}- rule737 = \ ((_stepsIsync_steps) :: PP_Doc) ->- _stepsIsync_steps- {-# INLINE rule738 #-}- rule738 = \ ((_stepsIusedArgs) :: Set String) ->- _stepsIusedArgs- {-# INLINE rule739 #-}- rule739 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->- _stepsIuses- {-# INLINE rule740 #-}- rule740 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _stepsIvisitKinds- {-# INLINE rule741 #-}- rule741 = \ ((_stepsIindex) :: Int) ->- _stepsIindex- {-# INLINE rule742 #-}- rule742 = \ ((_stepsIisLast) :: Bool) ->- _stepsIisLast- {-# INLINE rule743 #-}- rule743 = \ ((_stepsIprevMaxSimRefs) :: Int) ->- _stepsIprevMaxSimRefs- {-# INLINE rule744 #-}- rule744 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule745 #-}- rule745 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule746 #-}- rule746 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule747 #-}- rule747 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule748 #-}- rule748 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule749 #-}- rule749 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule750 #-}- rule750 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule751 #-}- rule751 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule752 #-}- rule752 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule753 #-}- rule753 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule754 #-}- rule754 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule755 #-}- rule755 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs- {-# INLINE rule756 #-}- rule756 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule757 #-}- rule757 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule758 #-}- rule758 = \ ((_lhsIuseParallel) :: Bool) ->- _lhsIuseParallel-{-# NOINLINE sem_VisitStep_Sim #-}-sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep -sem_VisitStep_Sim arg_steps_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))- (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIsync_steps _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule759 _stepsIsem_steps _stepsIsync_steps- _stepsOindex = rule760 ()- _lhsOindex :: Int- _lhsOindex = rule761 _lhsIindex- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule762 _lhsIprevMaxSimRefs _stepsIindex _useParallel- _useParallel = rule763 _isMonadic _lhsIoptions _stepsIsize- _isMonadic = rule764 _lhsIkind- _lhsOdefs :: Set String- _lhsOdefs = rule765 _stepsIdefs- _lhsOerrors :: Seq Error- _lhsOerrors = rule766 _stepsIerrors- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule767 _stepsIlazyIntras- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule768 _stepsIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule769 _stepsIruleUsage- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule770 _stepsIsync_steps- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule771 _stepsIusedArgs- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule772 _stepsIuses- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule773 _stepsIvisitKinds- _lhsOisLast :: Bool- _lhsOisLast = rule774 _stepsIisLast- _stepsOallFromToStates = rule775 _lhsIallFromToStates- _stepsOallInitStates = rule776 _lhsIallInitStates- _stepsOallVisitKinds = rule777 _lhsIallVisitKinds- _stepsOallchildvisit = rule778 _lhsIallchildvisit- _stepsOavisitdefs = rule779 _lhsIavisitdefs- _stepsOavisituses = rule780 _lhsIavisituses- _stepsOchildTypes = rule781 _lhsIchildTypes- _stepsOchildintros = rule782 _lhsIchildintros- _stepsOfmtMode = rule783 _lhsIfmtMode- _stepsOkind = rule784 _lhsIkind- _stepsOmrules = rule785 _lhsImrules- _stepsOoptions = rule786 _lhsIoptions- _stepsOprevMaxSimRefs = rule787 _lhsIprevMaxSimRefs- _stepsOruledefs = rule788 _lhsIruledefs- _stepsOruleuses = rule789 _lhsIruleuses- _stepsOuseParallel = rule790 _useParallel- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule759 #-}- {-# LINE 811 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule759 = \ ((_stepsIsem_steps) :: PP_Doc) ((_stepsIsync_steps) :: PP_Doc) ->- {-# LINE 811 "./src-ag/ExecutionPlan2Hs.ag" #-}- _stepsIsem_steps >-< _stepsIsync_steps- {-# LINE 6050 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule760 #-}- {-# LINE 877 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule760 = \ (_ :: ()) ->- {-# LINE 877 "./src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 6056 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule761 #-}- {-# LINE 878 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule761 = \ ((_lhsIindex) :: Int) ->- {-# LINE 878 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 6062 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule762 #-}- {-# LINE 885 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule762 = \ ((_lhsIprevMaxSimRefs) :: Int) ((_stepsIindex) :: Int) _useParallel ->- {-# LINE 885 "./src-ag/ExecutionPlan2Hs.ag" #-}- if _useParallel- then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)- else _lhsIprevMaxSimRefs- {-# LINE 6070 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule763 #-}- {-# LINE 900 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule763 = \ _isMonadic ((_lhsIoptions) :: Options) ((_stepsIsize) :: Int) ->- {-# LINE 900 "./src-ag/ExecutionPlan2Hs.ag" #-}- parallelInvoke _lhsIoptions && _stepsIsize > 1 && _isMonadic- {-# LINE 6076 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule764 #-}- {-# LINE 901 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule764 = \ ((_lhsIkind) :: VisitKind) ->- {-# LINE 901 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _lhsIkind of- VisitMonadic -> True- _ -> False- {-# LINE 6084 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule765 #-}- rule765 = \ ((_stepsIdefs) :: Set String) ->- _stepsIdefs- {-# INLINE rule766 #-}- rule766 = \ ((_stepsIerrors) :: Seq Error) ->- _stepsIerrors- {-# INLINE rule767 #-}- rule767 = \ ((_stepsIlazyIntras) :: Set String) ->- _stepsIlazyIntras- {-# INLINE rule768 #-}- rule768 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->- _stepsIruleKinds- {-# INLINE rule769 #-}- rule769 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->- _stepsIruleUsage- {-# INLINE rule770 #-}- rule770 = \ ((_stepsIsync_steps) :: PP_Doc) ->- _stepsIsync_steps- {-# INLINE rule771 #-}- rule771 = \ ((_stepsIusedArgs) :: Set String) ->- _stepsIusedArgs- {-# INLINE rule772 #-}- rule772 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->- _stepsIuses- {-# INLINE rule773 #-}- rule773 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _stepsIvisitKinds- {-# INLINE rule774 #-}- rule774 = \ ((_stepsIisLast) :: Bool) ->- _stepsIisLast- {-# INLINE rule775 #-}- rule775 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule776 #-}- rule776 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule777 #-}- rule777 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule778 #-}- rule778 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule779 #-}- rule779 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule780 #-}- rule780 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule781 #-}- rule781 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule782 #-}- rule782 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule783 #-}- rule783 = \ ((_lhsIfmtMode) :: FormatMode) ->- _lhsIfmtMode- {-# INLINE rule784 #-}- rule784 = \ ((_lhsIkind) :: VisitKind) ->- _lhsIkind- {-# INLINE rule785 #-}- rule785 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule786 #-}- rule786 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule787 #-}- rule787 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs- {-# INLINE rule788 #-}- rule788 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule789 #-}- rule789 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule790 #-}- rule790 = \ _useParallel ->- _useParallel-{-# NOINLINE sem_VisitStep_ChildIntro #-}-sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep -sem_VisitStep_ChildIntro arg_child_ = T_VisitStep (return st50) where- {-# NOINLINE st50 #-}- st50 = let- v49 :: T_VisitStep_v49 - v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _attachItf = rule791 _lhsIchildintros arg_child_- _lhsOerrors :: Seq Error- _lhsOsem_steps :: PP_Doc- _lhsOdefs :: Set String- _lhsOuses :: Map String (Maybe NonLocalAttr)- (_lhsOerrors,_lhsOsem_steps,_lhsOdefs,_lhsOuses) = rule792 _attachItf _lhsIfmtMode _lhsIkind- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule793 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule794 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule795 ()- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule796 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule797 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule798 ()- _lhsOindex :: Int- _lhsOindex = rule799 _lhsIindex- _lhsOisLast :: Bool- _lhsOisLast = rule800 _lhsIisLast- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule801 _lhsIprevMaxSimRefs- __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitStep_s50 v49- {-# INLINE rule791 #-}- {-# LINE 789 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule791 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->- {-# LINE 789 "./src-ag/ExecutionPlan2Hs.ag" #-}- Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros- {-# LINE 6202 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule792 #-}- {-# LINE 791 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule792 = \ _attachItf ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) ->- {-# LINE 791 "./src-ag/ExecutionPlan2Hs.ag" #-}- case _attachItf _lhsIkind _lhsIfmtMode of- Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)- Right (code, defs, uses) -> (Seq.empty, code, defs, uses)- {-# LINE 6210 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule793 #-}- rule793 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule794 #-}- rule794 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule795 #-}- rule795 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule796 #-}- rule796 = \ (_ :: ()) ->- empty- {-# INLINE rule797 #-}- rule797 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule798 #-}- rule798 = \ (_ :: ()) ->- mempty- {-# INLINE rule799 #-}- rule799 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule800 #-}- rule800 = \ ((_lhsIisLast) :: Bool) ->- _lhsIisLast- {-# INLINE rule801 #-}- rule801 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs---- VisitSteps ----------------------------------------------------- wrapper-data Inh_VisitSteps = Inh_VisitSteps { allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitSteps :: (Map Identifier Type), childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), fmtMode_Inh_VisitSteps :: (FormatMode), index_Inh_VisitSteps :: (Int), kind_Inh_VisitSteps :: (VisitKind), mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), options_Inh_VisitSteps :: (Options), prevMaxSimRefs_Inh_VisitSteps :: (Int), ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitSteps :: (Bool) }-data Syn_VisitSteps = Syn_VisitSteps { defs_Syn_VisitSteps :: (Set String), errors_Syn_VisitSteps :: (Seq Error), index_Syn_VisitSteps :: (Int), isLast_Syn_VisitSteps :: (Bool), lazyIntras_Syn_VisitSteps :: (Set String), prevMaxSimRefs_Syn_VisitSteps :: (Int), ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitSteps :: (Map Identifier Int), sem_steps_Syn_VisitSteps :: (PP_Doc), size_Syn_VisitSteps :: (Int), sync_steps_Syn_VisitSteps :: (PP_Doc), usedArgs_Syn_VisitSteps :: (Set String), uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }-{-# INLINABLE wrap_VisitSteps #-}-wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> (Syn_VisitSteps )-wrap_VisitSteps (T_VisitSteps act) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel- (T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds) <- return (inv_VisitSteps_s53 sem arg)- return (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds)- )---- cata-{-# NOINLINE sem_VisitSteps #-}-sem_VisitSteps :: VisitSteps -> T_VisitSteps -sem_VisitSteps list = Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list)---- semantic domain-newtype T_VisitSteps = T_VisitSteps {- attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )- }-newtype T_VisitSteps_s53 = C_VisitSteps_s53 {- inv_VisitSteps_s53 :: (T_VisitSteps_v52 )- }-data T_VisitSteps_s54 = C_VisitSteps_s54-type T_VisitSteps_v52 = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )-data T_VisitSteps_vIn52 = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)-data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)-{-# NOINLINE sem_VisitSteps_Cons #-}-sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps -sem_VisitSteps_Cons arg_hd_ arg_tl_ = T_VisitSteps (return st53) where- {-# NOINLINE st53 #-}- st53 = let- v52 :: T_VisitSteps_v52 - v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _hdX50 = Control.Monad.Identity.runIdentity (attach_T_VisitStep (arg_hd_))- _tlX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_tl_))- (T_VisitStep_vOut49 _hdIdefs _hdIerrors _hdIindex _hdIisLast _hdIlazyIntras _hdIprevMaxSimRefs _hdIruleKinds _hdIruleUsage _hdIsem_steps _hdIsync_steps _hdIusedArgs _hdIuses _hdIvisitKinds) = inv_VisitStep_s50 _hdX50 (T_VisitStep_vIn49 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfmtMode _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOprevMaxSimRefs _hdOruledefs _hdOruleuses _hdOuseParallel)- (T_VisitSteps_vOut52 _tlIdefs _tlIerrors _tlIindex _tlIisLast _tlIlazyIntras _tlIprevMaxSimRefs _tlIruleKinds _tlIruleUsage _tlIsem_steps _tlIsize _tlIsync_steps _tlIusedArgs _tlIuses _tlIvisitKinds) = inv_VisitSteps_s53 _tlX53 (T_VisitSteps_vIn52 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfmtMode _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOprevMaxSimRefs _tlOruledefs _tlOruleuses _tlOuseParallel)- _lhsOsize :: Int- _lhsOsize = rule802 _tlIsize- _hdOindex = rule803 _lhsIindex- _tlOindex = rule804 _lhsIindex- _lhsOindex :: Int- _lhsOindex = rule805 _tlIindex- _lhsOisLast :: Bool- _lhsOisLast = rule806 ()- _hdOisLast = rule807 _tlIisLast- _lhsOdefs :: Set String- _lhsOdefs = rule808 _hdIdefs _tlIdefs- _lhsOerrors :: Seq Error- _lhsOerrors = rule809 _hdIerrors _tlIerrors- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule810 _hdIlazyIntras _tlIlazyIntras- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule811 _hdIruleKinds _tlIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule812 _hdIruleUsage _tlIruleUsage- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule813 _hdIsem_steps _tlIsem_steps- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule814 _hdIsync_steps _tlIsync_steps- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule815 _hdIusedArgs _tlIusedArgs- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule816 _hdIuses _tlIuses- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule817 _hdIvisitKinds _tlIvisitKinds- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule818 _tlIprevMaxSimRefs- _hdOallFromToStates = rule819 _lhsIallFromToStates- _hdOallInitStates = rule820 _lhsIallInitStates- _hdOallVisitKinds = rule821 _lhsIallVisitKinds- _hdOallchildvisit = rule822 _lhsIallchildvisit- _hdOavisitdefs = rule823 _lhsIavisitdefs- _hdOavisituses = rule824 _lhsIavisituses- _hdOchildTypes = rule825 _lhsIchildTypes- _hdOchildintros = rule826 _lhsIchildintros- _hdOfmtMode = rule827 _lhsIfmtMode- _hdOkind = rule828 _lhsIkind- _hdOmrules = rule829 _lhsImrules- _hdOoptions = rule830 _lhsIoptions- _hdOprevMaxSimRefs = rule831 _lhsIprevMaxSimRefs- _hdOruledefs = rule832 _lhsIruledefs- _hdOruleuses = rule833 _lhsIruleuses- _hdOuseParallel = rule834 _lhsIuseParallel- _tlOallFromToStates = rule835 _lhsIallFromToStates- _tlOallInitStates = rule836 _lhsIallInitStates- _tlOallVisitKinds = rule837 _lhsIallVisitKinds- _tlOallchildvisit = rule838 _lhsIallchildvisit- _tlOavisitdefs = rule839 _lhsIavisitdefs- _tlOavisituses = rule840 _lhsIavisituses- _tlOchildTypes = rule841 _lhsIchildTypes- _tlOchildintros = rule842 _lhsIchildintros- _tlOfmtMode = rule843 _lhsIfmtMode- _tlOkind = rule844 _lhsIkind- _tlOmrules = rule845 _lhsImrules- _tlOoptions = rule846 _lhsIoptions- _tlOprevMaxSimRefs = rule847 _hdIprevMaxSimRefs- _tlOruledefs = rule848 _lhsIruledefs- _tlOruleuses = rule849 _lhsIruleuses- _tlOuseParallel = rule850 _lhsIuseParallel- __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitSteps_s53 v52- {-# INLINE rule802 #-}- {-# LINE 868 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule802 = \ ((_tlIsize) :: Int) ->- {-# LINE 868 "./src-ag/ExecutionPlan2Hs.ag" #-}- 1 + _tlIsize- {-# LINE 6351 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule803 #-}- {-# LINE 873 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule803 = \ ((_lhsIindex) :: Int) ->- {-# LINE 873 "./src-ag/ExecutionPlan2Hs.ag" #-}- _lhsIindex- {-# LINE 6357 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule804 #-}- {-# LINE 874 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule804 = \ ((_lhsIindex) :: Int) ->- {-# LINE 874 "./src-ag/ExecutionPlan2Hs.ag" #-}- 1 + _lhsIindex- {-# LINE 6363 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule805 #-}- {-# LINE 875 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule805 = \ ((_tlIindex) :: Int) ->- {-# LINE 875 "./src-ag/ExecutionPlan2Hs.ag" #-}- _tlIindex- {-# LINE 6369 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule806 #-}- {-# LINE 894 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule806 = \ (_ :: ()) ->- {-# LINE 894 "./src-ag/ExecutionPlan2Hs.ag" #-}- False- {-# LINE 6375 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule807 #-}- {-# LINE 895 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule807 = \ ((_tlIisLast) :: Bool) ->- {-# LINE 895 "./src-ag/ExecutionPlan2Hs.ag" #-}- _tlIisLast- {-# LINE 6381 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule808 #-}- rule808 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->- _hdIdefs `Set.union` _tlIdefs- {-# INLINE rule809 #-}- rule809 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule810 #-}- rule810 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->- _hdIlazyIntras `Set.union` _tlIlazyIntras- {-# INLINE rule811 #-}- rule811 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->- _hdIruleKinds `unionWithMappend` _tlIruleKinds- {-# INLINE rule812 #-}- rule812 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->- _hdIruleUsage `unionWithSum` _tlIruleUsage- {-# INLINE rule813 #-}- rule813 = \ ((_hdIsem_steps) :: PP_Doc) ((_tlIsem_steps) :: PP_Doc) ->- _hdIsem_steps >-< _tlIsem_steps- {-# INLINE rule814 #-}- rule814 = \ ((_hdIsync_steps) :: PP_Doc) ((_tlIsync_steps) :: PP_Doc) ->- _hdIsync_steps >-< _tlIsync_steps- {-# INLINE rule815 #-}- rule815 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->- _hdIusedArgs `Set.union` _tlIusedArgs- {-# INLINE rule816 #-}- rule816 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->- _hdIuses `Map.union` _tlIuses- {-# INLINE rule817 #-}- rule817 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule818 #-}- rule818 = \ ((_tlIprevMaxSimRefs) :: Int) ->- _tlIprevMaxSimRefs- {-# INLINE rule819 #-}- rule819 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule820 #-}- rule820 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule821 #-}- rule821 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule822 #-}- rule822 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule823 #-}- rule823 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule824 #-}- rule824 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule825 #-}- rule825 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule826 #-}- rule826 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule827 #-}- rule827 = \ ((_lhsIfmtMode) :: FormatMode) ->- _lhsIfmtMode- {-# INLINE rule828 #-}- rule828 = \ ((_lhsIkind) :: VisitKind) ->- _lhsIkind- {-# INLINE rule829 #-}- rule829 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule830 #-}- rule830 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule831 #-}- rule831 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs- {-# INLINE rule832 #-}- rule832 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule833 #-}- rule833 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule834 #-}- rule834 = \ ((_lhsIuseParallel) :: Bool) ->- _lhsIuseParallel- {-# INLINE rule835 #-}- rule835 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule836 #-}- rule836 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule837 #-}- rule837 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule838 #-}- rule838 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule839 #-}- rule839 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule840 #-}- rule840 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule841 #-}- rule841 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule842 #-}- rule842 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule843 #-}- rule843 = \ ((_lhsIfmtMode) :: FormatMode) ->- _lhsIfmtMode- {-# INLINE rule844 #-}- rule844 = \ ((_lhsIkind) :: VisitKind) ->- _lhsIkind- {-# INLINE rule845 #-}- rule845 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule846 #-}- rule846 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule847 #-}- rule847 = \ ((_hdIprevMaxSimRefs) :: Int) ->- _hdIprevMaxSimRefs- {-# INLINE rule848 #-}- rule848 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule849 #-}- rule849 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule850 #-}- rule850 = \ ((_lhsIuseParallel) :: Bool) ->- _lhsIuseParallel-{-# NOINLINE sem_VisitSteps_Nil #-}-sem_VisitSteps_Nil :: T_VisitSteps -sem_VisitSteps_Nil = T_VisitSteps (return st53) where- {-# NOINLINE st53 #-}- st53 = let- v52 :: T_VisitSteps_v52 - v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let- _lhsOsize :: Int- _lhsOsize = rule851 ()- _lhsOisLast :: Bool- _lhsOisLast = rule852 ()- _lhsOdefs :: Set String- _lhsOdefs = rule853 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule854 ()- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule855 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule856 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule857 ()- _lhsOsem_steps :: PP_Doc- _lhsOsem_steps = rule858 ()- _lhsOsync_steps :: PP_Doc- _lhsOsync_steps = rule859 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule860 ()- _lhsOuses :: Map String (Maybe NonLocalAttr)- _lhsOuses = rule861 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule862 ()- _lhsOindex :: Int- _lhsOindex = rule863 _lhsIindex- _lhsOprevMaxSimRefs :: Int- _lhsOprevMaxSimRefs = rule864 _lhsIprevMaxSimRefs- __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds- in __result_ )- in C_VisitSteps_s53 v52- {-# INLINE rule851 #-}- {-# LINE 867 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule851 = \ (_ :: ()) ->- {-# LINE 867 "./src-ag/ExecutionPlan2Hs.ag" #-}- 0- {-# LINE 6554 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule852 #-}- {-# LINE 893 "./src-ag/ExecutionPlan2Hs.ag" #-}- rule852 = \ (_ :: ()) ->- {-# LINE 893 "./src-ag/ExecutionPlan2Hs.ag" #-}- True- {-# LINE 6560 "dist/build/ExecutionPlan2Hs.hs"#-}- {-# INLINE rule853 #-}- rule853 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule854 #-}- rule854 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule855 #-}- rule855 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule856 #-}- rule856 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule857 #-}- rule857 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule858 #-}- rule858 = \ (_ :: ()) ->- empty- {-# INLINE rule859 #-}- rule859 = \ (_ :: ()) ->- empty- {-# INLINE rule860 #-}- rule860 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule861 #-}- rule861 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule862 #-}- rule862 = \ (_ :: ()) ->- mempty- {-# INLINE rule863 #-}- rule863 = \ ((_lhsIindex) :: Int) ->- _lhsIindex- {-# INLINE rule864 #-}- rule864 = \ ((_lhsIprevMaxSimRefs) :: Int) ->- _lhsIprevMaxSimRefs---- Visits --------------------------------------------------------- wrapper-data Inh_Visits = Inh_Visits { allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visits :: (Map NontermIdent Attributes), allInitStates_Inh_Visits :: (Map NontermIdent Int), allSynmap_Inh_Visits :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visits :: (Map Identifier Type), childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visits :: (ConstructorIdent), inhmap_Inh_Visits :: (Attributes), mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), nt_Inh_Visits :: (NontermIdent), options_Inh_Visits :: (Options), params_Inh_Visits :: ([Identifier]), prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visits :: (Map Identifier (Set String)), ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visits :: (Attributes), terminaldefs_Inh_Visits :: (Set String) }-data Syn_Visits = Syn_Visits { allvisits_Syn_Visits :: ([VisitStateState]), childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_Visits :: (Seq Error), fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visits :: (Set String), ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visits :: (Map Identifier Int), sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ), t_visits_Syn_Visits :: (PP_Doc), usedArgs_Syn_Visits :: (Set String), visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }-{-# INLINABLE wrap_Visits #-}-wrap_Visits :: T_Visits -> Inh_Visits -> (Syn_Visits )-wrap_Visits (T_Visits act) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs- (T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visits_s56 sem arg)- return (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)- )---- cata-{-# NOINLINE sem_Visits #-}-sem_Visits :: Visits -> T_Visits -sem_Visits list = Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list)---- semantic domain-newtype T_Visits = T_Visits {- attach_T_Visits :: Identity (T_Visits_s56 )- }-newtype T_Visits_s56 = C_Visits_s56 {- inv_Visits_s56 :: (T_Visits_v55 )- }-data T_Visits_s57 = C_Visits_s57-type T_Visits_v55 = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )-data T_Visits_vIn55 = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)-data T_Visits_vOut55 = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,Bool -> PP_Doc)] ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))-{-# NOINLINE sem_Visits_Cons #-}-sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits -sem_Visits_Cons arg_hd_ arg_tl_ = T_Visits (return st56) where- {-# NOINLINE st56 #-}- st56 = let- v55 :: T_Visits_v55 - v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let- _hdX47 = Control.Monad.Identity.runIdentity (attach_T_Visit (arg_hd_))- _tlX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_tl_))- (T_Visit_vOut46 _hdIallvisits _hdIchildvisit _hdIerrors _hdIfromToStates _hdIintramap _hdIlazyIntras _hdIruleKinds _hdIruleUsage _hdIsem_visit _hdIt_visits _hdIusedArgs _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_Visit_s47 _hdX47 (T_Visit_vIn46 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs)- (T_Visits_vOut55 _tlIallvisits _tlIchildvisit _tlIerrors _tlIfromToStates _tlIintramap _tlIlazyIntras _tlIruleKinds _tlIruleUsage _tlIsem_visit _tlIt_visits _tlIusedArgs _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_Visits_s56 _tlX56 (T_Visits_vIn55 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs)- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule865 _hdIallvisits _tlIallvisits- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule866 _hdIchildvisit _tlIchildvisit- _lhsOerrors :: Seq Error- _lhsOerrors = rule867 _hdIerrors _tlIerrors- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule868 _hdIfromToStates _tlIfromToStates- _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))- _lhsOintramap = rule869 _hdIintramap _tlIintramap- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule870 _hdIlazyIntras _tlIlazyIntras- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule871 _hdIruleKinds _tlIruleKinds- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule872 _hdIruleUsage _tlIruleUsage- _lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)] - _lhsOsem_visit = rule873 _hdIsem_visit _tlIsem_visit- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule874 _hdIt_visits _tlIt_visits- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule875 _hdIusedArgs _tlIusedArgs- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule876 _hdIvisitKinds _tlIvisitKinds- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule877 _hdIvisitdefs _tlIvisitdefs- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule878 _hdIvisituses _tlIvisituses- _hdOallFromToStates = rule879 _lhsIallFromToStates- _hdOallInhmap = rule880 _lhsIallInhmap- _hdOallInitStates = rule881 _lhsIallInitStates- _hdOallSynmap = rule882 _lhsIallSynmap- _hdOallVisitKinds = rule883 _lhsIallVisitKinds- _hdOallchildvisit = rule884 _lhsIallchildvisit- _hdOallintramap = rule885 _lhsIallintramap- _hdOavisitdefs = rule886 _lhsIavisitdefs- _hdOavisituses = rule887 _lhsIavisituses- _hdOchildTypes = rule888 _lhsIchildTypes- _hdOchildintros = rule889 _lhsIchildintros- _hdOcon = rule890 _lhsIcon- _hdOinhmap = rule891 _lhsIinhmap- _hdOmrules = rule892 _lhsImrules- _hdOnextVisits = rule893 _lhsInextVisits- _hdOnt = rule894 _lhsInt- _hdOoptions = rule895 _lhsIoptions- _hdOparams = rule896 _lhsIparams- _hdOprevVisits = rule897 _lhsIprevVisits- _hdOruledefs = rule898 _lhsIruledefs- _hdOruleuses = rule899 _lhsIruleuses- _hdOsynmap = rule900 _lhsIsynmap- _hdOterminaldefs = rule901 _lhsIterminaldefs- _tlOallFromToStates = rule902 _lhsIallFromToStates- _tlOallInhmap = rule903 _lhsIallInhmap- _tlOallInitStates = rule904 _lhsIallInitStates- _tlOallSynmap = rule905 _lhsIallSynmap- _tlOallVisitKinds = rule906 _lhsIallVisitKinds- _tlOallchildvisit = rule907 _lhsIallchildvisit- _tlOallintramap = rule908 _lhsIallintramap- _tlOavisitdefs = rule909 _lhsIavisitdefs- _tlOavisituses = rule910 _lhsIavisituses- _tlOchildTypes = rule911 _lhsIchildTypes- _tlOchildintros = rule912 _lhsIchildintros- _tlOcon = rule913 _lhsIcon- _tlOinhmap = rule914 _lhsIinhmap- _tlOmrules = rule915 _lhsImrules- _tlOnextVisits = rule916 _lhsInextVisits- _tlOnt = rule917 _lhsInt- _tlOoptions = rule918 _lhsIoptions- _tlOparams = rule919 _lhsIparams- _tlOprevVisits = rule920 _lhsIprevVisits- _tlOruledefs = rule921 _lhsIruledefs- _tlOruleuses = rule922 _lhsIruleuses- _tlOsynmap = rule923 _lhsIsynmap- _tlOterminaldefs = rule924 _lhsIterminaldefs- __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_Visits_s56 v55- {-# INLINE rule865 #-}- rule865 = \ ((_hdIallvisits) :: VisitStateState ) ((_tlIallvisits) :: [VisitStateState]) ->- _hdIallvisits : _tlIallvisits- {-# INLINE rule866 #-}- rule866 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _hdIchildvisit `Map.union` _tlIchildvisit- {-# INLINE rule867 #-}- rule867 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule868 #-}- rule868 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->- _hdIfromToStates `mappend` _tlIfromToStates- {-# INLINE rule869 #-}- rule869 = \ ((_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- _hdIintramap `uwMapUnion` _tlIintramap- {-# INLINE rule870 #-}- rule870 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->- _hdIlazyIntras `Set.union` _tlIlazyIntras- {-# INLINE rule871 #-}- rule871 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->- _hdIruleKinds `unionWithMappend` _tlIruleKinds- {-# INLINE rule872 #-}- rule872 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->- _hdIruleUsage `unionWithSum` _tlIruleUsage- {-# INLINE rule873 #-}- rule873 = \ ((_hdIsem_visit) :: (StateIdentifier,Bool -> PP_Doc) ) ((_tlIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->- _hdIsem_visit : _tlIsem_visit- {-# INLINE rule874 #-}- rule874 = \ ((_hdIt_visits) :: PP_Doc) ((_tlIt_visits) :: PP_Doc) ->- _hdIt_visits >-< _tlIt_visits- {-# INLINE rule875 #-}- rule875 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->- _hdIusedArgs `Set.union` _tlIusedArgs- {-# INLINE rule876 #-}- rule876 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->- _hdIvisitKinds `mappend` _tlIvisitKinds- {-# INLINE rule877 #-}- rule877 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisitdefs `uwSetUnion` _tlIvisitdefs- {-# INLINE rule878 #-}- rule878 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->- _hdIvisituses `uwSetUnion` _tlIvisituses- {-# INLINE rule879 #-}- rule879 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule880 #-}- rule880 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule881 #-}- rule881 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule882 #-}- rule882 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule883 #-}- rule883 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule884 #-}- rule884 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule885 #-}- rule885 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- _lhsIallintramap- {-# INLINE rule886 #-}- rule886 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule887 #-}- rule887 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule888 #-}- rule888 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule889 #-}- rule889 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule890 #-}- rule890 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule891 #-}- rule891 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule892 #-}- rule892 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule893 #-}- rule893 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule894 #-}- rule894 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule895 #-}- rule895 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule896 #-}- rule896 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule897 #-}- rule897 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule898 #-}- rule898 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule899 #-}- rule899 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule900 #-}- rule900 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule901 #-}- rule901 = \ ((_lhsIterminaldefs) :: Set String) ->- _lhsIterminaldefs- {-# INLINE rule902 #-}- rule902 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->- _lhsIallFromToStates- {-# INLINE rule903 #-}- rule903 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->- _lhsIallInhmap- {-# INLINE rule904 #-}- rule904 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->- _lhsIallInitStates- {-# INLINE rule905 #-}- rule905 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->- _lhsIallSynmap- {-# INLINE rule906 #-}- rule906 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->- _lhsIallVisitKinds- {-# INLINE rule907 #-}- rule907 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->- _lhsIallchildvisit- {-# INLINE rule908 #-}- rule908 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->- _lhsIallintramap- {-# INLINE rule909 #-}- rule909 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisitdefs- {-# INLINE rule910 #-}- rule910 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->- _lhsIavisituses- {-# INLINE rule911 #-}- rule911 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->- _lhsIchildTypes- {-# INLINE rule912 #-}- rule912 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->- _lhsIchildintros- {-# INLINE rule913 #-}- rule913 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule914 #-}- rule914 = \ ((_lhsIinhmap) :: Attributes) ->- _lhsIinhmap- {-# INLINE rule915 #-}- rule915 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->- _lhsImrules- {-# INLINE rule916 #-}- rule916 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->- _lhsInextVisits- {-# INLINE rule917 #-}- rule917 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule918 #-}- rule918 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule919 #-}- rule919 = \ ((_lhsIparams) :: [Identifier]) ->- _lhsIparams- {-# INLINE rule920 #-}- rule920 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->- _lhsIprevVisits- {-# INLINE rule921 #-}- rule921 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->- _lhsIruledefs- {-# INLINE rule922 #-}- rule922 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->- _lhsIruleuses- {-# INLINE rule923 #-}- rule923 = \ ((_lhsIsynmap) :: Attributes) ->- _lhsIsynmap- {-# INLINE rule924 #-}- rule924 = \ ((_lhsIterminaldefs) :: Set String) ->- _lhsIterminaldefs-{-# NOINLINE sem_Visits_Nil #-}-sem_Visits_Nil :: T_Visits -sem_Visits_Nil = T_Visits (return st56) where- {-# NOINLINE st56 #-}- st56 = let- v55 :: T_Visits_v55 - v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let- _lhsOallvisits :: [VisitStateState]- _lhsOallvisits = rule925 ()- _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))- _lhsOchildvisit = rule926 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule927 ()- _lhsOfromToStates :: Map VisitIdentifier (Int,Int)- _lhsOfromToStates = rule928 ()- _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))- _lhsOintramap = rule929 ()- _lhsOlazyIntras :: Set String- _lhsOlazyIntras = rule930 ()- _lhsOruleKinds :: Map Identifier (Set VisitKind)- _lhsOruleKinds = rule931 ()- _lhsOruleUsage :: Map Identifier Int- _lhsOruleUsage = rule932 ()- _lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)] - _lhsOsem_visit = rule933 ()- _lhsOt_visits :: PP_Doc- _lhsOt_visits = rule934 ()- _lhsOusedArgs :: Set String- _lhsOusedArgs = rule935 ()- _lhsOvisitKinds :: Map VisitIdentifier VisitKind- _lhsOvisitKinds = rule936 ()- _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)- _lhsOvisitdefs = rule937 ()- _lhsOvisituses :: Map VisitIdentifier (Set Identifier)- _lhsOvisituses = rule938 ()- __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses- in __result_ )- in C_Visits_s56 v55- {-# INLINE rule925 #-}- rule925 = \ (_ :: ()) ->- []- {-# INLINE rule926 #-}- rule926 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule927 #-}- rule927 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule928 #-}- rule928 = \ (_ :: ()) ->- mempty- {-# INLINE rule929 #-}- rule929 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule930 #-}- rule930 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule931 #-}- rule931 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule932 #-}- rule932 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule933 #-}- rule933 = \ (_ :: ()) ->- []- {-# INLINE rule934 #-}- rule934 = \ (_ :: ()) ->- empty- {-# INLINE rule935 #-}- rule935 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule936 #-}- rule936 = \ (_ :: ()) ->- mempty- {-# INLINE rule937 #-}- rule937 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule938 #-}- rule938 = \ (_ :: ()) ->+{-# LINE 2 "./src-ag/HsToken.ag" #-}++import CommonTypes+import UU.Scanner.Position(Pos)+{-# LINE 10 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 16 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 23 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 2 "./src-ag/ExecutionPlan.ag" #-}++-- VisitSyntax.ag imports+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import CommonTypes+import ErrorMessages++import qualified Data.Set as Set+import Data.Set(Set)+import qualified Data.Map as Map+import Data.Map(Map)+{-# LINE 37 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 7 "./src-ag/ExecutionPlan2Hs.ag" #-}++import ExecutionPlan+import Pretty+import PPUtil+import Options+import Data.Monoid(mappend,mempty)+import Data.Maybe+import Debug.Trace+import System.IO+import System.Directory+import System.FilePath+import UU.Scanner.Position++import TokenDef+import HsToken+import ErrorMessages++import Data.Set (Set)+import qualified Data.Set as Set+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Sequence(Seq)+import qualified Data.Sequence as Seq+import Data.Foldable(toList)+{-# LINE 64 "dist/build/ExecutionPlan2Hs.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 163 "./src-ag/ExecutionPlan2Hs.ag" #-}++classCtxsToDocs :: ClassContext -> [PP_Doc]+classCtxsToDocs = map toDoc where+ toDoc (ident,args) = (ident >#< ppSpaced (map pp_parens args))++classConstrsToDocs :: [Type] -> [PP_Doc]+classConstrsToDocs = map ppTp++ppClasses :: [PP_Doc] -> PP_Doc+ppClasses [] = empty+ppClasses xs = pp_block "(" ")" "," xs >#< "=>"++ppQuants :: [Identifier] -> PP_Doc+ppQuants [] = empty+ppQuants ps = "forall" >#< ppSpaced ps >#< "."+{-# LINE 83 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 192 "./src-ag/ExecutionPlan2Hs.ag" #-}++-- first parameter indicates: generate a record or not+ppConFields :: Bool -> [PP_Doc] -> PP_Doc+ppConFields True flds = ppListSep "{" "}" ", " $ filter (not . isEmpty) flds+ppConFields False flds = ppSpaced flds+{-# LINE 91 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 218 "./src-ag/ExecutionPlan2Hs.ag" #-}++ppTp :: Type -> PP_Doc+ppTp = text . typeToHaskellString Nothing []+{-# LINE 97 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 332 "./src-ag/ExecutionPlan2Hs.ag" #-}+type VisitStateState = (VisitIdentifier,StateIdentifier, StateIdentifier)+{-# LINE 101 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 428 "./src-ag/ExecutionPlan2Hs.ag" #-}++conNmTVisit nt vId = "T_" >|< nt >|< "_v" >|< vId+conNmTVisitIn nt vId = "T_" >|< nt >|< "_vIn" >|< vId+conNmTVisitOut nt vId = "T_" >|< nt >|< "_vOut" >|< vId+conNmTNextVisit nt stId = "T_" >|< nt >|< "_s" >|< stId++ppMonadType :: Options -> PP_Doc+ppMonadType opts+ | parallelInvoke opts = text "IO"+ | otherwise = text "Identity"+{-# LINE 114 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 578 "./src-ag/ExecutionPlan2Hs.ag" #-}++ppDefor :: Type -> PP_Doc+ppDefor (NT nt args _) = "T_" >|< nt >#< ppSpaced (map pp_parens args)+ppDefor (Haskell s) = text s+{-# LINE 121 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 702 "./src-ag/ExecutionPlan2Hs.ag" #-}++mklet :: (PP a, PP b, PP c) => a -> b -> c -> PP_Doc+mklet prefix defs body =+ prefix >#< "let"+ >-< indent 3 defs+ >-< indent 2 "in" >#< body+{-# LINE 130 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 768 "./src-ag/ExecutionPlan2Hs.ag" #-}++resultValName :: String+resultValName = "__result_"++nextStName :: String+nextStName = "__st_"+{-# LINE 139 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 839 "./src-ag/ExecutionPlan2Hs.ag" #-}++parResultName :: String+parResultName = "__outcome_"++fmtDecl :: PP a => Bool -> FormatMode -> a -> PP_Doc+fmtDecl declPure fmt decl = case fmt of+ FormatLetDecl -> pp decl+ FormatLetLine -> "let" >#< decl >#< "in"+ FormatDo | declPure -> "let" >#< decl+ | otherwise -> pp decl+{-# LINE 152 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 965 "./src-ag/ExecutionPlan2Hs.ag" #-}++stname :: Identifier -> Int -> String+stname child st = "_" ++ getName child ++ "X" ++ show st++-- should actually return some conversion info+compatibleAttach :: VisitKind -> NontermIdent -> Options -> Bool+compatibleAttach _ _ _ = True++unMon :: Options -> PP_Doc+unMon options+ | parallelInvoke options = text "System.IO.Unsafe.unsafePerformIO" -- IO monad+ | otherwise = text "Control.Monad.Identity.runIdentity" -- identity monad+{-# LINE 167 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1073 "./src-ag/ExecutionPlan2Hs.ag" #-}++dummyPat :: Options -> Bool -> PP_Doc+dummyPat opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = if strictDummyToken opts+ then text "()"+ else text "(_ :: ())"+ | otherwise = let match | strictDummyToken opts = "!_"+ | otherwise = "_"+ in pp_parens (match >#< "::" >#< dummyType opts noArgs)+ where match | strictDummyToken opts = "(!_)"+ | otherwise = "_"++dummyArg :: Options -> Bool -> PP_Doc+dummyArg opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "()"+ | otherwise = text "GHC.Prim.realWorld#"++dummyType :: Options -> Bool -> PP_Doc+dummyType opts noArgs+ | not noArgs && tupleAsDummyToken opts = empty -- no unnecessary tuples+ | tupleAsDummyToken opts = text "()"+ | otherwise = text "(GHC.Prim.State# GHC.Prim.RealWorld)"+{-# LINE 194 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1099 "./src-ag/ExecutionPlan2Hs.ag" #-}++-- rules are "deinlined" to prevent needless code duplication.+-- if there is only a bit of duplication, we allow ghc to decide if it is worth it.+-- if the duplication crosses this threshold, however, we tell ghc definitely not to inline it.+ruleInlineThresholdSoft :: Int+ruleInlineThresholdSoft = 3++ruleInlineThresholdHard :: Int+ruleInlineThresholdHard = 5++reallyOftenUsedThreshold :: Int+reallyOftenUsedThreshold = 12+{-# LINE 209 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1165 "./src-ag/ExecutionPlan2Hs.ag" #-}++data NonLocalAttr+ = AttrInh Identifier Identifier+ | AttrSyn Identifier Identifier deriving Show++mkNonLocalAttr :: Bool -> Identifier -> Identifier -> NonLocalAttr+mkNonLocalAttr True = AttrInh -- True: inherited attr+mkNonLocalAttr False = AttrSyn++lookupAttrType :: NonLocalAttr -> Map Identifier Attributes -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupAttrType (AttrInh child name) inhs _ = lookupType child name inhs+lookupAttrType (AttrSyn child name) _ syns = lookupType child name syns++-- Note: if the child takes type parameters, the type of an attribute of this child may refer to these parameters. This means that+-- the actual type of the attribute needs to have its type parameters substituted with the actual type argument of the child.+-- However, for now we simply decide to return Nothing in this case, which skips the type annotation.+lookupType :: Identifier -> Identifier -> Map Identifier Attributes -> Map Identifier Type -> Maybe PP_Doc+lookupType child name attrMp childMp+ | noParameters childTp = Just ppDoc+ | otherwise = Nothing+ where+ attrTp = Map.findWithDefault (error "lookupType: the attribute is not in the attrs of the child") name childAttrs+ childAttrs = Map.findWithDefault (error "lookupType: the attributes of the nonterm are not in the map") nonterm attrMp+ nonterm = extractNonterminal childTp+ childTp = Map.findWithDefault (error ("lookupType: the child " ++ show child ++ "is not in the appropriate map")) child childMp+ ppDoc = ppTp attrTp++noParameters :: Type -> Bool+noParameters (Haskell _) = True+noParameters (NT _ args _) = null args+{-# LINE 242 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1252 "./src-ag/ExecutionPlan2Hs.ag" #-}++-- a `compatibleKind` b means: can kind b be invoked from a+compatibleKind :: VisitKind -> VisitKind -> Bool+compatibleKind _ _ = True++compatibleRule :: VisitKind -> Bool -> Bool+compatibleRule (VisitPure _) False = False+compatibleRule _ _ = True+{-# LINE 253 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1274 "./src-ag/ExecutionPlan2Hs.ag" #-}++unionWithSum = Map.unionWith (+)+{-# LINE 258 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1297 "./src-ag/ExecutionPlan2Hs.ag" #-}++uwSetUnion :: (Ord a, Ord b) => Map a (Set b) -> Map a (Set b) -> Map a (Set b)+uwSetUnion = Map.unionWith Set.union++uwMapUnion :: (Ord a, Ord b) => Map a (Map b c) -> Map a (Map b c) -> Map a (Map b c)+uwMapUnion = Map.unionWith Map.union+{-# LINE 267 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1514 "./src-ag/ExecutionPlan2Hs.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""++writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output+{-# LINE 287 "dist/build/ExecutionPlan2Hs.hs" #-}++{-# LINE 1661 "./src-ag/ExecutionPlan2Hs.ag" #-}++ppNoInline :: PP a => a -> PP_Doc+ppNoInline = ppPragmaBinding "NOINLINE"++ppInline :: PP a => a -> PP_Doc+ppInline = ppPragmaBinding "INLINE"++ppInlinable :: PP a => a -> PP_Doc+ppInlinable = ppPragmaBinding "INLINABLE"++ppPragmaBinding :: (PP a, PP b) => a -> b -> PP_Doc+ppPragmaBinding pragma nm = "{-#" >#< pragma >#< nm >#< "#-}"++ppCostCentre :: PP a => a -> PP_Doc+ppCostCentre nm = "{-#" >#< "SCC" >#< "\"" >|< nm >|< "\"" >#< "#-}"++warrenFlagsPP :: Options -> PP_Doc+warrenFlagsPP options = vlist+ [ pp "{-# LANGUAGE Rank2Types, GADTs #-}"+ , if bangpats options+ then pp "{-# LANGUAGE BangPatterns #-}"+ else empty+ , if noPerRuleTypeSigs options && noPerStateTypeSigs options+ then empty+ else pp "{-# LANGUAGE ScopedTypeVariables #-}"+ , if tupleAsDummyToken options+ then empty+ else pp "{-# LANGUAGE ScopedTypeVariables, MagicHash #-}"+ , -- not that the meaning of "unbox" is here that strict fields in data types may be+ -- unboxed if possible. This may affect user-defined data types declared in the module.+ -- Unfortunately, we cannot turn it on for only the AG generated data types without+ -- causing a zillion of warnings.+ if unbox options && bangpats options+ then pp $ "{-# OPTIONS_GHC -funbox-strict-fields -fstrictness #-}"+ else empty+ , if parallelInvoke options && not (noEagerBlackholing options)+ then pp $ "{-# OPTIONS_GHC -feager-blackholing #-}"+ else empty+ ]+{-# LINE 329 "dist/build/ExecutionPlan2Hs.hs" #-}+-- EChild ------------------------------------------------------+-- wrapper+data Inh_EChild = Inh_EChild { allInitStates_Inh_EChild :: (Map NontermIdent Int), con_Inh_EChild :: (ConstructorIdent), importBlocks_Inh_EChild :: (PP_Doc), mainFile_Inh_EChild :: (String), mainName_Inh_EChild :: (String), moduleHeader_Inh_EChild :: (String -> String -> String -> Bool -> String), nt_Inh_EChild :: (NontermIdent), options_Inh_EChild :: (Options), pragmaBlocks_Inh_EChild :: (String), textBlocks_Inh_EChild :: (PP_Doc) }+data Syn_EChild = Syn_EChild { argnamesw_Syn_EChild :: ( PP_Doc ), argpats_Syn_EChild :: ( PP_Doc ), argtps_Syn_EChild :: ( PP_Doc ), childTypes_Syn_EChild :: (Map Identifier Type), childintros_Syn_EChild :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), datatype_Syn_EChild :: (PP_Doc), terminaldefs_Syn_EChild :: (Set String), usedArgs_Syn_EChild :: (Set String) }+{-# INLINABLE wrap_EChild #-}+wrap_EChild :: T_EChild -> Inh_EChild -> (Syn_EChild )+wrap_EChild (T_EChild act) (Inh_EChild _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks+ (T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs) <- return (inv_EChild_s2 sem arg)+ return (Syn_EChild _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs)+ )++-- cata+{-# NOINLINE sem_EChild #-}+sem_EChild :: EChild -> T_EChild +sem_EChild ( EChild name_ tp_ kind_ hasAround_ merges_ isMerged_ ) = sem_EChild_EChild name_ tp_ kind_ hasAround_ merges_ isMerged_+sem_EChild ( ETerm name_ tp_ ) = sem_EChild_ETerm name_ tp_++-- semantic domain+newtype T_EChild = T_EChild {+ attach_T_EChild :: Identity (T_EChild_s2 )+ }+newtype T_EChild_s2 = C_EChild_s2 {+ inv_EChild_s2 :: (T_EChild_v1 )+ }+data T_EChild_s3 = C_EChild_s3+type T_EChild_v1 = (T_EChild_vIn1 ) -> (T_EChild_vOut1 )+data T_EChild_vIn1 = T_EChild_vIn1 (Map NontermIdent Int) (ConstructorIdent) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (PP_Doc)+data T_EChild_vOut1 = T_EChild_vOut1 ( PP_Doc ) ( PP_Doc ) ( PP_Doc ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (PP_Doc) (Set String) (Set String)+{-# NOINLINE sem_EChild_EChild #-}+sem_EChild_EChild :: (Identifier) -> (Type) -> (ChildKind) -> (Bool) -> (Maybe [Identifier]) -> (Bool) -> T_EChild +sem_EChild_EChild arg_name_ arg_tp_ arg_kind_ arg_hasAround_ _ _ = T_EChild (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_EChild_v1 + v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule0 _usedArgs_augmented_f1 _usedArgs_augmented_syn+ _usedArgs_augmented_f1 = rule1 arg_kind_ arg_name_+ _tpDoc = rule2 _addStrict arg_tp_+ _strNm = rule3 _lhsIcon _lhsInt arg_name_+ _field = rule4 _lhsIoptions _strNm _tpDoc+ _addStrict = rule5 _lhsIoptions+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule6 _field arg_kind_+ _lhsOargnamesw :: PP_Doc + _lhsOargnamesw = rule7 _nt arg_kind_ arg_name_+ _lhsOargtps :: PP_Doc + _lhsOargtps = rule8 arg_kind_ arg_tp_+ _argpats = rule9 arg_kind_ arg_name_+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule10 _introcode arg_name_+ _isDefor = rule11 arg_tp_+ _valcode = rule12 _isDefor _lhsIoptions _nt arg_kind_ arg_name_+ _aroundcode = rule13 _lhsIoptions arg_hasAround_ arg_name_+ _introcode = rule14 _addbang _aroundcode _initSt _isDefor _lhsIoptions _nt _valcode arg_hasAround_ arg_kind_ arg_name_+ _nt = rule15 arg_tp_+ _addbang = rule16 _lhsIoptions+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule17 arg_name_ arg_tp_+ _initSt = rule18 _lhsIallInitStates _nt+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule19 ()+ _usedArgs_augmented_syn = rule20 ()+ _lhsOargpats :: PP_Doc + _lhsOargpats = rule21 _argpats+ __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChild_s2 v1+ {-# INLINE rule0 #-}+ rule0 = \ _usedArgs_augmented_f1 _usedArgs_augmented_syn ->+ foldr ($) _usedArgs_augmented_syn [_usedArgs_augmented_f1]+ {-# INLINE rule1 #-}+ rule1 = \ kind_ name_ ->+ \s -> case kind_ of+ ChildSyntax -> Set.insert ("arg_" ++ show name_ ++ "_") s+ _ -> s+ {-# INLINE rule2 #-}+ {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule2 = \ _addStrict tp_ ->+ {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _addStrict $ pp_parens $ ppTp $ removeDeforested tp_+ {-# LINE 414 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule3 #-}+ {-# LINE 207 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule3 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->+ {-# LINE 207 "./src-ag/ExecutionPlan2Hs.ag" #-}+ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 420 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule4 #-}+ {-# LINE 208 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule4 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->+ {-# LINE 208 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if dataRecords _lhsIoptions+ then _strNm >#< "::" >#< _tpDoc+ else _tpDoc+ {-# LINE 428 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule5 #-}+ {-# LINE 211 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule5 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 211 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if strictData _lhsIoptions then "!" >|< x else x+ {-# LINE 434 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule6 #-}+ {-# LINE 212 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule6 = \ _field kind_ ->+ {-# LINE 212 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildAttr -> empty+ _ -> _field+ {-# LINE 442 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule7 #-}+ {-# LINE 300 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule7 = \ _nt kind_ name_ ->+ {-# LINE 300 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> "(" >#< "sem_" >|< _nt >#< name_ >|< "_" >#< ")"+ ChildAttr -> empty+ ChildReplace tp -> "(" >#< "sem_" >|< extractNonterminal tp >#< name_ >|< "_" >#< ")"+ {-# LINE 451 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule8 #-}+ {-# LINE 567 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule8 = \ kind_ tp_ ->+ {-# LINE 567 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> ppDefor tp_ >#< "->"+ ChildReplace tp -> ppDefor tp >#< "->"+ _ -> empty+ {-# LINE 460 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule9 #-}+ {-# LINE 571 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule9 = \ kind_ name_ ->+ {-# LINE 571 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> name_ >|< "_"+ ChildReplace _ -> name_ >|< "_"+ _ -> empty+ {-# LINE 469 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule10 #-}+ {-# LINE 919 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule10 = \ _introcode name_ ->+ {-# LINE 919 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _introcode+ {-# LINE 475 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule11 #-}+ {-# LINE 920 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule11 = \ tp_ ->+ {-# LINE 920 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case tp_ of+ NT _ _ defor -> defor+ _ -> False+ {-# LINE 483 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule12 #-}+ {-# LINE 923 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule12 = \ _isDefor ((_lhsIoptions) :: Options) _nt kind_ name_ ->+ {-# LINE 923 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ ChildSyntax -> "arg_" >|< name_ >|< "_"+ ChildAttr ->+ let prefix | not _isDefor = if lateHigherOrderBinding _lhsIoptions+ then lateSemNtLabel _nt >#< lhsname _lhsIoptions True idLateBindingAttr+ else "sem_" >|< _nt+ | otherwise = empty+ in pp_parens (prefix >#< instname name_)+ ChildReplace _ ->+ pp_parens (instname name_ >#< name_ >|< "_")+ {-# LINE 498 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule13 #-}+ {-# LINE 934 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule13 = \ ((_lhsIoptions) :: Options) hasAround_ name_ ->+ {-# LINE 934 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if hasAround_+ then locname _lhsIoptions name_ >|< "_around"+ else empty+ {-# LINE 506 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule14 #-}+ {-# LINE 937 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule14 = \ _addbang _aroundcode _initSt _isDefor ((_lhsIoptions) :: Options) _nt _valcode hasAround_ kind_ name_ ->+ {-# LINE 937 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \kind fmtMode ->+ let pat = text $ stname name_ _initSt+ patStrict = _addbang pat+ attach = "attach_T_" >|< _nt >#< pp_parens (_aroundcode >#< _valcode )+ runAttach = unMon _lhsIoptions >#< pp_parens attach+ decl = case kind of+ VisitPure False -> pat >#< "=" >#< runAttach+ VisitPure True -> patStrict >#< "=" >#< runAttach+ VisitMonadic -> patStrict >#< "<-" >#< attach+ in if compatibleAttach kind _nt _lhsIoptions+ then Right ( fmtDecl False fmtMode decl+ , Set.singleton (stname name_ _initSt )+ , case kind_ of+ ChildAttr -> Map.insert (instname name_) Nothing $+ ( if _isDefor || not (lateHigherOrderBinding _lhsIoptions)+ then id+ else Map.insert (lhsname _lhsIoptions True idLateBindingAttr) (Just $ AttrInh _LHS idLateBindingAttr)+ ) $+ ( if hasAround_+ then Map.insert (locname _lhsIoptions (name_) ++ "_around") Nothing+ else id+ ) $ Map.empty+ ChildReplace _ -> Map.singleton (instname name_) Nothing+ ChildSyntax -> Map.empty+ )+ else Left $ IncompatibleAttachKind name_ kind+ {-# LINE 537 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule15 #-}+ {-# LINE 963 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule15 = \ tp_ ->+ {-# LINE 963 "./src-ag/ExecutionPlan2Hs.ag" #-}+ extractNonterminal tp_+ {-# LINE 543 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule16 #-}+ {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule16 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1542 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 549 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule17 #-}+ {-# LINE 1594 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule17 = \ name_ tp_ ->+ {-# LINE 1594 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 555 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule18 #-}+ {-# LINE 1638 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule18 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) _nt ->+ {-# LINE 1638 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error "nonterminal not in allInitStates map") _nt _lhsIallInitStates+ {-# LINE 561 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule19 #-}+ rule19 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule20 #-}+ rule20 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule21 #-}+ rule21 = \ _argpats ->+ _argpats+{-# NOINLINE sem_EChild_ETerm #-}+sem_EChild_ETerm :: (Identifier) -> (Type) -> T_EChild +sem_EChild_ETerm arg_name_ arg_tp_ = T_EChild (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_EChild_v1 + v1 = \ (T_EChild_vIn1 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let+ _tpDoc = rule22 _addStrict arg_tp_+ _strNm = rule23 _lhsIcon _lhsInt arg_name_+ _field = rule24 _lhsIoptions _strNm _tpDoc+ _addStrict = rule25 _lhsIoptions+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule26 _field+ _lhsOargnamesw :: PP_Doc + _lhsOargnamesw = rule27 arg_name_+ _lhsOargtps :: PP_Doc + _lhsOargtps = rule28 arg_tp_+ _argpats = rule29 _addbang arg_name_+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule30 arg_name_+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule31 arg_name_+ _addbang = rule32 _lhsIoptions+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule33 arg_name_ arg_tp_+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule34 ()+ _lhsOargpats :: PP_Doc + _lhsOargpats = rule35 _argpats+ __result_ = T_EChild_vOut1 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChild_s2 v1+ {-# INLINE rule22 #-}+ {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule22 = \ _addStrict tp_ ->+ {-# LINE 206 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _addStrict $ pp_parens $ ppTp $ removeDeforested tp_+ {-# LINE 608 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule23 #-}+ {-# LINE 207 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule23 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ ->+ {-# LINE 207 "./src-ag/ExecutionPlan2Hs.ag" #-}+ recordFieldname _lhsInt _lhsIcon name_+ {-# LINE 614 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule24 #-}+ {-# LINE 208 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule24 = \ ((_lhsIoptions) :: Options) _strNm _tpDoc ->+ {-# LINE 208 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if dataRecords _lhsIoptions+ then _strNm >#< "::" >#< _tpDoc+ else _tpDoc+ {-# LINE 622 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule25 #-}+ {-# LINE 211 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule25 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 211 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if strictData _lhsIoptions then "!" >|< x else x+ {-# LINE 628 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule26 #-}+ {-# LINE 216 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule26 = \ _field ->+ {-# LINE 216 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _field+ {-# LINE 634 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule27 #-}+ {-# LINE 304 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule27 = \ name_ ->+ {-# LINE 304 "./src-ag/ExecutionPlan2Hs.ag" #-}+ text $ fieldname name_+ {-# LINE 640 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule28 #-}+ {-# LINE 575 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule28 = \ tp_ ->+ {-# LINE 575 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pp_parens $ show tp_) >#< "->"+ {-# LINE 646 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule29 #-}+ {-# LINE 576 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule29 = \ _addbang name_ ->+ {-# LINE 576 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang $ text $ fieldname name_+ {-# LINE 652 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule30 #-}+ {-# LINE 918 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule30 = \ name_ ->+ {-# LINE 918 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ (\_ _ -> Right (empty, Set.empty, Map.empty))+ {-# LINE 658 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule31 #-}+ {-# LINE 1311 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule31 = \ name_ ->+ {-# LINE 1311 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.singleton $ fieldname name_+ {-# LINE 664 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule32 #-}+ {-# LINE 1543 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule32 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1543 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 670 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule33 #-}+ {-# LINE 1594 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule33 = \ name_ tp_ ->+ {-# LINE 1594 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ tp_+ {-# LINE 676 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule34 #-}+ rule34 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule35 #-}+ rule35 = \ _argpats ->+ _argpats++-- EChildren ---------------------------------------------------+-- wrapper+data Inh_EChildren = Inh_EChildren { allInitStates_Inh_EChildren :: (Map NontermIdent Int), con_Inh_EChildren :: (ConstructorIdent), importBlocks_Inh_EChildren :: (PP_Doc), mainFile_Inh_EChildren :: (String), mainName_Inh_EChildren :: (String), moduleHeader_Inh_EChildren :: (String -> String -> String -> Bool -> String), nt_Inh_EChildren :: (NontermIdent), options_Inh_EChildren :: (Options), pragmaBlocks_Inh_EChildren :: (String), textBlocks_Inh_EChildren :: (PP_Doc) }+data Syn_EChildren = Syn_EChildren { argnamesw_Syn_EChildren :: ([PP_Doc]), argpats_Syn_EChildren :: ( [PP_Doc] ), argtps_Syn_EChildren :: ( [PP_Doc] ), childTypes_Syn_EChildren :: (Map Identifier Type), childintros_Syn_EChildren :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), datatype_Syn_EChildren :: ([PP_Doc]), terminaldefs_Syn_EChildren :: (Set String), usedArgs_Syn_EChildren :: (Set String) }+{-# INLINABLE wrap_EChildren #-}+wrap_EChildren :: T_EChildren -> Inh_EChildren -> (Syn_EChildren )+wrap_EChildren (T_EChildren act) (Inh_EChildren _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks+ (T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs) <- return (inv_EChildren_s5 sem arg)+ return (Syn_EChildren _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs)+ )++-- cata+{-# NOINLINE sem_EChildren #-}+sem_EChildren :: EChildren -> T_EChildren +sem_EChildren list = Prelude.foldr sem_EChildren_Cons sem_EChildren_Nil (Prelude.map sem_EChild list)++-- semantic domain+newtype T_EChildren = T_EChildren {+ attach_T_EChildren :: Identity (T_EChildren_s5 )+ }+newtype T_EChildren_s5 = C_EChildren_s5 {+ inv_EChildren_s5 :: (T_EChildren_v4 )+ }+data T_EChildren_s6 = C_EChildren_s6+type T_EChildren_v4 = (T_EChildren_vIn4 ) -> (T_EChildren_vOut4 )+data T_EChildren_vIn4 = T_EChildren_vIn4 (Map NontermIdent Int) (ConstructorIdent) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (PP_Doc)+data T_EChildren_vOut4 = T_EChildren_vOut4 ([PP_Doc]) ( [PP_Doc] ) ( [PP_Doc] ) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ([PP_Doc]) (Set String) (Set String)+{-# NOINLINE sem_EChildren_Cons #-}+sem_EChildren_Cons :: T_EChild -> T_EChildren -> T_EChildren +sem_EChildren_Cons arg_hd_ arg_tl_ = T_EChildren (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_EChildren_v4 + v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let+ _hdX2 = Control.Monad.Identity.runIdentity (attach_T_EChild (arg_hd_))+ _tlX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_tl_))+ (T_EChild_vOut1 _hdIargnamesw _hdIargpats _hdIargtps _hdIchildTypes _hdIchildintros _hdIdatatype _hdIterminaldefs _hdIusedArgs) = inv_EChild_s2 _hdX2 (T_EChild_vIn1 _hdOallInitStates _hdOcon _hdOimportBlocks _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOtextBlocks)+ (T_EChildren_vOut4 _tlIargnamesw _tlIargpats _tlIargtps _tlIchildTypes _tlIchildintros _tlIdatatype _tlIterminaldefs _tlIusedArgs) = inv_EChildren_s5 _tlX5 (T_EChildren_vIn4 _tlOallInitStates _tlOcon _tlOimportBlocks _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOtextBlocks)+ _lhsOargnamesw :: [PP_Doc]+ _lhsOargnamesw = rule36 _hdIargnamesw _tlIargnamesw+ _lhsOargpats :: [PP_Doc] + _lhsOargpats = rule37 _hdIargpats _tlIargpats+ _lhsOargtps :: [PP_Doc] + _lhsOargtps = rule38 _hdIargtps _tlIargtps+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule39 _hdIchildTypes _tlIchildTypes+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule40 _hdIchildintros _tlIchildintros+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule41 _hdIdatatype _tlIdatatype+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule42 _hdIterminaldefs _tlIterminaldefs+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule43 _hdIusedArgs _tlIusedArgs+ _hdOallInitStates = rule44 _lhsIallInitStates+ _hdOcon = rule45 _lhsIcon+ _hdOimportBlocks = rule46 _lhsIimportBlocks+ _hdOmainFile = rule47 _lhsImainFile+ _hdOmainName = rule48 _lhsImainName+ _hdOmoduleHeader = rule49 _lhsImoduleHeader+ _hdOnt = rule50 _lhsInt+ _hdOoptions = rule51 _lhsIoptions+ _hdOpragmaBlocks = rule52 _lhsIpragmaBlocks+ _hdOtextBlocks = rule53 _lhsItextBlocks+ _tlOallInitStates = rule54 _lhsIallInitStates+ _tlOcon = rule55 _lhsIcon+ _tlOimportBlocks = rule56 _lhsIimportBlocks+ _tlOmainFile = rule57 _lhsImainFile+ _tlOmainName = rule58 _lhsImainName+ _tlOmoduleHeader = rule59 _lhsImoduleHeader+ _tlOnt = rule60 _lhsInt+ _tlOoptions = rule61 _lhsIoptions+ _tlOpragmaBlocks = rule62 _lhsIpragmaBlocks+ _tlOtextBlocks = rule63 _lhsItextBlocks+ __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChildren_s5 v4+ {-# INLINE rule36 #-}+ rule36 = \ ((_hdIargnamesw) :: PP_Doc ) ((_tlIargnamesw) :: [PP_Doc]) ->+ _hdIargnamesw : _tlIargnamesw+ {-# INLINE rule37 #-}+ rule37 = \ ((_hdIargpats) :: PP_Doc ) ((_tlIargpats) :: [PP_Doc] ) ->+ _hdIargpats : _tlIargpats+ {-# INLINE rule38 #-}+ rule38 = \ ((_hdIargtps) :: PP_Doc ) ((_tlIargtps) :: [PP_Doc] ) ->+ _hdIargtps : _tlIargtps+ {-# INLINE rule39 #-}+ rule39 = \ ((_hdIchildTypes) :: Map Identifier Type) ((_tlIchildTypes) :: Map Identifier Type) ->+ _hdIchildTypes `mappend` _tlIchildTypes+ {-# INLINE rule40 #-}+ rule40 = \ ((_hdIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ((_tlIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _hdIchildintros `Map.union` _tlIchildintros+ {-# INLINE rule41 #-}+ rule41 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->+ _hdIdatatype : _tlIdatatype+ {-# INLINE rule42 #-}+ rule42 = \ ((_hdIterminaldefs) :: Set String) ((_tlIterminaldefs) :: Set String) ->+ _hdIterminaldefs `Set.union` _tlIterminaldefs+ {-# INLINE rule43 #-}+ rule43 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule44 #-}+ rule44 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule45 #-}+ rule45 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule46 #-}+ rule46 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule47 #-}+ rule47 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule48 #-}+ rule48 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule49 #-}+ rule49 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule50 #-}+ rule50 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule51 #-}+ rule51 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule52 #-}+ rule52 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule53 #-}+ rule53 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule54 #-}+ rule54 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule55 #-}+ rule55 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule56 #-}+ rule56 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule57 #-}+ rule57 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule58 #-}+ rule58 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule59 #-}+ rule59 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule60 #-}+ rule60 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule61 #-}+ rule61 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule62 #-}+ rule62 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule63 #-}+ rule63 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+{-# NOINLINE sem_EChildren_Nil #-}+sem_EChildren_Nil :: T_EChildren +sem_EChildren_Nil = T_EChildren (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_EChildren_v4 + v4 = \ (T_EChildren_vIn4 _lhsIallInitStates _lhsIcon _lhsIimportBlocks _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsItextBlocks) -> ( let+ _lhsOargnamesw :: [PP_Doc]+ _lhsOargnamesw = rule64 ()+ _lhsOargpats :: [PP_Doc] + _lhsOargpats = rule65 ()+ _lhsOargtps :: [PP_Doc] + _lhsOargtps = rule66 ()+ _lhsOchildTypes :: Map Identifier Type+ _lhsOchildTypes = rule67 ()+ _lhsOchildintros :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))+ _lhsOchildintros = rule68 ()+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule69 ()+ _lhsOterminaldefs :: Set String+ _lhsOterminaldefs = rule70 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule71 ()+ __result_ = T_EChildren_vOut4 _lhsOargnamesw _lhsOargpats _lhsOargtps _lhsOchildTypes _lhsOchildintros _lhsOdatatype _lhsOterminaldefs _lhsOusedArgs+ in __result_ )+ in C_EChildren_s5 v4+ {-# INLINE rule64 #-}+ rule64 = \ (_ :: ()) ->+ []+ {-# INLINE rule65 #-}+ rule65 = \ (_ :: ()) ->+ []+ {-# INLINE rule66 #-}+ rule66 = \ (_ :: ()) ->+ []+ {-# INLINE rule67 #-}+ rule67 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule68 #-}+ rule68 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule69 #-}+ rule69 = \ (_ :: ()) ->+ []+ {-# INLINE rule70 #-}+ rule70 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule71 #-}+ rule71 = \ (_ :: ()) ->+ Set.empty++-- ENonterminal ------------------------------------------------+-- wrapper+data Inh_ENonterminal = Inh_ENonterminal { allFromToStates_Inh_ENonterminal :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminal :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminal :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminal :: (Map VisitIdentifier (Set Identifier)), derivings_Inh_ENonterminal :: (Derivings), importBlocks_Inh_ENonterminal :: (PP_Doc), inhmap_Inh_ENonterminal :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminal :: (String), mainName_Inh_ENonterminal :: (String), moduleHeader_Inh_ENonterminal :: (String -> String -> String -> Bool -> String), options_Inh_ENonterminal :: (Options), pragmaBlocks_Inh_ENonterminal :: (String), synmap_Inh_ENonterminal :: (Map NontermIdent Attributes), textBlocks_Inh_ENonterminal :: (PP_Doc), typeSyns_Inh_ENonterminal :: (TypeSyns), wrappers_Inh_ENonterminal :: (Set NontermIdent) }+data Syn_ENonterminal = Syn_ENonterminal { appendCommon_Syn_ENonterminal :: ( PP_Doc ), appendMain_Syn_ENonterminal :: ( PP_Doc ), childvisit_Syn_ENonterminal :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_ENonterminal :: (Seq Error), fromToStates_Syn_ENonterminal :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_ENonterminal :: (IO ()), imports_Syn_ENonterminal :: ([PP_Doc]), initStates_Syn_ENonterminal :: (Map NontermIdent Int), output_Syn_ENonterminal :: (PP_Doc), semFunBndDefs_Syn_ENonterminal :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminal :: (Seq PP_Doc), visitKinds_Syn_ENonterminal :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminal :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_ENonterminal #-}+wrap_ENonterminal :: T_ENonterminal -> Inh_ENonterminal -> (Syn_ENonterminal )+wrap_ENonterminal (T_ENonterminal act) (Inh_ENonterminal _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers+ (T_ENonterminal_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminal_s8 sem arg)+ return (Syn_ENonterminal _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_ENonterminal #-}+sem_ENonterminal :: ENonterminal -> T_ENonterminal +sem_ENonterminal ( ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ prods_ recursive_ hoInfo_ ) = sem_ENonterminal_ENonterminal nt_ params_ classCtxs_ initial_ initialv_ nextVisits_ prevVisits_ ( sem_EProductions prods_ ) recursive_ hoInfo_++-- semantic domain+newtype T_ENonterminal = T_ENonterminal {+ attach_T_ENonterminal :: Identity (T_ENonterminal_s8 )+ }+newtype T_ENonterminal_s8 = C_ENonterminal_s8 {+ inv_ENonterminal_s8 :: (T_ENonterminal_v7 )+ }+data T_ENonterminal_s9 = C_ENonterminal_s9+type T_ENonterminal_v7 = (T_ENonterminal_vIn7 ) -> (T_ENonterminal_vOut7 )+data T_ENonterminal_vIn7 = T_ENonterminal_vIn7 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Derivings) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)+data T_ENonterminal_vOut7 = T_ENonterminal_vOut7 ( PP_Doc ) ( PP_Doc ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_ENonterminal_ENonterminal #-}+sem_ENonterminal_ENonterminal :: (NontermIdent) -> ([Identifier]) -> (ClassContext) -> (StateIdentifier) -> (Maybe VisitIdentifier) -> (Map StateIdentifier StateCtx) -> (Map StateIdentifier StateCtx) -> T_EProductions -> (Bool) -> (HigherOrderInfo) -> T_ENonterminal +sem_ENonterminal_ENonterminal arg_nt_ arg_params_ arg_classCtxs_ arg_initial_ arg_initialv_ arg_nextVisits_ arg_prevVisits_ arg_prods_ arg_recursive_ _ = T_ENonterminal (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_ENonterminal_v7 + v7 = \ (T_ENonterminal_vIn7 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let+ _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_prods_))+ (T_EProductions_vOut16 _prodsIallvisits _prodsIchildvisit _prodsIcount _prodsIdatatype _prodsIerrors _prodsIfromToStates _prodsIgenProdIO _prodsIimports _prodsIsemFunBndDefs _prodsIsemFunBndTps _prodsIsem_nt _prodsIsem_prod _prodsIt_visits _prodsIvisitKinds _prodsIvisitdefs _prodsIvisituses) = inv_EProductions_s17 _prodsX17 (T_EProductions_vIn16 _prodsOallFromToStates _prodsOallInhmap _prodsOallInitStates _prodsOallSynmap _prodsOallVisitKinds _prodsOallchildvisit _prodsOallstates _prodsOavisitdefs _prodsOavisituses _prodsOclassCtxs _prodsOimportBlocks _prodsOinhmap _prodsOinitial _prodsOlocalAttrTypes _prodsOmainFile _prodsOmainName _prodsOmoduleHeader _prodsOnextVisits _prodsOnt _prodsOntType _prodsOoptions _prodsOparams _prodsOpragmaBlocks _prodsOprevVisits _prodsOrename _prodsOsynmap _prodsOtextBlocks)+ _prodsOrename = rule72 _lhsIoptions+ _prodsOnt = rule73 arg_nt_+ _prodsOparams = rule74 arg_params_+ _prodsOclassCtxs = rule75 arg_classCtxs_+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule76 _datatype _hasWrapper _k_states _lhsIoptions _prodsIsem_prod _prodsIt_visits _sem_nt _t_init _t_states _wr_inh _wr_syn _wrapper arg_nt_+ _hasWrapper = rule77 _lhsIwrappers arg_nt_+ _classPP = rule78 arg_classCtxs_+ _aliasPre = rule79 _classPP _t_params arg_nt_+ _datatype = rule80 _aliasPre _classPP _derivings _lhsItypeSyns _prodsIdatatype _t_params arg_nt_+ _derivings = rule81 _lhsIderivings arg_nt_+ _fsemname = rule82 ()+ _semname = rule83 _fsemname arg_nt_+ _frecarg = rule84 _fsemname+ _sem_tp = rule85 _classPP _quantPP _t_params _t_type arg_nt_+ _quantPP = rule86 arg_params_+ _sem_nt = rule87 _frecarg _fsemname _lhsItypeSyns _prodsIsem_nt _semPragma _sem_tp _semname arg_nt_+ _inlineNt = rule88 _hasWrapper _lhsIoptions _prodsIcount arg_recursive_+ _semPragma = rule89 _inlineNt _lhsIoptions _semname+ (Just _prodsOinhmap) = rule90 _lhsIinhmap arg_nt_+ (Just _prodsOsynmap) = rule91 _lhsIsynmap arg_nt_+ _prodsOallInhmap = rule92 _lhsIinhmap+ _prodsOallSynmap = rule93 _lhsIsynmap+ _outedges = rule94 _prodsIallvisits+ _inedges = rule95 _prodsIallvisits+ _allstates = rule96 _inedges _outedges arg_initial_+ _stvisits = rule97 _prodsIallvisits+ _t_type = rule98 arg_nt_+ _t_params = rule99 arg_params_+ _t_init = rule100 _lhsIoptions _t_params _t_type arg_initial_+ _t_states = rule101 _allstates _t_params arg_nextVisits_ arg_nt_+ _k_type = rule102 arg_nt_+ _k_states = rule103 _allstates _k_type _prodsIallvisits _t_params _t_type arg_nextVisits_ arg_nt_+ _wr_inh = rule104 _genwrap _wr_inhs+ _wr_syn = rule105 _genwrap _wr_syns+ _genwrap = rule106 _addbang _t_params arg_nt_+ _synAttrs = rule107 _lhsIinhmap arg_nt_+ _wr_inhs = rule108 _synAttrs _wr_filter+ _wr_inhs1 = rule109 _synAttrs+ _wr_filter = rule110 _lhsIoptions+ _wr_syns = rule111 _lhsIsynmap arg_nt_+ _inhlist = rule112 _lhsIoptions _wr_inhs+ _inhlist1 = rule113 _lhsIoptions _wr_inhs1+ _synlist = rule114 _lhsIoptions _wr_syns+ _wrapname = rule115 arg_nt_+ _inhname = rule116 arg_nt_+ _synname = rule117 arg_nt_+ _firstVisitInfo = rule118 arg_initial_ arg_nextVisits_+ _wrapper = rule119 _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type _lhsIallVisitKinds _lhsImainName _lhsIoptions _quantPP _synlist _synname _t_params _t_type _wrapPragma _wrapname arg_initial_ arg_initialv_ arg_nt_+ _wrapPragma = rule120 _lhsIoptions _wrapname+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule121 _prodsIsemFunBndDefs _semFunBndDef+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule122 _prodsIsemFunBndTps _semFunBndTp+ _semFunBndDef = rule123 _semFunBndNm _semname+ _semFunBndTp = rule124 _semFunBndNm _sem_tp+ _semFunBndNm = rule125 arg_nt_+ _prodsOinitial = rule126 arg_initial_+ _prodsOallstates = rule127 _allstates+ _lhsOappendMain :: PP_Doc + _lhsOappendMain = rule128 _lhsIwrappers _sem_nt _wr_inh _wr_syn _wrapper arg_nt_+ _lhsOappendCommon :: PP_Doc + _lhsOappendCommon = rule129 _datatype _k_states _lhsIoptions _prodsIt_visits _t_init _t_states+ _addbang = rule130 _lhsIoptions+ _addbangWrap = rule131 ()+ _prodsOnextVisits = rule132 arg_nextVisits_+ _prodsOprevVisits = rule133 arg_prevVisits_+ _prodsOlocalAttrTypes = rule134 _lhsIlocalAttrTypes arg_nt_+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule135 arg_initial_ arg_nt_+ _ntType = rule136 arg_nt_ arg_params_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule137 _prodsIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule138 _prodsIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule139 _prodsIfromToStates+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule140 _prodsIgenProdIO+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule141 _prodsIimports+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule142 _prodsIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule143 _prodsIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule144 _prodsIvisituses+ _prodsOallFromToStates = rule145 _lhsIallFromToStates+ _prodsOallInitStates = rule146 _lhsIallInitStates+ _prodsOallVisitKinds = rule147 _lhsIallVisitKinds+ _prodsOallchildvisit = rule148 _lhsIallchildvisit+ _prodsOavisitdefs = rule149 _lhsIavisitdefs+ _prodsOavisituses = rule150 _lhsIavisituses+ _prodsOimportBlocks = rule151 _lhsIimportBlocks+ _prodsOmainFile = rule152 _lhsImainFile+ _prodsOmainName = rule153 _lhsImainName+ _prodsOmoduleHeader = rule154 _lhsImoduleHeader+ _prodsOntType = rule155 _ntType+ _prodsOoptions = rule156 _lhsIoptions+ _prodsOpragmaBlocks = rule157 _lhsIpragmaBlocks+ _prodsOtextBlocks = rule158 _lhsItextBlocks+ __result_ = T_ENonterminal_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminal_s8 v7+ {-# INLINE rule72 #-}+ {-# LINE 57 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule72 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 57 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rename _lhsIoptions+ {-# LINE 1047 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule73 #-}+ {-# LINE 65 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule73 = \ nt_ ->+ {-# LINE 65 "./src-ag/ExecutionPlan2Hs.ag" #-}+ nt_+ {-# LINE 1053 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule74 #-}+ {-# LINE 77 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule74 = \ params_ ->+ {-# LINE 77 "./src-ag/ExecutionPlan2Hs.ag" #-}+ params_+ {-# LINE 1059 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule75 #-}+ {-# LINE 81 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule75 = \ classCtxs_ ->+ {-# LINE 81 "./src-ag/ExecutionPlan2Hs.ag" #-}+ classCtxs_+ {-# LINE 1065 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule76 #-}+ {-# LINE 98 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule76 = \ _datatype _hasWrapper _k_states ((_lhsIoptions) :: Options) ((_prodsIsem_prod) :: PP_Doc) ((_prodsIt_visits) :: PP_Doc) _sem_nt _t_init _t_states _wr_inh _wr_syn _wrapper nt_ ->+ {-# LINE 98 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ("-- " ++ getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-')+ >-< (if dataTypes _lhsIoptions+ then "-- data"+ >-< _datatype+ >-< ""+ else empty)+ >-< (if _hasWrapper+ then "-- wrapper"+ >-< _wr_inh+ >-< _wr_syn+ >-< _wrapper+ >-< ""+ else empty)+ >-< (if folds _lhsIoptions+ then "-- cata"+ >-< _sem_nt+ >-< ""+ else empty)+ >-< (if semfuns _lhsIoptions+ then "-- semantic domain"+ >-< _t_init+ >-< _t_states+ >-< _k_states+ >-< _prodsIt_visits+ >-< _prodsIsem_prod+ >-< ""+ else empty)+ {-# LINE 1097 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule77 #-}+ {-# LINE 125 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule77 = \ ((_lhsIwrappers) :: Set NontermIdent) nt_ ->+ {-# LINE 125 "./src-ag/ExecutionPlan2Hs.ag" #-}+ nt_ `Set.member` _lhsIwrappers+ {-# LINE 1103 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule78 #-}+ {-# LINE 138 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule78 = \ classCtxs_ ->+ {-# LINE 138 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppClasses $ classCtxsToDocs classCtxs_+ {-# LINE 1109 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule79 #-}+ {-# LINE 139 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule79 = \ _classPP _t_params nt_ ->+ {-# LINE 139 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "type" >#< _classPP >#< nt_ >#< _t_params >#< "="+ {-# LINE 1115 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule80 #-}+ {-# LINE 140 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule80 = \ _aliasPre _classPP _derivings ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdatatype) :: [PP_Doc]) _t_params nt_ ->+ {-# LINE 140 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case lookup nt_ _lhsItypeSyns of+ Nothing -> "data" >#< _classPP >#< nt_ >#< _t_params+ >-< ( if null _prodsIdatatype+ then empty+ else indent 2 $ vlist $ ( ("=" >#< head _prodsIdatatype)+ : (map ("|" >#<) $ tail _prodsIdatatype))+ )+ >-< indent 2 _derivings+ Just (List t) -> _aliasPre >#< "[" >#< show t >#< "]"+ Just (Maybe t) -> _aliasPre >#< "Maybe" >#< pp_parens (show t)+ Just (Tuple ts) -> _aliasPre >#< pp_parens (ppCommas $ map (show . snd) ts)+ Just (Either l r) -> _aliasPre >#< "Either" >#< pp_parens (show l) >#< pp_parens (show r)+ Just (Map k v) -> _aliasPre >#< "Data.Map" >#< pp_parens (show k) >#< pp_parens (show v)+ Just (IntMap t) -> _aliasPre >#< "Data.IntMap.IntMap" >#< pp_parens (show t)+ Just (OrdSet t) -> _aliasPre >#< "Data.Set.Set" >#< pp_parens (show t)+ Just IntSet -> _aliasPre >#< "Data.IntSet.IntSet"+ {-# LINE 1136 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule81 #-}+ {-# LINE 157 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule81 = \ ((_lhsIderivings) :: Derivings) nt_ ->+ {-# LINE 157 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case Map.lookup nt_ _lhsIderivings of+ Nothing -> empty+ Just s -> if Set.null s+ then empty+ else "deriving" >#< (pp_parens $ ppCommas $ map pp $ Set.toList s)+ {-# LINE 1146 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule82 #-}+ {-# LINE 227 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule82 = \ (_ :: ()) ->+ {-# LINE 227 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> "sem_" ++ show x+ {-# LINE 1152 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule83 #-}+ {-# LINE 228 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule83 = \ _fsemname nt_ ->+ {-# LINE 228 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _fsemname nt_+ {-# LINE 1158 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule84 #-}+ {-# LINE 229 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule84 = \ _fsemname ->+ {-# LINE 229 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \t x -> case t of+ NT nt _ _ -> pp_parens (_fsemname nt >#< x)+ _ -> pp x+ {-# LINE 1166 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule85 #-}+ {-# LINE 235 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule85 = \ _classPP _quantPP _t_params _t_type nt_ ->+ {-# LINE 235 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _quantPP >#< _classPP >#< nt_ >#< _t_params >#< "->" >#< _t_type >#< _t_params+ {-# LINE 1172 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule86 #-}+ {-# LINE 236 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule86 = \ params_ ->+ {-# LINE 236 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppQuants params_+ {-# LINE 1178 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule87 #-}+ {-# LINE 237 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule87 = \ _frecarg _fsemname ((_lhsItypeSyns) :: TypeSyns) ((_prodsIsem_nt) :: PP_Doc) _semPragma _sem_tp _semname nt_ ->+ {-# LINE 237 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semPragma+ >-< _semname >#< "::" >#< _sem_tp+ >-< case lookup nt_ _lhsItypeSyns of+ Nothing -> _prodsIsem_nt+ Just (List t) -> _semname >#< "list" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Cons"+ >#< _semname >|< "_Nil"+ >#< case t of+ NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt >#< "list")+ _ -> pp "list"+ Just (Maybe t) -> _semname >#< "Prelude.Nothing" >#< "=" >#< _semname >|< "_Nothing"+ >-< _semname >#< pp_parens ("Prelude.Just just") >#< "="+ >#< _semname >|< "_Just" >#< _frecarg t "just"+ Just (Tuple ts) -> _semname >#< pp_parens (ppCommas $ map fst ts) >#< "="+ >#< _semname >|< "_Tuple" >#< ppSpaced (map (\t -> _frecarg (snd t) (show $ fst t)) ts)+ Just (Either l r) -> _semname >#< "(Prelude.Left left)" >#< "=" >#< _semname >|< "_Left" >#< _frecarg l "left"+ >-< _semname >#< "(Prelude.Right right)" >#< "=" >#< _semname >|< "_Right" >#< _frecarg r "right"+ Just (Map k v) -> _semname >#< "m" >#< "=" >#< "Data.Map.foldrWithKey"+ >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("Data.Map.map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ Just (IntMap v) -> _semname >#< "m" >#< "=" >#< "Data.IntMap.foldWithKey"+ >#< _semname >|< "_Entry" >#< _semname >|< "_Nil"+ >#< case v of+ NT nt _ _ -> pp_parens ("Data.IntMap.map" >#< _fsemname nt >#< "m")+ _ -> pp "m"+ Just (OrdSet t) -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"+ >#< _semname >|< "_Nil"+ >#< pp_parens (+ ( case t of+ NT nt _ _ -> pp_parens ("Prelude.map" >#< _fsemname nt)+ _ -> empty+ ) >#< pp_parens ("Data.IntSet.elems" >#< "s")+ )+ Just IntSet -> _semname >#< "s" >#< "=" >#< "Prelude.foldr" >#< _semname >|< "_Entry"+ >#< _semname >|< "_Nil"+ >#< pp_parens ("Data.IntSet.elems" >#< "s")+ {-# LINE 1220 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule88 #-}+ {-# LINE 277 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule88 = \ _hasWrapper ((_lhsIoptions) :: Options) ((_prodsIcount) :: Int) recursive_ ->+ {-# LINE 277 "./src-ag/ExecutionPlan2Hs.ag" #-}+ not (lateHigherOrderBinding _lhsIoptions) && not recursive_ && (_prodsIcount == 1 || (aggressiveInlinePragmas _lhsIoptions && not _hasWrapper ))+ {-# LINE 1226 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule89 #-}+ {-# LINE 278 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule89 = \ _inlineNt ((_lhsIoptions) :: Options) _semname ->+ {-# LINE 278 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if noInlinePragmas _lhsIoptions+ then empty+ else if _inlineNt+ then ppInline _semname+ else if helpInlining _lhsIoptions && not (lateHigherOrderBinding _lhsIoptions)+ then ppInlinable _semname+ else ppNoInline _semname+ {-# LINE 1238 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule90 #-}+ {-# LINE 324 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule90 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 324 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1244 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule91 #-}+ {-# LINE 325 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule91 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 325 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1250 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule92 #-}+ {-# LINE 326 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule92 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ {-# LINE 326 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIinhmap+ {-# LINE 1256 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule93 #-}+ {-# LINE 327 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule93 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ {-# LINE 327 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIsynmap+ {-# LINE 1262 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule94 #-}+ {-# LINE 348 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule94 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 348 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.fromList $ map (\(_,f,_) -> f) _prodsIallvisits+ {-# LINE 1268 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule95 #-}+ {-# LINE 349 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule95 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 349 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.fromList $ map (\(_,_,t) -> t) _prodsIallvisits+ {-# LINE 1274 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule96 #-}+ {-# LINE 350 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule96 = \ _inedges _outedges initial_ ->+ {-# LINE 350 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.insert initial_ $ _inedges `Set.union` _outedges+ {-# LINE 1280 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule97 #-}+ {-# LINE 351 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule97 = \ ((_prodsIallvisits) :: [VisitStateState]) ->+ {-# LINE 351 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _prodsIallvisits+ {-# LINE 1286 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule98 #-}+ {-# LINE 352 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule98 = \ nt_ ->+ {-# LINE 352 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "T_" >|< nt_+ {-# LINE 1292 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule99 #-}+ {-# LINE 353 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule99 = \ params_ ->+ {-# LINE 353 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced params_+ {-# LINE 1298 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule100 #-}+ {-# LINE 354 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule100 = \ ((_lhsIoptions) :: Options) _t_params _t_type initial_ ->+ {-# LINE 354 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "newtype" >#< _t_type >#< _t_params >#< "=" >#< _t_type >#<+ pp_braces (+ "attach_">|< _t_type >#< "::"+ >#< ppMonadType _lhsIoptions >#< pp_parens (_t_type >|< "_s" >|< initial_ >#< _t_params ))+ {-# LINE 1307 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule101 #-}+ {-# LINE 358 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule101 = \ _allstates _t_params nextVisits_ nt_ ->+ {-# LINE 358 "./src-ag/ExecutionPlan2Hs.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ t_st = "T_" >|< nt_st+ k_st = "K_" >|< nt_st+ c_st = "C_" >|< nt_st+ inv_st = "inv_" >|< nt_st+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ in case nextVisit of+ NoneVis -> "data" >#< t_st >#< _t_params >#< "=" >#< c_st+ OneVis vId -> "newtype" >#< t_st >#< _t_params >#< "=" >#< c_st+ >#< (pp_braces $ inv_st >#< "::" >#< pp_parens (conNmTVisit nt_ vId >#< _t_params ))+ ManyVis -> "data" >#< t_st >#< _t_params >#< "where" >#< c_st >#< "::"+ >#< (pp_braces $ inv_st >#< "::" >#< "!" >|< pp_parens ("forall t." >#< k_st >#< _t_params >#< "t" >#< "->" >#< "t"))+ >#< "->" >#< t_st >#< _t_params+ ) $ Set.toList _allstates+ {-# LINE 1327 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule102 #-}+ {-# LINE 376 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule102 = \ nt_ ->+ {-# LINE 376 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "K_" ++ show nt_+ {-# LINE 1333 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule103 #-}+ {-# LINE 377 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule103 = \ _allstates _k_type ((_prodsIallvisits) :: [VisitStateState]) _t_params _t_type nextVisits_ nt_ ->+ {-# LINE 377 "./src-ag/ExecutionPlan2Hs.ag" #-}+ vlist $ map (\st ->+ let nt_st = nt_ >|< "_s" >|< st+ k_st = "K_" >|< nt_st+ outg = filter (\(v,f,t) -> f == st) _prodsIallvisits+ visitlist = vlist $ map (\(v,f,t) ->+ _k_type >|< "_v" >|< v >#< "::" >#< k_st >#< _t_params >#< pp_parens (_t_type >|< "_v" >|< v >#< _t_params )+ ) outg+ nextVisit = Map.findWithDefault ManyVis st nextVisits_+ decl = "data" >#< k_st >#< "k" >#< _t_params >#< "where" >-< indent 3 visitlist+ in case nextVisit of+ NoneVis -> empty+ OneVis _ -> empty+ ManyVis -> decl+ ) $ Set.toList _allstates+ {-# LINE 1352 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule104 #-}+ {-# LINE 444 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule104 = \ _genwrap _wr_inhs ->+ {-# LINE 444 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _genwrap "Inh" _wr_inhs+ {-# LINE 1358 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule105 #-}+ {-# LINE 445 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule105 = \ _genwrap _wr_syns ->+ {-# LINE 445 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _genwrap "Syn" _wr_syns+ {-# LINE 1364 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule106 #-}+ {-# LINE 446 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule106 = \ _addbang _t_params nt_ ->+ {-# LINE 446 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \nm attr -> "data" >#< nm >|< "_" >|< nt_ >#< _t_params >#< "=" >#< nm >|< "_" >|< nt_ >#< "{"+ >#< (ppCommas $ map (\(i,t) -> i >|< "_" >|< nm >|< "_" >|< nt_ >#< "::"+ >#< (_addbang $ pp_parens $ typeToHaskellString (Just nt_) [] t)) attr) >#< "}"+ {-# LINE 1372 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule107 #-}+ {-# LINE 449 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule107 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 449 "./src-ag/ExecutionPlan2Hs.ag" #-}+ fromJust $ Map.lookup nt_ _lhsIinhmap+ {-# LINE 1378 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule108 #-}+ {-# LINE 450 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule108 = \ _synAttrs _wr_filter ->+ {-# LINE 450 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.toList $ _wr_filter $ _synAttrs+ {-# LINE 1384 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule109 #-}+ {-# LINE 451 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule109 = \ _synAttrs ->+ {-# LINE 451 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.toList _synAttrs+ {-# LINE 1390 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule110 #-}+ {-# LINE 452 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule110 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 452 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then Map.delete idLateBindingAttr+ else id+ {-# LINE 1398 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule111 #-}+ {-# LINE 455 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule111 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) nt_ ->+ {-# LINE 455 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.toList $ fromJust $ Map.lookup nt_ _lhsIsynmap+ {-# LINE 1404 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule112 #-}+ {-# LINE 456 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule112 = \ ((_lhsIoptions) :: Options) _wr_inhs ->+ {-# LINE 456 "./src-ag/ExecutionPlan2Hs.ag" #-}+ map (lhsname _lhsIoptions True . fst) _wr_inhs+ {-# LINE 1410 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule113 #-}+ {-# LINE 457 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule113 = \ ((_lhsIoptions) :: Options) _wr_inhs1 ->+ {-# LINE 457 "./src-ag/ExecutionPlan2Hs.ag" #-}+ map (lhsname _lhsIoptions True . fst) _wr_inhs1+ {-# LINE 1416 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule114 #-}+ {-# LINE 458 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule114 = \ ((_lhsIoptions) :: Options) _wr_syns ->+ {-# LINE 458 "./src-ag/ExecutionPlan2Hs.ag" #-}+ map (lhsname _lhsIoptions False . fst) _wr_syns+ {-# LINE 1422 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule115 #-}+ {-# LINE 459 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule115 = \ nt_ ->+ {-# LINE 459 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "wrap_" ++ show nt_+ {-# LINE 1428 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule116 #-}+ {-# LINE 460 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule116 = \ nt_ ->+ {-# LINE 460 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "Inh_" ++ show nt_+ {-# LINE 1434 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule117 #-}+ {-# LINE 461 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule117 = \ nt_ ->+ {-# LINE 461 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "Syn_" ++ show nt_+ {-# LINE 1440 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule118 #-}+ {-# LINE 462 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule118 = \ initial_ nextVisits_ ->+ {-# LINE 462 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault ManyVis initial_ nextVisits_+ {-# LINE 1446 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule119 #-}+ {-# LINE 463 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule119 = \ _addbang _addbangWrap _classPP _firstVisitInfo _inhlist _inhlist1 _inhname _k_type ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) _quantPP _synlist _synname _t_params _t_type _wrapPragma _wrapname initial_ initialv_ nt_ ->+ {-# LINE 463 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _wrapPragma+ >-< (_wrapname >#< "::" >#< _quantPP >#< _classPP >#< _t_type >#< _t_params >#< "->"+ >#< _inhname >#< _t_params >#< "->" >#< ( if monadicWrappers _lhsIoptions then ppMonadType _lhsIoptions else empty) >#< pp_parens (_synname >#< _t_params ))+ >-< (_wrapname >#< (_addbang $ pp_parens (_t_type >#< pp "act"))+ >#< (_addbang $ pp_parens (_inhname+ >#< (ppSpaced $ map (_addbangWrap . pp) _inhlist )) >#< "="))+ >-<+ indent 3 (case initialv_ of+ Nothing -> _synname >#< " { }"+ Just initv ->+ let inCon = conNmTVisitIn nt_ initv+ outCon = conNmTVisitOut nt_ initv+ pat = _addbang $ pp_parens $ pat0+ pat0 = outCon >#< ppSpaced _synlist+ arg = inCon >#< ppSpaced _inhlist1+ ind = case _firstVisitInfo of+ NoneVis -> error "wrapper: initial state should have a next visit but it has none"+ OneVis _ -> empty+ ManyVis -> _k_type >|< "_v" >|< initv+ extra = if dummyTokenVisit _lhsIoptions+ then pp $ dummyArg _lhsIoptions True+ else empty+ convert = case Map.lookup initv _lhsIallVisitKinds of+ Just kind -> case kind of+ VisitPure _ -> text "return"+ VisitMonadic -> empty+ unMonad | monadicWrappers _lhsIoptions = empty+ | otherwise = unMon _lhsIoptions+ in unMonad >#< "("+ >-< indent 2 (+ "do" >#< ( _addbang (pp "sem") >#< "<-" >#< "act"+ >-< "let" >#< _addbangWrap (pp "arg") >#< "=" >#< arg+ >-< pat >#< "<-" >#< convert >#< pp_parens ("inv_" >|< nt_ >|< "_s" >|< initial_ >#< "sem" >#< ind >#< "arg" >#< extra)+ >-< "return" >#< pp_parens (_synname >#< ppSpaced _synlist )+ )+ )+ >-< ")" )+ >-< if lateHigherOrderBinding _lhsIoptions+ then indent 2 ("where" >#< lhsname _lhsIoptions True idLateBindingAttr >#< "=" >#< lateBindingFieldNm _lhsImainName)+ else empty+ {-# LINE 1491 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule120 #-}+ {-# LINE 504 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule120 = \ ((_lhsIoptions) :: Options) _wrapname ->+ {-# LINE 504 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if parallelInvoke _lhsIoptions && not (monadicWrappers _lhsIoptions)+ then ppNoInline _wrapname+ else if noInlinePragmas _lhsIoptions+ then empty+ else ppInlinable _wrapname+ {-# LINE 1501 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule121 #-}+ {-# LINE 516 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule121 = \ ((_prodsIsemFunBndDefs) :: Seq PP_Doc) _semFunBndDef ->+ {-# LINE 516 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndDef Seq.<| _prodsIsemFunBndDefs+ {-# LINE 1507 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule122 #-}+ {-# LINE 517 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule122 = \ ((_prodsIsemFunBndTps) :: Seq PP_Doc) _semFunBndTp ->+ {-# LINE 517 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndTp Seq.<| _prodsIsemFunBndTps+ {-# LINE 1513 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule123 #-}+ {-# LINE 518 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule123 = \ _semFunBndNm _semname ->+ {-# LINE 518 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 1519 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule124 #-}+ {-# LINE 519 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule124 = \ _semFunBndNm _sem_tp ->+ {-# LINE 519 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "::" >#< _sem_tp+ {-# LINE 1525 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule125 #-}+ {-# LINE 520 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule125 = \ nt_ ->+ {-# LINE 520 "./src-ag/ExecutionPlan2Hs.ag" #-}+ lateSemNtLabel nt_+ {-# LINE 1531 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule126 #-}+ {-# LINE 558 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule126 = \ initial_ ->+ {-# LINE 558 "./src-ag/ExecutionPlan2Hs.ag" #-}+ initial_+ {-# LINE 1537 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule127 #-}+ {-# LINE 559 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule127 = \ _allstates ->+ {-# LINE 559 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _allstates+ {-# LINE 1543 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule128 #-}+ {-# LINE 1474 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule128 = \ ((_lhsIwrappers) :: Set NontermIdent) _sem_nt _wr_inh _wr_syn _wrapper nt_ ->+ {-# LINE 1474 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (if nt_ `Set.member` _lhsIwrappers+ then _wr_inh+ >-< _wr_syn+ >-< _wrapper+ else empty)+ >-< _sem_nt+ {-# LINE 1554 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule129 #-}+ {-# LINE 1480 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule129 = \ _datatype _k_states ((_lhsIoptions) :: Options) ((_prodsIt_visits) :: PP_Doc) _t_init _t_states ->+ {-# LINE 1480 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (if dataTypes _lhsIoptions then _datatype else empty)+ >-< _t_init+ >-< _t_states+ >-< _k_states+ >-< _prodsIt_visits+ {-# LINE 1564 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule130 #-}+ {-# LINE 1540 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule130 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1540 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 1570 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule131 #-}+ {-# LINE 1548 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule131 = \ (_ :: ()) ->+ {-# LINE 1548 "./src-ag/ExecutionPlan2Hs.ag" #-}+ id+ {-# LINE 1576 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule132 #-}+ {-# LINE 1560 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule132 = \ nextVisits_ ->+ {-# LINE 1560 "./src-ag/ExecutionPlan2Hs.ag" #-}+ nextVisits_+ {-# LINE 1582 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule133 #-}+ {-# LINE 1561 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule133 = \ prevVisits_ ->+ {-# LINE 1561 "./src-ag/ExecutionPlan2Hs.ag" #-}+ prevVisits_+ {-# LINE 1588 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule134 #-}+ {-# LINE 1605 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule134 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) nt_ ->+ {-# LINE 1605 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIlocalAttrTypes+ {-# LINE 1594 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule135 #-}+ {-# LINE 1632 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule135 = \ initial_ nt_ ->+ {-# LINE 1632 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton nt_ initial_+ {-# LINE 1600 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule136 #-}+ {-# LINE 1646 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule136 = \ nt_ params_ ->+ {-# LINE 1646 "./src-ag/ExecutionPlan2Hs.ag" #-}+ NT nt_ (map show params_) False+ {-# LINE 1606 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule137 #-}+ rule137 = \ ((_prodsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _prodsIchildvisit+ {-# INLINE rule138 #-}+ rule138 = \ ((_prodsIerrors) :: Seq Error) ->+ _prodsIerrors+ {-# INLINE rule139 #-}+ rule139 = \ ((_prodsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _prodsIfromToStates+ {-# INLINE rule140 #-}+ rule140 = \ ((_prodsIgenProdIO) :: IO ()) ->+ _prodsIgenProdIO+ {-# INLINE rule141 #-}+ rule141 = \ ((_prodsIimports) :: [PP_Doc]) ->+ _prodsIimports+ {-# INLINE rule142 #-}+ rule142 = \ ((_prodsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _prodsIvisitKinds+ {-# INLINE rule143 #-}+ rule143 = \ ((_prodsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _prodsIvisitdefs+ {-# INLINE rule144 #-}+ rule144 = \ ((_prodsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _prodsIvisituses+ {-# INLINE rule145 #-}+ rule145 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule146 #-}+ rule146 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule147 #-}+ rule147 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule148 #-}+ rule148 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule149 #-}+ rule149 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule150 #-}+ rule150 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule151 #-}+ rule151 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule152 #-}+ rule152 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule153 #-}+ rule153 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule154 #-}+ rule154 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule155 #-}+ rule155 = \ _ntType ->+ _ntType+ {-# INLINE rule156 #-}+ rule156 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule157 #-}+ rule157 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule158 #-}+ rule158 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks++-- ENonterminals -----------------------------------------------+-- wrapper+data Inh_ENonterminals = Inh_ENonterminals { allFromToStates_Inh_ENonterminals :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_ENonterminals :: (Map NontermIdent Int), allVisitKinds_Inh_ENonterminals :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_ENonterminals :: (Map VisitIdentifier (Set Identifier)), derivings_Inh_ENonterminals :: (Derivings), importBlocks_Inh_ENonterminals :: (PP_Doc), inhmap_Inh_ENonterminals :: (Map NontermIdent Attributes), localAttrTypes_Inh_ENonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainFile_Inh_ENonterminals :: (String), mainName_Inh_ENonterminals :: (String), moduleHeader_Inh_ENonterminals :: (String -> String -> String -> Bool -> String), options_Inh_ENonterminals :: (Options), pragmaBlocks_Inh_ENonterminals :: (String), synmap_Inh_ENonterminals :: (Map NontermIdent Attributes), textBlocks_Inh_ENonterminals :: (PP_Doc), typeSyns_Inh_ENonterminals :: (TypeSyns), wrappers_Inh_ENonterminals :: (Set NontermIdent) }+data Syn_ENonterminals = Syn_ENonterminals { appendCommon_Syn_ENonterminals :: ([PP_Doc]), appendMain_Syn_ENonterminals :: ([PP_Doc]), childvisit_Syn_ENonterminals :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_ENonterminals :: (Seq Error), fromToStates_Syn_ENonterminals :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_ENonterminals :: (IO ()), imports_Syn_ENonterminals :: ([PP_Doc]), initStates_Syn_ENonterminals :: (Map NontermIdent Int), output_Syn_ENonterminals :: (PP_Doc), semFunBndDefs_Syn_ENonterminals :: (Seq PP_Doc), semFunBndTps_Syn_ENonterminals :: (Seq PP_Doc), visitKinds_Syn_ENonterminals :: (Map VisitIdentifier VisitKind), visitdefs_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_ENonterminals :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_ENonterminals #-}+wrap_ENonterminals :: T_ENonterminals -> Inh_ENonterminals -> (Syn_ENonterminals )+wrap_ENonterminals (T_ENonterminals act) (Inh_ENonterminals _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers+ (T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_ENonterminals_s11 sem arg)+ return (Syn_ENonterminals _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_ENonterminals #-}+sem_ENonterminals :: ENonterminals -> T_ENonterminals +sem_ENonterminals list = Prelude.foldr sem_ENonterminals_Cons sem_ENonterminals_Nil (Prelude.map sem_ENonterminal list)++-- semantic domain+newtype T_ENonterminals = T_ENonterminals {+ attach_T_ENonterminals :: Identity (T_ENonterminals_s11 )+ }+newtype T_ENonterminals_s11 = C_ENonterminals_s11 {+ inv_ENonterminals_s11 :: (T_ENonterminals_v10 )+ }+data T_ENonterminals_s12 = C_ENonterminals_s12+type T_ENonterminals_v10 = (T_ENonterminals_vIn10 ) -> (T_ENonterminals_vOut10 )+data T_ENonterminals_vIn10 = T_ENonterminals_vIn10 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Derivings) (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (PP_Doc) (TypeSyns) (Set NontermIdent)+data T_ENonterminals_vOut10 = T_ENonterminals_vOut10 ([PP_Doc]) ([PP_Doc]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Map NontermIdent Int) (PP_Doc) (Seq PP_Doc) (Seq PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_ENonterminals_Cons #-}+sem_ENonterminals_Cons :: T_ENonterminal -> T_ENonterminals -> T_ENonterminals +sem_ENonterminals_Cons arg_hd_ arg_tl_ = T_ENonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_ENonterminals_v10 + v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let+ _hdX8 = Control.Monad.Identity.runIdentity (attach_T_ENonterminal (arg_hd_))+ _tlX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_tl_))+ (T_ENonterminal_vOut7 _hdIappendCommon _hdIappendMain _hdIchildvisit _hdIerrors _hdIfromToStates _hdIgenProdIO _hdIimports _hdIinitStates _hdIoutput _hdIsemFunBndDefs _hdIsemFunBndTps _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_ENonterminal_s8 _hdX8 (T_ENonterminal_vIn7 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOderivings _hdOimportBlocks _hdOinhmap _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOoptions _hdOpragmaBlocks _hdOsynmap _hdOtextBlocks _hdOtypeSyns _hdOwrappers)+ (T_ENonterminals_vOut10 _tlIappendCommon _tlIappendMain _tlIchildvisit _tlIerrors _tlIfromToStates _tlIgenProdIO _tlIimports _tlIinitStates _tlIoutput _tlIsemFunBndDefs _tlIsemFunBndTps _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_ENonterminals_s11 _tlX11 (T_ENonterminals_vIn10 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOderivings _tlOimportBlocks _tlOinhmap _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOoptions _tlOpragmaBlocks _tlOsynmap _tlOtextBlocks _tlOtypeSyns _tlOwrappers)+ _lhsOappendCommon :: [PP_Doc]+ _lhsOappendCommon = rule159 _hdIappendCommon _tlIappendCommon+ _lhsOappendMain :: [PP_Doc]+ _lhsOappendMain = rule160 _hdIappendMain _tlIappendMain+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule161 _hdIchildvisit _tlIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule162 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule163 _hdIfromToStates _tlIfromToStates+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule164 _hdIgenProdIO _tlIgenProdIO+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule165 _hdIimports _tlIimports+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule166 _hdIinitStates _tlIinitStates+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule167 _hdIoutput _tlIoutput+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule168 _hdIsemFunBndDefs _tlIsemFunBndDefs+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule169 _hdIsemFunBndTps _tlIsemFunBndTps+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule170 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule171 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule172 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule173 _lhsIallFromToStates+ _hdOallInitStates = rule174 _lhsIallInitStates+ _hdOallVisitKinds = rule175 _lhsIallVisitKinds+ _hdOallchildvisit = rule176 _lhsIallchildvisit+ _hdOavisitdefs = rule177 _lhsIavisitdefs+ _hdOavisituses = rule178 _lhsIavisituses+ _hdOderivings = rule179 _lhsIderivings+ _hdOimportBlocks = rule180 _lhsIimportBlocks+ _hdOinhmap = rule181 _lhsIinhmap+ _hdOlocalAttrTypes = rule182 _lhsIlocalAttrTypes+ _hdOmainFile = rule183 _lhsImainFile+ _hdOmainName = rule184 _lhsImainName+ _hdOmoduleHeader = rule185 _lhsImoduleHeader+ _hdOoptions = rule186 _lhsIoptions+ _hdOpragmaBlocks = rule187 _lhsIpragmaBlocks+ _hdOsynmap = rule188 _lhsIsynmap+ _hdOtextBlocks = rule189 _lhsItextBlocks+ _hdOtypeSyns = rule190 _lhsItypeSyns+ _hdOwrappers = rule191 _lhsIwrappers+ _tlOallFromToStates = rule192 _lhsIallFromToStates+ _tlOallInitStates = rule193 _lhsIallInitStates+ _tlOallVisitKinds = rule194 _lhsIallVisitKinds+ _tlOallchildvisit = rule195 _lhsIallchildvisit+ _tlOavisitdefs = rule196 _lhsIavisitdefs+ _tlOavisituses = rule197 _lhsIavisituses+ _tlOderivings = rule198 _lhsIderivings+ _tlOimportBlocks = rule199 _lhsIimportBlocks+ _tlOinhmap = rule200 _lhsIinhmap+ _tlOlocalAttrTypes = rule201 _lhsIlocalAttrTypes+ _tlOmainFile = rule202 _lhsImainFile+ _tlOmainName = rule203 _lhsImainName+ _tlOmoduleHeader = rule204 _lhsImoduleHeader+ _tlOoptions = rule205 _lhsIoptions+ _tlOpragmaBlocks = rule206 _lhsIpragmaBlocks+ _tlOsynmap = rule207 _lhsIsynmap+ _tlOtextBlocks = rule208 _lhsItextBlocks+ _tlOtypeSyns = rule209 _lhsItypeSyns+ _tlOwrappers = rule210 _lhsIwrappers+ __result_ = T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminals_s11 v10+ {-# INLINE rule159 #-}+ rule159 = \ ((_hdIappendCommon) :: PP_Doc ) ((_tlIappendCommon) :: [PP_Doc]) ->+ _hdIappendCommon : _tlIappendCommon+ {-# INLINE rule160 #-}+ rule160 = \ ((_hdIappendMain) :: PP_Doc ) ((_tlIappendMain) :: [PP_Doc]) ->+ _hdIappendMain : _tlIappendMain+ {-# INLINE rule161 #-}+ rule161 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule162 #-}+ rule162 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule163 #-}+ rule163 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule164 #-}+ rule164 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->+ _hdIgenProdIO >> _tlIgenProdIO+ {-# INLINE rule165 #-}+ rule165 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->+ _hdIimports ++ _tlIimports+ {-# INLINE rule166 #-}+ rule166 = \ ((_hdIinitStates) :: Map NontermIdent Int) ((_tlIinitStates) :: Map NontermIdent Int) ->+ _hdIinitStates `mappend` _tlIinitStates+ {-# INLINE rule167 #-}+ rule167 = \ ((_hdIoutput) :: PP_Doc) ((_tlIoutput) :: PP_Doc) ->+ _hdIoutput >-< _tlIoutput+ {-# INLINE rule168 #-}+ rule168 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# INLINE rule169 #-}+ rule169 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# INLINE rule170 #-}+ rule170 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule171 #-}+ rule171 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule172 #-}+ rule172 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule173 #-}+ rule173 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule174 #-}+ rule174 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule175 #-}+ rule175 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule176 #-}+ rule176 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule177 #-}+ rule177 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule178 #-}+ rule178 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule179 #-}+ rule179 = \ ((_lhsIderivings) :: Derivings) ->+ _lhsIderivings+ {-# INLINE rule180 #-}+ rule180 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule181 #-}+ rule181 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule182 #-}+ rule182 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule183 #-}+ rule183 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule184 #-}+ rule184 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule185 #-}+ rule185 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule186 #-}+ rule186 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule187 #-}+ rule187 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule188 #-}+ rule188 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule189 #-}+ rule189 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule190 #-}+ rule190 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule191 #-}+ rule191 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule192 #-}+ rule192 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule193 #-}+ rule193 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule194 #-}+ rule194 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule195 #-}+ rule195 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule196 #-}+ rule196 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule197 #-}+ rule197 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule198 #-}+ rule198 = \ ((_lhsIderivings) :: Derivings) ->+ _lhsIderivings+ {-# INLINE rule199 #-}+ rule199 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule200 #-}+ rule200 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule201 #-}+ rule201 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule202 #-}+ rule202 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule203 #-}+ rule203 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule204 #-}+ rule204 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule205 #-}+ rule205 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule206 #-}+ rule206 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule207 #-}+ rule207 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule208 #-}+ rule208 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule209 #-}+ rule209 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule210 #-}+ rule210 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_ENonterminals_Nil #-}+sem_ENonterminals_Nil :: T_ENonterminals +sem_ENonterminals_Nil = T_ENonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_ENonterminals_v10 + v10 = \ (T_ENonterminals_vIn10 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIderivings _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlocks _lhsItypeSyns _lhsIwrappers) -> ( let+ _lhsOappendCommon :: [PP_Doc]+ _lhsOappendCommon = rule211 ()+ _lhsOappendMain :: [PP_Doc]+ _lhsOappendMain = rule212 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule213 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule214 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule215 ()+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule216 ()+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule217 ()+ _lhsOinitStates :: Map NontermIdent Int+ _lhsOinitStates = rule218 ()+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule219 ()+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule220 ()+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule221 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule222 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule223 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule224 ()+ __result_ = T_ENonterminals_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOinitStates _lhsOoutput _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_ENonterminals_s11 v10+ {-# INLINE rule211 #-}+ rule211 = \ (_ :: ()) ->+ []+ {-# INLINE rule212 #-}+ rule212 = \ (_ :: ()) ->+ []+ {-# INLINE rule213 #-}+ rule213 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule214 #-}+ rule214 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule215 #-}+ rule215 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule216 #-}+ rule216 = \ (_ :: ()) ->+ return ()+ {-# INLINE rule217 #-}+ rule217 = \ (_ :: ()) ->+ []+ {-# INLINE rule218 #-}+ rule218 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule219 #-}+ rule219 = \ (_ :: ()) ->+ empty+ {-# INLINE rule220 #-}+ rule220 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule221 #-}+ rule221 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule222 #-}+ rule222 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule223 #-}+ rule223 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule224 #-}+ rule224 = \ (_ :: ()) ->+ Map.empty++-- EProduction -------------------------------------------------+-- wrapper+data Inh_EProduction = Inh_EProduction { allFromToStates_Inh_EProduction :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProduction :: (Map NontermIdent Attributes), allInitStates_Inh_EProduction :: (Map NontermIdent Int), allSynmap_Inh_EProduction :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProduction :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allstates_Inh_EProduction :: (Set StateIdentifier), avisitdefs_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProduction :: (Map VisitIdentifier (Set Identifier)), classCtxs_Inh_EProduction :: (ClassContext), importBlocks_Inh_EProduction :: (PP_Doc), inhmap_Inh_EProduction :: (Attributes), initial_Inh_EProduction :: (StateIdentifier), localAttrTypes_Inh_EProduction :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProduction :: (String), mainName_Inh_EProduction :: (String), moduleHeader_Inh_EProduction :: (String -> String -> String -> Bool -> String), nextVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), nt_Inh_EProduction :: (NontermIdent), ntType_Inh_EProduction :: (Type), options_Inh_EProduction :: (Options), params_Inh_EProduction :: ([Identifier]), pragmaBlocks_Inh_EProduction :: (String), prevVisits_Inh_EProduction :: (Map StateIdentifier StateCtx), rename_Inh_EProduction :: (Bool), synmap_Inh_EProduction :: (Attributes), textBlocks_Inh_EProduction :: (PP_Doc) }+data Syn_EProduction = Syn_EProduction { allvisits_Syn_EProduction :: ([VisitStateState]), childvisit_Syn_EProduction :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), count_Syn_EProduction :: (Int), datatype_Syn_EProduction :: (PP_Doc), errors_Syn_EProduction :: (Seq Error), fromToStates_Syn_EProduction :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_EProduction :: (IO ()), imports_Syn_EProduction :: ([PP_Doc]), semFunBndDefs_Syn_EProduction :: (Seq PP_Doc), semFunBndTps_Syn_EProduction :: (Seq PP_Doc), sem_nt_Syn_EProduction :: (PP_Doc), sem_prod_Syn_EProduction :: (PP_Doc), t_visits_Syn_EProduction :: (PP_Doc), visitKinds_Syn_EProduction :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProduction :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_EProduction #-}+wrap_EProduction :: T_EProduction -> Inh_EProduction -> (Syn_EProduction )+wrap_EProduction (T_EProduction act) (Inh_EProduction _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks+ (T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProduction_s14 sem arg)+ return (Syn_EProduction _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_EProduction #-}+sem_EProduction :: EProduction -> T_EProduction +sem_EProduction ( EProduction con_ params_ constraints_ rules_ children_ visits_ ) = sem_EProduction_EProduction con_ params_ constraints_ ( sem_ERules rules_ ) ( sem_EChildren children_ ) ( sem_Visits visits_ )++-- semantic domain+newtype T_EProduction = T_EProduction {+ attach_T_EProduction :: Identity (T_EProduction_s14 )+ }+newtype T_EProduction_s14 = C_EProduction_s14 {+ inv_EProduction_s14 :: (T_EProduction_v13 )+ }+data T_EProduction_s15 = C_EProduction_s15+type T_EProduction_v13 = (T_EProduction_vIn13 ) -> (T_EProduction_vOut13 )+data T_EProduction_vIn13 = T_EProduction_vIn13 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (String -> String -> String -> Bool -> String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (String) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)+data T_EProduction_vOut13 = T_EProduction_vOut13 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) (PP_Doc) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_EProduction_EProduction #-}+sem_EProduction_EProduction :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_ERules -> T_EChildren -> T_Visits -> T_EProduction +sem_EProduction_EProduction arg_con_ arg_params_ arg_constraints_ arg_rules_ arg_children_ arg_visits_ = T_EProduction (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_EProduction_v13 + v13 = \ (T_EProduction_vIn13 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let+ _rulesX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_rules_))+ _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_EChildren (arg_children_))+ _visitsX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_visits_))+ (T_ERules_vOut22 _rulesIerrors _rulesImrules _rulesIruledefs _rulesIruleuses _rulesIsem_rules _rulesIusedArgs) = inv_ERules_s23 _rulesX23 (T_ERules_vIn22 _rulesOallInhmap _rulesOallSynmap _rulesOchildTypes _rulesOcon _rulesOimportBlocks _rulesOinhmap _rulesOlazyIntras _rulesOlocalAttrTypes _rulesOmainFile _rulesOmainName _rulesOmoduleHeader _rulesOnt _rulesOoptions _rulesOpragmaBlocks _rulesOruleKinds _rulesOsynmap _rulesOtextBlocks _rulesOusageInfo)+ (T_EChildren_vOut4 _childrenIargnamesw _childrenIargpats _childrenIargtps _childrenIchildTypes _childrenIchildintros _childrenIdatatype _childrenIterminaldefs _childrenIusedArgs) = inv_EChildren_s5 _childrenX5 (T_EChildren_vIn4 _childrenOallInitStates _childrenOcon _childrenOimportBlocks _childrenOmainFile _childrenOmainName _childrenOmoduleHeader _childrenOnt _childrenOoptions _childrenOpragmaBlocks _childrenOtextBlocks)+ (T_Visits_vOut55 _visitsIallvisits _visitsIchildvisit _visitsIerrors _visitsIfromToStates _visitsIintramap _visitsIlazyIntras _visitsIruleKinds _visitsIruleUsage _visitsIsem_visit _visitsIt_visits _visitsIusedArgs _visitsIvisitKinds _visitsIvisitdefs _visitsIvisituses) = inv_Visits_s56 _visitsX56 (T_Visits_vIn55 _visitsOallFromToStates _visitsOallInhmap _visitsOallInitStates _visitsOallSynmap _visitsOallVisitKinds _visitsOallchildvisit _visitsOallintramap _visitsOavisitdefs _visitsOavisituses _visitsOchildTypes _visitsOchildintros _visitsOcon _visitsOinhmap _visitsOmrules _visitsOnextVisits _visitsOnt _visitsOoptions _visitsOparams _visitsOprevVisits _visitsOruledefs _visitsOruleuses _visitsOsynmap _visitsOterminaldefs)+ _childrenOcon = rule225 arg_con_+ _rulesOcon = rule226 arg_con_+ _visitsOcon = rule227 arg_con_+ _lhsOdatatype :: PP_Doc+ _lhsOdatatype = rule228 _childrenIdatatype _classPP1 _lhsInt _lhsIoptions _lhsIrename _quantPP1 arg_con_+ _classPP1 = rule229 arg_constraints_+ _quantPP1 = rule230 arg_params_+ _lhsOcount :: Int+ _lhsOcount = rule231 ()+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule232 _childrenIargnamesw _childrenIargpats _lhsInt _lhsIrename arg_con_+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule233 _semFunBndDef+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule234 _semFunBndTp+ _semFunBndDef = rule235 _semFunBndNm _semname+ _semFunBndTp = rule236 _semFunBndNm _sem_tp+ _semFunBndNm = rule237 _lhsInt arg_con_+ _t_type = rule238 _lhsInt+ _t_params = rule239 _lhsIparams+ _usedArgs = rule240 _childrenIusedArgs _rulesIusedArgs _visitsIusedArgs+ _args = rule241 _childrenIargpats _usedArgs+ _semname = rule242 _lhsInt arg_con_+ _sem_tp = rule243 _childrenIargtps _classPP2 _quantPP2 _t_params _t_type+ _classPP2 = rule244 _lhsIclassCtxs arg_constraints_+ _quantPP2 = rule245 _lhsIparams arg_params_+ _sem_prod = rule246 _args _lhsIinitial _mbInitializer _mkSemBody _outerlet _scc _semInlinePragma _sem_tp _semname _t_type+ _mkSemBody = rule247 ()+ _mbInitializer = rule248 _lhsIoptions+ _scc = rule249 _lhsIoptions _semname+ _semInlinePragma = rule250 _lhsIoptions _semname+ _outerlet = rule251 _rulesIsem_rules _statefns+ _statefns = rule252 _genstfn _lhsIallstates+ _genstfn = rule253 _addbang _lhsIinitial _lhsInextVisits _lhsInt _lhsIoptions _lhsIprevVisits _stargs _stks _stvs+ _stargs = rule254 _addbang _childTypes _lazyIntras _lhsIallInhmap _lhsIallSynmap _lhsIoptions _localAttrTypes _visitsIintramap+ _stks = rule255 _lhsInt _lhsIoptions _stvisits _t_params+ _stvisits = rule256 _visitsIallvisits+ _stvs = rule257 _visitsIsem_visit+ _visitsOmrules = rule258 _rulesImrules+ _visitsOchildintros = rule259 _childrenIchildintros+ _rulesOusageInfo = rule260 _visitsIruleUsage+ _rulesOruleKinds = rule261 _visitsIruleKinds+ _visitsOallintramap = rule262 _visitsIintramap+ _visitsOterminaldefs = rule263 _childrenIterminaldefs+ _visitsOruledefs = rule264 _rulesIruledefs+ _visitsOruleuses = rule265 _rulesIruleuses+ _lazyIntras = rule266 _visitsIlazyIntras+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule267 _moduleName+ _moduleName = rule268 _lhsImainName _suffix+ _suffix = rule269 _lhsInt arg_con_+ _outputfile = rule270 _lhsImainFile _suffix+ _ppMonadImports = rule271 _lhsIoptions+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule272 _lhsIimportBlocks _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _outputfile _ppMonadImports _sem_prod _semname _suffix+ _addbang = rule273 _lhsIoptions+ _childTypes = rule274 _childrenIchildTypes _lhsIntType+ _localAttrTypes = rule275 _lhsIlocalAttrTypes arg_con_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule276 _visitsIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule277 _rulesIerrors _visitsIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule278 _visitsIfromToStates+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule279 _visitsIt_visits+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule280 _visitsIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule281 _visitsIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule282 _visitsIvisituses+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule283 _visitsIallvisits+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule284 _sem_prod+ _rulesOallInhmap = rule285 _lhsIallInhmap+ _rulesOallSynmap = rule286 _lhsIallSynmap+ _rulesOchildTypes = rule287 _childTypes+ _rulesOimportBlocks = rule288 _lhsIimportBlocks+ _rulesOinhmap = rule289 _lhsIinhmap+ _rulesOlazyIntras = rule290 _lazyIntras+ _rulesOlocalAttrTypes = rule291 _localAttrTypes+ _rulesOmainFile = rule292 _lhsImainFile+ _rulesOmainName = rule293 _lhsImainName+ _rulesOmoduleHeader = rule294 _lhsImoduleHeader+ _rulesOnt = rule295 _lhsInt+ _rulesOoptions = rule296 _lhsIoptions+ _rulesOpragmaBlocks = rule297 _lhsIpragmaBlocks+ _rulesOsynmap = rule298 _lhsIsynmap+ _rulesOtextBlocks = rule299 _lhsItextBlocks+ _childrenOallInitStates = rule300 _lhsIallInitStates+ _childrenOimportBlocks = rule301 _lhsIimportBlocks+ _childrenOmainFile = rule302 _lhsImainFile+ _childrenOmainName = rule303 _lhsImainName+ _childrenOmoduleHeader = rule304 _lhsImoduleHeader+ _childrenOnt = rule305 _lhsInt+ _childrenOoptions = rule306 _lhsIoptions+ _childrenOpragmaBlocks = rule307 _lhsIpragmaBlocks+ _childrenOtextBlocks = rule308 _lhsItextBlocks+ _visitsOallFromToStates = rule309 _lhsIallFromToStates+ _visitsOallInhmap = rule310 _lhsIallInhmap+ _visitsOallInitStates = rule311 _lhsIallInitStates+ _visitsOallSynmap = rule312 _lhsIallSynmap+ _visitsOallVisitKinds = rule313 _lhsIallVisitKinds+ _visitsOallchildvisit = rule314 _lhsIallchildvisit+ _visitsOavisitdefs = rule315 _lhsIavisitdefs+ _visitsOavisituses = rule316 _lhsIavisituses+ _visitsOchildTypes = rule317 _childTypes+ _visitsOinhmap = rule318 _lhsIinhmap+ _visitsOnextVisits = rule319 _lhsInextVisits+ _visitsOnt = rule320 _lhsInt+ _visitsOoptions = rule321 _lhsIoptions+ _visitsOparams = rule322 _lhsIparams+ _visitsOprevVisits = rule323 _lhsIprevVisits+ _visitsOsynmap = rule324 _lhsIsynmap+ __result_ = T_EProduction_vOut13 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProduction_s14 v13+ {-# INLINE rule225 #-}+ {-# LINE 71 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule225 = \ con_ ->+ {-# LINE 71 "./src-ag/ExecutionPlan2Hs.ag" #-}+ con_+ {-# LINE 2188 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule226 #-}+ {-# LINE 72 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule226 = \ con_ ->+ {-# LINE 72 "./src-ag/ExecutionPlan2Hs.ag" #-}+ con_+ {-# LINE 2194 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule227 #-}+ {-# LINE 73 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule227 = \ con_ ->+ {-# LINE 73 "./src-ag/ExecutionPlan2Hs.ag" #-}+ con_+ {-# LINE 2200 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule228 #-}+ {-# LINE 186 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule228 = \ ((_childrenIdatatype) :: [PP_Doc]) _classPP1 ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIrename) :: Bool) _quantPP1 con_ ->+ {-# LINE 186 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _quantPP1 >#< _classPP1+ >#< conname _lhsIrename _lhsInt con_+ >#< ppConFields (dataRecords _lhsIoptions) _childrenIdatatype+ {-# LINE 2208 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule229 #-}+ {-# LINE 189 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule229 = \ constraints_ ->+ {-# LINE 189 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppClasses (classConstrsToDocs constraints_)+ {-# LINE 2214 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule230 #-}+ {-# LINE 190 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule230 = \ params_ ->+ {-# LINE 190 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppQuants params_+ {-# LINE 2220 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule231 #-}+ {-# LINE 288 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule231 = \ (_ :: ()) ->+ {-# LINE 288 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 1+ {-# LINE 2226 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule232 #-}+ {-# LINE 293 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule232 = \ ((_childrenIargnamesw) :: [PP_Doc]) ((_childrenIargpats) :: [PP_Doc] ) ((_lhsInt) :: NontermIdent) ((_lhsIrename) :: Bool) con_ ->+ {-# LINE 293 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "sem_" >|< _lhsInt >#< "(" >#< conname _lhsIrename _lhsInt con_ >#< ppSpaced _childrenIargpats >#< ")"+ >#< "=" >#< "sem_" >|< _lhsInt >|< "_" >|< con_ >#< ppSpaced _childrenIargnamesw+ {-# LINE 2233 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule233 #-}+ {-# LINE 523 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule233 = \ _semFunBndDef ->+ {-# LINE 523 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.singleton _semFunBndDef+ {-# LINE 2239 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule234 #-}+ {-# LINE 524 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule234 = \ _semFunBndTp ->+ {-# LINE 524 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Seq.singleton _semFunBndTp+ {-# LINE 2245 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule235 #-}+ {-# LINE 525 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule235 = \ _semFunBndNm _semname ->+ {-# LINE 525 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "=" >#< _semname+ {-# LINE 2251 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule236 #-}+ {-# LINE 526 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule236 = \ _semFunBndNm _sem_tp ->+ {-# LINE 526 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semFunBndNm >#< "::" >#< _sem_tp+ {-# LINE 2257 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule237 #-}+ {-# LINE 527 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule237 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 527 "./src-ag/ExecutionPlan2Hs.ag" #-}+ lateSemConLabel _lhsInt con_+ {-# LINE 2263 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule238 #-}+ {-# LINE 585 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule238 = \ ((_lhsInt) :: NontermIdent) ->+ {-# LINE 585 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "T_" >|< _lhsInt+ {-# LINE 2269 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule239 #-}+ {-# LINE 586 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule239 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 586 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced _lhsIparams+ {-# LINE 2275 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule240 #-}+ {-# LINE 587 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule240 = \ ((_childrenIusedArgs) :: Set String) ((_rulesIusedArgs) :: Set String) ((_visitsIusedArgs) :: Set String) ->+ {-# LINE 587 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _childrenIusedArgs `Set.union` _visitsIusedArgs `Set.union` _rulesIusedArgs+ {-# LINE 2281 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule241 #-}+ {-# LINE 590 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule241 = \ ((_childrenIargpats) :: [PP_Doc] ) _usedArgs ->+ {-# LINE 590 "./src-ag/ExecutionPlan2Hs.ag" #-}+ map (\x -> let (name,arg) = case show x of+ "" -> ("", empty)+ '!':name -> ("arg_" ++ name, "!arg_" >|< name)+ name -> ("arg_" ++ name, "arg_" >|< name)+ in if null name || name `Set.member` _usedArgs+ then arg+ else text "_") _childrenIargpats+ {-# LINE 2293 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule242 #-}+ {-# LINE 597 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule242 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 597 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "sem_" ++ show _lhsInt ++ "_" ++ show con_+ {-# LINE 2299 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule243 #-}+ {-# LINE 598 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule243 = \ ((_childrenIargtps) :: [PP_Doc] ) _classPP2 _quantPP2 _t_params _t_type ->+ {-# LINE 598 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _quantPP2 >#< _classPP2 >#< ppSpaced _childrenIargtps >#< _t_type >#< _t_params+ {-# LINE 2305 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule244 #-}+ {-# LINE 599 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule244 = \ ((_lhsIclassCtxs) :: ClassContext) constraints_ ->+ {-# LINE 599 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppClasses (classCtxsToDocs _lhsIclassCtxs ++ classConstrsToDocs constraints_)+ {-# LINE 2311 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule245 #-}+ {-# LINE 600 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule245 = \ ((_lhsIparams) :: [Identifier]) params_ ->+ {-# LINE 600 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppQuants (_lhsIparams ++ params_)+ {-# LINE 2317 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule246 #-}+ {-# LINE 601 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule246 = \ _args ((_lhsIinitial) :: StateIdentifier) _mbInitializer _mkSemBody _outerlet _scc _semInlinePragma _sem_tp _semname _t_type ->+ {-# LINE 601 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _semInlinePragma+ >-< _semname >#< "::" >#< _sem_tp+ >-< _mkSemBody (_semname >#< ppSpaced _args >#< "=" >#< _scc >#< _t_type )+ _mbInitializer _outerlet ("return" >#< "st" >|< _lhsIinitial)+ {-# LINE 2326 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule247 #-}+ {-# LINE 605 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule247 = \ (_ :: ()) ->+ {-# LINE 605 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \prefix mbInit outerlet ret ->+ case mbInit of+ Nothing -> prefix >#< pp_parens ret >#< "where"+ >-< indent 3 outerlet+ Just m -> prefix >#< "(" >#< "do"+ >-< indent 1 (+ m+ >-< "let"+ >-< indent 2 outerlet+ >-< ret )+ >-< indent 1 ")"+ {-# LINE 2342 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule248 #-}+ {-# LINE 617 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule248 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 617 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if parallelInvoke _lhsIoptions+ then (Nothing :: Maybe PP_Doc)+ else Nothing+ {-# LINE 2350 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule249 #-}+ {-# LINE 623 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule249 = \ ((_lhsIoptions) :: Options) _semname ->+ {-# LINE 623 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if genCostCentres _lhsIoptions+ then ppCostCentre _semname+ else empty+ {-# LINE 2358 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule250 #-}+ {-# LINE 626 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule250 = \ ((_lhsIoptions) :: Options) _semname ->+ {-# LINE 626 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if noInlinePragmas _lhsIoptions+ then empty+ else ppNoInline _semname+ {-# LINE 2366 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule251 #-}+ {-# LINE 629 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule251 = \ ((_rulesIsem_rules) :: PP_Doc) _statefns ->+ {-# LINE 629 "./src-ag/ExecutionPlan2Hs.ag" #-}+ vlist _statefns >-< _rulesIsem_rules+ {-# LINE 2372 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule252 #-}+ {-# LINE 630 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule252 = \ _genstfn ((_lhsIallstates) :: Set StateIdentifier) ->+ {-# LINE 630 "./src-ag/ExecutionPlan2Hs.ag" #-}+ map _genstfn $ Set.toList _lhsIallstates+ {-# LINE 2378 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule253 #-}+ {-# LINE 631 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule253 = \ _addbang ((_lhsIinitial) :: StateIdentifier) ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) _stargs _stks _stvs ->+ {-# LINE 631 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> let nextVisitInfo = Map.findWithDefault ManyVis st _lhsInextVisits+ prevVisitInfo = Map.findWithDefault ManyVis st _lhsIprevVisits+ stNm = "st" >|< st+ lhs = pragma >-< bang stNm >#< "=" >#<+ (+ if st == _lhsIinitial+ then empty+ else "\\" >#< _stargs st >#< "->"+ )+ pragma = if noInlinePragmas _lhsIoptions+ then empty+ else if helpInlining _lhsIoptions+ then case prevVisitInfo of+ ManyVis -> ppNoInline stNm+ OneVis _ -> if aggressiveInlinePragmas _lhsIoptions+ then ppInline stNm+ else ppInlinable stNm+ NoneVis -> if st /= _lhsIinitial+ then error ("State " ++ show st ++ " is not reachable from the initial state.")+ else if aggressiveInlinePragmas _lhsIoptions+ then ppInline stNm+ else ppInlinable stNm+ else ppNoInline stNm+ cCon = "C_" >|< _lhsInt >|< "_s" >|< st+ bang | st == _lhsIinitial = _addbang+ | otherwise = id+ in case nextVisitInfo of+ NoneVis ->+ if st == _lhsIinitial+ then lhs >#< cCon+ else empty+ OneVis vId -> mklet lhs (_stvs st False) (cCon >#< "v" >|< vId)+ ManyVis -> mklet lhs (_stks st >-< _stvs st True) (cCon >#< "k" >|< st)+ {-# LINE 2416 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule254 #-}+ {-# LINE 673 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule254 = \ _addbang _childTypes _lazyIntras ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIoptions) :: Options) _localAttrTypes ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 673 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> let attrs = maybe Map.empty id $ Map.lookup st _visitsIintramap+ in ppSpaced [ let match | str `Set.member` _lazyIntras = pp str+ | otherwise = _addbang (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _localAttrTypes of+ Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerStateTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _childTypes of+ Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs attrs+ ] >#< dummyPat _lhsIoptions (Map.null attrs)+ {-# LINE 2436 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule255 #-}+ {-# LINE 689 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule255 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _stvisits _t_params ->+ {-# LINE 689 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> if null (_stvisits st)+ then empty+ else ( if not (noInlinePragmas _lhsIoptions) && helpInlining _lhsIoptions+ then ppNoInline ("k" >|< st)+ else empty+ )+ >-< "k" >|< st >#< "::" >#< "K_" >|< _lhsInt >|< "_s" >|< st >#< _t_params >#< "t" >#< "->" >#< "t"+ >-< vlist (map (\(v,f,t) -> "k" >|< st >#< "K_" >|< _lhsInt >|< "_v" >|< v >#< "="+ >#< "v" >|< v) $ _stvisits st)+ {-# LINE 2450 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule256 #-}+ {-# LINE 698 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule256 = \ ((_visitsIallvisits) :: [VisitStateState]) ->+ {-# LINE 698 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \st -> filter (\(v,f,t) -> f == st) _visitsIallvisits+ {-# LINE 2456 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule257 #-}+ {-# LINE 699 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule257 = \ ((_visitsIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->+ {-# LINE 699 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \st inlinePragma -> vlist [ppf inlinePragma | (f,ppf) <- _visitsIsem_visit, f == st]+ {-# LINE 2462 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule258 #-}+ {-# LINE 700 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule258 = \ ((_rulesImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ {-# LINE 700 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesImrules+ {-# LINE 2468 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule259 #-}+ {-# LINE 915 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule259 = \ ((_childrenIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ {-# LINE 915 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _childrenIchildintros+ {-# LINE 2474 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule260 #-}+ {-# LINE 1270 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule260 = \ ((_visitsIruleUsage) :: Map Identifier Int) ->+ {-# LINE 1270 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIruleUsage+ {-# LINE 2480 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule261 #-}+ {-# LINE 1285 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule261 = \ ((_visitsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ {-# LINE 1285 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIruleKinds+ {-# LINE 2486 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule262 #-}+ {-# LINE 1314 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule262 = \ ((_visitsIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 1314 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIintramap+ {-# LINE 2492 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule263 #-}+ {-# LINE 1315 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule263 = \ ((_childrenIterminaldefs) :: Set String) ->+ {-# LINE 1315 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _childrenIterminaldefs+ {-# LINE 2498 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule264 #-}+ {-# LINE 1339 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule264 = \ ((_rulesIruledefs) :: Map Identifier (Set String)) ->+ {-# LINE 1339 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesIruledefs+ {-# LINE 2504 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule265 #-}+ {-# LINE 1340 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule265 = \ ((_rulesIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ {-# LINE 1340 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _rulesIruleuses+ {-# LINE 2510 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule266 #-}+ {-# LINE 1394 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule266 = \ ((_visitsIlazyIntras) :: Set String) ->+ {-# LINE 1394 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _visitsIlazyIntras+ {-# LINE 2516 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule267 #-}+ {-# LINE 1491 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule267 = \ _moduleName ->+ {-# LINE 1491 "./src-ag/ExecutionPlan2Hs.ag" #-}+ [pp $ "import " ++ _moduleName ]+ {-# LINE 2522 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule268 #-}+ {-# LINE 1492 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule268 = \ ((_lhsImainName) :: String) _suffix ->+ {-# LINE 1492 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainName ++ _suffix+ {-# LINE 2528 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule269 #-}+ {-# LINE 1493 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule269 = \ ((_lhsInt) :: NontermIdent) con_ ->+ {-# LINE 1493 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "_" ++ show _lhsInt ++ "_" ++ show con_+ {-# LINE 2534 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule270 #-}+ {-# LINE 1494 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule270 = \ ((_lhsImainFile) :: String) _suffix ->+ {-# LINE 1494 "./src-ag/ExecutionPlan2Hs.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ _suffix )+ {-# LINE 2540 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule271 #-}+ {-# LINE 1495 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule271 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1495 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if parallelInvoke _lhsIoptions+ then pp "import qualified System.IO.Unsafe(unsafePerformIO)"+ >-< pp "import System.IO(IO)"+ >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"+ else pp "import Control.Monad.Identity"+ {-# LINE 2550 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule272 #-}+ {-# LINE 1500 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule272 = \ ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptions) :: Options) ((_lhsIpragmaBlocks) :: String) _outputfile _ppMonadImports _sem_prod _semname _suffix ->+ {-# LINE 1500 "./src-ag/ExecutionPlan2Hs.ag" #-}+ writeModule _outputfile+ [ warrenFlagsPP _lhsIoptions+ , pp $ _lhsIpragmaBlocks+ , pp $ _lhsImoduleHeader _lhsImainName _suffix _semname True+ , _lhsIimportBlocks+ , _ppMonadImports+ , ( if tupleAsDummyToken _lhsIoptions+ then empty+ else pp "import GHC.Prim"+ )+ , pp $ "import " ++ _lhsImainName ++ "_common"+ , _sem_prod+ ]+ {-# LINE 2568 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule273 #-}+ {-# LINE 1541 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule273 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1541 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 2574 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule274 #-}+ {-# LINE 1591 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule274 = \ ((_childrenIchildTypes) :: Map Identifier Type) ((_lhsIntType) :: Type) ->+ {-# LINE 1591 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton _LHS _lhsIntType `Map.union` _childrenIchildTypes+ {-# LINE 2580 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule275 #-}+ {-# LINE 1608 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule275 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) con_ ->+ {-# LINE 1608 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIlocalAttrTypes+ {-# LINE 2586 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule276 #-}+ rule276 = \ ((_visitsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _visitsIchildvisit+ {-# INLINE rule277 #-}+ rule277 = \ ((_rulesIerrors) :: Seq Error) ((_visitsIerrors) :: Seq Error) ->+ _rulesIerrors Seq.>< _visitsIerrors+ {-# INLINE rule278 #-}+ rule278 = \ ((_visitsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _visitsIfromToStates+ {-# INLINE rule279 #-}+ rule279 = \ ((_visitsIt_visits) :: PP_Doc) ->+ _visitsIt_visits+ {-# INLINE rule280 #-}+ rule280 = \ ((_visitsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _visitsIvisitKinds+ {-# INLINE rule281 #-}+ rule281 = \ ((_visitsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _visitsIvisitdefs+ {-# INLINE rule282 #-}+ rule282 = \ ((_visitsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _visitsIvisituses+ {-# INLINE rule283 #-}+ rule283 = \ ((_visitsIallvisits) :: [VisitStateState]) ->+ _visitsIallvisits+ {-# INLINE rule284 #-}+ rule284 = \ _sem_prod ->+ _sem_prod+ {-# INLINE rule285 #-}+ rule285 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule286 #-}+ rule286 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule287 #-}+ rule287 = \ _childTypes ->+ _childTypes+ {-# INLINE rule288 #-}+ rule288 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule289 #-}+ rule289 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule290 #-}+ rule290 = \ _lazyIntras ->+ _lazyIntras+ {-# INLINE rule291 #-}+ rule291 = \ _localAttrTypes ->+ _localAttrTypes+ {-# INLINE rule292 #-}+ rule292 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule293 #-}+ rule293 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule294 #-}+ rule294 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule295 #-}+ rule295 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule296 #-}+ rule296 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule297 #-}+ rule297 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule298 #-}+ rule298 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule299 #-}+ rule299 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule300 #-}+ rule300 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule301 #-}+ rule301 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule302 #-}+ rule302 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule303 #-}+ rule303 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule304 #-}+ rule304 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule305 #-}+ rule305 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule306 #-}+ rule306 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule307 #-}+ rule307 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule308 #-}+ rule308 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule309 #-}+ rule309 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule310 #-}+ rule310 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule311 #-}+ rule311 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule312 #-}+ rule312 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule313 #-}+ rule313 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule314 #-}+ rule314 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule315 #-}+ rule315 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule316 #-}+ rule316 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule317 #-}+ rule317 = \ _childTypes ->+ _childTypes+ {-# INLINE rule318 #-}+ rule318 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule319 #-}+ rule319 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule320 #-}+ rule320 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule321 #-}+ rule321 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule322 #-}+ rule322 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule323 #-}+ rule323 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule324 #-}+ rule324 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap++-- EProductions ------------------------------------------------+-- wrapper+data Inh_EProductions = Inh_EProductions { allFromToStates_Inh_EProductions :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_EProductions :: (Map NontermIdent Attributes), allInitStates_Inh_EProductions :: (Map NontermIdent Int), allSynmap_Inh_EProductions :: (Map NontermIdent Attributes), allVisitKinds_Inh_EProductions :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allstates_Inh_EProductions :: (Set StateIdentifier), avisitdefs_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_EProductions :: (Map VisitIdentifier (Set Identifier)), classCtxs_Inh_EProductions :: (ClassContext), importBlocks_Inh_EProductions :: (PP_Doc), inhmap_Inh_EProductions :: (Attributes), initial_Inh_EProductions :: (StateIdentifier), localAttrTypes_Inh_EProductions :: (Map ConstructorIdent (Map Identifier Type)), mainFile_Inh_EProductions :: (String), mainName_Inh_EProductions :: (String), moduleHeader_Inh_EProductions :: (String -> String -> String -> Bool -> String), nextVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), nt_Inh_EProductions :: (NontermIdent), ntType_Inh_EProductions :: (Type), options_Inh_EProductions :: (Options), params_Inh_EProductions :: ([Identifier]), pragmaBlocks_Inh_EProductions :: (String), prevVisits_Inh_EProductions :: (Map StateIdentifier StateCtx), rename_Inh_EProductions :: (Bool), synmap_Inh_EProductions :: (Attributes), textBlocks_Inh_EProductions :: (PP_Doc) }+data Syn_EProductions = Syn_EProductions { allvisits_Syn_EProductions :: ([VisitStateState]), childvisit_Syn_EProductions :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), count_Syn_EProductions :: (Int), datatype_Syn_EProductions :: ([PP_Doc]), errors_Syn_EProductions :: (Seq Error), fromToStates_Syn_EProductions :: (Map VisitIdentifier (Int,Int)), genProdIO_Syn_EProductions :: (IO ()), imports_Syn_EProductions :: ([PP_Doc]), semFunBndDefs_Syn_EProductions :: (Seq PP_Doc), semFunBndTps_Syn_EProductions :: (Seq PP_Doc), sem_nt_Syn_EProductions :: (PP_Doc), sem_prod_Syn_EProductions :: (PP_Doc), t_visits_Syn_EProductions :: (PP_Doc), visitKinds_Syn_EProductions :: (Map VisitIdentifier VisitKind), visitdefs_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_EProductions :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_EProductions #-}+wrap_EProductions :: T_EProductions -> Inh_EProductions -> (Syn_EProductions )+wrap_EProductions (T_EProductions act) (Inh_EProductions _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks+ (T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_EProductions_s17 sem arg)+ return (Syn_EProductions _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_EProductions #-}+sem_EProductions :: EProductions -> T_EProductions +sem_EProductions list = Prelude.foldr sem_EProductions_Cons sem_EProductions_Nil (Prelude.map sem_EProduction list)++-- semantic domain+newtype T_EProductions = T_EProductions {+ attach_T_EProductions :: Identity (T_EProductions_s17 )+ }+newtype T_EProductions_s17 = C_EProductions_s17 {+ inv_EProductions_s17 :: (T_EProductions_v16 )+ }+data T_EProductions_s18 = C_EProductions_s18+type T_EProductions_v16 = (T_EProductions_vIn16 ) -> (T_EProductions_vOut16 )+data T_EProductions_vIn16 = T_EProductions_vIn16 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Set StateIdentifier) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (ClassContext) (PP_Doc) (Attributes) (StateIdentifier) (Map ConstructorIdent (Map Identifier Type)) (String) (String) (String -> String -> String -> Bool -> String) (Map StateIdentifier StateCtx) (NontermIdent) (Type) (Options) ([Identifier]) (String) (Map StateIdentifier StateCtx) (Bool) (Attributes) (PP_Doc)+data T_EProductions_vOut16 = T_EProductions_vOut16 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Int) ([PP_Doc]) (Seq Error) (Map VisitIdentifier (Int,Int)) (IO ()) ([PP_Doc]) (Seq PP_Doc) (Seq PP_Doc) (PP_Doc) (PP_Doc) (PP_Doc) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_EProductions_Cons #-}+sem_EProductions_Cons :: T_EProduction -> T_EProductions -> T_EProductions +sem_EProductions_Cons arg_hd_ arg_tl_ = T_EProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_EProductions_v16 + v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let+ _hdX14 = Control.Monad.Identity.runIdentity (attach_T_EProduction (arg_hd_))+ _tlX17 = Control.Monad.Identity.runIdentity (attach_T_EProductions (arg_tl_))+ (T_EProduction_vOut13 _hdIallvisits _hdIchildvisit _hdIcount _hdIdatatype _hdIerrors _hdIfromToStates _hdIgenProdIO _hdIimports _hdIsemFunBndDefs _hdIsemFunBndTps _hdIsem_nt _hdIsem_prod _hdIt_visits _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_EProduction_s14 _hdX14 (T_EProduction_vIn13 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallstates _hdOavisitdefs _hdOavisituses _hdOclassCtxs _hdOimportBlocks _hdOinhmap _hdOinitial _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnextVisits _hdOnt _hdOntType _hdOoptions _hdOparams _hdOpragmaBlocks _hdOprevVisits _hdOrename _hdOsynmap _hdOtextBlocks)+ (T_EProductions_vOut16 _tlIallvisits _tlIchildvisit _tlIcount _tlIdatatype _tlIerrors _tlIfromToStates _tlIgenProdIO _tlIimports _tlIsemFunBndDefs _tlIsemFunBndTps _tlIsem_nt _tlIsem_prod _tlIt_visits _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_EProductions_s17 _tlX17 (T_EProductions_vIn16 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallstates _tlOavisitdefs _tlOavisituses _tlOclassCtxs _tlOimportBlocks _tlOinhmap _tlOinitial _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnextVisits _tlOnt _tlOntType _tlOoptions _tlOparams _tlOpragmaBlocks _tlOprevVisits _tlOrename _tlOsynmap _tlOtextBlocks)+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule325 _hdIallvisits+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule326 _hdIt_visits+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule327 _hdIchildvisit _tlIchildvisit+ _lhsOcount :: Int+ _lhsOcount = rule328 _hdIcount _tlIcount+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule329 _hdIdatatype _tlIdatatype+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule330 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule331 _hdIfromToStates _tlIfromToStates+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule332 _hdIgenProdIO _tlIgenProdIO+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule333 _hdIimports _tlIimports+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule334 _hdIsemFunBndDefs _tlIsemFunBndDefs+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule335 _hdIsemFunBndTps _tlIsemFunBndTps+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule336 _hdIsem_nt _tlIsem_nt+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule337 _hdIsem_prod _tlIsem_prod+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule338 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule339 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule340 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule341 _lhsIallFromToStates+ _hdOallInhmap = rule342 _lhsIallInhmap+ _hdOallInitStates = rule343 _lhsIallInitStates+ _hdOallSynmap = rule344 _lhsIallSynmap+ _hdOallVisitKinds = rule345 _lhsIallVisitKinds+ _hdOallchildvisit = rule346 _lhsIallchildvisit+ _hdOallstates = rule347 _lhsIallstates+ _hdOavisitdefs = rule348 _lhsIavisitdefs+ _hdOavisituses = rule349 _lhsIavisituses+ _hdOclassCtxs = rule350 _lhsIclassCtxs+ _hdOimportBlocks = rule351 _lhsIimportBlocks+ _hdOinhmap = rule352 _lhsIinhmap+ _hdOinitial = rule353 _lhsIinitial+ _hdOlocalAttrTypes = rule354 _lhsIlocalAttrTypes+ _hdOmainFile = rule355 _lhsImainFile+ _hdOmainName = rule356 _lhsImainName+ _hdOmoduleHeader = rule357 _lhsImoduleHeader+ _hdOnextVisits = rule358 _lhsInextVisits+ _hdOnt = rule359 _lhsInt+ _hdOntType = rule360 _lhsIntType+ _hdOoptions = rule361 _lhsIoptions+ _hdOparams = rule362 _lhsIparams+ _hdOpragmaBlocks = rule363 _lhsIpragmaBlocks+ _hdOprevVisits = rule364 _lhsIprevVisits+ _hdOrename = rule365 _lhsIrename+ _hdOsynmap = rule366 _lhsIsynmap+ _hdOtextBlocks = rule367 _lhsItextBlocks+ _tlOallFromToStates = rule368 _lhsIallFromToStates+ _tlOallInhmap = rule369 _lhsIallInhmap+ _tlOallInitStates = rule370 _lhsIallInitStates+ _tlOallSynmap = rule371 _lhsIallSynmap+ _tlOallVisitKinds = rule372 _lhsIallVisitKinds+ _tlOallchildvisit = rule373 _lhsIallchildvisit+ _tlOallstates = rule374 _lhsIallstates+ _tlOavisitdefs = rule375 _lhsIavisitdefs+ _tlOavisituses = rule376 _lhsIavisituses+ _tlOclassCtxs = rule377 _lhsIclassCtxs+ _tlOimportBlocks = rule378 _lhsIimportBlocks+ _tlOinhmap = rule379 _lhsIinhmap+ _tlOinitial = rule380 _lhsIinitial+ _tlOlocalAttrTypes = rule381 _lhsIlocalAttrTypes+ _tlOmainFile = rule382 _lhsImainFile+ _tlOmainName = rule383 _lhsImainName+ _tlOmoduleHeader = rule384 _lhsImoduleHeader+ _tlOnextVisits = rule385 _lhsInextVisits+ _tlOnt = rule386 _lhsInt+ _tlOntType = rule387 _lhsIntType+ _tlOoptions = rule388 _lhsIoptions+ _tlOparams = rule389 _lhsIparams+ _tlOpragmaBlocks = rule390 _lhsIpragmaBlocks+ _tlOprevVisits = rule391 _lhsIprevVisits+ _tlOrename = rule392 _lhsIrename+ _tlOsynmap = rule393 _lhsIsynmap+ _tlOtextBlocks = rule394 _lhsItextBlocks+ __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProductions_s17 v16+ {-# INLINE rule325 #-}+ {-# LINE 343 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule325 = \ ((_hdIallvisits) :: [VisitStateState]) ->+ {-# LINE 343 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIallvisits+ {-# LINE 2870 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule326 #-}+ {-# LINE 396 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule326 = \ ((_hdIt_visits) :: PP_Doc) ->+ {-# LINE 396 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _hdIt_visits+ {-# LINE 2876 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule327 #-}+ rule327 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule328 #-}+ rule328 = \ ((_hdIcount) :: Int) ((_tlIcount) :: Int) ->+ _hdIcount + _tlIcount+ {-# INLINE rule329 #-}+ rule329 = \ ((_hdIdatatype) :: PP_Doc) ((_tlIdatatype) :: [PP_Doc]) ->+ _hdIdatatype : _tlIdatatype+ {-# INLINE rule330 #-}+ rule330 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule331 #-}+ rule331 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule332 #-}+ rule332 = \ ((_hdIgenProdIO) :: IO ()) ((_tlIgenProdIO) :: IO ()) ->+ _hdIgenProdIO >> _tlIgenProdIO+ {-# INLINE rule333 #-}+ rule333 = \ ((_hdIimports) :: [PP_Doc]) ((_tlIimports) :: [PP_Doc]) ->+ _hdIimports ++ _tlIimports+ {-# INLINE rule334 #-}+ rule334 = \ ((_hdIsemFunBndDefs) :: Seq PP_Doc) ((_tlIsemFunBndDefs) :: Seq PP_Doc) ->+ _hdIsemFunBndDefs Seq.>< _tlIsemFunBndDefs+ {-# INLINE rule335 #-}+ rule335 = \ ((_hdIsemFunBndTps) :: Seq PP_Doc) ((_tlIsemFunBndTps) :: Seq PP_Doc) ->+ _hdIsemFunBndTps Seq.>< _tlIsemFunBndTps+ {-# INLINE rule336 #-}+ rule336 = \ ((_hdIsem_nt) :: PP_Doc) ((_tlIsem_nt) :: PP_Doc) ->+ _hdIsem_nt >-< _tlIsem_nt+ {-# INLINE rule337 #-}+ rule337 = \ ((_hdIsem_prod) :: PP_Doc) ((_tlIsem_prod) :: PP_Doc) ->+ _hdIsem_prod >-< _tlIsem_prod+ {-# INLINE rule338 #-}+ rule338 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule339 #-}+ rule339 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule340 #-}+ rule340 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule341 #-}+ rule341 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule342 #-}+ rule342 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule343 #-}+ rule343 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule344 #-}+ rule344 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule345 #-}+ rule345 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule346 #-}+ rule346 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule347 #-}+ rule347 = \ ((_lhsIallstates) :: Set StateIdentifier) ->+ _lhsIallstates+ {-# INLINE rule348 #-}+ rule348 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule349 #-}+ rule349 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule350 #-}+ rule350 = \ ((_lhsIclassCtxs) :: ClassContext) ->+ _lhsIclassCtxs+ {-# INLINE rule351 #-}+ rule351 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule352 #-}+ rule352 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule353 #-}+ rule353 = \ ((_lhsIinitial) :: StateIdentifier) ->+ _lhsIinitial+ {-# INLINE rule354 #-}+ rule354 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule355 #-}+ rule355 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule356 #-}+ rule356 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule357 #-}+ rule357 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule358 #-}+ rule358 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule359 #-}+ rule359 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule360 #-}+ rule360 = \ ((_lhsIntType) :: Type) ->+ _lhsIntType+ {-# INLINE rule361 #-}+ rule361 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule362 #-}+ rule362 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule363 #-}+ rule363 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule364 #-}+ rule364 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule365 #-}+ rule365 = \ ((_lhsIrename) :: Bool) ->+ _lhsIrename+ {-# INLINE rule366 #-}+ rule366 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule367 #-}+ rule367 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule368 #-}+ rule368 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule369 #-}+ rule369 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule370 #-}+ rule370 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule371 #-}+ rule371 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule372 #-}+ rule372 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule373 #-}+ rule373 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule374 #-}+ rule374 = \ ((_lhsIallstates) :: Set StateIdentifier) ->+ _lhsIallstates+ {-# INLINE rule375 #-}+ rule375 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule376 #-}+ rule376 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule377 #-}+ rule377 = \ ((_lhsIclassCtxs) :: ClassContext) ->+ _lhsIclassCtxs+ {-# INLINE rule378 #-}+ rule378 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule379 #-}+ rule379 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule380 #-}+ rule380 = \ ((_lhsIinitial) :: StateIdentifier) ->+ _lhsIinitial+ {-# INLINE rule381 #-}+ rule381 = \ ((_lhsIlocalAttrTypes) :: Map ConstructorIdent (Map Identifier Type)) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule382 #-}+ rule382 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule383 #-}+ rule383 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule384 #-}+ rule384 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule385 #-}+ rule385 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule386 #-}+ rule386 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule387 #-}+ rule387 = \ ((_lhsIntType) :: Type) ->+ _lhsIntType+ {-# INLINE rule388 #-}+ rule388 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule389 #-}+ rule389 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule390 #-}+ rule390 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule391 #-}+ rule391 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule392 #-}+ rule392 = \ ((_lhsIrename) :: Bool) ->+ _lhsIrename+ {-# INLINE rule393 #-}+ rule393 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+{-# NOINLINE sem_EProductions_Nil #-}+sem_EProductions_Nil :: T_EProductions +sem_EProductions_Nil = T_EProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_EProductions_v16 + v16 = \ (T_EProductions_vIn16 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallstates _lhsIavisitdefs _lhsIavisituses _lhsIclassCtxs _lhsIimportBlocks _lhsIinhmap _lhsIinitial _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInextVisits _lhsInt _lhsIntType _lhsIoptions _lhsIparams _lhsIpragmaBlocks _lhsIprevVisits _lhsIrename _lhsIsynmap _lhsItextBlocks) -> ( let+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule395 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule396 ()+ _lhsOcount :: Int+ _lhsOcount = rule397 ()+ _lhsOdatatype :: [PP_Doc]+ _lhsOdatatype = rule398 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule399 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule400 ()+ _lhsOgenProdIO :: IO ()+ _lhsOgenProdIO = rule401 ()+ _lhsOimports :: [PP_Doc]+ _lhsOimports = rule402 ()+ _lhsOsemFunBndDefs :: Seq PP_Doc+ _lhsOsemFunBndDefs = rule403 ()+ _lhsOsemFunBndTps :: Seq PP_Doc+ _lhsOsemFunBndTps = rule404 ()+ _lhsOsem_nt :: PP_Doc+ _lhsOsem_nt = rule405 ()+ _lhsOsem_prod :: PP_Doc+ _lhsOsem_prod = rule406 ()+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule407 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule408 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule409 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule410 ()+ __result_ = T_EProductions_vOut16 _lhsOallvisits _lhsOchildvisit _lhsOcount _lhsOdatatype _lhsOerrors _lhsOfromToStates _lhsOgenProdIO _lhsOimports _lhsOsemFunBndDefs _lhsOsemFunBndTps _lhsOsem_nt _lhsOsem_prod _lhsOt_visits _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_EProductions_s17 v16+ {-# INLINE rule395 #-}+ {-# LINE 344 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule395 = \ (_ :: ()) ->+ {-# LINE 344 "./src-ag/ExecutionPlan2Hs.ag" #-}+ error "Every nonterminal should have at least 1 production"+ {-# LINE 3128 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule396 #-}+ rule396 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule397 #-}+ rule397 = \ (_ :: ()) ->+ 0+ {-# INLINE rule398 #-}+ rule398 = \ (_ :: ()) ->+ []+ {-# INLINE rule399 #-}+ rule399 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule400 #-}+ rule400 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule401 #-}+ rule401 = \ (_ :: ()) ->+ return ()+ {-# INLINE rule402 #-}+ rule402 = \ (_ :: ()) ->+ []+ {-# INLINE rule403 #-}+ rule403 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule404 #-}+ rule404 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule405 #-}+ rule405 = \ (_ :: ()) ->+ empty+ {-# INLINE rule406 #-}+ rule406 = \ (_ :: ()) ->+ empty+ {-# INLINE rule407 #-}+ rule407 = \ (_ :: ()) ->+ empty+ {-# INLINE rule408 #-}+ rule408 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule409 #-}+ rule409 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule410 #-}+ rule410 = \ (_ :: ()) ->+ Map.empty++-- ERule -------------------------------------------------------+-- wrapper+data Inh_ERule = Inh_ERule { allInhmap_Inh_ERule :: (Map NontermIdent Attributes), allSynmap_Inh_ERule :: (Map NontermIdent Attributes), childTypes_Inh_ERule :: (Map Identifier Type), con_Inh_ERule :: (ConstructorIdent), importBlocks_Inh_ERule :: (PP_Doc), inhmap_Inh_ERule :: (Attributes), lazyIntras_Inh_ERule :: (Set String), localAttrTypes_Inh_ERule :: (Map Identifier Type), mainFile_Inh_ERule :: (String), mainName_Inh_ERule :: (String), moduleHeader_Inh_ERule :: (String -> String -> String -> Bool -> String), nt_Inh_ERule :: (NontermIdent), options_Inh_ERule :: (Options), pragmaBlocks_Inh_ERule :: (String), ruleKinds_Inh_ERule :: (Map Identifier (Set VisitKind)), synmap_Inh_ERule :: (Attributes), textBlocks_Inh_ERule :: (PP_Doc), usageInfo_Inh_ERule :: (Map Identifier Int) }+data Syn_ERule = Syn_ERule { errors_Syn_ERule :: (Seq Error), mrules_Syn_ERule :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), ruledefs_Syn_ERule :: (Map Identifier (Set String)), ruleuses_Syn_ERule :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERule :: (PP_Doc), usedArgs_Syn_ERule :: (Set String) }+{-# INLINABLE wrap_ERule #-}+wrap_ERule :: T_ERule -> Inh_ERule -> (Syn_ERule )+wrap_ERule (T_ERule act) (Inh_ERule _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo+ (T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs) <- return (inv_ERule_s20 sem arg)+ return (Syn_ERule _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs)+ )++-- cata+{-# INLINE sem_ERule #-}+sem_ERule :: ERule -> T_ERule +sem_ERule ( ERule name_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ mbError_ ) = sem_ERule_ERule name_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ mbError_++-- semantic domain+newtype T_ERule = T_ERule {+ attach_T_ERule :: Identity (T_ERule_s20 )+ }+newtype T_ERule_s20 = C_ERule_s20 {+ inv_ERule_s20 :: (T_ERule_v19 )+ }+data T_ERule_s21 = C_ERule_s21+type T_ERule_v19 = (T_ERule_vIn19 ) -> (T_ERule_vOut19 )+data T_ERule_vIn19 = T_ERule_vIn19 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)+data T_ERule_vOut19 = T_ERule_vOut19 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)+{-# NOINLINE sem_ERule_ERule #-}+sem_ERule_ERule :: (Identifier) -> T_Pattern -> T_Expression -> (Bool) -> (String) -> (Bool) -> (Bool) -> (Maybe Error) -> T_ERule +sem_ERule_ERule arg_name_ arg_pattern_ arg_rhs_ _ _ arg_explicit_ arg_pure_ arg_mbError_ = T_ERule (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_ERule_v19 + v19 = \ (T_ERule_vIn19 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let+ _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))+ _rhsX29 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))+ (T_Pattern_vOut40 _patternIattrTypes _patternIattrs _patternIcopy _patternIisUnderscore _patternIsem_lhs) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 _patternOallInhmap _patternOallSynmap _patternOanyLazyKind _patternOinhmap _patternOlocalAttrTypes _patternOoptions _patternOsynmap)+ (T_Expression_vOut28 _rhsIattrs _rhsIpos _rhsIsemfunc _rhsItks) = inv_Expression_s29 _rhsX29 (T_Expression_vIn28 _rhsOoptions)+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule411 _usedArgs_augmented_f1 _usedArgs_augmented_syn+ _usedArgs_augmented_f1 = rule412 _rhsIattrs+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule413 _rulePragma _rulecode _used+ _rulecode = rule414 _endpragma _genpragma _lambda _pragma _rhsIpos _rhsIsemfunc _scc+ _rulePragma = rule415 _lhsIoptions _used arg_explicit_ arg_name_+ _scc = rule416 _lhsIcon _lhsInt _lhsIoptions _rhsIpos arg_explicit_ arg_name_ arg_pure_+ _pragma = rule417 _rhsIpos+ _endpragma = rule418 _lhsImainFile+ _genpragma = rule419 _haspos _lhsIoptions arg_explicit_+ _haspos = rule420 _rhsIpos+ _lambda = rule421 _argPats _lhsIoptions _rhsIattrs arg_name_+ _argPats = rule422 _addbang1 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIlazyIntras _lhsIlocalAttrTypes _lhsIoptions _rhsIattrs+ _argExprs = rule423 _rhsIattrs+ _stepcode = rule424 _argExprs _lhsIoptions _patternIattrTypes _patternIsem_lhs _rhsIattrs arg_name_ arg_pure_+ _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ _lhsOmrules = rule425 _stepcode arg_name_+ _used = rule426 _lhsIusageInfo arg_name_+ _kinds = rule427 _lhsIruleKinds arg_name_+ _anyLazyKind = rule428 _kinds+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule429 _patternIattrs arg_name_+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule430 _rhsIattrs arg_name_+ _addbang = rule431 _lhsIoptions+ _addbang1 = rule432 _addbang _anyLazyKind+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule433 _used arg_mbError_+ _usedArgs_augmented_syn = rule434 ()+ _patternOallInhmap = rule435 _lhsIallInhmap+ _patternOallSynmap = rule436 _lhsIallSynmap+ _patternOanyLazyKind = rule437 _anyLazyKind+ _patternOinhmap = rule438 _lhsIinhmap+ _patternOlocalAttrTypes = rule439 _lhsIlocalAttrTypes+ _patternOoptions = rule440 _lhsIoptions+ _patternOsynmap = rule441 _lhsIsynmap+ _rhsOoptions = rule442 _lhsIoptions+ __result_ = T_ERule_vOut19 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs+ in __result_ )+ in C_ERule_s20 v19+ {-# INLINE rule411 #-}+ rule411 = \ _usedArgs_augmented_f1 _usedArgs_augmented_syn ->+ foldr ($) _usedArgs_augmented_syn [_usedArgs_augmented_f1]+ {-# INLINE rule412 #-}+ rule412 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ Set.union $ Map.keysSet $ Map.mapKeys (\a -> "arg_" ++ a) $ Map.filter isNothing _rhsIattrs+ {-# INLINE rule413 #-}+ {-# LINE 984 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule413 = \ _rulePragma _rulecode _used ->+ {-# LINE 984 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _used == 0+ then empty+ else _rulePragma >-< _rulecode+ {-# LINE 3270 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule414 #-}+ {-# LINE 987 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule414 = \ _endpragma _genpragma _lambda _pragma ((_rhsIpos) :: Pos) ((_rhsIsemfunc) :: PP_Doc) _scc ->+ {-# LINE 987 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ( if _genpragma+ then _pragma+ else empty+ )+ >-< _lambda >#< _scc+ >-< indent ((column _rhsIpos - 2) `max` 2)+ ( if _genpragma+ then _pragma >-< _rhsIsemfunc >-< _endpragma+ else _rhsIsemfunc+ )+ {-# LINE 3285 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule415 #-}+ {-# LINE 999 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule415 = \ ((_lhsIoptions) :: Options) _used explicit_ name_ ->+ {-# LINE 999 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ( let reallyInlineStr = "INLINE"+ reallyNoInlineStr = "NOINLINE"+ in if noInlinePragmas _lhsIoptions+ then empty+ else if _used == 1+ then ppPragmaBinding reallyInlineStr name_+ else if helpInlining _lhsIoptions+ then if not explicit_ && _used <= reallyOftenUsedThreshold+ then ppPragmaBinding "INLINE[1]" name_+ else if _used > ruleInlineThresholdSoft && explicit_+ then if _used > ruleInlineThresholdHard+ then ppPragmaBinding reallyNoInlineStr name_+ else if aggressiveInlinePragmas _lhsIoptions+ then ppPragmaBinding "NOINLINE[2]" name_+ else ppNoInline name_+ else if aggressiveInlinePragmas _lhsIoptions+ then ppPragmaBinding "NOINLINE[1]" name_+ else ppNoInline name_+ else if not explicit_ || _used <= ruleInlineThresholdSoft+ then ppPragmaBinding "NOINLINE[1]" name_+ else ppNoInline name_+ )+ {-# LINE 3312 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule416 #-}+ {-# LINE 1021 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule416 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_rhsIpos) :: Pos) explicit_ name_ pure_ ->+ {-# LINE 1021 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if genCostCentres _lhsIoptions && explicit_ && pure_ && not (noPerRuleCostCentres _lhsIoptions)+ then ppCostCentre (name_ >|< "_" >|< line _rhsIpos >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)+ else empty+ {-# LINE 3320 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule417 #-}+ {-# LINE 1024 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule417 = \ ((_rhsIpos) :: Pos) ->+ {-# LINE 1024 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "{-# LINE" >#< show (line _rhsIpos) >#< show (file _rhsIpos) >#< "#-}"+ {-# LINE 3326 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule418 #-}+ {-# LINE 1025 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule418 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 1025 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppWithLineNr (\ln -> "{-# LINE " ++ show (ln+1) ++ " " ++ show _lhsImainFile ++ "#-}")+ {-# LINE 3332 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule419 #-}+ {-# LINE 1026 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule419 = \ _haspos ((_lhsIoptions) :: Options) explicit_ ->+ {-# LINE 1026 "./src-ag/ExecutionPlan2Hs.ag" #-}+ genLinePragmas _lhsIoptions && explicit_ && _haspos+ {-# LINE 3338 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule420 #-}+ {-# LINE 1027 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule420 = \ ((_rhsIpos) :: Pos) ->+ {-# LINE 1027 "./src-ag/ExecutionPlan2Hs.ag" #-}+ line _rhsIpos > 0 && column _rhsIpos >= 0 && not (null (file _rhsIpos))+ {-# LINE 3344 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule421 #-}+ {-# LINE 1036 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule421 = \ _argPats ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->+ {-# LINE 1036 "./src-ag/ExecutionPlan2Hs.ag" #-}+ name_ >#< "=" >#< "\\" >#< _argPats >#< dummyPat _lhsIoptions (Map.null _rhsIattrs) >#< "->"+ {-# LINE 3350 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule422 #-}+ {-# LINE 1038 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule422 = \ _addbang1 ((_lhsIallInhmap) :: Map NontermIdent Attributes) ((_lhsIallSynmap) :: Map NontermIdent Attributes) ((_lhsIchildTypes) :: Map Identifier Type) ((_lhsIlazyIntras) :: Set String) ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIoptions) :: Options) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ {-# LINE 1038 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced [ let match | str `Set.member` _lhsIlazyIntras = pp str+ | otherwise = _addbang1 (pp str)+ in case mbAttr of+ Just (AttrSyn child nm) | child == _LOC && not (noPerStateTypeSigs _lhsIoptions) ->+ case Map.lookup nm _lhsIlocalAttrTypes of+ Just tp -> pp_parens (pp_parens match >#< "::" >#< ppTp tp)+ Nothing -> match+ Just attr | not (noPerRuleTypeSigs _lhsIoptions) ->+ case lookupAttrType attr _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes of+ Just tpDoc -> pp_parens (pp_parens match >#< "::" >#< tpDoc)+ Nothing -> match+ _ -> match+ | (str,mbAttr) <- Map.assocs _rhsIattrs+ ]+ {-# LINE 3369 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule423 #-}+ {-# LINE 1052 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule423 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) ->+ {-# LINE 1052 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced [ case mbAttr of+ Nothing -> "arg_" >|< str+ _ -> text str+ | (str,mbAttr) <- Map.assocs _rhsIattrs+ ]+ {-# LINE 3379 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule424 #-}+ {-# LINE 1057 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule424 = \ _argExprs ((_lhsIoptions) :: Options) ((_patternIattrTypes) :: PP_Doc) ((_patternIsem_lhs) :: PP_Doc ) ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ pure_ ->+ {-# LINE 1057 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \kind fmtMode -> if kind `compatibleRule` pure_+ then Right $ let oper | pure_ = "="+ | otherwise = "<-"+ decl = _patternIsem_lhs >#< oper >#< name_ >#< _argExprs >#< dummyArg _lhsIoptions (Map.null _rhsIattrs)+ tp = if pure_ && not (noPerRuleTypeSigs _lhsIoptions)+ then _patternIattrTypes+ else empty+ in fmtDecl pure_ fmtMode (tp >-< decl)+ else Left $ IncompatibleRuleKind name_ kind+ {-# LINE 3393 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule425 #-}+ {-# LINE 1067 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule425 = \ _stepcode name_ ->+ {-# LINE 1067 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _stepcode+ {-# LINE 3399 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule426 #-}+ {-# LINE 1272 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule426 = \ ((_lhsIusageInfo) :: Map Identifier Int) name_ ->+ {-# LINE 1272 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault 0 name_ _lhsIusageInfo+ {-# LINE 3405 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule427 #-}+ {-# LINE 1288 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule427 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) name_ ->+ {-# LINE 1288 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault Set.empty name_ _lhsIruleKinds+ {-# LINE 3411 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule428 #-}+ {-# LINE 1289 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule428 = \ _kinds ->+ {-# LINE 1289 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.fold (\k r -> isLazyKind k || r) False _kinds+ {-# LINE 3417 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule429 #-}+ {-# LINE 1335 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule429 = \ ((_patternIattrs) :: Set String) name_ ->+ {-# LINE 1335 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _patternIattrs+ {-# LINE 3423 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule430 #-}+ {-# LINE 1336 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule430 = \ ((_rhsIattrs) :: Map String (Maybe NonLocalAttr)) name_ ->+ {-# LINE 1336 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ _rhsIattrs+ {-# LINE 3429 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule431 #-}+ {-# LINE 1538 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule431 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1538 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 3435 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule432 #-}+ {-# LINE 1549 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule432 = \ _addbang _anyLazyKind ->+ {-# LINE 1549 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _anyLazyKind then id else _addbang+ {-# LINE 3441 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule433 #-}+ {-# LINE 1655 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule433 = \ _used mbError_ ->+ {-# LINE 1655 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case mbError_ of+ Just e | _used > 0 -> Seq.singleton e+ _ -> Seq.empty+ {-# LINE 3449 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule434 #-}+ rule434 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule435 #-}+ rule435 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule436 #-}+ rule436 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule437 #-}+ rule437 = \ _anyLazyKind ->+ _anyLazyKind+ {-# INLINE rule438 #-}+ rule438 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule439 #-}+ rule439 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule440 #-}+ rule440 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule441 #-}+ rule441 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule442 #-}+ rule442 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- ERules ------------------------------------------------------+-- wrapper+data Inh_ERules = Inh_ERules { allInhmap_Inh_ERules :: (Map NontermIdent Attributes), allSynmap_Inh_ERules :: (Map NontermIdent Attributes), childTypes_Inh_ERules :: (Map Identifier Type), con_Inh_ERules :: (ConstructorIdent), importBlocks_Inh_ERules :: (PP_Doc), inhmap_Inh_ERules :: (Attributes), lazyIntras_Inh_ERules :: (Set String), localAttrTypes_Inh_ERules :: (Map Identifier Type), mainFile_Inh_ERules :: (String), mainName_Inh_ERules :: (String), moduleHeader_Inh_ERules :: (String -> String -> String -> Bool -> String), nt_Inh_ERules :: (NontermIdent), options_Inh_ERules :: (Options), pragmaBlocks_Inh_ERules :: (String), ruleKinds_Inh_ERules :: (Map Identifier (Set VisitKind)), synmap_Inh_ERules :: (Attributes), textBlocks_Inh_ERules :: (PP_Doc), usageInfo_Inh_ERules :: (Map Identifier Int) }+data Syn_ERules = Syn_ERules { errors_Syn_ERules :: (Seq Error), mrules_Syn_ERules :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), ruledefs_Syn_ERules :: (Map Identifier (Set String)), ruleuses_Syn_ERules :: (Map Identifier (Map String (Maybe NonLocalAttr))), sem_rules_Syn_ERules :: (PP_Doc), usedArgs_Syn_ERules :: (Set String) }+{-# INLINABLE wrap_ERules #-}+wrap_ERules :: T_ERules -> Inh_ERules -> (Syn_ERules )+wrap_ERules (T_ERules act) (Inh_ERules _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo+ (T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs) <- return (inv_ERules_s23 sem arg)+ return (Syn_ERules _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs)+ )++-- cata+{-# NOINLINE sem_ERules #-}+sem_ERules :: ERules -> T_ERules +sem_ERules list = Prelude.foldr sem_ERules_Cons sem_ERules_Nil (Prelude.map sem_ERule list)++-- semantic domain+newtype T_ERules = T_ERules {+ attach_T_ERules :: Identity (T_ERules_s23 )+ }+newtype T_ERules_s23 = C_ERules_s23 {+ inv_ERules_s23 :: (T_ERules_v22 )+ }+data T_ERules_s24 = C_ERules_s24+type T_ERules_v22 = (T_ERules_vIn22 ) -> (T_ERules_vOut22 )+data T_ERules_vIn22 = T_ERules_vIn22 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Map Identifier Type) (ConstructorIdent) (PP_Doc) (Attributes) (Set String) (Map Identifier Type) (String) (String) (String -> String -> String -> Bool -> String) (NontermIdent) (Options) (String) (Map Identifier (Set VisitKind)) (Attributes) (PP_Doc) (Map Identifier Int)+data T_ERules_vOut22 = T_ERules_vOut22 (Seq Error) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (PP_Doc) (Set String)+{-# NOINLINE sem_ERules_Cons #-}+sem_ERules_Cons :: T_ERule -> T_ERules -> T_ERules +sem_ERules_Cons arg_hd_ arg_tl_ = T_ERules (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_ERules_v22 + v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let+ _hdX20 = Control.Monad.Identity.runIdentity (attach_T_ERule (arg_hd_))+ _tlX23 = Control.Monad.Identity.runIdentity (attach_T_ERules (arg_tl_))+ (T_ERule_vOut19 _hdIerrors _hdImrules _hdIruledefs _hdIruleuses _hdIsem_rules _hdIusedArgs) = inv_ERule_s20 _hdX20 (T_ERule_vIn19 _hdOallInhmap _hdOallSynmap _hdOchildTypes _hdOcon _hdOimportBlocks _hdOinhmap _hdOlazyIntras _hdOlocalAttrTypes _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnt _hdOoptions _hdOpragmaBlocks _hdOruleKinds _hdOsynmap _hdOtextBlocks _hdOusageInfo)+ (T_ERules_vOut22 _tlIerrors _tlImrules _tlIruledefs _tlIruleuses _tlIsem_rules _tlIusedArgs) = inv_ERules_s23 _tlX23 (T_ERules_vIn22 _tlOallInhmap _tlOallSynmap _tlOchildTypes _tlOcon _tlOimportBlocks _tlOinhmap _tlOlazyIntras _tlOlocalAttrTypes _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnt _tlOoptions _tlOpragmaBlocks _tlOruleKinds _tlOsynmap _tlOtextBlocks _tlOusageInfo)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule443 _hdIerrors _tlIerrors+ _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ _lhsOmrules = rule444 _hdImrules _tlImrules+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule445 _hdIruledefs _tlIruledefs+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule446 _hdIruleuses _tlIruleuses+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule447 _hdIsem_rules _tlIsem_rules+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule448 _hdIusedArgs _tlIusedArgs+ _hdOallInhmap = rule449 _lhsIallInhmap+ _hdOallSynmap = rule450 _lhsIallSynmap+ _hdOchildTypes = rule451 _lhsIchildTypes+ _hdOcon = rule452 _lhsIcon+ _hdOimportBlocks = rule453 _lhsIimportBlocks+ _hdOinhmap = rule454 _lhsIinhmap+ _hdOlazyIntras = rule455 _lhsIlazyIntras+ _hdOlocalAttrTypes = rule456 _lhsIlocalAttrTypes+ _hdOmainFile = rule457 _lhsImainFile+ _hdOmainName = rule458 _lhsImainName+ _hdOmoduleHeader = rule459 _lhsImoduleHeader+ _hdOnt = rule460 _lhsInt+ _hdOoptions = rule461 _lhsIoptions+ _hdOpragmaBlocks = rule462 _lhsIpragmaBlocks+ _hdOruleKinds = rule463 _lhsIruleKinds+ _hdOsynmap = rule464 _lhsIsynmap+ _hdOtextBlocks = rule465 _lhsItextBlocks+ _hdOusageInfo = rule466 _lhsIusageInfo+ _tlOallInhmap = rule467 _lhsIallInhmap+ _tlOallSynmap = rule468 _lhsIallSynmap+ _tlOchildTypes = rule469 _lhsIchildTypes+ _tlOcon = rule470 _lhsIcon+ _tlOimportBlocks = rule471 _lhsIimportBlocks+ _tlOinhmap = rule472 _lhsIinhmap+ _tlOlazyIntras = rule473 _lhsIlazyIntras+ _tlOlocalAttrTypes = rule474 _lhsIlocalAttrTypes+ _tlOmainFile = rule475 _lhsImainFile+ _tlOmainName = rule476 _lhsImainName+ _tlOmoduleHeader = rule477 _lhsImoduleHeader+ _tlOnt = rule478 _lhsInt+ _tlOoptions = rule479 _lhsIoptions+ _tlOpragmaBlocks = rule480 _lhsIpragmaBlocks+ _tlOruleKinds = rule481 _lhsIruleKinds+ _tlOsynmap = rule482 _lhsIsynmap+ _tlOtextBlocks = rule483 _lhsItextBlocks+ _tlOusageInfo = rule484 _lhsIusageInfo+ __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs+ in __result_ )+ in C_ERules_s23 v22+ {-# INLINE rule443 #-}+ rule443 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule444 #-}+ rule444 = \ ((_hdImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ((_tlImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _hdImrules `Map.union` _tlImrules+ {-# INLINE rule445 #-}+ rule445 = \ ((_hdIruledefs) :: Map Identifier (Set String)) ((_tlIruledefs) :: Map Identifier (Set String)) ->+ _hdIruledefs `uwSetUnion` _tlIruledefs+ {-# INLINE rule446 #-}+ rule446 = \ ((_hdIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ((_tlIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _hdIruleuses `uwMapUnion` _tlIruleuses+ {-# INLINE rule447 #-}+ rule447 = \ ((_hdIsem_rules) :: PP_Doc) ((_tlIsem_rules) :: PP_Doc) ->+ _hdIsem_rules >-< _tlIsem_rules+ {-# INLINE rule448 #-}+ rule448 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule449 #-}+ rule449 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule450 #-}+ rule450 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule451 #-}+ rule451 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule452 #-}+ rule452 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule453 #-}+ rule453 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule454 #-}+ rule454 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule455 #-}+ rule455 = \ ((_lhsIlazyIntras) :: Set String) ->+ _lhsIlazyIntras+ {-# INLINE rule456 #-}+ rule456 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule457 #-}+ rule457 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule458 #-}+ rule458 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule459 #-}+ rule459 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule460 #-}+ rule460 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule461 #-}+ rule461 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule462 #-}+ rule462 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule463 #-}+ rule463 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _lhsIruleKinds+ {-# INLINE rule464 #-}+ rule464 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule465 #-}+ rule465 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule466 #-}+ rule466 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->+ _lhsIusageInfo+ {-# INLINE rule467 #-}+ rule467 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule468 #-}+ rule468 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule469 #-}+ rule469 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule470 #-}+ rule470 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule471 #-}+ rule471 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule472 #-}+ rule472 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule473 #-}+ rule473 = \ ((_lhsIlazyIntras) :: Set String) ->+ _lhsIlazyIntras+ {-# INLINE rule474 #-}+ rule474 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule475 #-}+ rule475 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule476 #-}+ rule476 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule477 #-}+ rule477 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule478 #-}+ rule478 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule479 #-}+ rule479 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule480 #-}+ rule480 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule481 #-}+ rule481 = \ ((_lhsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _lhsIruleKinds+ {-# INLINE rule482 #-}+ rule482 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule483 #-}+ rule483 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule484 #-}+ rule484 = \ ((_lhsIusageInfo) :: Map Identifier Int) ->+ _lhsIusageInfo+{-# NOINLINE sem_ERules_Nil #-}+sem_ERules_Nil :: T_ERules +sem_ERules_Nil = T_ERules (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_ERules_v22 + v22 = \ (T_ERules_vIn22 _lhsIallInhmap _lhsIallSynmap _lhsIchildTypes _lhsIcon _lhsIimportBlocks _lhsIinhmap _lhsIlazyIntras _lhsIlocalAttrTypes _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInt _lhsIoptions _lhsIpragmaBlocks _lhsIruleKinds _lhsIsynmap _lhsItextBlocks _lhsIusageInfo) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule485 ()+ _lhsOmrules :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)+ _lhsOmrules = rule486 ()+ _lhsOruledefs :: Map Identifier (Set String)+ _lhsOruledefs = rule487 ()+ _lhsOruleuses :: Map Identifier (Map String (Maybe NonLocalAttr))+ _lhsOruleuses = rule488 ()+ _lhsOsem_rules :: PP_Doc+ _lhsOsem_rules = rule489 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule490 ()+ __result_ = T_ERules_vOut22 _lhsOerrors _lhsOmrules _lhsOruledefs _lhsOruleuses _lhsOsem_rules _lhsOusedArgs+ in __result_ )+ in C_ERules_s23 v22+ {-# INLINE rule485 #-}+ rule485 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule486 #-}+ rule486 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule487 #-}+ rule487 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule488 #-}+ rule488 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule489 #-}+ rule489 = \ (_ :: ()) ->+ empty+ {-# INLINE rule490 #-}+ rule490 = \ (_ :: ()) ->+ Set.empty++-- ExecutionPlan -----------------------------------------------+-- wrapper+data Inh_ExecutionPlan = Inh_ExecutionPlan { importBlocks_Inh_ExecutionPlan :: (PP_Doc), inhmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), localAttrTypes_Inh_ExecutionPlan :: (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))), mainBlocksDoc_Inh_ExecutionPlan :: (PP_Doc), mainFile_Inh_ExecutionPlan :: (String), mainName_Inh_ExecutionPlan :: (String), moduleHeader_Inh_ExecutionPlan :: (String -> String -> String -> Bool -> String), options_Inh_ExecutionPlan :: (Options), pragmaBlocks_Inh_ExecutionPlan :: (String), synmap_Inh_ExecutionPlan :: (Map NontermIdent Attributes), textBlockMap_Inh_ExecutionPlan :: (Map BlockInfo PP_Doc), textBlocks_Inh_ExecutionPlan :: (PP_Doc) }+data Syn_ExecutionPlan = Syn_ExecutionPlan { errors_Syn_ExecutionPlan :: (Seq Error), genIO_Syn_ExecutionPlan :: (IO ()), output_Syn_ExecutionPlan :: (PP_Doc) }+{-# INLINABLE wrap_ExecutionPlan #-}+wrap_ExecutionPlan :: T_ExecutionPlan -> Inh_ExecutionPlan -> (Syn_ExecutionPlan )+wrap_ExecutionPlan (T_ExecutionPlan act) (Inh_ExecutionPlan _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ExecutionPlan_vIn25 _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks+ (T_ExecutionPlan_vOut25 _lhsOerrors _lhsOgenIO _lhsOoutput) <- return (inv_ExecutionPlan_s26 sem arg)+ return (Syn_ExecutionPlan _lhsOerrors _lhsOgenIO _lhsOoutput)+ )++-- cata+{-# INLINE sem_ExecutionPlan #-}+sem_ExecutionPlan :: ExecutionPlan -> T_ExecutionPlan +sem_ExecutionPlan ( ExecutionPlan nonts_ typeSyns_ wrappers_ derivings_ ) = sem_ExecutionPlan_ExecutionPlan ( sem_ENonterminals nonts_ ) typeSyns_ wrappers_ derivings_++-- semantic domain+newtype T_ExecutionPlan = T_ExecutionPlan {+ attach_T_ExecutionPlan :: Identity (T_ExecutionPlan_s26 )+ }+newtype T_ExecutionPlan_s26 = C_ExecutionPlan_s26 {+ inv_ExecutionPlan_s26 :: (T_ExecutionPlan_v25 )+ }+data T_ExecutionPlan_s27 = C_ExecutionPlan_s27+type T_ExecutionPlan_v25 = (T_ExecutionPlan_vIn25 ) -> (T_ExecutionPlan_vOut25 )+data T_ExecutionPlan_vIn25 = T_ExecutionPlan_vIn25 (PP_Doc) (Map NontermIdent Attributes) (Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (Map NontermIdent Attributes) (Map BlockInfo PP_Doc) (PP_Doc)+data T_ExecutionPlan_vOut25 = T_ExecutionPlan_vOut25 (Seq Error) (IO ()) (PP_Doc)+{-# NOINLINE sem_ExecutionPlan_ExecutionPlan #-}+sem_ExecutionPlan_ExecutionPlan :: T_ENonterminals -> (TypeSyns) -> (Set NontermIdent) -> (Derivings) -> T_ExecutionPlan +sem_ExecutionPlan_ExecutionPlan arg_nonts_ arg_typeSyns_ arg_wrappers_ arg_derivings_ = T_ExecutionPlan (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_ExecutionPlan_v25 + v25 = \ (T_ExecutionPlan_vIn25 _lhsIimportBlocks _lhsIinhmap _lhsIlocalAttrTypes _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _lhsIsynmap _lhsItextBlockMap _lhsItextBlocks) -> ( let+ _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_ENonterminals (arg_nonts_))+ (T_ENonterminals_vOut10 _nontsIappendCommon _nontsIappendMain _nontsIchildvisit _nontsIerrors _nontsIfromToStates _nontsIgenProdIO _nontsIimports _nontsIinitStates _nontsIoutput _nontsIsemFunBndDefs _nontsIsemFunBndTps _nontsIvisitKinds _nontsIvisitdefs _nontsIvisituses) = inv_ENonterminals_s11 _nontsX11 (T_ENonterminals_vIn10 _nontsOallFromToStates _nontsOallInitStates _nontsOallVisitKinds _nontsOallchildvisit _nontsOavisitdefs _nontsOavisituses _nontsOderivings _nontsOimportBlocks _nontsOinhmap _nontsOlocalAttrTypes _nontsOmainFile _nontsOmainName _nontsOmoduleHeader _nontsOoptions _nontsOpragmaBlocks _nontsOsynmap _nontsOtextBlocks _nontsOtypeSyns _nontsOwrappers)+ _lhsOoutput :: PP_Doc+ _lhsOoutput = rule491 _commonExtra _nontsIoutput _wrappersExtra+ _nontsOwrappers = rule492 arg_wrappers_+ _nontsOtypeSyns = rule493 arg_typeSyns_+ _nontsOderivings = rule494 arg_derivings_+ _wrappersExtra = rule495 _lateSemBndDef _lhsIoptions+ _commonExtra = rule496 _lateSemBndTp _lhsIoptions+ _lateSemBndTp = rule497 _lhsImainName _nontsIsemFunBndTps+ _lateSemBndDef = rule498 _lhsImainName _lhsIoptions _nontsIsemFunBndDefs arg_wrappers_+ _nontsOallchildvisit = rule499 _nontsIchildvisit+ _nontsOavisitdefs = rule500 _nontsIvisitdefs+ _nontsOavisituses = rule501 _nontsIvisituses+ _lhsOgenIO :: IO ()+ _lhsOgenIO = rule502 _genCommonModule _genMainModule _nontsIgenProdIO+ _mainModuleFile = rule503 _lhsImainFile+ _ppMonadImports = rule504 _lhsIoptions+ _genMainModule = rule505 _lhsImainBlocksDoc _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIpragmaBlocks _mainModuleFile _nontsIappendMain _nontsIimports _ppMonadImports _wrappersExtra+ _commonFile = rule506 _lhsImainFile+ _genCommonModule = rule507 _commonExtra _commonFile _lhsIimportBlocks _lhsImainName _lhsImoduleHeader _lhsIpragmaBlocks _lhsItextBlocks _nontsIappendCommon _ppMonadImports+ _nontsOallFromToStates = rule508 _nontsIfromToStates+ _nontsOallVisitKinds = rule509 _nontsIvisitKinds+ _nontsOallInitStates = rule510 _nontsIinitStates+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule511 _nontsIerrors+ _nontsOimportBlocks = rule512 _lhsIimportBlocks+ _nontsOinhmap = rule513 _lhsIinhmap+ _nontsOlocalAttrTypes = rule514 _lhsIlocalAttrTypes+ _nontsOmainFile = rule515 _lhsImainFile+ _nontsOmainName = rule516 _lhsImainName+ _nontsOmoduleHeader = rule517 _lhsImoduleHeader+ _nontsOoptions = rule518 _lhsIoptions+ _nontsOpragmaBlocks = rule519 _lhsIpragmaBlocks+ _nontsOsynmap = rule520 _lhsIsynmap+ _nontsOtextBlocks = rule521 _lhsItextBlocks+ __result_ = T_ExecutionPlan_vOut25 _lhsOerrors _lhsOgenIO _lhsOoutput+ in __result_ )+ in C_ExecutionPlan_s26 v25+ {-# INLINE rule491 #-}+ {-# LINE 89 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule491 = \ _commonExtra ((_nontsIoutput) :: PP_Doc) _wrappersExtra ->+ {-# LINE 89 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIoutput >-< _commonExtra >-< _wrappersExtra+ {-# LINE 3818 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule492 #-}+ {-# LINE 95 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule492 = \ wrappers_ ->+ {-# LINE 95 "./src-ag/ExecutionPlan2Hs.ag" #-}+ wrappers_+ {-# LINE 3824 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule493 #-}+ {-# LINE 134 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule493 = \ typeSyns_ ->+ {-# LINE 134 "./src-ag/ExecutionPlan2Hs.ag" #-}+ typeSyns_+ {-# LINE 3830 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule494 #-}+ {-# LINE 135 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule494 = \ derivings_ ->+ {-# LINE 135 "./src-ag/ExecutionPlan2Hs.ag" #-}+ derivings_+ {-# LINE 3836 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule495 #-}+ {-# LINE 531 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule495 = \ _lateSemBndDef ((_lhsIoptions) :: Options) ->+ {-# LINE 531 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then _lateSemBndDef+ else empty+ {-# LINE 3844 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule496 #-}+ {-# LINE 534 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule496 = \ _lateSemBndTp ((_lhsIoptions) :: Options) ->+ {-# LINE 534 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if lateHigherOrderBinding _lhsIoptions+ then _lateSemBndTp+ else empty+ {-# LINE 3852 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule497 #-}+ {-# LINE 537 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule497 = \ ((_lhsImainName) :: String) ((_nontsIsemFunBndTps) :: Seq PP_Doc) ->+ {-# LINE 537 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "data" >#< lateBindingTypeNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndTps)+ {-# LINE 3859 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule498 #-}+ {-# LINE 539 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule498 = \ ((_lhsImainName) :: String) ((_lhsIoptions) :: Options) ((_nontsIsemFunBndDefs) :: Seq PP_Doc) wrappers_ ->+ {-# LINE 539 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ( if noInlinePragmas _lhsIoptions+ then empty+ else if helpInlining _lhsIoptions && Set.size wrappers_ == 1+ then ppInline $ lateBindingFieldNm _lhsImainName+ else ppNoInline $ lateBindingFieldNm _lhsImainName+ )+ >-< lateBindingFieldNm _lhsImainName >#< "::" >#< lateBindingTypeNm _lhsImainName+ >-< lateBindingFieldNm _lhsImainName >#< "=" >#< lateBindingTypeNm _lhsImainName+ >-< (indent 2 $ pp_block "{" "}" "," $ toList _nontsIsemFunBndDefs )+ {-# LINE 3873 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule499 #-}+ {-# LINE 1216 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule499 = \ ((_nontsIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ {-# LINE 1216 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIchildvisit+ {-# LINE 3879 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule500 #-}+ {-# LINE 1360 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule500 = \ ((_nontsIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ {-# LINE 1360 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIvisitdefs+ {-# LINE 3885 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule501 #-}+ {-# LINE 1361 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule501 = \ ((_nontsIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ {-# LINE 1361 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIvisituses+ {-# LINE 3891 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule502 #-}+ {-# LINE 1432 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule502 = \ _genCommonModule _genMainModule ((_nontsIgenProdIO) :: IO ()) ->+ {-# LINE 1432 "./src-ag/ExecutionPlan2Hs.ag" #-}+ do _genMainModule+ _genCommonModule+ _nontsIgenProdIO+ {-# LINE 3899 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule503 #-}+ {-# LINE 1435 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule503 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 1435 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsImainFile+ {-# LINE 3905 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule504 #-}+ {-# LINE 1436 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule504 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1436 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ( if tupleAsDummyToken _lhsIoptions+ then empty+ else pp "import GHC.Prim"+ )+ >-< if parallelInvoke _lhsIoptions+ then pp "import qualified System.IO.Unsafe(unsafePerformIO)"+ >-< pp "import System.IO(IO)"+ >-< pp "import Control.Concurrent(newEmptyMVar,forkIO,putMVar,takeMVar)"+ else pp "import Control.Monad.Identity"+ {-# LINE 3919 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule505 #-}+ {-# LINE 1445 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule505 = \ ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptions) :: Options) ((_lhsIpragmaBlocks) :: String) _mainModuleFile ((_nontsIappendMain) :: [PP_Doc]) ((_nontsIimports) :: [PP_Doc]) _ppMonadImports _wrappersExtra ->+ {-# LINE 1445 "./src-ag/ExecutionPlan2Hs.ag" #-}+ writeModule _mainModuleFile+ ( [ warrenFlagsPP _lhsIoptions+ , pp $ _lhsIpragmaBlocks+ , pp $ _lhsImoduleHeader _lhsImainName "" "" False+ , _ppMonadImports+ , pp $ "import " ++ _lhsImainName ++ "_common"+ ]+ ++ _nontsIimports+ ++ [_lhsImainBlocksDoc]+ ++ [_wrappersExtra ]+ ++ _nontsIappendMain+ )+ {-# LINE 3936 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule506 #-}+ {-# LINE 1457 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule506 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 1457 "./src-ag/ExecutionPlan2Hs.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")+ {-# LINE 3942 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule507 #-}+ {-# LINE 1458 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule507 = \ _commonExtra _commonFile ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlocks) :: PP_Doc) ((_nontsIappendCommon) :: [PP_Doc]) _ppMonadImports ->+ {-# LINE 1458 "./src-ag/ExecutionPlan2Hs.ag" #-}+ writeModule _commonFile+ ( [ pp $ "{-# LANGUAGE Rank2Types, GADTs #-}"+ , pp $ _lhsIpragmaBlocks+ , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True+ , _ppMonadImports+ , _lhsIimportBlocks+ , _lhsItextBlocks+ , _commonExtra+ ]+ ++ _nontsIappendCommon+ )+ {-# LINE 3958 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule508 #-}+ {-# LINE 1577 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule508 = \ ((_nontsIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ {-# LINE 1577 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIfromToStates+ {-# LINE 3964 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule509 #-}+ {-# LINE 1621 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule509 = \ ((_nontsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ {-# LINE 1621 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIvisitKinds+ {-# LINE 3970 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule510 #-}+ {-# LINE 1635 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule510 = \ ((_nontsIinitStates) :: Map NontermIdent Int) ->+ {-# LINE 1635 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nontsIinitStates+ {-# LINE 3976 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule511 #-}+ rule511 = \ ((_nontsIerrors) :: Seq Error) ->+ _nontsIerrors+ {-# INLINE rule512 #-}+ rule512 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule513 #-}+ rule513 = \ ((_lhsIinhmap) :: Map NontermIdent Attributes) ->+ _lhsIinhmap+ {-# INLINE rule514 #-}+ rule514 = \ ((_lhsIlocalAttrTypes) :: Map NontermIdent (Map ConstructorIdent (Map Identifier Type))) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule515 #-}+ rule515 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule516 #-}+ rule516 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule517 #-}+ rule517 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule518 #-}+ rule518 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule519 #-}+ rule519 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule520 #-}+ rule520 = \ ((_lhsIsynmap) :: Map NontermIdent Attributes) ->+ _lhsIsynmap+ {-# INLINE rule521 #-}+ rule521 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks++-- Expression --------------------------------------------------+-- wrapper+data Inh_Expression = Inh_Expression { options_Inh_Expression :: (Options) }+data Syn_Expression = Syn_Expression { attrs_Syn_Expression :: (Map String (Maybe NonLocalAttr)), pos_Syn_Expression :: (Pos), semfunc_Syn_Expression :: (PP_Doc), tks_Syn_Expression :: ([HsToken]) }+{-# INLINABLE wrap_Expression #-}+wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )+wrap_Expression (T_Expression act) (Inh_Expression _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Expression_vIn28 _lhsIoptions+ (T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks) <- return (inv_Expression_s29 sem arg)+ return (Syn_Expression _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks)+ )++-- cata+{-# INLINE sem_Expression #-}+sem_Expression :: Expression -> T_Expression +sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_++-- semantic domain+newtype T_Expression = T_Expression {+ attach_T_Expression :: Identity (T_Expression_s29 )+ }+newtype T_Expression_s29 = C_Expression_s29 {+ inv_Expression_s29 :: (T_Expression_v28 )+ }+data T_Expression_s30 = C_Expression_s30+type T_Expression_v28 = (T_Expression_vIn28 ) -> (T_Expression_vOut28 )+data T_Expression_vIn28 = T_Expression_vIn28 (Options)+data T_Expression_vOut28 = T_Expression_vOut28 (Map String (Maybe NonLocalAttr)) (Pos) (PP_Doc) ([HsToken])+{-# NOINLINE sem_Expression_Expression #-}+sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression +sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_Expression_v28 + v28 = \ (T_Expression_vIn28 _lhsIoptions) -> ( let+ _lhsOtks :: [HsToken]+ _lhsOtks = rule522 arg_tks_+ _lhsOpos :: Pos+ _lhsOpos = rule523 arg_pos_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule524 _inhhstoken arg_tks_+ _lhsOsemfunc :: PP_Doc+ _lhsOsemfunc = rule525 _inhhstoken arg_tks_+ _inhhstoken = rule526 _lhsIoptions+ __result_ = T_Expression_vOut28 _lhsOattrs _lhsOpos _lhsOsemfunc _lhsOtks+ in __result_ )+ in C_Expression_s29 v28+ {-# INLINE rule522 #-}+ {-# LINE 1071 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule522 = \ tks_ ->+ {-# LINE 1071 "./src-ag/ExecutionPlan2Hs.ag" #-}+ tks_+ {-# LINE 4065 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule523 #-}+ {-# LINE 1114 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule523 = \ pos_ ->+ {-# LINE 1114 "./src-ag/ExecutionPlan2Hs.ag" #-}+ pos_+ {-# LINE 4071 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule524 #-}+ {-# LINE 1200 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule524 = \ _inhhstoken tks_ ->+ {-# LINE 1200 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.unions $ map (\tok -> attrs_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_+ {-# LINE 4077 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule525 #-}+ {-# LINE 1201 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule525 = \ _inhhstoken tks_ ->+ {-# LINE 1201 "./src-ag/ExecutionPlan2Hs.ag" #-}+ vlist $ showTokens $ map (\tok -> tok_Syn_HsToken (wrap_HsToken (sem_HsToken tok) _inhhstoken )) tks_+ {-# LINE 4083 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule526 #-}+ {-# LINE 1202 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule526 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1202 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Inh_HsToken _lhsIoptions+ {-# LINE 4089 "dist/build/ExecutionPlan2Hs.hs"#-}++-- HsToken -----------------------------------------------------+-- wrapper+data Inh_HsToken = Inh_HsToken { options_Inh_HsToken :: (Options) }+data Syn_HsToken = Syn_HsToken { attrs_Syn_HsToken :: (Map String (Maybe NonLocalAttr)), tok_Syn_HsToken :: ((Pos,String)) }+{-# INLINABLE wrap_HsToken #-}+wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )+wrap_HsToken (T_HsToken act) (Inh_HsToken _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsToken_vIn31 _lhsIoptions+ (T_HsToken_vOut31 _lhsOattrs _lhsOtok) <- return (inv_HsToken_s32 sem arg)+ return (Syn_HsToken _lhsOattrs _lhsOtok)+ )++-- cata+{-# NOINLINE sem_HsToken #-}+sem_HsToken :: HsToken -> T_HsToken +sem_HsToken ( AGLocal var_ pos_ rdesc_ ) = sem_HsToken_AGLocal var_ pos_ rdesc_+sem_HsToken ( AGField field_ attr_ pos_ rdesc_ ) = sem_HsToken_AGField field_ attr_ pos_ rdesc_+sem_HsToken ( HsToken value_ pos_ ) = sem_HsToken_HsToken value_ pos_+sem_HsToken ( CharToken value_ pos_ ) = sem_HsToken_CharToken value_ pos_+sem_HsToken ( StrToken value_ pos_ ) = sem_HsToken_StrToken value_ pos_+sem_HsToken ( Err mesg_ pos_ ) = sem_HsToken_Err mesg_ pos_++-- semantic domain+newtype T_HsToken = T_HsToken {+ attach_T_HsToken :: Identity (T_HsToken_s32 )+ }+newtype T_HsToken_s32 = C_HsToken_s32 {+ inv_HsToken_s32 :: (T_HsToken_v31 )+ }+data T_HsToken_s33 = C_HsToken_s33+type T_HsToken_v31 = (T_HsToken_vIn31 ) -> (T_HsToken_vOut31 )+data T_HsToken_vIn31 = T_HsToken_vIn31 (Options)+data T_HsToken_vOut31 = T_HsToken_vOut31 (Map String (Maybe NonLocalAttr)) ((Pos,String))+{-# NOINLINE sem_HsToken_AGLocal #-}+sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken +sem_HsToken_AGLocal arg_var_ arg_pos_ _ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule527 arg_var_+ _tok = rule528 arg_pos_ arg_var_+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule529 _tok+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule527 #-}+ {-# LINE 1159 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule527 = \ var_ ->+ {-# LINE 1159 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton (fieldname var_) Nothing+ {-# LINE 4146 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule528 #-}+ {-# LINE 1405 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule528 = \ pos_ var_ ->+ {-# LINE 1405 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_,fieldname var_)+ {-# LINE 4152 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule529 #-}+ rule529 = \ _tok ->+ _tok+{-# NOINLINE sem_HsToken_AGField #-}+sem_HsToken_AGField :: (Identifier) -> (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken +sem_HsToken_AGField arg_field_ arg_attr_ arg_pos_ arg_rdesc_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _mbAttr = rule530 arg_attr_ arg_field_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule531 _lhsIoptions _mbAttr arg_attr_ arg_field_+ _addTrace = rule532 arg_attr_ arg_field_ arg_rdesc_+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule533 _addTrace _lhsIoptions arg_attr_ arg_field_ arg_pos_+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule530 #-}+ {-# LINE 1160 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule530 = \ attr_ field_ ->+ {-# LINE 1160 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if field_ == _INST || field_ == _FIELD || field_ == _INST'+ then Nothing+ else Just $ mkNonLocalAttr (field_ == _LHS) field_ attr_+ {-# LINE 4179 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule531 #-}+ {-# LINE 1163 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule531 = \ ((_lhsIoptions) :: Options) _mbAttr attr_ field_ ->+ {-# LINE 1163 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton (attrname _lhsIoptions True field_ attr_) _mbAttr+ {-# LINE 4185 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule532 #-}+ {-# LINE 1409 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule532 = \ attr_ field_ rdesc_ ->+ {-# LINE 1409 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case rdesc_ of+ Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))"+ Nothing -> id+ {-# LINE 4193 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule533 #-}+ {-# LINE 1412 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule533 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->+ {-# LINE 1412 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, _addTrace $ attrname _lhsIoptions True field_ attr_)+ {-# LINE 4199 "dist/build/ExecutionPlan2Hs.hs"#-}+{-# NOINLINE sem_HsToken_HsToken #-}+sem_HsToken_HsToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_HsToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule534 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule535 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule534 #-}+ {-# LINE 1414 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule534 = \ pos_ value_ ->+ {-# LINE 1414 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, value_)+ {-# LINE 4219 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule535 #-}+ rule535 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_CharToken #-}+sem_HsToken_CharToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_CharToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule536 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule537 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule536 #-}+ {-# LINE 1416 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule536 = \ pos_ value_ ->+ {-# LINE 1416 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, if null value_+ then ""+ else showCharShort (head value_)+ )+ {-# LINE 4245 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule537 #-}+ rule537 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_StrToken #-}+sem_HsToken_StrToken :: (String) -> (Pos) -> T_HsToken +sem_HsToken_StrToken arg_value_ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule538 arg_pos_ arg_value_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule539 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule538 #-}+ {-# LINE 1421 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule538 = \ pos_ value_ ->+ {-# LINE 1421 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, showStrShort value_)+ {-# LINE 4268 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule539 #-}+ rule539 = \ (_ :: ()) ->+ Map.empty+{-# NOINLINE sem_HsToken_Err #-}+sem_HsToken_Err :: (String) -> (Pos) -> T_HsToken +sem_HsToken_Err _ arg_pos_ = T_HsToken (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_HsToken_v31 + v31 = \ (T_HsToken_vIn31 _lhsIoptions) -> ( let+ _lhsOtok :: (Pos,String)+ _lhsOtok = rule540 arg_pos_+ _lhsOattrs :: Map String (Maybe NonLocalAttr)+ _lhsOattrs = rule541 ()+ __result_ = T_HsToken_vOut31 _lhsOattrs _lhsOtok+ in __result_ )+ in C_HsToken_s32 v31+ {-# INLINE rule540 #-}+ {-# LINE 1422 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule540 = \ pos_ ->+ {-# LINE 1422 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (pos_, "")+ {-# LINE 4291 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule541 #-}+ rule541 = \ (_ :: ()) ->+ Map.empty++-- HsTokens ----------------------------------------------------+-- wrapper+data Inh_HsTokens = Inh_HsTokens { options_Inh_HsTokens :: (Options) }+data Syn_HsTokens = Syn_HsTokens { tks_Syn_HsTokens :: ([(Pos,String)]) }+{-# INLINABLE wrap_HsTokens #-}+wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )+wrap_HsTokens (T_HsTokens act) (Inh_HsTokens _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsTokens_vIn34 _lhsIoptions+ (T_HsTokens_vOut34 _lhsOtks) <- return (inv_HsTokens_s35 sem arg)+ return (Syn_HsTokens _lhsOtks)+ )++-- cata+{-# NOINLINE sem_HsTokens #-}+sem_HsTokens :: HsTokens -> T_HsTokens +sem_HsTokens list = Prelude.foldr sem_HsTokens_Cons sem_HsTokens_Nil (Prelude.map sem_HsToken list)++-- semantic domain+newtype T_HsTokens = T_HsTokens {+ attach_T_HsTokens :: Identity (T_HsTokens_s35 )+ }+newtype T_HsTokens_s35 = C_HsTokens_s35 {+ inv_HsTokens_s35 :: (T_HsTokens_v34 )+ }+data T_HsTokens_s36 = C_HsTokens_s36+type T_HsTokens_v34 = (T_HsTokens_vIn34 ) -> (T_HsTokens_vOut34 )+data T_HsTokens_vIn34 = T_HsTokens_vIn34 (Options)+data T_HsTokens_vOut34 = T_HsTokens_vOut34 ([(Pos,String)])+{-# NOINLINE sem_HsTokens_Cons #-}+sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens +sem_HsTokens_Cons arg_hd_ arg_tl_ = T_HsTokens (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_HsTokens_v34 + v34 = \ (T_HsTokens_vIn34 _lhsIoptions) -> ( let+ _hdX32 = Control.Monad.Identity.runIdentity (attach_T_HsToken (arg_hd_))+ _tlX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tl_))+ (T_HsToken_vOut31 _hdIattrs _hdItok) = inv_HsToken_s32 _hdX32 (T_HsToken_vIn31 _hdOoptions)+ (T_HsTokens_vOut34 _tlItks) = inv_HsTokens_s35 _tlX35 (T_HsTokens_vIn34 _tlOoptions)+ _lhsOtks :: [(Pos,String)]+ _lhsOtks = rule542 _hdItok _tlItks+ _hdOoptions = rule543 _lhsIoptions+ _tlOoptions = rule544 _lhsIoptions+ __result_ = T_HsTokens_vOut34 _lhsOtks+ in __result_ )+ in C_HsTokens_s35 v34+ {-# INLINE rule542 #-}+ {-# LINE 1401 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule542 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->+ {-# LINE 1401 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _hdItok : _tlItks+ {-# LINE 4349 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule543 #-}+ rule543 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule544 #-}+ rule544 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_HsTokens_Nil #-}+sem_HsTokens_Nil :: T_HsTokens +sem_HsTokens_Nil = T_HsTokens (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_HsTokens_v34 + v34 = \ (T_HsTokens_vIn34 _lhsIoptions) -> ( let+ _lhsOtks :: [(Pos,String)]+ _lhsOtks = rule545 ()+ __result_ = T_HsTokens_vOut34 _lhsOtks+ in __result_ )+ in C_HsTokens_s35 v34+ {-# INLINE rule545 #-}+ {-# LINE 1402 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule545 = \ (_ :: ()) ->+ {-# LINE 1402 "./src-ag/ExecutionPlan2Hs.ag" #-}+ []+ {-# LINE 4373 "dist/build/ExecutionPlan2Hs.hs"#-}++-- HsTokensRoot ------------------------------------------------+-- wrapper+data Inh_HsTokensRoot = Inh_HsTokensRoot { options_Inh_HsTokensRoot :: (Options) }+data Syn_HsTokensRoot = Syn_HsTokensRoot { }+{-# INLINABLE wrap_HsTokensRoot #-}+wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> (Syn_HsTokensRoot )+wrap_HsTokensRoot (T_HsTokensRoot act) (Inh_HsTokensRoot _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_HsTokensRoot_vIn37 _lhsIoptions+ (T_HsTokensRoot_vOut37 ) <- return (inv_HsTokensRoot_s38 sem arg)+ return (Syn_HsTokensRoot )+ )++-- cata+{-# INLINE sem_HsTokensRoot #-}+sem_HsTokensRoot :: HsTokensRoot -> T_HsTokensRoot +sem_HsTokensRoot ( HsTokensRoot tokens_ ) = sem_HsTokensRoot_HsTokensRoot ( sem_HsTokens tokens_ )++-- semantic domain+newtype T_HsTokensRoot = T_HsTokensRoot {+ attach_T_HsTokensRoot :: Identity (T_HsTokensRoot_s38 )+ }+newtype T_HsTokensRoot_s38 = C_HsTokensRoot_s38 {+ inv_HsTokensRoot_s38 :: (T_HsTokensRoot_v37 )+ }+data T_HsTokensRoot_s39 = C_HsTokensRoot_s39+type T_HsTokensRoot_v37 = (T_HsTokensRoot_vIn37 ) -> (T_HsTokensRoot_vOut37 )+data T_HsTokensRoot_vIn37 = T_HsTokensRoot_vIn37 (Options)+data T_HsTokensRoot_vOut37 = T_HsTokensRoot_vOut37 +{-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-}+sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot +sem_HsTokensRoot_HsTokensRoot arg_tokens_ = T_HsTokensRoot (return st38) where+ {-# NOINLINE st38 #-}+ st38 = let+ v37 :: T_HsTokensRoot_v37 + v37 = \ (T_HsTokensRoot_vIn37 _lhsIoptions) -> ( let+ _tokensX35 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tokens_))+ (T_HsTokens_vOut34 _tokensItks) = inv_HsTokens_s35 _tokensX35 (T_HsTokens_vIn34 _tokensOoptions)+ _tokensOoptions = rule546 _lhsIoptions+ __result_ = T_HsTokensRoot_vOut37 + in __result_ )+ in C_HsTokensRoot_s38 v37+ {-# INLINE rule546 #-}+ rule546 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { allInhmap_Inh_Pattern :: (Map NontermIdent Attributes), allSynmap_Inh_Pattern :: (Map NontermIdent Attributes), anyLazyKind_Inh_Pattern :: (Bool), inhmap_Inh_Pattern :: (Attributes), localAttrTypes_Inh_Pattern :: (Map Identifier Type), options_Inh_Pattern :: (Options), synmap_Inh_Pattern :: (Attributes) }+data Syn_Pattern = Syn_Pattern { attrTypes_Syn_Pattern :: (PP_Doc), attrs_Syn_Pattern :: (Set String), copy_Syn_Pattern :: (Pattern), isUnderscore_Syn_Pattern :: (Bool), sem_lhs_Syn_Pattern :: ( PP_Doc ) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ (T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs) <- return (inv_Pattern_s41 sem arg)+ return (Syn_Pattern _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s41 )+ }+newtype T_Pattern_s41 = C_Pattern_s41 {+ inv_Pattern_s41 :: (T_Pattern_v40 )+ }+data T_Pattern_s42 = C_Pattern_s42+type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )+data T_Pattern_vIn40 = T_Pattern_vIn40 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)+data T_Pattern_vOut40 = T_Pattern_vOut40 (PP_Doc) (Set String) (Pattern) (Bool) ( PP_Doc )+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule547 _addbang1 _patsIsem_lhs arg_name_+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule548 ()+ _addbang = rule549 _lhsIoptions+ _addbang1 = rule550 _addbang _lhsIanyLazyKind+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule551 _patsIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule552 _patsIattrs+ _copy = rule553 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule554 _copy+ _patsOallInhmap = rule555 _lhsIallInhmap+ _patsOallSynmap = rule556 _lhsIallSynmap+ _patsOanyLazyKind = rule557 _lhsIanyLazyKind+ _patsOinhmap = rule558 _lhsIinhmap+ _patsOlocalAttrTypes = rule559 _lhsIlocalAttrTypes+ _patsOoptions = rule560 _lhsIoptions+ _patsOsynmap = rule561 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule547 #-}+ {-# LINE 1128 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule547 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) name_ ->+ {-# LINE 1128 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang1 $ pp_parens $ name_ >#< hv_sp _patsIsem_lhs+ {-# LINE 4493 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule548 #-}+ {-# LINE 1135 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule548 = \ (_ :: ()) ->+ {-# LINE 1135 "./src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 4499 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule549 #-}+ {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule549 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4505 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule550 #-}+ {-# LINE 1550 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule550 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->+ {-# LINE 1550 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 4511 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule551 #-}+ rule551 = \ ((_patsIattrTypes) :: PP_Doc) ->+ _patsIattrTypes+ {-# INLINE rule552 #-}+ rule552 = \ ((_patsIattrs) :: Set String) ->+ _patsIattrs+ {-# INLINE rule553 #-}+ rule553 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule554 #-}+ rule554 = \ _copy ->+ _copy+ {-# INLINE rule555 #-}+ rule555 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule556 #-}+ rule556 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule557 #-}+ rule557 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule558 #-}+ rule558 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule559 #-}+ rule559 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule560 #-}+ rule560 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule561 #-}+ rule561 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIattrTypes _patsIattrs _patsIcopy _patsIsem_lhs) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsOallInhmap _patsOallSynmap _patsOanyLazyKind _patsOinhmap _patsOlocalAttrTypes _patsOoptions _patsOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule562 _addbang1 _patsIsem_lhs+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule563 ()+ _addbang = rule564 _lhsIoptions+ _addbang1 = rule565 _addbang _lhsIanyLazyKind+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule566 _patsIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule567 _patsIattrs+ _copy = rule568 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule569 _copy+ _patsOallInhmap = rule570 _lhsIallInhmap+ _patsOallSynmap = rule571 _lhsIallSynmap+ _patsOanyLazyKind = rule572 _lhsIanyLazyKind+ _patsOinhmap = rule573 _lhsIinhmap+ _patsOlocalAttrTypes = rule574 _lhsIlocalAttrTypes+ _patsOoptions = rule575 _lhsIoptions+ _patsOsynmap = rule576 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule562 #-}+ {-# LINE 1127 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule562 = \ _addbang1 ((_patsIsem_lhs) :: [PP_Doc]) ->+ {-# LINE 1127 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang1 $ pp_block "(" ")" "," _patsIsem_lhs+ {-# LINE 4582 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule563 #-}+ {-# LINE 1136 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule563 = \ (_ :: ()) ->+ {-# LINE 1136 "./src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 4588 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule564 #-}+ {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule564 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4594 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule565 #-}+ {-# LINE 1550 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule565 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->+ {-# LINE 1550 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 4600 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule566 #-}+ rule566 = \ ((_patsIattrTypes) :: PP_Doc) ->+ _patsIattrTypes+ {-# INLINE rule567 #-}+ rule567 = \ ((_patsIattrs) :: Set String) ->+ _patsIattrs+ {-# INLINE rule568 #-}+ rule568 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule569 #-}+ rule569 = \ _copy ->+ _copy+ {-# INLINE rule570 #-}+ rule570 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule571 #-}+ rule571 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule572 #-}+ rule572 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule573 #-}+ rule573 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule574 #-}+ rule574 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule575 #-}+ rule575 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule576 #-}+ rule576 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)+ _varPat = rule577 _lhsIoptions arg_attr_ arg_field_+ _patExpr = rule578 _patIisUnderscore _patIsem_lhs _varPat+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule579 _addbang1 _patExpr+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule580 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule581 _lhsIoptions _patIattrs arg_attr_ arg_field_+ _mbTp = rule582 _lhsIlocalAttrTypes _lhsIsynmap arg_attr_ arg_field_+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule583 _lhsIoptions _mbTp _patIattrTypes arg_attr_ arg_field_+ _addbang = rule584 _lhsIoptions+ _addbang1 = rule585 _addbang _lhsIanyLazyKind+ _copy = rule586 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule587 _copy+ _patOallInhmap = rule588 _lhsIallInhmap+ _patOallSynmap = rule589 _lhsIallSynmap+ _patOanyLazyKind = rule590 _lhsIanyLazyKind+ _patOinhmap = rule591 _lhsIinhmap+ _patOlocalAttrTypes = rule592 _lhsIlocalAttrTypes+ _patOoptions = rule593 _lhsIoptions+ _patOsynmap = rule594 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule577 #-}+ {-# LINE 1122 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule577 = \ ((_lhsIoptions) :: Options) attr_ field_ ->+ {-# LINE 1122 "./src-ag/ExecutionPlan2Hs.ag" #-}+ text $ attrname _lhsIoptions False field_ attr_+ {-# LINE 4674 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule578 #-}+ {-# LINE 1123 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule578 = \ ((_patIisUnderscore) :: Bool) ((_patIsem_lhs) :: PP_Doc ) _varPat ->+ {-# LINE 1123 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _patIisUnderscore+ then _varPat+ else _varPat >|< "@" >|< _patIsem_lhs+ {-# LINE 4682 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule579 #-}+ {-# LINE 1126 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule579 = \ _addbang1 _patExpr ->+ {-# LINE 1126 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _addbang1 _patExpr+ {-# LINE 4688 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule580 #-}+ {-# LINE 1137 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule580 = \ (_ :: ()) ->+ {-# LINE 1137 "./src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 4694 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule581 #-}+ {-# LINE 1143 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule581 = \ ((_lhsIoptions) :: Options) ((_patIattrs) :: Set String) attr_ field_ ->+ {-# LINE 1143 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.insert (attrname _lhsIoptions False field_ attr_) _patIattrs+ {-# LINE 4700 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule582 #-}+ {-# LINE 1148 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule582 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ((_lhsIsynmap) :: Attributes) attr_ field_ ->+ {-# LINE 1148 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if field_ == _LHS+ then Map.lookup attr_ _lhsIsynmap+ else if field_ == _LOC+ then Map.lookup attr_ _lhsIlocalAttrTypes+ else Nothing+ {-# LINE 4710 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule583 #-}+ {-# LINE 1153 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule583 = \ ((_lhsIoptions) :: Options) _mbTp ((_patIattrTypes) :: PP_Doc) attr_ field_ ->+ {-# LINE 1153 "./src-ag/ExecutionPlan2Hs.ag" #-}+ maybe empty (\tp -> (attrname _lhsIoptions False field_ attr_) >#< "::" >#< ppTp tp) _mbTp+ >-< _patIattrTypes+ {-# LINE 4717 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule584 #-}+ {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule584 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1545 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 4723 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule585 #-}+ {-# LINE 1550 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule585 = \ _addbang ((_lhsIanyLazyKind) :: Bool) ->+ {-# LINE 1550 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _lhsIanyLazyKind then id else _addbang+ {-# LINE 4729 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule586 #-}+ rule586 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule587 #-}+ rule587 = \ _copy ->+ _copy+ {-# INLINE rule588 #-}+ rule588 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule589 #-}+ rule589 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule590 #-}+ rule590 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule591 #-}+ rule591 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule592 #-}+ rule592 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule593 #-}+ rule593 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule594 #-}+ rule594 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIattrTypes _patIattrs _patIcopy _patIisUnderscore _patIsem_lhs) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOallInhmap _patOallSynmap _patOanyLazyKind _patOinhmap _patOlocalAttrTypes _patOoptions _patOsynmap)+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule595 _patIsem_lhs+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule596 _patIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule597 _patIattrs+ _copy = rule598 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule599 _copy+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule600 _patIisUnderscore+ _patOallInhmap = rule601 _lhsIallInhmap+ _patOallSynmap = rule602 _lhsIallSynmap+ _patOanyLazyKind = rule603 _lhsIanyLazyKind+ _patOinhmap = rule604 _lhsIinhmap+ _patOlocalAttrTypes = rule605 _lhsIlocalAttrTypes+ _patOoptions = rule606 _lhsIoptions+ _patOsynmap = rule607 _lhsIsynmap+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule595 #-}+ {-# LINE 1130 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule595 = \ ((_patIsem_lhs) :: PP_Doc ) ->+ {-# LINE 1130 "./src-ag/ExecutionPlan2Hs.ag" #-}+ text "~" >|< pp_parens _patIsem_lhs+ {-# LINE 4792 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule596 #-}+ rule596 = \ ((_patIattrTypes) :: PP_Doc) ->+ _patIattrTypes+ {-# INLINE rule597 #-}+ rule597 = \ ((_patIattrs) :: Set String) ->+ _patIattrs+ {-# INLINE rule598 #-}+ rule598 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule599 #-}+ rule599 = \ _copy ->+ _copy+ {-# INLINE rule600 #-}+ rule600 = \ ((_patIisUnderscore) :: Bool) ->+ _patIisUnderscore+ {-# INLINE rule601 #-}+ rule601 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule602 #-}+ rule602 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule603 #-}+ rule603 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule604 #-}+ rule604 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule605 #-}+ rule605 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule606 #-}+ rule606 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule607 #-}+ rule607 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _lhsOsem_lhs :: PP_Doc + _lhsOsem_lhs = rule608 ()+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule609 ()+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule610 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule611 ()+ _copy = rule612 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule613 _copy+ __result_ = T_Pattern_vOut40 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOisUnderscore _lhsOsem_lhs+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule608 #-}+ {-# LINE 1129 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule608 = \ (_ :: ()) ->+ {-# LINE 1129 "./src-ag/ExecutionPlan2Hs.ag" #-}+ text "_"+ {-# LINE 4855 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule609 #-}+ {-# LINE 1138 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule609 = \ (_ :: ()) ->+ {-# LINE 1138 "./src-ag/ExecutionPlan2Hs.ag" #-}+ True+ {-# LINE 4861 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule610 #-}+ rule610 = \ (_ :: ()) ->+ empty+ {-# INLINE rule611 #-}+ rule611 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule612 #-}+ rule612 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule613 #-}+ rule613 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { allInhmap_Inh_Patterns :: (Map NontermIdent Attributes), allSynmap_Inh_Patterns :: (Map NontermIdent Attributes), anyLazyKind_Inh_Patterns :: (Bool), inhmap_Inh_Patterns :: (Attributes), localAttrTypes_Inh_Patterns :: (Map Identifier Type), options_Inh_Patterns :: (Options), synmap_Inh_Patterns :: (Attributes) }+data Syn_Patterns = Syn_Patterns { attrTypes_Syn_Patterns :: (PP_Doc), attrs_Syn_Patterns :: (Set String), copy_Syn_Patterns :: (Patterns), sem_lhs_Syn_Patterns :: ([PP_Doc]) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap+ (T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs) <- return (inv_Patterns_s44 sem arg)+ return (Syn_Patterns _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s44 )+ }+newtype T_Patterns_s44 = C_Patterns_s44 {+ inv_Patterns_s44 :: (T_Patterns_v43 )+ }+data T_Patterns_s45 = C_Patterns_s45+type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )+data T_Patterns_vIn43 = T_Patterns_vIn43 (Map NontermIdent Attributes) (Map NontermIdent Attributes) (Bool) (Attributes) (Map Identifier Type) (Options) (Attributes)+data T_Patterns_vOut43 = T_Patterns_vOut43 (PP_Doc) (Set String) (Patterns) ([PP_Doc])+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut40 _hdIattrTypes _hdIattrs _hdIcopy _hdIisUnderscore _hdIsem_lhs) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 _hdOallInhmap _hdOallSynmap _hdOanyLazyKind _hdOinhmap _hdOlocalAttrTypes _hdOoptions _hdOsynmap)+ (T_Patterns_vOut43 _tlIattrTypes _tlIattrs _tlIcopy _tlIsem_lhs) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 _tlOallInhmap _tlOallSynmap _tlOanyLazyKind _tlOinhmap _tlOlocalAttrTypes _tlOoptions _tlOsynmap)+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule614 _hdIattrTypes _tlIattrTypes+ _lhsOattrs :: Set String+ _lhsOattrs = rule615 _hdIattrs _tlIattrs+ _lhsOsem_lhs :: [PP_Doc]+ _lhsOsem_lhs = rule616 _hdIsem_lhs _tlIsem_lhs+ _copy = rule617 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule618 _copy+ _hdOallInhmap = rule619 _lhsIallInhmap+ _hdOallSynmap = rule620 _lhsIallSynmap+ _hdOanyLazyKind = rule621 _lhsIanyLazyKind+ _hdOinhmap = rule622 _lhsIinhmap+ _hdOlocalAttrTypes = rule623 _lhsIlocalAttrTypes+ _hdOoptions = rule624 _lhsIoptions+ _hdOsynmap = rule625 _lhsIsynmap+ _tlOallInhmap = rule626 _lhsIallInhmap+ _tlOallSynmap = rule627 _lhsIallSynmap+ _tlOanyLazyKind = rule628 _lhsIanyLazyKind+ _tlOinhmap = rule629 _lhsIinhmap+ _tlOlocalAttrTypes = rule630 _lhsIlocalAttrTypes+ _tlOoptions = rule631 _lhsIoptions+ _tlOsynmap = rule632 _lhsIsynmap+ __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule614 #-}+ rule614 = \ ((_hdIattrTypes) :: PP_Doc) ((_tlIattrTypes) :: PP_Doc) ->+ _hdIattrTypes >-< _tlIattrTypes+ {-# INLINE rule615 #-}+ rule615 = \ ((_hdIattrs) :: Set String) ((_tlIattrs) :: Set String) ->+ _hdIattrs `Set.union` _tlIattrs+ {-# INLINE rule616 #-}+ rule616 = \ ((_hdIsem_lhs) :: PP_Doc ) ((_tlIsem_lhs) :: [PP_Doc]) ->+ _hdIsem_lhs : _tlIsem_lhs+ {-# INLINE rule617 #-}+ rule617 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule618 #-}+ rule618 = \ _copy ->+ _copy+ {-# INLINE rule619 #-}+ rule619 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule620 #-}+ rule620 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule621 #-}+ rule621 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule622 #-}+ rule622 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule623 #-}+ rule623 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule624 #-}+ rule624 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule625 #-}+ rule625 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule626 #-}+ rule626 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule627 #-}+ rule627 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule628 #-}+ rule628 = \ ((_lhsIanyLazyKind) :: Bool) ->+ _lhsIanyLazyKind+ {-# INLINE rule629 #-}+ rule629 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule630 #-}+ rule630 = \ ((_lhsIlocalAttrTypes) :: Map Identifier Type) ->+ _lhsIlocalAttrTypes+ {-# INLINE rule631 #-}+ rule631 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule632 #-}+ rule632 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 _lhsIallInhmap _lhsIallSynmap _lhsIanyLazyKind _lhsIinhmap _lhsIlocalAttrTypes _lhsIoptions _lhsIsynmap) -> ( let+ _lhsOattrTypes :: PP_Doc+ _lhsOattrTypes = rule633 ()+ _lhsOattrs :: Set String+ _lhsOattrs = rule634 ()+ _lhsOsem_lhs :: [PP_Doc]+ _lhsOsem_lhs = rule635 ()+ _copy = rule636 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule637 _copy+ __result_ = T_Patterns_vOut43 _lhsOattrTypes _lhsOattrs _lhsOcopy _lhsOsem_lhs+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule633 #-}+ rule633 = \ (_ :: ()) ->+ empty+ {-# INLINE rule634 #-}+ rule634 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule635 #-}+ rule635 = \ (_ :: ()) ->+ []+ {-# INLINE rule636 #-}+ rule636 = \ (_ :: ()) ->+ []+ {-# INLINE rule637 #-}+ rule637 = \ _copy ->+ _copy++-- Visit -------------------------------------------------------+-- wrapper+data Inh_Visit = Inh_Visit { allFromToStates_Inh_Visit :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visit :: (Map NontermIdent Attributes), allInitStates_Inh_Visit :: (Map NontermIdent Int), allSynmap_Inh_Visit :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visit :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allintramap_Inh_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visit :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visit :: (Map Identifier Type), childintros_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visit :: (ConstructorIdent), inhmap_Inh_Visit :: (Attributes), mrules_Inh_Visit :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), nextVisits_Inh_Visit :: (Map StateIdentifier StateCtx), nt_Inh_Visit :: (NontermIdent), options_Inh_Visit :: (Options), params_Inh_Visit :: ([Identifier]), prevVisits_Inh_Visit :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visit :: (Map Identifier (Set String)), ruleuses_Inh_Visit :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visit :: (Attributes), terminaldefs_Inh_Visit :: (Set String) }+data Syn_Visit = Syn_Visit { allvisits_Syn_Visit :: ( VisitStateState ), childvisit_Syn_Visit :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_Visit :: (Seq Error), fromToStates_Syn_Visit :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visit :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visit :: (Set String), ruleKinds_Syn_Visit :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visit :: (Map Identifier Int), sem_visit_Syn_Visit :: ( (StateIdentifier,Bool -> PP_Doc) ), t_visits_Syn_Visit :: (PP_Doc), usedArgs_Syn_Visit :: (Set String), visitKinds_Syn_Visit :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visit :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visit :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_Visit #-}+wrap_Visit :: T_Visit -> Inh_Visit -> (Syn_Visit )+wrap_Visit (T_Visit act) (Inh_Visit _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ (T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visit_s47 sem arg)+ return (Syn_Visit _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# INLINE sem_Visit #-}+sem_Visit :: Visit -> T_Visit +sem_Visit ( Visit ident_ from_ to_ inh_ syn_ steps_ kind_ ) = sem_Visit_Visit ident_ from_ to_ inh_ syn_ ( sem_VisitSteps steps_ ) kind_++-- semantic domain+newtype T_Visit = T_Visit {+ attach_T_Visit :: Identity (T_Visit_s47 )+ }+newtype T_Visit_s47 = C_Visit_s47 {+ inv_Visit_s47 :: (T_Visit_v46 )+ }+data T_Visit_s48 = C_Visit_s48+type T_Visit_v46 = (T_Visit_vIn46 ) -> (T_Visit_vOut46 )+data T_Visit_vIn46 = T_Visit_vIn46 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)+data T_Visit_vOut46 = T_Visit_vOut46 ( VisitStateState ) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( (StateIdentifier,Bool -> PP_Doc) ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_Visit_Visit #-}+sem_Visit_Visit :: (VisitIdentifier) -> (StateIdentifier) -> (StateIdentifier) -> (Set Identifier) -> (Set Identifier) -> T_VisitSteps -> (VisitKind) -> T_Visit +sem_Visit_Visit arg_ident_ arg_from_ arg_to_ arg_inh_ arg_syn_ arg_steps_ arg_kind_ = T_Visit (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_Visit_v46 + v46 = \ (T_Visit_vIn46 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIsync_steps _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)+ _lhsOallvisits :: VisitStateState + _lhsOallvisits = rule638 arg_from_ arg_ident_ arg_to_+ _nameT_visit = rule639 _lhsInt arg_ident_+ _nameTIn_visit = rule640 _lhsInt arg_ident_+ _nameTOut_visit = rule641 _lhsInt arg_ident_+ _nameTNext_visit = rule642 _lhsInt arg_to_+ _nextVisitInfo = rule643 _lhsInextVisits arg_to_+ _typecon = rule644 _lhsIoptions arg_kind_+ _t_params = rule645 _lhsIparams+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule646 _addbang1 _inhpart _lhsIoptions _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon+ _inhpart = rule647 _lhsIinhmap _ppTypeList arg_inh_+ _synpart = rule648 _lhsIsynmap _ppTypeList arg_syn_+ _ppTypeList = rule649 _addbang1+ _lhsOsem_visit :: (StateIdentifier,Bool -> PP_Doc) + _lhsOsem_visit = rule650 _addbang _inhpats _lhsIcon _lhsInt _lhsIoptions _nameTIn_visit _nameT_visit _stepsClosing _stepsInitial _stepsIsem_steps _t_params _vname arg_from_ arg_ident_+ _stepsInitial = rule651 arg_kind_+ _stepsClosing = rule652 _addbang _nextStBuild _resultval arg_kind_+ _vname = rule653 arg_ident_+ _inhpats = rule654 _lhsIoptions arg_inh_+ _inhargs = rule655 _lhsIoptions arg_inh_+ _synargs = rule656 _lhsIoptions arg_syn_+ _nextargsMp = rule657 _lhsIallintramap arg_to_+ _nextargs = rule658 _nextargsMp+ _nextst = rule659 _lhsIoptions _nextargs _nextargsMp arg_to_+ _resultval = rule660 _nameTOut_visit _nextStRef _synargs+ (_nextStBuild,_nextStRef) = rule661 _addbang _nextVisitInfo _nextst+ _stepsOkind = rule662 arg_kind_+ _stepsOfmtMode = rule663 arg_kind_+ _stepsOindex = rule664 ()+ _stepsOprevMaxSimRefs = rule665 ()+ _stepsOuseParallel = rule666 ()+ _prevVisitInfo = rule667 _lhsInextVisits arg_from_+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule668 _invokecode arg_ident_+ _invokecode = rule669 _addbang _inhargs _lhsInt _lhsIoptions _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo arg_from_ arg_ident_ arg_kind_ arg_syn_ arg_to_+ _thisintra = rule670 _defsAsMap _nextintra _uses+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule671 _thisintra arg_from_+ _nextintra = rule672 _lhsIallintramap arg_to_+ _uses = rule673 _lhsIoptions _stepsIuses arg_syn_+ _inhVarNms = rule674 _lhsIoptions arg_inh_+ _defs = rule675 _inhVarNms _lhsIterminaldefs _stepsIdefs+ _defsAsMap = rule676 _defs+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule677 arg_ident_ arg_syn_+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule678 arg_ident_ arg_inh_+ _lazyIntrasInh = rule679 _inhVarNms _stepsIdefs arg_kind_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule680 _lazyIntrasInh _stepsIlazyIntras+ _addbang = rule681 _lhsIoptions+ _addbang1 = rule682 _addbang arg_kind_+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule683 arg_from_ arg_ident_ arg_to_+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule684 arg_ident_ arg_kind_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule685 _stepsIerrors+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule686 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule687 _stepsIruleUsage+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule688 _stepsIusedArgs+ _stepsOallFromToStates = rule689 _lhsIallFromToStates+ _stepsOallInitStates = rule690 _lhsIallInitStates+ _stepsOallVisitKinds = rule691 _lhsIallVisitKinds+ _stepsOallchildvisit = rule692 _lhsIallchildvisit+ _stepsOavisitdefs = rule693 _lhsIavisitdefs+ _stepsOavisituses = rule694 _lhsIavisituses+ _stepsOchildTypes = rule695 _lhsIchildTypes+ _stepsOchildintros = rule696 _lhsIchildintros+ _stepsOmrules = rule697 _lhsImrules+ _stepsOoptions = rule698 _lhsIoptions+ _stepsOruledefs = rule699 _lhsIruledefs+ _stepsOruleuses = rule700 _lhsIruleuses+ __result_ = T_Visit_vOut46 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visit_s47 v46+ {-# INLINE rule638 #-}+ {-# LINE 340 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule638 = \ from_ ident_ to_ ->+ {-# LINE 340 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (ident_, from_, to_)+ {-# LINE 5158 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule639 #-}+ {-# LINE 399 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule639 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 399 "./src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTVisit _lhsInt ident_+ {-# LINE 5164 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule640 #-}+ {-# LINE 400 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule640 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 400 "./src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTVisitIn _lhsInt ident_+ {-# LINE 5170 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule641 #-}+ {-# LINE 401 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule641 = \ ((_lhsInt) :: NontermIdent) ident_ ->+ {-# LINE 401 "./src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTVisitOut _lhsInt ident_+ {-# LINE 5176 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule642 #-}+ {-# LINE 402 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule642 = \ ((_lhsInt) :: NontermIdent) to_ ->+ {-# LINE 402 "./src-ag/ExecutionPlan2Hs.ag" #-}+ conNmTNextVisit _lhsInt to_+ {-# LINE 5182 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule643 #-}+ {-# LINE 404 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule643 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) to_ ->+ {-# LINE 404 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault ManyVis to_ _lhsInextVisits+ {-# LINE 5188 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule644 #-}+ {-# LINE 405 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule644 = \ ((_lhsIoptions) :: Options) kind_ ->+ {-# LINE 405 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure _ -> empty+ VisitMonadic -> ppMonadType _lhsIoptions+ {-# LINE 5196 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule645 #-}+ {-# LINE 409 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule645 = \ ((_lhsIparams) :: [Identifier]) ->+ {-# LINE 409 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced _lhsIparams+ {-# LINE 5202 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule646 #-}+ {-# LINE 410 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule646 = \ _addbang1 _inhpart ((_lhsIoptions) :: Options) _nameTIn_visit _nameTNext_visit _nameTOut_visit _nameT_visit _nextVisitInfo _synpart _t_params _typecon ->+ {-# LINE 410 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "type" >#< _nameT_visit >#< _t_params >#< "=" >#<+ pp_parens (_nameTIn_visit >#< _t_params )+ >#< ( if dummyTokenVisit _lhsIoptions+ then "->" >#< dummyType _lhsIoptions True+ else empty+ )+ >#< "->" >#< _typecon >#< pp_parens (_nameTOut_visit >#< _t_params )+ >-< "data" >#< _nameTIn_visit >#< _t_params >#< "=" >#< _nameTIn_visit >#<+ _inhpart+ >-< "data" >#< _nameTOut_visit >#< _t_params >#< "=" >#< _nameTOut_visit >#<+ _synpart >#< case _nextVisitInfo of+ NoneVis -> empty+ _ -> _addbang1 $ pp_parens (_nameTNext_visit >#< _t_params )+ {-# LINE 5220 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule647 #-}+ {-# LINE 423 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule647 = \ ((_lhsIinhmap) :: Attributes) _ppTypeList inh_ ->+ {-# LINE 423 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _ppTypeList inh_ _lhsIinhmap+ {-# LINE 5226 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule648 #-}+ {-# LINE 424 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule648 = \ ((_lhsIsynmap) :: Attributes) _ppTypeList syn_ ->+ {-# LINE 424 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _ppTypeList syn_ _lhsIsynmap+ {-# LINE 5232 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule649 #-}+ {-# LINE 425 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule649 = \ _addbang1 ->+ {-# LINE 425 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \s m -> ppSpaced $ map (\i -> _addbang1 $ pp_parens $ case Map.lookup i m of+ Just tp -> ppTp tp ) $ Set.toList s+ {-# LINE 5239 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule650 #-}+ {-# LINE 717 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule650 = \ _addbang _inhpats ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameT_visit _stepsClosing _stepsInitial ((_stepsIsem_steps) :: PP_Doc) _t_params _vname from_ ident_ ->+ {-# LINE 717 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ( from_+ , \addInlinePragma ->+ ( if noInlinePragmas _lhsIoptions+ then empty+ else if addInlinePragma && aggressiveInlinePragmas _lhsIoptions+ then ppInline _vname+ else if helpInlining _lhsIoptions+ then ppNoInline _vname+ else empty+ )+ >-< "v" >|< ident_ >#< "::" >#< _nameT_visit >#< _t_params+ >-< "v" >|< ident_ >#< "=" >#< "\\" >#< (_addbang $ pp_parens (_nameTIn_visit >#< _inhpats ))+ >#< ( if dummyTokenVisit _lhsIoptions+ then pp $ dummyPat _lhsIoptions True+ else empty+ )+ >#< "->"+ >#< ( if genCostCentres _lhsIoptions+ then ppCostCentre (_vname >|< "_" >|< _lhsInt >|< "_" >|< _lhsIcon)+ else empty+ ) >#< "(" >#< _stepsInitial+ >-< indent 3 (_stepsIsem_steps >-< _stepsClosing >#< ")")+ )+ {-# LINE 5267 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule651 #-}+ {-# LINE 742 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule651 = \ kind_ ->+ {-# LINE 742 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure False -> text "let"+ VisitPure True -> empty+ VisitMonadic -> text "do"+ {-# LINE 5276 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule652 #-}+ {-# LINE 746 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule652 = \ _addbang _nextStBuild _resultval kind_ ->+ {-# LINE 746 "./src-ag/ExecutionPlan2Hs.ag" #-}+ let decls = _nextStBuild+ >-< _addbang (pp resultValName) >#< "=" >#< _resultval+ in case kind_ of+ VisitPure False -> decls+ >-< "in" >#< resultValName+ VisitPure True -> "let" >#< decls+ >-< indent 1 ("in" >#< resultValName)+ VisitMonadic -> "let" >#< decls+ >-< "return" >#< resultValName+ {-# LINE 5290 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule653 #-}+ {-# LINE 755 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule653 = \ ident_ ->+ {-# LINE 755 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "v" >|< ident_+ {-# LINE 5296 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule654 #-}+ {-# LINE 756 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule654 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 756 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ map (\arg -> pp $ attrname _lhsIoptions True _LHS arg) $ Set.toList inh_+ {-# LINE 5302 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule655 #-}+ {-# LINE 757 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule655 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 757 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \chn -> ppSpaced $ map (attrname _lhsIoptions False chn) $ Set.toList inh_+ {-# LINE 5308 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule656 #-}+ {-# LINE 758 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule656 = \ ((_lhsIoptions) :: Options) syn_ ->+ {-# LINE 758 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ map (\arg -> attrname _lhsIoptions False _LHS arg) $ Set.toList syn_+ {-# LINE 5314 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule657 #-}+ {-# LINE 759 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule657 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->+ {-# LINE 759 "./src-ag/ExecutionPlan2Hs.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 5320 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule658 #-}+ {-# LINE 760 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule658 = \ _nextargsMp ->+ {-# LINE 760 "./src-ag/ExecutionPlan2Hs.ag" #-}+ ppSpaced $ Map.keys $ _nextargsMp+ {-# LINE 5326 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule659 #-}+ {-# LINE 761 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule659 = \ ((_lhsIoptions) :: Options) _nextargs _nextargsMp to_ ->+ {-# LINE 761 "./src-ag/ExecutionPlan2Hs.ag" #-}+ "st" >|< to_ >#< _nextargs >#< dummyArg _lhsIoptions (Map.null _nextargsMp )+ {-# LINE 5332 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule660 #-}+ {-# LINE 762 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule660 = \ _nameTOut_visit _nextStRef _synargs ->+ {-# LINE 762 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _nameTOut_visit >#< _synargs >#< _nextStRef+ {-# LINE 5338 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule661 #-}+ {-# LINE 764 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule661 = \ _addbang _nextVisitInfo _nextst ->+ {-# LINE 764 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _nextVisitInfo of+ NoneVis -> (empty, empty)+ _ -> (_addbang (pp nextStName) >#< "=" >#< _nextst , pp nextStName)+ {-# LINE 5346 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule662 #-}+ {-# LINE 778 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule662 = \ kind_ ->+ {-# LINE 778 "./src-ag/ExecutionPlan2Hs.ag" #-}+ kind_+ {-# LINE 5352 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule663 #-}+ {-# LINE 829 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule663 = \ kind_ ->+ {-# LINE 829 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure False -> FormatLetDecl+ VisitPure True -> FormatLetLine+ VisitMonadic -> FormatDo+ {-# LINE 5361 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule664 #-}+ {-# LINE 878 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule664 = \ (_ :: ()) ->+ {-# LINE 878 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 5367 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule665 #-}+ {-# LINE 885 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule665 = \ (_ :: ()) ->+ {-# LINE 885 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 5373 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule666 #-}+ {-# LINE 901 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule666 = \ (_ :: ()) ->+ {-# LINE 901 "./src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 5379 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule667 #-}+ {-# LINE 1220 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule667 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) from_ ->+ {-# LINE 1220 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault ManyVis from_ _lhsInextVisits+ {-# LINE 5385 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule668 #-}+ {-# LINE 1221 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule668 = \ _invokecode ident_ ->+ {-# LINE 1221 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ _invokecode+ {-# LINE 5391 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule669 #-}+ {-# LINE 1222 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule669 = \ _addbang _inhargs ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) _nameTIn_visit _nameTOut_visit _nextVisitInfo _prevVisitInfo from_ ident_ kind_ syn_ to_ ->+ {-# LINE 1222 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \chn kind ->+ if kind `compatibleKind` kind_+ then Right $+ let pat | isLazyKind kind_ = pat0+ | otherwise = _addbang pat0+ pat0 = pp_parens pat1+ pat1 = _nameTOut_visit >#< (ppSpaced $ map (attrname _lhsIoptions True chn) $ Set.toList syn_)+ >#< cont+ cont = case _nextVisitInfo of+ NoneVis -> empty+ _ -> ch1+ ch0 = text $ stname chn from_+ ch1 = text $ stname chn to_+ expr = case (kind, kind_) of+ (VisitPure _, VisitPure _) -> expr0+ (VisitPure _, VisitMonadic) -> unMon _lhsIoptions >#< expr0+ (VisitMonadic, VisitPure _) -> "return" >#< expr0+ (VisitMonadic, VisitMonadic) -> expr0+ expr0 = case _prevVisitInfo of+ NoneVis -> error "error: invocation of a visit from a state that has no next visits"+ OneVis _ -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0 >#< args+ ManyVis -> "inv_" >|< _lhsInt >|< "_s" >|< from_ >#< ch0+ >#< "K_" >|< _lhsInt >|< "_v" >|< ident_ >#< args+ args = pp_parens args0 >#< args1+ args0 = _nameTIn_visit >#< _inhargs chn+ args1 | dummyTokenVisit _lhsIoptions = pp $ dummyArg _lhsIoptions True+ | otherwise = empty+ in (pat, expr)+ else Left $ IncompatibleVisitKind chn ident_ kind kind_+ {-# LINE 5425 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule670 #-}+ {-# LINE 1318 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule670 = \ _defsAsMap _nextintra _uses ->+ {-# LINE 1318 "./src-ag/ExecutionPlan2Hs.ag" #-}+ (_uses `Map.union` _nextintra ) `Map.difference` _defsAsMap+ {-# LINE 5431 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule671 #-}+ {-# LINE 1319 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule671 = \ _thisintra from_ ->+ {-# LINE 1319 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton from_ _thisintra+ {-# LINE 5437 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule672 #-}+ {-# LINE 1320 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule672 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) to_ ->+ {-# LINE 1320 "./src-ag/ExecutionPlan2Hs.ag" #-}+ maybe Map.empty id $ Map.lookup to_ _lhsIallintramap+ {-# LINE 5443 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule673 #-}+ {-# LINE 1321 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule673 = \ ((_lhsIoptions) :: Options) ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) syn_ ->+ {-# LINE 1321 "./src-ag/ExecutionPlan2Hs.ag" #-}+ let mp1 = _stepsIuses+ mp2 = Map.fromList [ (lhsname _lhsIoptions False i, Just (AttrSyn _LHS i)) | i <- Set.elems syn_ ]+ in mp1 `Map.union` mp2+ {-# LINE 5451 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule674 #-}+ {-# LINE 1324 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule674 = \ ((_lhsIoptions) :: Options) inh_ ->+ {-# LINE 1324 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.map (lhsname _lhsIoptions True) inh_+ {-# LINE 5457 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule675 #-}+ {-# LINE 1325 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule675 = \ _inhVarNms ((_lhsIterminaldefs) :: Set String) ((_stepsIdefs) :: Set String) ->+ {-# LINE 1325 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIdefs `Set.union` _inhVarNms `Set.union` _lhsIterminaldefs+ {-# LINE 5463 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule676 #-}+ {-# LINE 1326 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule676 = \ _defs ->+ {-# LINE 1326 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.fromList [ (a, Nothing) | a <- Set.elems _defs ]+ {-# LINE 5469 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule677 #-}+ {-# LINE 1350 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule677 = \ ident_ syn_ ->+ {-# LINE 1350 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ syn_+ {-# LINE 5475 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule678 #-}+ {-# LINE 1351 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule678 = \ ident_ inh_ ->+ {-# LINE 1351 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ inh_+ {-# LINE 5481 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule679 #-}+ {-# LINE 1383 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule679 = \ _inhVarNms ((_stepsIdefs) :: Set String) kind_ ->+ {-# LINE 1383 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case kind_ of+ VisitPure False -> _inhVarNms `Set.union` _stepsIdefs+ _ -> Set.empty+ {-# LINE 5489 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule680 #-}+ {-# LINE 1386 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule680 = \ _lazyIntrasInh ((_stepsIlazyIntras) :: Set String) ->+ {-# LINE 1386 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lazyIntrasInh `Set.union` _stepsIlazyIntras+ {-# LINE 5495 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule681 #-}+ {-# LINE 1539 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule681 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1539 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 5501 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule682 #-}+ {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule682 = \ _addbang kind_ ->+ {-# LINE 1547 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if isLazyKind kind_ then id else _addbang+ {-# LINE 5507 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule683 #-}+ {-# LINE 1574 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule683 = \ from_ ident_ to_ ->+ {-# LINE 1574 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ (from_, to_)+ {-# LINE 5513 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule684 #-}+ {-# LINE 1618 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule684 = \ ident_ kind_ ->+ {-# LINE 1618 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton ident_ kind_+ {-# LINE 5519 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule685 #-}+ rule685 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule686 #-}+ rule686 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule687 #-}+ rule687 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule688 #-}+ rule688 = \ ((_stepsIusedArgs) :: Set String) ->+ _stepsIusedArgs+ {-# INLINE rule689 #-}+ rule689 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule690 #-}+ rule690 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule691 #-}+ rule691 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule692 #-}+ rule692 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule693 #-}+ rule693 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule694 #-}+ rule694 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule695 #-}+ rule695 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule696 #-}+ rule696 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule697 #-}+ rule697 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule698 #-}+ rule698 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule699 #-}+ rule699 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule700 #-}+ rule700 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses++-- VisitStep ---------------------------------------------------+-- wrapper+data Inh_VisitStep = Inh_VisitStep { allFromToStates_Inh_VisitStep :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitStep :: (Map NontermIdent Int), allVisitKinds_Inh_VisitStep :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitStep :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitStep :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitStep :: (Map Identifier Type), childintros_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), fmtMode_Inh_VisitStep :: (FormatMode), index_Inh_VisitStep :: (Int), isLast_Inh_VisitStep :: (Bool), kind_Inh_VisitStep :: (VisitKind), mrules_Inh_VisitStep :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), options_Inh_VisitStep :: (Options), prevMaxSimRefs_Inh_VisitStep :: (Int), ruledefs_Inh_VisitStep :: (Map Identifier (Set String)), ruleuses_Inh_VisitStep :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitStep :: (Bool) }+data Syn_VisitStep = Syn_VisitStep { defs_Syn_VisitStep :: (Set String), errors_Syn_VisitStep :: (Seq Error), index_Syn_VisitStep :: (Int), isLast_Syn_VisitStep :: (Bool), lazyIntras_Syn_VisitStep :: (Set String), prevMaxSimRefs_Syn_VisitStep :: (Int), ruleKinds_Syn_VisitStep :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitStep :: (Map Identifier Int), sem_steps_Syn_VisitStep :: (PP_Doc), sync_steps_Syn_VisitStep :: (PP_Doc), usedArgs_Syn_VisitStep :: (Set String), uses_Syn_VisitStep :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitStep :: (Map VisitIdentifier VisitKind) }+{-# INLINABLE wrap_VisitStep #-}+wrap_VisitStep :: T_VisitStep -> Inh_VisitStep -> (Syn_VisitStep )+wrap_VisitStep (T_VisitStep act) (Inh_VisitStep _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel+ (T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds) <- return (inv_VisitStep_s50 sem arg)+ return (Syn_VisitStep _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds)+ )++-- cata+{-# NOINLINE sem_VisitStep #-}+sem_VisitStep :: VisitStep -> T_VisitStep +sem_VisitStep ( Sem name_ ) = sem_VisitStep_Sem name_+sem_VisitStep ( ChildVisit child_ nonterm_ visit_ ) = sem_VisitStep_ChildVisit child_ nonterm_ visit_+sem_VisitStep ( PureGroup steps_ ordered_ ) = sem_VisitStep_PureGroup ( sem_VisitSteps steps_ ) ordered_+sem_VisitStep ( Sim steps_ ) = sem_VisitStep_Sim ( sem_VisitSteps steps_ )+sem_VisitStep ( ChildIntro child_ ) = sem_VisitStep_ChildIntro child_++-- semantic domain+newtype T_VisitStep = T_VisitStep {+ attach_T_VisitStep :: Identity (T_VisitStep_s50 )+ }+newtype T_VisitStep_s50 = C_VisitStep_s50 {+ inv_VisitStep_s50 :: (T_VisitStep_v49 )+ }+data T_VisitStep_s51 = C_VisitStep_s51+type T_VisitStep_v49 = (T_VisitStep_vIn49 ) -> (T_VisitStep_vOut49 )+data T_VisitStep_vIn49 = T_VisitStep_vIn49 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (Bool) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)+data T_VisitStep_vOut49 = T_VisitStep_vOut49 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)+{-# NOINLINE sem_VisitStep_Sem #-}+sem_VisitStep_Sem :: (Identifier) -> T_VisitStep +sem_VisitStep_Sem arg_name_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _ruleItf = rule701 _lhsImrules arg_name_+ _lhsOerrors :: Seq Error+ (_lhsOerrors,_sem_steps) = rule702 _lhsIfmtMode _lhsIkind _ruleItf+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule703 arg_name_+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule704 _lhsIkind arg_name_+ _lhsOdefs :: Set String+ _lhsOdefs = rule705 _lhsIruledefs arg_name_+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule706 _lhsIruleuses arg_name_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule707 ()+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule708 _sem_steps+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule709 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule710 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule711 ()+ _lhsOindex :: Int+ _lhsOindex = rule712 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule713 _lhsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule714 _lhsIprevMaxSimRefs+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule701 #-}+ {-# LINE 787 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule701 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) name_ ->+ {-# LINE 787 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error $ "Rule " ++ show name_ ++ " not found") name_ _lhsImrules+ {-# LINE 5645 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule702 #-}+ {-# LINE 788 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule702 = \ ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) _ruleItf ->+ {-# LINE 788 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _ruleItf _lhsIkind _lhsIfmtMode of+ Left e -> (Seq.singleton e, empty)+ Right stmt -> (Seq.empty, stmt)+ {-# LINE 5653 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule703 #-}+ {-# LINE 1271 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule703 = \ name_ ->+ {-# LINE 1271 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ 1+ {-# LINE 5659 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule704 #-}+ {-# LINE 1281 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule704 = \ ((_lhsIkind) :: VisitKind) name_ ->+ {-# LINE 1281 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.singleton name_ (Set.singleton _lhsIkind)+ {-# LINE 5665 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule705 #-}+ {-# LINE 1366 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule705 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) name_ ->+ {-# LINE 1366 "./src-ag/ExecutionPlan2Hs.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruledefs+ {-# LINE 5671 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule706 #-}+ {-# LINE 1367 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule706 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) name_ ->+ {-# LINE 1367 "./src-ag/ExecutionPlan2Hs.ag" #-}+ maybe (error "Rule not found") id $ Map.lookup name_ _lhsIruleuses+ {-# LINE 5677 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule707 #-}+ rule707 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule708 #-}+ rule708 = \ _sem_steps ->+ _sem_steps+ {-# INLINE rule709 #-}+ rule709 = \ (_ :: ()) ->+ empty+ {-# INLINE rule710 #-}+ rule710 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule711 #-}+ rule711 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule712 #-}+ rule712 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule713 #-}+ rule713 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+ {-# INLINE rule714 #-}+ rule714 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+{-# NOINLINE sem_VisitStep_ChildVisit #-}+sem_VisitStep_ChildVisit :: (Identifier) -> (NontermIdent) -> (VisitIdentifier) -> T_VisitStep +sem_VisitStep_ChildVisit arg_child_ _ arg_visit_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _visitItf = rule715 _lhsIallchildvisit arg_visit_+ _lhsOerrors :: Seq Error+ (_lhsOerrors,_patPP,_exprPP) = rule716 _lhsIkind _visitItf arg_child_+ _useParallel = rule717 _lhsIisLast _lhsIuseParallel+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule718 _addbang _convToMonad _exprPP _lhsIfmtMode _lhsIindex _lhsIkind _patPP _useParallel+ _convToMonad = rule719 _callKind+ _callKind = rule720 _lhsIallVisitKinds arg_visit_+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule721 _lhsIindex _patPP _useParallel+ _lhsOdefs :: Set String+ _lhsOdefs = rule722 _lhsIavisitdefs _lhsIoptions _to arg_child_ arg_visit_+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule723 _from _lhsIavisituses _lhsIoptions arg_child_ arg_visit_+ _addbang = rule724 _lhsIoptions+ (_from,_to) = rule725 _lhsIallFromToStates arg_visit_+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule726 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule727 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule728 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule729 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule730 ()+ _lhsOindex :: Int+ _lhsOindex = rule731 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule732 _lhsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule733 _lhsIprevMaxSimRefs+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule715 #-}+ {-# LINE 796 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule715 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) visit_ ->+ {-# LINE 796 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error $ "Visit " ++ show visit_ ++ " not found") visit_ _lhsIallchildvisit+ {-# LINE 5749 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule716 #-}+ {-# LINE 797 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule716 = \ ((_lhsIkind) :: VisitKind) _visitItf child_ ->+ {-# LINE 797 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _visitItf child_ _lhsIkind of+ Left e -> (Seq.singleton e, empty, empty)+ Right (pat,expr) -> (Seq.empty, pat, expr)+ {-# LINE 5757 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule717 #-}+ {-# LINE 801 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule717 = \ ((_lhsIisLast) :: Bool) ((_lhsIuseParallel) :: Bool) ->+ {-# LINE 801 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIuseParallel && not _lhsIisLast+ {-# LINE 5763 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule718 #-}+ {-# LINE 802 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule718 = \ _addbang _convToMonad _exprPP ((_lhsIfmtMode) :: FormatMode) ((_lhsIindex) :: Int) ((_lhsIkind) :: VisitKind) _patPP _useParallel ->+ {-# LINE 802 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _useParallel+ then _addbang ("sync_" >|< _lhsIindex) >#< "<- newEmptyMVar"+ >-< "forkIO" >#< pp_parens (_convToMonad >#< pp_parens _exprPP >#< ">>= \\" >#< _addbang (pp parResultName) >#< " -> putMVar sync_" >|< _lhsIindex >#< parResultName)+ else let decl = case _lhsIkind of+ VisitPure _ -> _patPP >#< "=" >#< _exprPP+ VisitMonadic -> _patPP >#< "<-" >#< _exprPP+ in fmtDecl False _lhsIfmtMode decl+ {-# LINE 5775 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule719 #-}+ {-# LINE 809 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule719 = \ _callKind ->+ {-# LINE 809 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _callKind of+ VisitPure _ -> text "return"+ VisitMonadic -> empty+ {-# LINE 5783 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule720 #-}+ {-# LINE 812 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule720 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) visit_ ->+ {-# LINE 812 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error "visit kind should be in the map") visit_ _lhsIallVisitKinds+ {-# LINE 5789 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule721 #-}+ {-# LINE 820 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule721 = \ ((_lhsIindex) :: Int) _patPP _useParallel ->+ {-# LINE 820 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _useParallel+ then _patPP >#< "<-" >#< "takeMVar sync_" >|< _lhsIindex+ else empty+ {-# LINE 5797 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule722 #-}+ {-# LINE 1368 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule722 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) _to child_ visit_ ->+ {-# LINE 1368 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Set.insert (stname child_ _to) $ maybe (error "Visit not found") (Set.map $ attrname _lhsIoptions True child_) $ Map.lookup visit_ _lhsIavisitdefs+ {-# LINE 5803 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule723 #-}+ {-# LINE 1369 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule723 = \ _from ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ((_lhsIoptions) :: Options) child_ visit_ ->+ {-# LINE 1369 "./src-ag/ExecutionPlan2Hs.ag" #-}+ let convert attrs = Map.fromList [ (attrname _lhsIoptions False child_ attr, Just $ mkNonLocalAttr True child_ attr) | attr <- Set.elems attrs ]+ in Map.insert (stname child_ _from) Nothing $ convert $+ maybe (error "Visit not found") id $ Map.lookup visit_ _lhsIavisituses+ {-# LINE 5811 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule724 #-}+ {-# LINE 1544 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule724 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 1544 "./src-ag/ExecutionPlan2Hs.ag" #-}+ \x -> if bangpats _lhsIoptions then "!" >|< x else x+ {-# LINE 5817 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule725 #-}+ {-# LINE 1580 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule725 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) visit_ ->+ {-# LINE 1580 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error "visit not in allFromToStates") visit_ _lhsIallFromToStates+ {-# LINE 5823 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule726 #-}+ rule726 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule727 #-}+ rule727 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule728 #-}+ rule728 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule729 #-}+ rule729 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule730 #-}+ rule730 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule731 #-}+ rule731 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule732 #-}+ rule732 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+ {-# INLINE rule733 #-}+ rule733 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+{-# NOINLINE sem_VisitStep_PureGroup #-}+sem_VisitStep_PureGroup :: T_VisitSteps -> (Bool) -> T_VisitStep +sem_VisitStep_PureGroup arg_steps_ arg_ordered_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIsync_steps _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)+ _stepsOkind = rule734 arg_ordered_+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule735 _lhsIfmtMode _stepsIsem_steps+ _stepsOfmtMode = rule736 _lhsIfmtMode+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule737 _stepsIdefs _stepsIlazyIntras arg_ordered_+ _lhsOdefs :: Set String+ _lhsOdefs = rule738 _stepsIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule739 _stepsIerrors+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule740 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule741 _stepsIruleUsage+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule742 _stepsIsync_steps+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule743 _stepsIusedArgs+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule744 _stepsIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule745 _stepsIvisitKinds+ _lhsOindex :: Int+ _lhsOindex = rule746 _stepsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule747 _stepsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule748 _stepsIprevMaxSimRefs+ _stepsOallFromToStates = rule749 _lhsIallFromToStates+ _stepsOallInitStates = rule750 _lhsIallInitStates+ _stepsOallVisitKinds = rule751 _lhsIallVisitKinds+ _stepsOallchildvisit = rule752 _lhsIallchildvisit+ _stepsOavisitdefs = rule753 _lhsIavisitdefs+ _stepsOavisituses = rule754 _lhsIavisituses+ _stepsOchildTypes = rule755 _lhsIchildTypes+ _stepsOchildintros = rule756 _lhsIchildintros+ _stepsOindex = rule757 _lhsIindex+ _stepsOmrules = rule758 _lhsImrules+ _stepsOoptions = rule759 _lhsIoptions+ _stepsOprevMaxSimRefs = rule760 _lhsIprevMaxSimRefs+ _stepsOruledefs = rule761 _lhsIruledefs+ _stepsOruleuses = rule762 _lhsIruleuses+ _stepsOuseParallel = rule763 _lhsIuseParallel+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule734 #-}+ {-# LINE 782 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule734 = \ ordered_ ->+ {-# LINE 782 "./src-ag/ExecutionPlan2Hs.ag" #-}+ VisitPure ordered_+ {-# LINE 5908 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule735 #-}+ {-# LINE 814 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule735 = \ ((_lhsIfmtMode) :: FormatMode) ((_stepsIsem_steps) :: PP_Doc) ->+ {-# LINE 814 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _lhsIfmtMode of+ FormatDo -> "let" >#< _stepsIsem_steps+ _ -> _stepsIsem_steps+ {-# LINE 5916 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule736 #-}+ {-# LINE 835 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule736 = \ ((_lhsIfmtMode) :: FormatMode) ->+ {-# LINE 835 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _lhsIfmtMode of+ FormatDo -> FormatLetDecl+ mode -> mode+ {-# LINE 5924 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule737 #-}+ {-# LINE 1389 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule737 = \ ((_stepsIdefs) :: Set String) ((_stepsIlazyIntras) :: Set String) ordered_ ->+ {-# LINE 1389 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if ordered_+ then _stepsIlazyIntras+ else _stepsIdefs+ {-# LINE 5932 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule738 #-}+ rule738 = \ ((_stepsIdefs) :: Set String) ->+ _stepsIdefs+ {-# INLINE rule739 #-}+ rule739 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule740 #-}+ rule740 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule741 #-}+ rule741 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule742 #-}+ rule742 = \ ((_stepsIsync_steps) :: PP_Doc) ->+ _stepsIsync_steps+ {-# INLINE rule743 #-}+ rule743 = \ ((_stepsIusedArgs) :: Set String) ->+ _stepsIusedArgs+ {-# INLINE rule744 #-}+ rule744 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->+ _stepsIuses+ {-# INLINE rule745 #-}+ rule745 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _stepsIvisitKinds+ {-# INLINE rule746 #-}+ rule746 = \ ((_stepsIindex) :: Int) ->+ _stepsIindex+ {-# INLINE rule747 #-}+ rule747 = \ ((_stepsIisLast) :: Bool) ->+ _stepsIisLast+ {-# INLINE rule748 #-}+ rule748 = \ ((_stepsIprevMaxSimRefs) :: Int) ->+ _stepsIprevMaxSimRefs+ {-# INLINE rule749 #-}+ rule749 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule750 #-}+ rule750 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule751 #-}+ rule751 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule752 #-}+ rule752 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule753 #-}+ rule753 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule754 #-}+ rule754 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule755 #-}+ rule755 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule756 #-}+ rule756 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule757 #-}+ rule757 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule758 #-}+ rule758 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule759 #-}+ rule759 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule760 #-}+ rule760 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+ {-# INLINE rule761 #-}+ rule761 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule762 #-}+ rule762 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule763 #-}+ rule763 = \ ((_lhsIuseParallel) :: Bool) ->+ _lhsIuseParallel+{-# NOINLINE sem_VisitStep_Sim #-}+sem_VisitStep_Sim :: T_VisitSteps -> T_VisitStep +sem_VisitStep_Sim arg_steps_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _stepsX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_steps_))+ (T_VisitSteps_vOut52 _stepsIdefs _stepsIerrors _stepsIindex _stepsIisLast _stepsIlazyIntras _stepsIprevMaxSimRefs _stepsIruleKinds _stepsIruleUsage _stepsIsem_steps _stepsIsize _stepsIsync_steps _stepsIusedArgs _stepsIuses _stepsIvisitKinds) = inv_VisitSteps_s53 _stepsX53 (T_VisitSteps_vIn52 _stepsOallFromToStates _stepsOallInitStates _stepsOallVisitKinds _stepsOallchildvisit _stepsOavisitdefs _stepsOavisituses _stepsOchildTypes _stepsOchildintros _stepsOfmtMode _stepsOindex _stepsOkind _stepsOmrules _stepsOoptions _stepsOprevMaxSimRefs _stepsOruledefs _stepsOruleuses _stepsOuseParallel)+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule764 _stepsIsem_steps _stepsIsync_steps+ _stepsOindex = rule765 ()+ _lhsOindex :: Int+ _lhsOindex = rule766 _lhsIindex+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule767 _lhsIprevMaxSimRefs _stepsIindex _useParallel+ _useParallel = rule768 _isMonadic _lhsIoptions _stepsIsize+ _isMonadic = rule769 _lhsIkind+ _lhsOdefs :: Set String+ _lhsOdefs = rule770 _stepsIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule771 _stepsIerrors+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule772 _stepsIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule773 _stepsIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule774 _stepsIruleUsage+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule775 _stepsIsync_steps+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule776 _stepsIusedArgs+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule777 _stepsIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule778 _stepsIvisitKinds+ _lhsOisLast :: Bool+ _lhsOisLast = rule779 _stepsIisLast+ _stepsOallFromToStates = rule780 _lhsIallFromToStates+ _stepsOallInitStates = rule781 _lhsIallInitStates+ _stepsOallVisitKinds = rule782 _lhsIallVisitKinds+ _stepsOallchildvisit = rule783 _lhsIallchildvisit+ _stepsOavisitdefs = rule784 _lhsIavisitdefs+ _stepsOavisituses = rule785 _lhsIavisituses+ _stepsOchildTypes = rule786 _lhsIchildTypes+ _stepsOchildintros = rule787 _lhsIchildintros+ _stepsOfmtMode = rule788 _lhsIfmtMode+ _stepsOkind = rule789 _lhsIkind+ _stepsOmrules = rule790 _lhsImrules+ _stepsOoptions = rule791 _lhsIoptions+ _stepsOprevMaxSimRefs = rule792 _lhsIprevMaxSimRefs+ _stepsOruledefs = rule793 _lhsIruledefs+ _stepsOruleuses = rule794 _lhsIruleuses+ _stepsOuseParallel = rule795 _useParallel+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule764 #-}+ {-# LINE 813 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule764 = \ ((_stepsIsem_steps) :: PP_Doc) ((_stepsIsync_steps) :: PP_Doc) ->+ {-# LINE 813 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _stepsIsem_steps >-< _stepsIsync_steps+ {-# LINE 6073 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule765 #-}+ {-# LINE 879 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule765 = \ (_ :: ()) ->+ {-# LINE 879 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 6079 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule766 #-}+ {-# LINE 880 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule766 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 880 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 6085 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule767 #-}+ {-# LINE 887 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule767 = \ ((_lhsIprevMaxSimRefs) :: Int) ((_stepsIindex) :: Int) _useParallel ->+ {-# LINE 887 "./src-ag/ExecutionPlan2Hs.ag" #-}+ if _useParallel+ then _lhsIprevMaxSimRefs `max` (_stepsIindex - 1)+ else _lhsIprevMaxSimRefs+ {-# LINE 6093 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule768 #-}+ {-# LINE 902 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule768 = \ _isMonadic ((_lhsIoptions) :: Options) ((_stepsIsize) :: Int) ->+ {-# LINE 902 "./src-ag/ExecutionPlan2Hs.ag" #-}+ parallelInvoke _lhsIoptions && _stepsIsize > 1 && _isMonadic+ {-# LINE 6099 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule769 #-}+ {-# LINE 903 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule769 = \ ((_lhsIkind) :: VisitKind) ->+ {-# LINE 903 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _lhsIkind of+ VisitMonadic -> True+ _ -> False+ {-# LINE 6107 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule770 #-}+ rule770 = \ ((_stepsIdefs) :: Set String) ->+ _stepsIdefs+ {-# INLINE rule771 #-}+ rule771 = \ ((_stepsIerrors) :: Seq Error) ->+ _stepsIerrors+ {-# INLINE rule772 #-}+ rule772 = \ ((_stepsIlazyIntras) :: Set String) ->+ _stepsIlazyIntras+ {-# INLINE rule773 #-}+ rule773 = \ ((_stepsIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _stepsIruleKinds+ {-# INLINE rule774 #-}+ rule774 = \ ((_stepsIruleUsage) :: Map Identifier Int) ->+ _stepsIruleUsage+ {-# INLINE rule775 #-}+ rule775 = \ ((_stepsIsync_steps) :: PP_Doc) ->+ _stepsIsync_steps+ {-# INLINE rule776 #-}+ rule776 = \ ((_stepsIusedArgs) :: Set String) ->+ _stepsIusedArgs+ {-# INLINE rule777 #-}+ rule777 = \ ((_stepsIuses) :: Map String (Maybe NonLocalAttr)) ->+ _stepsIuses+ {-# INLINE rule778 #-}+ rule778 = \ ((_stepsIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _stepsIvisitKinds+ {-# INLINE rule779 #-}+ rule779 = \ ((_stepsIisLast) :: Bool) ->+ _stepsIisLast+ {-# INLINE rule780 #-}+ rule780 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule781 #-}+ rule781 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule782 #-}+ rule782 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule783 #-}+ rule783 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule784 #-}+ rule784 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule785 #-}+ rule785 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule786 #-}+ rule786 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule787 #-}+ rule787 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule788 #-}+ rule788 = \ ((_lhsIfmtMode) :: FormatMode) ->+ _lhsIfmtMode+ {-# INLINE rule789 #-}+ rule789 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule790 #-}+ rule790 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule791 #-}+ rule791 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule792 #-}+ rule792 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+ {-# INLINE rule793 #-}+ rule793 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule794 #-}+ rule794 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule795 #-}+ rule795 = \ _useParallel ->+ _useParallel+{-# NOINLINE sem_VisitStep_ChildIntro #-}+sem_VisitStep_ChildIntro :: (Identifier) -> T_VisitStep +sem_VisitStep_ChildIntro arg_child_ = T_VisitStep (return st50) where+ {-# NOINLINE st50 #-}+ st50 = let+ v49 :: T_VisitStep_v49 + v49 = \ (T_VisitStep_vIn49 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIisLast _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _attachItf = rule796 _lhsIchildintros arg_child_+ _lhsOerrors :: Seq Error+ _lhsOsem_steps :: PP_Doc+ _lhsOdefs :: Set String+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ (_lhsOerrors,_lhsOsem_steps,_lhsOdefs,_lhsOuses) = rule797 _attachItf _lhsIfmtMode _lhsIkind+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule798 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule799 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule800 ()+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule801 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule802 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule803 ()+ _lhsOindex :: Int+ _lhsOindex = rule804 _lhsIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule805 _lhsIisLast+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule806 _lhsIprevMaxSimRefs+ __result_ = T_VisitStep_vOut49 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitStep_s50 v49+ {-# INLINE rule796 #-}+ {-# LINE 791 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule796 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) child_ ->+ {-# LINE 791 "./src-ag/ExecutionPlan2Hs.ag" #-}+ Map.findWithDefault (error $ "Child " ++ show child_ ++ " not found") child_ _lhsIchildintros+ {-# LINE 6225 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule797 #-}+ {-# LINE 793 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule797 = \ _attachItf ((_lhsIfmtMode) :: FormatMode) ((_lhsIkind) :: VisitKind) ->+ {-# LINE 793 "./src-ag/ExecutionPlan2Hs.ag" #-}+ case _attachItf _lhsIkind _lhsIfmtMode of+ Left e -> (Seq.singleton e, empty, Set.empty, Map.empty)+ Right (code, defs, uses) -> (Seq.empty, code, defs, uses)+ {-# LINE 6233 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule798 #-}+ rule798 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule799 #-}+ rule799 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule800 #-}+ rule800 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule801 #-}+ rule801 = \ (_ :: ()) ->+ empty+ {-# INLINE rule802 #-}+ rule802 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule803 #-}+ rule803 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule804 #-}+ rule804 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule805 #-}+ rule805 = \ ((_lhsIisLast) :: Bool) ->+ _lhsIisLast+ {-# INLINE rule806 #-}+ rule806 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs++-- VisitSteps --------------------------------------------------+-- wrapper+data Inh_VisitSteps = Inh_VisitSteps { allFromToStates_Inh_VisitSteps :: (Map VisitIdentifier (Int,Int)), allInitStates_Inh_VisitSteps :: (Map NontermIdent Int), allVisitKinds_Inh_VisitSteps :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_VisitSteps :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), avisitdefs_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_VisitSteps :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_VisitSteps :: (Map Identifier Type), childintros_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), fmtMode_Inh_VisitSteps :: (FormatMode), index_Inh_VisitSteps :: (Int), kind_Inh_VisitSteps :: (VisitKind), mrules_Inh_VisitSteps :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), options_Inh_VisitSteps :: (Options), prevMaxSimRefs_Inh_VisitSteps :: (Int), ruledefs_Inh_VisitSteps :: (Map Identifier (Set String)), ruleuses_Inh_VisitSteps :: (Map Identifier (Map String (Maybe NonLocalAttr))), useParallel_Inh_VisitSteps :: (Bool) }+data Syn_VisitSteps = Syn_VisitSteps { defs_Syn_VisitSteps :: (Set String), errors_Syn_VisitSteps :: (Seq Error), index_Syn_VisitSteps :: (Int), isLast_Syn_VisitSteps :: (Bool), lazyIntras_Syn_VisitSteps :: (Set String), prevMaxSimRefs_Syn_VisitSteps :: (Int), ruleKinds_Syn_VisitSteps :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_VisitSteps :: (Map Identifier Int), sem_steps_Syn_VisitSteps :: (PP_Doc), size_Syn_VisitSteps :: (Int), sync_steps_Syn_VisitSteps :: (PP_Doc), usedArgs_Syn_VisitSteps :: (Set String), uses_Syn_VisitSteps :: (Map String (Maybe NonLocalAttr)), visitKinds_Syn_VisitSteps :: (Map VisitIdentifier VisitKind) }+{-# INLINABLE wrap_VisitSteps #-}+wrap_VisitSteps :: T_VisitSteps -> Inh_VisitSteps -> (Syn_VisitSteps )+wrap_VisitSteps (T_VisitSteps act) (Inh_VisitSteps _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel+ (T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds) <- return (inv_VisitSteps_s53 sem arg)+ return (Syn_VisitSteps _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds)+ )++-- cata+{-# NOINLINE sem_VisitSteps #-}+sem_VisitSteps :: VisitSteps -> T_VisitSteps +sem_VisitSteps list = Prelude.foldr sem_VisitSteps_Cons sem_VisitSteps_Nil (Prelude.map sem_VisitStep list)++-- semantic domain+newtype T_VisitSteps = T_VisitSteps {+ attach_T_VisitSteps :: Identity (T_VisitSteps_s53 )+ }+newtype T_VisitSteps_s53 = C_VisitSteps_s53 {+ inv_VisitSteps_s53 :: (T_VisitSteps_v52 )+ }+data T_VisitSteps_s54 = C_VisitSteps_s54+type T_VisitSteps_v52 = (T_VisitSteps_vIn52 ) -> (T_VisitSteps_vOut52 )+data T_VisitSteps_vIn52 = T_VisitSteps_vIn52 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Int) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (FormatMode) (Int) (VisitKind) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Options) (Int) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Bool)+data T_VisitSteps_vOut52 = T_VisitSteps_vOut52 (Set String) (Seq Error) (Int) (Bool) (Set String) (Int) (Map Identifier (Set VisitKind)) (Map Identifier Int) (PP_Doc) (Int) (PP_Doc) (Set String) (Map String (Maybe NonLocalAttr)) (Map VisitIdentifier VisitKind)+{-# NOINLINE sem_VisitSteps_Cons #-}+sem_VisitSteps_Cons :: T_VisitStep -> T_VisitSteps -> T_VisitSteps +sem_VisitSteps_Cons arg_hd_ arg_tl_ = T_VisitSteps (return st53) where+ {-# NOINLINE st53 #-}+ st53 = let+ v52 :: T_VisitSteps_v52 + v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _hdX50 = Control.Monad.Identity.runIdentity (attach_T_VisitStep (arg_hd_))+ _tlX53 = Control.Monad.Identity.runIdentity (attach_T_VisitSteps (arg_tl_))+ (T_VisitStep_vOut49 _hdIdefs _hdIerrors _hdIindex _hdIisLast _hdIlazyIntras _hdIprevMaxSimRefs _hdIruleKinds _hdIruleUsage _hdIsem_steps _hdIsync_steps _hdIusedArgs _hdIuses _hdIvisitKinds) = inv_VisitStep_s50 _hdX50 (T_VisitStep_vIn49 _hdOallFromToStates _hdOallInitStates _hdOallVisitKinds _hdOallchildvisit _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOfmtMode _hdOindex _hdOisLast _hdOkind _hdOmrules _hdOoptions _hdOprevMaxSimRefs _hdOruledefs _hdOruleuses _hdOuseParallel)+ (T_VisitSteps_vOut52 _tlIdefs _tlIerrors _tlIindex _tlIisLast _tlIlazyIntras _tlIprevMaxSimRefs _tlIruleKinds _tlIruleUsage _tlIsem_steps _tlIsize _tlIsync_steps _tlIusedArgs _tlIuses _tlIvisitKinds) = inv_VisitSteps_s53 _tlX53 (T_VisitSteps_vIn52 _tlOallFromToStates _tlOallInitStates _tlOallVisitKinds _tlOallchildvisit _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOfmtMode _tlOindex _tlOkind _tlOmrules _tlOoptions _tlOprevMaxSimRefs _tlOruledefs _tlOruleuses _tlOuseParallel)+ _lhsOsize :: Int+ _lhsOsize = rule807 _tlIsize+ _hdOindex = rule808 _lhsIindex+ _tlOindex = rule809 _lhsIindex+ _lhsOindex :: Int+ _lhsOindex = rule810 _tlIindex+ _lhsOisLast :: Bool+ _lhsOisLast = rule811 ()+ _hdOisLast = rule812 _tlIisLast+ _lhsOdefs :: Set String+ _lhsOdefs = rule813 _hdIdefs _tlIdefs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule814 _hdIerrors _tlIerrors+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule815 _hdIlazyIntras _tlIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule816 _hdIruleKinds _tlIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule817 _hdIruleUsage _tlIruleUsage+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule818 _hdIsem_steps _tlIsem_steps+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule819 _hdIsync_steps _tlIsync_steps+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule820 _hdIusedArgs _tlIusedArgs+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule821 _hdIuses _tlIuses+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule822 _hdIvisitKinds _tlIvisitKinds+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule823 _tlIprevMaxSimRefs+ _hdOallFromToStates = rule824 _lhsIallFromToStates+ _hdOallInitStates = rule825 _lhsIallInitStates+ _hdOallVisitKinds = rule826 _lhsIallVisitKinds+ _hdOallchildvisit = rule827 _lhsIallchildvisit+ _hdOavisitdefs = rule828 _lhsIavisitdefs+ _hdOavisituses = rule829 _lhsIavisituses+ _hdOchildTypes = rule830 _lhsIchildTypes+ _hdOchildintros = rule831 _lhsIchildintros+ _hdOfmtMode = rule832 _lhsIfmtMode+ _hdOkind = rule833 _lhsIkind+ _hdOmrules = rule834 _lhsImrules+ _hdOoptions = rule835 _lhsIoptions+ _hdOprevMaxSimRefs = rule836 _lhsIprevMaxSimRefs+ _hdOruledefs = rule837 _lhsIruledefs+ _hdOruleuses = rule838 _lhsIruleuses+ _hdOuseParallel = rule839 _lhsIuseParallel+ _tlOallFromToStates = rule840 _lhsIallFromToStates+ _tlOallInitStates = rule841 _lhsIallInitStates+ _tlOallVisitKinds = rule842 _lhsIallVisitKinds+ _tlOallchildvisit = rule843 _lhsIallchildvisit+ _tlOavisitdefs = rule844 _lhsIavisitdefs+ _tlOavisituses = rule845 _lhsIavisituses+ _tlOchildTypes = rule846 _lhsIchildTypes+ _tlOchildintros = rule847 _lhsIchildintros+ _tlOfmtMode = rule848 _lhsIfmtMode+ _tlOkind = rule849 _lhsIkind+ _tlOmrules = rule850 _lhsImrules+ _tlOoptions = rule851 _lhsIoptions+ _tlOprevMaxSimRefs = rule852 _hdIprevMaxSimRefs+ _tlOruledefs = rule853 _lhsIruledefs+ _tlOruleuses = rule854 _lhsIruleuses+ _tlOuseParallel = rule855 _lhsIuseParallel+ __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitSteps_s53 v52+ {-# INLINE rule807 #-}+ {-# LINE 870 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule807 = \ ((_tlIsize) :: Int) ->+ {-# LINE 870 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 1 + _tlIsize+ {-# LINE 6374 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule808 #-}+ {-# LINE 875 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule808 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 875 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _lhsIindex+ {-# LINE 6380 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule809 #-}+ {-# LINE 876 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule809 = \ ((_lhsIindex) :: Int) ->+ {-# LINE 876 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 1 + _lhsIindex+ {-# LINE 6386 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule810 #-}+ {-# LINE 877 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule810 = \ ((_tlIindex) :: Int) ->+ {-# LINE 877 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _tlIindex+ {-# LINE 6392 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule811 #-}+ {-# LINE 896 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule811 = \ (_ :: ()) ->+ {-# LINE 896 "./src-ag/ExecutionPlan2Hs.ag" #-}+ False+ {-# LINE 6398 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule812 #-}+ {-# LINE 897 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule812 = \ ((_tlIisLast) :: Bool) ->+ {-# LINE 897 "./src-ag/ExecutionPlan2Hs.ag" #-}+ _tlIisLast+ {-# LINE 6404 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule813 #-}+ rule813 = \ ((_hdIdefs) :: Set String) ((_tlIdefs) :: Set String) ->+ _hdIdefs `Set.union` _tlIdefs+ {-# INLINE rule814 #-}+ rule814 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule815 #-}+ rule815 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# INLINE rule816 #-}+ rule816 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# INLINE rule817 #-}+ rule817 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# INLINE rule818 #-}+ rule818 = \ ((_hdIsem_steps) :: PP_Doc) ((_tlIsem_steps) :: PP_Doc) ->+ _hdIsem_steps >-< _tlIsem_steps+ {-# INLINE rule819 #-}+ rule819 = \ ((_hdIsync_steps) :: PP_Doc) ((_tlIsync_steps) :: PP_Doc) ->+ _hdIsync_steps >-< _tlIsync_steps+ {-# INLINE rule820 #-}+ rule820 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule821 #-}+ rule821 = \ ((_hdIuses) :: Map String (Maybe NonLocalAttr)) ((_tlIuses) :: Map String (Maybe NonLocalAttr)) ->+ _hdIuses `Map.union` _tlIuses+ {-# INLINE rule822 #-}+ rule822 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule823 #-}+ rule823 = \ ((_tlIprevMaxSimRefs) :: Int) ->+ _tlIprevMaxSimRefs+ {-# INLINE rule824 #-}+ rule824 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule825 #-}+ rule825 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule826 #-}+ rule826 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule827 #-}+ rule827 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule828 #-}+ rule828 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule829 #-}+ rule829 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule830 #-}+ rule830 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule831 #-}+ rule831 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule832 #-}+ rule832 = \ ((_lhsIfmtMode) :: FormatMode) ->+ _lhsIfmtMode+ {-# INLINE rule833 #-}+ rule833 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule834 #-}+ rule834 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule835 #-}+ rule835 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule836 #-}+ rule836 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs+ {-# INLINE rule837 #-}+ rule837 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule838 #-}+ rule838 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule839 #-}+ rule839 = \ ((_lhsIuseParallel) :: Bool) ->+ _lhsIuseParallel+ {-# INLINE rule840 #-}+ rule840 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule841 #-}+ rule841 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule842 #-}+ rule842 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule843 #-}+ rule843 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule844 #-}+ rule844 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule845 #-}+ rule845 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule846 #-}+ rule846 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule847 #-}+ rule847 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule848 #-}+ rule848 = \ ((_lhsIfmtMode) :: FormatMode) ->+ _lhsIfmtMode+ {-# INLINE rule849 #-}+ rule849 = \ ((_lhsIkind) :: VisitKind) ->+ _lhsIkind+ {-# INLINE rule850 #-}+ rule850 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule851 #-}+ rule851 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule852 #-}+ rule852 = \ ((_hdIprevMaxSimRefs) :: Int) ->+ _hdIprevMaxSimRefs+ {-# INLINE rule853 #-}+ rule853 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule854 #-}+ rule854 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule855 #-}+ rule855 = \ ((_lhsIuseParallel) :: Bool) ->+ _lhsIuseParallel+{-# NOINLINE sem_VisitSteps_Nil #-}+sem_VisitSteps_Nil :: T_VisitSteps +sem_VisitSteps_Nil = T_VisitSteps (return st53) where+ {-# NOINLINE st53 #-}+ st53 = let+ v52 :: T_VisitSteps_v52 + v52 = \ (T_VisitSteps_vIn52 _lhsIallFromToStates _lhsIallInitStates _lhsIallVisitKinds _lhsIallchildvisit _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIfmtMode _lhsIindex _lhsIkind _lhsImrules _lhsIoptions _lhsIprevMaxSimRefs _lhsIruledefs _lhsIruleuses _lhsIuseParallel) -> ( let+ _lhsOsize :: Int+ _lhsOsize = rule856 ()+ _lhsOisLast :: Bool+ _lhsOisLast = rule857 ()+ _lhsOdefs :: Set String+ _lhsOdefs = rule858 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule859 ()+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule860 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule861 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule862 ()+ _lhsOsem_steps :: PP_Doc+ _lhsOsem_steps = rule863 ()+ _lhsOsync_steps :: PP_Doc+ _lhsOsync_steps = rule864 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule865 ()+ _lhsOuses :: Map String (Maybe NonLocalAttr)+ _lhsOuses = rule866 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule867 ()+ _lhsOindex :: Int+ _lhsOindex = rule868 _lhsIindex+ _lhsOprevMaxSimRefs :: Int+ _lhsOprevMaxSimRefs = rule869 _lhsIprevMaxSimRefs+ __result_ = T_VisitSteps_vOut52 _lhsOdefs _lhsOerrors _lhsOindex _lhsOisLast _lhsOlazyIntras _lhsOprevMaxSimRefs _lhsOruleKinds _lhsOruleUsage _lhsOsem_steps _lhsOsize _lhsOsync_steps _lhsOusedArgs _lhsOuses _lhsOvisitKinds+ in __result_ )+ in C_VisitSteps_s53 v52+ {-# INLINE rule856 #-}+ {-# LINE 869 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule856 = \ (_ :: ()) ->+ {-# LINE 869 "./src-ag/ExecutionPlan2Hs.ag" #-}+ 0+ {-# LINE 6577 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule857 #-}+ {-# LINE 895 "./src-ag/ExecutionPlan2Hs.ag" #-}+ rule857 = \ (_ :: ()) ->+ {-# LINE 895 "./src-ag/ExecutionPlan2Hs.ag" #-}+ True+ {-# LINE 6583 "dist/build/ExecutionPlan2Hs.hs"#-}+ {-# INLINE rule858 #-}+ rule858 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule859 #-}+ rule859 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule860 #-}+ rule860 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule861 #-}+ rule861 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule862 #-}+ rule862 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule863 #-}+ rule863 = \ (_ :: ()) ->+ empty+ {-# INLINE rule864 #-}+ rule864 = \ (_ :: ()) ->+ empty+ {-# INLINE rule865 #-}+ rule865 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule866 #-}+ rule866 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule867 #-}+ rule867 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule868 #-}+ rule868 = \ ((_lhsIindex) :: Int) ->+ _lhsIindex+ {-# INLINE rule869 #-}+ rule869 = \ ((_lhsIprevMaxSimRefs) :: Int) ->+ _lhsIprevMaxSimRefs++-- Visits ------------------------------------------------------+-- wrapper+data Inh_Visits = Inh_Visits { allFromToStates_Inh_Visits :: (Map VisitIdentifier (Int,Int)), allInhmap_Inh_Visits :: (Map NontermIdent Attributes), allInitStates_Inh_Visits :: (Map NontermIdent Int), allSynmap_Inh_Visits :: (Map NontermIdent Attributes), allVisitKinds_Inh_Visits :: (Map VisitIdentifier VisitKind), allchildvisit_Inh_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), allintramap_Inh_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), avisitdefs_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), avisituses_Inh_Visits :: (Map VisitIdentifier (Set Identifier)), childTypes_Inh_Visits :: (Map Identifier Type), childintros_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))), con_Inh_Visits :: (ConstructorIdent), inhmap_Inh_Visits :: (Attributes), mrules_Inh_Visits :: (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)), nextVisits_Inh_Visits :: (Map StateIdentifier StateCtx), nt_Inh_Visits :: (NontermIdent), options_Inh_Visits :: (Options), params_Inh_Visits :: ([Identifier]), prevVisits_Inh_Visits :: (Map StateIdentifier StateCtx), ruledefs_Inh_Visits :: (Map Identifier (Set String)), ruleuses_Inh_Visits :: (Map Identifier (Map String (Maybe NonLocalAttr))), synmap_Inh_Visits :: (Attributes), terminaldefs_Inh_Visits :: (Set String) }+data Syn_Visits = Syn_Visits { allvisits_Syn_Visits :: ([VisitStateState]), childvisit_Syn_Visits :: (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))), errors_Syn_Visits :: (Seq Error), fromToStates_Syn_Visits :: (Map VisitIdentifier (Int,Int)), intramap_Syn_Visits :: (Map StateIdentifier (Map String (Maybe NonLocalAttr))), lazyIntras_Syn_Visits :: (Set String), ruleKinds_Syn_Visits :: (Map Identifier (Set VisitKind)), ruleUsage_Syn_Visits :: (Map Identifier Int), sem_visit_Syn_Visits :: ( [(StateIdentifier,Bool -> PP_Doc)] ), t_visits_Syn_Visits :: (PP_Doc), usedArgs_Syn_Visits :: (Set String), visitKinds_Syn_Visits :: (Map VisitIdentifier VisitKind), visitdefs_Syn_Visits :: (Map VisitIdentifier (Set Identifier)), visituses_Syn_Visits :: (Map VisitIdentifier (Set Identifier)) }+{-# INLINABLE wrap_Visits #-}+wrap_Visits :: T_Visits -> Inh_Visits -> (Syn_Visits )+wrap_Visits (T_Visits act) (Inh_Visits _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs+ (T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses) <- return (inv_Visits_s56 sem arg)+ return (Syn_Visits _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses)+ )++-- cata+{-# NOINLINE sem_Visits #-}+sem_Visits :: Visits -> T_Visits +sem_Visits list = Prelude.foldr sem_Visits_Cons sem_Visits_Nil (Prelude.map sem_Visit list)++-- semantic domain+newtype T_Visits = T_Visits {+ attach_T_Visits :: Identity (T_Visits_s56 )+ }+newtype T_Visits_s56 = C_Visits_s56 {+ inv_Visits_s56 :: (T_Visits_v55 )+ }+data T_Visits_s57 = C_Visits_s57+type T_Visits_v55 = (T_Visits_vIn55 ) -> (T_Visits_vOut55 )+data T_Visits_vIn55 = T_Visits_vIn55 (Map VisitIdentifier (Int,Int)) (Map NontermIdent Attributes) (Map NontermIdent Int) (Map NontermIdent Attributes) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier)) (Map Identifier Type) (Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) (ConstructorIdent) (Attributes) (Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) (Map StateIdentifier StateCtx) (NontermIdent) (Options) ([Identifier]) (Map StateIdentifier StateCtx) (Map Identifier (Set String)) (Map Identifier (Map String (Maybe NonLocalAttr))) (Attributes) (Set String)+data T_Visits_vOut55 = T_Visits_vOut55 ([VisitStateState]) (Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) (Seq Error) (Map VisitIdentifier (Int,Int)) (Map StateIdentifier (Map String (Maybe NonLocalAttr))) (Set String) (Map Identifier (Set VisitKind)) (Map Identifier Int) ( [(StateIdentifier,Bool -> PP_Doc)] ) (PP_Doc) (Set String) (Map VisitIdentifier VisitKind) (Map VisitIdentifier (Set Identifier)) (Map VisitIdentifier (Set Identifier))+{-# NOINLINE sem_Visits_Cons #-}+sem_Visits_Cons :: T_Visit -> T_Visits -> T_Visits +sem_Visits_Cons arg_hd_ arg_tl_ = T_Visits (return st56) where+ {-# NOINLINE st56 #-}+ st56 = let+ v55 :: T_Visits_v55 + v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _hdX47 = Control.Monad.Identity.runIdentity (attach_T_Visit (arg_hd_))+ _tlX56 = Control.Monad.Identity.runIdentity (attach_T_Visits (arg_tl_))+ (T_Visit_vOut46 _hdIallvisits _hdIchildvisit _hdIerrors _hdIfromToStates _hdIintramap _hdIlazyIntras _hdIruleKinds _hdIruleUsage _hdIsem_visit _hdIt_visits _hdIusedArgs _hdIvisitKinds _hdIvisitdefs _hdIvisituses) = inv_Visit_s47 _hdX47 (T_Visit_vIn46 _hdOallFromToStates _hdOallInhmap _hdOallInitStates _hdOallSynmap _hdOallVisitKinds _hdOallchildvisit _hdOallintramap _hdOavisitdefs _hdOavisituses _hdOchildTypes _hdOchildintros _hdOcon _hdOinhmap _hdOmrules _hdOnextVisits _hdOnt _hdOoptions _hdOparams _hdOprevVisits _hdOruledefs _hdOruleuses _hdOsynmap _hdOterminaldefs)+ (T_Visits_vOut55 _tlIallvisits _tlIchildvisit _tlIerrors _tlIfromToStates _tlIintramap _tlIlazyIntras _tlIruleKinds _tlIruleUsage _tlIsem_visit _tlIt_visits _tlIusedArgs _tlIvisitKinds _tlIvisitdefs _tlIvisituses) = inv_Visits_s56 _tlX56 (T_Visits_vIn55 _tlOallFromToStates _tlOallInhmap _tlOallInitStates _tlOallSynmap _tlOallVisitKinds _tlOallchildvisit _tlOallintramap _tlOavisitdefs _tlOavisituses _tlOchildTypes _tlOchildintros _tlOcon _tlOinhmap _tlOmrules _tlOnextVisits _tlOnt _tlOoptions _tlOparams _tlOprevVisits _tlOruledefs _tlOruleuses _tlOsynmap _tlOterminaldefs)+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule870 _hdIallvisits _tlIallvisits+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule871 _hdIchildvisit _tlIchildvisit+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule872 _hdIerrors _tlIerrors+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule873 _hdIfromToStates _tlIfromToStates+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule874 _hdIintramap _tlIintramap+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule875 _hdIlazyIntras _tlIlazyIntras+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule876 _hdIruleKinds _tlIruleKinds+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule877 _hdIruleUsage _tlIruleUsage+ _lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)] + _lhsOsem_visit = rule878 _hdIsem_visit _tlIsem_visit+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule879 _hdIt_visits _tlIt_visits+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule880 _hdIusedArgs _tlIusedArgs+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule881 _hdIvisitKinds _tlIvisitKinds+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule882 _hdIvisitdefs _tlIvisitdefs+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule883 _hdIvisituses _tlIvisituses+ _hdOallFromToStates = rule884 _lhsIallFromToStates+ _hdOallInhmap = rule885 _lhsIallInhmap+ _hdOallInitStates = rule886 _lhsIallInitStates+ _hdOallSynmap = rule887 _lhsIallSynmap+ _hdOallVisitKinds = rule888 _lhsIallVisitKinds+ _hdOallchildvisit = rule889 _lhsIallchildvisit+ _hdOallintramap = rule890 _lhsIallintramap+ _hdOavisitdefs = rule891 _lhsIavisitdefs+ _hdOavisituses = rule892 _lhsIavisituses+ _hdOchildTypes = rule893 _lhsIchildTypes+ _hdOchildintros = rule894 _lhsIchildintros+ _hdOcon = rule895 _lhsIcon+ _hdOinhmap = rule896 _lhsIinhmap+ _hdOmrules = rule897 _lhsImrules+ _hdOnextVisits = rule898 _lhsInextVisits+ _hdOnt = rule899 _lhsInt+ _hdOoptions = rule900 _lhsIoptions+ _hdOparams = rule901 _lhsIparams+ _hdOprevVisits = rule902 _lhsIprevVisits+ _hdOruledefs = rule903 _lhsIruledefs+ _hdOruleuses = rule904 _lhsIruleuses+ _hdOsynmap = rule905 _lhsIsynmap+ _hdOterminaldefs = rule906 _lhsIterminaldefs+ _tlOallFromToStates = rule907 _lhsIallFromToStates+ _tlOallInhmap = rule908 _lhsIallInhmap+ _tlOallInitStates = rule909 _lhsIallInitStates+ _tlOallSynmap = rule910 _lhsIallSynmap+ _tlOallVisitKinds = rule911 _lhsIallVisitKinds+ _tlOallchildvisit = rule912 _lhsIallchildvisit+ _tlOallintramap = rule913 _lhsIallintramap+ _tlOavisitdefs = rule914 _lhsIavisitdefs+ _tlOavisituses = rule915 _lhsIavisituses+ _tlOchildTypes = rule916 _lhsIchildTypes+ _tlOchildintros = rule917 _lhsIchildintros+ _tlOcon = rule918 _lhsIcon+ _tlOinhmap = rule919 _lhsIinhmap+ _tlOmrules = rule920 _lhsImrules+ _tlOnextVisits = rule921 _lhsInextVisits+ _tlOnt = rule922 _lhsInt+ _tlOoptions = rule923 _lhsIoptions+ _tlOparams = rule924 _lhsIparams+ _tlOprevVisits = rule925 _lhsIprevVisits+ _tlOruledefs = rule926 _lhsIruledefs+ _tlOruleuses = rule927 _lhsIruleuses+ _tlOsynmap = rule928 _lhsIsynmap+ _tlOterminaldefs = rule929 _lhsIterminaldefs+ __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visits_s56 v55+ {-# INLINE rule870 #-}+ rule870 = \ ((_hdIallvisits) :: VisitStateState ) ((_tlIallvisits) :: [VisitStateState]) ->+ _hdIallvisits : _tlIallvisits+ {-# INLINE rule871 #-}+ rule871 = \ ((_hdIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ((_tlIchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _hdIchildvisit `Map.union` _tlIchildvisit+ {-# INLINE rule872 #-}+ rule872 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule873 #-}+ rule873 = \ ((_hdIfromToStates) :: Map VisitIdentifier (Int,Int)) ((_tlIfromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _hdIfromToStates `mappend` _tlIfromToStates+ {-# INLINE rule874 #-}+ rule874 = \ ((_hdIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ((_tlIintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _hdIintramap `uwMapUnion` _tlIintramap+ {-# INLINE rule875 #-}+ rule875 = \ ((_hdIlazyIntras) :: Set String) ((_tlIlazyIntras) :: Set String) ->+ _hdIlazyIntras `Set.union` _tlIlazyIntras+ {-# INLINE rule876 #-}+ rule876 = \ ((_hdIruleKinds) :: Map Identifier (Set VisitKind)) ((_tlIruleKinds) :: Map Identifier (Set VisitKind)) ->+ _hdIruleKinds `unionWithMappend` _tlIruleKinds+ {-# INLINE rule877 #-}+ rule877 = \ ((_hdIruleUsage) :: Map Identifier Int) ((_tlIruleUsage) :: Map Identifier Int) ->+ _hdIruleUsage `unionWithSum` _tlIruleUsage+ {-# INLINE rule878 #-}+ rule878 = \ ((_hdIsem_visit) :: (StateIdentifier,Bool -> PP_Doc) ) ((_tlIsem_visit) :: [(StateIdentifier,Bool -> PP_Doc)] ) ->+ _hdIsem_visit : _tlIsem_visit+ {-# INLINE rule879 #-}+ rule879 = \ ((_hdIt_visits) :: PP_Doc) ((_tlIt_visits) :: PP_Doc) ->+ _hdIt_visits >-< _tlIt_visits+ {-# INLINE rule880 #-}+ rule880 = \ ((_hdIusedArgs) :: Set String) ((_tlIusedArgs) :: Set String) ->+ _hdIusedArgs `Set.union` _tlIusedArgs+ {-# INLINE rule881 #-}+ rule881 = \ ((_hdIvisitKinds) :: Map VisitIdentifier VisitKind) ((_tlIvisitKinds) :: Map VisitIdentifier VisitKind) ->+ _hdIvisitKinds `mappend` _tlIvisitKinds+ {-# INLINE rule882 #-}+ rule882 = \ ((_hdIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisitdefs `uwSetUnion` _tlIvisitdefs+ {-# INLINE rule883 #-}+ rule883 = \ ((_hdIvisituses) :: Map VisitIdentifier (Set Identifier)) ((_tlIvisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _hdIvisituses `uwSetUnion` _tlIvisituses+ {-# INLINE rule884 #-}+ rule884 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule885 #-}+ rule885 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule886 #-}+ rule886 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule887 #-}+ rule887 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule888 #-}+ rule888 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule889 #-}+ rule889 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule890 #-}+ rule890 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIallintramap+ {-# INLINE rule891 #-}+ rule891 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule892 #-}+ rule892 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule893 #-}+ rule893 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule894 #-}+ rule894 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule895 #-}+ rule895 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule896 #-}+ rule896 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule897 #-}+ rule897 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule898 #-}+ rule898 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule899 #-}+ rule899 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule900 #-}+ rule900 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule901 #-}+ rule901 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule902 #-}+ rule902 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule903 #-}+ rule903 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule904 #-}+ rule904 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule905 #-}+ rule905 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule906 #-}+ rule906 = \ ((_lhsIterminaldefs) :: Set String) ->+ _lhsIterminaldefs+ {-# INLINE rule907 #-}+ rule907 = \ ((_lhsIallFromToStates) :: Map VisitIdentifier (Int,Int)) ->+ _lhsIallFromToStates+ {-# INLINE rule908 #-}+ rule908 = \ ((_lhsIallInhmap) :: Map NontermIdent Attributes) ->+ _lhsIallInhmap+ {-# INLINE rule909 #-}+ rule909 = \ ((_lhsIallInitStates) :: Map NontermIdent Int) ->+ _lhsIallInitStates+ {-# INLINE rule910 #-}+ rule910 = \ ((_lhsIallSynmap) :: Map NontermIdent Attributes) ->+ _lhsIallSynmap+ {-# INLINE rule911 #-}+ rule911 = \ ((_lhsIallVisitKinds) :: Map VisitIdentifier VisitKind) ->+ _lhsIallVisitKinds+ {-# INLINE rule912 #-}+ rule912 = \ ((_lhsIallchildvisit) :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))) ->+ _lhsIallchildvisit+ {-# INLINE rule913 #-}+ rule913 = \ ((_lhsIallintramap) :: Map StateIdentifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIallintramap+ {-# INLINE rule914 #-}+ rule914 = \ ((_lhsIavisitdefs) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisitdefs+ {-# INLINE rule915 #-}+ rule915 = \ ((_lhsIavisituses) :: Map VisitIdentifier (Set Identifier)) ->+ _lhsIavisituses+ {-# INLINE rule916 #-}+ rule916 = \ ((_lhsIchildTypes) :: Map Identifier Type) ->+ _lhsIchildTypes+ {-# INLINE rule917 #-}+ rule917 = \ ((_lhsIchildintros) :: Map Identifier (VisitKind -> FormatMode -> Either Error (PP_Doc, Set String, Map String (Maybe NonLocalAttr)))) ->+ _lhsIchildintros+ {-# INLINE rule918 #-}+ rule918 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule919 #-}+ rule919 = \ ((_lhsIinhmap) :: Attributes) ->+ _lhsIinhmap+ {-# INLINE rule920 #-}+ rule920 = \ ((_lhsImrules) :: Map Identifier (VisitKind -> FormatMode -> Either Error PP_Doc)) ->+ _lhsImrules+ {-# INLINE rule921 #-}+ rule921 = \ ((_lhsInextVisits) :: Map StateIdentifier StateCtx) ->+ _lhsInextVisits+ {-# INLINE rule922 #-}+ rule922 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule923 #-}+ rule923 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule924 #-}+ rule924 = \ ((_lhsIparams) :: [Identifier]) ->+ _lhsIparams+ {-# INLINE rule925 #-}+ rule925 = \ ((_lhsIprevVisits) :: Map StateIdentifier StateCtx) ->+ _lhsIprevVisits+ {-# INLINE rule926 #-}+ rule926 = \ ((_lhsIruledefs) :: Map Identifier (Set String)) ->+ _lhsIruledefs+ {-# INLINE rule927 #-}+ rule927 = \ ((_lhsIruleuses) :: Map Identifier (Map String (Maybe NonLocalAttr))) ->+ _lhsIruleuses+ {-# INLINE rule928 #-}+ rule928 = \ ((_lhsIsynmap) :: Attributes) ->+ _lhsIsynmap+ {-# INLINE rule929 #-}+ rule929 = \ ((_lhsIterminaldefs) :: Set String) ->+ _lhsIterminaldefs+{-# NOINLINE sem_Visits_Nil #-}+sem_Visits_Nil :: T_Visits +sem_Visits_Nil = T_Visits (return st56) where+ {-# NOINLINE st56 #-}+ st56 = let+ v55 :: T_Visits_v55 + v55 = \ (T_Visits_vIn55 _lhsIallFromToStates _lhsIallInhmap _lhsIallInitStates _lhsIallSynmap _lhsIallVisitKinds _lhsIallchildvisit _lhsIallintramap _lhsIavisitdefs _lhsIavisituses _lhsIchildTypes _lhsIchildintros _lhsIcon _lhsIinhmap _lhsImrules _lhsInextVisits _lhsInt _lhsIoptions _lhsIparams _lhsIprevVisits _lhsIruledefs _lhsIruleuses _lhsIsynmap _lhsIterminaldefs) -> ( let+ _lhsOallvisits :: [VisitStateState]+ _lhsOallvisits = rule930 ()+ _lhsOchildvisit :: Map VisitIdentifier (Identifier -> VisitKind -> Either Error (PP_Doc, PP_Doc))+ _lhsOchildvisit = rule931 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule932 ()+ _lhsOfromToStates :: Map VisitIdentifier (Int,Int)+ _lhsOfromToStates = rule933 ()+ _lhsOintramap :: Map StateIdentifier (Map String (Maybe NonLocalAttr))+ _lhsOintramap = rule934 ()+ _lhsOlazyIntras :: Set String+ _lhsOlazyIntras = rule935 ()+ _lhsOruleKinds :: Map Identifier (Set VisitKind)+ _lhsOruleKinds = rule936 ()+ _lhsOruleUsage :: Map Identifier Int+ _lhsOruleUsage = rule937 ()+ _lhsOsem_visit :: [(StateIdentifier,Bool -> PP_Doc)] + _lhsOsem_visit = rule938 ()+ _lhsOt_visits :: PP_Doc+ _lhsOt_visits = rule939 ()+ _lhsOusedArgs :: Set String+ _lhsOusedArgs = rule940 ()+ _lhsOvisitKinds :: Map VisitIdentifier VisitKind+ _lhsOvisitKinds = rule941 ()+ _lhsOvisitdefs :: Map VisitIdentifier (Set Identifier)+ _lhsOvisitdefs = rule942 ()+ _lhsOvisituses :: Map VisitIdentifier (Set Identifier)+ _lhsOvisituses = rule943 ()+ __result_ = T_Visits_vOut55 _lhsOallvisits _lhsOchildvisit _lhsOerrors _lhsOfromToStates _lhsOintramap _lhsOlazyIntras _lhsOruleKinds _lhsOruleUsage _lhsOsem_visit _lhsOt_visits _lhsOusedArgs _lhsOvisitKinds _lhsOvisitdefs _lhsOvisituses+ in __result_ )+ in C_Visits_s56 v55+ {-# INLINE rule930 #-}+ rule930 = \ (_ :: ()) ->+ []+ {-# INLINE rule931 #-}+ rule931 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule932 #-}+ rule932 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule933 #-}+ rule933 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule934 #-}+ rule934 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule935 #-}+ rule935 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule936 #-}+ rule936 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule937 #-}+ rule937 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule938 #-}+ rule938 = \ (_ :: ()) ->+ []+ {-# INLINE rule939 #-}+ rule939 = \ (_ :: ()) ->+ empty+ {-# INLINE rule940 #-}+ rule940 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule941 #-}+ rule941 = \ (_ :: ()) ->+ mempty+ {-# INLINE rule942 #-}+ rule942 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule943 #-}+ rule943 = \ (_ :: ()) -> Map.empty
src-generated/Expression.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/Expression.ag)+-- UUAGC 0.9.50 (src-ag/Expression.ag) module Expression where {-# LINE 2 "./src-ag/Expression.ag" #-}
src-generated/GenerateCode.hs view
@@ -2,5194 +2,5267 @@ {-# LANGUAGE ScopedTypeVariables #-} module GenerateCode where-{-# LINE 2 "./src-ag/CodeSyntax.ag" #-}--import Patterns-import CommonTypes-import Data.Map(Map)-import Data.Set(Set)-{-# LINE 12 "dist/build/GenerateCode.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 19 "dist/build/GenerateCode.hs" #-}--{-# LINE 2 "./src-ag/DeclBlocks.ag" #-}--import Code (Decl,Expr)-{-# LINE 24 "dist/build/GenerateCode.hs" #-}--{-# LINE 9 "./src-ag/GenerateCode.ag" #-}--import CommonTypes-import SequentialTypes-import Code hiding (Type)-import qualified Code-import Options-import CodeSyntax-import ErrorMessages-import GrammarInfo-import DeclBlocks--import qualified Data.Map as Map-import Data.Map(Map)-import qualified Data.Set as Set-import Data.Set(Set)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq)-import UU.Scanner.Position-import TokenDef-import HsToken-import HsTokenScanner--import Data.List(partition,intersperse)-import Data.Maybe(fromJust,isJust)--{-# LINE 52 "dist/build/GenerateCode.hs" #-}-import Control.Monad.Identity (Identity)-import qualified Control.Monad.Identity-{-# LINE 106 "./src-ag/GenerateCode.ag" #-}---- remove possible @v references in the types of a data type.-cleanupArg :: String -> String-cleanupArg s- = case idEvalType (SimpleType s) of- SimpleType s' -> s'- _ -> error "Only SimpleType supported"-{-# LINE 63 "dist/build/GenerateCode.hs" #-}--{-# LINE 122 "./src-ag/GenerateCode.ag" #-}--appContext :: ContextMap -> NontermIdent -> Code.Type -> Code.Type-appContext mp nt tp- = maybe tp (\ctx -> CtxApp (map (\(n,ns) -> (getName n, ns)) ctx) tp) $ Map.lookup nt mp--appQuant :: QuantMap -> NontermIdent -> Code.Type -> Code.Type-appQuant mp nt tp- = foldr QuantApp tp $ Map.findWithDefault [] nt mp-{-# LINE 74 "dist/build/GenerateCode.hs" #-}--{-# LINE 247 "./src-ag/GenerateCode.ag" #-}--mkDecl :: Bool -> Lhs -> Expr -> Set String -> Set String -> Decl-mkDecl True lhs rhs _ _ = Bind lhs rhs-mkDecl False lhs rhs s1 s2 = Decl lhs rhs s1 s2--unwrapSem :: Bool -> NontermIdent -> Expr -> Expr-unwrapSem False _ e = e-unwrapSem True nm e = Case e alts- where alts = [CaseAlt left right]- left = Fun (typeName nm 0) [SimpleExpr "x"]- right = SimpleExpr "x"-{-# LINE 88 "dist/build/GenerateCode.hs" #-}--{-# LINE 538 "./src-ag/GenerateCode.ag" #-}--mkLambdaArg :: String -> Maybe Code.Type -> Expr-mkLambdaArg nm Nothing = SimpleExpr nm-mkLambdaArg nm (Just tp) = TypedExpr (SimpleExpr nm) tp--mkLambda :: Exprs -> Expr -> Expr-mkLambda [] e = e-mkLambda xs e = Lambda xs e--mkSemFun :: Identifier -> Int -> Exprs -> Expr -> Expr-mkSemFun nt nr xs e = SemFun (typeName nt nr) xs e--typeAppStrs :: String -> [String] -> Code.Type-typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)--isHigherOrder :: ChildKind -> Bool-isHigherOrder ChildAttr = True-isHigherOrder _ = False--pickOrigType :: (Identifier, Type, ChildKind) -> (Identifier, Type, ChildKind)-pickOrigType (nm, _, virt@(ChildReplace x)) = (nm, x, virt)-pickOrigType x = x-{-# LINE 113 "dist/build/GenerateCode.hs" #-}--{-# LINE 635 "./src-ag/GenerateCode.ag" #-}--mkPartitionedFunction :: String -> Bool -> [Decl] -> [String] -> DeclBlocks -> ([Decl], Expr)-mkPartitionedFunction prefix' optCase nextVisitDecls lastExprVars cpsTree- = let inh = Inh_DeclBlocksRoot { prefix_Inh_DeclBlocksRoot = prefix'- , optCase_Inh_DeclBlocksRoot = optCase- , nextVisitDecls_Inh_DeclBlocksRoot = nextVisitDecls- , lastExprVars_Inh_DeclBlocksRoot = lastExprVars- }- sem = sem_DeclBlocksRoot (DeclBlocksRoot cpsTree)- syn = wrap_DeclBlocksRoot sem inh- in (lambdas_Syn_DeclBlocksRoot syn, firstCall_Syn_DeclBlocksRoot syn)-{-# LINE 127 "dist/build/GenerateCode.hs" #-}--{-# LINE 685 "./src-ag/GenerateCode.ag" #-}--freevars :: [String] -> [Decl] -> [String]-freevars additional decls- = Set.toList (allused `Set.difference` alldefined)- where- allused = Set.unions (Set.fromList additional : map usedvars decls)- alldefined = Set.unions (map definedvars decls)-- usedvars (Decl _ _ _ uses) = uses- usedvars _ = Set.empty-- definedvars (Decl _ _ defs _) = defs- definedvars _ = Set.empty--mkBlockLambda :: Bool -> String -> [String] -> [Decl] -> Expr -> Decl-mkBlockLambda optCase name args decls expr- = Decl lhs rhs Set.empty Set.empty- where- lhs = Fun name (map SimpleExpr args)- rhs = mkLet optCase decls expr-{-# LINE 150 "dist/build/GenerateCode.hs" #-}--{-# LINE 763 "./src-ag/GenerateCode.ag" #-}--typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type-typeToCodeType _ _ tp- = case tp of- NT nt tps defor -> NontermType (getName nt) tps defor- Haskell t -> SimpleType t- Self -> error "Self type not allowed here."--evalType :: (String -> String) -> Code.Type -> Code.Type-evalType replf t'- = chase t'- where- chase t- = case t of- Arr l r -> Arr (chase l) (chase r)- TypeApp f as -> TypeApp (chase f) (map chase as)- TupleType tps -> TupleType (map chase tps)- UnboxedTupleType tps -> UnboxedTupleType (map chase tps)- Code.List tp -> Code.List (chase tp)- SimpleType txt -> let tks = lexTokens (initPos txt) txt- tks' = map replaceTok tks- txt' = unlines . showTokens . tokensToStrings $ tks'- in SimpleType txt'- TMaybe m -> TMaybe (chase m)- TEither l r -> TEither (chase l) (chase r)- TMap k v -> TMap (chase k) (chase v)- TIntMap v -> TIntMap (chase v)- _ -> t-- replaceTok t- = case t of- AGLocal v p _ -> HsToken (replf $ getName v) p- _ -> t--idEvalType :: Code.Type -> Code.Type-idEvalType = evalType id-{-# LINE 189 "dist/build/GenerateCode.hs" #-}--{-# LINE 888 "./src-ag/GenerateCode.ag" #-}---- for a virtual child that already existed as a child, returns-isFirstOrder :: ChildKind -> Type -> Maybe Type-isFirstOrder ChildSyntax tp = Just tp-isFirstOrder ChildAttr _ = Nothing-isFirstOrder (ChildReplace tp) _ = Just tp-{-# LINE 198 "dist/build/GenerateCode.hs" #-}--{-# LINE 909 "./src-ag/GenerateCode.ag" #-}--makeLocalComment :: Int -> String -> Identifier -> Maybe Type -> String-makeLocalComment width what name tp = let x = getName name- y = maybe "_" (\t -> case t of- (NT nt tps _) -> getName nt ++ " " ++ unwords tps- Haskell t' -> '{' : t' ++ "}"- Self -> error "Self type not allowed here.") tp- in ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )--{-# LINE 210 "dist/build/GenerateCode.hs" #-}--{-# LINE 943 "./src-ag/GenerateCode.ag" #-}---- Lets or nested Cases?--- or even a do-expression?--data DeclsType = DeclsLet | DeclsCase | DeclsDo--mkDecls :: DeclsType -> Decls -> Expr -> Expr-mkDecls DeclsLet = mkLet False-mkDecls DeclsCase = mkLet True-mkDecls DeclsDo = \decls -> Do (map toBind decls)- where toBind (Decl lhs rhs _ _) = BindLet lhs rhs- toBind d = d--mkLet :: Bool -> Decls -> Expr -> Expr-mkLet False decls body = Let decls body-mkLet True decls body = foldr oneCase body decls--oneCase :: Decl -> Expr -> Expr-oneCase (Decl left rhs _ _) ex = Case rhs [CaseAlt left ex]-oneCase (Resume _ nt left rhs) ex = ResumeExpr nt rhs left ex-oneCase _ ex = ex---- Gives the name of the visit function-funname :: Show a => a -> Int -> String-funname field 0 = show field ++ "_"-funname field nr = show field ++ "_" ++ show nr---- Gives the name of a semantic function-seqSemname :: String -> NontermIdent -> ConstructorIdent -> Int -> String-seqSemname pre nt con 0 = semname pre nt con-seqSemname pre nt con nr = semname pre nt con ++ "_" ++ show nr---- Gives the name of a type-typeName :: NontermIdent -> Int -> String-typeName nt 0 = "T_" ++ show nt-typeName nt n = "T_" ++ show nt ++ "_" ++ show n--ntOfVisit :: NontermIdent -> Int -> NontermIdent-ntOfVisit nt 0 = nt-ntOfVisit nt n = Ident (show nt ++ "_" ++ show n) (getPos nt)---- Gives the name of a visit function-visitname :: String -> NontermIdent -> Int -> String-visitname pre nt n = pre ++ getName nt ++ "_" ++ show n-{-# LINE 257 "dist/build/GenerateCode.hs" #-}--{-# LINE 1033 "./src-ag/GenerateCode.ag" #-}--toNamedType :: Bool -> NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> Code.NamedType-toNamedType genStrict nt con nm tp- = Code.Named genStrict strNm tp- where strNm = recordFieldname nt con nm-{-# LINE 265 "dist/build/GenerateCode.hs" #-}--- CGrammar ------------------------------------------------------- wrapper-data Inh_CGrammar = Inh_CGrammar { options_Inh_CGrammar :: (Options) }-data Syn_CGrammar = Syn_CGrammar { errors_Syn_CGrammar :: (Seq Error), output_Syn_CGrammar :: (Program) }-{-# INLINABLE wrap_CGrammar #-}-wrap_CGrammar :: T_CGrammar -> Inh_CGrammar -> (Syn_CGrammar )-wrap_CGrammar (T_CGrammar act) (Inh_CGrammar _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CGrammar_vIn1 _lhsIoptions- (T_CGrammar_vOut1 _lhsOerrors _lhsOoutput) <- return (inv_CGrammar_s2 sem arg)- return (Syn_CGrammar _lhsOerrors _lhsOoutput)- )---- cata-{-# INLINE sem_CGrammar #-}-sem_CGrammar :: CGrammar -> T_CGrammar -sem_CGrammar ( CGrammar typeSyns_ derivings_ wrappers_ nonts_ pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ ) = sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ ( sem_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_---- semantic domain-newtype T_CGrammar = T_CGrammar {- attach_T_CGrammar :: Identity (T_CGrammar_s2 )- }-newtype T_CGrammar_s2 = C_CGrammar_s2 {- inv_CGrammar_s2 :: (T_CGrammar_v1 )- }-data T_CGrammar_s3 = C_CGrammar_s3-type T_CGrammar_v1 = (T_CGrammar_vIn1 ) -> (T_CGrammar_vOut1 )-data T_CGrammar_vIn1 = T_CGrammar_vIn1 (Options)-data T_CGrammar_vOut1 = T_CGrammar_vOut1 (Seq Error) (Program)-{-# NOINLINE sem_CGrammar_CGrammar #-}-sem_CGrammar_CGrammar :: (TypeSyns) -> (Derivings) -> (Set NontermIdent) -> T_CNonterminals -> (PragmaMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (Map NontermIdent (Map ConstructorIdent (Set Identifier))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) -> (Bool) -> T_CGrammar -sem_CGrammar_CGrammar arg_typeSyns_ arg_derivings_ arg_wrappers_ arg_nonts_ arg_pragmas_ arg_paramMap_ arg_contextMap_ arg_quantMap_ arg_aroundsMap_ arg_mergeMap_ arg_multivisit_ = T_CGrammar (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_CGrammar_v1 - v1 = \ (T_CGrammar_vIn1 _lhsIoptions) -> ( let- _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_CNonterminals (arg_nonts_))- (T_CNonterminals_vOut10 _nontsIchunks _nontsIgathNts _nontsIsemDomUnfoldGath) = inv_CNonterminals_s11 _nontsX11 (T_CNonterminals_vIn10 _nontsOallNts _nontsOallPragmas _nontsOaroundMap _nontsOcontextMap _nontsOderivings _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_costcentre _nontsOo_data _nontsOo_linePragmas _nontsOo_monadic _nontsOo_newtypes _nontsOo_pretty _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_splitsems _nontsOo_strictwrap _nontsOo_traces _nontsOo_unbox _nontsOoptions _nontsOparamMap _nontsOprefix _nontsOquantMap _nontsOtypeSyns _nontsOunfoldSemDom _nontsOwith_sig _nontsOwrappers)- _nontsOo_sig = rule0 _lhsIoptions- _nontsOo_cata = rule1 _lhsIoptions- _nontsOo_sem = rule2 _lhsIoptions- _nontsOo_newtypes = rule3 _lhsIoptions- _nontsOo_unbox = rule4 _lhsIoptions- _nontsOo_case = rule5 _lhsIoptions- _nontsOo_pretty = rule6 _lhsIoptions- _nontsOo_rename = rule7 _lhsIoptions- _nontsOo_strictwrap = rule8 _lhsIoptions- _nontsOo_splitsems = rule9 _lhsIoptions- _nontsOo_data = rule10 _lhsIoptions- _nontsOprefix = rule11 _lhsIoptions- _nontsOo_traces = rule12 _lhsIoptions- _nontsOo_costcentre = rule13 _lhsIoptions- _nontsOo_linePragmas = rule14 _lhsIoptions- _nontsOo_monadic = rule15 _lhsIoptions- _options = rule16 _lhsIoptions arg_multivisit_- _nontsOallPragmas = rule17 arg_pragmas_- _nontsOparamMap = rule18 arg_paramMap_- _nontsOcontextMap = rule19 arg_contextMap_- _nontsOquantMap = rule20 arg_quantMap_- _nontsOallNts = rule21 _nontsIgathNts- _aroundMap = rule22 arg_aroundsMap_- _mergeMap = rule23 arg_mergeMap_- _unfoldSemDom = rule24 _nontsIsemDomUnfoldGath- _nontsOwith_sig = rule25 _lhsIoptions- _lhsOerrors :: Seq Error- _lhsOerrors = rule26 ()- _lhsOoutput :: Program- _lhsOoutput = rule27 _nontsIchunks arg_multivisit_- _nontsOtypeSyns = rule28 arg_typeSyns_- _nontsOderivings = rule29 arg_derivings_- _nontsOwrappers = rule30 arg_wrappers_- _nontsOaroundMap = rule31 _aroundMap- _nontsOmergeMap = rule32 _mergeMap- _nontsOoptions = rule33 _options- _nontsOunfoldSemDom = rule34 _unfoldSemDom- __result_ = T_CGrammar_vOut1 _lhsOerrors _lhsOoutput- in __result_ )- in C_CGrammar_s2 v1- {-# INLINE rule0 #-}- {-# LINE 52 "./src-ag/GenerateCode.ag" #-}- rule0 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 52 "./src-ag/GenerateCode.ag" #-}- typeSigs _lhsIoptions- {-# LINE 350 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule1 #-}- {-# LINE 53 "./src-ag/GenerateCode.ag" #-}- rule1 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 53 "./src-ag/GenerateCode.ag" #-}- folds _lhsIoptions- {-# LINE 356 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule2 #-}- {-# LINE 54 "./src-ag/GenerateCode.ag" #-}- rule2 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 54 "./src-ag/GenerateCode.ag" #-}- semfuns _lhsIoptions- {-# LINE 362 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule3 #-}- {-# LINE 55 "./src-ag/GenerateCode.ag" #-}- rule3 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 55 "./src-ag/GenerateCode.ag" #-}- newtypes _lhsIoptions- {-# LINE 368 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule4 #-}- {-# LINE 56 "./src-ag/GenerateCode.ag" #-}- rule4 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 56 "./src-ag/GenerateCode.ag" #-}- unbox _lhsIoptions- {-# LINE 374 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule5 #-}- {-# LINE 57 "./src-ag/GenerateCode.ag" #-}- rule5 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 57 "./src-ag/GenerateCode.ag" #-}- cases _lhsIoptions- {-# LINE 380 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule6 #-}- {-# LINE 58 "./src-ag/GenerateCode.ag" #-}- rule6 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 58 "./src-ag/GenerateCode.ag" #-}- attrInfo _lhsIoptions- {-# LINE 386 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule7 #-}- {-# LINE 59 "./src-ag/GenerateCode.ag" #-}- rule7 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 59 "./src-ag/GenerateCode.ag" #-}- rename _lhsIoptions- {-# LINE 392 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule8 #-}- {-# LINE 60 "./src-ag/GenerateCode.ag" #-}- rule8 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 60 "./src-ag/GenerateCode.ag" #-}- strictWrap _lhsIoptions- {-# LINE 398 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule9 #-}- {-# LINE 61 "./src-ag/GenerateCode.ag" #-}- rule9 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 61 "./src-ag/GenerateCode.ag" #-}- splitSems _lhsIoptions- {-# LINE 404 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule10 #-}- {-# LINE 62 "./src-ag/GenerateCode.ag" #-}- rule10 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 62 "./src-ag/GenerateCode.ag" #-}- if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing- {-# LINE 410 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule11 #-}- {-# LINE 63 "./src-ag/GenerateCode.ag" #-}- rule11 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 63 "./src-ag/GenerateCode.ag" #-}- prefix _lhsIoptions- {-# LINE 416 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule12 #-}- {-# LINE 64 "./src-ag/GenerateCode.ag" #-}- rule12 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 64 "./src-ag/GenerateCode.ag" #-}- genTraces _lhsIoptions- {-# LINE 422 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule13 #-}- {-# LINE 65 "./src-ag/GenerateCode.ag" #-}- rule13 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 65 "./src-ag/GenerateCode.ag" #-}- genCostCentres _lhsIoptions- {-# LINE 428 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule14 #-}- {-# LINE 66 "./src-ag/GenerateCode.ag" #-}- rule14 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 66 "./src-ag/GenerateCode.ag" #-}- genLinePragmas _lhsIoptions- {-# LINE 434 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule15 #-}- {-# LINE 67 "./src-ag/GenerateCode.ag" #-}- rule15 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 67 "./src-ag/GenerateCode.ag" #-}- monadic _lhsIoptions- {-# LINE 440 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule16 #-}- {-# LINE 70 "./src-ag/GenerateCode.ag" #-}- rule16 = \ ((_lhsIoptions) :: Options) multivisit_ ->- {-# LINE 70 "./src-ag/GenerateCode.ag" #-}- _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }- {-# LINE 446 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule17 #-}- {-# LINE 75 "./src-ag/GenerateCode.ag" #-}- rule17 = \ pragmas_ ->- {-# LINE 75 "./src-ag/GenerateCode.ag" #-}- pragmas_- {-# LINE 452 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule18 #-}- {-# LINE 97 "./src-ag/GenerateCode.ag" #-}- rule18 = \ paramMap_ ->- {-# LINE 97 "./src-ag/GenerateCode.ag" #-}- paramMap_- {-# LINE 458 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule19 #-}- {-# LINE 119 "./src-ag/GenerateCode.ag" #-}- rule19 = \ contextMap_ ->- {-# LINE 119 "./src-ag/GenerateCode.ag" #-}- contextMap_- {-# LINE 464 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule20 #-}- {-# LINE 120 "./src-ag/GenerateCode.ag" #-}- rule20 = \ quantMap_ ->- {-# LINE 120 "./src-ag/GenerateCode.ag" #-}- quantMap_- {-# LINE 470 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule21 #-}- {-# LINE 136 "./src-ag/GenerateCode.ag" #-}- rule21 = \ ((_nontsIgathNts) :: Set NontermIdent) ->- {-# LINE 136 "./src-ag/GenerateCode.ag" #-}- _nontsIgathNts- {-# LINE 476 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule22 #-}- {-# LINE 584 "./src-ag/GenerateCode.ag" #-}- rule22 = \ aroundsMap_ ->- {-# LINE 584 "./src-ag/GenerateCode.ag" #-}- aroundsMap_- {-# LINE 482 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule23 #-}- {-# LINE 600 "./src-ag/GenerateCode.ag" #-}- rule23 = \ mergeMap_ ->- {-# LINE 600 "./src-ag/GenerateCode.ag" #-}- mergeMap_- {-# LINE 488 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule24 #-}- {-# LINE 757 "./src-ag/GenerateCode.ag" #-}- rule24 = \ ((_nontsIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->- {-# LINE 757 "./src-ag/GenerateCode.ag" #-}- \nt nr repl ->- let (params, tp) = Map.findWithDefault (error ("No such semantic domain: " ++ show nt)) (nt, nr) _nontsIsemDomUnfoldGath- replMap = Map.fromList (zip params repl)- replace k = Map.findWithDefault ('@':k) k replMap- in evalType replace tp- {-# LINE 498 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule25 #-}- {-# LINE 857 "./src-ag/GenerateCode.ag" #-}- rule25 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 857 "./src-ag/GenerateCode.ag" #-}- typeSigs _lhsIoptions- {-# LINE 504 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule26 #-}- {-# LINE 860 "./src-ag/GenerateCode.ag" #-}- rule26 = \ (_ :: ()) ->- {-# LINE 860 "./src-ag/GenerateCode.ag" #-}- Seq.empty- {-# LINE 510 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule27 #-}- {-# LINE 929 "./src-ag/GenerateCode.ag" #-}- rule27 = \ ((_nontsIchunks) :: Chunks) multivisit_ ->- {-# LINE 929 "./src-ag/GenerateCode.ag" #-}- Program _nontsIchunks multivisit_- {-# LINE 516 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule28 #-}- {-# LINE 997 "./src-ag/GenerateCode.ag" #-}- rule28 = \ typeSyns_ ->- {-# LINE 997 "./src-ag/GenerateCode.ag" #-}- typeSyns_- {-# LINE 522 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule29 #-}- {-# LINE 998 "./src-ag/GenerateCode.ag" #-}- rule29 = \ derivings_ ->- {-# LINE 998 "./src-ag/GenerateCode.ag" #-}- derivings_- {-# LINE 528 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule30 #-}- {-# LINE 999 "./src-ag/GenerateCode.ag" #-}- rule30 = \ wrappers_ ->- {-# LINE 999 "./src-ag/GenerateCode.ag" #-}- wrappers_- {-# LINE 534 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule31 #-}- rule31 = \ _aroundMap ->- _aroundMap- {-# INLINE rule32 #-}- rule32 = \ _mergeMap ->- _mergeMap- {-# INLINE rule33 #-}- rule33 = \ _options ->- _options- {-# INLINE rule34 #-}- rule34 = \ _unfoldSemDom ->- _unfoldSemDom---- CInterface ----------------------------------------------------- wrapper-data Inh_CInterface = Inh_CInterface { inh_Inh_CInterface :: (Attributes), nt_Inh_CInterface :: (NontermIdent), o_case_Inh_CInterface :: (Bool), o_cata_Inh_CInterface :: (Bool), o_costcentre_Inh_CInterface :: (Bool), o_data_Inh_CInterface :: (Maybe Bool), o_linePragmas_Inh_CInterface :: (Bool), o_monadic_Inh_CInterface :: (Bool), o_newtypes_Inh_CInterface :: (Bool), o_pretty_Inh_CInterface :: (Bool), o_rename_Inh_CInterface :: (Bool), o_sem_Inh_CInterface :: (Bool), o_sig_Inh_CInterface :: (Bool), o_splitsems_Inh_CInterface :: (Bool), o_strictwrap_Inh_CInterface :: (Bool), o_traces_Inh_CInterface :: (Bool), o_unbox_Inh_CInterface :: (Bool), options_Inh_CInterface :: (Options), paramMap_Inh_CInterface :: (ParamMap), prefix_Inh_CInterface :: (String), syn_Inh_CInterface :: (Attributes) }-data Syn_CInterface = Syn_CInterface { comments_Syn_CInterface :: ([String]), semDom_Syn_CInterface :: ([Decl]), semDomUnfoldGath_Syn_CInterface :: (Map (NontermIdent, Int) ([String], Code.Type)), wrapDecls_Syn_CInterface :: (Decls) }-{-# INLINABLE wrap_CInterface #-}-wrap_CInterface :: T_CInterface -> Inh_CInterface -> (Syn_CInterface )-wrap_CInterface (T_CInterface act) (Inh_CInterface _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CInterface_vIn4 _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn- (T_CInterface_vOut4 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls) <- return (inv_CInterface_s5 sem arg)- return (Syn_CInterface _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls)- )---- cata-{-# INLINE sem_CInterface #-}-sem_CInterface :: CInterface -> T_CInterface -sem_CInterface ( CInterface seg_ ) = sem_CInterface_CInterface ( sem_CSegments seg_ )---- semantic domain-newtype T_CInterface = T_CInterface {- attach_T_CInterface :: Identity (T_CInterface_s5 )- }-newtype T_CInterface_s5 = C_CInterface_s5 {- inv_CInterface_s5 :: (T_CInterface_v4 )- }-data T_CInterface_s6 = C_CInterface_s6-type T_CInterface_v4 = (T_CInterface_vIn4 ) -> (T_CInterface_vOut4 )-data T_CInterface_vIn4 = T_CInterface_vIn4 (Attributes) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)-data T_CInterface_vOut4 = T_CInterface_vOut4 ([String]) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)-{-# NOINLINE sem_CInterface_CInterface #-}-sem_CInterface_CInterface :: T_CSegments -> T_CInterface -sem_CInterface_CInterface arg_seg_ = T_CInterface (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_CInterface_v4 - v4 = \ (T_CInterface_vIn4 _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let- _segX26 = Control.Monad.Identity.runIdentity (attach_T_CSegments (arg_seg_))- (T_CSegments_vOut25 _segIcomments _segIisNil _segIsemDom _segIsemDomUnfoldGath _segIwrapDecls) = inv_CSegments_s26 _segX26 (T_CSegments_vIn25 _segOinh _segOnr _segOnt _segOo_case _segOo_cata _segOo_costcentre _segOo_data _segOo_linePragmas _segOo_monadic _segOo_newtypes _segOo_pretty _segOo_rename _segOo_sem _segOo_sig _segOo_splitsems _segOo_strictwrap _segOo_traces _segOo_unbox _segOoptions _segOparamMap _segOprefix _segOsyn)- _segOnr = rule35 ()- _lhsOsemDom :: [Decl]- _lhsOsemDom = rule36 _segIsemDom- _lhsOcomments :: [String]- _lhsOcomments = rule37 _segIcomments- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule38 _segIsemDomUnfoldGath- _lhsOwrapDecls :: Decls- _lhsOwrapDecls = rule39 _segIwrapDecls- _segOinh = rule40 _lhsIinh- _segOnt = rule41 _lhsInt- _segOo_case = rule42 _lhsIo_case- _segOo_cata = rule43 _lhsIo_cata- _segOo_costcentre = rule44 _lhsIo_costcentre- _segOo_data = rule45 _lhsIo_data- _segOo_linePragmas = rule46 _lhsIo_linePragmas- _segOo_monadic = rule47 _lhsIo_monadic- _segOo_newtypes = rule48 _lhsIo_newtypes- _segOo_pretty = rule49 _lhsIo_pretty- _segOo_rename = rule50 _lhsIo_rename- _segOo_sem = rule51 _lhsIo_sem- _segOo_sig = rule52 _lhsIo_sig- _segOo_splitsems = rule53 _lhsIo_splitsems- _segOo_strictwrap = rule54 _lhsIo_strictwrap- _segOo_traces = rule55 _lhsIo_traces- _segOo_unbox = rule56 _lhsIo_unbox- _segOoptions = rule57 _lhsIoptions- _segOparamMap = rule58 _lhsIparamMap- _segOprefix = rule59 _lhsIprefix- _segOsyn = rule60 _lhsIsyn- __result_ = T_CInterface_vOut4 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls- in __result_ )- in C_CInterface_s5 v4- {-# INLINE rule35 #-}- {-# LINE 285 "./src-ag/GenerateCode.ag" #-}- rule35 = \ (_ :: ()) ->- {-# LINE 285 "./src-ag/GenerateCode.ag" #-}- 0- {-# LINE 625 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule36 #-}- {-# LINE 714 "./src-ag/GenerateCode.ag" #-}- rule36 = \ ((_segIsemDom) :: [Decl]) ->- {-# LINE 714 "./src-ag/GenerateCode.ag" #-}- Comment "semantic domain" : _segIsemDom- {-# LINE 631 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule37 #-}- rule37 = \ ((_segIcomments) :: [String]) ->- _segIcomments- {-# INLINE rule38 #-}- rule38 = \ ((_segIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->- _segIsemDomUnfoldGath- {-# INLINE rule39 #-}- rule39 = \ ((_segIwrapDecls) :: Decls) ->- _segIwrapDecls- {-# INLINE rule40 #-}- rule40 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule41 #-}- rule41 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule42 #-}- rule42 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule43 #-}- rule43 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule44 #-}- rule44 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule45 #-}- rule45 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule46 #-}- rule46 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule47 #-}- rule47 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule48 #-}- rule48 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule49 #-}- rule49 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule50 #-}- rule50 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule51 #-}- rule51 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule52 #-}- rule52 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule53 #-}- rule53 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule54 #-}- rule54 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule55 #-}- rule55 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule56 #-}- rule56 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule57 #-}- rule57 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule58 #-}- rule58 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule59 #-}- rule59 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule60 #-}- rule60 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn---- CNonterminal --------------------------------------------------- wrapper-data Inh_CNonterminal = Inh_CNonterminal { allNts_Inh_CNonterminal :: (Set NontermIdent), allPragmas_Inh_CNonterminal :: (PragmaMap), aroundMap_Inh_CNonterminal :: (Map NontermIdent (Map ConstructorIdent (Set Identifier))), contextMap_Inh_CNonterminal :: (ContextMap), derivings_Inh_CNonterminal :: (Derivings), mergeMap_Inh_CNonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))), o_case_Inh_CNonterminal :: (Bool), o_cata_Inh_CNonterminal :: (Bool), o_costcentre_Inh_CNonterminal :: (Bool), o_data_Inh_CNonterminal :: (Maybe Bool), o_linePragmas_Inh_CNonterminal :: (Bool), o_monadic_Inh_CNonterminal :: (Bool), o_newtypes_Inh_CNonterminal :: (Bool), o_pretty_Inh_CNonterminal :: (Bool), o_rename_Inh_CNonterminal :: (Bool), o_sem_Inh_CNonterminal :: (Bool), o_sig_Inh_CNonterminal :: (Bool), o_splitsems_Inh_CNonterminal :: (Bool), o_strictwrap_Inh_CNonterminal :: (Bool), o_traces_Inh_CNonterminal :: (Bool), o_unbox_Inh_CNonterminal :: (Bool), options_Inh_CNonterminal :: (Options), paramMap_Inh_CNonterminal :: (ParamMap), prefix_Inh_CNonterminal :: (String), quantMap_Inh_CNonterminal :: (QuantMap), typeSyns_Inh_CNonterminal :: (TypeSyns), unfoldSemDom_Inh_CNonterminal :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CNonterminal :: (Bool), wrappers_Inh_CNonterminal :: (Set NontermIdent) }-data Syn_CNonterminal = Syn_CNonterminal { chunks_Syn_CNonterminal :: (Chunks), gathNts_Syn_CNonterminal :: (Set NontermIdent), semDomUnfoldGath_Syn_CNonterminal :: (Map (NontermIdent, Int) ([String], Code.Type)) }-{-# INLINABLE wrap_CNonterminal #-}-wrap_CNonterminal :: T_CNonterminal -> Inh_CNonterminal -> (Syn_CNonterminal )-wrap_CNonterminal (T_CNonterminal act) (Inh_CNonterminal _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CNonterminal_vIn7 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers- (T_CNonterminal_vOut7 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath) <- return (inv_CNonterminal_s8 sem arg)- return (Syn_CNonterminal _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath)- )---- cata-{-# INLINE sem_CNonterminal #-}-sem_CNonterminal :: CNonterminal -> T_CNonterminal -sem_CNonterminal ( CNonterminal nt_ params_ inh_ syn_ prods_ inter_ ) = sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ ( sem_CProductions prods_ ) ( sem_CInterface inter_ )---- semantic domain-newtype T_CNonterminal = T_CNonterminal {- attach_T_CNonterminal :: Identity (T_CNonterminal_s8 )- }-newtype T_CNonterminal_s8 = C_CNonterminal_s8 {- inv_CNonterminal_s8 :: (T_CNonterminal_v7 )- }-data T_CNonterminal_s9 = C_CNonterminal_s9-type T_CNonterminal_v7 = (T_CNonterminal_vIn7 ) -> (T_CNonterminal_vOut7 )-data T_CNonterminal_vIn7 = T_CNonterminal_vIn7 (Set NontermIdent) (PragmaMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) (ContextMap) (Derivings) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (TypeSyns) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)-data T_CNonterminal_vOut7 = T_CNonterminal_vOut7 (Chunks) (Set NontermIdent) (Map (NontermIdent, Int) ([String], Code.Type))-{-# NOINLINE sem_CNonterminal_CNonterminal #-}-sem_CNonterminal_CNonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_CProductions -> T_CInterface -> T_CNonterminal -sem_CNonterminal_CNonterminal arg_nt_ arg_params_ arg_inh_ arg_syn_ arg_prods_ arg_inter_ = T_CNonterminal (return st8) where- {-# NOINLINE st8 #-}- st8 = let- v7 :: T_CNonterminal_v7 - v7 = \ (T_CNonterminal_vIn7 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let- _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_CProductions (arg_prods_))- _interX5 = Control.Monad.Identity.runIdentity (attach_T_CInterface (arg_inter_))- (T_CProductions_vOut16 _prodsIcataAlts _prodsIcomments _prodsIdataAlts _prodsIdecls _prodsIsemNames) = inv_CProductions_s17 _prodsX17 (T_CProductions_vIn16 _prodsOallNts _prodsOallPragmas _prodsOaroundMap _prodsOcontextMap _prodsOinh _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_costcentre _prodsOo_data _prodsOo_linePragmas _prodsOo_monadic _prodsOo_newtypes _prodsOo_pretty _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_splitsems _prodsOo_strictwrap _prodsOo_traces _prodsOo_unbox _prodsOoptions _prodsOparamMap _prodsOprefix _prodsOquantMap _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig _prodsOwrappers)- (T_CInterface_vOut4 _interIcomments _interIsemDom _interIsemDomUnfoldGath _interIwrapDecls) = inv_CInterface_s5 _interX5 (T_CInterface_vIn4 _interOinh _interOnt _interOo_case _interOo_cata _interOo_costcentre _interOo_data _interOo_linePragmas _interOo_monadic _interOo_newtypes _interOo_pretty _interOo_rename _interOo_sem _interOo_sig _interOo_splitsems _interOo_strictwrap _interOo_traces _interOo_unbox _interOoptions _interOparamMap _interOprefix _interOsyn)- (_interOinh,_interOsyn,_interOnt) = rule61 arg_inh_ arg_nt_ arg_syn_- (_prodsOinh,_prodsOsyn,_prodsOnt) = rule62 arg_inh_ arg_nt_ arg_syn_- _lhsOgathNts :: Set NontermIdent- _lhsOgathNts = rule63 arg_nt_- _aroundMap = rule64 _lhsIaroundMap arg_nt_- _mergeMap = rule65 _lhsImergeMap arg_nt_- _semWrapper = rule66 _interIwrapDecls _lhsIo_newtypes _lhsIo_strictwrap arg_inh_ arg_nt_ arg_params_ arg_syn_- _comment = rule67 _interIcomments _prodsIcomments- _lhsOchunks :: Chunks- _lhsOchunks = rule68 _cataFun _comment _dataDef _genCata _interIsemDom _lhsIo_cata _lhsIo_data _lhsIo_pretty _lhsIo_sem _lhsIo_sig _lhsIwrappers _prodsIdecls _prodsIsemNames _semWrapper arg_nt_- _dataDef = rule69 _lhsIderivings _lhsIo_data _lhsItypeSyns _prodsIdataAlts arg_nt_ arg_params_- _genCata = rule70 _lhsIoptions arg_nt_- _cataFun = rule71 _lhsIcontextMap _lhsIo_sig _lhsIprefix _lhsIquantMap _lhsItypeSyns _prodsIcataAlts arg_nt_ arg_params_- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule72 _interIsemDomUnfoldGath- _prodsOallNts = rule73 _lhsIallNts- _prodsOallPragmas = rule74 _lhsIallPragmas- _prodsOaroundMap = rule75 _aroundMap- _prodsOcontextMap = rule76 _lhsIcontextMap- _prodsOmergeMap = rule77 _mergeMap- _prodsOo_case = rule78 _lhsIo_case- _prodsOo_cata = rule79 _lhsIo_cata- _prodsOo_costcentre = rule80 _lhsIo_costcentre- _prodsOo_data = rule81 _lhsIo_data- _prodsOo_linePragmas = rule82 _lhsIo_linePragmas- _prodsOo_monadic = rule83 _lhsIo_monadic- _prodsOo_newtypes = rule84 _lhsIo_newtypes- _prodsOo_pretty = rule85 _lhsIo_pretty- _prodsOo_rename = rule86 _lhsIo_rename- _prodsOo_sem = rule87 _lhsIo_sem- _prodsOo_sig = rule88 _lhsIo_sig- _prodsOo_splitsems = rule89 _lhsIo_splitsems- _prodsOo_strictwrap = rule90 _lhsIo_strictwrap- _prodsOo_traces = rule91 _lhsIo_traces- _prodsOo_unbox = rule92 _lhsIo_unbox- _prodsOoptions = rule93 _lhsIoptions- _prodsOparamMap = rule94 _lhsIparamMap- _prodsOprefix = rule95 _lhsIprefix- _prodsOquantMap = rule96 _lhsIquantMap- _prodsOunfoldSemDom = rule97 _lhsIunfoldSemDom- _prodsOwith_sig = rule98 _lhsIwith_sig- _prodsOwrappers = rule99 _lhsIwrappers- _interOo_case = rule100 _lhsIo_case- _interOo_cata = rule101 _lhsIo_cata- _interOo_costcentre = rule102 _lhsIo_costcentre- _interOo_data = rule103 _lhsIo_data- _interOo_linePragmas = rule104 _lhsIo_linePragmas- _interOo_monadic = rule105 _lhsIo_monadic- _interOo_newtypes = rule106 _lhsIo_newtypes- _interOo_pretty = rule107 _lhsIo_pretty- _interOo_rename = rule108 _lhsIo_rename- _interOo_sem = rule109 _lhsIo_sem- _interOo_sig = rule110 _lhsIo_sig- _interOo_splitsems = rule111 _lhsIo_splitsems- _interOo_strictwrap = rule112 _lhsIo_strictwrap- _interOo_traces = rule113 _lhsIo_traces- _interOo_unbox = rule114 _lhsIo_unbox- _interOoptions = rule115 _lhsIoptions- _interOparamMap = rule116 _lhsIparamMap- _interOprefix = rule117 _lhsIprefix- __result_ = T_CNonterminal_vOut7 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath- in __result_ )- in C_CNonterminal_s8 v7- {-# INLINE rule61 #-}- {-# LINE 85 "./src-ag/GenerateCode.ag" #-}- rule61 = \ inh_ nt_ syn_ ->- {-# LINE 85 "./src-ag/GenerateCode.ag" #-}- (inh_,syn_,nt_)- {-# LINE 814 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule62 #-}- {-# LINE 86 "./src-ag/GenerateCode.ag" #-}- rule62 = \ inh_ nt_ syn_ ->- {-# LINE 86 "./src-ag/GenerateCode.ag" #-}- (inh_,syn_,nt_)- {-# LINE 820 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule63 #-}- {-# LINE 142 "./src-ag/GenerateCode.ag" #-}- rule63 = \ nt_ ->- {-# LINE 142 "./src-ag/GenerateCode.ag" #-}- Set.singleton nt_- {-# LINE 826 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule64 #-}- {-# LINE 585 "./src-ag/GenerateCode.ag" #-}- rule64 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) nt_ ->- {-# LINE 585 "./src-ag/GenerateCode.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 832 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule65 #-}- {-# LINE 601 "./src-ag/GenerateCode.ag" #-}- rule65 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) nt_ ->- {-# LINE 601 "./src-ag/GenerateCode.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 838 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule66 #-}- {-# LINE 806 "./src-ag/GenerateCode.ag" #-}- rule66 = \ ((_interIwrapDecls) :: Decls) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_strictwrap) :: Bool) inh_ nt_ params_ syn_ ->- {-# LINE 806 "./src-ag/GenerateCode.ag" #-}- let params' = map getName params_- inhAttrs = Map.toList inh_- synAttrs = Map.toList syn_- inhVars = [ SimpleExpr (attrname True _LHS a) | (a,_) <- inhAttrs ]- synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]- var = "sem"- wrapNT = "wrap" ++ "_" ++ getName nt_- inhNT = "Inh" ++ "_" ++ getName nt_- synNT = "Syn" ++ "_" ++ getName nt_- varPat = if _lhsIo_newtypes- then App (sdtype nt_) [SimpleExpr var]- else SimpleExpr var- evalTp | null params' = id- | otherwise = idEvalType- appParams nm = TypeApp (SimpleType nm) (map SimpleType params')- typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))- mkstrict = Named _lhsIo_strictwrap- mkdata n attrs = Data n params' [Record n [mkstrict (getName f++"_"++n) $ evalTp $ typeToCodeType (Just nt_) params' t | (f,t) <- attrs]] False []- datas = [mkdata inhNT inhAttrs, mkdata synNT synAttrs]- in datas ++ [ typeSig- , Decl (Fun wrapNT [varPat, App inhNT inhVars])- (Let _interIwrapDecls (App synNT synVars))- Set.empty Set.empty- ]- {-# LINE 867 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule67 #-}- {-# LINE 867 "./src-ag/GenerateCode.ag" #-}- rule67 = \ ((_interIcomments) :: [String]) ((_prodsIcomments) :: [String]) ->- {-# LINE 867 "./src-ag/GenerateCode.ag" #-}- Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )- {-# LINE 873 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule68 #-}- {-# LINE 932 "./src-ag/GenerateCode.ag" #-}- rule68 = \ _cataFun _comment _dataDef _genCata ((_interIsemDom) :: [Decl]) ((_lhsIo_cata) :: Bool) ((_lhsIo_data) :: Maybe Bool) ((_lhsIo_pretty) :: Bool) ((_lhsIo_sem) :: Bool) ((_lhsIo_sig) :: Bool) ((_lhsIwrappers) :: Set NontermIdent) ((_prodsIdecls) :: Decls) ((_prodsIsemNames) :: [String]) _semWrapper nt_ ->- {-# LINE 932 "./src-ag/GenerateCode.ag" #-}- [ Chunk (getName nt_)- (Comment (getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-'))- (if _lhsIo_pretty then [_comment ] else [])- (if isJust _lhsIo_data then [_dataDef ] else [])- (if _lhsIo_cata && _genCata then _cataFun else [])- (if _lhsIo_sig then _interIsemDom else [])- (if nt_ `Set.member` _lhsIwrappers then _semWrapper else [])- (if _lhsIo_sem then _prodsIdecls else [])- (if _lhsIo_sem then _prodsIsemNames else [])- ]- {-# LINE 888 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule69 #-}- {-# LINE 1002 "./src-ag/GenerateCode.ag" #-}- rule69 = \ ((_lhsIderivings) :: Derivings) ((_lhsIo_data) :: Maybe Bool) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdataAlts) :: DataAlts) nt_ params_ ->- {-# LINE 1002 "./src-ag/GenerateCode.ag" #-}- let params' = map getName params_- typeSyn tp = let theType =- case tp of- CommonTypes.Maybe t -> TMaybe $ typeToCodeType (Just nt_) params' t- CommonTypes.Either t1 t2 -> TEither (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)- CommonTypes.Map t1 t2 -> TMap (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)- CommonTypes.IntMap t -> TIntMap $ typeToCodeType (Just nt_) params' t- CommonTypes.List t -> Code.List $ typeToCodeType (Just nt_) params' t- CommonTypes.Tuple ts -> Code.TupleType [typeToCodeType (Just nt_) params' t | (_,t) <- ts ]- tp' -> error $ show tp' ++ " not supported"- in Code.Type (getName nt_) params' (idEvalType theType)- derivings = maybe [] (map getName . Set.toList) (Map.lookup nt_ _lhsIderivings)- dataDef = Data (getName nt_) (map getName params_) _prodsIdataAlts (maybe False id _lhsIo_data) derivings- in maybe dataDef typeSyn $ lookup nt_ _lhsItypeSyns- {-# LINE 907 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule70 #-}- {-# LINE 1045 "./src-ag/GenerateCode.ag" #-}- rule70 = \ ((_lhsIoptions) :: Options) nt_ ->- {-# LINE 1045 "./src-ag/GenerateCode.ag" #-}- not (nt_ `Set.member` nocatas _lhsIoptions)- {-# LINE 913 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule71 #-}- {-# LINE 1046 "./src-ag/GenerateCode.ag" #-}- rule71 = \ ((_lhsIcontextMap) :: ContextMap) ((_lhsIo_sig) :: Bool) ((_lhsIprefix) :: String) ((_lhsIquantMap) :: QuantMap) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIcataAlts) :: Decls) nt_ params_ ->- {-# LINE 1046 "./src-ag/GenerateCode.ag" #-}- let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))- evalTp | null params_ = id- | otherwise = idEvalType- tSig = TSig (cataname _lhsIprefix nt_)- (appQuant _lhsIquantMap nt_ $ appContext _lhsIcontextMap nt_ $ evalTp $ appParams (getName nt_) `Arr` appParams (sdtype nt_))- special typ = case typ of- CommonTypes.List tp ->- let cons = SimpleExpr (semname _lhsIprefix nt_ (identifier "Cons"))- nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))- arg = SimpleExpr "list"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in SimpleExpr ("(Prelude.map " ++ (cataname _lhsIprefix t') ++ " list)")- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = (App "Prelude.foldr" [cons,nil,rarg])- in [Decl lhs rhs Set.empty Set.empty]- CommonTypes.Maybe tp ->- let just = semname _lhsIprefix nt_ (identifier "Just")- nothing = semname _lhsIprefix nt_ (identifier "Nothing" )- arg = SimpleExpr "x"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [arg]- _ -> arg- lhs a = Fun (cataname _lhsIprefix nt_) [a]- in [Decl (lhs (App "Prelude.Just" [arg])) (App just [rarg]) Set.empty Set.empty- ,Decl (lhs (SimpleExpr "Prelude.Nothing")) (SimpleExpr nothing) Set.empty Set.empty- ]- CommonTypes.Either tp1 tp2 ->- let left = semname _lhsIprefix nt_ (identifier "Left")- right = semname _lhsIprefix nt_ (identifier "Right" )- arg = SimpleExpr "x"- rarg0 = case tp1 of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [arg]- _ -> arg- rarg1 = case tp2 of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [arg]- _ -> arg- lhs a = Fun (cataname _lhsIprefix nt_) [a]- in [Decl (lhs (App "Prelude.Left" [arg])) (App left [rarg0]) Set.empty Set.empty- ,Decl (lhs (App "Prelude.Right" [arg])) (App right [rarg1]) Set.empty Set.empty- ]- CommonTypes.Map _ tp ->- let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))- nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))- arg = SimpleExpr "m"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App "Data.Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = App "Data.Map.foldrWithKey" [entry,nil,rarg]- in [Decl lhs rhs Set.empty Set.empty]- CommonTypes.IntMap tp ->- let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))- nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))- arg = SimpleExpr "m"- rarg = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App "Data.IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]- _ -> arg- lhs = Fun (cataname _lhsIprefix nt_) [arg]- rhs = App "Data.IntMap.foldWithKey" [entry,nil,rarg]- in [Decl lhs rhs Set.empty Set.empty]- CommonTypes.Tuple tps ->- let con = semname _lhsIprefix nt_ (identifier "Tuple")- tps' = [ (SimpleExpr (getName x),y) | (x,y) <- tps]- rargs = map rarg tps'- rarg (n, tp) = case tp of- NT t _ _ -> let t' = maybe t id (deforestedNt t)- in App (cataname _lhsIprefix t') [n]- _ -> n- lhs = Fun (cataname _lhsIprefix nt_) [TupleExpr (map fst tps')]- rhs = App con rargs- in [Decl lhs rhs Set.empty Set.empty]- _ -> error "TODO"- in Comment "cata" :- (if _lhsIo_sig then [tSig] else []) ++- maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)- {-# LINE 1000 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule72 #-}- rule72 = \ ((_interIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->- _interIsemDomUnfoldGath- {-# INLINE rule73 #-}- rule73 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule74 #-}- rule74 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule75 #-}- rule75 = \ _aroundMap ->- _aroundMap- {-# INLINE rule76 #-}- rule76 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule77 #-}- rule77 = \ _mergeMap ->- _mergeMap- {-# INLINE rule78 #-}- rule78 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule79 #-}- rule79 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule80 #-}- rule80 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule81 #-}- rule81 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule82 #-}- rule82 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule83 #-}- rule83 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule84 #-}- rule84 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule85 #-}- rule85 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule86 #-}- rule86 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule87 #-}- rule87 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule88 #-}- rule88 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule89 #-}- rule89 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule90 #-}- rule90 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule91 #-}- rule91 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule92 #-}- rule92 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule93 #-}- rule93 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule94 #-}- rule94 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule95 #-}- rule95 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule96 #-}- rule96 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule97 #-}- rule97 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule98 #-}- rule98 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule99 #-}- rule99 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# INLINE rule100 #-}- rule100 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule101 #-}- rule101 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule102 #-}- rule102 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule103 #-}- rule103 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule104 #-}- rule104 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule105 #-}- rule105 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule106 #-}- rule106 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule107 #-}- rule107 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule108 #-}- rule108 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule109 #-}- rule109 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule110 #-}- rule110 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule111 #-}- rule111 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule112 #-}- rule112 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule113 #-}- rule113 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule114 #-}- rule114 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule115 #-}- rule115 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule116 #-}- rule116 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule117 #-}- rule117 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix---- CNonterminals -------------------------------------------------- wrapper-data Inh_CNonterminals = Inh_CNonterminals { allNts_Inh_CNonterminals :: (Set NontermIdent), allPragmas_Inh_CNonterminals :: (PragmaMap), aroundMap_Inh_CNonterminals :: (Map NontermIdent (Map ConstructorIdent (Set Identifier))), contextMap_Inh_CNonterminals :: (ContextMap), derivings_Inh_CNonterminals :: (Derivings), mergeMap_Inh_CNonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))), o_case_Inh_CNonterminals :: (Bool), o_cata_Inh_CNonterminals :: (Bool), o_costcentre_Inh_CNonterminals :: (Bool), o_data_Inh_CNonterminals :: (Maybe Bool), o_linePragmas_Inh_CNonterminals :: (Bool), o_monadic_Inh_CNonterminals :: (Bool), o_newtypes_Inh_CNonterminals :: (Bool), o_pretty_Inh_CNonterminals :: (Bool), o_rename_Inh_CNonterminals :: (Bool), o_sem_Inh_CNonterminals :: (Bool), o_sig_Inh_CNonterminals :: (Bool), o_splitsems_Inh_CNonterminals :: (Bool), o_strictwrap_Inh_CNonterminals :: (Bool), o_traces_Inh_CNonterminals :: (Bool), o_unbox_Inh_CNonterminals :: (Bool), options_Inh_CNonterminals :: (Options), paramMap_Inh_CNonterminals :: (ParamMap), prefix_Inh_CNonterminals :: (String), quantMap_Inh_CNonterminals :: (QuantMap), typeSyns_Inh_CNonterminals :: (TypeSyns), unfoldSemDom_Inh_CNonterminals :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CNonterminals :: (Bool), wrappers_Inh_CNonterminals :: (Set NontermIdent) }-data Syn_CNonterminals = Syn_CNonterminals { chunks_Syn_CNonterminals :: (Chunks), gathNts_Syn_CNonterminals :: (Set NontermIdent), semDomUnfoldGath_Syn_CNonterminals :: (Map (NontermIdent, Int) ([String], Code.Type)) }-{-# INLINABLE wrap_CNonterminals #-}-wrap_CNonterminals :: T_CNonterminals -> Inh_CNonterminals -> (Syn_CNonterminals )-wrap_CNonterminals (T_CNonterminals act) (Inh_CNonterminals _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CNonterminals_vIn10 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers- (T_CNonterminals_vOut10 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath) <- return (inv_CNonterminals_s11 sem arg)- return (Syn_CNonterminals _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath)- )---- cata-{-# NOINLINE sem_CNonterminals #-}-sem_CNonterminals :: CNonterminals -> T_CNonterminals -sem_CNonterminals list = Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list)---- semantic domain-newtype T_CNonterminals = T_CNonterminals {- attach_T_CNonterminals :: Identity (T_CNonterminals_s11 )- }-newtype T_CNonterminals_s11 = C_CNonterminals_s11 {- inv_CNonterminals_s11 :: (T_CNonterminals_v10 )- }-data T_CNonterminals_s12 = C_CNonterminals_s12-type T_CNonterminals_v10 = (T_CNonterminals_vIn10 ) -> (T_CNonterminals_vOut10 )-data T_CNonterminals_vIn10 = T_CNonterminals_vIn10 (Set NontermIdent) (PragmaMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) (ContextMap) (Derivings) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (TypeSyns) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)-data T_CNonterminals_vOut10 = T_CNonterminals_vOut10 (Chunks) (Set NontermIdent) (Map (NontermIdent, Int) ([String], Code.Type))-{-# NOINLINE sem_CNonterminals_Cons #-}-sem_CNonterminals_Cons :: T_CNonterminal -> T_CNonterminals -> T_CNonterminals -sem_CNonterminals_Cons arg_hd_ arg_tl_ = T_CNonterminals (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_CNonterminals_v10 - v10 = \ (T_CNonterminals_vIn10 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let- _hdX8 = Control.Monad.Identity.runIdentity (attach_T_CNonterminal (arg_hd_))- _tlX11 = Control.Monad.Identity.runIdentity (attach_T_CNonterminals (arg_tl_))- (T_CNonterminal_vOut7 _hdIchunks _hdIgathNts _hdIsemDomUnfoldGath) = inv_CNonterminal_s8 _hdX8 (T_CNonterminal_vIn7 _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOderivings _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers)- (T_CNonterminals_vOut10 _tlIchunks _tlIgathNts _tlIsemDomUnfoldGath) = inv_CNonterminals_s11 _tlX11 (T_CNonterminals_vIn10 _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOderivings _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers)- _lhsOchunks :: Chunks- _lhsOchunks = rule118 _hdIchunks _tlIchunks- _lhsOgathNts :: Set NontermIdent- _lhsOgathNts = rule119 _hdIgathNts _tlIgathNts- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule120 _hdIsemDomUnfoldGath _tlIsemDomUnfoldGath- _hdOallNts = rule121 _lhsIallNts- _hdOallPragmas = rule122 _lhsIallPragmas- _hdOaroundMap = rule123 _lhsIaroundMap- _hdOcontextMap = rule124 _lhsIcontextMap- _hdOderivings = rule125 _lhsIderivings- _hdOmergeMap = rule126 _lhsImergeMap- _hdOo_case = rule127 _lhsIo_case- _hdOo_cata = rule128 _lhsIo_cata- _hdOo_costcentre = rule129 _lhsIo_costcentre- _hdOo_data = rule130 _lhsIo_data- _hdOo_linePragmas = rule131 _lhsIo_linePragmas- _hdOo_monadic = rule132 _lhsIo_monadic- _hdOo_newtypes = rule133 _lhsIo_newtypes- _hdOo_pretty = rule134 _lhsIo_pretty- _hdOo_rename = rule135 _lhsIo_rename- _hdOo_sem = rule136 _lhsIo_sem- _hdOo_sig = rule137 _lhsIo_sig- _hdOo_splitsems = rule138 _lhsIo_splitsems- _hdOo_strictwrap = rule139 _lhsIo_strictwrap- _hdOo_traces = rule140 _lhsIo_traces- _hdOo_unbox = rule141 _lhsIo_unbox- _hdOoptions = rule142 _lhsIoptions- _hdOparamMap = rule143 _lhsIparamMap- _hdOprefix = rule144 _lhsIprefix- _hdOquantMap = rule145 _lhsIquantMap- _hdOtypeSyns = rule146 _lhsItypeSyns- _hdOunfoldSemDom = rule147 _lhsIunfoldSemDom- _hdOwith_sig = rule148 _lhsIwith_sig- _hdOwrappers = rule149 _lhsIwrappers- _tlOallNts = rule150 _lhsIallNts- _tlOallPragmas = rule151 _lhsIallPragmas- _tlOaroundMap = rule152 _lhsIaroundMap- _tlOcontextMap = rule153 _lhsIcontextMap- _tlOderivings = rule154 _lhsIderivings- _tlOmergeMap = rule155 _lhsImergeMap- _tlOo_case = rule156 _lhsIo_case- _tlOo_cata = rule157 _lhsIo_cata- _tlOo_costcentre = rule158 _lhsIo_costcentre- _tlOo_data = rule159 _lhsIo_data- _tlOo_linePragmas = rule160 _lhsIo_linePragmas- _tlOo_monadic = rule161 _lhsIo_monadic- _tlOo_newtypes = rule162 _lhsIo_newtypes- _tlOo_pretty = rule163 _lhsIo_pretty- _tlOo_rename = rule164 _lhsIo_rename- _tlOo_sem = rule165 _lhsIo_sem- _tlOo_sig = rule166 _lhsIo_sig- _tlOo_splitsems = rule167 _lhsIo_splitsems- _tlOo_strictwrap = rule168 _lhsIo_strictwrap- _tlOo_traces = rule169 _lhsIo_traces- _tlOo_unbox = rule170 _lhsIo_unbox- _tlOoptions = rule171 _lhsIoptions- _tlOparamMap = rule172 _lhsIparamMap- _tlOprefix = rule173 _lhsIprefix- _tlOquantMap = rule174 _lhsIquantMap- _tlOtypeSyns = rule175 _lhsItypeSyns- _tlOunfoldSemDom = rule176 _lhsIunfoldSemDom- _tlOwith_sig = rule177 _lhsIwith_sig- _tlOwrappers = rule178 _lhsIwrappers- __result_ = T_CNonterminals_vOut10 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath- in __result_ )- in C_CNonterminals_s11 v10- {-# INLINE rule118 #-}- rule118 = \ ((_hdIchunks) :: Chunks) ((_tlIchunks) :: Chunks) ->- _hdIchunks ++ _tlIchunks- {-# INLINE rule119 #-}- rule119 = \ ((_hdIgathNts) :: Set NontermIdent) ((_tlIgathNts) :: Set NontermIdent) ->- _hdIgathNts `Set.union` _tlIgathNts- {-# INLINE rule120 #-}- rule120 = \ ((_hdIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ((_tlIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->- _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath- {-# INLINE rule121 #-}- rule121 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule122 #-}- rule122 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule123 #-}- rule123 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->- _lhsIaroundMap- {-# INLINE rule124 #-}- rule124 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule125 #-}- rule125 = \ ((_lhsIderivings) :: Derivings) ->- _lhsIderivings- {-# INLINE rule126 #-}- rule126 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->- _lhsImergeMap- {-# INLINE rule127 #-}- rule127 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule128 #-}- rule128 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule129 #-}- rule129 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule130 #-}- rule130 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule131 #-}- rule131 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule132 #-}- rule132 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule133 #-}- rule133 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule134 #-}- rule134 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule135 #-}- rule135 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule136 #-}- rule136 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule137 #-}- rule137 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule138 #-}- rule138 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule139 #-}- rule139 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule140 #-}- rule140 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule141 #-}- rule141 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule142 #-}- rule142 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule143 #-}- rule143 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule144 #-}- rule144 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule145 #-}- rule145 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule146 #-}- rule146 = \ ((_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# INLINE rule147 #-}- rule147 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule148 #-}- rule148 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule149 #-}- rule149 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# INLINE rule150 #-}- rule150 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule151 #-}- rule151 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule152 #-}- rule152 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->- _lhsIaroundMap- {-# INLINE rule153 #-}- rule153 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule154 #-}- rule154 = \ ((_lhsIderivings) :: Derivings) ->- _lhsIderivings- {-# INLINE rule155 #-}- rule155 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->- _lhsImergeMap- {-# INLINE rule156 #-}- rule156 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule157 #-}- rule157 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule158 #-}- rule158 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule159 #-}- rule159 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule160 #-}- rule160 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule161 #-}- rule161 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule162 #-}- rule162 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule163 #-}- rule163 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule164 #-}- rule164 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule165 #-}- rule165 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule166 #-}- rule166 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule167 #-}- rule167 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule168 #-}- rule168 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule169 #-}- rule169 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule170 #-}- rule170 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule171 #-}- rule171 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule172 #-}- rule172 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule173 #-}- rule173 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule174 #-}- rule174 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule175 #-}- rule175 = \ ((_lhsItypeSyns) :: TypeSyns) ->- _lhsItypeSyns- {-# INLINE rule176 #-}- rule176 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule177 #-}- rule177 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule178 #-}- rule178 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_CNonterminals_Nil #-}-sem_CNonterminals_Nil :: T_CNonterminals -sem_CNonterminals_Nil = T_CNonterminals (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_CNonterminals_v10 - v10 = \ (T_CNonterminals_vIn10 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let- _lhsOchunks :: Chunks- _lhsOchunks = rule179 ()- _lhsOgathNts :: Set NontermIdent- _lhsOgathNts = rule180 ()- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule181 ()- __result_ = T_CNonterminals_vOut10 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath- in __result_ )- in C_CNonterminals_s11 v10- {-# INLINE rule179 #-}- rule179 = \ (_ :: ()) ->- []- {-# INLINE rule180 #-}- rule180 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule181 #-}- rule181 = \ (_ :: ()) ->- Map.empty---- CProduction ---------------------------------------------------- wrapper-data Inh_CProduction = Inh_CProduction { allNts_Inh_CProduction :: (Set NontermIdent), allPragmas_Inh_CProduction :: (PragmaMap), aroundMap_Inh_CProduction :: (Map ConstructorIdent (Set Identifier)), contextMap_Inh_CProduction :: (ContextMap), inh_Inh_CProduction :: (Attributes), mergeMap_Inh_CProduction :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))), nt_Inh_CProduction :: (NontermIdent), o_case_Inh_CProduction :: (Bool), o_cata_Inh_CProduction :: (Bool), o_costcentre_Inh_CProduction :: (Bool), o_data_Inh_CProduction :: (Maybe Bool), o_linePragmas_Inh_CProduction :: (Bool), o_monadic_Inh_CProduction :: (Bool), o_newtypes_Inh_CProduction :: (Bool), o_pretty_Inh_CProduction :: (Bool), o_rename_Inh_CProduction :: (Bool), o_sem_Inh_CProduction :: (Bool), o_sig_Inh_CProduction :: (Bool), o_splitsems_Inh_CProduction :: (Bool), o_strictwrap_Inh_CProduction :: (Bool), o_traces_Inh_CProduction :: (Bool), o_unbox_Inh_CProduction :: (Bool), options_Inh_CProduction :: (Options), paramMap_Inh_CProduction :: (ParamMap), prefix_Inh_CProduction :: (String), quantMap_Inh_CProduction :: (QuantMap), syn_Inh_CProduction :: (Attributes), unfoldSemDom_Inh_CProduction :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CProduction :: (Bool), wrappers_Inh_CProduction :: (Set NontermIdent) }-data Syn_CProduction = Syn_CProduction { cataAlt_Syn_CProduction :: (Decl), comments_Syn_CProduction :: ([String]), dataAlt_Syn_CProduction :: (DataAlt), decls_Syn_CProduction :: (Decls), semNames_Syn_CProduction :: ([String]) }-{-# INLINABLE wrap_CProduction #-}-wrap_CProduction :: T_CProduction -> Inh_CProduction -> (Syn_CProduction )-wrap_CProduction (T_CProduction act) (Inh_CProduction _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CProduction_vIn13 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers- (T_CProduction_vOut13 _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames) <- return (inv_CProduction_s14 sem arg)- return (Syn_CProduction _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames)- )---- cata-{-# INLINE sem_CProduction #-}-sem_CProduction :: CProduction -> T_CProduction -sem_CProduction ( CProduction con_ visits_ children_ terminals_ ) = sem_CProduction_CProduction con_ ( sem_CVisits visits_ ) children_ terminals_---- semantic domain-newtype T_CProduction = T_CProduction {- attach_T_CProduction :: Identity (T_CProduction_s14 )- }-newtype T_CProduction_s14 = C_CProduction_s14 {- inv_CProduction_s14 :: (T_CProduction_v13 )- }-data T_CProduction_s15 = C_CProduction_s15-type T_CProduction_v13 = (T_CProduction_vIn13 ) -> (T_CProduction_vOut13 )-data T_CProduction_vIn13 = T_CProduction_vIn13 (Set NontermIdent) (PragmaMap) (Map ConstructorIdent (Set Identifier)) (ContextMap) (Attributes) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (Attributes) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)-data T_CProduction_vOut13 = T_CProduction_vOut13 (Decl) ([String]) (DataAlt) (Decls) ([String])-{-# NOINLINE sem_CProduction_CProduction #-}-sem_CProduction_CProduction :: (ConstructorIdent) -> T_CVisits -> ([(Identifier,Type,ChildKind)]) -> ([Identifier]) -> T_CProduction -sem_CProduction_CProduction arg_con_ arg_visits_ arg_children_ arg_terminals_ = T_CProduction (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_CProduction_v13 - v13 = \ (T_CProduction_vIn13 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let- _visitsX32 = Control.Monad.Identity.runIdentity (attach_T_CVisits (arg_visits_))- (T_CVisits_vOut31 _visitsIcomments _visitsIdecls _visitsIgatherInstVisitNrs _visitsIintra _visitsIintraVars _visitsIisNil _visitsIsemNames _visitsIvisitedSet) = inv_CVisits_s32 _visitsX32 (T_CVisits_vIn31 _visitsOallNts _visitsOallPragmas _visitsOaroundMap _visitsOchildren _visitsOcon _visitsOcontextMap _visitsOinh _visitsOinstVisitNrs _visitsOmergeMap _visitsOnr _visitsOnt _visitsOo_case _visitsOo_cata _visitsOo_costcentre _visitsOo_data _visitsOo_linePragmas _visitsOo_monadic _visitsOo_newtypes _visitsOo_pretty _visitsOo_rename _visitsOo_sem _visitsOo_sig _visitsOo_splitsems _visitsOo_strictwrap _visitsOo_traces _visitsOo_unbox _visitsOoptions _visitsOparamInstMap _visitsOparamMap _visitsOprefix _visitsOquantMap _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOvisitedSet _visitsOwith_sig _visitsOwrappers)- _visitsOcon = rule182 arg_con_- _visitsOterminals = rule183 arg_terminals_- _paramInstMap = rule184 arg_children_- _visitsOvisitedSet = rule185 ()- _visitsOnr = rule186 ()- _visitsOchildren = rule187 arg_children_- _visitsOinstVisitNrs = rule188 _visitsIgatherInstVisitNrs- _aroundMap = rule189 _lhsIaroundMap arg_con_- _mergeMap = rule190 _lhsImergeMap arg_con_- _firstOrderChildren = rule191 arg_children_- _lhsOcomments :: [String]- _lhsOcomments = rule192 _firstOrderChildren _visitsIcomments arg_con_- _params = rule193 _lhsInt _lhsIparamMap- _lhsOdataAlt :: DataAlt- _lhsOdataAlt = rule194 _firstOrderChildren _lhsInt _lhsIo_rename _lhsIoptions _params arg_con_- _lhsOcataAlt :: Decl- _lhsOcataAlt = rule195 _firstOrderChildren _lhsInt _lhsIo_rename _lhsIprefix arg_con_- _lhsOdecls :: Decls- _lhsOdecls = rule196 _visitsIdecls- _lhsOsemNames :: [String]- _lhsOsemNames = rule197 _visitsIsemNames- _visitsOallNts = rule198 _lhsIallNts- _visitsOallPragmas = rule199 _lhsIallPragmas- _visitsOaroundMap = rule200 _aroundMap- _visitsOcontextMap = rule201 _lhsIcontextMap- _visitsOinh = rule202 _lhsIinh- _visitsOmergeMap = rule203 _mergeMap- _visitsOnt = rule204 _lhsInt- _visitsOo_case = rule205 _lhsIo_case- _visitsOo_cata = rule206 _lhsIo_cata- _visitsOo_costcentre = rule207 _lhsIo_costcentre- _visitsOo_data = rule208 _lhsIo_data- _visitsOo_linePragmas = rule209 _lhsIo_linePragmas- _visitsOo_monadic = rule210 _lhsIo_monadic- _visitsOo_newtypes = rule211 _lhsIo_newtypes- _visitsOo_pretty = rule212 _lhsIo_pretty- _visitsOo_rename = rule213 _lhsIo_rename- _visitsOo_sem = rule214 _lhsIo_sem- _visitsOo_sig = rule215 _lhsIo_sig- _visitsOo_splitsems = rule216 _lhsIo_splitsems- _visitsOo_strictwrap = rule217 _lhsIo_strictwrap- _visitsOo_traces = rule218 _lhsIo_traces- _visitsOo_unbox = rule219 _lhsIo_unbox- _visitsOoptions = rule220 _lhsIoptions- _visitsOparamInstMap = rule221 _paramInstMap- _visitsOparamMap = rule222 _lhsIparamMap- _visitsOprefix = rule223 _lhsIprefix- _visitsOquantMap = rule224 _lhsIquantMap- _visitsOsyn = rule225 _lhsIsyn- _visitsOunfoldSemDom = rule226 _lhsIunfoldSemDom- _visitsOwith_sig = rule227 _lhsIwith_sig- _visitsOwrappers = rule228 _lhsIwrappers- __result_ = T_CProduction_vOut13 _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames- in __result_ )- in C_CProduction_s14 v13- {-# INLINE rule182 #-}- {-# LINE 91 "./src-ag/GenerateCode.ag" #-}- rule182 = \ con_ ->- {-# LINE 91 "./src-ag/GenerateCode.ag" #-}- con_- {-# LINE 1556 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule183 #-}- {-# LINE 92 "./src-ag/GenerateCode.ag" #-}- rule183 = \ terminals_ ->- {-# LINE 92 "./src-ag/GenerateCode.ag" #-}- terminals_- {-# LINE 1562 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule184 #-}- {-# LINE 104 "./src-ag/GenerateCode.ag" #-}- rule184 = \ children_ ->- {-# LINE 104 "./src-ag/GenerateCode.ag" #-}- Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map cleanupArg $ nontermArgs tp, not (null tps) ]- {-# LINE 1568 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule185 #-}- {-# LINE 146 "./src-ag/GenerateCode.ag" #-}- rule185 = \ (_ :: ()) ->- {-# LINE 146 "./src-ag/GenerateCode.ag" #-}- Set.empty- {-# LINE 1574 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule186 #-}- {-# LINE 281 "./src-ag/GenerateCode.ag" #-}- rule186 = \ (_ :: ()) ->- {-# LINE 281 "./src-ag/GenerateCode.ag" #-}- 0- {-# LINE 1580 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule187 #-}- {-# LINE 413 "./src-ag/GenerateCode.ag" #-}- rule187 = \ children_ ->- {-# LINE 413 "./src-ag/GenerateCode.ag" #-}- children_- {-# LINE 1586 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule188 #-}- {-# LINE 566 "./src-ag/GenerateCode.ag" #-}- rule188 = \ ((_visitsIgatherInstVisitNrs) :: Map Identifier Int) ->- {-# LINE 566 "./src-ag/GenerateCode.ag" #-}- _visitsIgatherInstVisitNrs- {-# LINE 1592 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule189 #-}- {-# LINE 586 "./src-ag/GenerateCode.ag" #-}- rule189 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) con_ ->- {-# LINE 586 "./src-ag/GenerateCode.ag" #-}- Map.findWithDefault Set.empty con_ _lhsIaroundMap- {-# LINE 1598 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule190 #-}- {-# LINE 602 "./src-ag/GenerateCode.ag" #-}- rule190 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) con_ ->- {-# LINE 602 "./src-ag/GenerateCode.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 1604 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule191 #-}- {-# LINE 882 "./src-ag/GenerateCode.ag" #-}- rule191 = \ children_ ->- {-# LINE 882 "./src-ag/GenerateCode.ag" #-}- [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]- {-# LINE 1610 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule192 #-}- {-# LINE 883 "./src-ag/GenerateCode.ag" #-}- rule192 = \ _firstOrderChildren ((_visitsIcomments) :: [String]) con_ ->- {-# LINE 883 "./src-ag/GenerateCode.ag" #-}- ("alternative " ++ getName con_ ++ ":")- : map ind ( map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren- ++ _visitsIcomments- )- {-# LINE 1619 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule193 #-}- {-# LINE 1025 "./src-ag/GenerateCode.ag" #-}- rule193 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->- {-# LINE 1025 "./src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 1625 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule194 #-}- {-# LINE 1026 "./src-ag/GenerateCode.ag" #-}- rule194 = \ _firstOrderChildren ((_lhsInt) :: NontermIdent) ((_lhsIo_rename) :: Bool) ((_lhsIoptions) :: Options) _params con_ ->- {-# LINE 1026 "./src-ag/GenerateCode.ag" #-}- let conNm = conname _lhsIo_rename _lhsInt con_- mkFields :: (NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> a) -> [a]- mkFields f = map (\(nm,t,_) -> f _lhsInt con_ nm (typeToCodeType (Just _lhsInt) _params $ removeDeforested t)) _firstOrderChildren- in if dataRecords _lhsIoptions- then Record conNm $ mkFields $ toNamedType (strictData _lhsIoptions)- else DataAlt conNm $ mkFields $ \_ _ _ t -> t- {-# LINE 1636 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule195 #-}- {-# LINE 1139 "./src-ag/GenerateCode.ag" #-}- rule195 = \ _firstOrderChildren ((_lhsInt) :: NontermIdent) ((_lhsIo_rename) :: Bool) ((_lhsIprefix) :: String) con_ ->- {-# LINE 1139 "./src-ag/GenerateCode.ag" #-}- let lhs = Fun (cataname _lhsIprefix _lhsInt) [lhs_pat]- lhs_pat = App (conname _lhsIo_rename _lhsInt con_)- (map (\(n,_,_) -> SimpleExpr $ locname $ n) _firstOrderChildren )- rhs = App (semname _lhsIprefix _lhsInt con_)- (map argument _firstOrderChildren )- argument (nm,NT tp _ _,_) = App (cataname _lhsIprefix tp)- [SimpleExpr (locname nm)]- argument (nm, _,_) = SimpleExpr (locname nm)- in Decl lhs rhs Set.empty Set.empty- {-# LINE 1650 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule196 #-}- rule196 = \ ((_visitsIdecls) :: Decls) ->- _visitsIdecls- {-# INLINE rule197 #-}- rule197 = \ ((_visitsIsemNames) :: [String]) ->- _visitsIsemNames- {-# INLINE rule198 #-}- rule198 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule199 #-}- rule199 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule200 #-}- rule200 = \ _aroundMap ->- _aroundMap- {-# INLINE rule201 #-}- rule201 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule202 #-}- rule202 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule203 #-}- rule203 = \ _mergeMap ->- _mergeMap- {-# INLINE rule204 #-}- rule204 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule205 #-}- rule205 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule206 #-}- rule206 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule207 #-}- rule207 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule208 #-}- rule208 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule209 #-}- rule209 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule210 #-}- rule210 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule211 #-}- rule211 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule212 #-}- rule212 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule213 #-}- rule213 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule214 #-}- rule214 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule215 #-}- rule215 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule216 #-}- rule216 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule217 #-}- rule217 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule218 #-}- rule218 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule219 #-}- rule219 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule220 #-}- rule220 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule221 #-}- rule221 = \ _paramInstMap ->- _paramInstMap- {-# INLINE rule222 #-}- rule222 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule223 #-}- rule223 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule224 #-}- rule224 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule225 #-}- rule225 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule226 #-}- rule226 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule227 #-}- rule227 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule228 #-}- rule228 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers---- CProductions --------------------------------------------------- wrapper-data Inh_CProductions = Inh_CProductions { allNts_Inh_CProductions :: (Set NontermIdent), allPragmas_Inh_CProductions :: (PragmaMap), aroundMap_Inh_CProductions :: (Map ConstructorIdent (Set Identifier)), contextMap_Inh_CProductions :: (ContextMap), inh_Inh_CProductions :: (Attributes), mergeMap_Inh_CProductions :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))), nt_Inh_CProductions :: (NontermIdent), o_case_Inh_CProductions :: (Bool), o_cata_Inh_CProductions :: (Bool), o_costcentre_Inh_CProductions :: (Bool), o_data_Inh_CProductions :: (Maybe Bool), o_linePragmas_Inh_CProductions :: (Bool), o_monadic_Inh_CProductions :: (Bool), o_newtypes_Inh_CProductions :: (Bool), o_pretty_Inh_CProductions :: (Bool), o_rename_Inh_CProductions :: (Bool), o_sem_Inh_CProductions :: (Bool), o_sig_Inh_CProductions :: (Bool), o_splitsems_Inh_CProductions :: (Bool), o_strictwrap_Inh_CProductions :: (Bool), o_traces_Inh_CProductions :: (Bool), o_unbox_Inh_CProductions :: (Bool), options_Inh_CProductions :: (Options), paramMap_Inh_CProductions :: (ParamMap), prefix_Inh_CProductions :: (String), quantMap_Inh_CProductions :: (QuantMap), syn_Inh_CProductions :: (Attributes), unfoldSemDom_Inh_CProductions :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CProductions :: (Bool), wrappers_Inh_CProductions :: (Set NontermIdent) }-data Syn_CProductions = Syn_CProductions { cataAlts_Syn_CProductions :: (Decls), comments_Syn_CProductions :: ([String]), dataAlts_Syn_CProductions :: (DataAlts), decls_Syn_CProductions :: (Decls), semNames_Syn_CProductions :: ([String]) }-{-# INLINABLE wrap_CProductions #-}-wrap_CProductions :: T_CProductions -> Inh_CProductions -> (Syn_CProductions )-wrap_CProductions (T_CProductions act) (Inh_CProductions _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CProductions_vIn16 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers- (T_CProductions_vOut16 _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames) <- return (inv_CProductions_s17 sem arg)- return (Syn_CProductions _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames)- )---- cata-{-# NOINLINE sem_CProductions #-}-sem_CProductions :: CProductions -> T_CProductions -sem_CProductions list = Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list)---- semantic domain-newtype T_CProductions = T_CProductions {- attach_T_CProductions :: Identity (T_CProductions_s17 )- }-newtype T_CProductions_s17 = C_CProductions_s17 {- inv_CProductions_s17 :: (T_CProductions_v16 )- }-data T_CProductions_s18 = C_CProductions_s18-type T_CProductions_v16 = (T_CProductions_vIn16 ) -> (T_CProductions_vOut16 )-data T_CProductions_vIn16 = T_CProductions_vIn16 (Set NontermIdent) (PragmaMap) (Map ConstructorIdent (Set Identifier)) (ContextMap) (Attributes) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (Attributes) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)-data T_CProductions_vOut16 = T_CProductions_vOut16 (Decls) ([String]) (DataAlts) (Decls) ([String])-{-# NOINLINE sem_CProductions_Cons #-}-sem_CProductions_Cons :: T_CProduction -> T_CProductions -> T_CProductions -sem_CProductions_Cons arg_hd_ arg_tl_ = T_CProductions (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_CProductions_v16 - v16 = \ (T_CProductions_vIn16 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let- _hdX14 = Control.Monad.Identity.runIdentity (attach_T_CProduction (arg_hd_))- _tlX17 = Control.Monad.Identity.runIdentity (attach_T_CProductions (arg_tl_))- (T_CProduction_vOut13 _hdIcataAlt _hdIcomments _hdIdataAlt _hdIdecls _hdIsemNames) = inv_CProduction_s14 _hdX14 (T_CProduction_vIn13 _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOinh _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOunfoldSemDom _hdOwith_sig _hdOwrappers)- (T_CProductions_vOut16 _tlIcataAlts _tlIcomments _tlIdataAlts _tlIdecls _tlIsemNames) = inv_CProductions_s17 _tlX17 (T_CProductions_vIn16 _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOinh _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOunfoldSemDom _tlOwith_sig _tlOwrappers)- _lhsOdataAlts :: DataAlts- _lhsOdataAlts = rule229 _hdIdataAlt _tlIdataAlts- _lhsOcataAlts :: Decls- _lhsOcataAlts = rule230 _hdIcataAlt _tlIcataAlts- _lhsOcomments :: [String]- _lhsOcomments = rule231 _hdIcomments _tlIcomments- _lhsOdecls :: Decls- _lhsOdecls = rule232 _hdIdecls _tlIdecls- _lhsOsemNames :: [String]- _lhsOsemNames = rule233 _hdIsemNames _tlIsemNames- _hdOallNts = rule234 _lhsIallNts- _hdOallPragmas = rule235 _lhsIallPragmas- _hdOaroundMap = rule236 _lhsIaroundMap- _hdOcontextMap = rule237 _lhsIcontextMap- _hdOinh = rule238 _lhsIinh- _hdOmergeMap = rule239 _lhsImergeMap- _hdOnt = rule240 _lhsInt- _hdOo_case = rule241 _lhsIo_case- _hdOo_cata = rule242 _lhsIo_cata- _hdOo_costcentre = rule243 _lhsIo_costcentre- _hdOo_data = rule244 _lhsIo_data- _hdOo_linePragmas = rule245 _lhsIo_linePragmas- _hdOo_monadic = rule246 _lhsIo_monadic- _hdOo_newtypes = rule247 _lhsIo_newtypes- _hdOo_pretty = rule248 _lhsIo_pretty- _hdOo_rename = rule249 _lhsIo_rename- _hdOo_sem = rule250 _lhsIo_sem- _hdOo_sig = rule251 _lhsIo_sig- _hdOo_splitsems = rule252 _lhsIo_splitsems- _hdOo_strictwrap = rule253 _lhsIo_strictwrap- _hdOo_traces = rule254 _lhsIo_traces- _hdOo_unbox = rule255 _lhsIo_unbox- _hdOoptions = rule256 _lhsIoptions- _hdOparamMap = rule257 _lhsIparamMap- _hdOprefix = rule258 _lhsIprefix- _hdOquantMap = rule259 _lhsIquantMap- _hdOsyn = rule260 _lhsIsyn- _hdOunfoldSemDom = rule261 _lhsIunfoldSemDom- _hdOwith_sig = rule262 _lhsIwith_sig- _hdOwrappers = rule263 _lhsIwrappers- _tlOallNts = rule264 _lhsIallNts- _tlOallPragmas = rule265 _lhsIallPragmas- _tlOaroundMap = rule266 _lhsIaroundMap- _tlOcontextMap = rule267 _lhsIcontextMap- _tlOinh = rule268 _lhsIinh- _tlOmergeMap = rule269 _lhsImergeMap- _tlOnt = rule270 _lhsInt- _tlOo_case = rule271 _lhsIo_case- _tlOo_cata = rule272 _lhsIo_cata- _tlOo_costcentre = rule273 _lhsIo_costcentre- _tlOo_data = rule274 _lhsIo_data- _tlOo_linePragmas = rule275 _lhsIo_linePragmas- _tlOo_monadic = rule276 _lhsIo_monadic- _tlOo_newtypes = rule277 _lhsIo_newtypes- _tlOo_pretty = rule278 _lhsIo_pretty- _tlOo_rename = rule279 _lhsIo_rename- _tlOo_sem = rule280 _lhsIo_sem- _tlOo_sig = rule281 _lhsIo_sig- _tlOo_splitsems = rule282 _lhsIo_splitsems- _tlOo_strictwrap = rule283 _lhsIo_strictwrap- _tlOo_traces = rule284 _lhsIo_traces- _tlOo_unbox = rule285 _lhsIo_unbox- _tlOoptions = rule286 _lhsIoptions- _tlOparamMap = rule287 _lhsIparamMap- _tlOprefix = rule288 _lhsIprefix- _tlOquantMap = rule289 _lhsIquantMap- _tlOsyn = rule290 _lhsIsyn- _tlOunfoldSemDom = rule291 _lhsIunfoldSemDom- _tlOwith_sig = rule292 _lhsIwith_sig- _tlOwrappers = rule293 _lhsIwrappers- __result_ = T_CProductions_vOut16 _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames- in __result_ )- in C_CProductions_s17 v16- {-# INLINE rule229 #-}- {-# LINE 1021 "./src-ag/GenerateCode.ag" #-}- rule229 = \ ((_hdIdataAlt) :: DataAlt) ((_tlIdataAlts) :: DataAlts) ->- {-# LINE 1021 "./src-ag/GenerateCode.ag" #-}- _hdIdataAlt : _tlIdataAlts- {-# LINE 1870 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule230 #-}- {-# LINE 1135 "./src-ag/GenerateCode.ag" #-}- rule230 = \ ((_hdIcataAlt) :: Decl) ((_tlIcataAlts) :: Decls) ->- {-# LINE 1135 "./src-ag/GenerateCode.ag" #-}- _hdIcataAlt : _tlIcataAlts- {-# LINE 1876 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule231 #-}- rule231 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->- _hdIcomments ++ _tlIcomments- {-# INLINE rule232 #-}- rule232 = \ ((_hdIdecls) :: Decls) ((_tlIdecls) :: Decls) ->- _hdIdecls ++ _tlIdecls- {-# INLINE rule233 #-}- rule233 = \ ((_hdIsemNames) :: [String]) ((_tlIsemNames) :: [String]) ->- _hdIsemNames ++ _tlIsemNames- {-# INLINE rule234 #-}- rule234 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule235 #-}- rule235 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule236 #-}- rule236 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) ->- _lhsIaroundMap- {-# INLINE rule237 #-}- rule237 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule238 #-}- rule238 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule239 #-}- rule239 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->- _lhsImergeMap- {-# INLINE rule240 #-}- rule240 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule241 #-}- rule241 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule242 #-}- rule242 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule243 #-}- rule243 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule244 #-}- rule244 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule245 #-}- rule245 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule246 #-}- rule246 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule247 #-}- rule247 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule248 #-}- rule248 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule249 #-}- rule249 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule250 #-}- rule250 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule251 #-}- rule251 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule252 #-}- rule252 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule253 #-}- rule253 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule254 #-}- rule254 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule255 #-}- rule255 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule256 #-}- rule256 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule257 #-}- rule257 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule258 #-}- rule258 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule259 #-}- rule259 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule260 #-}- rule260 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule261 #-}- rule261 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule262 #-}- rule262 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule263 #-}- rule263 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# INLINE rule264 #-}- rule264 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule265 #-}- rule265 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule266 #-}- rule266 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) ->- _lhsIaroundMap- {-# INLINE rule267 #-}- rule267 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule268 #-}- rule268 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule269 #-}- rule269 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->- _lhsImergeMap- {-# INLINE rule270 #-}- rule270 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule271 #-}- rule271 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule272 #-}- rule272 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule273 #-}- rule273 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule274 #-}- rule274 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule275 #-}- rule275 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule276 #-}- rule276 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule277 #-}- rule277 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule278 #-}- rule278 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule279 #-}- rule279 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule280 #-}- rule280 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule281 #-}- rule281 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule282 #-}- rule282 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule283 #-}- rule283 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule284 #-}- rule284 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule285 #-}- rule285 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule286 #-}- rule286 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule287 #-}- rule287 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule288 #-}- rule288 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule289 #-}- rule289 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule290 #-}- rule290 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule291 #-}- rule291 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule292 #-}- rule292 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule293 #-}- rule293 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_CProductions_Nil #-}-sem_CProductions_Nil :: T_CProductions -sem_CProductions_Nil = T_CProductions (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_CProductions_v16 - v16 = \ (T_CProductions_vIn16 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let- _lhsOdataAlts :: DataAlts- _lhsOdataAlts = rule294 ()- _lhsOcataAlts :: Decls- _lhsOcataAlts = rule295 ()- _lhsOcomments :: [String]- _lhsOcomments = rule296 ()- _lhsOdecls :: Decls- _lhsOdecls = rule297 ()- _lhsOsemNames :: [String]- _lhsOsemNames = rule298 ()- __result_ = T_CProductions_vOut16 _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames- in __result_ )- in C_CProductions_s17 v16- {-# INLINE rule294 #-}- {-# LINE 1022 "./src-ag/GenerateCode.ag" #-}- rule294 = \ (_ :: ()) ->- {-# LINE 1022 "./src-ag/GenerateCode.ag" #-}- []- {-# LINE 2091 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule295 #-}- {-# LINE 1136 "./src-ag/GenerateCode.ag" #-}- rule295 = \ (_ :: ()) ->- {-# LINE 1136 "./src-ag/GenerateCode.ag" #-}- []- {-# LINE 2097 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule296 #-}- rule296 = \ (_ :: ()) ->- []- {-# INLINE rule297 #-}- rule297 = \ (_ :: ()) ->- []- {-# INLINE rule298 #-}- rule298 = \ (_ :: ()) ->- []---- CRule ---------------------------------------------------------- wrapper-data Inh_CRule = Inh_CRule { allNts_Inh_CRule :: (Set NontermIdent), aroundMap_Inh_CRule :: (Set Identifier), children_Inh_CRule :: ([(Identifier,Type,ChildKind)]), con_Inh_CRule :: (ConstructorIdent), declsAbove_Inh_CRule :: ([Decl]), inh_Inh_CRule :: (Attributes), instVisitNrs_Inh_CRule :: (Map Identifier Int), mergeMap_Inh_CRule :: (Map Identifier (Identifier, [Identifier])), nr_Inh_CRule :: (Int), nt_Inh_CRule :: (NontermIdent), o_case_Inh_CRule :: (Bool), o_cata_Inh_CRule :: (Bool), o_costcentre_Inh_CRule :: (Bool), o_data_Inh_CRule :: (Maybe Bool), o_linePragmas_Inh_CRule :: (Bool), o_monadic_Inh_CRule :: (Bool), o_newtypes_Inh_CRule :: (Bool), o_pretty_Inh_CRule :: (Bool), o_rename_Inh_CRule :: (Bool), o_sem_Inh_CRule :: (Bool), o_sig_Inh_CRule :: (Bool), o_splitsems_Inh_CRule :: (Bool), o_strictwrap_Inh_CRule :: (Bool), o_traces_Inh_CRule :: (Bool), o_unbox_Inh_CRule :: (Bool), options_Inh_CRule :: (Options), paramInstMap_Inh_CRule :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_CRule :: (ParamMap), prefix_Inh_CRule :: (String), syn_Inh_CRule :: (Attributes), terminals_Inh_CRule :: ([Identifier]), unfoldSemDom_Inh_CRule :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_CRule :: (Set Identifier), what_Inh_CRule :: (String) }-data Syn_CRule = Syn_CRule { allTpsFound_Syn_CRule :: (Bool), bldBlocksFun_Syn_CRule :: (DeclBlocks -> DeclBlocks), comments_Syn_CRule :: ([String]), decls_Syn_CRule :: (Decls), declsAbove_Syn_CRule :: ([Decl]), definedInsts_Syn_CRule :: ([Identifier]), exprs_Syn_CRule :: (Exprs), tSigs_Syn_CRule :: ([Decl]), tps_Syn_CRule :: ([Type]), usedVars_Syn_CRule :: (Set String), visitedSet_Syn_CRule :: (Set Identifier) }-{-# INLINABLE wrap_CRule #-}-wrap_CRule :: T_CRule -> Inh_CRule -> (Syn_CRule )-wrap_CRule (T_CRule act) (Inh_CRule _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CRule_vIn19 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat- (T_CRule_vOut19 _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet) <- return (inv_CRule_s20 sem arg)- return (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet)- )---- cata-{-# NOINLINE sem_CRule #-}-sem_CRule :: CRule -> T_CRule -sem_CRule ( CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ pattern_ rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ ) = sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ ( sem_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_-sem_CRule ( CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ ) = sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_---- semantic domain-newtype T_CRule = T_CRule {- attach_T_CRule :: Identity (T_CRule_s20 )- }-newtype T_CRule_s20 = C_CRule_s20 {- inv_CRule_s20 :: (T_CRule_v19 )- }-data T_CRule_s21 = C_CRule_s21-type T_CRule_v19 = (T_CRule_vIn19 ) -> (T_CRule_vOut19 )-data T_CRule_vIn19 = T_CRule_vIn19 (Set NontermIdent) (Set Identifier) ([(Identifier,Type,ChildKind)]) (ConstructorIdent) ([Decl]) (Attributes) (Map Identifier Int) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (String)-data T_CRule_vOut19 = T_CRule_vOut19 (Bool) (DeclBlocks -> DeclBlocks) ([String]) (Decls) ([Decl]) ([Identifier]) (Exprs) ([Decl]) ([Type]) (Set String) (Set Identifier)-{-# NOINLINE sem_CRule_CRule #-}-sem_CRule_CRule :: (Identifier) -> (Bool) -> (Bool) -> (NontermIdent) -> (ConstructorIdent) -> (Identifier) -> (Maybe NontermIdent) -> (Maybe Type) -> T_Pattern -> ([String]) -> (Map Int (Identifier,Identifier,Maybe Type)) -> (Bool) -> (String) -> (Set (Identifier, Identifier)) -> (Bool) -> (Maybe Identifier) -> T_CRule -sem_CRule_CRule arg_name_ arg_isIn_ arg_hasCode_ arg_nt_ arg_con_ arg_field_ _ arg_tp_ arg_pattern_ arg_rhs_ arg_defines_ _ arg_origin_ arg_uses_ arg_explicit_ arg_mbNamed_ = T_CRule (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_CRule_v19 - v19 = \ (T_CRule_vIn19 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let- _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))- (T_Pattern_vOut40 _patternIcopy _patternIdefinedInsts _patternIpatternAttributes) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 )- _instTypes = rule299 _lhsIchildren- _originComment = rule300 _lhsIo_pretty arg_origin_- _instDecls = rule301 _definedInsts _instTypes _lhsIo_monadic _lhsIo_newtypes _lhsIprefix- _patDescr = rule302 _patternIpatternAttributes arg_isIn_- _traceDescr = rule303 _patDescr arg_con_ arg_mbNamed_ arg_nt_- _addTrace = rule304 _lhsIo_traces _traceDescr- _costCentreDescr = rule305 _patDescr arg_con_ arg_nt_- _addCostCentre = rule306 _costCentreDescr _lhsIo_costcentre- _addLinePragma = rule307 _lhsIo_linePragmas arg_name_- _decls = rule308 _addCostCentre _addLinePragma _addTrace _instDecls _lhsIo_monadic _originComment _patternIcopy arg_defines_ arg_explicit_ arg_hasCode_ arg_rhs_ arg_uses_- _definedInsts = rule309 _patternIdefinedInsts arg_isIn_- _rulename = rule310 _lhsIterminals arg_field_ arg_isIn_ arg_name_- _lhsOexprs :: Exprs- _lhsOexprs = rule311 _rulename- _lhsOusedVars :: Set String- _lhsOusedVars = rule312 _rulename- _mkTp = rule313 _lhsInt _orgParams- _lhsOtSigs :: [Decl]- _lhsOtSigs = rule314 _evalTp _lhsIchildren _mkTp arg_defines_- _orgParams = rule315 _lhsInt _lhsIparamMap- _evalTp = rule316 _lhsInt _lhsIparamInstMap _lhsIparamMap _orgParams- _lhsOtps :: [Type]- _lhsOallTpsFound :: Bool- (_lhsOtps,_lhsOallTpsFound) = rule317 arg_tp_- _lhsOdeclsAbove :: [Decl]- _lhsOdeclsAbove = rule318 _decls _lhsIdeclsAbove- _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks- _lhsObldBlocksFun = rule319 ()- _lhsOcomments :: [String]- _lhsOcomments = rule320 _lhsIwhat arg_defines_- _lhsOdecls :: Decls- _lhsOdecls = rule321 _decls- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule322 _definedInsts- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule323 _lhsIvisitedSet- __result_ = T_CRule_vOut19 _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet- in __result_ )- in C_CRule_s20 v19- {-# INLINE rule299 #-}- {-# LINE 157 "./src-ag/GenerateCode.ag" #-}- rule299 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 157 "./src-ag/GenerateCode.ag" #-}- [ (n, (t, mb, for)) | (n, NT t _ for, mb) <- _lhsIchildren ]- {-# LINE 2192 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule300 #-}- {-# LINE 158 "./src-ag/GenerateCode.ag" #-}- rule300 = \ ((_lhsIo_pretty) :: Bool) origin_ ->- {-# LINE 158 "./src-ag/GenerateCode.ag" #-}- if _lhsIo_pretty- then (Comment origin_:)- else id- {-# LINE 2200 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule301 #-}- {-# LINE 161 "./src-ag/GenerateCode.ag" #-}- rule301 = \ _definedInsts _instTypes ((_lhsIo_monadic) :: Bool) ((_lhsIo_newtypes) :: Bool) ((_lhsIprefix) :: String) ->- {-# LINE 161 "./src-ag/GenerateCode.ag" #-}- [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst))))- ( let (nm,mb,defor) = fromJust $ inst `lookup` _instTypes- in unwrapSem _lhsIo_newtypes nm- $ case mb of- ChildReplace _ -> App instLocFieldName [SimpleExpr $ fieldname inst]- _ ->- if defor- then SimpleExpr instLocFieldName- else App (cataname _lhsIprefix nm)- [SimpleExpr instLocFieldName]- )- (Set.singleton instSemFieldName)- (Set.singleton instLocFieldName)- | inst <- _definedInsts- , let instLocFieldName = attrname True _INST inst- instSemFieldName = attrname False _INST' inst- ]- {-# LINE 2222 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule302 #-}- {-# LINE 178 "./src-ag/GenerateCode.ag" #-}- rule302 = \ ((_patternIpatternAttributes) :: [(Identifier, Identifier)]) isIn_ ->- {-# LINE 178 "./src-ag/GenerateCode.ag" #-}- if isIn_- then "_"- else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)- {-# LINE 2230 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule303 #-}- {-# LINE 181 "./src-ag/GenerateCode.ag" #-}- rule303 = \ _patDescr con_ mbNamed_ nt_ ->- {-# LINE 181 "./src-ag/GenerateCode.ag" #-}- (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr- {-# LINE 2236 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule304 #-}- {-# LINE 183 "./src-ag/GenerateCode.ag" #-}- rule304 = \ ((_lhsIo_traces) :: Bool) _traceDescr ->- {-# LINE 183 "./src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_traces- then Trace _traceDescr v- else v- {-# LINE 2244 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule305 #-}- {-# LINE 186 "./src-ag/GenerateCode.ag" #-}- rule305 = \ _patDescr con_ nt_ ->- {-# LINE 186 "./src-ag/GenerateCode.ag" #-}- show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr- {-# LINE 2250 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule306 #-}- {-# LINE 187 "./src-ag/GenerateCode.ag" #-}- rule306 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->- {-# LINE 187 "./src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 2258 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule307 #-}- {-# LINE 190 "./src-ag/GenerateCode.ag" #-}- rule307 = \ ((_lhsIo_linePragmas) :: Bool) name_ ->- {-# LINE 190 "./src-ag/GenerateCode.ag" #-}- \v -> let p = getPos name_- hasPos = line p > 0 && column p >= 0 && not (null (file p))- in if _lhsIo_linePragmas && hasPos- then PragmaExpr True True ("LINE " ++ show (line p) ++ " " ++ show (file p))- $ LineExpr- $ v- else v- {-# LINE 2270 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule308 #-}- {-# LINE 197 "./src-ag/GenerateCode.ag" #-}- rule308 = \ _addCostCentre _addLinePragma _addTrace _instDecls ((_lhsIo_monadic) :: Bool) _originComment ((_patternIcopy) :: Pattern) defines_ explicit_ hasCode_ rhs_ uses_ ->- {-# LINE 197 "./src-ag/GenerateCode.ag" #-}- if hasCode_- then _originComment ( mkDecl (_lhsIo_monadic && explicit_) (Pattern3 _patternIcopy) (_addTrace $ _addCostCentre $ _addLinePragma $ (TextExpr rhs_))- (Set.fromList [attrname False fld nm | (fld,nm,_) <- Map.elems defines_])- (Set.fromList [attrname True fld nm | (fld,nm) <- Set.toList uses_])- : _instDecls )- else _instDecls- {-# LINE 2281 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule309 #-}- {-# LINE 267 "./src-ag/GenerateCode.ag" #-}- rule309 = \ ((_patternIdefinedInsts) :: [Identifier]) isIn_ ->- {-# LINE 267 "./src-ag/GenerateCode.ag" #-}- if isIn_ then [] else _patternIdefinedInsts- {-# LINE 2287 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule310 #-}- {-# LINE 337 "./src-ag/GenerateCode.ag" #-}- rule310 = \ ((_lhsIterminals) :: [Identifier]) field_ isIn_ name_ ->- {-# LINE 337 "./src-ag/GenerateCode.ag" #-}- if field_ == _LOC && name_ `elem` _lhsIterminals- then funname name_ 0- else attrname isIn_ field_ name_- {-# LINE 2295 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule311 #-}- {-# LINE 340 "./src-ag/GenerateCode.ag" #-}- rule311 = \ _rulename ->- {-# LINE 340 "./src-ag/GenerateCode.ag" #-}- [SimpleExpr _rulename ]- {-# LINE 2301 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule312 #-}- {-# LINE 356 "./src-ag/GenerateCode.ag" #-}- rule312 = \ _rulename ->- {-# LINE 356 "./src-ag/GenerateCode.ag" #-}- Set.singleton _rulename- {-# LINE 2307 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule313 #-}- {-# LINE 366 "./src-ag/GenerateCode.ag" #-}- rule313 = \ ((_lhsInt) :: NontermIdent) _orgParams ->- {-# LINE 366 "./src-ag/GenerateCode.ag" #-}- typeToCodeType (Just _lhsInt) _orgParams- {-# LINE 2313 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule314 #-}- {-# LINE 367 "./src-ag/GenerateCode.ag" #-}- rule314 = \ _evalTp ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) _mkTp defines_ ->- {-# LINE 367 "./src-ag/GenerateCode.ag" #-}- [ TSig (attrname False field attr) tp'- | (field,attr,tp) <- Map.elems defines_, isJust tp- , let tp1 = _evalTp field $ _mkTp (fromJust tp)- tp' = case findOrigType attr _lhsIchildren of- Just tp'' -> let tp2 = _evalTp field $ _mkTp tp''- in Arr tp2 tp1- Nothing -> tp1- findOrigType _ [] = Nothing- findOrigType nm ((n,_,kind) : r)- | nm == n = case kind of- ChildReplace orig -> Just orig- _ -> Nothing- | otherwise = findOrigType nm r- ]- {-# LINE 2332 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule315 #-}- {-# LINE 382 "./src-ag/GenerateCode.ag" #-}- rule315 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->- {-# LINE 382 "./src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 2338 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule316 #-}- {-# LINE 384 "./src-ag/GenerateCode.ag" #-}- rule316 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ((_lhsIparamMap) :: ParamMap) _orgParams ->- {-# LINE 384 "./src-ag/GenerateCode.ag" #-}- \field tp -> let orgFldParams = map getName $ Map.findWithDefault [] childNt _lhsIparamMap- (childNt,instParams) = Map.findWithDefault (_lhsInt,[]) field _lhsIparamInstMap- replMap = Map.fromList (zip orgFldParams instParams)- replace k = Map.findWithDefault ('@':k) k replMap- in if null instParams- then if null _orgParams- then tp- else idEvalType tp- else evalType replace tp- {-# LINE 2352 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule317 #-}- {-# LINE 419 "./src-ag/GenerateCode.ag" #-}- rule317 = \ tp_ ->- {-# LINE 419 "./src-ag/GenerateCode.ag" #-}- maybe ([],False) (\tp -> ([tp],True)) tp_- {-# LINE 2358 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule318 #-}- {-# LINE 618 "./src-ag/GenerateCode.ag" #-}- rule318 = \ _decls ((_lhsIdeclsAbove) :: [Decl]) ->- {-# LINE 618 "./src-ag/GenerateCode.ag" #-}- _lhsIdeclsAbove ++ _decls- {-# LINE 2364 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule319 #-}- {-# LINE 631 "./src-ag/GenerateCode.ag" #-}- rule319 = \ (_ :: ()) ->- {-# LINE 631 "./src-ag/GenerateCode.ag" #-}- id- {-# LINE 2370 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule320 #-}- {-# LINE 906 "./src-ag/GenerateCode.ag" #-}- rule320 = \ ((_lhsIwhat) :: String) defines_ ->- {-# LINE 906 "./src-ag/GenerateCode.ag" #-}- [ makeLocalComment 11 _lhsIwhat name tp | (field,name,tp) <- Map.elems defines_, field == _LOC ]- ++ [ makeLocalComment 11 "inst " name tp | (field,name,tp) <- Map.elems defines_, field == _INST ]- {-# LINE 2377 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule321 #-}- rule321 = \ _decls ->- _decls- {-# INLINE rule322 #-}- rule322 = \ _definedInsts ->- _definedInsts- {-# INLINE rule323 #-}- rule323 = \ ((_lhsIvisitedSet) :: Set Identifier) ->- _lhsIvisitedSet-{-# NOINLINE sem_CRule_CChildVisit #-}-sem_CRule_CChildVisit :: (Identifier) -> (NontermIdent) -> (Int) -> (Attributes) -> (Attributes) -> (Bool) -> T_CRule -sem_CRule_CChildVisit arg_name_ arg_nt_ arg_nr_ arg_inh_ arg_syn_ arg_isLast_ = T_CRule (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_CRule_v19 - v19 = \ (T_CRule_vIn19 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let- _visitedSet = rule324 _lhsIvisitedSet arg_name_- _costCentreDescr = rule325 _lhsIcon _lhsInt arg_name_ arg_nr_ arg_nt_- _addCostCentre = rule326 _costCentreDescr _lhsIo_costcentre- _decls = rule327 _addCostCentre _lhsIaroundMap _lhsIchildren _lhsImergeMap _lhsIo_monadic _lhsIo_newtypes _lhsIo_unbox _visitedSet arg_inh_ arg_isLast_ arg_name_ arg_nr_ arg_nt_ arg_syn_- _isSuperfluousHigherOrderIntra = rule328 _lhsIinstVisitNrs _lhsInr arg_name_- _names = rule329 _isSuperfluousHigherOrderIntra arg_name_ arg_nr_- _lhsOexprs :: Exprs- _lhsOexprs = rule330 _instParams _lhsIo_newtypes _lhsIunfoldSemDom _names arg_nr_ arg_nt_- _lhsOusedVars :: Set String- _lhsOusedVars = rule331 _names- _mkTp = rule332 _evalTp _orgParams arg_nt_- _definedTps = rule333 _mkTp arg_name_ arg_syn_- _nextTp = rule334 arg_nr_ arg_nt_- _lhsOtSigs :: [Decl]- _lhsOtSigs = rule335 _definedTps _instParams _nextTp arg_isLast_ arg_name_ arg_nr_- _orgParams = rule336 _lhsIparamMap arg_nt_- _instParams = rule337 _lhsIparamInstMap arg_name_ arg_nt_- _replParamMap = rule338 _instParams _orgParams- _replace = rule339 _replParamMap- _evalTp = rule340 _orgParams _replace- _lhsOtps :: [Type]- _lhsOtps = rule341 _instParams _isSuperfluousHigherOrderIntra arg_nr_ arg_nt_- _lhsOdeclsAbove :: [Decl]- _lhsOdeclsAbove = rule342 ()- _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks- _lhsObldBlocksFun = rule343 _decls _lhsIdeclsAbove- _lhsOallTpsFound :: Bool- _lhsOallTpsFound = rule344 ()- _lhsOcomments :: [String]- _lhsOcomments = rule345 ()- _lhsOdecls :: Decls- _lhsOdecls = rule346 _decls- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule347 ()- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule348 _visitedSet- __result_ = T_CRule_vOut19 _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet- in __result_ )- in C_CRule_s20 v19- {-# INLINE rule324 #-}- {-# LINE 147 "./src-ag/GenerateCode.ag" #-}- rule324 = \ ((_lhsIvisitedSet) :: Set Identifier) name_ ->- {-# LINE 147 "./src-ag/GenerateCode.ag" #-}- Set.insert name_ _lhsIvisitedSet- {-# LINE 2438 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule325 #-}- {-# LINE 203 "./src-ag/GenerateCode.ag" #-}- rule325 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ nr_ nt_ ->- {-# LINE 203 "./src-ag/GenerateCode.ag" #-}- show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_- {-# LINE 2444 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule326 #-}- {-# LINE 204 "./src-ag/GenerateCode.ag" #-}- rule326 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->- {-# LINE 204 "./src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 2452 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule327 #-}- {-# LINE 207 "./src-ag/GenerateCode.ag" #-}- rule327 = \ _addCostCentre ((_lhsIaroundMap) :: Set Identifier) ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ((_lhsIo_monadic) :: Bool) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) _visitedSet inh_ isLast_ name_ nr_ nt_ syn_ ->- {-# LINE 207 "./src-ag/GenerateCode.ag" #-}- let lhsVars = map (attrname True name_) (Map.keys syn_)- ++ if isLast_ then [] else [unwrap ++ funname name_ (nr_+1)]- rhsVars = map (attrname False name_) (Map.keys inh_)- unwrap = if _lhsIo_newtypes then typeName nt_ (nr_ + 1) ++ " " else ""- tuple | isMerging = TupleLhs [locname name_ ++ "_comp"]- | otherwise = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars- rhs = _addCostCentre $ Code.InvokeExpr (typeName nt_ nr_) (SimpleExpr fun) (map SimpleExpr rhsVars)- isVirtual _ [] = False- isVirtual nm ((n,_,kind) : r)- | nm == n = case kind of- ChildAttr -> True- _ -> False- | otherwise = isVirtual nm r- isMerged = name_ `Map.member` _lhsImergeMap- isMerging = name_ `elem` concatMap (\(_,cs) -> cs) (Map.elems _lhsImergeMap)- merges = [ (c,cs) | (c,(_,cs)) <- Map.assocs _lhsImergeMap, all (`Set.member` _visitedSet ) cs, name_ `elem` (c:cs) ]- baseNm = if nr_ == 0 && isVirtual name_ _lhsIchildren- then Ident (getName name_ ++ "_inst") (getPos name_)- else name_- fun | nr_ == 0 && Set.member name_ _lhsIaroundMap- = locname name_ ++ "_around " ++ funname baseNm 0- | otherwise = funname baseNm nr_- outDecls | isMerged = []- | otherwise =- if isMerging- then [mkDecl _lhsIo_monadic tuple rhs Set.empty Set.empty]- else [Resume _lhsIo_monadic (typeName nt_ nr_) tuple rhs]- outMerged | null merges || nr_ /= 0 = []- | otherwise = let (c,cs) = head merges- tuple' = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars'- lhsVars' = map (attrname True c) (Map.keys syn_)- ++ if isLast_ then [] else [unwrap ++ funname c (nr_+1)]- rhsVars' = [ locname c' ++ "_comp" | c' <- cs ]- fun' = locname c ++ "_merge"- rhs' = App fun' (map SimpleExpr rhsVars')- in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']- in- (outDecls ++ outMerged)- {-# LINE 2495 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule328 #-}- {-# LINE 329 "./src-ag/GenerateCode.ag" #-}- rule328 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ((_lhsInr) :: Int) name_ ->- {-# LINE 329 "./src-ag/GenerateCode.ag" #-}- _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs- {-# LINE 2501 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule329 #-}- {-# LINE 342 "./src-ag/GenerateCode.ag" #-}- rule329 = \ _isSuperfluousHigherOrderIntra name_ nr_ ->- {-# LINE 342 "./src-ag/GenerateCode.ag" #-}- if _isSuperfluousHigherOrderIntra- then []- else [funname name_ (nr_+1)]- {-# LINE 2509 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule330 #-}- {-# LINE 346 "./src-ag/GenerateCode.ag" #-}- rule330 = \ _instParams ((_lhsIo_newtypes) :: Bool) ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) _names nr_ nt_ ->- {-# LINE 346 "./src-ag/GenerateCode.ag" #-}- let wrap = if _lhsIo_newtypes then \x -> App (typeName nt_ (nr_ + 1)) [x] else id- addType expr | null _instParams = expr- | otherwise = TypedExpr expr (_lhsIunfoldSemDom nt_ (nr_+1) _instParams )- in map (wrap . addType . SimpleExpr) _names- {-# LINE 2518 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule331 #-}- {-# LINE 358 "./src-ag/GenerateCode.ag" #-}- rule331 = \ _names ->- {-# LINE 358 "./src-ag/GenerateCode.ag" #-}- Set.fromList _names- {-# LINE 2524 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule332 #-}- {-# LINE 394 "./src-ag/GenerateCode.ag" #-}- rule332 = \ _evalTp _orgParams nt_ ->- {-# LINE 394 "./src-ag/GenerateCode.ag" #-}- _evalTp . typeToCodeType (Just nt_) _orgParams- {-# LINE 2530 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule333 #-}- {-# LINE 395 "./src-ag/GenerateCode.ag" #-}- rule333 = \ _mkTp name_ syn_ ->- {-# LINE 395 "./src-ag/GenerateCode.ag" #-}- [ TSig (attrname True name_ a) (_mkTp tp) | (a,tp) <- Map.toList syn_ ]- {-# LINE 2536 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule334 #-}- {-# LINE 396 "./src-ag/GenerateCode.ag" #-}- rule334 = \ nr_ nt_ ->- {-# LINE 396 "./src-ag/GenerateCode.ag" #-}- typeName nt_ (nr_+1)- {-# LINE 2542 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule335 #-}- {-# LINE 397 "./src-ag/GenerateCode.ag" #-}- rule335 = \ _definedTps _instParams _nextTp isLast_ name_ nr_ ->- {-# LINE 397 "./src-ag/GenerateCode.ag" #-}- (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams )) :)) _definedTps- {-# LINE 2548 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule336 #-}- {-# LINE 399 "./src-ag/GenerateCode.ag" #-}- rule336 = \ ((_lhsIparamMap) :: ParamMap) nt_ ->- {-# LINE 399 "./src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] nt_ _lhsIparamMap- {-# LINE 2554 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule337 #-}- {-# LINE 400 "./src-ag/GenerateCode.ag" #-}- rule337 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) name_ nt_ ->- {-# LINE 400 "./src-ag/GenerateCode.ag" #-}- snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap- {-# LINE 2560 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule338 #-}- {-# LINE 401 "./src-ag/GenerateCode.ag" #-}- rule338 = \ _instParams _orgParams ->- {-# LINE 401 "./src-ag/GenerateCode.ag" #-}- Map.fromList (zip _orgParams _instParams )- {-# LINE 2566 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule339 #-}- {-# LINE 402 "./src-ag/GenerateCode.ag" #-}- rule339 = \ _replParamMap ->- {-# LINE 402 "./src-ag/GenerateCode.ag" #-}- \k -> Map.findWithDefault k k _replParamMap- {-# LINE 2572 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule340 #-}- {-# LINE 403 "./src-ag/GenerateCode.ag" #-}- rule340 = \ _orgParams _replace ->- {-# LINE 403 "./src-ag/GenerateCode.ag" #-}- if null _orgParams then id else evalType _replace- {-# LINE 2578 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule341 #-}- {-# LINE 420 "./src-ag/GenerateCode.ag" #-}- rule341 = \ _instParams _isSuperfluousHigherOrderIntra nr_ nt_ ->- {-# LINE 420 "./src-ag/GenerateCode.ag" #-}- if _isSuperfluousHigherOrderIntra- then []- else [NT (ntOfVisit nt_ (nr_+1)) _instParams False]- {-# LINE 2586 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule342 #-}- {-# LINE 620 "./src-ag/GenerateCode.ag" #-}- rule342 = \ (_ :: ()) ->- {-# LINE 620 "./src-ag/GenerateCode.ag" #-}- []- {-# LINE 2592 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule343 #-}- {-# LINE 633 "./src-ag/GenerateCode.ag" #-}- rule343 = \ _decls ((_lhsIdeclsAbove) :: [Decl]) ->- {-# LINE 633 "./src-ag/GenerateCode.ag" #-}- DeclBlock _lhsIdeclsAbove (head _decls )- {-# LINE 2598 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule344 #-}- rule344 = \ (_ :: ()) ->- True- {-# INLINE rule345 #-}- rule345 = \ (_ :: ()) ->- []- {-# INLINE rule346 #-}- rule346 = \ _decls ->- _decls- {-# INLINE rule347 #-}- rule347 = \ (_ :: ()) ->- []- {-# INLINE rule348 #-}- rule348 = \ _visitedSet ->- _visitedSet---- CSegment ------------------------------------------------------- wrapper-data Inh_CSegment = Inh_CSegment { inh_Inh_CSegment :: (Attributes), isLast_Inh_CSegment :: (Bool), nr_Inh_CSegment :: (Int), nt_Inh_CSegment :: (NontermIdent), o_case_Inh_CSegment :: (Bool), o_cata_Inh_CSegment :: (Bool), o_costcentre_Inh_CSegment :: (Bool), o_data_Inh_CSegment :: (Maybe Bool), o_linePragmas_Inh_CSegment :: (Bool), o_monadic_Inh_CSegment :: (Bool), o_newtypes_Inh_CSegment :: (Bool), o_pretty_Inh_CSegment :: (Bool), o_rename_Inh_CSegment :: (Bool), o_sem_Inh_CSegment :: (Bool), o_sig_Inh_CSegment :: (Bool), o_splitsems_Inh_CSegment :: (Bool), o_strictwrap_Inh_CSegment :: (Bool), o_traces_Inh_CSegment :: (Bool), o_unbox_Inh_CSegment :: (Bool), options_Inh_CSegment :: (Options), paramMap_Inh_CSegment :: (ParamMap), prefix_Inh_CSegment :: (String), syn_Inh_CSegment :: (Attributes) }-data Syn_CSegment = Syn_CSegment { comments_Syn_CSegment :: ([String]), semDom_Syn_CSegment :: ([Decl]), semDomUnfoldGath_Syn_CSegment :: (Map (NontermIdent, Int) ([String], Code.Type)), wrapDecls_Syn_CSegment :: (Decls) }-{-# INLINABLE wrap_CSegment #-}-wrap_CSegment :: T_CSegment -> Inh_CSegment -> (Syn_CSegment )-wrap_CSegment (T_CSegment act) (Inh_CSegment _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CSegment_vIn22 _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn- (T_CSegment_vOut22 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls) <- return (inv_CSegment_s23 sem arg)- return (Syn_CSegment _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls)- )---- cata-{-# INLINE sem_CSegment #-}-sem_CSegment :: CSegment -> T_CSegment -sem_CSegment ( CSegment inh_ syn_ ) = sem_CSegment_CSegment inh_ syn_---- semantic domain-newtype T_CSegment = T_CSegment {- attach_T_CSegment :: Identity (T_CSegment_s23 )- }-newtype T_CSegment_s23 = C_CSegment_s23 {- inv_CSegment_s23 :: (T_CSegment_v22 )- }-data T_CSegment_s24 = C_CSegment_s24-type T_CSegment_v22 = (T_CSegment_vIn22 ) -> (T_CSegment_vOut22 )-data T_CSegment_vIn22 = T_CSegment_vIn22 (Attributes) (Bool) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)-data T_CSegment_vOut22 = T_CSegment_vOut22 ([String]) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)-{-# NOINLINE sem_CSegment_CSegment #-}-sem_CSegment_CSegment :: (Attributes) -> (Attributes) -> T_CSegment -sem_CSegment_CSegment arg_inh_ arg_syn_ = T_CSegment (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_CSegment_v22 - v22 = \ (T_CSegment_vIn22 _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let- _altSemForm = rule349 _lhsIoptions- _tp = rule350 _altSemForm _indexExpr _inhTps _synTps- _inhTps = rule351 _lhsInt _params arg_inh_- _inhTup = rule352 _inhTps _lhsIo_unbox- _synTps = rule353 _continuation _inhTps _lhsInt _lhsIo_unbox _params arg_syn_- _curTypeName = rule354 _lhsInr _lhsInt- _nextTypeName = rule355 _lhsInr _lhsInt- _indexName = rule356 _curTypeName- _dataIndex = rule357 _indexName _params- _indexExpr = rule358 _indexName _params- _indexStr = rule359 _indexName _params- _inhInstance = rule360 _indexStr _inhTup _lhsInr _lhsInt- _synInstance = rule361 _indexStr _lhsInr _lhsInt _synTps- _continuation = rule362 _lhsIisLast _nextTypeName _params- _params = rule363 _lhsInt _lhsIparamMap- _lhsOsemDom :: [Decl]- _lhsOsemDom = rule364 _altSemForm _dataIndex _inhInstance _lhsInr _lhsInt _lhsIo_newtypes _params _synInstance _tp- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule365 _lhsInr _lhsInt _params _tp- _lhsOwrapDecls :: Decls- _lhsOwrapDecls = rule366 _lhsIisLast _lhsInr _lhsInt _lhsIo_newtypes _lhsIo_unbox arg_inh_ arg_syn_- _lhsOcomments :: [String]- _lhsOcomments = rule367 _lhsInr arg_inh_ arg_syn_- __result_ = T_CSegment_vOut22 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls- in __result_ )- in C_CSegment_s23 v22- {-# INLINE rule349 #-}- {-# LINE 717 "./src-ag/GenerateCode.ag" #-}- rule349 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 717 "./src-ag/GenerateCode.ag" #-}- breadthFirst _lhsIoptions- {-# LINE 2683 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule350 #-}- {-# LINE 718 "./src-ag/GenerateCode.ag" #-}- rule350 = \ _altSemForm _indexExpr _inhTps _synTps ->- {-# LINE 718 "./src-ag/GenerateCode.ag" #-}- if _altSemForm- then TypeApp (SimpleType "Child") [SimpleType "EvalInfo", _indexExpr ]- else foldr Arr _synTps _inhTps- {-# LINE 2691 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule351 #-}- {-# LINE 721 "./src-ag/GenerateCode.ag" #-}- rule351 = \ ((_lhsInt) :: NontermIdent) _params inh_ ->- {-# LINE 721 "./src-ag/GenerateCode.ag" #-}- [typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems inh_]- {-# LINE 2697 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule352 #-}- {-# LINE 722 "./src-ag/GenerateCode.ag" #-}- rule352 = \ _inhTps ((_lhsIo_unbox) :: Bool) ->- {-# LINE 722 "./src-ag/GenerateCode.ag" #-}- mkTupleType _lhsIo_unbox (null _inhTps ) _inhTps- {-# LINE 2703 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule353 #-}- {-# LINE 723 "./src-ag/GenerateCode.ag" #-}- rule353 = \ _continuation _inhTps ((_lhsInt) :: NontermIdent) ((_lhsIo_unbox) :: Bool) _params syn_ ->- {-# LINE 723 "./src-ag/GenerateCode.ag" #-}- mkTupleType _lhsIo_unbox (null _inhTps ) ([typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems syn_] ++ _continuation )- {-# LINE 2709 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule354 #-}- {-# LINE 724 "./src-ag/GenerateCode.ag" #-}- rule354 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->- {-# LINE 724 "./src-ag/GenerateCode.ag" #-}- typeName _lhsInt _lhsInr- {-# LINE 2715 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule355 #-}- {-# LINE 725 "./src-ag/GenerateCode.ag" #-}- rule355 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->- {-# LINE 725 "./src-ag/GenerateCode.ag" #-}- typeName _lhsInt (_lhsInr + 1)- {-# LINE 2721 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule356 #-}- {-# LINE 726 "./src-ag/GenerateCode.ag" #-}- rule356 = \ _curTypeName ->- {-# LINE 726 "./src-ag/GenerateCode.ag" #-}- "I_" ++ _curTypeName- {-# LINE 2727 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule357 #-}- {-# LINE 727 "./src-ag/GenerateCode.ag" #-}- rule357 = \ _indexName _params ->- {-# LINE 727 "./src-ag/GenerateCode.ag" #-}- Code.Data _indexName _params [DataAlt _indexName []] False []- {-# LINE 2733 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule358 #-}- {-# LINE 728 "./src-ag/GenerateCode.ag" #-}- rule358 = \ _indexName _params ->- {-# LINE 728 "./src-ag/GenerateCode.ag" #-}- TypeApp (SimpleType _indexName ) (map (SimpleType . ('@':)) _params )- {-# LINE 2739 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule359 #-}- {-# LINE 729 "./src-ag/GenerateCode.ag" #-}- rule359 = \ _indexName _params ->- {-# LINE 729 "./src-ag/GenerateCode.ag" #-}- "(" ++ _indexName ++ concatMap (\p -> " " ++ p) _params ++ ")"- {-# LINE 2745 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule360 #-}- {-# LINE 730 "./src-ag/GenerateCode.ag" #-}- rule360 = \ _indexStr _inhTup ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->- {-# LINE 730 "./src-ag/GenerateCode.ag" #-}- Code.Data "instance Inh" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup ] ] False []- {-# LINE 2751 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule361 #-}- {-# LINE 731 "./src-ag/GenerateCode.ag" #-}- rule361 = \ _indexStr ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) _synTps ->- {-# LINE 731 "./src-ag/GenerateCode.ag" #-}- Code.Data "instance Syn" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps ] ] False []- {-# LINE 2757 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule362 #-}- {-# LINE 732 "./src-ag/GenerateCode.ag" #-}- rule362 = \ ((_lhsIisLast) :: Bool) _nextTypeName _params ->- {-# LINE 732 "./src-ag/GenerateCode.ag" #-}- if _lhsIisLast- then []- else [TypeApp (SimpleType _nextTypeName ) (map (SimpleType . ('@':)) _params )]- {-# LINE 2765 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule363 #-}- {-# LINE 735 "./src-ag/GenerateCode.ag" #-}- rule363 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->- {-# LINE 735 "./src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 2771 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule364 #-}- {-# LINE 736 "./src-ag/GenerateCode.ag" #-}- rule364 = \ _altSemForm _dataIndex _inhInstance ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) _params _synInstance _tp ->- {-# LINE 736 "./src-ag/GenerateCode.ag" #-}- let name = typeName _lhsInt _lhsInr- evalTp | null _params = id- | otherwise = idEvalType- in ( if _lhsIo_newtypes- then [ Code.NewType name _params name (evalTp _tp ) ]- else [ Code.Type name _params (evalTp _tp ) ] )- ++ ( if _altSemForm- then [_dataIndex , _inhInstance , _synInstance ]- else [] )- {-# LINE 2785 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule365 #-}- {-# LINE 750 "./src-ag/GenerateCode.ag" #-}- rule365 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) _params _tp ->- {-# LINE 750 "./src-ag/GenerateCode.ag" #-}- Map.singleton (_lhsInt, _lhsInr) (_params , _tp )- {-# LINE 2791 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule366 #-}- {-# LINE 834 "./src-ag/GenerateCode.ag" #-}- rule366 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) inh_ syn_ ->- {-# LINE 834 "./src-ag/GenerateCode.ag" #-}- let lhsVars = map (lhsname False) (Map.keys syn_)- ++ if _lhsIisLast then [] else [unwrap ++ sem (_lhsInr+1)]- rhsVars = map (lhsname True) (Map.keys inh_)- rhs = map SimpleExpr rhsVars- unwrap = if _lhsIo_newtypes then typeName _lhsInt (_lhsInr + 1) ++ " " else ""- var = "sem"- sem 0 = var- sem n = var ++ "_" ++ show n- ntt = typeName _lhsInt _lhsInr- in [ EvalDecl ntt (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (InvokeExpr ntt (SimpleExpr $ sem _lhsInr) rhs) ]- {-# LINE 2806 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule367 #-}- {-# LINE 876 "./src-ag/GenerateCode.ag" #-}- rule367 = \ ((_lhsInr) :: Int) inh_ syn_ ->- {-# LINE 876 "./src-ag/GenerateCode.ag" #-}- let body = map ind (showsSegment (CSegment inh_ syn_))- in if null body- then []- else ("visit " ++ show _lhsInr ++ ":") : body- {-# LINE 2815 "dist/build/GenerateCode.hs"#-}---- CSegments ------------------------------------------------------ wrapper-data Inh_CSegments = Inh_CSegments { inh_Inh_CSegments :: (Attributes), nr_Inh_CSegments :: (Int), nt_Inh_CSegments :: (NontermIdent), o_case_Inh_CSegments :: (Bool), o_cata_Inh_CSegments :: (Bool), o_costcentre_Inh_CSegments :: (Bool), o_data_Inh_CSegments :: (Maybe Bool), o_linePragmas_Inh_CSegments :: (Bool), o_monadic_Inh_CSegments :: (Bool), o_newtypes_Inh_CSegments :: (Bool), o_pretty_Inh_CSegments :: (Bool), o_rename_Inh_CSegments :: (Bool), o_sem_Inh_CSegments :: (Bool), o_sig_Inh_CSegments :: (Bool), o_splitsems_Inh_CSegments :: (Bool), o_strictwrap_Inh_CSegments :: (Bool), o_traces_Inh_CSegments :: (Bool), o_unbox_Inh_CSegments :: (Bool), options_Inh_CSegments :: (Options), paramMap_Inh_CSegments :: (ParamMap), prefix_Inh_CSegments :: (String), syn_Inh_CSegments :: (Attributes) }-data Syn_CSegments = Syn_CSegments { comments_Syn_CSegments :: ([String]), isNil_Syn_CSegments :: (Bool), semDom_Syn_CSegments :: ([Decl]), semDomUnfoldGath_Syn_CSegments :: (Map (NontermIdent, Int) ([String], Code.Type)), wrapDecls_Syn_CSegments :: (Decls) }-{-# INLINABLE wrap_CSegments #-}-wrap_CSegments :: T_CSegments -> Inh_CSegments -> (Syn_CSegments )-wrap_CSegments (T_CSegments act) (Inh_CSegments _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CSegments_vIn25 _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn- (T_CSegments_vOut25 _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls) <- return (inv_CSegments_s26 sem arg)- return (Syn_CSegments _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls)- )---- cata-{-# NOINLINE sem_CSegments #-}-sem_CSegments :: CSegments -> T_CSegments -sem_CSegments list = Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list)---- semantic domain-newtype T_CSegments = T_CSegments {- attach_T_CSegments :: Identity (T_CSegments_s26 )- }-newtype T_CSegments_s26 = C_CSegments_s26 {- inv_CSegments_s26 :: (T_CSegments_v25 )- }-data T_CSegments_s27 = C_CSegments_s27-type T_CSegments_v25 = (T_CSegments_vIn25 ) -> (T_CSegments_vOut25 )-data T_CSegments_vIn25 = T_CSegments_vIn25 (Attributes) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)-data T_CSegments_vOut25 = T_CSegments_vOut25 ([String]) (Bool) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)-{-# NOINLINE sem_CSegments_Cons #-}-sem_CSegments_Cons :: T_CSegment -> T_CSegments -> T_CSegments -sem_CSegments_Cons arg_hd_ arg_tl_ = T_CSegments (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_CSegments_v25 - v25 = \ (T_CSegments_vIn25 _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let- _hdX23 = Control.Monad.Identity.runIdentity (attach_T_CSegment (arg_hd_))- _tlX26 = Control.Monad.Identity.runIdentity (attach_T_CSegments (arg_tl_))- (T_CSegment_vOut22 _hdIcomments _hdIsemDom _hdIsemDomUnfoldGath _hdIwrapDecls) = inv_CSegment_s23 _hdX23 (T_CSegment_vIn22 _hdOinh _hdOisLast _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOsyn)- (T_CSegments_vOut25 _tlIcomments _tlIisNil _tlIsemDom _tlIsemDomUnfoldGath _tlIwrapDecls) = inv_CSegments_s26 _tlX26 (T_CSegments_vIn25 _tlOinh _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOsyn)- _tlOnr = rule368 _lhsInr- _lhsOisNil :: Bool- _lhsOisNil = rule369 ()- _hdOisLast = rule370 _tlIisNil- _lhsOcomments :: [String]- _lhsOcomments = rule371 _hdIcomments _tlIcomments- _lhsOsemDom :: [Decl]- _lhsOsemDom = rule372 _hdIsemDom _tlIsemDom- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule373 _hdIsemDomUnfoldGath _tlIsemDomUnfoldGath- _lhsOwrapDecls :: Decls- _lhsOwrapDecls = rule374 _hdIwrapDecls _tlIwrapDecls- _hdOinh = rule375 _lhsIinh- _hdOnr = rule376 _lhsInr- _hdOnt = rule377 _lhsInt- _hdOo_case = rule378 _lhsIo_case- _hdOo_cata = rule379 _lhsIo_cata- _hdOo_costcentre = rule380 _lhsIo_costcentre- _hdOo_data = rule381 _lhsIo_data- _hdOo_linePragmas = rule382 _lhsIo_linePragmas- _hdOo_monadic = rule383 _lhsIo_monadic- _hdOo_newtypes = rule384 _lhsIo_newtypes- _hdOo_pretty = rule385 _lhsIo_pretty- _hdOo_rename = rule386 _lhsIo_rename- _hdOo_sem = rule387 _lhsIo_sem- _hdOo_sig = rule388 _lhsIo_sig- _hdOo_splitsems = rule389 _lhsIo_splitsems- _hdOo_strictwrap = rule390 _lhsIo_strictwrap- _hdOo_traces = rule391 _lhsIo_traces- _hdOo_unbox = rule392 _lhsIo_unbox- _hdOoptions = rule393 _lhsIoptions- _hdOparamMap = rule394 _lhsIparamMap- _hdOprefix = rule395 _lhsIprefix- _hdOsyn = rule396 _lhsIsyn- _tlOinh = rule397 _lhsIinh- _tlOnt = rule398 _lhsInt- _tlOo_case = rule399 _lhsIo_case- _tlOo_cata = rule400 _lhsIo_cata- _tlOo_costcentre = rule401 _lhsIo_costcentre- _tlOo_data = rule402 _lhsIo_data- _tlOo_linePragmas = rule403 _lhsIo_linePragmas- _tlOo_monadic = rule404 _lhsIo_monadic- _tlOo_newtypes = rule405 _lhsIo_newtypes- _tlOo_pretty = rule406 _lhsIo_pretty- _tlOo_rename = rule407 _lhsIo_rename- _tlOo_sem = rule408 _lhsIo_sem- _tlOo_sig = rule409 _lhsIo_sig- _tlOo_splitsems = rule410 _lhsIo_splitsems- _tlOo_strictwrap = rule411 _lhsIo_strictwrap- _tlOo_traces = rule412 _lhsIo_traces- _tlOo_unbox = rule413 _lhsIo_unbox- _tlOoptions = rule414 _lhsIoptions- _tlOparamMap = rule415 _lhsIparamMap- _tlOprefix = rule416 _lhsIprefix- _tlOsyn = rule417 _lhsIsyn- __result_ = T_CSegments_vOut25 _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls- in __result_ )- in C_CSegments_s26 v25- {-# INLINE rule368 #-}- {-# LINE 287 "./src-ag/GenerateCode.ag" #-}- rule368 = \ ((_lhsInr) :: Int) ->- {-# LINE 287 "./src-ag/GenerateCode.ag" #-}- _lhsInr + 1- {-# LINE 2921 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule369 #-}- {-# LINE 300 "./src-ag/GenerateCode.ag" #-}- rule369 = \ (_ :: ()) ->- {-# LINE 300 "./src-ag/GenerateCode.ag" #-}- False- {-# LINE 2927 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule370 #-}- {-# LINE 301 "./src-ag/GenerateCode.ag" #-}- rule370 = \ ((_tlIisNil) :: Bool) ->- {-# LINE 301 "./src-ag/GenerateCode.ag" #-}- _tlIisNil- {-# LINE 2933 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule371 #-}- rule371 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->- _hdIcomments ++ _tlIcomments- {-# INLINE rule372 #-}- rule372 = \ ((_hdIsemDom) :: [Decl]) ((_tlIsemDom) :: [Decl]) ->- _hdIsemDom ++ _tlIsemDom- {-# INLINE rule373 #-}- rule373 = \ ((_hdIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ((_tlIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->- _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath- {-# INLINE rule374 #-}- rule374 = \ ((_hdIwrapDecls) :: Decls) ((_tlIwrapDecls) :: Decls) ->- _hdIwrapDecls ++ _tlIwrapDecls- {-# INLINE rule375 #-}- rule375 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule376 #-}- rule376 = \ ((_lhsInr) :: Int) ->- _lhsInr- {-# INLINE rule377 #-}- rule377 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule378 #-}- rule378 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule379 #-}- rule379 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule380 #-}- rule380 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule381 #-}- rule381 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule382 #-}- rule382 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule383 #-}- rule383 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule384 #-}- rule384 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule385 #-}- rule385 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule386 #-}- rule386 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule387 #-}- rule387 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule388 #-}- rule388 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule389 #-}- rule389 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule390 #-}- rule390 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule391 #-}- rule391 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule392 #-}- rule392 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule393 #-}- rule393 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule394 #-}- rule394 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule395 #-}- rule395 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule396 #-}- rule396 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule397 #-}- rule397 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule398 #-}- rule398 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule399 #-}- rule399 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule400 #-}- rule400 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule401 #-}- rule401 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule402 #-}- rule402 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule403 #-}- rule403 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule404 #-}- rule404 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule405 #-}- rule405 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule406 #-}- rule406 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule407 #-}- rule407 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule408 #-}- rule408 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule409 #-}- rule409 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule410 #-}- rule410 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule411 #-}- rule411 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule412 #-}- rule412 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule413 #-}- rule413 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule414 #-}- rule414 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule415 #-}- rule415 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule416 #-}- rule416 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule417 #-}- rule417 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn-{-# NOINLINE sem_CSegments_Nil #-}-sem_CSegments_Nil :: T_CSegments -sem_CSegments_Nil = T_CSegments (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_CSegments_v25 - v25 = \ (T_CSegments_vIn25 _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let- _lhsOisNil :: Bool- _lhsOisNil = rule418 ()- _lhsOcomments :: [String]- _lhsOcomments = rule419 ()- _lhsOsemDom :: [Decl]- _lhsOsemDom = rule420 ()- _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)- _lhsOsemDomUnfoldGath = rule421 ()- _lhsOwrapDecls :: Decls- _lhsOwrapDecls = rule422 ()- __result_ = T_CSegments_vOut25 _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls- in __result_ )- in C_CSegments_s26 v25- {-# INLINE rule418 #-}- {-# LINE 302 "./src-ag/GenerateCode.ag" #-}- rule418 = \ (_ :: ()) ->- {-# LINE 302 "./src-ag/GenerateCode.ag" #-}- True- {-# LINE 3100 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule419 #-}- rule419 = \ (_ :: ()) ->- []- {-# INLINE rule420 #-}- rule420 = \ (_ :: ()) ->- []- {-# INLINE rule421 #-}- rule421 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule422 #-}- rule422 = \ (_ :: ()) ->- []---- CVisit --------------------------------------------------------- wrapper-data Inh_CVisit = Inh_CVisit { allNts_Inh_CVisit :: (Set NontermIdent), allPragmas_Inh_CVisit :: (PragmaMap), aroundMap_Inh_CVisit :: (Set Identifier), children_Inh_CVisit :: ([(Identifier,Type, ChildKind)]), con_Inh_CVisit :: (ConstructorIdent), contextMap_Inh_CVisit :: (ContextMap), decls_Inh_CVisit :: (Decls), inh_Inh_CVisit :: (Attributes), instVisitNrs_Inh_CVisit :: (Map Identifier Int), isLast_Inh_CVisit :: (Bool), mergeMap_Inh_CVisit :: (Map Identifier (Identifier, [Identifier])), nextIntra_Inh_CVisit :: (Exprs), nextIntraVars_Inh_CVisit :: (Set String), nr_Inh_CVisit :: (Int), nt_Inh_CVisit :: (NontermIdent), o_case_Inh_CVisit :: (Bool), o_cata_Inh_CVisit :: (Bool), o_costcentre_Inh_CVisit :: (Bool), o_data_Inh_CVisit :: (Maybe Bool), o_linePragmas_Inh_CVisit :: (Bool), o_monadic_Inh_CVisit :: (Bool), o_newtypes_Inh_CVisit :: (Bool), o_pretty_Inh_CVisit :: (Bool), o_rename_Inh_CVisit :: (Bool), o_sem_Inh_CVisit :: (Bool), o_sig_Inh_CVisit :: (Bool), o_splitsems_Inh_CVisit :: (Bool), o_strictwrap_Inh_CVisit :: (Bool), o_traces_Inh_CVisit :: (Bool), o_unbox_Inh_CVisit :: (Bool), options_Inh_CVisit :: (Options), paramInstMap_Inh_CVisit :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_CVisit :: (ParamMap), prefix_Inh_CVisit :: (String), quantMap_Inh_CVisit :: (QuantMap), syn_Inh_CVisit :: (Attributes), terminals_Inh_CVisit :: ([Identifier]), unfoldSemDom_Inh_CVisit :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_CVisit :: (Set Identifier), with_sig_Inh_CVisit :: (Bool), wrappers_Inh_CVisit :: (Set NontermIdent) }-data Syn_CVisit = Syn_CVisit { comments_Syn_CVisit :: ([String]), decls_Syn_CVisit :: (Decls), gatherInstVisitNrs_Syn_CVisit :: (Map Identifier Int), intra_Syn_CVisit :: (Exprs), intraVars_Syn_CVisit :: (Set String), semNames_Syn_CVisit :: ([String]), visitedSet_Syn_CVisit :: (Set Identifier) }-{-# INLINABLE wrap_CVisit #-}-wrap_CVisit :: T_CVisit -> Inh_CVisit -> (Syn_CVisit )-wrap_CVisit (T_CVisit act) (Inh_CVisit _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CVisit_vIn28 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers- (T_CVisit_vOut28 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet) <- return (inv_CVisit_s29 sem arg)- return (Syn_CVisit _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet)- )---- cata-{-# INLINE sem_CVisit #-}-sem_CVisit :: CVisit -> T_CVisit -sem_CVisit ( CVisit inh_ syn_ vss_ intra_ ordered_ ) = sem_CVisit_CVisit inh_ syn_ ( sem_Sequence vss_ ) ( sem_Sequence intra_ ) ordered_---- semantic domain-newtype T_CVisit = T_CVisit {- attach_T_CVisit :: Identity (T_CVisit_s29 )- }-newtype T_CVisit_s29 = C_CVisit_s29 {- inv_CVisit_s29 :: (T_CVisit_v28 )- }-data T_CVisit_s30 = C_CVisit_s30-type T_CVisit_v28 = (T_CVisit_vIn28 ) -> (T_CVisit_vOut28 )-data T_CVisit_vIn28 = T_CVisit_vIn28 (Set NontermIdent) (PragmaMap) (Set Identifier) ([(Identifier,Type, ChildKind)]) (ConstructorIdent) (ContextMap) (Decls) (Attributes) (Map Identifier Int) (Bool) (Map Identifier (Identifier, [Identifier])) (Exprs) (Set String) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (QuantMap) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (Bool) (Set NontermIdent)-data T_CVisit_vOut28 = T_CVisit_vOut28 ([String]) (Decls) (Map Identifier Int) (Exprs) (Set String) ([String]) (Set Identifier)-{-# NOINLINE sem_CVisit_CVisit #-}-sem_CVisit_CVisit :: (Attributes) -> (Attributes) -> T_Sequence -> T_Sequence -> (Bool) -> T_CVisit -sem_CVisit_CVisit arg_inh_ arg_syn_ arg_vss_ arg_intra_ arg_ordered_ = T_CVisit (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_CVisit_v28 - v28 = \ (T_CVisit_vIn28 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) -> ( let- _vssX47 = Control.Monad.Identity.runIdentity (attach_T_Sequence (arg_vss_))- _intraX47 = Control.Monad.Identity.runIdentity (attach_T_Sequence (arg_intra_))- (T_Sequence_vOut46 _vssIallTpsFound _vssIblockDecls _vssIcomments _vssIdecls _vssIdeclsAbove _vssIdefinedInsts _vssIexprs _vssItSigs _vssItps _vssIusedVars _vssIvisitedSet) = inv_Sequence_s47 _vssX47 (T_Sequence_vIn46 _vssOallNts _vssOaroundMap _vssOchildren _vssOcon _vssOdeclsAbove _vssOinh _vssOinstVisitNrs _vssOlastExpr _vssOmergeMap _vssOnr _vssOnt _vssOo_case _vssOo_cata _vssOo_costcentre _vssOo_data _vssOo_linePragmas _vssOo_monadic _vssOo_newtypes _vssOo_pretty _vssOo_rename _vssOo_sem _vssOo_sig _vssOo_splitsems _vssOo_strictwrap _vssOo_traces _vssOo_unbox _vssOoptions _vssOparamInstMap _vssOparamMap _vssOprefix _vssOsyn _vssOterminals _vssOunfoldSemDom _vssOvisitedSet _vssOwhat)- (T_Sequence_vOut46 _intraIallTpsFound _intraIblockDecls _intraIcomments _intraIdecls _intraIdeclsAbove _intraIdefinedInsts _intraIexprs _intraItSigs _intraItps _intraIusedVars _intraIvisitedSet) = inv_Sequence_s47 _intraX47 (T_Sequence_vIn46 _intraOallNts _intraOaroundMap _intraOchildren _intraOcon _intraOdeclsAbove _intraOinh _intraOinstVisitNrs _intraOlastExpr _intraOmergeMap _intraOnr _intraOnt _intraOo_case _intraOo_cata _intraOo_costcentre _intraOo_data _intraOo_linePragmas _intraOo_monadic _intraOo_newtypes _intraOo_pretty _intraOo_rename _intraOo_sem _intraOo_sig _intraOo_splitsems _intraOo_strictwrap _intraOo_traces _intraOo_unbox _intraOoptions _intraOparamInstMap _intraOparamMap _intraOprefix _intraOsyn _intraOterminals _intraOunfoldSemDom _intraOvisitedSet _intraOwhat)- _lhsOintra :: Exprs- _lhsOintra = rule423 _intraIexprs- _lhsOintraVars :: Set String- _lhsOintraVars = rule424 _intraIusedVars- (_higherOrderChildren,_firstOrderChildren) = rule425 _lhsIchildren- _firstOrderOrig = rule426 _firstOrderChildren- _funcname = rule427 _lhsIcon _lhsInr _lhsInt _lhsIprefix- _nextVisitName = rule428 _lhsIisLast _lhsInr _lhsInt _lhsIprefix- _nextVisitDecl = rule429 _lhsIcon _lhsIdecls _lhsIisLast _lhsInextIntraVars _lhsInr _lhsInt _lhsIprefix _nextVisitName- _isOneVisit = rule430 _lhsIisLast _lhsInr- _hasWrappers = rule431 _lhsInt _lhsIwrappers- _refDecls = rule432 _hasWrappers _isOneVisit _lhsInt _lhsIoptions arg_syn_- _decls = rule433 _nextVisitDecl _refDecls _typeSigs _vssIdecls- _vssOlastExpr = rule434 _lhsIo_unbox _nextVisitName arg_inh_ arg_syn_- _intraOlastExpr = rule435 ()- _lastExprVars = rule436 _nextVisitName arg_syn_- (_blockFunDecls,_blockFirstFunCall) = rule437 _funcname _lastExprVars _nextVisitDecl _o_case _vssIblockDecls- _costCentreDescr = rule438 _lhsIcon _lhsInr _lhsInt- _addCostCentre = rule439 _costCentreDescr _lhsIo_costcentre- _params = rule440 _lhsInt _lhsIparamMap- _semFun = rule441 _addCostCentre _blockFirstFunCall _decls _declsType _firstOrderOrig _funcname _lhsInr _lhsInt _lhsIo_newtypes _lhsIo_unbox _lhsIunfoldSemDom _nextVisitName _o_splitsems _params arg_inh_ arg_ordered_ arg_syn_- _tsig = rule442 _funcname _semType- _semType = rule443 _firstOrderOrig _lhsIcontextMap _lhsInr _lhsInt _lhsIquantMap _params- _lhsOdecls :: Decls- _lhsOdecls = rule444 _blockFunDecls _lhsIwith_sig _o_splitsems _semFun _tsig arg_ordered_- _typeSigs = rule445 _lhsIo_sig _o_case _vssItSigs- _o_do = rule446 _lhsIo_monadic arg_ordered_- _o_case = rule447 _lhsIallPragmas _lhsIcon _lhsInt _lhsIo_case _o_do arg_ordered_- _declsType = rule448 _o_case _o_do- _o_splitsems = rule449 _lhsIo_splitsems arg_ordered_- _lhsOgatherInstVisitNrs :: Map Identifier Int- _lhsOgatherInstVisitNrs = rule450 _lhsInr _vssIdefinedInsts- _vssOdeclsAbove = rule451 ()- _intraOdeclsAbove = rule452 ()- _lhsOcomments :: [String]- _lhsOcomments = rule453 _intraIcomments _lhsInr _vssIcomments- _vssOwhat = rule454 ()- _intraOwhat = rule455 ()- _lhsOsemNames :: [String]- _lhsOsemNames = rule456 _funcname- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule457 _intraIvisitedSet- _vssOallNts = rule458 _lhsIallNts- _vssOaroundMap = rule459 _lhsIaroundMap- _vssOchildren = rule460 _lhsIchildren- _vssOcon = rule461 _lhsIcon- _vssOinh = rule462 _lhsIinh- _vssOinstVisitNrs = rule463 _lhsIinstVisitNrs- _vssOmergeMap = rule464 _lhsImergeMap- _vssOnr = rule465 _lhsInr- _vssOnt = rule466 _lhsInt- _vssOo_case = rule467 _o_case- _vssOo_cata = rule468 _lhsIo_cata- _vssOo_costcentre = rule469 _lhsIo_costcentre- _vssOo_data = rule470 _lhsIo_data- _vssOo_linePragmas = rule471 _lhsIo_linePragmas- _vssOo_monadic = rule472 _lhsIo_monadic- _vssOo_newtypes = rule473 _lhsIo_newtypes- _vssOo_pretty = rule474 _lhsIo_pretty- _vssOo_rename = rule475 _lhsIo_rename- _vssOo_sem = rule476 _lhsIo_sem- _vssOo_sig = rule477 _lhsIo_sig- _vssOo_splitsems = rule478 _o_splitsems- _vssOo_strictwrap = rule479 _lhsIo_strictwrap- _vssOo_traces = rule480 _lhsIo_traces- _vssOo_unbox = rule481 _lhsIo_unbox- _vssOoptions = rule482 _lhsIoptions- _vssOparamInstMap = rule483 _lhsIparamInstMap- _vssOparamMap = rule484 _lhsIparamMap- _vssOprefix = rule485 _lhsIprefix- _vssOsyn = rule486 _lhsIsyn- _vssOterminals = rule487 _lhsIterminals- _vssOunfoldSemDom = rule488 _lhsIunfoldSemDom- _vssOvisitedSet = rule489 _lhsIvisitedSet- _intraOallNts = rule490 _lhsIallNts- _intraOaroundMap = rule491 _lhsIaroundMap- _intraOchildren = rule492 _lhsIchildren- _intraOcon = rule493 _lhsIcon- _intraOinh = rule494 _lhsIinh- _intraOinstVisitNrs = rule495 _lhsIinstVisitNrs- _intraOmergeMap = rule496 _lhsImergeMap- _intraOnr = rule497 _lhsInr- _intraOnt = rule498 _lhsInt- _intraOo_case = rule499 _o_case- _intraOo_cata = rule500 _lhsIo_cata- _intraOo_costcentre = rule501 _lhsIo_costcentre- _intraOo_data = rule502 _lhsIo_data- _intraOo_linePragmas = rule503 _lhsIo_linePragmas- _intraOo_monadic = rule504 _lhsIo_monadic- _intraOo_newtypes = rule505 _lhsIo_newtypes- _intraOo_pretty = rule506 _lhsIo_pretty- _intraOo_rename = rule507 _lhsIo_rename- _intraOo_sem = rule508 _lhsIo_sem- _intraOo_sig = rule509 _lhsIo_sig- _intraOo_splitsems = rule510 _o_splitsems- _intraOo_strictwrap = rule511 _lhsIo_strictwrap- _intraOo_traces = rule512 _lhsIo_traces- _intraOo_unbox = rule513 _lhsIo_unbox- _intraOoptions = rule514 _lhsIoptions- _intraOparamInstMap = rule515 _lhsIparamInstMap- _intraOparamMap = rule516 _lhsIparamMap- _intraOprefix = rule517 _lhsIprefix- _intraOsyn = rule518 _lhsIsyn- _intraOterminals = rule519 _lhsIterminals- _intraOunfoldSemDom = rule520 _lhsIunfoldSemDom- _intraOvisitedSet = rule521 _vssIvisitedSet- __result_ = T_CVisit_vOut28 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet- in __result_ )- in C_CVisit_s29 v28- {-# INLINE rule423 #-}- {-# LINE 311 "./src-ag/GenerateCode.ag" #-}- rule423 = \ ((_intraIexprs) :: Exprs) ->- {-# LINE 311 "./src-ag/GenerateCode.ag" #-}- _intraIexprs- {-# LINE 3269 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule424 #-}- {-# LINE 312 "./src-ag/GenerateCode.ag" #-}- rule424 = \ ((_intraIusedVars) :: Set String) ->- {-# LINE 312 "./src-ag/GenerateCode.ag" #-}- _intraIusedVars- {-# LINE 3275 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule425 #-}- {-# LINE 442 "./src-ag/GenerateCode.ag" #-}- rule425 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->- {-# LINE 442 "./src-ag/GenerateCode.ag" #-}- partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren- {-# LINE 3281 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule426 #-}- {-# LINE 443 "./src-ag/GenerateCode.ag" #-}- rule426 = \ _firstOrderChildren ->- {-# LINE 443 "./src-ag/GenerateCode.ag" #-}- map pickOrigType _firstOrderChildren- {-# LINE 3287 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule427 #-}- {-# LINE 444 "./src-ag/GenerateCode.ag" #-}- rule427 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) ->- {-# LINE 444 "./src-ag/GenerateCode.ag" #-}- seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr- {-# LINE 3293 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule428 #-}- {-# LINE 445 "./src-ag/GenerateCode.ag" #-}- rule428 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) ->- {-# LINE 445 "./src-ag/GenerateCode.ag" #-}- if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]- {-# LINE 3299 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule429 #-}- {-# LINE 446 "./src-ag/GenerateCode.ag" #-}- rule429 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsIdecls) :: Decls) ((_lhsIisLast) :: Bool) ((_lhsInextIntraVars) :: Set String) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) _nextVisitName ->- {-# LINE 446 "./src-ag/GenerateCode.ag" #-}- let lhs = TupleLhs _nextVisitName- rhs = Let _lhsIdecls (SimpleExpr fun)- fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)- in if _lhsIisLast- then []- else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]- {-# LINE 3310 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule430 #-}- {-# LINE 453 "./src-ag/GenerateCode.ag" #-}- rule430 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ->- {-# LINE 453 "./src-ag/GenerateCode.ag" #-}- _lhsIisLast && _lhsInr == 0- {-# LINE 3316 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule431 #-}- {-# LINE 454 "./src-ag/GenerateCode.ag" #-}- rule431 = \ ((_lhsInt) :: NontermIdent) ((_lhsIwrappers) :: Set NontermIdent) ->- {-# LINE 454 "./src-ag/GenerateCode.ag" #-}- _lhsInt `Set.member` _lhsIwrappers- {-# LINE 3322 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule432 #-}- {-# LINE 455 "./src-ag/GenerateCode.ag" #-}- rule432 = \ _hasWrappers _isOneVisit ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) syn_ ->- {-# LINE 455 "./src-ag/GenerateCode.ag" #-}- if _isOneVisit && _hasWrappers && reference _lhsIoptions- then let synAttrs = Map.toList syn_- synNT = "Syn" ++ "_" ++ getName _lhsInt- synVars = [ SimpleExpr (attrname False _LHS a) | (a,_) <- synAttrs ]- rhs = App synNT synVars- lhs = Fun "___node" []- in [Decl lhs rhs Set.empty Set.empty]- else []- {-# LINE 3335 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule433 #-}- {-# LINE 463 "./src-ag/GenerateCode.ag" #-}- rule433 = \ _nextVisitDecl _refDecls _typeSigs ((_vssIdecls) :: Decls) ->- {-# LINE 463 "./src-ag/GenerateCode.ag" #-}- _typeSigs ++ _vssIdecls ++ _nextVisitDecl ++ _refDecls- {-# LINE 3341 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule434 #-}- {-# LINE 464 "./src-ag/GenerateCode.ag" #-}- rule434 = \ ((_lhsIo_unbox) :: Bool) _nextVisitName inh_ syn_ ->- {-# LINE 464 "./src-ag/GenerateCode.ag" #-}- mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName- {-# LINE 3347 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule435 #-}- {-# LINE 465 "./src-ag/GenerateCode.ag" #-}- rule435 = \ (_ :: ()) ->- {-# LINE 465 "./src-ag/GenerateCode.ag" #-}- error "lastExpr: not used here"- {-# LINE 3353 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule436 #-}- {-# LINE 466 "./src-ag/GenerateCode.ag" #-}- rule436 = \ _nextVisitName syn_ ->- {-# LINE 466 "./src-ag/GenerateCode.ag" #-}- map (lhsname False) (Map.keys syn_) ++ _nextVisitName- {-# LINE 3359 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule437 #-}- {-# LINE 467 "./src-ag/GenerateCode.ag" #-}- rule437 = \ _funcname _lastExprVars _nextVisitDecl _o_case ((_vssIblockDecls) :: DeclBlocks) ->- {-# LINE 467 "./src-ag/GenerateCode.ag" #-}- mkPartitionedFunction _funcname _o_case _nextVisitDecl _lastExprVars _vssIblockDecls- {-# LINE 3365 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule438 #-}- {-# LINE 469 "./src-ag/GenerateCode.ag" #-}- rule438 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->- {-# LINE 469 "./src-ag/GenerateCode.ag" #-}- "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr- {-# LINE 3371 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule439 #-}- {-# LINE 470 "./src-ag/GenerateCode.ag" #-}- rule439 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->- {-# LINE 470 "./src-ag/GenerateCode.ag" #-}- \v -> if _lhsIo_costcentre- then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v- else v- {-# LINE 3379 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule440 #-}- {-# LINE 474 "./src-ag/GenerateCode.ag" #-}- rule440 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->- {-# LINE 474 "./src-ag/GenerateCode.ag" #-}- map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap- {-# LINE 3385 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule441 #-}- {-# LINE 475 "./src-ag/GenerateCode.ag" #-}- rule441 = \ _addCostCentre _blockFirstFunCall _decls _declsType _firstOrderOrig _funcname ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) _nextVisitName _o_splitsems _params inh_ ordered_ syn_ ->- {-# LINE 475 "./src-ag/GenerateCode.ag" #-}- let lhs = Fun _funcname lhs_args- lhs_args = if _lhsInr == 0 then map field _firstOrderOrig else []- field (name,NT tp tps _,_) = let unwrap | _lhsIo_newtypes = \x -> App (sdtype tp) [x]- | otherwise = id- addType expr | null tps = expr- | otherwise = TypedExpr expr (_lhsIunfoldSemDom tp 0 tps)- in unwrap $ addType $ SimpleExpr $ funname name 0- field (name,tp,_) = let expr = SimpleExpr (funname name 0)- in if null _params- then expr- else TypedExpr expr (idEvalType $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp)- mbEvalTp | null _params = const Nothing- | otherwise = Just . idEvalType- rhs = wrap- . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp) | (nm,tp) <- Map.assocs inh_]- $ _addCostCentre- $ if ordered_ && _o_splitsems- then _blockFirstFunCall- else mkDecls _declsType _decls- . ResultExpr (typeName _lhsInt _lhsInr)- . mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_)- $ map (SimpleExpr . lhsname False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName- wrap = if _lhsIo_newtypes- then \x -> App (typeName _lhsInt _lhsInr) [x]- else id- in Decl lhs rhs Set.empty Set.empty- {-# LINE 3416 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule442 #-}- {-# LINE 506 "./src-ag/GenerateCode.ag" #-}- rule442 = \ _funcname _semType ->- {-# LINE 506 "./src-ag/GenerateCode.ag" #-}- TSig _funcname _semType- {-# LINE 3422 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule443 #-}- {-# LINE 507 "./src-ag/GenerateCode.ag" #-}- rule443 = \ _firstOrderOrig ((_lhsIcontextMap) :: ContextMap) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIquantMap) :: QuantMap) _params ->- {-# LINE 507 "./src-ag/GenerateCode.ag" #-}- let argType (NT tp tps _) r | tp /= _SELF = typeAppStrs (sdtype tp) tps `Arr` r- | tp == _SELF = error "GenerateCode: found an intra-type with type SELF, which should have been prevented by CRule.tps"- argType (Haskell tp) r = SimpleType tp `Arr` r- argType _ _ = error "Self type not allowed here"- evalTp | null _params = id- | otherwise = idEvalType- in appQuant _lhsIquantMap _lhsInt $ appContext _lhsIcontextMap _lhsInt $ evalTp $- if _lhsInr == 0- then foldr argType (typeAppStrs (sdtype _lhsInt ) _params ) (map (\(_,t,_) -> t) _firstOrderOrig )- else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params ) []- {-# LINE 3437 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule444 #-}- {-# LINE 518 "./src-ag/GenerateCode.ag" #-}- rule444 = \ _blockFunDecls ((_lhsIwith_sig) :: Bool) _o_splitsems _semFun _tsig ordered_ ->- {-# LINE 518 "./src-ag/GenerateCode.ag" #-}- ( if _lhsIwith_sig- then [_tsig, _semFun]- else [_semFun]- ) ++- ( if ordered_ && _o_splitsems- then _blockFunDecls- else []- )- {-# LINE 3450 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule445 #-}- {-# LINE 526 "./src-ag/GenerateCode.ag" #-}- rule445 = \ ((_lhsIo_sig) :: Bool) _o_case ((_vssItSigs) :: [Decl]) ->- {-# LINE 526 "./src-ag/GenerateCode.ag" #-}- if _lhsIo_sig && not _o_case- then _vssItSigs- else []- {-# LINE 3458 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule446 #-}- {-# LINE 529 "./src-ag/GenerateCode.ag" #-}- rule446 = \ ((_lhsIo_monadic) :: Bool) ordered_ ->- {-# LINE 529 "./src-ag/GenerateCode.ag" #-}- ordered_ && _lhsIo_monadic- {-# LINE 3464 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule447 #-}- {-# LINE 530 "./src-ag/GenerateCode.ag" #-}- rule447 = \ ((_lhsIallPragmas) :: PragmaMap) ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIo_case) :: Bool) _o_do ordered_ ->- {-# LINE 530 "./src-ag/GenerateCode.ag" #-}- not _o_do && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)- {-# LINE 3470 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule448 #-}- {-# LINE 531 "./src-ag/GenerateCode.ag" #-}- rule448 = \ _o_case _o_do ->- {-# LINE 531 "./src-ag/GenerateCode.ag" #-}- if _o_do- then DeclsDo- else if _o_case- then DeclsCase- else DeclsLet- {-# LINE 3480 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule449 #-}- {-# LINE 536 "./src-ag/GenerateCode.ag" #-}- rule449 = \ ((_lhsIo_splitsems) :: Bool) ordered_ ->- {-# LINE 536 "./src-ag/GenerateCode.ag" #-}- ordered_ && _lhsIo_splitsems- {-# LINE 3486 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule450 #-}- {-# LINE 570 "./src-ag/GenerateCode.ag" #-}- rule450 = \ ((_lhsInr) :: Int) ((_vssIdefinedInsts) :: [Identifier]) ->- {-# LINE 570 "./src-ag/GenerateCode.ag" #-}- Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]- {-# LINE 3492 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule451 #-}- {-# LINE 613 "./src-ag/GenerateCode.ag" #-}- rule451 = \ (_ :: ()) ->- {-# LINE 613 "./src-ag/GenerateCode.ag" #-}- []- {-# LINE 3498 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule452 #-}- {-# LINE 614 "./src-ag/GenerateCode.ag" #-}- rule452 = \ (_ :: ()) ->- {-# LINE 614 "./src-ag/GenerateCode.ag" #-}- error "declsAbove: not used here"- {-# LINE 3504 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule453 #-}- {-# LINE 897 "./src-ag/GenerateCode.ag" #-}- rule453 = \ ((_intraIcomments) :: [String]) ((_lhsInr) :: Int) ((_vssIcomments) :: [String]) ->- {-# LINE 897 "./src-ag/GenerateCode.ag" #-}- let body = map ind (_vssIcomments ++ _intraIcomments)- in if null body- then []- else ("visit " ++ show _lhsInr ++ ":") : body- {-# LINE 3513 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule454 #-}- {-# LINE 901 "./src-ag/GenerateCode.ag" #-}- rule454 = \ (_ :: ()) ->- {-# LINE 901 "./src-ag/GenerateCode.ag" #-}- "local"- {-# LINE 3519 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule455 #-}- {-# LINE 902 "./src-ag/GenerateCode.ag" #-}- rule455 = \ (_ :: ()) ->- {-# LINE 902 "./src-ag/GenerateCode.ag" #-}- "intra"- {-# LINE 3525 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule456 #-}- {-# LINE 1164 "./src-ag/GenerateCode.ag" #-}- rule456 = \ _funcname ->- {-# LINE 1164 "./src-ag/GenerateCode.ag" #-}- [_funcname ]- {-# LINE 3531 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule457 #-}- rule457 = \ ((_intraIvisitedSet) :: Set Identifier) ->- _intraIvisitedSet- {-# INLINE rule458 #-}- rule458 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule459 #-}- rule459 = \ ((_lhsIaroundMap) :: Set Identifier) ->- _lhsIaroundMap- {-# INLINE rule460 #-}- rule460 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->- _lhsIchildren- {-# INLINE rule461 #-}- rule461 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule462 #-}- rule462 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule463 #-}- rule463 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->- _lhsIinstVisitNrs- {-# INLINE rule464 #-}- rule464 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->- _lhsImergeMap- {-# INLINE rule465 #-}- rule465 = \ ((_lhsInr) :: Int) ->- _lhsInr- {-# INLINE rule466 #-}- rule466 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule467 #-}- rule467 = \ _o_case ->- _o_case- {-# INLINE rule468 #-}- rule468 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule469 #-}- rule469 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule470 #-}- rule470 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule471 #-}- rule471 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule472 #-}- rule472 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule473 #-}- rule473 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule474 #-}- rule474 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule475 #-}- rule475 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule476 #-}- rule476 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule477 #-}- rule477 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule478 #-}- rule478 = \ _o_splitsems ->- _o_splitsems- {-# INLINE rule479 #-}- rule479 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule480 #-}- rule480 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule481 #-}- rule481 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule482 #-}- rule482 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule483 #-}- rule483 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->- _lhsIparamInstMap- {-# INLINE rule484 #-}- rule484 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule485 #-}- rule485 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule486 #-}- rule486 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule487 #-}- rule487 = \ ((_lhsIterminals) :: [Identifier]) ->- _lhsIterminals- {-# INLINE rule488 #-}- rule488 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule489 #-}- rule489 = \ ((_lhsIvisitedSet) :: Set Identifier) ->- _lhsIvisitedSet- {-# INLINE rule490 #-}- rule490 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule491 #-}- rule491 = \ ((_lhsIaroundMap) :: Set Identifier) ->- _lhsIaroundMap- {-# INLINE rule492 #-}- rule492 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->- _lhsIchildren- {-# INLINE rule493 #-}- rule493 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule494 #-}- rule494 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule495 #-}- rule495 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->- _lhsIinstVisitNrs- {-# INLINE rule496 #-}- rule496 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->- _lhsImergeMap- {-# INLINE rule497 #-}- rule497 = \ ((_lhsInr) :: Int) ->- _lhsInr- {-# INLINE rule498 #-}- rule498 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule499 #-}- rule499 = \ _o_case ->- _o_case- {-# INLINE rule500 #-}- rule500 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule501 #-}- rule501 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule502 #-}- rule502 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule503 #-}- rule503 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule504 #-}- rule504 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule505 #-}- rule505 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule506 #-}- rule506 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule507 #-}- rule507 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule508 #-}- rule508 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule509 #-}- rule509 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule510 #-}- rule510 = \ _o_splitsems ->- _o_splitsems- {-# INLINE rule511 #-}- rule511 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule512 #-}- rule512 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule513 #-}- rule513 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule514 #-}- rule514 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule515 #-}- rule515 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->- _lhsIparamInstMap- {-# INLINE rule516 #-}- rule516 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule517 #-}- rule517 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule518 #-}- rule518 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule519 #-}- rule519 = \ ((_lhsIterminals) :: [Identifier]) ->- _lhsIterminals- {-# INLINE rule520 #-}- rule520 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule521 #-}- rule521 = \ ((_vssIvisitedSet) :: Set Identifier) ->- _vssIvisitedSet---- CVisits -------------------------------------------------------- wrapper-data Inh_CVisits = Inh_CVisits { allNts_Inh_CVisits :: (Set NontermIdent), allPragmas_Inh_CVisits :: (PragmaMap), aroundMap_Inh_CVisits :: (Set Identifier), children_Inh_CVisits :: ([(Identifier,Type, ChildKind)]), con_Inh_CVisits :: (ConstructorIdent), contextMap_Inh_CVisits :: (ContextMap), inh_Inh_CVisits :: (Attributes), instVisitNrs_Inh_CVisits :: (Map Identifier Int), mergeMap_Inh_CVisits :: (Map Identifier (Identifier, [Identifier])), nr_Inh_CVisits :: (Int), nt_Inh_CVisits :: (NontermIdent), o_case_Inh_CVisits :: (Bool), o_cata_Inh_CVisits :: (Bool), o_costcentre_Inh_CVisits :: (Bool), o_data_Inh_CVisits :: (Maybe Bool), o_linePragmas_Inh_CVisits :: (Bool), o_monadic_Inh_CVisits :: (Bool), o_newtypes_Inh_CVisits :: (Bool), o_pretty_Inh_CVisits :: (Bool), o_rename_Inh_CVisits :: (Bool), o_sem_Inh_CVisits :: (Bool), o_sig_Inh_CVisits :: (Bool), o_splitsems_Inh_CVisits :: (Bool), o_strictwrap_Inh_CVisits :: (Bool), o_traces_Inh_CVisits :: (Bool), o_unbox_Inh_CVisits :: (Bool), options_Inh_CVisits :: (Options), paramInstMap_Inh_CVisits :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_CVisits :: (ParamMap), prefix_Inh_CVisits :: (String), quantMap_Inh_CVisits :: (QuantMap), syn_Inh_CVisits :: (Attributes), terminals_Inh_CVisits :: ([Identifier]), unfoldSemDom_Inh_CVisits :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_CVisits :: (Set Identifier), with_sig_Inh_CVisits :: (Bool), wrappers_Inh_CVisits :: (Set NontermIdent) }-data Syn_CVisits = Syn_CVisits { comments_Syn_CVisits :: ([String]), decls_Syn_CVisits :: (Decls), gatherInstVisitNrs_Syn_CVisits :: (Map Identifier Int), intra_Syn_CVisits :: (Exprs), intraVars_Syn_CVisits :: (Set String), isNil_Syn_CVisits :: (Bool), semNames_Syn_CVisits :: ([String]), visitedSet_Syn_CVisits :: (Set Identifier) }-{-# INLINABLE wrap_CVisits #-}-wrap_CVisits :: T_CVisits -> Inh_CVisits -> (Syn_CVisits )-wrap_CVisits (T_CVisits act) (Inh_CVisits _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_CVisits_vIn31 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers- (T_CVisits_vOut31 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet) <- return (inv_CVisits_s32 sem arg)- return (Syn_CVisits _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet)- )---- cata-{-# NOINLINE sem_CVisits #-}-sem_CVisits :: CVisits -> T_CVisits -sem_CVisits list = Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list)---- semantic domain-newtype T_CVisits = T_CVisits {- attach_T_CVisits :: Identity (T_CVisits_s32 )- }-newtype T_CVisits_s32 = C_CVisits_s32 {- inv_CVisits_s32 :: (T_CVisits_v31 )- }-data T_CVisits_s33 = C_CVisits_s33-type T_CVisits_v31 = (T_CVisits_vIn31 ) -> (T_CVisits_vOut31 )-data T_CVisits_vIn31 = T_CVisits_vIn31 (Set NontermIdent) (PragmaMap) (Set Identifier) ([(Identifier,Type, ChildKind)]) (ConstructorIdent) (ContextMap) (Attributes) (Map Identifier Int) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (QuantMap) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (Bool) (Set NontermIdent)-data T_CVisits_vOut31 = T_CVisits_vOut31 ([String]) (Decls) (Map Identifier Int) (Exprs) (Set String) (Bool) ([String]) (Set Identifier)-{-# NOINLINE sem_CVisits_Cons #-}-sem_CVisits_Cons :: T_CVisit -> T_CVisits -> T_CVisits -sem_CVisits_Cons arg_hd_ arg_tl_ = T_CVisits (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_CVisits_v31 - v31 = \ (T_CVisits_vIn31 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) -> ( let- _hdX29 = Control.Monad.Identity.runIdentity (attach_T_CVisit (arg_hd_))- _tlX32 = Control.Monad.Identity.runIdentity (attach_T_CVisits (arg_tl_))- (T_CVisit_vOut28 _hdIcomments _hdIdecls _hdIgatherInstVisitNrs _hdIintra _hdIintraVars _hdIsemNames _hdIvisitedSet) = inv_CVisit_s29 _hdX29 (T_CVisit_vIn28 _hdOallNts _hdOallPragmas _hdOaroundMap _hdOchildren _hdOcon _hdOcontextMap _hdOdecls _hdOinh _hdOinstVisitNrs _hdOisLast _hdOmergeMap _hdOnextIntra _hdOnextIntraVars _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwith_sig _hdOwrappers)- (T_CVisits_vOut31 _tlIcomments _tlIdecls _tlIgatherInstVisitNrs _tlIintra _tlIintraVars _tlIisNil _tlIsemNames _tlIvisitedSet) = inv_CVisits_s32 _tlX32 (T_CVisits_vIn31 _tlOallNts _tlOallPragmas _tlOaroundMap _tlOchildren _tlOcon _tlOcontextMap _tlOinh _tlOinstVisitNrs _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwith_sig _tlOwrappers)- _tlOnr = rule522 _lhsInr- _lhsOisNil :: Bool- _lhsOisNil = rule523 ()- _hdOisLast = rule524 _tlIisNil- _hdOnextIntra = rule525 _tlIintra- _hdOnextIntraVars = rule526 _tlIintraVars- _lhsOintra :: Exprs- _lhsOintra = rule527 _hdIintra- _lhsOintraVars :: Set String- _lhsOintraVars = rule528 _hdIintraVars- _lhsOdecls :: Decls- _lhsOdecls = rule529 _hdIdecls- _hdOdecls = rule530 _tlIdecls- _lhsOcomments :: [String]- _lhsOcomments = rule531 _hdIcomments _tlIcomments- _lhsOgatherInstVisitNrs :: Map Identifier Int- _lhsOgatherInstVisitNrs = rule532 _hdIgatherInstVisitNrs _tlIgatherInstVisitNrs- _lhsOsemNames :: [String]- _lhsOsemNames = rule533 _hdIsemNames _tlIsemNames- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule534 _tlIvisitedSet- _hdOallNts = rule535 _lhsIallNts- _hdOallPragmas = rule536 _lhsIallPragmas- _hdOaroundMap = rule537 _lhsIaroundMap- _hdOchildren = rule538 _lhsIchildren- _hdOcon = rule539 _lhsIcon- _hdOcontextMap = rule540 _lhsIcontextMap- _hdOinh = rule541 _lhsIinh- _hdOinstVisitNrs = rule542 _lhsIinstVisitNrs- _hdOmergeMap = rule543 _lhsImergeMap- _hdOnr = rule544 _lhsInr- _hdOnt = rule545 _lhsInt- _hdOo_case = rule546 _lhsIo_case- _hdOo_cata = rule547 _lhsIo_cata- _hdOo_costcentre = rule548 _lhsIo_costcentre- _hdOo_data = rule549 _lhsIo_data- _hdOo_linePragmas = rule550 _lhsIo_linePragmas- _hdOo_monadic = rule551 _lhsIo_monadic- _hdOo_newtypes = rule552 _lhsIo_newtypes- _hdOo_pretty = rule553 _lhsIo_pretty- _hdOo_rename = rule554 _lhsIo_rename- _hdOo_sem = rule555 _lhsIo_sem- _hdOo_sig = rule556 _lhsIo_sig- _hdOo_splitsems = rule557 _lhsIo_splitsems- _hdOo_strictwrap = rule558 _lhsIo_strictwrap- _hdOo_traces = rule559 _lhsIo_traces- _hdOo_unbox = rule560 _lhsIo_unbox- _hdOoptions = rule561 _lhsIoptions- _hdOparamInstMap = rule562 _lhsIparamInstMap- _hdOparamMap = rule563 _lhsIparamMap- _hdOprefix = rule564 _lhsIprefix- _hdOquantMap = rule565 _lhsIquantMap- _hdOsyn = rule566 _lhsIsyn- _hdOterminals = rule567 _lhsIterminals- _hdOunfoldSemDom = rule568 _lhsIunfoldSemDom- _hdOvisitedSet = rule569 _lhsIvisitedSet- _hdOwith_sig = rule570 _lhsIwith_sig- _hdOwrappers = rule571 _lhsIwrappers- _tlOallNts = rule572 _lhsIallNts- _tlOallPragmas = rule573 _lhsIallPragmas- _tlOaroundMap = rule574 _lhsIaroundMap- _tlOchildren = rule575 _lhsIchildren- _tlOcon = rule576 _lhsIcon- _tlOcontextMap = rule577 _lhsIcontextMap- _tlOinh = rule578 _lhsIinh- _tlOinstVisitNrs = rule579 _lhsIinstVisitNrs- _tlOmergeMap = rule580 _lhsImergeMap- _tlOnt = rule581 _lhsInt- _tlOo_case = rule582 _lhsIo_case- _tlOo_cata = rule583 _lhsIo_cata- _tlOo_costcentre = rule584 _lhsIo_costcentre- _tlOo_data = rule585 _lhsIo_data- _tlOo_linePragmas = rule586 _lhsIo_linePragmas- _tlOo_monadic = rule587 _lhsIo_monadic- _tlOo_newtypes = rule588 _lhsIo_newtypes- _tlOo_pretty = rule589 _lhsIo_pretty- _tlOo_rename = rule590 _lhsIo_rename- _tlOo_sem = rule591 _lhsIo_sem- _tlOo_sig = rule592 _lhsIo_sig- _tlOo_splitsems = rule593 _lhsIo_splitsems- _tlOo_strictwrap = rule594 _lhsIo_strictwrap- _tlOo_traces = rule595 _lhsIo_traces- _tlOo_unbox = rule596 _lhsIo_unbox- _tlOoptions = rule597 _lhsIoptions- _tlOparamInstMap = rule598 _lhsIparamInstMap- _tlOparamMap = rule599 _lhsIparamMap- _tlOprefix = rule600 _lhsIprefix- _tlOquantMap = rule601 _lhsIquantMap- _tlOsyn = rule602 _lhsIsyn- _tlOterminals = rule603 _lhsIterminals- _tlOunfoldSemDom = rule604 _lhsIunfoldSemDom- _tlOvisitedSet = rule605 _hdIvisitedSet- _tlOwith_sig = rule606 _lhsIwith_sig- _tlOwrappers = rule607 _lhsIwrappers- __result_ = T_CVisits_vOut31 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet- in __result_ )- in C_CVisits_s32 v31- {-# INLINE rule522 #-}- {-# LINE 283 "./src-ag/GenerateCode.ag" #-}- rule522 = \ ((_lhsInr) :: Int) ->- {-# LINE 283 "./src-ag/GenerateCode.ag" #-}- _lhsInr + 1- {-# LINE 3871 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule523 #-}- {-# LINE 296 "./src-ag/GenerateCode.ag" #-}- rule523 = \ (_ :: ()) ->- {-# LINE 296 "./src-ag/GenerateCode.ag" #-}- False- {-# LINE 3877 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule524 #-}- {-# LINE 297 "./src-ag/GenerateCode.ag" #-}- rule524 = \ ((_tlIisNil) :: Bool) ->- {-# LINE 297 "./src-ag/GenerateCode.ag" #-}- _tlIisNil- {-# LINE 3883 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule525 #-}- {-# LINE 314 "./src-ag/GenerateCode.ag" #-}- rule525 = \ ((_tlIintra) :: Exprs) ->- {-# LINE 314 "./src-ag/GenerateCode.ag" #-}- _tlIintra- {-# LINE 3889 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule526 #-}- {-# LINE 315 "./src-ag/GenerateCode.ag" #-}- rule526 = \ ((_tlIintraVars) :: Set String) ->- {-# LINE 315 "./src-ag/GenerateCode.ag" #-}- _tlIintraVars- {-# LINE 3895 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule527 #-}- {-# LINE 316 "./src-ag/GenerateCode.ag" #-}- rule527 = \ ((_hdIintra) :: Exprs) ->- {-# LINE 316 "./src-ag/GenerateCode.ag" #-}- _hdIintra- {-# LINE 3901 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule528 #-}- {-# LINE 317 "./src-ag/GenerateCode.ag" #-}- rule528 = \ ((_hdIintraVars) :: Set String) ->- {-# LINE 317 "./src-ag/GenerateCode.ag" #-}- _hdIintraVars- {-# LINE 3907 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule529 #-}- {-# LINE 432 "./src-ag/GenerateCode.ag" #-}- rule529 = \ ((_hdIdecls) :: Decls) ->- {-# LINE 432 "./src-ag/GenerateCode.ag" #-}- _hdIdecls- {-# LINE 3913 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule530 #-}- {-# LINE 433 "./src-ag/GenerateCode.ag" #-}- rule530 = \ ((_tlIdecls) :: Decls) ->- {-# LINE 433 "./src-ag/GenerateCode.ag" #-}- _tlIdecls- {-# LINE 3919 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule531 #-}- rule531 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->- _hdIcomments ++ _tlIcomments- {-# INLINE rule532 #-}- rule532 = \ ((_hdIgatherInstVisitNrs) :: Map Identifier Int) ((_tlIgatherInstVisitNrs) :: Map Identifier Int) ->- _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs- {-# INLINE rule533 #-}- rule533 = \ ((_hdIsemNames) :: [String]) ((_tlIsemNames) :: [String]) ->- _hdIsemNames ++ _tlIsemNames- {-# INLINE rule534 #-}- rule534 = \ ((_tlIvisitedSet) :: Set Identifier) ->- _tlIvisitedSet- {-# INLINE rule535 #-}- rule535 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule536 #-}- rule536 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule537 #-}- rule537 = \ ((_lhsIaroundMap) :: Set Identifier) ->- _lhsIaroundMap- {-# INLINE rule538 #-}- rule538 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->- _lhsIchildren- {-# INLINE rule539 #-}- rule539 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule540 #-}- rule540 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule541 #-}- rule541 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule542 #-}- rule542 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->- _lhsIinstVisitNrs- {-# INLINE rule543 #-}- rule543 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->- _lhsImergeMap- {-# INLINE rule544 #-}- rule544 = \ ((_lhsInr) :: Int) ->- _lhsInr- {-# INLINE rule545 #-}- rule545 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule546 #-}- rule546 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule547 #-}- rule547 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule548 #-}- rule548 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule549 #-}- rule549 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule550 #-}- rule550 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule551 #-}- rule551 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule552 #-}- rule552 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule553 #-}- rule553 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule554 #-}- rule554 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule555 #-}- rule555 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule556 #-}- rule556 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule557 #-}- rule557 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule558 #-}- rule558 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule559 #-}- rule559 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule560 #-}- rule560 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule561 #-}- rule561 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule562 #-}- rule562 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->- _lhsIparamInstMap- {-# INLINE rule563 #-}- rule563 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule564 #-}- rule564 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule565 #-}- rule565 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule566 #-}- rule566 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule567 #-}- rule567 = \ ((_lhsIterminals) :: [Identifier]) ->- _lhsIterminals- {-# INLINE rule568 #-}- rule568 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule569 #-}- rule569 = \ ((_lhsIvisitedSet) :: Set Identifier) ->- _lhsIvisitedSet- {-# INLINE rule570 #-}- rule570 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule571 #-}- rule571 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers- {-# INLINE rule572 #-}- rule572 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule573 #-}- rule573 = \ ((_lhsIallPragmas) :: PragmaMap) ->- _lhsIallPragmas- {-# INLINE rule574 #-}- rule574 = \ ((_lhsIaroundMap) :: Set Identifier) ->- _lhsIaroundMap- {-# INLINE rule575 #-}- rule575 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->- _lhsIchildren- {-# INLINE rule576 #-}- rule576 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule577 #-}- rule577 = \ ((_lhsIcontextMap) :: ContextMap) ->- _lhsIcontextMap- {-# INLINE rule578 #-}- rule578 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule579 #-}- rule579 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->- _lhsIinstVisitNrs- {-# INLINE rule580 #-}- rule580 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->- _lhsImergeMap- {-# INLINE rule581 #-}- rule581 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule582 #-}- rule582 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule583 #-}- rule583 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule584 #-}- rule584 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule585 #-}- rule585 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule586 #-}- rule586 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule587 #-}- rule587 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule588 #-}- rule588 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule589 #-}- rule589 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule590 #-}- rule590 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule591 #-}- rule591 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule592 #-}- rule592 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule593 #-}- rule593 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule594 #-}- rule594 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule595 #-}- rule595 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule596 #-}- rule596 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule597 #-}- rule597 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule598 #-}- rule598 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->- _lhsIparamInstMap- {-# INLINE rule599 #-}- rule599 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule600 #-}- rule600 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule601 #-}- rule601 = \ ((_lhsIquantMap) :: QuantMap) ->- _lhsIquantMap- {-# INLINE rule602 #-}- rule602 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule603 #-}- rule603 = \ ((_lhsIterminals) :: [Identifier]) ->- _lhsIterminals- {-# INLINE rule604 #-}- rule604 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule605 #-}- rule605 = \ ((_hdIvisitedSet) :: Set Identifier) ->- _hdIvisitedSet- {-# INLINE rule606 #-}- rule606 = \ ((_lhsIwith_sig) :: Bool) ->- _lhsIwith_sig- {-# INLINE rule607 #-}- rule607 = \ ((_lhsIwrappers) :: Set NontermIdent) ->- _lhsIwrappers-{-# NOINLINE sem_CVisits_Nil #-}-sem_CVisits_Nil :: T_CVisits -sem_CVisits_Nil = T_CVisits (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_CVisits_v31 - v31 = \ (T_CVisits_vIn31 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) -> ( let- _lhsOisNil :: Bool- _lhsOisNil = rule608 ()- _lhsOintra :: Exprs- _lhsOintra = rule609 ()- _lhsOintraVars :: Set String- _lhsOintraVars = rule610 ()- _lhsOdecls :: Decls- _lhsOdecls = rule611 ()- _lhsOcomments :: [String]- _lhsOcomments = rule612 ()- _lhsOgatherInstVisitNrs :: Map Identifier Int- _lhsOgatherInstVisitNrs = rule613 ()- _lhsOsemNames :: [String]- _lhsOsemNames = rule614 ()- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule615 _lhsIvisitedSet- __result_ = T_CVisits_vOut31 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet- in __result_ )- in C_CVisits_s32 v31- {-# INLINE rule608 #-}- {-# LINE 298 "./src-ag/GenerateCode.ag" #-}- rule608 = \ (_ :: ()) ->- {-# LINE 298 "./src-ag/GenerateCode.ag" #-}- True- {-# LINE 4182 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule609 #-}- {-# LINE 318 "./src-ag/GenerateCode.ag" #-}- rule609 = \ (_ :: ()) ->- {-# LINE 318 "./src-ag/GenerateCode.ag" #-}- []- {-# LINE 4188 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule610 #-}- {-# LINE 319 "./src-ag/GenerateCode.ag" #-}- rule610 = \ (_ :: ()) ->- {-# LINE 319 "./src-ag/GenerateCode.ag" #-}- Set.empty- {-# LINE 4194 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule611 #-}- {-# LINE 431 "./src-ag/GenerateCode.ag" #-}- rule611 = \ (_ :: ()) ->- {-# LINE 431 "./src-ag/GenerateCode.ag" #-}- []- {-# LINE 4200 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule612 #-}- rule612 = \ (_ :: ()) ->- []- {-# INLINE rule613 #-}- rule613 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule614 #-}- rule614 = \ (_ :: ()) ->- []- {-# INLINE rule615 #-}- rule615 = \ ((_lhsIvisitedSet) :: Set Identifier) ->- _lhsIvisitedSet---- DeclBlocks ----------------------------------------------------- wrapper-data Inh_DeclBlocks = Inh_DeclBlocks { blockNr_Inh_DeclBlocks :: (Int), lastExprVars_Inh_DeclBlocks :: ([String]), nextVisitDecls_Inh_DeclBlocks :: ([Decl]), optCase_Inh_DeclBlocks :: (Bool), prefix_Inh_DeclBlocks :: (String) }-data Syn_DeclBlocks = Syn_DeclBlocks { callExpr_Syn_DeclBlocks :: (Expr), decls_Syn_DeclBlocks :: ([Decl]), freeVars_Syn_DeclBlocks :: ([String]) }-{-# INLINABLE wrap_DeclBlocks #-}-wrap_DeclBlocks :: T_DeclBlocks -> Inh_DeclBlocks -> (Syn_DeclBlocks )-wrap_DeclBlocks (T_DeclBlocks act) (Inh_DeclBlocks _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_DeclBlocks_vIn34 _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix- (T_DeclBlocks_vOut34 _lhsOcallExpr _lhsOdecls _lhsOfreeVars) <- return (inv_DeclBlocks_s35 sem arg)- return (Syn_DeclBlocks _lhsOcallExpr _lhsOdecls _lhsOfreeVars)- )---- cata-{-# NOINLINE sem_DeclBlocks #-}-sem_DeclBlocks :: DeclBlocks -> T_DeclBlocks -sem_DeclBlocks ( DeclBlock defs_ visit_ next_ ) = sem_DeclBlocks_DeclBlock defs_ visit_ ( sem_DeclBlocks next_ )-sem_DeclBlocks ( DeclTerminator defs_ result_ ) = sem_DeclBlocks_DeclTerminator defs_ result_---- semantic domain-newtype T_DeclBlocks = T_DeclBlocks {- attach_T_DeclBlocks :: Identity (T_DeclBlocks_s35 )- }-newtype T_DeclBlocks_s35 = C_DeclBlocks_s35 {- inv_DeclBlocks_s35 :: (T_DeclBlocks_v34 )- }-data T_DeclBlocks_s36 = C_DeclBlocks_s36-type T_DeclBlocks_v34 = (T_DeclBlocks_vIn34 ) -> (T_DeclBlocks_vOut34 )-data T_DeclBlocks_vIn34 = T_DeclBlocks_vIn34 (Int) ([String]) ([Decl]) (Bool) (String)-data T_DeclBlocks_vOut34 = T_DeclBlocks_vOut34 (Expr) ([Decl]) ([String])-{-# NOINLINE sem_DeclBlocks_DeclBlock #-}-sem_DeclBlocks_DeclBlock :: ([Decl]) -> (Decl) -> T_DeclBlocks -> T_DeclBlocks -sem_DeclBlocks_DeclBlock arg_defs_ arg_visit_ arg_next_ = T_DeclBlocks (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_DeclBlocks_v34 - v34 = \ (T_DeclBlocks_vIn34 _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) -> ( let- _nextX35 = Control.Monad.Identity.runIdentity (attach_T_DeclBlocks (arg_next_))- (T_DeclBlocks_vOut34 _nextIcallExpr _nextIdecls _nextIfreeVars) = inv_DeclBlocks_s35 _nextX35 (T_DeclBlocks_vIn34 _nextOblockNr _nextOlastExprVars _nextOnextVisitDecls _nextOoptCase _nextOprefix)- _nextOblockNr = rule616 _lhsIblockNr- _lambdaName = rule617 _lhsIblockNr _lhsIprefix- _pragmaDecl = rule618 _lambdaName- _lhsOcallExpr :: Expr- _lhsOcallExpr = rule619 _freeVars _lambdaName- _freeVars = rule620 _nextIfreeVars arg_defs_ arg_visit_- _decl = rule621 _freeVars _lambdaName _lhsIoptCase _nextIcallExpr arg_defs_ arg_visit_- _lhsOdecls :: [Decl]- _lhsOdecls = rule622 _decl _lhsIblockNr _nextIdecls _pragmaDecl- _lhsOfreeVars :: [String]- _lhsOfreeVars = rule623 _freeVars- _nextOlastExprVars = rule624 _lhsIlastExprVars- _nextOnextVisitDecls = rule625 _lhsInextVisitDecls- _nextOoptCase = rule626 _lhsIoptCase- _nextOprefix = rule627 _lhsIprefix- __result_ = T_DeclBlocks_vOut34 _lhsOcallExpr _lhsOdecls _lhsOfreeVars- in __result_ )- in C_DeclBlocks_s35 v34- {-# INLINE rule616 #-}- {-# LINE 664 "./src-ag/GenerateCode.ag" #-}- rule616 = \ ((_lhsIblockNr) :: Int) ->- {-# LINE 664 "./src-ag/GenerateCode.ag" #-}- _lhsIblockNr + 1- {-# LINE 4277 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule617 #-}- {-# LINE 669 "./src-ag/GenerateCode.ag" #-}- rule617 = \ ((_lhsIblockNr) :: Int) ((_lhsIprefix) :: String) ->- {-# LINE 669 "./src-ag/GenerateCode.ag" #-}- _lhsIprefix ++ "_block" ++ show _lhsIblockNr- {-# LINE 4283 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule618 #-}- {-# LINE 670 "./src-ag/GenerateCode.ag" #-}- rule618 = \ _lambdaName ->- {-# LINE 670 "./src-ag/GenerateCode.ag" #-}- PragmaDecl ("NOINLINE " ++ _lambdaName )- {-# LINE 4289 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule619 #-}- {-# LINE 671 "./src-ag/GenerateCode.ag" #-}- rule619 = \ _freeVars _lambdaName ->- {-# LINE 671 "./src-ag/GenerateCode.ag" #-}- App _lambdaName (map SimpleExpr _freeVars )- {-# LINE 4295 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule620 #-}- {-# LINE 675 "./src-ag/GenerateCode.ag" #-}- rule620 = \ ((_nextIfreeVars) :: [String]) defs_ visit_ ->- {-# LINE 675 "./src-ag/GenerateCode.ag" #-}- freevars _nextIfreeVars (visit_ : defs_)- {-# LINE 4301 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule621 #-}- {-# LINE 682 "./src-ag/GenerateCode.ag" #-}- rule621 = \ _freeVars _lambdaName ((_lhsIoptCase) :: Bool) ((_nextIcallExpr) :: Expr) defs_ visit_ ->- {-# LINE 682 "./src-ag/GenerateCode.ag" #-}- mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ [visit_]) _nextIcallExpr- {-# LINE 4307 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule622 #-}- {-# LINE 683 "./src-ag/GenerateCode.ag" #-}- rule622 = \ _decl ((_lhsIblockNr) :: Int) ((_nextIdecls) :: [Decl]) _pragmaDecl ->- {-# LINE 683 "./src-ag/GenerateCode.ag" #-}- (if _lhsIblockNr > 1 then [_pragmaDecl ] else []) ++ [_decl ] ++ _nextIdecls- {-# LINE 4313 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule623 #-}- rule623 = \ _freeVars ->- _freeVars- {-# INLINE rule624 #-}- rule624 = \ ((_lhsIlastExprVars) :: [String]) ->- _lhsIlastExprVars- {-# INLINE rule625 #-}- rule625 = \ ((_lhsInextVisitDecls) :: [Decl]) ->- _lhsInextVisitDecls- {-# INLINE rule626 #-}- rule626 = \ ((_lhsIoptCase) :: Bool) ->- _lhsIoptCase- {-# INLINE rule627 #-}- rule627 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix-{-# NOINLINE sem_DeclBlocks_DeclTerminator #-}-sem_DeclBlocks_DeclTerminator :: ([Decl]) -> (Expr) -> T_DeclBlocks -sem_DeclBlocks_DeclTerminator arg_defs_ arg_result_ = T_DeclBlocks (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_DeclBlocks_v34 - v34 = \ (T_DeclBlocks_vIn34 _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) -> ( let- _lambdaName = rule628 _lhsIblockNr _lhsIprefix- _pragmaDecl = rule629 _lambdaName- _lhsOcallExpr :: Expr- _lhsOcallExpr = rule630 _freeVars _lambdaName- _freeVars = rule631 _lhsIlastExprVars _lhsInextVisitDecls arg_defs_- _lhsOdecls :: [Decl]- _lhsOdecls = rule632 _freeVars _lambdaName _lhsInextVisitDecls _lhsIoptCase arg_defs_ arg_result_- _lhsOfreeVars :: [String]- _lhsOfreeVars = rule633 _freeVars- __result_ = T_DeclBlocks_vOut34 _lhsOcallExpr _lhsOdecls _lhsOfreeVars- in __result_ )- in C_DeclBlocks_s35 v34- {-# INLINE rule628 #-}- {-# LINE 669 "./src-ag/GenerateCode.ag" #-}- rule628 = \ ((_lhsIblockNr) :: Int) ((_lhsIprefix) :: String) ->- {-# LINE 669 "./src-ag/GenerateCode.ag" #-}- _lhsIprefix ++ "_block" ++ show _lhsIblockNr- {-# LINE 4353 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule629 #-}- {-# LINE 670 "./src-ag/GenerateCode.ag" #-}- rule629 = \ _lambdaName ->- {-# LINE 670 "./src-ag/GenerateCode.ag" #-}- PragmaDecl ("NOINLINE " ++ _lambdaName )- {-# LINE 4359 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule630 #-}- {-# LINE 671 "./src-ag/GenerateCode.ag" #-}- rule630 = \ _freeVars _lambdaName ->- {-# LINE 671 "./src-ag/GenerateCode.ag" #-}- App _lambdaName (map SimpleExpr _freeVars )- {-# LINE 4365 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule631 #-}- {-# LINE 673 "./src-ag/GenerateCode.ag" #-}- rule631 = \ ((_lhsIlastExprVars) :: [String]) ((_lhsInextVisitDecls) :: [Decl]) defs_ ->- {-# LINE 673 "./src-ag/GenerateCode.ag" #-}- freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)- {-# LINE 4371 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule632 #-}- {-# LINE 680 "./src-ag/GenerateCode.ag" #-}- rule632 = \ _freeVars _lambdaName ((_lhsInextVisitDecls) :: [Decl]) ((_lhsIoptCase) :: Bool) defs_ result_ ->- {-# LINE 680 "./src-ag/GenerateCode.ag" #-}- [ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ _lhsInextVisitDecls) result_ ]- {-# LINE 4377 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule633 #-}- rule633 = \ _freeVars ->- _freeVars---- DeclBlocksRoot ------------------------------------------------- wrapper-data Inh_DeclBlocksRoot = Inh_DeclBlocksRoot { lastExprVars_Inh_DeclBlocksRoot :: ([String]), nextVisitDecls_Inh_DeclBlocksRoot :: ([Decl]), optCase_Inh_DeclBlocksRoot :: (Bool), prefix_Inh_DeclBlocksRoot :: (String) }-data Syn_DeclBlocksRoot = Syn_DeclBlocksRoot { firstCall_Syn_DeclBlocksRoot :: (Expr), lambdas_Syn_DeclBlocksRoot :: ([Decl]) }-{-# INLINABLE wrap_DeclBlocksRoot #-}-wrap_DeclBlocksRoot :: T_DeclBlocksRoot -> Inh_DeclBlocksRoot -> (Syn_DeclBlocksRoot )-wrap_DeclBlocksRoot (T_DeclBlocksRoot act) (Inh_DeclBlocksRoot _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_DeclBlocksRoot_vIn37 _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix- (T_DeclBlocksRoot_vOut37 _lhsOfirstCall _lhsOlambdas) <- return (inv_DeclBlocksRoot_s38 sem arg)- return (Syn_DeclBlocksRoot _lhsOfirstCall _lhsOlambdas)- )---- cata-{-# INLINE sem_DeclBlocksRoot #-}-sem_DeclBlocksRoot :: DeclBlocksRoot -> T_DeclBlocksRoot -sem_DeclBlocksRoot ( DeclBlocksRoot blocks_ ) = sem_DeclBlocksRoot_DeclBlocksRoot ( sem_DeclBlocks blocks_ )---- semantic domain-newtype T_DeclBlocksRoot = T_DeclBlocksRoot {- attach_T_DeclBlocksRoot :: Identity (T_DeclBlocksRoot_s38 )- }-newtype T_DeclBlocksRoot_s38 = C_DeclBlocksRoot_s38 {- inv_DeclBlocksRoot_s38 :: (T_DeclBlocksRoot_v37 )- }-data T_DeclBlocksRoot_s39 = C_DeclBlocksRoot_s39-type T_DeclBlocksRoot_v37 = (T_DeclBlocksRoot_vIn37 ) -> (T_DeclBlocksRoot_vOut37 )-data T_DeclBlocksRoot_vIn37 = T_DeclBlocksRoot_vIn37 ([String]) ([Decl]) (Bool) (String)-data T_DeclBlocksRoot_vOut37 = T_DeclBlocksRoot_vOut37 (Expr) ([Decl])-{-# NOINLINE sem_DeclBlocksRoot_DeclBlocksRoot #-}-sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks -> T_DeclBlocksRoot -sem_DeclBlocksRoot_DeclBlocksRoot arg_blocks_ = T_DeclBlocksRoot (return st38) where- {-# NOINLINE st38 #-}- st38 = let- v37 :: T_DeclBlocksRoot_v37 - v37 = \ (T_DeclBlocksRoot_vIn37 _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) -> ( let- _blocksX35 = Control.Monad.Identity.runIdentity (attach_T_DeclBlocks (arg_blocks_))- (T_DeclBlocks_vOut34 _blocksIcallExpr _blocksIdecls _blocksIfreeVars) = inv_DeclBlocks_s35 _blocksX35 (T_DeclBlocks_vIn34 _blocksOblockNr _blocksOlastExprVars _blocksOnextVisitDecls _blocksOoptCase _blocksOprefix)- _lhsOlambdas :: [Decl]- _lhsOlambdas = rule634 _blocksIdecls- _lhsOfirstCall :: Expr- _lhsOfirstCall = rule635 _blocksIcallExpr- _blocksOblockNr = rule636 ()- _blocksOlastExprVars = rule637 _lhsIlastExprVars- _blocksOnextVisitDecls = rule638 _lhsInextVisitDecls- _blocksOoptCase = rule639 _lhsIoptCase- _blocksOprefix = rule640 _lhsIprefix- __result_ = T_DeclBlocksRoot_vOut37 _lhsOfirstCall _lhsOlambdas- in __result_ )- in C_DeclBlocksRoot_s38 v37- {-# INLINE rule634 #-}- {-# LINE 655 "./src-ag/GenerateCode.ag" #-}- rule634 = \ ((_blocksIdecls) :: [Decl]) ->- {-# LINE 655 "./src-ag/GenerateCode.ag" #-}- _blocksIdecls- {-# LINE 4438 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule635 #-}- {-# LINE 656 "./src-ag/GenerateCode.ag" #-}- rule635 = \ ((_blocksIcallExpr) :: Expr) ->- {-# LINE 656 "./src-ag/GenerateCode.ag" #-}- _blocksIcallExpr- {-# LINE 4444 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule636 #-}- {-# LINE 661 "./src-ag/GenerateCode.ag" #-}- rule636 = \ (_ :: ()) ->- {-# LINE 661 "./src-ag/GenerateCode.ag" #-}- 1- {-# LINE 4450 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule637 #-}- rule637 = \ ((_lhsIlastExprVars) :: [String]) ->- _lhsIlastExprVars- {-# INLINE rule638 #-}- rule638 = \ ((_lhsInextVisitDecls) :: [Decl]) ->- _lhsInextVisitDecls- {-# INLINE rule639 #-}- rule639 = \ ((_lhsIoptCase) :: Bool) ->- _lhsIoptCase- {-# INLINE rule640 #-}- rule640 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix---- Pattern -------------------------------------------------------- wrapper-data Inh_Pattern = Inh_Pattern { }-data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: (Pattern), definedInsts_Syn_Pattern :: ([Identifier]), patternAttributes_Syn_Pattern :: ([(Identifier, Identifier)]) }-{-# INLINABLE wrap_Pattern #-}-wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )-wrap_Pattern (T_Pattern act) (Inh_Pattern ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Pattern_vIn40 - (T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes) <- return (inv_Pattern_s41 sem arg)- return (Syn_Pattern _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes)- )---- cata-{-# NOINLINE sem_Pattern #-}-sem_Pattern :: Pattern -> T_Pattern -sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )-sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )-sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )-sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )-sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_---- semantic domain-newtype T_Pattern = T_Pattern {- attach_T_Pattern :: Identity (T_Pattern_s41 )- }-newtype T_Pattern_s41 = C_Pattern_s41 {- inv_Pattern_s41 :: (T_Pattern_v40 )- }-data T_Pattern_s42 = C_Pattern_s42-type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )-data T_Pattern_vIn40 = T_Pattern_vIn40 -data T_Pattern_vOut40 = T_Pattern_vOut40 (Pattern) ([Identifier]) ([(Identifier, Identifier)])-{-# NOINLINE sem_Pattern_Constr #-}-sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern -sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 ) -> ( let- _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut43 _patsIcopy _patsIdefinedInsts _patsIpatternAttributes) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 )- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule641 _patsIdefinedInsts- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule642 _patsIpatternAttributes- _copy = rule643 _patsIcopy arg_name_- _lhsOcopy :: Pattern- _lhsOcopy = rule644 _copy- __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule641 #-}- rule641 = \ ((_patsIdefinedInsts) :: [Identifier]) ->- _patsIdefinedInsts- {-# INLINE rule642 #-}- rule642 = \ ((_patsIpatternAttributes) :: [(Identifier, Identifier)]) ->- _patsIpatternAttributes- {-# INLINE rule643 #-}- rule643 = \ ((_patsIcopy) :: Patterns) name_ ->- Constr name_ _patsIcopy- {-# INLINE rule644 #-}- rule644 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Product #-}-sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern -sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 ) -> ( let- _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut43 _patsIcopy _patsIdefinedInsts _patsIpatternAttributes) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 )- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule645 _patsIdefinedInsts- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule646 _patsIpatternAttributes- _copy = rule647 _patsIcopy arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule648 _copy- __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule645 #-}- rule645 = \ ((_patsIdefinedInsts) :: [Identifier]) ->- _patsIdefinedInsts- {-# INLINE rule646 #-}- rule646 = \ ((_patsIpatternAttributes) :: [(Identifier, Identifier)]) ->- _patsIpatternAttributes- {-# INLINE rule647 #-}- rule647 = \ ((_patsIcopy) :: Patterns) pos_ ->- Product pos_ _patsIcopy- {-# INLINE rule648 #-}- rule648 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Alias #-}-sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern -sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 ) -> ( let- _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut40 _patIcopy _patIdefinedInsts _patIpatternAttributes) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 )- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule649 _patIdefinedInsts arg_attr_ arg_field_- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule650 _patIpatternAttributes arg_attr_ arg_field_- _copy = rule651 _patIcopy arg_attr_ arg_field_- _lhsOcopy :: Pattern- _lhsOcopy = rule652 _copy- __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule649 #-}- {-# LINE 264 "./src-ag/GenerateCode.ag" #-}- rule649 = \ ((_patIdefinedInsts) :: [Identifier]) attr_ field_ ->- {-# LINE 264 "./src-ag/GenerateCode.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 4584 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule650 #-}- {-# LINE 272 "./src-ag/GenerateCode.ag" #-}- rule650 = \ ((_patIpatternAttributes) :: [(Identifier, Identifier)]) attr_ field_ ->- {-# LINE 272 "./src-ag/GenerateCode.ag" #-}- (field_,attr_) : _patIpatternAttributes- {-# LINE 4590 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule651 #-}- rule651 = \ ((_patIcopy) :: Pattern) attr_ field_ ->- Alias field_ attr_ _patIcopy- {-# INLINE rule652 #-}- rule652 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Irrefutable #-}-sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern -sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 ) -> ( let- _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut40 _patIcopy _patIdefinedInsts _patIpatternAttributes) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 )- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule653 _patIdefinedInsts- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule654 _patIpatternAttributes- _copy = rule655 _patIcopy- _lhsOcopy :: Pattern- _lhsOcopy = rule656 _copy- __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule653 #-}- rule653 = \ ((_patIdefinedInsts) :: [Identifier]) ->- _patIdefinedInsts- {-# INLINE rule654 #-}- rule654 = \ ((_patIpatternAttributes) :: [(Identifier, Identifier)]) ->- _patIpatternAttributes- {-# INLINE rule655 #-}- rule655 = \ ((_patIcopy) :: Pattern) ->- Irrefutable _patIcopy- {-# INLINE rule656 #-}- rule656 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Underscore #-}-sem_Pattern_Underscore :: (Pos) -> T_Pattern -sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_Pattern_v40 - v40 = \ (T_Pattern_vIn40 ) -> ( let- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule657 ()- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule658 ()- _copy = rule659 arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule660 _copy- __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Pattern_s41 v40- {-# INLINE rule657 #-}- rule657 = \ (_ :: ()) ->- []- {-# INLINE rule658 #-}- rule658 = \ (_ :: ()) ->- []- {-# INLINE rule659 #-}- rule659 = \ pos_ ->- Underscore pos_- {-# INLINE rule660 #-}- rule660 = \ _copy ->- _copy---- Patterns ------------------------------------------------------- wrapper-data Inh_Patterns = Inh_Patterns { }-data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: (Patterns), definedInsts_Syn_Patterns :: ([Identifier]), patternAttributes_Syn_Patterns :: ([(Identifier, Identifier)]) }-{-# INLINABLE wrap_Patterns #-}-wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )-wrap_Patterns (T_Patterns act) (Inh_Patterns ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Patterns_vIn43 - (T_Patterns_vOut43 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes) <- return (inv_Patterns_s44 sem arg)- return (Syn_Patterns _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes)- )---- cata-{-# NOINLINE sem_Patterns #-}-sem_Patterns :: Patterns -> T_Patterns -sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)---- semantic domain-newtype T_Patterns = T_Patterns {- attach_T_Patterns :: Identity (T_Patterns_s44 )- }-newtype T_Patterns_s44 = C_Patterns_s44 {- inv_Patterns_s44 :: (T_Patterns_v43 )- }-data T_Patterns_s45 = C_Patterns_s45-type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )-data T_Patterns_vIn43 = T_Patterns_vIn43 -data T_Patterns_vOut43 = T_Patterns_vOut43 (Patterns) ([Identifier]) ([(Identifier, Identifier)])-{-# NOINLINE sem_Patterns_Cons #-}-sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns -sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_Patterns_v43 - v43 = \ (T_Patterns_vIn43 ) -> ( let- _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))- _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))- (T_Pattern_vOut40 _hdIcopy _hdIdefinedInsts _hdIpatternAttributes) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 )- (T_Patterns_vOut43 _tlIcopy _tlIdefinedInsts _tlIpatternAttributes) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 )- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule661 _hdIdefinedInsts _tlIdefinedInsts- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule662 _hdIpatternAttributes _tlIpatternAttributes- _copy = rule663 _hdIcopy _tlIcopy- _lhsOcopy :: Patterns- _lhsOcopy = rule664 _copy- __result_ = T_Patterns_vOut43 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Patterns_s44 v43- {-# INLINE rule661 #-}- rule661 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# INLINE rule662 #-}- rule662 = \ ((_hdIpatternAttributes) :: [(Identifier, Identifier)]) ((_tlIpatternAttributes) :: [(Identifier, Identifier)]) ->- _hdIpatternAttributes ++ _tlIpatternAttributes- {-# INLINE rule663 #-}- rule663 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->- (:) _hdIcopy _tlIcopy- {-# INLINE rule664 #-}- rule664 = \ _copy ->- _copy-{-# NOINLINE sem_Patterns_Nil #-}-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil = T_Patterns (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_Patterns_v43 - v43 = \ (T_Patterns_vIn43 ) -> ( let- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule665 ()- _lhsOpatternAttributes :: [(Identifier, Identifier)]- _lhsOpatternAttributes = rule666 ()- _copy = rule667 ()- _lhsOcopy :: Patterns- _lhsOcopy = rule668 _copy- __result_ = T_Patterns_vOut43 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes- in __result_ )- in C_Patterns_s44 v43- {-# INLINE rule665 #-}- rule665 = \ (_ :: ()) ->- []- {-# INLINE rule666 #-}- rule666 = \ (_ :: ()) ->- []- {-# INLINE rule667 #-}- rule667 = \ (_ :: ()) ->- []- {-# INLINE rule668 #-}- rule668 = \ _copy ->- _copy---- Sequence ------------------------------------------------------- wrapper-data Inh_Sequence = Inh_Sequence { allNts_Inh_Sequence :: (Set NontermIdent), aroundMap_Inh_Sequence :: (Set Identifier), children_Inh_Sequence :: ([(Identifier,Type,ChildKind)]), con_Inh_Sequence :: (ConstructorIdent), declsAbove_Inh_Sequence :: ([Decl]), inh_Inh_Sequence :: (Attributes), instVisitNrs_Inh_Sequence :: (Map Identifier Int), lastExpr_Inh_Sequence :: (Expr), mergeMap_Inh_Sequence :: (Map Identifier (Identifier, [Identifier])), nr_Inh_Sequence :: (Int), nt_Inh_Sequence :: (NontermIdent), o_case_Inh_Sequence :: (Bool), o_cata_Inh_Sequence :: (Bool), o_costcentre_Inh_Sequence :: (Bool), o_data_Inh_Sequence :: (Maybe Bool), o_linePragmas_Inh_Sequence :: (Bool), o_monadic_Inh_Sequence :: (Bool), o_newtypes_Inh_Sequence :: (Bool), o_pretty_Inh_Sequence :: (Bool), o_rename_Inh_Sequence :: (Bool), o_sem_Inh_Sequence :: (Bool), o_sig_Inh_Sequence :: (Bool), o_splitsems_Inh_Sequence :: (Bool), o_strictwrap_Inh_Sequence :: (Bool), o_traces_Inh_Sequence :: (Bool), o_unbox_Inh_Sequence :: (Bool), options_Inh_Sequence :: (Options), paramInstMap_Inh_Sequence :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_Sequence :: (ParamMap), prefix_Inh_Sequence :: (String), syn_Inh_Sequence :: (Attributes), terminals_Inh_Sequence :: ([Identifier]), unfoldSemDom_Inh_Sequence :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_Sequence :: (Set Identifier), what_Inh_Sequence :: (String) }-data Syn_Sequence = Syn_Sequence { allTpsFound_Syn_Sequence :: (Bool), blockDecls_Syn_Sequence :: (DeclBlocks), comments_Syn_Sequence :: ([String]), decls_Syn_Sequence :: (Decls), declsAbove_Syn_Sequence :: ([Decl]), definedInsts_Syn_Sequence :: ([Identifier]), exprs_Syn_Sequence :: (Exprs), tSigs_Syn_Sequence :: ([Decl]), tps_Syn_Sequence :: ([Type]), usedVars_Syn_Sequence :: (Set String), visitedSet_Syn_Sequence :: (Set Identifier) }-{-# INLINABLE wrap_Sequence #-}-wrap_Sequence :: T_Sequence -> Inh_Sequence -> (Syn_Sequence )-wrap_Sequence (T_Sequence act) (Inh_Sequence _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Sequence_vIn46 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat- (T_Sequence_vOut46 _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet) <- return (inv_Sequence_s47 sem arg)- return (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet)- )---- cata-{-# NOINLINE sem_Sequence #-}-sem_Sequence :: Sequence -> T_Sequence -sem_Sequence list = Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list)---- semantic domain-newtype T_Sequence = T_Sequence {- attach_T_Sequence :: Identity (T_Sequence_s47 )- }-newtype T_Sequence_s47 = C_Sequence_s47 {- inv_Sequence_s47 :: (T_Sequence_v46 )- }-data T_Sequence_s48 = C_Sequence_s48-type T_Sequence_v46 = (T_Sequence_vIn46 ) -> (T_Sequence_vOut46 )-data T_Sequence_vIn46 = T_Sequence_vIn46 (Set NontermIdent) (Set Identifier) ([(Identifier,Type,ChildKind)]) (ConstructorIdent) ([Decl]) (Attributes) (Map Identifier Int) (Expr) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (String)-data T_Sequence_vOut46 = T_Sequence_vOut46 (Bool) (DeclBlocks) ([String]) (Decls) ([Decl]) ([Identifier]) (Exprs) ([Decl]) ([Type]) (Set String) (Set Identifier)-{-# NOINLINE sem_Sequence_Cons #-}-sem_Sequence_Cons :: T_CRule -> T_Sequence -> T_Sequence -sem_Sequence_Cons arg_hd_ arg_tl_ = T_Sequence (return st47) where- {-# NOINLINE st47 #-}- st47 = let- v46 :: T_Sequence_v46 - v46 = \ (T_Sequence_vIn46 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let- _hdX20 = Control.Monad.Identity.runIdentity (attach_T_CRule (arg_hd_))- _tlX47 = Control.Monad.Identity.runIdentity (attach_T_Sequence (arg_tl_))- (T_CRule_vOut19 _hdIallTpsFound _hdIbldBlocksFun _hdIcomments _hdIdecls _hdIdeclsAbove _hdIdefinedInsts _hdIexprs _hdItSigs _hdItps _hdIusedVars _hdIvisitedSet) = inv_CRule_s20 _hdX20 (T_CRule_vIn19 _hdOallNts _hdOaroundMap _hdOchildren _hdOcon _hdOdeclsAbove _hdOinh _hdOinstVisitNrs _hdOmergeMap _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwhat)- (T_Sequence_vOut46 _tlIallTpsFound _tlIblockDecls _tlIcomments _tlIdecls _tlIdeclsAbove _tlIdefinedInsts _tlIexprs _tlItSigs _tlItps _tlIusedVars _tlIvisitedSet) = inv_Sequence_s47 _tlX47 (T_Sequence_vIn46 _tlOallNts _tlOaroundMap _tlOchildren _tlOcon _tlOdeclsAbove _tlOinh _tlOinstVisitNrs _tlOlastExpr _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwhat)- _lhsOblockDecls :: DeclBlocks- _lhsOblockDecls = rule669 _hdIbldBlocksFun _tlIblockDecls- _lhsOallTpsFound :: Bool- _lhsOallTpsFound = rule670 _hdIallTpsFound _tlIallTpsFound- _lhsOcomments :: [String]- _lhsOcomments = rule671 _hdIcomments _tlIcomments- _lhsOdecls :: Decls- _lhsOdecls = rule672 _hdIdecls _tlIdecls- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule673 _hdIdefinedInsts _tlIdefinedInsts- _lhsOexprs :: Exprs- _lhsOexprs = rule674 _hdIexprs _tlIexprs- _lhsOtSigs :: [Decl]- _lhsOtSigs = rule675 _hdItSigs _tlItSigs- _lhsOtps :: [Type]- _lhsOtps = rule676 _hdItps _tlItps- _lhsOusedVars :: Set String- _lhsOusedVars = rule677 _hdIusedVars _tlIusedVars- _lhsOdeclsAbove :: [Decl]- _lhsOdeclsAbove = rule678 _tlIdeclsAbove- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule679 _tlIvisitedSet- _hdOallNts = rule680 _lhsIallNts- _hdOaroundMap = rule681 _lhsIaroundMap- _hdOchildren = rule682 _lhsIchildren- _hdOcon = rule683 _lhsIcon- _hdOdeclsAbove = rule684 _lhsIdeclsAbove- _hdOinh = rule685 _lhsIinh- _hdOinstVisitNrs = rule686 _lhsIinstVisitNrs- _hdOmergeMap = rule687 _lhsImergeMap- _hdOnr = rule688 _lhsInr- _hdOnt = rule689 _lhsInt- _hdOo_case = rule690 _lhsIo_case- _hdOo_cata = rule691 _lhsIo_cata- _hdOo_costcentre = rule692 _lhsIo_costcentre- _hdOo_data = rule693 _lhsIo_data- _hdOo_linePragmas = rule694 _lhsIo_linePragmas- _hdOo_monadic = rule695 _lhsIo_monadic- _hdOo_newtypes = rule696 _lhsIo_newtypes- _hdOo_pretty = rule697 _lhsIo_pretty- _hdOo_rename = rule698 _lhsIo_rename- _hdOo_sem = rule699 _lhsIo_sem- _hdOo_sig = rule700 _lhsIo_sig- _hdOo_splitsems = rule701 _lhsIo_splitsems- _hdOo_strictwrap = rule702 _lhsIo_strictwrap- _hdOo_traces = rule703 _lhsIo_traces- _hdOo_unbox = rule704 _lhsIo_unbox- _hdOoptions = rule705 _lhsIoptions- _hdOparamInstMap = rule706 _lhsIparamInstMap- _hdOparamMap = rule707 _lhsIparamMap- _hdOprefix = rule708 _lhsIprefix- _hdOsyn = rule709 _lhsIsyn- _hdOterminals = rule710 _lhsIterminals- _hdOunfoldSemDom = rule711 _lhsIunfoldSemDom- _hdOvisitedSet = rule712 _lhsIvisitedSet- _hdOwhat = rule713 _lhsIwhat- _tlOallNts = rule714 _lhsIallNts- _tlOaroundMap = rule715 _lhsIaroundMap- _tlOchildren = rule716 _lhsIchildren- _tlOcon = rule717 _lhsIcon- _tlOdeclsAbove = rule718 _hdIdeclsAbove- _tlOinh = rule719 _lhsIinh- _tlOinstVisitNrs = rule720 _lhsIinstVisitNrs- _tlOlastExpr = rule721 _lhsIlastExpr- _tlOmergeMap = rule722 _lhsImergeMap- _tlOnr = rule723 _lhsInr- _tlOnt = rule724 _lhsInt- _tlOo_case = rule725 _lhsIo_case- _tlOo_cata = rule726 _lhsIo_cata- _tlOo_costcentre = rule727 _lhsIo_costcentre- _tlOo_data = rule728 _lhsIo_data- _tlOo_linePragmas = rule729 _lhsIo_linePragmas- _tlOo_monadic = rule730 _lhsIo_monadic- _tlOo_newtypes = rule731 _lhsIo_newtypes- _tlOo_pretty = rule732 _lhsIo_pretty- _tlOo_rename = rule733 _lhsIo_rename- _tlOo_sem = rule734 _lhsIo_sem- _tlOo_sig = rule735 _lhsIo_sig- _tlOo_splitsems = rule736 _lhsIo_splitsems- _tlOo_strictwrap = rule737 _lhsIo_strictwrap- _tlOo_traces = rule738 _lhsIo_traces- _tlOo_unbox = rule739 _lhsIo_unbox- _tlOoptions = rule740 _lhsIoptions- _tlOparamInstMap = rule741 _lhsIparamInstMap- _tlOparamMap = rule742 _lhsIparamMap- _tlOprefix = rule743 _lhsIprefix- _tlOsyn = rule744 _lhsIsyn- _tlOterminals = rule745 _lhsIterminals- _tlOunfoldSemDom = rule746 _lhsIunfoldSemDom- _tlOvisitedSet = rule747 _hdIvisitedSet- _tlOwhat = rule748 _lhsIwhat- __result_ = T_Sequence_vOut46 _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet- in __result_ )- in C_Sequence_s47 v46- {-# INLINE rule669 #-}- {-# LINE 624 "./src-ag/GenerateCode.ag" #-}- rule669 = \ ((_hdIbldBlocksFun) :: DeclBlocks -> DeclBlocks) ((_tlIblockDecls) :: DeclBlocks) ->- {-# LINE 624 "./src-ag/GenerateCode.ag" #-}- _hdIbldBlocksFun _tlIblockDecls- {-# LINE 4891 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule670 #-}- rule670 = \ ((_hdIallTpsFound) :: Bool) ((_tlIallTpsFound) :: Bool) ->- _hdIallTpsFound && _tlIallTpsFound- {-# INLINE rule671 #-}- rule671 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->- _hdIcomments ++ _tlIcomments- {-# INLINE rule672 #-}- rule672 = \ ((_hdIdecls) :: Decls) ((_tlIdecls) :: Decls) ->- _hdIdecls ++ _tlIdecls- {-# INLINE rule673 #-}- rule673 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# INLINE rule674 #-}- rule674 = \ ((_hdIexprs) :: Exprs) ((_tlIexprs) :: Exprs) ->- _hdIexprs ++ _tlIexprs- {-# INLINE rule675 #-}- rule675 = \ ((_hdItSigs) :: [Decl]) ((_tlItSigs) :: [Decl]) ->- _hdItSigs ++ _tlItSigs- {-# INLINE rule676 #-}- rule676 = \ ((_hdItps) :: [Type]) ((_tlItps) :: [Type]) ->- _hdItps ++ _tlItps- {-# INLINE rule677 #-}- rule677 = \ ((_hdIusedVars) :: Set String) ((_tlIusedVars) :: Set String) ->- _hdIusedVars `Set.union` _tlIusedVars- {-# INLINE rule678 #-}- rule678 = \ ((_tlIdeclsAbove) :: [Decl]) ->- _tlIdeclsAbove- {-# INLINE rule679 #-}- rule679 = \ ((_tlIvisitedSet) :: Set Identifier) ->- _tlIvisitedSet- {-# INLINE rule680 #-}- rule680 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule681 #-}- rule681 = \ ((_lhsIaroundMap) :: Set Identifier) ->- _lhsIaroundMap- {-# INLINE rule682 #-}- rule682 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->- _lhsIchildren- {-# INLINE rule683 #-}- rule683 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule684 #-}- rule684 = \ ((_lhsIdeclsAbove) :: [Decl]) ->- _lhsIdeclsAbove- {-# INLINE rule685 #-}- rule685 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule686 #-}- rule686 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->- _lhsIinstVisitNrs- {-# INLINE rule687 #-}- rule687 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->- _lhsImergeMap- {-# INLINE rule688 #-}- rule688 = \ ((_lhsInr) :: Int) ->- _lhsInr- {-# INLINE rule689 #-}- rule689 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule690 #-}- rule690 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule691 #-}- rule691 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule692 #-}- rule692 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule693 #-}- rule693 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule694 #-}- rule694 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule695 #-}- rule695 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule696 #-}- rule696 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule697 #-}- rule697 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule698 #-}- rule698 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule699 #-}- rule699 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule700 #-}- rule700 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule701 #-}- rule701 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule702 #-}- rule702 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule703 #-}- rule703 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule704 #-}- rule704 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule705 #-}- rule705 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule706 #-}- rule706 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->- _lhsIparamInstMap- {-# INLINE rule707 #-}- rule707 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule708 #-}- rule708 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule709 #-}- rule709 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule710 #-}- rule710 = \ ((_lhsIterminals) :: [Identifier]) ->- _lhsIterminals- {-# INLINE rule711 #-}- rule711 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule712 #-}- rule712 = \ ((_lhsIvisitedSet) :: Set Identifier) ->- _lhsIvisitedSet- {-# INLINE rule713 #-}- rule713 = \ ((_lhsIwhat) :: String) ->- _lhsIwhat- {-# INLINE rule714 #-}- rule714 = \ ((_lhsIallNts) :: Set NontermIdent) ->- _lhsIallNts- {-# INLINE rule715 #-}- rule715 = \ ((_lhsIaroundMap) :: Set Identifier) ->- _lhsIaroundMap- {-# INLINE rule716 #-}- rule716 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->- _lhsIchildren- {-# INLINE rule717 #-}- rule717 = \ ((_lhsIcon) :: ConstructorIdent) ->- _lhsIcon- {-# INLINE rule718 #-}- rule718 = \ ((_hdIdeclsAbove) :: [Decl]) ->- _hdIdeclsAbove- {-# INLINE rule719 #-}- rule719 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule720 #-}- rule720 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->- _lhsIinstVisitNrs- {-# INLINE rule721 #-}- rule721 = \ ((_lhsIlastExpr) :: Expr) ->- _lhsIlastExpr- {-# INLINE rule722 #-}- rule722 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->- _lhsImergeMap- {-# INLINE rule723 #-}- rule723 = \ ((_lhsInr) :: Int) ->- _lhsInr- {-# INLINE rule724 #-}- rule724 = \ ((_lhsInt) :: NontermIdent) ->- _lhsInt- {-# INLINE rule725 #-}- rule725 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule726 #-}- rule726 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule727 #-}- rule727 = \ ((_lhsIo_costcentre) :: Bool) ->- _lhsIo_costcentre- {-# INLINE rule728 #-}- rule728 = \ ((_lhsIo_data) :: Maybe Bool) ->- _lhsIo_data- {-# INLINE rule729 #-}- rule729 = \ ((_lhsIo_linePragmas) :: Bool) ->- _lhsIo_linePragmas- {-# INLINE rule730 #-}- rule730 = \ ((_lhsIo_monadic) :: Bool) ->- _lhsIo_monadic- {-# INLINE rule731 #-}- rule731 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule732 #-}- rule732 = \ ((_lhsIo_pretty) :: Bool) ->- _lhsIo_pretty- {-# INLINE rule733 #-}- rule733 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule734 #-}- rule734 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule735 #-}- rule735 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule736 #-}- rule736 = \ ((_lhsIo_splitsems) :: Bool) ->- _lhsIo_splitsems- {-# INLINE rule737 #-}- rule737 = \ ((_lhsIo_strictwrap) :: Bool) ->- _lhsIo_strictwrap- {-# INLINE rule738 #-}- rule738 = \ ((_lhsIo_traces) :: Bool) ->- _lhsIo_traces- {-# INLINE rule739 #-}- rule739 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule740 #-}- rule740 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule741 #-}- rule741 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->- _lhsIparamInstMap- {-# INLINE rule742 #-}- rule742 = \ ((_lhsIparamMap) :: ParamMap) ->- _lhsIparamMap- {-# INLINE rule743 #-}- rule743 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule744 #-}- rule744 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule745 #-}- rule745 = \ ((_lhsIterminals) :: [Identifier]) ->- _lhsIterminals- {-# INLINE rule746 #-}- rule746 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->- _lhsIunfoldSemDom- {-# INLINE rule747 #-}- rule747 = \ ((_hdIvisitedSet) :: Set Identifier) ->- _hdIvisitedSet- {-# INLINE rule748 #-}- rule748 = \ ((_lhsIwhat) :: String) ->- _lhsIwhat-{-# NOINLINE sem_Sequence_Nil #-}-sem_Sequence_Nil :: T_Sequence -sem_Sequence_Nil = T_Sequence (return st47) where- {-# NOINLINE st47 #-}- st47 = let- v46 :: T_Sequence_v46 - v46 = \ (T_Sequence_vIn46 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let- _lhsOblockDecls :: DeclBlocks- _lhsOblockDecls = rule749 _lhsIdeclsAbove _lhsIlastExpr- _lhsOallTpsFound :: Bool- _lhsOallTpsFound = rule750 ()- _lhsOcomments :: [String]- _lhsOcomments = rule751 ()- _lhsOdecls :: Decls- _lhsOdecls = rule752 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule753 ()- _lhsOexprs :: Exprs- _lhsOexprs = rule754 ()- _lhsOtSigs :: [Decl]- _lhsOtSigs = rule755 ()- _lhsOtps :: [Type]- _lhsOtps = rule756 ()- _lhsOusedVars :: Set String- _lhsOusedVars = rule757 ()- _lhsOdeclsAbove :: [Decl]- _lhsOdeclsAbove = rule758 _lhsIdeclsAbove- _lhsOvisitedSet :: Set Identifier- _lhsOvisitedSet = rule759 _lhsIvisitedSet- __result_ = T_Sequence_vOut46 _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet- in __result_ )- in C_Sequence_s47 v46- {-# INLINE rule749 #-}- {-# LINE 626 "./src-ag/GenerateCode.ag" #-}- rule749 = \ ((_lhsIdeclsAbove) :: [Decl]) ((_lhsIlastExpr) :: Expr) ->- {-# LINE 626 "./src-ag/GenerateCode.ag" #-}- DeclTerminator _lhsIdeclsAbove _lhsIlastExpr- {-# LINE 5166 "dist/build/GenerateCode.hs"#-}- {-# INLINE rule750 #-}- rule750 = \ (_ :: ()) ->- True- {-# INLINE rule751 #-}- rule751 = \ (_ :: ()) ->- []- {-# INLINE rule752 #-}- rule752 = \ (_ :: ()) ->- []- {-# INLINE rule753 #-}- rule753 = \ (_ :: ()) ->- []- {-# INLINE rule754 #-}- rule754 = \ (_ :: ()) ->- []- {-# INLINE rule755 #-}- rule755 = \ (_ :: ()) ->- []- {-# INLINE rule756 #-}- rule756 = \ (_ :: ()) ->- []- {-# INLINE rule757 #-}- rule757 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule758 #-}- rule758 = \ ((_lhsIdeclsAbove) :: [Decl]) ->- _lhsIdeclsAbove- {-# INLINE rule759 #-}- rule759 = \ ((_lhsIvisitedSet) :: Set Identifier) ->+{-# LINE 2 "./src-ag/DeclBlocks.ag" #-}++import Code (Decl,Expr)+{-# LINE 9 "dist/build/GenerateCode.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 16 "dist/build/GenerateCode.hs" #-}++{-# LINE 2 "./src-ag/CodeSyntax.ag" #-}++import Patterns+import CommonTypes+import Data.Map(Map)+import Data.Set(Set)+{-# LINE 24 "dist/build/GenerateCode.hs" #-}++{-# LINE 9 "./src-ag/GenerateCode.ag" #-}++import CommonTypes+import SequentialTypes+import Code hiding (Type)+import qualified Code+import Options+import CodeSyntax+import ErrorMessages+import GrammarInfo+import DeclBlocks++import qualified Data.Map as Map+import Data.Map(Map)+import qualified Data.Set as Set+import Data.Set(Set)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq)+import UU.Scanner.Position+import TokenDef+import HsToken+import HsTokenScanner++import Data.List(partition,intersperse)+import Data.Maybe(fromJust,isJust)++{-# LINE 52 "dist/build/GenerateCode.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 107 "./src-ag/GenerateCode.ag" #-}++-- remove possible @v references in the types of a data type.+cleanupArg :: Options -> String -> String+cleanupArg opts s+ = case idEvalType opts (SimpleType s) of+ SimpleType s' -> s'+ _ -> error "Only SimpleType supported"+{-# LINE 63 "dist/build/GenerateCode.hs" #-}++{-# LINE 123 "./src-ag/GenerateCode.ag" #-}++appContext :: ContextMap -> NontermIdent -> Code.Type -> Code.Type+appContext mp nt tp+ = maybe tp (\ctx -> CtxApp (map (\(n,ns) -> (getName n, ns)) ctx) tp) $ Map.lookup nt mp++appQuant :: QuantMap -> NontermIdent -> Code.Type -> Code.Type+appQuant mp nt tp+ = foldr QuantApp tp $ Map.findWithDefault [] nt mp+{-# LINE 74 "dist/build/GenerateCode.hs" #-}++{-# LINE 248 "./src-ag/GenerateCode.ag" #-}++mkDecl :: Bool -> Lhs -> Expr -> Set String -> Set String -> Decl+mkDecl True lhs rhs _ _ = Bind lhs rhs+mkDecl False lhs rhs s1 s2 = Decl lhs rhs s1 s2++unwrapSem :: Bool -> NontermIdent -> Expr -> Expr+unwrapSem False _ e = e+unwrapSem True nm e = Case e alts+ where alts = [CaseAlt left right]+ left = Fun (typeName nm 0) [SimpleExpr "x"]+ right = SimpleExpr "x"+{-# LINE 88 "dist/build/GenerateCode.hs" #-}++{-# LINE 541 "./src-ag/GenerateCode.ag" #-}++mkLambdaArg :: String -> Maybe Code.Type -> Expr+mkLambdaArg nm Nothing = SimpleExpr nm+mkLambdaArg nm (Just tp) = TypedExpr (SimpleExpr nm) tp++mkLambda :: Exprs -> Expr -> Expr+mkLambda [] e = e+mkLambda xs e = Lambda xs e++mkSemFun :: Identifier -> Int -> Exprs -> Expr -> Expr+mkSemFun nt nr xs e = SemFun (typeName nt nr) xs e++typeAppStrs :: String -> [String] -> Code.Type+typeAppStrs nm params = TypeApp (SimpleType nm) (map SimpleType params)++isHigherOrder :: ChildKind -> Bool+isHigherOrder ChildAttr = True+isHigherOrder _ = False++pickOrigType :: (Identifier, Type, ChildKind) -> (Identifier, Type, ChildKind)+pickOrigType (nm, _, virt@(ChildReplace x)) = (nm, x, virt)+pickOrigType x = x+{-# LINE 113 "dist/build/GenerateCode.hs" #-}++{-# LINE 638 "./src-ag/GenerateCode.ag" #-}++mkPartitionedFunction :: String -> Bool -> [Decl] -> [String] -> DeclBlocks -> ([Decl], Expr)+mkPartitionedFunction prefix' optCase nextVisitDecls lastExprVars cpsTree+ = let inh = Inh_DeclBlocksRoot { prefix_Inh_DeclBlocksRoot = prefix'+ , optCase_Inh_DeclBlocksRoot = optCase+ , nextVisitDecls_Inh_DeclBlocksRoot = nextVisitDecls+ , lastExprVars_Inh_DeclBlocksRoot = lastExprVars+ }+ sem = sem_DeclBlocksRoot (DeclBlocksRoot cpsTree)+ syn = wrap_DeclBlocksRoot sem inh+ in (lambdas_Syn_DeclBlocksRoot syn, firstCall_Syn_DeclBlocksRoot syn)+{-# LINE 127 "dist/build/GenerateCode.hs" #-}++{-# LINE 688 "./src-ag/GenerateCode.ag" #-}++freevars :: [String] -> [Decl] -> [String]+freevars additional decls+ = Set.toList (allused `Set.difference` alldefined)+ where+ allused = Set.unions (Set.fromList additional : map usedvars decls)+ alldefined = Set.unions (map definedvars decls)++ usedvars (Decl _ _ _ uses) = uses+ usedvars _ = Set.empty++ definedvars (Decl _ _ defs _) = defs+ definedvars _ = Set.empty++mkBlockLambda :: Bool -> String -> [String] -> [Decl] -> Expr -> Decl+mkBlockLambda optCase name args decls expr+ = Decl lhs rhs Set.empty Set.empty+ where+ lhs = Fun name (map SimpleExpr args)+ rhs = mkLet optCase decls expr+{-# LINE 150 "dist/build/GenerateCode.hs" #-}++{-# LINE 766 "./src-ag/GenerateCode.ag" #-}++typeToCodeType :: Maybe NontermIdent -> [String] -> Type -> Code.Type+typeToCodeType _ _ tp+ = case tp of+ NT nt tps defor -> NontermType (getName nt) tps defor+ Haskell t -> SimpleType t+ Self -> error "Self type not allowed here."++evalType :: Options -> (String -> String) -> Code.Type -> Code.Type+evalType opts replf t'+ = chase t'+ where+ chase t+ = case t of+ Arr l r -> Arr (chase l) (chase r)+ TypeApp f as -> TypeApp (chase f) (map chase as)+ TupleType tps -> TupleType (map chase tps)+ UnboxedTupleType tps -> UnboxedTupleType (map chase tps)+ Code.List tp -> Code.List (chase tp)+ SimpleType txt -> let tks = lexTokens opts (initPos txt) txt+ tks' = map replaceTok tks+ txt' = unlines . showTokens . tokensToStrings $ tks'+ in SimpleType txt'+ TMaybe m -> TMaybe (chase m)+ TEither l r -> TEither (chase l) (chase r)+ TMap k v -> TMap (chase k) (chase v)+ TIntMap v -> TIntMap (chase v)+ _ -> t++ replaceTok t+ = case t of+ AGLocal v p _ -> HsToken (replf $ getName v) p+ _ -> t++idEvalType :: Options -> Code.Type -> Code.Type+idEvalType options = evalType options id+{-# LINE 189 "dist/build/GenerateCode.hs" #-}++{-# LINE 891 "./src-ag/GenerateCode.ag" #-}++-- for a virtual child that already existed as a child, returns+isFirstOrder :: ChildKind -> Type -> Maybe Type+isFirstOrder ChildSyntax tp = Just tp+isFirstOrder ChildAttr _ = Nothing+isFirstOrder (ChildReplace tp) _ = Just tp+{-# LINE 198 "dist/build/GenerateCode.hs" #-}++{-# LINE 912 "./src-ag/GenerateCode.ag" #-}++makeLocalComment :: Int -> String -> Identifier -> Maybe Type -> String+makeLocalComment width what name tp = let x = getName name+ y = maybe "_" (\t -> case t of+ (NT nt tps _) -> getName nt ++ " " ++ unwords tps+ Haskell t' -> '{' : t' ++ "}"+ Self -> error "Self type not allowed here.") tp+ in ( what ++ " " ++ x ++ replicate ((width - length x) `max` 0) ' ' ++ " : " ++ y )++{-# LINE 210 "dist/build/GenerateCode.hs" #-}++{-# LINE 946 "./src-ag/GenerateCode.ag" #-}++-- Lets or nested Cases?+-- or even a do-expression?++data DeclsType = DeclsLet | DeclsCase | DeclsDo++mkDecls :: DeclsType -> Decls -> Expr -> Expr+mkDecls DeclsLet = mkLet False+mkDecls DeclsCase = mkLet True+mkDecls DeclsDo = \decls -> Do (map toBind decls)+ where toBind (Decl lhs rhs _ _) = BindLet lhs rhs+ toBind d = d++mkLet :: Bool -> Decls -> Expr -> Expr+mkLet False decls body = Let decls body+mkLet True decls body = foldr oneCase body decls++oneCase :: Decl -> Expr -> Expr+oneCase (Decl left rhs _ _) ex = Case rhs [CaseAlt left ex]+oneCase (Resume _ nt left rhs) ex = ResumeExpr nt rhs left ex+oneCase _ ex = ex++-- Gives the name of the visit function+funname :: Show a => a -> Int -> String+funname field 0 = show field ++ "_"+funname field nr = show field ++ "_" ++ show nr++-- Gives the name of a semantic function+seqSemname :: String -> NontermIdent -> ConstructorIdent -> Int -> String+seqSemname pre nt con 0 = semname pre nt con+seqSemname pre nt con nr = semname pre nt con ++ "_" ++ show nr++-- Gives the name of a type+typeName :: NontermIdent -> Int -> String+typeName nt 0 = "T_" ++ show nt+typeName nt n = "T_" ++ show nt ++ "_" ++ show n++ntOfVisit :: NontermIdent -> Int -> NontermIdent+ntOfVisit nt 0 = nt+ntOfVisit nt n = Ident (show nt ++ "_" ++ show n) (getPos nt)++-- Gives the name of a visit function+visitname :: String -> NontermIdent -> Int -> String+visitname pre nt n = pre ++ getName nt ++ "_" ++ show n+{-# LINE 257 "dist/build/GenerateCode.hs" #-}++{-# LINE 1036 "./src-ag/GenerateCode.ag" #-}++toNamedType :: Bool -> NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> Code.NamedType+toNamedType genStrict nt con nm tp+ = Code.Named genStrict strNm tp+ where strNm = recordFieldname nt con nm+{-# LINE 265 "dist/build/GenerateCode.hs" #-}+-- CGrammar ----------------------------------------------------+-- wrapper+data Inh_CGrammar = Inh_CGrammar { options_Inh_CGrammar :: (Options) }+data Syn_CGrammar = Syn_CGrammar { errors_Syn_CGrammar :: (Seq Error), output_Syn_CGrammar :: (Program) }+{-# INLINABLE wrap_CGrammar #-}+wrap_CGrammar :: T_CGrammar -> Inh_CGrammar -> (Syn_CGrammar )+wrap_CGrammar (T_CGrammar act) (Inh_CGrammar _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CGrammar_vIn1 _lhsIoptions+ (T_CGrammar_vOut1 _lhsOerrors _lhsOoutput) <- return (inv_CGrammar_s2 sem arg)+ return (Syn_CGrammar _lhsOerrors _lhsOoutput)+ )++-- cata+{-# INLINE sem_CGrammar #-}+sem_CGrammar :: CGrammar -> T_CGrammar +sem_CGrammar ( CGrammar typeSyns_ derivings_ wrappers_ nonts_ pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_ ) = sem_CGrammar_CGrammar typeSyns_ derivings_ wrappers_ ( sem_CNonterminals nonts_ ) pragmas_ paramMap_ contextMap_ quantMap_ aroundsMap_ mergeMap_ multivisit_++-- semantic domain+newtype T_CGrammar = T_CGrammar {+ attach_T_CGrammar :: Identity (T_CGrammar_s2 )+ }+newtype T_CGrammar_s2 = C_CGrammar_s2 {+ inv_CGrammar_s2 :: (T_CGrammar_v1 )+ }+data T_CGrammar_s3 = C_CGrammar_s3+type T_CGrammar_v1 = (T_CGrammar_vIn1 ) -> (T_CGrammar_vOut1 )+data T_CGrammar_vIn1 = T_CGrammar_vIn1 (Options)+data T_CGrammar_vOut1 = T_CGrammar_vOut1 (Seq Error) (Program)+{-# NOINLINE sem_CGrammar_CGrammar #-}+sem_CGrammar_CGrammar :: (TypeSyns) -> (Derivings) -> (Set NontermIdent) -> T_CNonterminals -> (PragmaMap) -> (ParamMap) -> (ContextMap) -> (QuantMap) -> (Map NontermIdent (Map ConstructorIdent (Set Identifier))) -> (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) -> (Bool) -> T_CGrammar +sem_CGrammar_CGrammar arg_typeSyns_ arg_derivings_ arg_wrappers_ arg_nonts_ arg_pragmas_ arg_paramMap_ arg_contextMap_ arg_quantMap_ arg_aroundsMap_ arg_mergeMap_ arg_multivisit_ = T_CGrammar (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_CGrammar_v1 + v1 = \ (T_CGrammar_vIn1 _lhsIoptions) -> ( let+ _nontsX11 = Control.Monad.Identity.runIdentity (attach_T_CNonterminals (arg_nonts_))+ (T_CNonterminals_vOut10 _nontsIchunks _nontsIgathNts _nontsIsemDomUnfoldGath) = inv_CNonterminals_s11 _nontsX11 (T_CNonterminals_vIn10 _nontsOallNts _nontsOallPragmas _nontsOaroundMap _nontsOcontextMap _nontsOderivings _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_clean _nontsOo_costcentre _nontsOo_data _nontsOo_linePragmas _nontsOo_monadic _nontsOo_newtypes _nontsOo_pretty _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_splitsems _nontsOo_strictwrap _nontsOo_traces _nontsOo_unbox _nontsOoptions _nontsOparamMap _nontsOprefix _nontsOquantMap _nontsOtypeSyns _nontsOunfoldSemDom _nontsOwith_sig _nontsOwrappers)+ _nontsOo_sig = rule0 _lhsIoptions+ _nontsOo_cata = rule1 _lhsIoptions+ _nontsOo_sem = rule2 _lhsIoptions+ _nontsOo_newtypes = rule3 _lhsIoptions+ _nontsOo_unbox = rule4 _lhsIoptions+ _nontsOo_case = rule5 _lhsIoptions+ _nontsOo_pretty = rule6 _lhsIoptions+ _nontsOo_rename = rule7 _lhsIoptions+ _nontsOo_strictwrap = rule8 _lhsIoptions+ _nontsOo_splitsems = rule9 _lhsIoptions+ _nontsOo_data = rule10 _lhsIoptions+ _nontsOprefix = rule11 _lhsIoptions+ _nontsOo_traces = rule12 _lhsIoptions+ _nontsOo_costcentre = rule13 _lhsIoptions+ _nontsOo_linePragmas = rule14 _lhsIoptions+ _nontsOo_monadic = rule15 _lhsIoptions+ _nontsOo_clean = rule16 _lhsIoptions+ _options = rule17 _lhsIoptions arg_multivisit_+ _nontsOallPragmas = rule18 arg_pragmas_+ _nontsOparamMap = rule19 arg_paramMap_+ _nontsOcontextMap = rule20 arg_contextMap_+ _nontsOquantMap = rule21 arg_quantMap_+ _nontsOallNts = rule22 _nontsIgathNts+ _aroundMap = rule23 arg_aroundsMap_+ _mergeMap = rule24 arg_mergeMap_+ _unfoldSemDom = rule25 _lhsIoptions _nontsIsemDomUnfoldGath+ _nontsOwith_sig = rule26 _lhsIoptions+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule27 ()+ _lhsOoutput :: Program+ _lhsOoutput = rule28 _nontsIchunks arg_multivisit_+ _nontsOtypeSyns = rule29 arg_typeSyns_+ _nontsOderivings = rule30 arg_derivings_+ _nontsOwrappers = rule31 arg_wrappers_+ _nontsOaroundMap = rule32 _aroundMap+ _nontsOmergeMap = rule33 _mergeMap+ _nontsOoptions = rule34 _options+ _nontsOunfoldSemDom = rule35 _unfoldSemDom+ __result_ = T_CGrammar_vOut1 _lhsOerrors _lhsOoutput+ in __result_ )+ in C_CGrammar_s2 v1+ {-# INLINE rule0 #-}+ {-# LINE 52 "./src-ag/GenerateCode.ag" #-}+ rule0 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 52 "./src-ag/GenerateCode.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 351 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule1 #-}+ {-# LINE 53 "./src-ag/GenerateCode.ag" #-}+ rule1 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 53 "./src-ag/GenerateCode.ag" #-}+ folds _lhsIoptions+ {-# LINE 357 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule2 #-}+ {-# LINE 54 "./src-ag/GenerateCode.ag" #-}+ rule2 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 54 "./src-ag/GenerateCode.ag" #-}+ semfuns _lhsIoptions+ {-# LINE 363 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule3 #-}+ {-# LINE 55 "./src-ag/GenerateCode.ag" #-}+ rule3 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 55 "./src-ag/GenerateCode.ag" #-}+ newtypes _lhsIoptions+ {-# LINE 369 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule4 #-}+ {-# LINE 56 "./src-ag/GenerateCode.ag" #-}+ rule4 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 56 "./src-ag/GenerateCode.ag" #-}+ unbox _lhsIoptions+ {-# LINE 375 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule5 #-}+ {-# LINE 57 "./src-ag/GenerateCode.ag" #-}+ rule5 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 57 "./src-ag/GenerateCode.ag" #-}+ cases _lhsIoptions+ {-# LINE 381 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule6 #-}+ {-# LINE 58 "./src-ag/GenerateCode.ag" #-}+ rule6 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 58 "./src-ag/GenerateCode.ag" #-}+ attrInfo _lhsIoptions+ {-# LINE 387 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule7 #-}+ {-# LINE 59 "./src-ag/GenerateCode.ag" #-}+ rule7 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 59 "./src-ag/GenerateCode.ag" #-}+ rename _lhsIoptions+ {-# LINE 393 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule8 #-}+ {-# LINE 60 "./src-ag/GenerateCode.ag" #-}+ rule8 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 60 "./src-ag/GenerateCode.ag" #-}+ strictWrap _lhsIoptions+ {-# LINE 399 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule9 #-}+ {-# LINE 61 "./src-ag/GenerateCode.ag" #-}+ rule9 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 61 "./src-ag/GenerateCode.ag" #-}+ splitSems _lhsIoptions+ {-# LINE 405 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule10 #-}+ {-# LINE 62 "./src-ag/GenerateCode.ag" #-}+ rule10 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 62 "./src-ag/GenerateCode.ag" #-}+ if dataTypes _lhsIoptions then Just (strictData _lhsIoptions) else Nothing+ {-# LINE 411 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule11 #-}+ {-# LINE 63 "./src-ag/GenerateCode.ag" #-}+ rule11 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 63 "./src-ag/GenerateCode.ag" #-}+ prefix _lhsIoptions+ {-# LINE 417 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule12 #-}+ {-# LINE 64 "./src-ag/GenerateCode.ag" #-}+ rule12 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 64 "./src-ag/GenerateCode.ag" #-}+ genTraces _lhsIoptions+ {-# LINE 423 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule13 #-}+ {-# LINE 65 "./src-ag/GenerateCode.ag" #-}+ rule13 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 65 "./src-ag/GenerateCode.ag" #-}+ genCostCentres _lhsIoptions+ {-# LINE 429 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule14 #-}+ {-# LINE 66 "./src-ag/GenerateCode.ag" #-}+ rule14 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 66 "./src-ag/GenerateCode.ag" #-}+ genLinePragmas _lhsIoptions+ {-# LINE 435 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule15 #-}+ {-# LINE 67 "./src-ag/GenerateCode.ag" #-}+ rule15 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 67 "./src-ag/GenerateCode.ag" #-}+ monadic _lhsIoptions+ {-# LINE 441 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule16 #-}+ {-# LINE 68 "./src-ag/GenerateCode.ag" #-}+ rule16 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 68 "./src-ag/GenerateCode.ag" #-}+ clean _lhsIoptions+ {-# LINE 447 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule17 #-}+ {-# LINE 71 "./src-ag/GenerateCode.ag" #-}+ rule17 = \ ((_lhsIoptions) :: Options) multivisit_ ->+ {-# LINE 71 "./src-ag/GenerateCode.ag" #-}+ _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && multivisit_ }+ {-# LINE 453 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule18 #-}+ {-# LINE 76 "./src-ag/GenerateCode.ag" #-}+ rule18 = \ pragmas_ ->+ {-# LINE 76 "./src-ag/GenerateCode.ag" #-}+ pragmas_+ {-# LINE 459 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule19 #-}+ {-# LINE 98 "./src-ag/GenerateCode.ag" #-}+ rule19 = \ paramMap_ ->+ {-# LINE 98 "./src-ag/GenerateCode.ag" #-}+ paramMap_+ {-# LINE 465 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule20 #-}+ {-# LINE 120 "./src-ag/GenerateCode.ag" #-}+ rule20 = \ contextMap_ ->+ {-# LINE 120 "./src-ag/GenerateCode.ag" #-}+ contextMap_+ {-# LINE 471 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule21 #-}+ {-# LINE 121 "./src-ag/GenerateCode.ag" #-}+ rule21 = \ quantMap_ ->+ {-# LINE 121 "./src-ag/GenerateCode.ag" #-}+ quantMap_+ {-# LINE 477 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule22 #-}+ {-# LINE 137 "./src-ag/GenerateCode.ag" #-}+ rule22 = \ ((_nontsIgathNts) :: Set NontermIdent) ->+ {-# LINE 137 "./src-ag/GenerateCode.ag" #-}+ _nontsIgathNts+ {-# LINE 483 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule23 #-}+ {-# LINE 587 "./src-ag/GenerateCode.ag" #-}+ rule23 = \ aroundsMap_ ->+ {-# LINE 587 "./src-ag/GenerateCode.ag" #-}+ aroundsMap_+ {-# LINE 489 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule24 #-}+ {-# LINE 603 "./src-ag/GenerateCode.ag" #-}+ rule24 = \ mergeMap_ ->+ {-# LINE 603 "./src-ag/GenerateCode.ag" #-}+ mergeMap_+ {-# LINE 495 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule25 #-}+ {-# LINE 760 "./src-ag/GenerateCode.ag" #-}+ rule25 = \ ((_lhsIoptions) :: Options) ((_nontsIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->+ {-# LINE 760 "./src-ag/GenerateCode.ag" #-}+ \nt nr repl ->+ let (params, tp) = Map.findWithDefault (error ("No such semantic domain: " ++ show nt)) (nt, nr) _nontsIsemDomUnfoldGath+ replMap = Map.fromList (zip params repl)+ replace k = Map.findWithDefault ('@':k) k replMap+ in evalType _lhsIoptions replace tp+ {-# LINE 505 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule26 #-}+ {-# LINE 860 "./src-ag/GenerateCode.ag" #-}+ rule26 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 860 "./src-ag/GenerateCode.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 511 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule27 #-}+ {-# LINE 863 "./src-ag/GenerateCode.ag" #-}+ rule27 = \ (_ :: ()) ->+ {-# LINE 863 "./src-ag/GenerateCode.ag" #-}+ Seq.empty+ {-# LINE 517 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule28 #-}+ {-# LINE 932 "./src-ag/GenerateCode.ag" #-}+ rule28 = \ ((_nontsIchunks) :: Chunks) multivisit_ ->+ {-# LINE 932 "./src-ag/GenerateCode.ag" #-}+ Program _nontsIchunks multivisit_+ {-# LINE 523 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule29 #-}+ {-# LINE 1000 "./src-ag/GenerateCode.ag" #-}+ rule29 = \ typeSyns_ ->+ {-# LINE 1000 "./src-ag/GenerateCode.ag" #-}+ typeSyns_+ {-# LINE 529 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule30 #-}+ {-# LINE 1001 "./src-ag/GenerateCode.ag" #-}+ rule30 = \ derivings_ ->+ {-# LINE 1001 "./src-ag/GenerateCode.ag" #-}+ derivings_+ {-# LINE 535 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule31 #-}+ {-# LINE 1002 "./src-ag/GenerateCode.ag" #-}+ rule31 = \ wrappers_ ->+ {-# LINE 1002 "./src-ag/GenerateCode.ag" #-}+ wrappers_+ {-# LINE 541 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule32 #-}+ rule32 = \ _aroundMap ->+ _aroundMap+ {-# INLINE rule33 #-}+ rule33 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule34 #-}+ rule34 = \ _options ->+ _options+ {-# INLINE rule35 #-}+ rule35 = \ _unfoldSemDom ->+ _unfoldSemDom++-- CInterface --------------------------------------------------+-- wrapper+data Inh_CInterface = Inh_CInterface { inh_Inh_CInterface :: (Attributes), nt_Inh_CInterface :: (NontermIdent), o_case_Inh_CInterface :: (Bool), o_cata_Inh_CInterface :: (Bool), o_clean_Inh_CInterface :: (Bool), o_costcentre_Inh_CInterface :: (Bool), o_data_Inh_CInterface :: (Maybe Bool), o_linePragmas_Inh_CInterface :: (Bool), o_monadic_Inh_CInterface :: (Bool), o_newtypes_Inh_CInterface :: (Bool), o_pretty_Inh_CInterface :: (Bool), o_rename_Inh_CInterface :: (Bool), o_sem_Inh_CInterface :: (Bool), o_sig_Inh_CInterface :: (Bool), o_splitsems_Inh_CInterface :: (Bool), o_strictwrap_Inh_CInterface :: (Bool), o_traces_Inh_CInterface :: (Bool), o_unbox_Inh_CInterface :: (Bool), options_Inh_CInterface :: (Options), paramMap_Inh_CInterface :: (ParamMap), prefix_Inh_CInterface :: (String), syn_Inh_CInterface :: (Attributes) }+data Syn_CInterface = Syn_CInterface { comments_Syn_CInterface :: ([String]), semDom_Syn_CInterface :: ([Decl]), semDomUnfoldGath_Syn_CInterface :: (Map (NontermIdent, Int) ([String], Code.Type)), wrapDecls_Syn_CInterface :: (Decls) }+{-# INLINABLE wrap_CInterface #-}+wrap_CInterface :: T_CInterface -> Inh_CInterface -> (Syn_CInterface )+wrap_CInterface (T_CInterface act) (Inh_CInterface _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CInterface_vIn4 _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn+ (T_CInterface_vOut4 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls) <- return (inv_CInterface_s5 sem arg)+ return (Syn_CInterface _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls)+ )++-- cata+{-# INLINE sem_CInterface #-}+sem_CInterface :: CInterface -> T_CInterface +sem_CInterface ( CInterface seg_ ) = sem_CInterface_CInterface ( sem_CSegments seg_ )++-- semantic domain+newtype T_CInterface = T_CInterface {+ attach_T_CInterface :: Identity (T_CInterface_s5 )+ }+newtype T_CInterface_s5 = C_CInterface_s5 {+ inv_CInterface_s5 :: (T_CInterface_v4 )+ }+data T_CInterface_s6 = C_CInterface_s6+type T_CInterface_v4 = (T_CInterface_vIn4 ) -> (T_CInterface_vOut4 )+data T_CInterface_vIn4 = T_CInterface_vIn4 (Attributes) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)+data T_CInterface_vOut4 = T_CInterface_vOut4 ([String]) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)+{-# NOINLINE sem_CInterface_CInterface #-}+sem_CInterface_CInterface :: T_CSegments -> T_CInterface +sem_CInterface_CInterface arg_seg_ = T_CInterface (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_CInterface_v4 + v4 = \ (T_CInterface_vIn4 _lhsIinh _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let+ _segX26 = Control.Monad.Identity.runIdentity (attach_T_CSegments (arg_seg_))+ (T_CSegments_vOut25 _segIcomments _segIisNil _segIsemDom _segIsemDomUnfoldGath _segIwrapDecls) = inv_CSegments_s26 _segX26 (T_CSegments_vIn25 _segOinh _segOnr _segOnt _segOo_case _segOo_cata _segOo_clean _segOo_costcentre _segOo_data _segOo_linePragmas _segOo_monadic _segOo_newtypes _segOo_pretty _segOo_rename _segOo_sem _segOo_sig _segOo_splitsems _segOo_strictwrap _segOo_traces _segOo_unbox _segOoptions _segOparamMap _segOprefix _segOsyn)+ _segOnr = rule36 ()+ _lhsOsemDom :: [Decl]+ _lhsOsemDom = rule37 _segIsemDom+ _lhsOcomments :: [String]+ _lhsOcomments = rule38 _segIcomments+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule39 _segIsemDomUnfoldGath+ _lhsOwrapDecls :: Decls+ _lhsOwrapDecls = rule40 _segIwrapDecls+ _segOinh = rule41 _lhsIinh+ _segOnt = rule42 _lhsInt+ _segOo_case = rule43 _lhsIo_case+ _segOo_cata = rule44 _lhsIo_cata+ _segOo_clean = rule45 _lhsIo_clean+ _segOo_costcentre = rule46 _lhsIo_costcentre+ _segOo_data = rule47 _lhsIo_data+ _segOo_linePragmas = rule48 _lhsIo_linePragmas+ _segOo_monadic = rule49 _lhsIo_monadic+ _segOo_newtypes = rule50 _lhsIo_newtypes+ _segOo_pretty = rule51 _lhsIo_pretty+ _segOo_rename = rule52 _lhsIo_rename+ _segOo_sem = rule53 _lhsIo_sem+ _segOo_sig = rule54 _lhsIo_sig+ _segOo_splitsems = rule55 _lhsIo_splitsems+ _segOo_strictwrap = rule56 _lhsIo_strictwrap+ _segOo_traces = rule57 _lhsIo_traces+ _segOo_unbox = rule58 _lhsIo_unbox+ _segOoptions = rule59 _lhsIoptions+ _segOparamMap = rule60 _lhsIparamMap+ _segOprefix = rule61 _lhsIprefix+ _segOsyn = rule62 _lhsIsyn+ __result_ = T_CInterface_vOut4 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls+ in __result_ )+ in C_CInterface_s5 v4+ {-# INLINE rule36 #-}+ {-# LINE 286 "./src-ag/GenerateCode.ag" #-}+ rule36 = \ (_ :: ()) ->+ {-# LINE 286 "./src-ag/GenerateCode.ag" #-}+ 0+ {-# LINE 633 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule37 #-}+ {-# LINE 717 "./src-ag/GenerateCode.ag" #-}+ rule37 = \ ((_segIsemDom) :: [Decl]) ->+ {-# LINE 717 "./src-ag/GenerateCode.ag" #-}+ Comment "semantic domain" : _segIsemDom+ {-# LINE 639 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule38 #-}+ rule38 = \ ((_segIcomments) :: [String]) ->+ _segIcomments+ {-# INLINE rule39 #-}+ rule39 = \ ((_segIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->+ _segIsemDomUnfoldGath+ {-# INLINE rule40 #-}+ rule40 = \ ((_segIwrapDecls) :: Decls) ->+ _segIwrapDecls+ {-# INLINE rule41 #-}+ rule41 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule42 #-}+ rule42 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule43 #-}+ rule43 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule44 #-}+ rule44 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule45 #-}+ rule45 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule46 #-}+ rule46 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule47 #-}+ rule47 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule48 #-}+ rule48 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule49 #-}+ rule49 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule50 #-}+ rule50 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule51 #-}+ rule51 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule52 #-}+ rule52 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule53 #-}+ rule53 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule54 #-}+ rule54 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule55 #-}+ rule55 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule56 #-}+ rule56 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule57 #-}+ rule57 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule58 #-}+ rule58 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule59 #-}+ rule59 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule60 #-}+ rule60 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule61 #-}+ rule61 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule62 #-}+ rule62 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn++-- CNonterminal ------------------------------------------------+-- wrapper+data Inh_CNonterminal = Inh_CNonterminal { allNts_Inh_CNonterminal :: (Set NontermIdent), allPragmas_Inh_CNonterminal :: (PragmaMap), aroundMap_Inh_CNonterminal :: (Map NontermIdent (Map ConstructorIdent (Set Identifier))), contextMap_Inh_CNonterminal :: (ContextMap), derivings_Inh_CNonterminal :: (Derivings), mergeMap_Inh_CNonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))), o_case_Inh_CNonterminal :: (Bool), o_cata_Inh_CNonterminal :: (Bool), o_clean_Inh_CNonterminal :: (Bool), o_costcentre_Inh_CNonterminal :: (Bool), o_data_Inh_CNonterminal :: (Maybe Bool), o_linePragmas_Inh_CNonterminal :: (Bool), o_monadic_Inh_CNonterminal :: (Bool), o_newtypes_Inh_CNonterminal :: (Bool), o_pretty_Inh_CNonterminal :: (Bool), o_rename_Inh_CNonterminal :: (Bool), o_sem_Inh_CNonterminal :: (Bool), o_sig_Inh_CNonterminal :: (Bool), o_splitsems_Inh_CNonterminal :: (Bool), o_strictwrap_Inh_CNonterminal :: (Bool), o_traces_Inh_CNonterminal :: (Bool), o_unbox_Inh_CNonterminal :: (Bool), options_Inh_CNonterminal :: (Options), paramMap_Inh_CNonterminal :: (ParamMap), prefix_Inh_CNonterminal :: (String), quantMap_Inh_CNonterminal :: (QuantMap), typeSyns_Inh_CNonterminal :: (TypeSyns), unfoldSemDom_Inh_CNonterminal :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CNonterminal :: (Bool), wrappers_Inh_CNonterminal :: (Set NontermIdent) }+data Syn_CNonterminal = Syn_CNonterminal { chunks_Syn_CNonterminal :: (Chunks), gathNts_Syn_CNonterminal :: (Set NontermIdent), semDomUnfoldGath_Syn_CNonterminal :: (Map (NontermIdent, Int) ([String], Code.Type)) }+{-# INLINABLE wrap_CNonterminal #-}+wrap_CNonterminal :: T_CNonterminal -> Inh_CNonterminal -> (Syn_CNonterminal )+wrap_CNonterminal (T_CNonterminal act) (Inh_CNonterminal _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CNonterminal_vIn7 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ (T_CNonterminal_vOut7 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath) <- return (inv_CNonterminal_s8 sem arg)+ return (Syn_CNonterminal _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath)+ )++-- cata+{-# INLINE sem_CNonterminal #-}+sem_CNonterminal :: CNonterminal -> T_CNonterminal +sem_CNonterminal ( CNonterminal nt_ params_ inh_ syn_ prods_ inter_ ) = sem_CNonterminal_CNonterminal nt_ params_ inh_ syn_ ( sem_CProductions prods_ ) ( sem_CInterface inter_ )++-- semantic domain+newtype T_CNonterminal = T_CNonterminal {+ attach_T_CNonterminal :: Identity (T_CNonterminal_s8 )+ }+newtype T_CNonterminal_s8 = C_CNonterminal_s8 {+ inv_CNonterminal_s8 :: (T_CNonterminal_v7 )+ }+data T_CNonterminal_s9 = C_CNonterminal_s9+type T_CNonterminal_v7 = (T_CNonterminal_vIn7 ) -> (T_CNonterminal_vOut7 )+data T_CNonterminal_vIn7 = T_CNonterminal_vIn7 (Set NontermIdent) (PragmaMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) (ContextMap) (Derivings) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (TypeSyns) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)+data T_CNonterminal_vOut7 = T_CNonterminal_vOut7 (Chunks) (Set NontermIdent) (Map (NontermIdent, Int) ([String], Code.Type))+{-# NOINLINE sem_CNonterminal_CNonterminal #-}+sem_CNonterminal_CNonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_CProductions -> T_CInterface -> T_CNonterminal +sem_CNonterminal_CNonterminal arg_nt_ arg_params_ arg_inh_ arg_syn_ arg_prods_ arg_inter_ = T_CNonterminal (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_CNonterminal_v7 + v7 = \ (T_CNonterminal_vIn7 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let+ _prodsX17 = Control.Monad.Identity.runIdentity (attach_T_CProductions (arg_prods_))+ _interX5 = Control.Monad.Identity.runIdentity (attach_T_CInterface (arg_inter_))+ (T_CProductions_vOut16 _prodsIcataAlts _prodsIcomments _prodsIdataAlts _prodsIdecls _prodsIsemNames) = inv_CProductions_s17 _prodsX17 (T_CProductions_vIn16 _prodsOallNts _prodsOallPragmas _prodsOaroundMap _prodsOcontextMap _prodsOinh _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_clean _prodsOo_costcentre _prodsOo_data _prodsOo_linePragmas _prodsOo_monadic _prodsOo_newtypes _prodsOo_pretty _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_splitsems _prodsOo_strictwrap _prodsOo_traces _prodsOo_unbox _prodsOoptions _prodsOparamMap _prodsOprefix _prodsOquantMap _prodsOsyn _prodsOunfoldSemDom _prodsOwith_sig _prodsOwrappers)+ (T_CInterface_vOut4 _interIcomments _interIsemDom _interIsemDomUnfoldGath _interIwrapDecls) = inv_CInterface_s5 _interX5 (T_CInterface_vIn4 _interOinh _interOnt _interOo_case _interOo_cata _interOo_clean _interOo_costcentre _interOo_data _interOo_linePragmas _interOo_monadic _interOo_newtypes _interOo_pretty _interOo_rename _interOo_sem _interOo_sig _interOo_splitsems _interOo_strictwrap _interOo_traces _interOo_unbox _interOoptions _interOparamMap _interOprefix _interOsyn)+ (_interOinh,_interOsyn,_interOnt) = rule63 arg_inh_ arg_nt_ arg_syn_+ (_prodsOinh,_prodsOsyn,_prodsOnt) = rule64 arg_inh_ arg_nt_ arg_syn_+ _lhsOgathNts :: Set NontermIdent+ _lhsOgathNts = rule65 arg_nt_+ _aroundMap = rule66 _lhsIaroundMap arg_nt_+ _mergeMap = rule67 _lhsImergeMap arg_nt_+ _semWrapper = rule68 _interIwrapDecls _lhsIo_newtypes _lhsIo_strictwrap _lhsIoptions arg_inh_ arg_nt_ arg_params_ arg_syn_+ _comment = rule69 _interIcomments _prodsIcomments+ _lhsOchunks :: Chunks+ _lhsOchunks = rule70 _cataFun _comment _dataDef _genCata _interIsemDom _lhsIo_cata _lhsIo_data _lhsIo_pretty _lhsIo_sem _lhsIo_sig _lhsIwrappers _prodsIdecls _prodsIsemNames _semWrapper arg_nt_+ _dataDef = rule71 _lhsIderivings _lhsIo_data _lhsIoptions _lhsItypeSyns _prodsIdataAlts arg_nt_ arg_params_+ _genCata = rule72 _lhsIoptions arg_nt_+ _cataFun = rule73 _lhsIcontextMap _lhsIo_sig _lhsIoptions _lhsIprefix _lhsIquantMap _lhsItypeSyns _prodsIcataAlts arg_nt_ arg_params_+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule74 _interIsemDomUnfoldGath+ _prodsOallNts = rule75 _lhsIallNts+ _prodsOallPragmas = rule76 _lhsIallPragmas+ _prodsOaroundMap = rule77 _aroundMap+ _prodsOcontextMap = rule78 _lhsIcontextMap+ _prodsOmergeMap = rule79 _mergeMap+ _prodsOo_case = rule80 _lhsIo_case+ _prodsOo_cata = rule81 _lhsIo_cata+ _prodsOo_clean = rule82 _lhsIo_clean+ _prodsOo_costcentre = rule83 _lhsIo_costcentre+ _prodsOo_data = rule84 _lhsIo_data+ _prodsOo_linePragmas = rule85 _lhsIo_linePragmas+ _prodsOo_monadic = rule86 _lhsIo_monadic+ _prodsOo_newtypes = rule87 _lhsIo_newtypes+ _prodsOo_pretty = rule88 _lhsIo_pretty+ _prodsOo_rename = rule89 _lhsIo_rename+ _prodsOo_sem = rule90 _lhsIo_sem+ _prodsOo_sig = rule91 _lhsIo_sig+ _prodsOo_splitsems = rule92 _lhsIo_splitsems+ _prodsOo_strictwrap = rule93 _lhsIo_strictwrap+ _prodsOo_traces = rule94 _lhsIo_traces+ _prodsOo_unbox = rule95 _lhsIo_unbox+ _prodsOoptions = rule96 _lhsIoptions+ _prodsOparamMap = rule97 _lhsIparamMap+ _prodsOprefix = rule98 _lhsIprefix+ _prodsOquantMap = rule99 _lhsIquantMap+ _prodsOunfoldSemDom = rule100 _lhsIunfoldSemDom+ _prodsOwith_sig = rule101 _lhsIwith_sig+ _prodsOwrappers = rule102 _lhsIwrappers+ _interOo_case = rule103 _lhsIo_case+ _interOo_cata = rule104 _lhsIo_cata+ _interOo_clean = rule105 _lhsIo_clean+ _interOo_costcentre = rule106 _lhsIo_costcentre+ _interOo_data = rule107 _lhsIo_data+ _interOo_linePragmas = rule108 _lhsIo_linePragmas+ _interOo_monadic = rule109 _lhsIo_monadic+ _interOo_newtypes = rule110 _lhsIo_newtypes+ _interOo_pretty = rule111 _lhsIo_pretty+ _interOo_rename = rule112 _lhsIo_rename+ _interOo_sem = rule113 _lhsIo_sem+ _interOo_sig = rule114 _lhsIo_sig+ _interOo_splitsems = rule115 _lhsIo_splitsems+ _interOo_strictwrap = rule116 _lhsIo_strictwrap+ _interOo_traces = rule117 _lhsIo_traces+ _interOo_unbox = rule118 _lhsIo_unbox+ _interOoptions = rule119 _lhsIoptions+ _interOparamMap = rule120 _lhsIparamMap+ _interOprefix = rule121 _lhsIprefix+ __result_ = T_CNonterminal_vOut7 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath+ in __result_ )+ in C_CNonterminal_s8 v7+ {-# INLINE rule63 #-}+ {-# LINE 86 "./src-ag/GenerateCode.ag" #-}+ rule63 = \ inh_ nt_ syn_ ->+ {-# LINE 86 "./src-ag/GenerateCode.ag" #-}+ (inh_,syn_,nt_)+ {-# LINE 827 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule64 #-}+ {-# LINE 87 "./src-ag/GenerateCode.ag" #-}+ rule64 = \ inh_ nt_ syn_ ->+ {-# LINE 87 "./src-ag/GenerateCode.ag" #-}+ (inh_,syn_,nt_)+ {-# LINE 833 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule65 #-}+ {-# LINE 143 "./src-ag/GenerateCode.ag" #-}+ rule65 = \ nt_ ->+ {-# LINE 143 "./src-ag/GenerateCode.ag" #-}+ Set.singleton nt_+ {-# LINE 839 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule66 #-}+ {-# LINE 588 "./src-ag/GenerateCode.ag" #-}+ rule66 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) nt_ ->+ {-# LINE 588 "./src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 845 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule67 #-}+ {-# LINE 604 "./src-ag/GenerateCode.ag" #-}+ rule67 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) nt_ ->+ {-# LINE 604 "./src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 851 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule68 #-}+ {-# LINE 809 "./src-ag/GenerateCode.ag" #-}+ rule68 = \ ((_interIwrapDecls) :: Decls) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_strictwrap) :: Bool) ((_lhsIoptions) :: Options) inh_ nt_ params_ syn_ ->+ {-# LINE 809 "./src-ag/GenerateCode.ag" #-}+ let params' = map getName params_+ inhAttrs = Map.toList inh_+ synAttrs = Map.toList syn_+ inhVars = [ SimpleExpr (attrname _lhsIoptions True _LHS a) | (a,_) <- inhAttrs ]+ synVars = [ SimpleExpr (attrname _lhsIoptions False _LHS a) | (a,_) <- synAttrs ]+ var = "sem"+ wrapNT = "wrap" ++ "_" ++ getName nt_+ inhNT = "Inh" ++ "_" ++ getName nt_+ synNT = "Syn" ++ "_" ++ getName nt_+ varPat = if _lhsIo_newtypes+ then App (sdtype nt_) [SimpleExpr var]+ else SimpleExpr var+ evalTp | null params' = id+ | otherwise = idEvalType _lhsIoptions+ appParams nm = TypeApp (SimpleType nm) (map SimpleType params')+ typeSig = TSig wrapNT (evalTp $ appParams (sdtype nt_) `Arr` (appParams inhNT `Arr` appParams synNT))+ mkstrict = Named _lhsIo_strictwrap+ mkdata n attrs = Data n params' [Record n [mkstrict (getName f++"_"++n) $ evalTp $ typeToCodeType (Just nt_) params' t | (f,t) <- attrs]] False []+ datas = [mkdata inhNT inhAttrs, mkdata synNT synAttrs]+ in datas ++ [ typeSig+ , Decl (Fun wrapNT [varPat, App inhNT inhVars])+ (Let _interIwrapDecls (App synNT synVars))+ Set.empty Set.empty+ ]+ {-# LINE 880 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule69 #-}+ {-# LINE 870 "./src-ag/GenerateCode.ag" #-}+ rule69 = \ ((_interIcomments) :: [String]) ((_prodsIcomments) :: [String]) ->+ {-# LINE 870 "./src-ag/GenerateCode.ag" #-}+ Comment . unlines . map ind $ ( _interIcomments ++ ("alternatives:" : map ind _prodsIcomments) )+ {-# LINE 886 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule70 #-}+ {-# LINE 935 "./src-ag/GenerateCode.ag" #-}+ rule70 = \ _cataFun _comment _dataDef _genCata ((_interIsemDom) :: [Decl]) ((_lhsIo_cata) :: Bool) ((_lhsIo_data) :: Maybe Bool) ((_lhsIo_pretty) :: Bool) ((_lhsIo_sem) :: Bool) ((_lhsIo_sig) :: Bool) ((_lhsIwrappers) :: Set NontermIdent) ((_prodsIdecls) :: Decls) ((_prodsIsemNames) :: [String]) _semWrapper nt_ ->+ {-# LINE 935 "./src-ag/GenerateCode.ag" #-}+ [ Chunk (getName nt_)+ (Comment (getName nt_ ++ " " ++ replicate (60 - length (getName nt_)) '-'))+ (if _lhsIo_pretty then [_comment ] else [])+ (if isJust _lhsIo_data then [_dataDef ] else [])+ (if _lhsIo_cata && _genCata then _cataFun else [])+ (if _lhsIo_sig then _interIsemDom else [])+ (if nt_ `Set.member` _lhsIwrappers then _semWrapper else [])+ (if _lhsIo_sem then _prodsIdecls else [])+ (if _lhsIo_sem then _prodsIsemNames else [])+ ]+ {-# LINE 901 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule71 #-}+ {-# LINE 1005 "./src-ag/GenerateCode.ag" #-}+ rule71 = \ ((_lhsIderivings) :: Derivings) ((_lhsIo_data) :: Maybe Bool) ((_lhsIoptions) :: Options) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIdataAlts) :: DataAlts) nt_ params_ ->+ {-# LINE 1005 "./src-ag/GenerateCode.ag" #-}+ let params' = map getName params_+ typeSyn tp = let theType =+ case tp of+ CommonTypes.Maybe t -> TMaybe $ typeToCodeType (Just nt_) params' t+ CommonTypes.Either t1 t2 -> TEither (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)+ CommonTypes.Map t1 t2 -> TMap (typeToCodeType (Just nt_) params' t1) (typeToCodeType (Just nt_) params' t2)+ CommonTypes.IntMap t -> TIntMap $ typeToCodeType (Just nt_) params' t+ CommonTypes.List t -> Code.List $ typeToCodeType (Just nt_) params' t+ CommonTypes.Tuple ts -> Code.TupleType [typeToCodeType (Just nt_) params' t | (_,t) <- ts ]+ tp' -> error $ show tp' ++ " not supported"+ in Code.Type (getName nt_) params' (idEvalType _lhsIoptions theType)+ derivings = maybe [] (map getName . Set.toList) (Map.lookup nt_ _lhsIderivings)+ dataDef = Data (getName nt_) (map getName params_) _prodsIdataAlts (maybe False id _lhsIo_data) derivings+ in maybe dataDef typeSyn $ lookup nt_ _lhsItypeSyns+ {-# LINE 920 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule72 #-}+ {-# LINE 1048 "./src-ag/GenerateCode.ag" #-}+ rule72 = \ ((_lhsIoptions) :: Options) nt_ ->+ {-# LINE 1048 "./src-ag/GenerateCode.ag" #-}+ not (nt_ `Set.member` nocatas _lhsIoptions)+ {-# LINE 926 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule73 #-}+ {-# LINE 1049 "./src-ag/GenerateCode.ag" #-}+ rule73 = \ ((_lhsIcontextMap) :: ContextMap) ((_lhsIo_sig) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIprefix) :: String) ((_lhsIquantMap) :: QuantMap) ((_lhsItypeSyns) :: TypeSyns) ((_prodsIcataAlts) :: Decls) nt_ params_ ->+ {-# LINE 1049 "./src-ag/GenerateCode.ag" #-}+ let appParams nm = TypeApp (SimpleType nm) (map SimpleType (map getName params_))+ evalTp | null params_ = id+ | otherwise = idEvalType _lhsIoptions+ tSig = TSig (cataname _lhsIprefix nt_)+ (appQuant _lhsIquantMap nt_ $ appContext _lhsIcontextMap nt_ $ evalTp $ appParams (getName nt_) `Arr` appParams (sdtype nt_))+ special typ = case typ of+ CommonTypes.List tp ->+ let cons = SimpleExpr (semname _lhsIprefix nt_ (identifier "Cons"))+ nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil" ))+ arg = SimpleExpr "list"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in SimpleExpr ("(Prelude.map " ++ (cataname _lhsIprefix t') ++ " list)")+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = (App "Prelude.foldr" [cons,nil,rarg])+ in [Decl lhs rhs Set.empty Set.empty]+ CommonTypes.Maybe tp ->+ let just = semname _lhsIprefix nt_ (identifier "Just")+ nothing = semname _lhsIprefix nt_ (identifier "Nothing" )+ arg = SimpleExpr "x"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [arg]+ _ -> arg+ lhs a = Fun (cataname _lhsIprefix nt_) [a]+ in [Decl (lhs (App "Prelude.Just" [arg])) (App just [rarg]) Set.empty Set.empty+ ,Decl (lhs (SimpleExpr "Prelude.Nothing")) (SimpleExpr nothing) Set.empty Set.empty+ ]+ CommonTypes.Either tp1 tp2 ->+ let left = semname _lhsIprefix nt_ (identifier "Left")+ right = semname _lhsIprefix nt_ (identifier "Right" )+ arg = SimpleExpr "x"+ rarg0 = case tp1 of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [arg]+ _ -> arg+ rarg1 = case tp2 of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [arg]+ _ -> arg+ lhs a = Fun (cataname _lhsIprefix nt_) [a]+ in [Decl (lhs (App "Prelude.Left" [arg])) (App left [rarg0]) Set.empty Set.empty+ ,Decl (lhs (App "Prelude.Right" [arg])) (App right [rarg1]) Set.empty Set.empty+ ]+ CommonTypes.Map _ tp ->+ let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))+ nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))+ arg = SimpleExpr "m"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App "Data.Map.map" [SimpleExpr $ cataname _lhsIprefix t', arg]+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = App "Data.Map.foldrWithKey" [entry,nil,rarg]+ in [Decl lhs rhs Set.empty Set.empty]+ CommonTypes.IntMap tp ->+ let entry = SimpleExpr (semname _lhsIprefix nt_ (identifier "Entry"))+ nil = SimpleExpr (semname _lhsIprefix nt_ (identifier "Nil"))+ arg = SimpleExpr "m"+ rarg = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App "Data.IntMap.map" [SimpleExpr $ cataname _lhsIprefix t', arg]+ _ -> arg+ lhs = Fun (cataname _lhsIprefix nt_) [arg]+ rhs = App "Data.IntMap.foldWithKey" [entry,nil,rarg]+ in [Decl lhs rhs Set.empty Set.empty]+ CommonTypes.Tuple tps ->+ let con = semname _lhsIprefix nt_ (identifier "Tuple")+ tps' = [ (SimpleExpr (getName x),y) | (x,y) <- tps]+ rargs = map rarg tps'+ rarg (n, tp) = case tp of+ NT t _ _ -> let t' = maybe t id (deforestedNt t)+ in App (cataname _lhsIprefix t') [n]+ _ -> n+ lhs = Fun (cataname _lhsIprefix nt_) [TupleExpr (map fst tps')]+ rhs = App con rargs+ in [Decl lhs rhs Set.empty Set.empty]+ _ -> error "TODO"+ in Comment "cata" :+ (if _lhsIo_sig then [tSig] else []) +++ maybe _prodsIcataAlts special (lookup nt_ _lhsItypeSyns)+ {-# LINE 1013 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule74 #-}+ rule74 = \ ((_interIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->+ _interIsemDomUnfoldGath+ {-# INLINE rule75 #-}+ rule75 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule76 #-}+ rule76 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule77 #-}+ rule77 = \ _aroundMap ->+ _aroundMap+ {-# INLINE rule78 #-}+ rule78 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule79 #-}+ rule79 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule80 #-}+ rule80 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule81 #-}+ rule81 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule82 #-}+ rule82 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule83 #-}+ rule83 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule84 #-}+ rule84 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule85 #-}+ rule85 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule86 #-}+ rule86 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule87 #-}+ rule87 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule88 #-}+ rule88 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule89 #-}+ rule89 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule90 #-}+ rule90 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule91 #-}+ rule91 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule92 #-}+ rule92 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule93 #-}+ rule93 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule94 #-}+ rule94 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule95 #-}+ rule95 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule96 #-}+ rule96 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule97 #-}+ rule97 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule98 #-}+ rule98 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule99 #-}+ rule99 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule100 #-}+ rule100 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule101 #-}+ rule101 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule102 #-}+ rule102 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule103 #-}+ rule103 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule104 #-}+ rule104 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule105 #-}+ rule105 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule106 #-}+ rule106 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule107 #-}+ rule107 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule108 #-}+ rule108 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule109 #-}+ rule109 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule110 #-}+ rule110 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule111 #-}+ rule111 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule112 #-}+ rule112 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule113 #-}+ rule113 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule114 #-}+ rule114 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule115 #-}+ rule115 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule116 #-}+ rule116 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule117 #-}+ rule117 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule118 #-}+ rule118 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule119 #-}+ rule119 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule120 #-}+ rule120 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule121 #-}+ rule121 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix++-- CNonterminals -----------------------------------------------+-- wrapper+data Inh_CNonterminals = Inh_CNonterminals { allNts_Inh_CNonterminals :: (Set NontermIdent), allPragmas_Inh_CNonterminals :: (PragmaMap), aroundMap_Inh_CNonterminals :: (Map NontermIdent (Map ConstructorIdent (Set Identifier))), contextMap_Inh_CNonterminals :: (ContextMap), derivings_Inh_CNonterminals :: (Derivings), mergeMap_Inh_CNonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))), o_case_Inh_CNonterminals :: (Bool), o_cata_Inh_CNonterminals :: (Bool), o_clean_Inh_CNonterminals :: (Bool), o_costcentre_Inh_CNonterminals :: (Bool), o_data_Inh_CNonterminals :: (Maybe Bool), o_linePragmas_Inh_CNonterminals :: (Bool), o_monadic_Inh_CNonterminals :: (Bool), o_newtypes_Inh_CNonterminals :: (Bool), o_pretty_Inh_CNonterminals :: (Bool), o_rename_Inh_CNonterminals :: (Bool), o_sem_Inh_CNonterminals :: (Bool), o_sig_Inh_CNonterminals :: (Bool), o_splitsems_Inh_CNonterminals :: (Bool), o_strictwrap_Inh_CNonterminals :: (Bool), o_traces_Inh_CNonterminals :: (Bool), o_unbox_Inh_CNonterminals :: (Bool), options_Inh_CNonterminals :: (Options), paramMap_Inh_CNonterminals :: (ParamMap), prefix_Inh_CNonterminals :: (String), quantMap_Inh_CNonterminals :: (QuantMap), typeSyns_Inh_CNonterminals :: (TypeSyns), unfoldSemDom_Inh_CNonterminals :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CNonterminals :: (Bool), wrappers_Inh_CNonterminals :: (Set NontermIdent) }+data Syn_CNonterminals = Syn_CNonterminals { chunks_Syn_CNonterminals :: (Chunks), gathNts_Syn_CNonterminals :: (Set NontermIdent), semDomUnfoldGath_Syn_CNonterminals :: (Map (NontermIdent, Int) ([String], Code.Type)) }+{-# INLINABLE wrap_CNonterminals #-}+wrap_CNonterminals :: T_CNonterminals -> Inh_CNonterminals -> (Syn_CNonterminals )+wrap_CNonterminals (T_CNonterminals act) (Inh_CNonterminals _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CNonterminals_vIn10 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ (T_CNonterminals_vOut10 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath) <- return (inv_CNonterminals_s11 sem arg)+ return (Syn_CNonterminals _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath)+ )++-- cata+{-# NOINLINE sem_CNonterminals #-}+sem_CNonterminals :: CNonterminals -> T_CNonterminals +sem_CNonterminals list = Prelude.foldr sem_CNonterminals_Cons sem_CNonterminals_Nil (Prelude.map sem_CNonterminal list)++-- semantic domain+newtype T_CNonterminals = T_CNonterminals {+ attach_T_CNonterminals :: Identity (T_CNonterminals_s11 )+ }+newtype T_CNonterminals_s11 = C_CNonterminals_s11 {+ inv_CNonterminals_s11 :: (T_CNonterminals_v10 )+ }+data T_CNonterminals_s12 = C_CNonterminals_s12+type T_CNonterminals_v10 = (T_CNonterminals_vIn10 ) -> (T_CNonterminals_vOut10 )+data T_CNonterminals_vIn10 = T_CNonterminals_vIn10 (Set NontermIdent) (PragmaMap) (Map NontermIdent (Map ConstructorIdent (Set Identifier))) (ContextMap) (Derivings) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (TypeSyns) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)+data T_CNonterminals_vOut10 = T_CNonterminals_vOut10 (Chunks) (Set NontermIdent) (Map (NontermIdent, Int) ([String], Code.Type))+{-# NOINLINE sem_CNonterminals_Cons #-}+sem_CNonterminals_Cons :: T_CNonterminal -> T_CNonterminals -> T_CNonterminals +sem_CNonterminals_Cons arg_hd_ arg_tl_ = T_CNonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_CNonterminals_v10 + v10 = \ (T_CNonterminals_vIn10 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let+ _hdX8 = Control.Monad.Identity.runIdentity (attach_T_CNonterminal (arg_hd_))+ _tlX11 = Control.Monad.Identity.runIdentity (attach_T_CNonterminals (arg_tl_))+ (T_CNonterminal_vOut7 _hdIchunks _hdIgathNts _hdIsemDomUnfoldGath) = inv_CNonterminal_s8 _hdX8 (T_CNonterminal_vIn7 _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOderivings _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_clean _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOtypeSyns _hdOunfoldSemDom _hdOwith_sig _hdOwrappers)+ (T_CNonterminals_vOut10 _tlIchunks _tlIgathNts _tlIsemDomUnfoldGath) = inv_CNonterminals_s11 _tlX11 (T_CNonterminals_vIn10 _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOderivings _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_clean _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOtypeSyns _tlOunfoldSemDom _tlOwith_sig _tlOwrappers)+ _lhsOchunks :: Chunks+ _lhsOchunks = rule122 _hdIchunks _tlIchunks+ _lhsOgathNts :: Set NontermIdent+ _lhsOgathNts = rule123 _hdIgathNts _tlIgathNts+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule124 _hdIsemDomUnfoldGath _tlIsemDomUnfoldGath+ _hdOallNts = rule125 _lhsIallNts+ _hdOallPragmas = rule126 _lhsIallPragmas+ _hdOaroundMap = rule127 _lhsIaroundMap+ _hdOcontextMap = rule128 _lhsIcontextMap+ _hdOderivings = rule129 _lhsIderivings+ _hdOmergeMap = rule130 _lhsImergeMap+ _hdOo_case = rule131 _lhsIo_case+ _hdOo_cata = rule132 _lhsIo_cata+ _hdOo_clean = rule133 _lhsIo_clean+ _hdOo_costcentre = rule134 _lhsIo_costcentre+ _hdOo_data = rule135 _lhsIo_data+ _hdOo_linePragmas = rule136 _lhsIo_linePragmas+ _hdOo_monadic = rule137 _lhsIo_monadic+ _hdOo_newtypes = rule138 _lhsIo_newtypes+ _hdOo_pretty = rule139 _lhsIo_pretty+ _hdOo_rename = rule140 _lhsIo_rename+ _hdOo_sem = rule141 _lhsIo_sem+ _hdOo_sig = rule142 _lhsIo_sig+ _hdOo_splitsems = rule143 _lhsIo_splitsems+ _hdOo_strictwrap = rule144 _lhsIo_strictwrap+ _hdOo_traces = rule145 _lhsIo_traces+ _hdOo_unbox = rule146 _lhsIo_unbox+ _hdOoptions = rule147 _lhsIoptions+ _hdOparamMap = rule148 _lhsIparamMap+ _hdOprefix = rule149 _lhsIprefix+ _hdOquantMap = rule150 _lhsIquantMap+ _hdOtypeSyns = rule151 _lhsItypeSyns+ _hdOunfoldSemDom = rule152 _lhsIunfoldSemDom+ _hdOwith_sig = rule153 _lhsIwith_sig+ _hdOwrappers = rule154 _lhsIwrappers+ _tlOallNts = rule155 _lhsIallNts+ _tlOallPragmas = rule156 _lhsIallPragmas+ _tlOaroundMap = rule157 _lhsIaroundMap+ _tlOcontextMap = rule158 _lhsIcontextMap+ _tlOderivings = rule159 _lhsIderivings+ _tlOmergeMap = rule160 _lhsImergeMap+ _tlOo_case = rule161 _lhsIo_case+ _tlOo_cata = rule162 _lhsIo_cata+ _tlOo_clean = rule163 _lhsIo_clean+ _tlOo_costcentre = rule164 _lhsIo_costcentre+ _tlOo_data = rule165 _lhsIo_data+ _tlOo_linePragmas = rule166 _lhsIo_linePragmas+ _tlOo_monadic = rule167 _lhsIo_monadic+ _tlOo_newtypes = rule168 _lhsIo_newtypes+ _tlOo_pretty = rule169 _lhsIo_pretty+ _tlOo_rename = rule170 _lhsIo_rename+ _tlOo_sem = rule171 _lhsIo_sem+ _tlOo_sig = rule172 _lhsIo_sig+ _tlOo_splitsems = rule173 _lhsIo_splitsems+ _tlOo_strictwrap = rule174 _lhsIo_strictwrap+ _tlOo_traces = rule175 _lhsIo_traces+ _tlOo_unbox = rule176 _lhsIo_unbox+ _tlOoptions = rule177 _lhsIoptions+ _tlOparamMap = rule178 _lhsIparamMap+ _tlOprefix = rule179 _lhsIprefix+ _tlOquantMap = rule180 _lhsIquantMap+ _tlOtypeSyns = rule181 _lhsItypeSyns+ _tlOunfoldSemDom = rule182 _lhsIunfoldSemDom+ _tlOwith_sig = rule183 _lhsIwith_sig+ _tlOwrappers = rule184 _lhsIwrappers+ __result_ = T_CNonterminals_vOut10 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath+ in __result_ )+ in C_CNonterminals_s11 v10+ {-# INLINE rule122 #-}+ rule122 = \ ((_hdIchunks) :: Chunks) ((_tlIchunks) :: Chunks) ->+ _hdIchunks ++ _tlIchunks+ {-# INLINE rule123 #-}+ rule123 = \ ((_hdIgathNts) :: Set NontermIdent) ((_tlIgathNts) :: Set NontermIdent) ->+ _hdIgathNts `Set.union` _tlIgathNts+ {-# INLINE rule124 #-}+ rule124 = \ ((_hdIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ((_tlIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->+ _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+ {-# INLINE rule125 #-}+ rule125 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule126 #-}+ rule126 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule127 #-}+ rule127 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->+ _lhsIaroundMap+ {-# INLINE rule128 #-}+ rule128 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule129 #-}+ rule129 = \ ((_lhsIderivings) :: Derivings) ->+ _lhsIderivings+ {-# INLINE rule130 #-}+ rule130 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->+ _lhsImergeMap+ {-# INLINE rule131 #-}+ rule131 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule132 #-}+ rule132 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule133 #-}+ rule133 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule134 #-}+ rule134 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule135 #-}+ rule135 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule136 #-}+ rule136 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule137 #-}+ rule137 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule138 #-}+ rule138 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule139 #-}+ rule139 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule140 #-}+ rule140 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule141 #-}+ rule141 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule142 #-}+ rule142 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule143 #-}+ rule143 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule144 #-}+ rule144 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule145 #-}+ rule145 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule146 #-}+ rule146 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule147 #-}+ rule147 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule148 #-}+ rule148 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule149 #-}+ rule149 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule150 #-}+ rule150 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule151 #-}+ rule151 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule152 #-}+ rule152 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule153 #-}+ rule153 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule154 #-}+ rule154 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule155 #-}+ rule155 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule156 #-}+ rule156 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule157 #-}+ rule157 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Set Identifier))) ->+ _lhsIaroundMap+ {-# INLINE rule158 #-}+ rule158 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule159 #-}+ rule159 = \ ((_lhsIderivings) :: Derivings) ->+ _lhsIderivings+ {-# INLINE rule160 #-}+ rule160 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier])))) ->+ _lhsImergeMap+ {-# INLINE rule161 #-}+ rule161 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule162 #-}+ rule162 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule163 #-}+ rule163 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule164 #-}+ rule164 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule165 #-}+ rule165 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule166 #-}+ rule166 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule167 #-}+ rule167 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule168 #-}+ rule168 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule169 #-}+ rule169 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule170 #-}+ rule170 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule171 #-}+ rule171 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule172 #-}+ rule172 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule173 #-}+ rule173 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule174 #-}+ rule174 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule175 #-}+ rule175 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule176 #-}+ rule176 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule177 #-}+ rule177 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule178 #-}+ rule178 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule179 #-}+ rule179 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule180 #-}+ rule180 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule181 #-}+ rule181 = \ ((_lhsItypeSyns) :: TypeSyns) ->+ _lhsItypeSyns+ {-# INLINE rule182 #-}+ rule182 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule183 #-}+ rule183 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule184 #-}+ rule184 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_CNonterminals_Nil #-}+sem_CNonterminals_Nil :: T_CNonterminals +sem_CNonterminals_Nil = T_CNonterminals (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_CNonterminals_v10 + v10 = \ (T_CNonterminals_vIn10 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIderivings _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsItypeSyns _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let+ _lhsOchunks :: Chunks+ _lhsOchunks = rule185 ()+ _lhsOgathNts :: Set NontermIdent+ _lhsOgathNts = rule186 ()+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule187 ()+ __result_ = T_CNonterminals_vOut10 _lhsOchunks _lhsOgathNts _lhsOsemDomUnfoldGath+ in __result_ )+ in C_CNonterminals_s11 v10+ {-# INLINE rule185 #-}+ rule185 = \ (_ :: ()) ->+ []+ {-# INLINE rule186 #-}+ rule186 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule187 #-}+ rule187 = \ (_ :: ()) ->+ Map.empty++-- CProduction -------------------------------------------------+-- wrapper+data Inh_CProduction = Inh_CProduction { allNts_Inh_CProduction :: (Set NontermIdent), allPragmas_Inh_CProduction :: (PragmaMap), aroundMap_Inh_CProduction :: (Map ConstructorIdent (Set Identifier)), contextMap_Inh_CProduction :: (ContextMap), inh_Inh_CProduction :: (Attributes), mergeMap_Inh_CProduction :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))), nt_Inh_CProduction :: (NontermIdent), o_case_Inh_CProduction :: (Bool), o_cata_Inh_CProduction :: (Bool), o_clean_Inh_CProduction :: (Bool), o_costcentre_Inh_CProduction :: (Bool), o_data_Inh_CProduction :: (Maybe Bool), o_linePragmas_Inh_CProduction :: (Bool), o_monadic_Inh_CProduction :: (Bool), o_newtypes_Inh_CProduction :: (Bool), o_pretty_Inh_CProduction :: (Bool), o_rename_Inh_CProduction :: (Bool), o_sem_Inh_CProduction :: (Bool), o_sig_Inh_CProduction :: (Bool), o_splitsems_Inh_CProduction :: (Bool), o_strictwrap_Inh_CProduction :: (Bool), o_traces_Inh_CProduction :: (Bool), o_unbox_Inh_CProduction :: (Bool), options_Inh_CProduction :: (Options), paramMap_Inh_CProduction :: (ParamMap), prefix_Inh_CProduction :: (String), quantMap_Inh_CProduction :: (QuantMap), syn_Inh_CProduction :: (Attributes), unfoldSemDom_Inh_CProduction :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CProduction :: (Bool), wrappers_Inh_CProduction :: (Set NontermIdent) }+data Syn_CProduction = Syn_CProduction { cataAlt_Syn_CProduction :: (Decl), comments_Syn_CProduction :: ([String]), dataAlt_Syn_CProduction :: (DataAlt), decls_Syn_CProduction :: (Decls), semNames_Syn_CProduction :: ([String]) }+{-# INLINABLE wrap_CProduction #-}+wrap_CProduction :: T_CProduction -> Inh_CProduction -> (Syn_CProduction )+wrap_CProduction (T_CProduction act) (Inh_CProduction _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CProduction_vIn13 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ (T_CProduction_vOut13 _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames) <- return (inv_CProduction_s14 sem arg)+ return (Syn_CProduction _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames)+ )++-- cata+{-# INLINE sem_CProduction #-}+sem_CProduction :: CProduction -> T_CProduction +sem_CProduction ( CProduction con_ visits_ children_ terminals_ ) = sem_CProduction_CProduction con_ ( sem_CVisits visits_ ) children_ terminals_++-- semantic domain+newtype T_CProduction = T_CProduction {+ attach_T_CProduction :: Identity (T_CProduction_s14 )+ }+newtype T_CProduction_s14 = C_CProduction_s14 {+ inv_CProduction_s14 :: (T_CProduction_v13 )+ }+data T_CProduction_s15 = C_CProduction_s15+type T_CProduction_v13 = (T_CProduction_vIn13 ) -> (T_CProduction_vOut13 )+data T_CProduction_vIn13 = T_CProduction_vIn13 (Set NontermIdent) (PragmaMap) (Map ConstructorIdent (Set Identifier)) (ContextMap) (Attributes) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (Attributes) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)+data T_CProduction_vOut13 = T_CProduction_vOut13 (Decl) ([String]) (DataAlt) (Decls) ([String])+{-# NOINLINE sem_CProduction_CProduction #-}+sem_CProduction_CProduction :: (ConstructorIdent) -> T_CVisits -> ([(Identifier,Type,ChildKind)]) -> ([Identifier]) -> T_CProduction +sem_CProduction_CProduction arg_con_ arg_visits_ arg_children_ arg_terminals_ = T_CProduction (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_CProduction_v13 + v13 = \ (T_CProduction_vIn13 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let+ _visitsX32 = Control.Monad.Identity.runIdentity (attach_T_CVisits (arg_visits_))+ (T_CVisits_vOut31 _visitsIcomments _visitsIdecls _visitsIgatherInstVisitNrs _visitsIintra _visitsIintraVars _visitsIisNil _visitsIsemNames _visitsIvisitedSet) = inv_CVisits_s32 _visitsX32 (T_CVisits_vIn31 _visitsOallNts _visitsOallPragmas _visitsOaroundMap _visitsOchildren _visitsOcon _visitsOcontextMap _visitsOinh _visitsOinstVisitNrs _visitsOmergeMap _visitsOnr _visitsOnt _visitsOo_case _visitsOo_cata _visitsOo_clean _visitsOo_costcentre _visitsOo_data _visitsOo_linePragmas _visitsOo_monadic _visitsOo_newtypes _visitsOo_pretty _visitsOo_rename _visitsOo_sem _visitsOo_sig _visitsOo_splitsems _visitsOo_strictwrap _visitsOo_traces _visitsOo_unbox _visitsOoptions _visitsOparamInstMap _visitsOparamMap _visitsOprefix _visitsOquantMap _visitsOsyn _visitsOterminals _visitsOunfoldSemDom _visitsOvisitedSet _visitsOwith_sig _visitsOwrappers)+ _visitsOcon = rule188 arg_con_+ _visitsOterminals = rule189 arg_terminals_+ _paramInstMap = rule190 _lhsIoptions arg_children_+ _visitsOvisitedSet = rule191 ()+ _visitsOnr = rule192 ()+ _visitsOchildren = rule193 arg_children_+ _visitsOinstVisitNrs = rule194 _visitsIgatherInstVisitNrs+ _aroundMap = rule195 _lhsIaroundMap arg_con_+ _mergeMap = rule196 _lhsImergeMap arg_con_+ _firstOrderChildren = rule197 arg_children_+ _lhsOcomments :: [String]+ _lhsOcomments = rule198 _firstOrderChildren _visitsIcomments arg_con_+ _params = rule199 _lhsInt _lhsIparamMap+ _lhsOdataAlt :: DataAlt+ _lhsOdataAlt = rule200 _firstOrderChildren _lhsInt _lhsIo_rename _lhsIoptions _params arg_con_+ _lhsOcataAlt :: Decl+ _lhsOcataAlt = rule201 _firstOrderChildren _lhsInt _lhsIo_rename _lhsIoptions _lhsIprefix arg_con_+ _lhsOdecls :: Decls+ _lhsOdecls = rule202 _visitsIdecls+ _lhsOsemNames :: [String]+ _lhsOsemNames = rule203 _visitsIsemNames+ _visitsOallNts = rule204 _lhsIallNts+ _visitsOallPragmas = rule205 _lhsIallPragmas+ _visitsOaroundMap = rule206 _aroundMap+ _visitsOcontextMap = rule207 _lhsIcontextMap+ _visitsOinh = rule208 _lhsIinh+ _visitsOmergeMap = rule209 _mergeMap+ _visitsOnt = rule210 _lhsInt+ _visitsOo_case = rule211 _lhsIo_case+ _visitsOo_cata = rule212 _lhsIo_cata+ _visitsOo_clean = rule213 _lhsIo_clean+ _visitsOo_costcentre = rule214 _lhsIo_costcentre+ _visitsOo_data = rule215 _lhsIo_data+ _visitsOo_linePragmas = rule216 _lhsIo_linePragmas+ _visitsOo_monadic = rule217 _lhsIo_monadic+ _visitsOo_newtypes = rule218 _lhsIo_newtypes+ _visitsOo_pretty = rule219 _lhsIo_pretty+ _visitsOo_rename = rule220 _lhsIo_rename+ _visitsOo_sem = rule221 _lhsIo_sem+ _visitsOo_sig = rule222 _lhsIo_sig+ _visitsOo_splitsems = rule223 _lhsIo_splitsems+ _visitsOo_strictwrap = rule224 _lhsIo_strictwrap+ _visitsOo_traces = rule225 _lhsIo_traces+ _visitsOo_unbox = rule226 _lhsIo_unbox+ _visitsOoptions = rule227 _lhsIoptions+ _visitsOparamInstMap = rule228 _paramInstMap+ _visitsOparamMap = rule229 _lhsIparamMap+ _visitsOprefix = rule230 _lhsIprefix+ _visitsOquantMap = rule231 _lhsIquantMap+ _visitsOsyn = rule232 _lhsIsyn+ _visitsOunfoldSemDom = rule233 _lhsIunfoldSemDom+ _visitsOwith_sig = rule234 _lhsIwith_sig+ _visitsOwrappers = rule235 _lhsIwrappers+ __result_ = T_CProduction_vOut13 _lhsOcataAlt _lhsOcomments _lhsOdataAlt _lhsOdecls _lhsOsemNames+ in __result_ )+ in C_CProduction_s14 v13+ {-# INLINE rule188 #-}+ {-# LINE 92 "./src-ag/GenerateCode.ag" #-}+ rule188 = \ con_ ->+ {-# LINE 92 "./src-ag/GenerateCode.ag" #-}+ con_+ {-# LINE 1584 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule189 #-}+ {-# LINE 93 "./src-ag/GenerateCode.ag" #-}+ rule189 = \ terminals_ ->+ {-# LINE 93 "./src-ag/GenerateCode.ag" #-}+ terminals_+ {-# LINE 1590 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule190 #-}+ {-# LINE 105 "./src-ag/GenerateCode.ag" #-}+ rule190 = \ ((_lhsIoptions) :: Options) children_ ->+ {-# LINE 105 "./src-ag/GenerateCode.ag" #-}+ Map.fromList [(nm, (extractNonterminal tp, tps)) | (nm,tp,_) <- children_, let tps = map (cleanupArg _lhsIoptions) $ nontermArgs tp, not (null tps) ]+ {-# LINE 1596 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule191 #-}+ {-# LINE 147 "./src-ag/GenerateCode.ag" #-}+ rule191 = \ (_ :: ()) ->+ {-# LINE 147 "./src-ag/GenerateCode.ag" #-}+ Set.empty+ {-# LINE 1602 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule192 #-}+ {-# LINE 282 "./src-ag/GenerateCode.ag" #-}+ rule192 = \ (_ :: ()) ->+ {-# LINE 282 "./src-ag/GenerateCode.ag" #-}+ 0+ {-# LINE 1608 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule193 #-}+ {-# LINE 414 "./src-ag/GenerateCode.ag" #-}+ rule193 = \ children_ ->+ {-# LINE 414 "./src-ag/GenerateCode.ag" #-}+ children_+ {-# LINE 1614 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule194 #-}+ {-# LINE 569 "./src-ag/GenerateCode.ag" #-}+ rule194 = \ ((_visitsIgatherInstVisitNrs) :: Map Identifier Int) ->+ {-# LINE 569 "./src-ag/GenerateCode.ag" #-}+ _visitsIgatherInstVisitNrs+ {-# LINE 1620 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule195 #-}+ {-# LINE 589 "./src-ag/GenerateCode.ag" #-}+ rule195 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) con_ ->+ {-# LINE 589 "./src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Set.empty con_ _lhsIaroundMap+ {-# LINE 1626 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule196 #-}+ {-# LINE 605 "./src-ag/GenerateCode.ag" #-}+ rule196 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) con_ ->+ {-# LINE 605 "./src-ag/GenerateCode.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 1632 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule197 #-}+ {-# LINE 885 "./src-ag/GenerateCode.ag" #-}+ rule197 = \ children_ ->+ {-# LINE 885 "./src-ag/GenerateCode.ag" #-}+ [ (nm,fromJust mb,virt) | (nm,tp,virt) <- children_, let mb = isFirstOrder virt tp, isJust mb ]+ {-# LINE 1638 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule198 #-}+ {-# LINE 886 "./src-ag/GenerateCode.ag" #-}+ rule198 = \ _firstOrderChildren ((_visitsIcomments) :: [String]) con_ ->+ {-# LINE 886 "./src-ag/GenerateCode.ag" #-}+ ("alternative " ++ getName con_ ++ ":")+ : map ind ( map (\(x,y,_) -> makeLocalComment 14 "child" x (Just y)) _firstOrderChildren+ ++ _visitsIcomments+ )+ {-# LINE 1647 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule199 #-}+ {-# LINE 1028 "./src-ag/GenerateCode.ag" #-}+ rule199 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->+ {-# LINE 1028 "./src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 1653 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule200 #-}+ {-# LINE 1029 "./src-ag/GenerateCode.ag" #-}+ rule200 = \ _firstOrderChildren ((_lhsInt) :: NontermIdent) ((_lhsIo_rename) :: Bool) ((_lhsIoptions) :: Options) _params con_ ->+ {-# LINE 1029 "./src-ag/GenerateCode.ag" #-}+ let conNm = conname _lhsIo_rename _lhsInt con_+ mkFields :: (NontermIdent -> ConstructorIdent -> Identifier -> Code.Type -> a) -> [a]+ mkFields f = map (\(nm,t,_) -> f _lhsInt con_ nm (typeToCodeType (Just _lhsInt) _params $ removeDeforested t)) _firstOrderChildren+ in if dataRecords _lhsIoptions+ then Record conNm $ mkFields $ toNamedType (strictData _lhsIoptions)+ else DataAlt conNm $ mkFields $ \_ _ _ t -> t+ {-# LINE 1664 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule201 #-}+ {-# LINE 1142 "./src-ag/GenerateCode.ag" #-}+ rule201 = \ _firstOrderChildren ((_lhsInt) :: NontermIdent) ((_lhsIo_rename) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIprefix) :: String) con_ ->+ {-# LINE 1142 "./src-ag/GenerateCode.ag" #-}+ let lhs = Fun (cataname _lhsIprefix _lhsInt) [lhs_pat]+ lhs_pat = App (conname _lhsIo_rename _lhsInt con_)+ (map (\(n,_,_) -> SimpleExpr $ locname _lhsIoptions $ n) _firstOrderChildren )+ rhs = App (semname _lhsIprefix _lhsInt con_)+ (map argument _firstOrderChildren )+ argument (nm,NT tp _ _,_) = App (cataname _lhsIprefix tp)+ [SimpleExpr (locname _lhsIoptions nm)]+ argument (nm, _,_) = SimpleExpr (locname _lhsIoptions nm)+ in Decl lhs rhs Set.empty Set.empty+ {-# LINE 1678 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule202 #-}+ rule202 = \ ((_visitsIdecls) :: Decls) ->+ _visitsIdecls+ {-# INLINE rule203 #-}+ rule203 = \ ((_visitsIsemNames) :: [String]) ->+ _visitsIsemNames+ {-# INLINE rule204 #-}+ rule204 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule205 #-}+ rule205 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule206 #-}+ rule206 = \ _aroundMap ->+ _aroundMap+ {-# INLINE rule207 #-}+ rule207 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule208 #-}+ rule208 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule209 #-}+ rule209 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule210 #-}+ rule210 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule211 #-}+ rule211 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule212 #-}+ rule212 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule213 #-}+ rule213 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule214 #-}+ rule214 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule215 #-}+ rule215 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule216 #-}+ rule216 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule217 #-}+ rule217 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule218 #-}+ rule218 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule219 #-}+ rule219 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule220 #-}+ rule220 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule221 #-}+ rule221 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule222 #-}+ rule222 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule223 #-}+ rule223 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule224 #-}+ rule224 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule225 #-}+ rule225 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule226 #-}+ rule226 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule227 #-}+ rule227 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule228 #-}+ rule228 = \ _paramInstMap ->+ _paramInstMap+ {-# INLINE rule229 #-}+ rule229 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule230 #-}+ rule230 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule231 #-}+ rule231 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule232 #-}+ rule232 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule233 #-}+ rule233 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule234 #-}+ rule234 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule235 #-}+ rule235 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers++-- CProductions ------------------------------------------------+-- wrapper+data Inh_CProductions = Inh_CProductions { allNts_Inh_CProductions :: (Set NontermIdent), allPragmas_Inh_CProductions :: (PragmaMap), aroundMap_Inh_CProductions :: (Map ConstructorIdent (Set Identifier)), contextMap_Inh_CProductions :: (ContextMap), inh_Inh_CProductions :: (Attributes), mergeMap_Inh_CProductions :: (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))), nt_Inh_CProductions :: (NontermIdent), o_case_Inh_CProductions :: (Bool), o_cata_Inh_CProductions :: (Bool), o_clean_Inh_CProductions :: (Bool), o_costcentre_Inh_CProductions :: (Bool), o_data_Inh_CProductions :: (Maybe Bool), o_linePragmas_Inh_CProductions :: (Bool), o_monadic_Inh_CProductions :: (Bool), o_newtypes_Inh_CProductions :: (Bool), o_pretty_Inh_CProductions :: (Bool), o_rename_Inh_CProductions :: (Bool), o_sem_Inh_CProductions :: (Bool), o_sig_Inh_CProductions :: (Bool), o_splitsems_Inh_CProductions :: (Bool), o_strictwrap_Inh_CProductions :: (Bool), o_traces_Inh_CProductions :: (Bool), o_unbox_Inh_CProductions :: (Bool), options_Inh_CProductions :: (Options), paramMap_Inh_CProductions :: (ParamMap), prefix_Inh_CProductions :: (String), quantMap_Inh_CProductions :: (QuantMap), syn_Inh_CProductions :: (Attributes), unfoldSemDom_Inh_CProductions :: (NontermIdent -> Int -> [String] -> Code.Type), with_sig_Inh_CProductions :: (Bool), wrappers_Inh_CProductions :: (Set NontermIdent) }+data Syn_CProductions = Syn_CProductions { cataAlts_Syn_CProductions :: (Decls), comments_Syn_CProductions :: ([String]), dataAlts_Syn_CProductions :: (DataAlts), decls_Syn_CProductions :: (Decls), semNames_Syn_CProductions :: ([String]) }+{-# INLINABLE wrap_CProductions #-}+wrap_CProductions :: T_CProductions -> Inh_CProductions -> (Syn_CProductions )+wrap_CProductions (T_CProductions act) (Inh_CProductions _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CProductions_vIn16 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers+ (T_CProductions_vOut16 _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames) <- return (inv_CProductions_s17 sem arg)+ return (Syn_CProductions _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames)+ )++-- cata+{-# NOINLINE sem_CProductions #-}+sem_CProductions :: CProductions -> T_CProductions +sem_CProductions list = Prelude.foldr sem_CProductions_Cons sem_CProductions_Nil (Prelude.map sem_CProduction list)++-- semantic domain+newtype T_CProductions = T_CProductions {+ attach_T_CProductions :: Identity (T_CProductions_s17 )+ }+newtype T_CProductions_s17 = C_CProductions_s17 {+ inv_CProductions_s17 :: (T_CProductions_v16 )+ }+data T_CProductions_s18 = C_CProductions_s18+type T_CProductions_v16 = (T_CProductions_vIn16 ) -> (T_CProductions_vOut16 )+data T_CProductions_vIn16 = T_CProductions_vIn16 (Set NontermIdent) (PragmaMap) (Map ConstructorIdent (Set Identifier)) (ContextMap) (Attributes) (Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (QuantMap) (Attributes) (NontermIdent -> Int -> [String] -> Code.Type) (Bool) (Set NontermIdent)+data T_CProductions_vOut16 = T_CProductions_vOut16 (Decls) ([String]) (DataAlts) (Decls) ([String])+{-# NOINLINE sem_CProductions_Cons #-}+sem_CProductions_Cons :: T_CProduction -> T_CProductions -> T_CProductions +sem_CProductions_Cons arg_hd_ arg_tl_ = T_CProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_CProductions_v16 + v16 = \ (T_CProductions_vIn16 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let+ _hdX14 = Control.Monad.Identity.runIdentity (attach_T_CProduction (arg_hd_))+ _tlX17 = Control.Monad.Identity.runIdentity (attach_T_CProductions (arg_tl_))+ (T_CProduction_vOut13 _hdIcataAlt _hdIcomments _hdIdataAlt _hdIdecls _hdIsemNames) = inv_CProduction_s14 _hdX14 (T_CProduction_vIn13 _hdOallNts _hdOallPragmas _hdOaroundMap _hdOcontextMap _hdOinh _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_clean _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOunfoldSemDom _hdOwith_sig _hdOwrappers)+ (T_CProductions_vOut16 _tlIcataAlts _tlIcomments _tlIdataAlts _tlIdecls _tlIsemNames) = inv_CProductions_s17 _tlX17 (T_CProductions_vIn16 _tlOallNts _tlOallPragmas _tlOaroundMap _tlOcontextMap _tlOinh _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_clean _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOunfoldSemDom _tlOwith_sig _tlOwrappers)+ _lhsOdataAlts :: DataAlts+ _lhsOdataAlts = rule236 _hdIdataAlt _tlIdataAlts+ _lhsOcataAlts :: Decls+ _lhsOcataAlts = rule237 _hdIcataAlt _tlIcataAlts+ _lhsOcomments :: [String]+ _lhsOcomments = rule238 _hdIcomments _tlIcomments+ _lhsOdecls :: Decls+ _lhsOdecls = rule239 _hdIdecls _tlIdecls+ _lhsOsemNames :: [String]+ _lhsOsemNames = rule240 _hdIsemNames _tlIsemNames+ _hdOallNts = rule241 _lhsIallNts+ _hdOallPragmas = rule242 _lhsIallPragmas+ _hdOaroundMap = rule243 _lhsIaroundMap+ _hdOcontextMap = rule244 _lhsIcontextMap+ _hdOinh = rule245 _lhsIinh+ _hdOmergeMap = rule246 _lhsImergeMap+ _hdOnt = rule247 _lhsInt+ _hdOo_case = rule248 _lhsIo_case+ _hdOo_cata = rule249 _lhsIo_cata+ _hdOo_clean = rule250 _lhsIo_clean+ _hdOo_costcentre = rule251 _lhsIo_costcentre+ _hdOo_data = rule252 _lhsIo_data+ _hdOo_linePragmas = rule253 _lhsIo_linePragmas+ _hdOo_monadic = rule254 _lhsIo_monadic+ _hdOo_newtypes = rule255 _lhsIo_newtypes+ _hdOo_pretty = rule256 _lhsIo_pretty+ _hdOo_rename = rule257 _lhsIo_rename+ _hdOo_sem = rule258 _lhsIo_sem+ _hdOo_sig = rule259 _lhsIo_sig+ _hdOo_splitsems = rule260 _lhsIo_splitsems+ _hdOo_strictwrap = rule261 _lhsIo_strictwrap+ _hdOo_traces = rule262 _lhsIo_traces+ _hdOo_unbox = rule263 _lhsIo_unbox+ _hdOoptions = rule264 _lhsIoptions+ _hdOparamMap = rule265 _lhsIparamMap+ _hdOprefix = rule266 _lhsIprefix+ _hdOquantMap = rule267 _lhsIquantMap+ _hdOsyn = rule268 _lhsIsyn+ _hdOunfoldSemDom = rule269 _lhsIunfoldSemDom+ _hdOwith_sig = rule270 _lhsIwith_sig+ _hdOwrappers = rule271 _lhsIwrappers+ _tlOallNts = rule272 _lhsIallNts+ _tlOallPragmas = rule273 _lhsIallPragmas+ _tlOaroundMap = rule274 _lhsIaroundMap+ _tlOcontextMap = rule275 _lhsIcontextMap+ _tlOinh = rule276 _lhsIinh+ _tlOmergeMap = rule277 _lhsImergeMap+ _tlOnt = rule278 _lhsInt+ _tlOo_case = rule279 _lhsIo_case+ _tlOo_cata = rule280 _lhsIo_cata+ _tlOo_clean = rule281 _lhsIo_clean+ _tlOo_costcentre = rule282 _lhsIo_costcentre+ _tlOo_data = rule283 _lhsIo_data+ _tlOo_linePragmas = rule284 _lhsIo_linePragmas+ _tlOo_monadic = rule285 _lhsIo_monadic+ _tlOo_newtypes = rule286 _lhsIo_newtypes+ _tlOo_pretty = rule287 _lhsIo_pretty+ _tlOo_rename = rule288 _lhsIo_rename+ _tlOo_sem = rule289 _lhsIo_sem+ _tlOo_sig = rule290 _lhsIo_sig+ _tlOo_splitsems = rule291 _lhsIo_splitsems+ _tlOo_strictwrap = rule292 _lhsIo_strictwrap+ _tlOo_traces = rule293 _lhsIo_traces+ _tlOo_unbox = rule294 _lhsIo_unbox+ _tlOoptions = rule295 _lhsIoptions+ _tlOparamMap = rule296 _lhsIparamMap+ _tlOprefix = rule297 _lhsIprefix+ _tlOquantMap = rule298 _lhsIquantMap+ _tlOsyn = rule299 _lhsIsyn+ _tlOunfoldSemDom = rule300 _lhsIunfoldSemDom+ _tlOwith_sig = rule301 _lhsIwith_sig+ _tlOwrappers = rule302 _lhsIwrappers+ __result_ = T_CProductions_vOut16 _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames+ in __result_ )+ in C_CProductions_s17 v16+ {-# INLINE rule236 #-}+ {-# LINE 1024 "./src-ag/GenerateCode.ag" #-}+ rule236 = \ ((_hdIdataAlt) :: DataAlt) ((_tlIdataAlts) :: DataAlts) ->+ {-# LINE 1024 "./src-ag/GenerateCode.ag" #-}+ _hdIdataAlt : _tlIdataAlts+ {-# LINE 1903 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule237 #-}+ {-# LINE 1138 "./src-ag/GenerateCode.ag" #-}+ rule237 = \ ((_hdIcataAlt) :: Decl) ((_tlIcataAlts) :: Decls) ->+ {-# LINE 1138 "./src-ag/GenerateCode.ag" #-}+ _hdIcataAlt : _tlIcataAlts+ {-# LINE 1909 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule238 #-}+ rule238 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->+ _hdIcomments ++ _tlIcomments+ {-# INLINE rule239 #-}+ rule239 = \ ((_hdIdecls) :: Decls) ((_tlIdecls) :: Decls) ->+ _hdIdecls ++ _tlIdecls+ {-# INLINE rule240 #-}+ rule240 = \ ((_hdIsemNames) :: [String]) ((_tlIsemNames) :: [String]) ->+ _hdIsemNames ++ _tlIsemNames+ {-# INLINE rule241 #-}+ rule241 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule242 #-}+ rule242 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule243 #-}+ rule243 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) ->+ _lhsIaroundMap+ {-# INLINE rule244 #-}+ rule244 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule245 #-}+ rule245 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule246 #-}+ rule246 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->+ _lhsImergeMap+ {-# INLINE rule247 #-}+ rule247 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule248 #-}+ rule248 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule249 #-}+ rule249 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule250 #-}+ rule250 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule251 #-}+ rule251 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule252 #-}+ rule252 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule253 #-}+ rule253 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule254 #-}+ rule254 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule255 #-}+ rule255 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule256 #-}+ rule256 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule257 #-}+ rule257 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule258 #-}+ rule258 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule259 #-}+ rule259 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule260 #-}+ rule260 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule261 #-}+ rule261 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule262 #-}+ rule262 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule263 #-}+ rule263 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule264 #-}+ rule264 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule265 #-}+ rule265 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule266 #-}+ rule266 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule267 #-}+ rule267 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule268 #-}+ rule268 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule269 #-}+ rule269 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule270 #-}+ rule270 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule271 #-}+ rule271 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule272 #-}+ rule272 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule273 #-}+ rule273 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule274 #-}+ rule274 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Set Identifier)) ->+ _lhsIaroundMap+ {-# INLINE rule275 #-}+ rule275 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule276 #-}+ rule276 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule277 #-}+ rule277 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier, [Identifier]))) ->+ _lhsImergeMap+ {-# INLINE rule278 #-}+ rule278 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule279 #-}+ rule279 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule280 #-}+ rule280 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule281 #-}+ rule281 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule282 #-}+ rule282 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule283 #-}+ rule283 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule284 #-}+ rule284 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule285 #-}+ rule285 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule286 #-}+ rule286 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule287 #-}+ rule287 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule288 #-}+ rule288 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule289 #-}+ rule289 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule290 #-}+ rule290 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule291 #-}+ rule291 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule292 #-}+ rule292 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule293 #-}+ rule293 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule294 #-}+ rule294 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule295 #-}+ rule295 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule296 #-}+ rule296 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule297 #-}+ rule297 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule298 #-}+ rule298 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule299 #-}+ rule299 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule300 #-}+ rule300 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule301 #-}+ rule301 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule302 #-}+ rule302 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_CProductions_Nil #-}+sem_CProductions_Nil :: T_CProductions +sem_CProductions_Nil = T_CProductions (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_CProductions_v16 + v16 = \ (T_CProductions_vIn16 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIcontextMap _lhsIinh _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIunfoldSemDom _lhsIwith_sig _lhsIwrappers) -> ( let+ _lhsOdataAlts :: DataAlts+ _lhsOdataAlts = rule303 ()+ _lhsOcataAlts :: Decls+ _lhsOcataAlts = rule304 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule305 ()+ _lhsOdecls :: Decls+ _lhsOdecls = rule306 ()+ _lhsOsemNames :: [String]+ _lhsOsemNames = rule307 ()+ __result_ = T_CProductions_vOut16 _lhsOcataAlts _lhsOcomments _lhsOdataAlts _lhsOdecls _lhsOsemNames+ in __result_ )+ in C_CProductions_s17 v16+ {-# INLINE rule303 #-}+ {-# LINE 1025 "./src-ag/GenerateCode.ag" #-}+ rule303 = \ (_ :: ()) ->+ {-# LINE 1025 "./src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 2130 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule304 #-}+ {-# LINE 1139 "./src-ag/GenerateCode.ag" #-}+ rule304 = \ (_ :: ()) ->+ {-# LINE 1139 "./src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 2136 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule305 #-}+ rule305 = \ (_ :: ()) ->+ []+ {-# INLINE rule306 #-}+ rule306 = \ (_ :: ()) ->+ []+ {-# INLINE rule307 #-}+ rule307 = \ (_ :: ()) ->+ []++-- CRule -------------------------------------------------------+-- wrapper+data Inh_CRule = Inh_CRule { allNts_Inh_CRule :: (Set NontermIdent), aroundMap_Inh_CRule :: (Set Identifier), children_Inh_CRule :: ([(Identifier,Type,ChildKind)]), con_Inh_CRule :: (ConstructorIdent), declsAbove_Inh_CRule :: ([Decl]), inh_Inh_CRule :: (Attributes), instVisitNrs_Inh_CRule :: (Map Identifier Int), mergeMap_Inh_CRule :: (Map Identifier (Identifier, [Identifier])), nr_Inh_CRule :: (Int), nt_Inh_CRule :: (NontermIdent), o_case_Inh_CRule :: (Bool), o_cata_Inh_CRule :: (Bool), o_clean_Inh_CRule :: (Bool), o_costcentre_Inh_CRule :: (Bool), o_data_Inh_CRule :: (Maybe Bool), o_linePragmas_Inh_CRule :: (Bool), o_monadic_Inh_CRule :: (Bool), o_newtypes_Inh_CRule :: (Bool), o_pretty_Inh_CRule :: (Bool), o_rename_Inh_CRule :: (Bool), o_sem_Inh_CRule :: (Bool), o_sig_Inh_CRule :: (Bool), o_splitsems_Inh_CRule :: (Bool), o_strictwrap_Inh_CRule :: (Bool), o_traces_Inh_CRule :: (Bool), o_unbox_Inh_CRule :: (Bool), options_Inh_CRule :: (Options), paramInstMap_Inh_CRule :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_CRule :: (ParamMap), prefix_Inh_CRule :: (String), syn_Inh_CRule :: (Attributes), terminals_Inh_CRule :: ([Identifier]), unfoldSemDom_Inh_CRule :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_CRule :: (Set Identifier), what_Inh_CRule :: (String) }+data Syn_CRule = Syn_CRule { allTpsFound_Syn_CRule :: (Bool), bldBlocksFun_Syn_CRule :: (DeclBlocks -> DeclBlocks), comments_Syn_CRule :: ([String]), decls_Syn_CRule :: (Decls), declsAbove_Syn_CRule :: ([Decl]), definedInsts_Syn_CRule :: ([Identifier]), exprs_Syn_CRule :: (Exprs), tSigs_Syn_CRule :: ([Decl]), tps_Syn_CRule :: ([Type]), usedVars_Syn_CRule :: (Set String), visitedSet_Syn_CRule :: (Set Identifier) }+{-# INLINABLE wrap_CRule #-}+wrap_CRule :: T_CRule -> Inh_CRule -> (Syn_CRule )+wrap_CRule (T_CRule act) (Inh_CRule _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CRule_vIn19 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat+ (T_CRule_vOut19 _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet) <- return (inv_CRule_s20 sem arg)+ return (Syn_CRule _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet)+ )++-- cata+{-# NOINLINE sem_CRule #-}+sem_CRule :: CRule -> T_CRule +sem_CRule ( CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ pattern_ rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_ ) = sem_CRule_CRule name_ isIn_ hasCode_ nt_ con_ field_ childnt_ tp_ ( sem_Pattern pattern_ ) rhs_ defines_ owrt_ origin_ uses_ explicit_ mbNamed_+sem_CRule ( CChildVisit name_ nt_ nr_ inh_ syn_ isLast_ ) = sem_CRule_CChildVisit name_ nt_ nr_ inh_ syn_ isLast_++-- semantic domain+newtype T_CRule = T_CRule {+ attach_T_CRule :: Identity (T_CRule_s20 )+ }+newtype T_CRule_s20 = C_CRule_s20 {+ inv_CRule_s20 :: (T_CRule_v19 )+ }+data T_CRule_s21 = C_CRule_s21+type T_CRule_v19 = (T_CRule_vIn19 ) -> (T_CRule_vOut19 )+data T_CRule_vIn19 = T_CRule_vIn19 (Set NontermIdent) (Set Identifier) ([(Identifier,Type,ChildKind)]) (ConstructorIdent) ([Decl]) (Attributes) (Map Identifier Int) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (String)+data T_CRule_vOut19 = T_CRule_vOut19 (Bool) (DeclBlocks -> DeclBlocks) ([String]) (Decls) ([Decl]) ([Identifier]) (Exprs) ([Decl]) ([Type]) (Set String) (Set Identifier)+{-# NOINLINE sem_CRule_CRule #-}+sem_CRule_CRule :: (Identifier) -> (Bool) -> (Bool) -> (NontermIdent) -> (ConstructorIdent) -> (Identifier) -> (Maybe NontermIdent) -> (Maybe Type) -> T_Pattern -> ([String]) -> (Map Int (Identifier,Identifier,Maybe Type)) -> (Bool) -> (String) -> (Set (Identifier, Identifier)) -> (Bool) -> (Maybe Identifier) -> T_CRule +sem_CRule_CRule arg_name_ arg_isIn_ arg_hasCode_ arg_nt_ arg_con_ arg_field_ _ arg_tp_ arg_pattern_ arg_rhs_ arg_defines_ _ arg_origin_ arg_uses_ arg_explicit_ arg_mbNamed_ = T_CRule (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_CRule_v19 + v19 = \ (T_CRule_vIn19 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let+ _patternX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))+ (T_Pattern_vOut40 _patternIcopy _patternIdefinedInsts _patternIpatternAttributes) = inv_Pattern_s41 _patternX41 (T_Pattern_vIn40 )+ _instTypes = rule308 _lhsIchildren+ _originComment = rule309 _lhsIo_pretty arg_origin_+ _instDecls = rule310 _definedInsts _instTypes _lhsIo_monadic _lhsIo_newtypes _lhsIoptions _lhsIprefix+ _patDescr = rule311 _patternIpatternAttributes arg_isIn_+ _traceDescr = rule312 _patDescr arg_con_ arg_mbNamed_ arg_nt_+ _addTrace = rule313 _lhsIo_traces _traceDescr+ _costCentreDescr = rule314 _patDescr arg_con_ arg_nt_+ _addCostCentre = rule315 _costCentreDescr _lhsIo_costcentre+ _addLinePragma = rule316 _lhsIo_linePragmas arg_name_+ _decls = rule317 _addCostCentre _addLinePragma _addTrace _instDecls _lhsIo_monadic _lhsIoptions _originComment _patternIcopy arg_defines_ arg_explicit_ arg_hasCode_ arg_rhs_ arg_uses_+ _definedInsts = rule318 _patternIdefinedInsts arg_isIn_+ _rulename = rule319 _lhsIoptions _lhsIterminals arg_field_ arg_isIn_ arg_name_+ _lhsOexprs :: Exprs+ _lhsOexprs = rule320 _rulename+ _lhsOusedVars :: Set String+ _lhsOusedVars = rule321 _rulename+ _mkTp = rule322 _lhsInt _orgParams+ _lhsOtSigs :: [Decl]+ _lhsOtSigs = rule323 _evalTp _lhsIchildren _lhsIoptions _mkTp arg_defines_+ _orgParams = rule324 _lhsInt _lhsIparamMap+ _evalTp = rule325 _lhsInt _lhsIoptions _lhsIparamInstMap _lhsIparamMap _orgParams+ _lhsOtps :: [Type]+ _lhsOallTpsFound :: Bool+ (_lhsOtps,_lhsOallTpsFound) = rule326 arg_tp_+ _lhsOdeclsAbove :: [Decl]+ _lhsOdeclsAbove = rule327 _decls _lhsIdeclsAbove+ _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks+ _lhsObldBlocksFun = rule328 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule329 _lhsIwhat arg_defines_+ _lhsOdecls :: Decls+ _lhsOdecls = rule330 _decls+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule331 _definedInsts+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule332 _lhsIvisitedSet+ __result_ = T_CRule_vOut19 _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet+ in __result_ )+ in C_CRule_s20 v19+ {-# INLINE rule308 #-}+ {-# LINE 158 "./src-ag/GenerateCode.ag" #-}+ rule308 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->+ {-# LINE 158 "./src-ag/GenerateCode.ag" #-}+ [ (n, (t, mb, for)) | (n, NT t _ for, mb) <- _lhsIchildren ]+ {-# LINE 2231 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule309 #-}+ {-# LINE 159 "./src-ag/GenerateCode.ag" #-}+ rule309 = \ ((_lhsIo_pretty) :: Bool) origin_ ->+ {-# LINE 159 "./src-ag/GenerateCode.ag" #-}+ if _lhsIo_pretty+ then (Comment origin_:)+ else id+ {-# LINE 2239 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule310 #-}+ {-# LINE 162 "./src-ag/GenerateCode.ag" #-}+ rule310 = \ _definedInsts _instTypes ((_lhsIo_monadic) :: Bool) ((_lhsIo_newtypes) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIprefix) :: String) ->+ {-# LINE 162 "./src-ag/GenerateCode.ag" #-}+ [ mkDecl _lhsIo_monadic (Pattern3 (Alias _INST' inst (Underscore (getPos inst))))+ ( let (nm,mb,defor) = fromJust $ inst `lookup` _instTypes+ in unwrapSem _lhsIo_newtypes nm+ $ case mb of+ ChildReplace _ -> App instLocFieldName [SimpleExpr $ fieldname inst]+ _ ->+ if defor+ then SimpleExpr instLocFieldName+ else App (cataname _lhsIprefix nm)+ [SimpleExpr instLocFieldName]+ )+ (Set.singleton instSemFieldName)+ (Set.singleton instLocFieldName)+ | inst <- _definedInsts+ , let instLocFieldName = attrname _lhsIoptions True _INST inst+ instSemFieldName = attrname _lhsIoptions False _INST' inst+ ]+ {-# LINE 2261 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule311 #-}+ {-# LINE 179 "./src-ag/GenerateCode.ag" #-}+ rule311 = \ ((_patternIpatternAttributes) :: [(Identifier, Identifier)]) isIn_ ->+ {-# LINE 179 "./src-ag/GenerateCode.ag" #-}+ if isIn_+ then "_"+ else concat $ intersperse "," (map (\(f,a) -> show f ++ "." ++ show a) _patternIpatternAttributes)+ {-# LINE 2269 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule312 #-}+ {-# LINE 182 "./src-ag/GenerateCode.ag" #-}+ rule312 = \ _patDescr con_ mbNamed_ nt_ ->+ {-# LINE 182 "./src-ag/GenerateCode.ag" #-}+ (maybe "" (\nm -> show nm ++ ":") mbNamed_) ++ show nt_ ++ " :: " ++ show con_ ++ " :: " ++ _patDescr+ {-# LINE 2275 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule313 #-}+ {-# LINE 184 "./src-ag/GenerateCode.ag" #-}+ rule313 = \ ((_lhsIo_traces) :: Bool) _traceDescr ->+ {-# LINE 184 "./src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_traces+ then Trace _traceDescr v+ else v+ {-# LINE 2283 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule314 #-}+ {-# LINE 187 "./src-ag/GenerateCode.ag" #-}+ rule314 = \ _patDescr con_ nt_ ->+ {-# LINE 187 "./src-ag/GenerateCode.ag" #-}+ show nt_ ++ ":" ++ show con_ ++ ":" ++ _patDescr+ {-# LINE 2289 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule315 #-}+ {-# LINE 188 "./src-ag/GenerateCode.ag" #-}+ rule315 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->+ {-# LINE 188 "./src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 2297 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule316 #-}+ {-# LINE 191 "./src-ag/GenerateCode.ag" #-}+ rule316 = \ ((_lhsIo_linePragmas) :: Bool) name_ ->+ {-# LINE 191 "./src-ag/GenerateCode.ag" #-}+ \v -> let p = getPos name_+ hasPos = line p > 0 && column p >= 0 && not (null (file p))+ in if _lhsIo_linePragmas && hasPos+ then PragmaExpr True True ("LINE " ++ show (line p) ++ " " ++ show (file p))+ $ LineExpr+ $ v+ else v+ {-# LINE 2309 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule317 #-}+ {-# LINE 198 "./src-ag/GenerateCode.ag" #-}+ rule317 = \ _addCostCentre _addLinePragma _addTrace _instDecls ((_lhsIo_monadic) :: Bool) ((_lhsIoptions) :: Options) _originComment ((_patternIcopy) :: Pattern) defines_ explicit_ hasCode_ rhs_ uses_ ->+ {-# LINE 198 "./src-ag/GenerateCode.ag" #-}+ if hasCode_+ then _originComment ( mkDecl (_lhsIo_monadic && explicit_) (Pattern3 _patternIcopy) (_addTrace $ _addCostCentre $ _addLinePragma $ (TextExpr rhs_))+ (Set.fromList [attrname _lhsIoptions False fld nm | (fld,nm,_) <- Map.elems defines_])+ (Set.fromList [attrname _lhsIoptions True fld nm | (fld,nm) <- Set.toList uses_])+ : _instDecls )+ else _instDecls+ {-# LINE 2320 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule318 #-}+ {-# LINE 268 "./src-ag/GenerateCode.ag" #-}+ rule318 = \ ((_patternIdefinedInsts) :: [Identifier]) isIn_ ->+ {-# LINE 268 "./src-ag/GenerateCode.ag" #-}+ if isIn_ then [] else _patternIdefinedInsts+ {-# LINE 2326 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule319 #-}+ {-# LINE 338 "./src-ag/GenerateCode.ag" #-}+ rule319 = \ ((_lhsIoptions) :: Options) ((_lhsIterminals) :: [Identifier]) field_ isIn_ name_ ->+ {-# LINE 338 "./src-ag/GenerateCode.ag" #-}+ if field_ == _LOC && name_ `elem` _lhsIterminals+ then funname name_ 0+ else attrname _lhsIoptions isIn_ field_ name_+ {-# LINE 2334 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule320 #-}+ {-# LINE 341 "./src-ag/GenerateCode.ag" #-}+ rule320 = \ _rulename ->+ {-# LINE 341 "./src-ag/GenerateCode.ag" #-}+ [SimpleExpr _rulename ]+ {-# LINE 2340 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule321 #-}+ {-# LINE 357 "./src-ag/GenerateCode.ag" #-}+ rule321 = \ _rulename ->+ {-# LINE 357 "./src-ag/GenerateCode.ag" #-}+ Set.singleton _rulename+ {-# LINE 2346 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule322 #-}+ {-# LINE 367 "./src-ag/GenerateCode.ag" #-}+ rule322 = \ ((_lhsInt) :: NontermIdent) _orgParams ->+ {-# LINE 367 "./src-ag/GenerateCode.ag" #-}+ typeToCodeType (Just _lhsInt) _orgParams+ {-# LINE 2352 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule323 #-}+ {-# LINE 368 "./src-ag/GenerateCode.ag" #-}+ rule323 = \ _evalTp ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ((_lhsIoptions) :: Options) _mkTp defines_ ->+ {-# LINE 368 "./src-ag/GenerateCode.ag" #-}+ [ TSig (attrname _lhsIoptions False field attr) tp'+ | (field,attr,tp) <- Map.elems defines_, isJust tp+ , let tp1 = _evalTp field $ _mkTp (fromJust tp)+ tp' = case findOrigType attr _lhsIchildren of+ Just tp'' -> let tp2 = _evalTp field $ _mkTp tp''+ in Arr tp2 tp1+ Nothing -> tp1+ findOrigType _ [] = Nothing+ findOrigType nm ((n,_,kind) : r)+ | nm == n = case kind of+ ChildReplace orig -> Just orig+ _ -> Nothing+ | otherwise = findOrigType nm r+ ]+ {-# LINE 2371 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule324 #-}+ {-# LINE 383 "./src-ag/GenerateCode.ag" #-}+ rule324 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->+ {-# LINE 383 "./src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 2377 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule325 #-}+ {-# LINE 385 "./src-ag/GenerateCode.ag" #-}+ rule325 = \ ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ((_lhsIparamMap) :: ParamMap) _orgParams ->+ {-# LINE 385 "./src-ag/GenerateCode.ag" #-}+ \field tp -> let orgFldParams = map getName $ Map.findWithDefault [] childNt _lhsIparamMap+ (childNt,instParams) = Map.findWithDefault (_lhsInt,[]) field _lhsIparamInstMap+ replMap = Map.fromList (zip orgFldParams instParams)+ replace k = Map.findWithDefault ('@':k) k replMap+ in if null instParams+ then if null _orgParams+ then tp+ else idEvalType _lhsIoptions tp+ else evalType _lhsIoptions replace tp+ {-# LINE 2391 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule326 #-}+ {-# LINE 420 "./src-ag/GenerateCode.ag" #-}+ rule326 = \ tp_ ->+ {-# LINE 420 "./src-ag/GenerateCode.ag" #-}+ maybe ([],False) (\tp -> ([tp],True)) tp_+ {-# LINE 2397 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule327 #-}+ {-# LINE 621 "./src-ag/GenerateCode.ag" #-}+ rule327 = \ _decls ((_lhsIdeclsAbove) :: [Decl]) ->+ {-# LINE 621 "./src-ag/GenerateCode.ag" #-}+ _lhsIdeclsAbove ++ _decls+ {-# LINE 2403 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule328 #-}+ {-# LINE 634 "./src-ag/GenerateCode.ag" #-}+ rule328 = \ (_ :: ()) ->+ {-# LINE 634 "./src-ag/GenerateCode.ag" #-}+ id+ {-# LINE 2409 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule329 #-}+ {-# LINE 909 "./src-ag/GenerateCode.ag" #-}+ rule329 = \ ((_lhsIwhat) :: String) defines_ ->+ {-# LINE 909 "./src-ag/GenerateCode.ag" #-}+ [ makeLocalComment 11 _lhsIwhat name tp | (field,name,tp) <- Map.elems defines_, field == _LOC ]+ ++ [ makeLocalComment 11 "inst " name tp | (field,name,tp) <- Map.elems defines_, field == _INST ]+ {-# LINE 2416 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule330 #-}+ rule330 = \ _decls ->+ _decls+ {-# INLINE rule331 #-}+ rule331 = \ _definedInsts ->+ _definedInsts+ {-# INLINE rule332 #-}+ rule332 = \ ((_lhsIvisitedSet) :: Set Identifier) ->+ _lhsIvisitedSet+{-# NOINLINE sem_CRule_CChildVisit #-}+sem_CRule_CChildVisit :: (Identifier) -> (NontermIdent) -> (Int) -> (Attributes) -> (Attributes) -> (Bool) -> T_CRule +sem_CRule_CChildVisit arg_name_ arg_nt_ arg_nr_ arg_inh_ arg_syn_ arg_isLast_ = T_CRule (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_CRule_v19 + v19 = \ (T_CRule_vIn19 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let+ _visitedSet = rule333 _lhsIvisitedSet arg_name_+ _costCentreDescr = rule334 _lhsIcon _lhsInt arg_name_ arg_nr_ arg_nt_+ _addCostCentre = rule335 _costCentreDescr _lhsIo_costcentre+ _decls = rule336 _addCostCentre _lhsIaroundMap _lhsIchildren _lhsImergeMap _lhsIo_monadic _lhsIo_newtypes _lhsIo_unbox _lhsIoptions _visitedSet arg_inh_ arg_isLast_ arg_name_ arg_nr_ arg_nt_ arg_syn_+ _isSuperfluousHigherOrderIntra = rule337 _lhsIinstVisitNrs _lhsInr arg_name_+ _names = rule338 _isSuperfluousHigherOrderIntra arg_name_ arg_nr_+ _lhsOexprs :: Exprs+ _lhsOexprs = rule339 _instParams _lhsIo_newtypes _lhsIunfoldSemDom _names arg_nr_ arg_nt_+ _lhsOusedVars :: Set String+ _lhsOusedVars = rule340 _names+ _mkTp = rule341 _evalTp _orgParams arg_nt_+ _definedTps = rule342 _lhsIoptions _mkTp arg_name_ arg_syn_+ _nextTp = rule343 arg_nr_ arg_nt_+ _lhsOtSigs :: [Decl]+ _lhsOtSigs = rule344 _definedTps _instParams _nextTp arg_isLast_ arg_name_ arg_nr_+ _orgParams = rule345 _lhsIparamMap arg_nt_+ _instParams = rule346 _lhsIparamInstMap arg_name_ arg_nt_+ _replParamMap = rule347 _instParams _orgParams+ _replace = rule348 _replParamMap+ _evalTp = rule349 _lhsIoptions _orgParams _replace+ _lhsOtps :: [Type]+ _lhsOtps = rule350 _instParams _isSuperfluousHigherOrderIntra arg_nr_ arg_nt_+ _lhsOdeclsAbove :: [Decl]+ _lhsOdeclsAbove = rule351 ()+ _lhsObldBlocksFun :: DeclBlocks -> DeclBlocks+ _lhsObldBlocksFun = rule352 _decls _lhsIdeclsAbove+ _lhsOallTpsFound :: Bool+ _lhsOallTpsFound = rule353 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule354 ()+ _lhsOdecls :: Decls+ _lhsOdecls = rule355 _decls+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule356 ()+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule357 _visitedSet+ __result_ = T_CRule_vOut19 _lhsOallTpsFound _lhsObldBlocksFun _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet+ in __result_ )+ in C_CRule_s20 v19+ {-# INLINE rule333 #-}+ {-# LINE 148 "./src-ag/GenerateCode.ag" #-}+ rule333 = \ ((_lhsIvisitedSet) :: Set Identifier) name_ ->+ {-# LINE 148 "./src-ag/GenerateCode.ag" #-}+ Set.insert name_ _lhsIvisitedSet+ {-# LINE 2477 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule334 #-}+ {-# LINE 204 "./src-ag/GenerateCode.ag" #-}+ rule334 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) name_ nr_ nt_ ->+ {-# LINE 204 "./src-ag/GenerateCode.ag" #-}+ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show name_ ++ ":" ++ show nt_ ++ ":" ++ show nr_+ {-# LINE 2483 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule335 #-}+ {-# LINE 205 "./src-ag/GenerateCode.ag" #-}+ rule335 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->+ {-# LINE 205 "./src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 2491 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule336 #-}+ {-# LINE 208 "./src-ag/GenerateCode.ag" #-}+ rule336 = \ _addCostCentre ((_lhsIaroundMap) :: Set Identifier) ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ((_lhsIo_monadic) :: Bool) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) _visitedSet inh_ isLast_ name_ nr_ nt_ syn_ ->+ {-# LINE 208 "./src-ag/GenerateCode.ag" #-}+ let lhsVars = map (attrname _lhsIoptions True name_) (Map.keys syn_)+ ++ if isLast_ then [] else [unwrap ++ funname name_ (nr_+1)]+ rhsVars = map (attrname _lhsIoptions False name_) (Map.keys inh_)+ unwrap = if _lhsIo_newtypes then typeName nt_ (nr_ + 1) ++ " " else ""+ tuple | isMerging = TupleLhs [locname _lhsIoptions name_ ++ "_comp"]+ | otherwise = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars+ rhs = _addCostCentre $ Code.InvokeExpr (typeName nt_ nr_) (SimpleExpr fun) (map SimpleExpr rhsVars)+ isVirtual _ [] = False+ isVirtual nm ((n,_,kind) : r)+ | nm == n = case kind of+ ChildAttr -> True+ _ -> False+ | otherwise = isVirtual nm r+ isMerged = name_ `Map.member` _lhsImergeMap+ isMerging = name_ `elem` concatMap (\(_,cs) -> cs) (Map.elems _lhsImergeMap)+ merges = [ (c,cs) | (c,(_,cs)) <- Map.assocs _lhsImergeMap, all (`Set.member` _visitedSet ) cs, name_ `elem` (c:cs) ]+ baseNm = if nr_ == 0 && isVirtual name_ _lhsIchildren+ then Ident (getName name_ ++ "_inst") (getPos name_)+ else name_+ fun | nr_ == 0 && Set.member name_ _lhsIaroundMap+ = locname _lhsIoptions name_ ++ "_around " ++ funname baseNm 0+ | otherwise = funname baseNm nr_+ outDecls | isMerged = []+ | otherwise =+ if isMerging+ then [mkDecl _lhsIo_monadic tuple rhs Set.empty Set.empty]+ else [Resume _lhsIo_monadic (typeName nt_ nr_) tuple rhs]+ outMerged | null merges || nr_ /= 0 = []+ | otherwise = let (c,cs) = head merges+ tuple' = mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars'+ lhsVars' = map (attrname _lhsIoptions True c) (Map.keys syn_)+ ++ if isLast_ then [] else [unwrap ++ funname c (nr_+1)]+ rhsVars' = [ locname _lhsIoptions c' ++ "_comp" | c' <- cs ]+ fun' = locname _lhsIoptions c ++ "_merge"+ rhs' = App fun' (map SimpleExpr rhsVars')+ in [Resume _lhsIo_monadic (typeName nt_ nr_) tuple' rhs']+ in+ (outDecls ++ outMerged)+ {-# LINE 2534 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule337 #-}+ {-# LINE 330 "./src-ag/GenerateCode.ag" #-}+ rule337 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ((_lhsInr) :: Int) name_ ->+ {-# LINE 330 "./src-ag/GenerateCode.ag" #-}+ _lhsInr <= Map.findWithDefault (-1) name_ _lhsIinstVisitNrs+ {-# LINE 2540 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule338 #-}+ {-# LINE 343 "./src-ag/GenerateCode.ag" #-}+ rule338 = \ _isSuperfluousHigherOrderIntra name_ nr_ ->+ {-# LINE 343 "./src-ag/GenerateCode.ag" #-}+ if _isSuperfluousHigherOrderIntra+ then []+ else [funname name_ (nr_+1)]+ {-# LINE 2548 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule339 #-}+ {-# LINE 347 "./src-ag/GenerateCode.ag" #-}+ rule339 = \ _instParams ((_lhsIo_newtypes) :: Bool) ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) _names nr_ nt_ ->+ {-# LINE 347 "./src-ag/GenerateCode.ag" #-}+ let wrap = if _lhsIo_newtypes then \x -> App (typeName nt_ (nr_ + 1)) [x] else id+ addType expr | null _instParams = expr+ | otherwise = TypedExpr expr (_lhsIunfoldSemDom nt_ (nr_+1) _instParams )+ in map (wrap . addType . SimpleExpr) _names+ {-# LINE 2557 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule340 #-}+ {-# LINE 359 "./src-ag/GenerateCode.ag" #-}+ rule340 = \ _names ->+ {-# LINE 359 "./src-ag/GenerateCode.ag" #-}+ Set.fromList _names+ {-# LINE 2563 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule341 #-}+ {-# LINE 395 "./src-ag/GenerateCode.ag" #-}+ rule341 = \ _evalTp _orgParams nt_ ->+ {-# LINE 395 "./src-ag/GenerateCode.ag" #-}+ _evalTp . typeToCodeType (Just nt_) _orgParams+ {-# LINE 2569 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule342 #-}+ {-# LINE 396 "./src-ag/GenerateCode.ag" #-}+ rule342 = \ ((_lhsIoptions) :: Options) _mkTp name_ syn_ ->+ {-# LINE 396 "./src-ag/GenerateCode.ag" #-}+ [ TSig (attrname _lhsIoptions True name_ a) (_mkTp tp) | (a,tp) <- Map.toList syn_ ]+ {-# LINE 2575 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule343 #-}+ {-# LINE 397 "./src-ag/GenerateCode.ag" #-}+ rule343 = \ nr_ nt_ ->+ {-# LINE 397 "./src-ag/GenerateCode.ag" #-}+ typeName nt_ (nr_+1)+ {-# LINE 2581 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule344 #-}+ {-# LINE 398 "./src-ag/GenerateCode.ag" #-}+ rule344 = \ _definedTps _instParams _nextTp isLast_ name_ nr_ ->+ {-# LINE 398 "./src-ag/GenerateCode.ag" #-}+ (if isLast_ then id else (TSig (funname name_ (nr_+1)) (TypeApp (SimpleType _nextTp) (map SimpleType _instParams )) :)) _definedTps+ {-# LINE 2587 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule345 #-}+ {-# LINE 400 "./src-ag/GenerateCode.ag" #-}+ rule345 = \ ((_lhsIparamMap) :: ParamMap) nt_ ->+ {-# LINE 400 "./src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] nt_ _lhsIparamMap+ {-# LINE 2593 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule346 #-}+ {-# LINE 401 "./src-ag/GenerateCode.ag" #-}+ rule346 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) name_ nt_ ->+ {-# LINE 401 "./src-ag/GenerateCode.ag" #-}+ snd $ Map.findWithDefault (nt_,[]) name_ _lhsIparamInstMap+ {-# LINE 2599 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule347 #-}+ {-# LINE 402 "./src-ag/GenerateCode.ag" #-}+ rule347 = \ _instParams _orgParams ->+ {-# LINE 402 "./src-ag/GenerateCode.ag" #-}+ Map.fromList (zip _orgParams _instParams )+ {-# LINE 2605 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule348 #-}+ {-# LINE 403 "./src-ag/GenerateCode.ag" #-}+ rule348 = \ _replParamMap ->+ {-# LINE 403 "./src-ag/GenerateCode.ag" #-}+ \k -> Map.findWithDefault k k _replParamMap+ {-# LINE 2611 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule349 #-}+ {-# LINE 404 "./src-ag/GenerateCode.ag" #-}+ rule349 = \ ((_lhsIoptions) :: Options) _orgParams _replace ->+ {-# LINE 404 "./src-ag/GenerateCode.ag" #-}+ if null _orgParams then id else evalType _lhsIoptions _replace+ {-# LINE 2617 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule350 #-}+ {-# LINE 421 "./src-ag/GenerateCode.ag" #-}+ rule350 = \ _instParams _isSuperfluousHigherOrderIntra nr_ nt_ ->+ {-# LINE 421 "./src-ag/GenerateCode.ag" #-}+ if _isSuperfluousHigherOrderIntra+ then []+ else [NT (ntOfVisit nt_ (nr_+1)) _instParams False]+ {-# LINE 2625 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule351 #-}+ {-# LINE 623 "./src-ag/GenerateCode.ag" #-}+ rule351 = \ (_ :: ()) ->+ {-# LINE 623 "./src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 2631 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule352 #-}+ {-# LINE 636 "./src-ag/GenerateCode.ag" #-}+ rule352 = \ _decls ((_lhsIdeclsAbove) :: [Decl]) ->+ {-# LINE 636 "./src-ag/GenerateCode.ag" #-}+ DeclBlock _lhsIdeclsAbove (head _decls )+ {-# LINE 2637 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule353 #-}+ rule353 = \ (_ :: ()) ->+ True+ {-# INLINE rule354 #-}+ rule354 = \ (_ :: ()) ->+ []+ {-# INLINE rule355 #-}+ rule355 = \ _decls ->+ _decls+ {-# INLINE rule356 #-}+ rule356 = \ (_ :: ()) ->+ []+ {-# INLINE rule357 #-}+ rule357 = \ _visitedSet ->+ _visitedSet++-- CSegment ----------------------------------------------------+-- wrapper+data Inh_CSegment = Inh_CSegment { inh_Inh_CSegment :: (Attributes), isLast_Inh_CSegment :: (Bool), nr_Inh_CSegment :: (Int), nt_Inh_CSegment :: (NontermIdent), o_case_Inh_CSegment :: (Bool), o_cata_Inh_CSegment :: (Bool), o_clean_Inh_CSegment :: (Bool), o_costcentre_Inh_CSegment :: (Bool), o_data_Inh_CSegment :: (Maybe Bool), o_linePragmas_Inh_CSegment :: (Bool), o_monadic_Inh_CSegment :: (Bool), o_newtypes_Inh_CSegment :: (Bool), o_pretty_Inh_CSegment :: (Bool), o_rename_Inh_CSegment :: (Bool), o_sem_Inh_CSegment :: (Bool), o_sig_Inh_CSegment :: (Bool), o_splitsems_Inh_CSegment :: (Bool), o_strictwrap_Inh_CSegment :: (Bool), o_traces_Inh_CSegment :: (Bool), o_unbox_Inh_CSegment :: (Bool), options_Inh_CSegment :: (Options), paramMap_Inh_CSegment :: (ParamMap), prefix_Inh_CSegment :: (String), syn_Inh_CSegment :: (Attributes) }+data Syn_CSegment = Syn_CSegment { comments_Syn_CSegment :: ([String]), semDom_Syn_CSegment :: ([Decl]), semDomUnfoldGath_Syn_CSegment :: (Map (NontermIdent, Int) ([String], Code.Type)), wrapDecls_Syn_CSegment :: (Decls) }+{-# INLINABLE wrap_CSegment #-}+wrap_CSegment :: T_CSegment -> Inh_CSegment -> (Syn_CSegment )+wrap_CSegment (T_CSegment act) (Inh_CSegment _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CSegment_vIn22 _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn+ (T_CSegment_vOut22 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls) <- return (inv_CSegment_s23 sem arg)+ return (Syn_CSegment _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls)+ )++-- cata+{-# INLINE sem_CSegment #-}+sem_CSegment :: CSegment -> T_CSegment +sem_CSegment ( CSegment inh_ syn_ ) = sem_CSegment_CSegment inh_ syn_++-- semantic domain+newtype T_CSegment = T_CSegment {+ attach_T_CSegment :: Identity (T_CSegment_s23 )+ }+newtype T_CSegment_s23 = C_CSegment_s23 {+ inv_CSegment_s23 :: (T_CSegment_v22 )+ }+data T_CSegment_s24 = C_CSegment_s24+type T_CSegment_v22 = (T_CSegment_vIn22 ) -> (T_CSegment_vOut22 )+data T_CSegment_vIn22 = T_CSegment_vIn22 (Attributes) (Bool) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)+data T_CSegment_vOut22 = T_CSegment_vOut22 ([String]) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)+{-# NOINLINE sem_CSegment_CSegment #-}+sem_CSegment_CSegment :: (Attributes) -> (Attributes) -> T_CSegment +sem_CSegment_CSegment arg_inh_ arg_syn_ = T_CSegment (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_CSegment_v22 + v22 = \ (T_CSegment_vIn22 _lhsIinh _lhsIisLast _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let+ _altSemForm = rule358 _lhsIoptions+ _tp = rule359 _altSemForm _indexExpr _inhTps _synTps+ _inhTps = rule360 _lhsInt _params arg_inh_+ _inhTup = rule361 _inhTps _lhsIo_unbox+ _synTps = rule362 _continuation _inhTps _lhsInt _lhsIo_unbox _params arg_syn_+ _curTypeName = rule363 _lhsInr _lhsInt+ _nextTypeName = rule364 _lhsInr _lhsInt+ _indexName = rule365 _curTypeName+ _dataIndex = rule366 _indexName _params+ _indexExpr = rule367 _indexName _params+ _indexStr = rule368 _indexName _params+ _inhInstance = rule369 _indexStr _inhTup _lhsInr _lhsInt+ _synInstance = rule370 _indexStr _lhsInr _lhsInt _synTps+ _continuation = rule371 _lhsIisLast _nextTypeName _params+ _params = rule372 _lhsInt _lhsIparamMap+ _lhsOsemDom :: [Decl]+ _lhsOsemDom = rule373 _altSemForm _dataIndex _inhInstance _lhsInr _lhsInt _lhsIo_newtypes _lhsIoptions _params _synInstance _tp+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule374 _lhsInr _lhsInt _params _tp+ _lhsOwrapDecls :: Decls+ _lhsOwrapDecls = rule375 _lhsIisLast _lhsInr _lhsInt _lhsIo_newtypes _lhsIo_unbox _lhsIoptions arg_inh_ arg_syn_+ _lhsOcomments :: [String]+ _lhsOcomments = rule376 _lhsInr arg_inh_ arg_syn_+ __result_ = T_CSegment_vOut22 _lhsOcomments _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls+ in __result_ )+ in C_CSegment_s23 v22+ {-# INLINE rule358 #-}+ {-# LINE 720 "./src-ag/GenerateCode.ag" #-}+ rule358 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 720 "./src-ag/GenerateCode.ag" #-}+ breadthFirst _lhsIoptions+ {-# LINE 2722 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule359 #-}+ {-# LINE 721 "./src-ag/GenerateCode.ag" #-}+ rule359 = \ _altSemForm _indexExpr _inhTps _synTps ->+ {-# LINE 721 "./src-ag/GenerateCode.ag" #-}+ if _altSemForm+ then TypeApp (SimpleType "Child") [SimpleType "EvalInfo", _indexExpr ]+ else foldr Arr _synTps _inhTps+ {-# LINE 2730 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule360 #-}+ {-# LINE 724 "./src-ag/GenerateCode.ag" #-}+ rule360 = \ ((_lhsInt) :: NontermIdent) _params inh_ ->+ {-# LINE 724 "./src-ag/GenerateCode.ag" #-}+ [typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems inh_]+ {-# LINE 2736 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule361 #-}+ {-# LINE 725 "./src-ag/GenerateCode.ag" #-}+ rule361 = \ _inhTps ((_lhsIo_unbox) :: Bool) ->+ {-# LINE 725 "./src-ag/GenerateCode.ag" #-}+ mkTupleType _lhsIo_unbox (null _inhTps ) _inhTps+ {-# LINE 2742 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule362 #-}+ {-# LINE 726 "./src-ag/GenerateCode.ag" #-}+ rule362 = \ _continuation _inhTps ((_lhsInt) :: NontermIdent) ((_lhsIo_unbox) :: Bool) _params syn_ ->+ {-# LINE 726 "./src-ag/GenerateCode.ag" #-}+ mkTupleType _lhsIo_unbox (null _inhTps ) ([typeToCodeType (Just _lhsInt) _params tp | tp <- Map.elems syn_] ++ _continuation )+ {-# LINE 2748 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule363 #-}+ {-# LINE 727 "./src-ag/GenerateCode.ag" #-}+ rule363 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->+ {-# LINE 727 "./src-ag/GenerateCode.ag" #-}+ typeName _lhsInt _lhsInr+ {-# LINE 2754 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule364 #-}+ {-# LINE 728 "./src-ag/GenerateCode.ag" #-}+ rule364 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->+ {-# LINE 728 "./src-ag/GenerateCode.ag" #-}+ typeName _lhsInt (_lhsInr + 1)+ {-# LINE 2760 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule365 #-}+ {-# LINE 729 "./src-ag/GenerateCode.ag" #-}+ rule365 = \ _curTypeName ->+ {-# LINE 729 "./src-ag/GenerateCode.ag" #-}+ "I_" ++ _curTypeName+ {-# LINE 2766 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule366 #-}+ {-# LINE 730 "./src-ag/GenerateCode.ag" #-}+ rule366 = \ _indexName _params ->+ {-# LINE 730 "./src-ag/GenerateCode.ag" #-}+ Code.Data _indexName _params [DataAlt _indexName []] False []+ {-# LINE 2772 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule367 #-}+ {-# LINE 731 "./src-ag/GenerateCode.ag" #-}+ rule367 = \ _indexName _params ->+ {-# LINE 731 "./src-ag/GenerateCode.ag" #-}+ TypeApp (SimpleType _indexName ) (map (SimpleType . ('@':)) _params )+ {-# LINE 2778 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule368 #-}+ {-# LINE 732 "./src-ag/GenerateCode.ag" #-}+ rule368 = \ _indexName _params ->+ {-# LINE 732 "./src-ag/GenerateCode.ag" #-}+ "(" ++ _indexName ++ concatMap (\p -> " " ++ p) _params ++ ")"+ {-# LINE 2784 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule369 #-}+ {-# LINE 733 "./src-ag/GenerateCode.ag" #-}+ rule369 = \ _indexStr _inhTup ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->+ {-# LINE 733 "./src-ag/GenerateCode.ag" #-}+ Code.Data "instance Inh" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Inh") [_inhTup ] ] False []+ {-# LINE 2790 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule370 #-}+ {-# LINE 734 "./src-ag/GenerateCode.ag" #-}+ rule370 = \ _indexStr ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) _synTps ->+ {-# LINE 734 "./src-ag/GenerateCode.ag" #-}+ Code.Data "instance Syn" [_indexStr ] [DataAlt (typeName _lhsInt _lhsInr ++ "_Syn") [_synTps ] ] False []+ {-# LINE 2796 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule371 #-}+ {-# LINE 735 "./src-ag/GenerateCode.ag" #-}+ rule371 = \ ((_lhsIisLast) :: Bool) _nextTypeName _params ->+ {-# LINE 735 "./src-ag/GenerateCode.ag" #-}+ if _lhsIisLast+ then []+ else [TypeApp (SimpleType _nextTypeName ) (map (SimpleType . ('@':)) _params )]+ {-# LINE 2804 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule372 #-}+ {-# LINE 738 "./src-ag/GenerateCode.ag" #-}+ rule372 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->+ {-# LINE 738 "./src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 2810 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule373 #-}+ {-# LINE 739 "./src-ag/GenerateCode.ag" #-}+ rule373 = \ _altSemForm _dataIndex _inhInstance ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIoptions) :: Options) _params _synInstance _tp ->+ {-# LINE 739 "./src-ag/GenerateCode.ag" #-}+ let name = typeName _lhsInt _lhsInr+ evalTp | null _params = id+ | otherwise = idEvalType _lhsIoptions+ in ( if _lhsIo_newtypes+ then [ Code.NewType name _params name (evalTp _tp ) ]+ else [ Code.Type name _params (evalTp _tp ) ] )+ ++ ( if _altSemForm+ then [_dataIndex , _inhInstance , _synInstance ]+ else [] )+ {-# LINE 2824 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule374 #-}+ {-# LINE 753 "./src-ag/GenerateCode.ag" #-}+ rule374 = \ ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) _params _tp ->+ {-# LINE 753 "./src-ag/GenerateCode.ag" #-}+ Map.singleton (_lhsInt, _lhsInr) (_params , _tp )+ {-# LINE 2830 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule375 #-}+ {-# LINE 837 "./src-ag/GenerateCode.ag" #-}+ rule375 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) inh_ syn_ ->+ {-# LINE 837 "./src-ag/GenerateCode.ag" #-}+ let lhsVars = map (lhsname _lhsIoptions False) (Map.keys syn_)+ ++ if _lhsIisLast then [] else [unwrap ++ sem (_lhsInr+1)]+ rhsVars = map (lhsname _lhsIoptions True) (Map.keys inh_)+ rhs = map SimpleExpr rhsVars+ unwrap = if _lhsIo_newtypes then typeName _lhsInt (_lhsInr + 1) ++ " " else ""+ var = "sem"+ sem 0 = var+ sem n = var ++ "_" ++ show n+ ntt = typeName _lhsInt _lhsInr+ in [ EvalDecl ntt (mkTupleLhs _lhsIo_unbox (null $ Map.keys inh_) lhsVars) (InvokeExpr ntt (SimpleExpr $ sem _lhsInr) rhs) ]+ {-# LINE 2845 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule376 #-}+ {-# LINE 879 "./src-ag/GenerateCode.ag" #-}+ rule376 = \ ((_lhsInr) :: Int) inh_ syn_ ->+ {-# LINE 879 "./src-ag/GenerateCode.ag" #-}+ let body = map ind (showsSegment (CSegment inh_ syn_))+ in if null body+ then []+ else ("visit " ++ show _lhsInr ++ ":") : body+ {-# LINE 2854 "dist/build/GenerateCode.hs"#-}++-- CSegments ---------------------------------------------------+-- wrapper+data Inh_CSegments = Inh_CSegments { inh_Inh_CSegments :: (Attributes), nr_Inh_CSegments :: (Int), nt_Inh_CSegments :: (NontermIdent), o_case_Inh_CSegments :: (Bool), o_cata_Inh_CSegments :: (Bool), o_clean_Inh_CSegments :: (Bool), o_costcentre_Inh_CSegments :: (Bool), o_data_Inh_CSegments :: (Maybe Bool), o_linePragmas_Inh_CSegments :: (Bool), o_monadic_Inh_CSegments :: (Bool), o_newtypes_Inh_CSegments :: (Bool), o_pretty_Inh_CSegments :: (Bool), o_rename_Inh_CSegments :: (Bool), o_sem_Inh_CSegments :: (Bool), o_sig_Inh_CSegments :: (Bool), o_splitsems_Inh_CSegments :: (Bool), o_strictwrap_Inh_CSegments :: (Bool), o_traces_Inh_CSegments :: (Bool), o_unbox_Inh_CSegments :: (Bool), options_Inh_CSegments :: (Options), paramMap_Inh_CSegments :: (ParamMap), prefix_Inh_CSegments :: (String), syn_Inh_CSegments :: (Attributes) }+data Syn_CSegments = Syn_CSegments { comments_Syn_CSegments :: ([String]), isNil_Syn_CSegments :: (Bool), semDom_Syn_CSegments :: ([Decl]), semDomUnfoldGath_Syn_CSegments :: (Map (NontermIdent, Int) ([String], Code.Type)), wrapDecls_Syn_CSegments :: (Decls) }+{-# INLINABLE wrap_CSegments #-}+wrap_CSegments :: T_CSegments -> Inh_CSegments -> (Syn_CSegments )+wrap_CSegments (T_CSegments act) (Inh_CSegments _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CSegments_vIn25 _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn+ (T_CSegments_vOut25 _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls) <- return (inv_CSegments_s26 sem arg)+ return (Syn_CSegments _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls)+ )++-- cata+{-# NOINLINE sem_CSegments #-}+sem_CSegments :: CSegments -> T_CSegments +sem_CSegments list = Prelude.foldr sem_CSegments_Cons sem_CSegments_Nil (Prelude.map sem_CSegment list)++-- semantic domain+newtype T_CSegments = T_CSegments {+ attach_T_CSegments :: Identity (T_CSegments_s26 )+ }+newtype T_CSegments_s26 = C_CSegments_s26 {+ inv_CSegments_s26 :: (T_CSegments_v25 )+ }+data T_CSegments_s27 = C_CSegments_s27+type T_CSegments_v25 = (T_CSegments_vIn25 ) -> (T_CSegments_vOut25 )+data T_CSegments_vIn25 = T_CSegments_vIn25 (Attributes) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (ParamMap) (String) (Attributes)+data T_CSegments_vOut25 = T_CSegments_vOut25 ([String]) (Bool) ([Decl]) (Map (NontermIdent, Int) ([String], Code.Type)) (Decls)+{-# NOINLINE sem_CSegments_Cons #-}+sem_CSegments_Cons :: T_CSegment -> T_CSegments -> T_CSegments +sem_CSegments_Cons arg_hd_ arg_tl_ = T_CSegments (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_CSegments_v25 + v25 = \ (T_CSegments_vIn25 _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let+ _hdX23 = Control.Monad.Identity.runIdentity (attach_T_CSegment (arg_hd_))+ _tlX26 = Control.Monad.Identity.runIdentity (attach_T_CSegments (arg_tl_))+ (T_CSegment_vOut22 _hdIcomments _hdIsemDom _hdIsemDomUnfoldGath _hdIwrapDecls) = inv_CSegment_s23 _hdX23 (T_CSegment_vIn22 _hdOinh _hdOisLast _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_clean _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamMap _hdOprefix _hdOsyn)+ (T_CSegments_vOut25 _tlIcomments _tlIisNil _tlIsemDom _tlIsemDomUnfoldGath _tlIwrapDecls) = inv_CSegments_s26 _tlX26 (T_CSegments_vIn25 _tlOinh _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_clean _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamMap _tlOprefix _tlOsyn)+ _tlOnr = rule377 _lhsInr+ _lhsOisNil :: Bool+ _lhsOisNil = rule378 ()+ _hdOisLast = rule379 _tlIisNil+ _lhsOcomments :: [String]+ _lhsOcomments = rule380 _hdIcomments _tlIcomments+ _lhsOsemDom :: [Decl]+ _lhsOsemDom = rule381 _hdIsemDom _tlIsemDom+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule382 _hdIsemDomUnfoldGath _tlIsemDomUnfoldGath+ _lhsOwrapDecls :: Decls+ _lhsOwrapDecls = rule383 _hdIwrapDecls _tlIwrapDecls+ _hdOinh = rule384 _lhsIinh+ _hdOnr = rule385 _lhsInr+ _hdOnt = rule386 _lhsInt+ _hdOo_case = rule387 _lhsIo_case+ _hdOo_cata = rule388 _lhsIo_cata+ _hdOo_clean = rule389 _lhsIo_clean+ _hdOo_costcentre = rule390 _lhsIo_costcentre+ _hdOo_data = rule391 _lhsIo_data+ _hdOo_linePragmas = rule392 _lhsIo_linePragmas+ _hdOo_monadic = rule393 _lhsIo_monadic+ _hdOo_newtypes = rule394 _lhsIo_newtypes+ _hdOo_pretty = rule395 _lhsIo_pretty+ _hdOo_rename = rule396 _lhsIo_rename+ _hdOo_sem = rule397 _lhsIo_sem+ _hdOo_sig = rule398 _lhsIo_sig+ _hdOo_splitsems = rule399 _lhsIo_splitsems+ _hdOo_strictwrap = rule400 _lhsIo_strictwrap+ _hdOo_traces = rule401 _lhsIo_traces+ _hdOo_unbox = rule402 _lhsIo_unbox+ _hdOoptions = rule403 _lhsIoptions+ _hdOparamMap = rule404 _lhsIparamMap+ _hdOprefix = rule405 _lhsIprefix+ _hdOsyn = rule406 _lhsIsyn+ _tlOinh = rule407 _lhsIinh+ _tlOnt = rule408 _lhsInt+ _tlOo_case = rule409 _lhsIo_case+ _tlOo_cata = rule410 _lhsIo_cata+ _tlOo_clean = rule411 _lhsIo_clean+ _tlOo_costcentre = rule412 _lhsIo_costcentre+ _tlOo_data = rule413 _lhsIo_data+ _tlOo_linePragmas = rule414 _lhsIo_linePragmas+ _tlOo_monadic = rule415 _lhsIo_monadic+ _tlOo_newtypes = rule416 _lhsIo_newtypes+ _tlOo_pretty = rule417 _lhsIo_pretty+ _tlOo_rename = rule418 _lhsIo_rename+ _tlOo_sem = rule419 _lhsIo_sem+ _tlOo_sig = rule420 _lhsIo_sig+ _tlOo_splitsems = rule421 _lhsIo_splitsems+ _tlOo_strictwrap = rule422 _lhsIo_strictwrap+ _tlOo_traces = rule423 _lhsIo_traces+ _tlOo_unbox = rule424 _lhsIo_unbox+ _tlOoptions = rule425 _lhsIoptions+ _tlOparamMap = rule426 _lhsIparamMap+ _tlOprefix = rule427 _lhsIprefix+ _tlOsyn = rule428 _lhsIsyn+ __result_ = T_CSegments_vOut25 _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls+ in __result_ )+ in C_CSegments_s26 v25+ {-# INLINE rule377 #-}+ {-# LINE 288 "./src-ag/GenerateCode.ag" #-}+ rule377 = \ ((_lhsInr) :: Int) ->+ {-# LINE 288 "./src-ag/GenerateCode.ag" #-}+ _lhsInr + 1+ {-# LINE 2962 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule378 #-}+ {-# LINE 301 "./src-ag/GenerateCode.ag" #-}+ rule378 = \ (_ :: ()) ->+ {-# LINE 301 "./src-ag/GenerateCode.ag" #-}+ False+ {-# LINE 2968 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule379 #-}+ {-# LINE 302 "./src-ag/GenerateCode.ag" #-}+ rule379 = \ ((_tlIisNil) :: Bool) ->+ {-# LINE 302 "./src-ag/GenerateCode.ag" #-}+ _tlIisNil+ {-# LINE 2974 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule380 #-}+ rule380 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->+ _hdIcomments ++ _tlIcomments+ {-# INLINE rule381 #-}+ rule381 = \ ((_hdIsemDom) :: [Decl]) ((_tlIsemDom) :: [Decl]) ->+ _hdIsemDom ++ _tlIsemDom+ {-# INLINE rule382 #-}+ rule382 = \ ((_hdIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ((_tlIsemDomUnfoldGath) :: Map (NontermIdent, Int) ([String], Code.Type)) ->+ _hdIsemDomUnfoldGath `Map.union` _tlIsemDomUnfoldGath+ {-# INLINE rule383 #-}+ rule383 = \ ((_hdIwrapDecls) :: Decls) ((_tlIwrapDecls) :: Decls) ->+ _hdIwrapDecls ++ _tlIwrapDecls+ {-# INLINE rule384 #-}+ rule384 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule385 #-}+ rule385 = \ ((_lhsInr) :: Int) ->+ _lhsInr+ {-# INLINE rule386 #-}+ rule386 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule387 #-}+ rule387 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule388 #-}+ rule388 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule389 #-}+ rule389 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule390 #-}+ rule390 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule391 #-}+ rule391 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule392 #-}+ rule392 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule393 #-}+ rule393 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule395 #-}+ rule395 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule396 #-}+ rule396 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule397 #-}+ rule397 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule398 #-}+ rule398 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule399 #-}+ rule399 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule400 #-}+ rule400 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule401 #-}+ rule401 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule402 #-}+ rule402 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule403 #-}+ rule403 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule404 #-}+ rule404 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule405 #-}+ rule405 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule406 #-}+ rule406 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule407 #-}+ rule407 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule408 #-}+ rule408 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule409 #-}+ rule409 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule410 #-}+ rule410 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule411 #-}+ rule411 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule412 #-}+ rule412 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule413 #-}+ rule413 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule414 #-}+ rule414 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule415 #-}+ rule415 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule416 #-}+ rule416 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule417 #-}+ rule417 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule418 #-}+ rule418 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule419 #-}+ rule419 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule420 #-}+ rule420 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule421 #-}+ rule421 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule422 #-}+ rule422 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule423 #-}+ rule423 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule424 #-}+ rule424 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule425 #-}+ rule425 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule426 #-}+ rule426 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule427 #-}+ rule427 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule428 #-}+ rule428 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+{-# NOINLINE sem_CSegments_Nil #-}+sem_CSegments_Nil :: T_CSegments +sem_CSegments_Nil = T_CSegments (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_CSegments_v25 + v25 = \ (T_CSegments_vIn25 _lhsIinh _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamMap _lhsIprefix _lhsIsyn) -> ( let+ _lhsOisNil :: Bool+ _lhsOisNil = rule429 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule430 ()+ _lhsOsemDom :: [Decl]+ _lhsOsemDom = rule431 ()+ _lhsOsemDomUnfoldGath :: Map (NontermIdent, Int) ([String], Code.Type)+ _lhsOsemDomUnfoldGath = rule432 ()+ _lhsOwrapDecls :: Decls+ _lhsOwrapDecls = rule433 ()+ __result_ = T_CSegments_vOut25 _lhsOcomments _lhsOisNil _lhsOsemDom _lhsOsemDomUnfoldGath _lhsOwrapDecls+ in __result_ )+ in C_CSegments_s26 v25+ {-# INLINE rule429 #-}+ {-# LINE 303 "./src-ag/GenerateCode.ag" #-}+ rule429 = \ (_ :: ()) ->+ {-# LINE 303 "./src-ag/GenerateCode.ag" #-}+ True+ {-# LINE 3147 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule430 #-}+ rule430 = \ (_ :: ()) ->+ []+ {-# INLINE rule431 #-}+ rule431 = \ (_ :: ()) ->+ []+ {-# INLINE rule432 #-}+ rule432 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule433 #-}+ rule433 = \ (_ :: ()) ->+ []++-- CVisit ------------------------------------------------------+-- wrapper+data Inh_CVisit = Inh_CVisit { allNts_Inh_CVisit :: (Set NontermIdent), allPragmas_Inh_CVisit :: (PragmaMap), aroundMap_Inh_CVisit :: (Set Identifier), children_Inh_CVisit :: ([(Identifier,Type, ChildKind)]), con_Inh_CVisit :: (ConstructorIdent), contextMap_Inh_CVisit :: (ContextMap), decls_Inh_CVisit :: (Decls), inh_Inh_CVisit :: (Attributes), instVisitNrs_Inh_CVisit :: (Map Identifier Int), isLast_Inh_CVisit :: (Bool), mergeMap_Inh_CVisit :: (Map Identifier (Identifier, [Identifier])), nextIntra_Inh_CVisit :: (Exprs), nextIntraVars_Inh_CVisit :: (Set String), nr_Inh_CVisit :: (Int), nt_Inh_CVisit :: (NontermIdent), o_case_Inh_CVisit :: (Bool), o_cata_Inh_CVisit :: (Bool), o_clean_Inh_CVisit :: (Bool), o_costcentre_Inh_CVisit :: (Bool), o_data_Inh_CVisit :: (Maybe Bool), o_linePragmas_Inh_CVisit :: (Bool), o_monadic_Inh_CVisit :: (Bool), o_newtypes_Inh_CVisit :: (Bool), o_pretty_Inh_CVisit :: (Bool), o_rename_Inh_CVisit :: (Bool), o_sem_Inh_CVisit :: (Bool), o_sig_Inh_CVisit :: (Bool), o_splitsems_Inh_CVisit :: (Bool), o_strictwrap_Inh_CVisit :: (Bool), o_traces_Inh_CVisit :: (Bool), o_unbox_Inh_CVisit :: (Bool), options_Inh_CVisit :: (Options), paramInstMap_Inh_CVisit :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_CVisit :: (ParamMap), prefix_Inh_CVisit :: (String), quantMap_Inh_CVisit :: (QuantMap), syn_Inh_CVisit :: (Attributes), terminals_Inh_CVisit :: ([Identifier]), unfoldSemDom_Inh_CVisit :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_CVisit :: (Set Identifier), with_sig_Inh_CVisit :: (Bool), wrappers_Inh_CVisit :: (Set NontermIdent) }+data Syn_CVisit = Syn_CVisit { comments_Syn_CVisit :: ([String]), decls_Syn_CVisit :: (Decls), gatherInstVisitNrs_Syn_CVisit :: (Map Identifier Int), intra_Syn_CVisit :: (Exprs), intraVars_Syn_CVisit :: (Set String), semNames_Syn_CVisit :: ([String]), visitedSet_Syn_CVisit :: (Set Identifier) }+{-# INLINABLE wrap_CVisit #-}+wrap_CVisit :: T_CVisit -> Inh_CVisit -> (Syn_CVisit )+wrap_CVisit (T_CVisit act) (Inh_CVisit _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CVisit_vIn28 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers+ (T_CVisit_vOut28 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet) <- return (inv_CVisit_s29 sem arg)+ return (Syn_CVisit _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet)+ )++-- cata+{-# INLINE sem_CVisit #-}+sem_CVisit :: CVisit -> T_CVisit +sem_CVisit ( CVisit inh_ syn_ vss_ intra_ ordered_ ) = sem_CVisit_CVisit inh_ syn_ ( sem_Sequence vss_ ) ( sem_Sequence intra_ ) ordered_++-- semantic domain+newtype T_CVisit = T_CVisit {+ attach_T_CVisit :: Identity (T_CVisit_s29 )+ }+newtype T_CVisit_s29 = C_CVisit_s29 {+ inv_CVisit_s29 :: (T_CVisit_v28 )+ }+data T_CVisit_s30 = C_CVisit_s30+type T_CVisit_v28 = (T_CVisit_vIn28 ) -> (T_CVisit_vOut28 )+data T_CVisit_vIn28 = T_CVisit_vIn28 (Set NontermIdent) (PragmaMap) (Set Identifier) ([(Identifier,Type, ChildKind)]) (ConstructorIdent) (ContextMap) (Decls) (Attributes) (Map Identifier Int) (Bool) (Map Identifier (Identifier, [Identifier])) (Exprs) (Set String) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (QuantMap) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (Bool) (Set NontermIdent)+data T_CVisit_vOut28 = T_CVisit_vOut28 ([String]) (Decls) (Map Identifier Int) (Exprs) (Set String) ([String]) (Set Identifier)+{-# NOINLINE sem_CVisit_CVisit #-}+sem_CVisit_CVisit :: (Attributes) -> (Attributes) -> T_Sequence -> T_Sequence -> (Bool) -> T_CVisit +sem_CVisit_CVisit arg_inh_ arg_syn_ arg_vss_ arg_intra_ arg_ordered_ = T_CVisit (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_CVisit_v28 + v28 = \ (T_CVisit_vIn28 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIdecls _lhsIinh _lhsIinstVisitNrs _lhsIisLast _lhsImergeMap _lhsInextIntra _lhsInextIntraVars _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) -> ( let+ _vssX47 = Control.Monad.Identity.runIdentity (attach_T_Sequence (arg_vss_))+ _intraX47 = Control.Monad.Identity.runIdentity (attach_T_Sequence (arg_intra_))+ (T_Sequence_vOut46 _vssIallTpsFound _vssIblockDecls _vssIcomments _vssIdecls _vssIdeclsAbove _vssIdefinedInsts _vssIexprs _vssItSigs _vssItps _vssIusedVars _vssIvisitedSet) = inv_Sequence_s47 _vssX47 (T_Sequence_vIn46 _vssOallNts _vssOaroundMap _vssOchildren _vssOcon _vssOdeclsAbove _vssOinh _vssOinstVisitNrs _vssOlastExpr _vssOmergeMap _vssOnr _vssOnt _vssOo_case _vssOo_cata _vssOo_clean _vssOo_costcentre _vssOo_data _vssOo_linePragmas _vssOo_monadic _vssOo_newtypes _vssOo_pretty _vssOo_rename _vssOo_sem _vssOo_sig _vssOo_splitsems _vssOo_strictwrap _vssOo_traces _vssOo_unbox _vssOoptions _vssOparamInstMap _vssOparamMap _vssOprefix _vssOsyn _vssOterminals _vssOunfoldSemDom _vssOvisitedSet _vssOwhat)+ (T_Sequence_vOut46 _intraIallTpsFound _intraIblockDecls _intraIcomments _intraIdecls _intraIdeclsAbove _intraIdefinedInsts _intraIexprs _intraItSigs _intraItps _intraIusedVars _intraIvisitedSet) = inv_Sequence_s47 _intraX47 (T_Sequence_vIn46 _intraOallNts _intraOaroundMap _intraOchildren _intraOcon _intraOdeclsAbove _intraOinh _intraOinstVisitNrs _intraOlastExpr _intraOmergeMap _intraOnr _intraOnt _intraOo_case _intraOo_cata _intraOo_clean _intraOo_costcentre _intraOo_data _intraOo_linePragmas _intraOo_monadic _intraOo_newtypes _intraOo_pretty _intraOo_rename _intraOo_sem _intraOo_sig _intraOo_splitsems _intraOo_strictwrap _intraOo_traces _intraOo_unbox _intraOoptions _intraOparamInstMap _intraOparamMap _intraOprefix _intraOsyn _intraOterminals _intraOunfoldSemDom _intraOvisitedSet _intraOwhat)+ _lhsOintra :: Exprs+ _lhsOintra = rule434 _intraIexprs+ _lhsOintraVars :: Set String+ _lhsOintraVars = rule435 _intraIusedVars+ (_higherOrderChildren,_firstOrderChildren) = rule436 _lhsIchildren+ _firstOrderOrig = rule437 _firstOrderChildren+ _funcname = rule438 _lhsIcon _lhsInr _lhsInt _lhsIprefix+ _nextVisitName = rule439 _lhsIisLast _lhsInr _lhsInt _lhsIprefix+ _nextVisitDecl = rule440 _lhsIcon _lhsIdecls _lhsIisLast _lhsInextIntraVars _lhsInr _lhsInt _lhsIprefix _nextVisitName+ _isOneVisit = rule441 _lhsIisLast _lhsInr+ _hasWrappers = rule442 _lhsInt _lhsIwrappers+ _refDecls = rule443 _hasWrappers _isOneVisit _lhsInt _lhsIoptions arg_syn_+ _decls = rule444 _lhsIo_clean _nextVisitDecl _refDecls _typeSigs _vssIdecls+ _vssOlastExpr = rule445 _lhsIo_unbox _lhsIoptions _nextVisitName arg_inh_ arg_syn_+ _intraOlastExpr = rule446 ()+ _lastExprVars = rule447 _lhsIoptions _nextVisitName arg_syn_+ (_blockFunDecls,_blockFirstFunCall) = rule448 _funcname _lastExprVars _nextVisitDecl _o_case _vssIblockDecls+ _costCentreDescr = rule449 _lhsIcon _lhsInr _lhsInt+ _addCostCentre = rule450 _costCentreDescr _lhsIo_costcentre+ _params = rule451 _lhsInt _lhsIparamMap+ _semFun = rule452 _addCostCentre _blockFirstFunCall _decls _declsType _firstOrderOrig _funcname _lhsInr _lhsInt _lhsIo_newtypes _lhsIo_unbox _lhsIoptions _lhsIunfoldSemDom _nextVisitName _o_splitsems _params arg_inh_ arg_ordered_ arg_syn_+ _tsig = rule453 _funcname _semType+ _semType = rule454 _firstOrderOrig _lhsIcontextMap _lhsInr _lhsInt _lhsIoptions _lhsIquantMap _params+ _lhsOdecls :: Decls+ _lhsOdecls = rule455 _blockFunDecls _lhsIwith_sig _o_splitsems _semFun _tsig arg_ordered_+ _typeSigs = rule456 _lhsIo_sig _o_case _vssItSigs+ _o_do = rule457 _lhsIo_monadic arg_ordered_+ _o_case = rule458 _lhsIallPragmas _lhsIcon _lhsInt _lhsIo_case _o_do arg_ordered_+ _declsType = rule459 _o_case _o_do+ _o_splitsems = rule460 _lhsIo_splitsems arg_ordered_+ _lhsOgatherInstVisitNrs :: Map Identifier Int+ _lhsOgatherInstVisitNrs = rule461 _lhsInr _vssIdefinedInsts+ _vssOdeclsAbove = rule462 ()+ _intraOdeclsAbove = rule463 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule464 _intraIcomments _lhsInr _vssIcomments+ _vssOwhat = rule465 ()+ _intraOwhat = rule466 ()+ _lhsOsemNames :: [String]+ _lhsOsemNames = rule467 _funcname+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule468 _intraIvisitedSet+ _vssOallNts = rule469 _lhsIallNts+ _vssOaroundMap = rule470 _lhsIaroundMap+ _vssOchildren = rule471 _lhsIchildren+ _vssOcon = rule472 _lhsIcon+ _vssOinh = rule473 _lhsIinh+ _vssOinstVisitNrs = rule474 _lhsIinstVisitNrs+ _vssOmergeMap = rule475 _lhsImergeMap+ _vssOnr = rule476 _lhsInr+ _vssOnt = rule477 _lhsInt+ _vssOo_case = rule478 _o_case+ _vssOo_cata = rule479 _lhsIo_cata+ _vssOo_clean = rule480 _lhsIo_clean+ _vssOo_costcentre = rule481 _lhsIo_costcentre+ _vssOo_data = rule482 _lhsIo_data+ _vssOo_linePragmas = rule483 _lhsIo_linePragmas+ _vssOo_monadic = rule484 _lhsIo_monadic+ _vssOo_newtypes = rule485 _lhsIo_newtypes+ _vssOo_pretty = rule486 _lhsIo_pretty+ _vssOo_rename = rule487 _lhsIo_rename+ _vssOo_sem = rule488 _lhsIo_sem+ _vssOo_sig = rule489 _lhsIo_sig+ _vssOo_splitsems = rule490 _o_splitsems+ _vssOo_strictwrap = rule491 _lhsIo_strictwrap+ _vssOo_traces = rule492 _lhsIo_traces+ _vssOo_unbox = rule493 _lhsIo_unbox+ _vssOoptions = rule494 _lhsIoptions+ _vssOparamInstMap = rule495 _lhsIparamInstMap+ _vssOparamMap = rule496 _lhsIparamMap+ _vssOprefix = rule497 _lhsIprefix+ _vssOsyn = rule498 _lhsIsyn+ _vssOterminals = rule499 _lhsIterminals+ _vssOunfoldSemDom = rule500 _lhsIunfoldSemDom+ _vssOvisitedSet = rule501 _lhsIvisitedSet+ _intraOallNts = rule502 _lhsIallNts+ _intraOaroundMap = rule503 _lhsIaroundMap+ _intraOchildren = rule504 _lhsIchildren+ _intraOcon = rule505 _lhsIcon+ _intraOinh = rule506 _lhsIinh+ _intraOinstVisitNrs = rule507 _lhsIinstVisitNrs+ _intraOmergeMap = rule508 _lhsImergeMap+ _intraOnr = rule509 _lhsInr+ _intraOnt = rule510 _lhsInt+ _intraOo_case = rule511 _o_case+ _intraOo_cata = rule512 _lhsIo_cata+ _intraOo_clean = rule513 _lhsIo_clean+ _intraOo_costcentre = rule514 _lhsIo_costcentre+ _intraOo_data = rule515 _lhsIo_data+ _intraOo_linePragmas = rule516 _lhsIo_linePragmas+ _intraOo_monadic = rule517 _lhsIo_monadic+ _intraOo_newtypes = rule518 _lhsIo_newtypes+ _intraOo_pretty = rule519 _lhsIo_pretty+ _intraOo_rename = rule520 _lhsIo_rename+ _intraOo_sem = rule521 _lhsIo_sem+ _intraOo_sig = rule522 _lhsIo_sig+ _intraOo_splitsems = rule523 _o_splitsems+ _intraOo_strictwrap = rule524 _lhsIo_strictwrap+ _intraOo_traces = rule525 _lhsIo_traces+ _intraOo_unbox = rule526 _lhsIo_unbox+ _intraOoptions = rule527 _lhsIoptions+ _intraOparamInstMap = rule528 _lhsIparamInstMap+ _intraOparamMap = rule529 _lhsIparamMap+ _intraOprefix = rule530 _lhsIprefix+ _intraOsyn = rule531 _lhsIsyn+ _intraOterminals = rule532 _lhsIterminals+ _intraOunfoldSemDom = rule533 _lhsIunfoldSemDom+ _intraOvisitedSet = rule534 _vssIvisitedSet+ __result_ = T_CVisit_vOut28 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOsemNames _lhsOvisitedSet+ in __result_ )+ in C_CVisit_s29 v28+ {-# INLINE rule434 #-}+ {-# LINE 312 "./src-ag/GenerateCode.ag" #-}+ rule434 = \ ((_intraIexprs) :: Exprs) ->+ {-# LINE 312 "./src-ag/GenerateCode.ag" #-}+ _intraIexprs+ {-# LINE 3318 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule435 #-}+ {-# LINE 313 "./src-ag/GenerateCode.ag" #-}+ rule435 = \ ((_intraIusedVars) :: Set String) ->+ {-# LINE 313 "./src-ag/GenerateCode.ag" #-}+ _intraIusedVars+ {-# LINE 3324 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule436 #-}+ {-# LINE 443 "./src-ag/GenerateCode.ag" #-}+ rule436 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->+ {-# LINE 443 "./src-ag/GenerateCode.ag" #-}+ partition (\(_,_,virt) -> isHigherOrder virt) _lhsIchildren+ {-# LINE 3330 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule437 #-}+ {-# LINE 444 "./src-ag/GenerateCode.ag" #-}+ rule437 = \ _firstOrderChildren ->+ {-# LINE 444 "./src-ag/GenerateCode.ag" #-}+ map pickOrigType _firstOrderChildren+ {-# LINE 3336 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule438 #-}+ {-# LINE 445 "./src-ag/GenerateCode.ag" #-}+ rule438 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) ->+ {-# LINE 445 "./src-ag/GenerateCode.ag" #-}+ seqSemname _lhsIprefix _lhsInt _lhsIcon _lhsInr+ {-# LINE 3342 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule439 #-}+ {-# LINE 446 "./src-ag/GenerateCode.ag" #-}+ rule439 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) ->+ {-# LINE 446 "./src-ag/GenerateCode.ag" #-}+ if _lhsIisLast then [] else [visitname _lhsIprefix _lhsInt (_lhsInr+1)]+ {-# LINE 3348 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule440 #-}+ {-# LINE 447 "./src-ag/GenerateCode.ag" #-}+ rule440 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsIdecls) :: Decls) ((_lhsIisLast) :: Bool) ((_lhsInextIntraVars) :: Set String) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIprefix) :: String) _nextVisitName ->+ {-# LINE 447 "./src-ag/GenerateCode.ag" #-}+ let lhs = TupleLhs _nextVisitName+ rhs = Let _lhsIdecls (SimpleExpr fun)+ fun = seqSemname _lhsIprefix _lhsInt _lhsIcon (_lhsInr+1)+ in if _lhsIisLast+ then []+ else [Decl lhs rhs (Set.fromList _nextVisitName) _lhsInextIntraVars]+ {-# LINE 3359 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule441 #-}+ {-# LINE 454 "./src-ag/GenerateCode.ag" #-}+ rule441 = \ ((_lhsIisLast) :: Bool) ((_lhsInr) :: Int) ->+ {-# LINE 454 "./src-ag/GenerateCode.ag" #-}+ _lhsIisLast && _lhsInr == 0+ {-# LINE 3365 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule442 #-}+ {-# LINE 455 "./src-ag/GenerateCode.ag" #-}+ rule442 = \ ((_lhsInt) :: NontermIdent) ((_lhsIwrappers) :: Set NontermIdent) ->+ {-# LINE 455 "./src-ag/GenerateCode.ag" #-}+ _lhsInt `Set.member` _lhsIwrappers+ {-# LINE 3371 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule443 #-}+ {-# LINE 456 "./src-ag/GenerateCode.ag" #-}+ rule443 = \ _hasWrappers _isOneVisit ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) syn_ ->+ {-# LINE 456 "./src-ag/GenerateCode.ag" #-}+ if _isOneVisit && _hasWrappers && reference _lhsIoptions+ then let synAttrs = Map.toList syn_+ synNT = "Syn" ++ "_" ++ getName _lhsInt+ synVars = [ SimpleExpr (attrname _lhsIoptions False _LHS a) | (a,_) <- synAttrs ]+ rhs = App synNT synVars+ lhs = Fun "___node" []+ in [Decl lhs rhs Set.empty Set.empty]+ else []+ {-# LINE 3384 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule444 #-}+ {-# LINE 464 "./src-ag/GenerateCode.ag" #-}+ rule444 = \ ((_lhsIo_clean) :: Bool) _nextVisitDecl _refDecls _typeSigs ((_vssIdecls) :: Decls) ->+ {-# LINE 464 "./src-ag/GenerateCode.ag" #-}+ if _lhsIo_clean+ then _vssIdecls ++ _nextVisitDecl ++ _refDecls+ else _typeSigs ++ _vssIdecls ++ _nextVisitDecl ++ _refDecls+ {-# LINE 3392 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule445 #-}+ {-# LINE 467 "./src-ag/GenerateCode.ag" #-}+ rule445 = \ ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) _nextVisitName inh_ syn_ ->+ {-# LINE 467 "./src-ag/GenerateCode.ag" #-}+ mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_) $ map (SimpleExpr . lhsname _lhsIoptions False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName+ {-# LINE 3398 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule446 #-}+ {-# LINE 468 "./src-ag/GenerateCode.ag" #-}+ rule446 = \ (_ :: ()) ->+ {-# LINE 468 "./src-ag/GenerateCode.ag" #-}+ error "lastExpr: not used here"+ {-# LINE 3404 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule447 #-}+ {-# LINE 469 "./src-ag/GenerateCode.ag" #-}+ rule447 = \ ((_lhsIoptions) :: Options) _nextVisitName syn_ ->+ {-# LINE 469 "./src-ag/GenerateCode.ag" #-}+ map (lhsname _lhsIoptions False) (Map.keys syn_) ++ _nextVisitName+ {-# LINE 3410 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule448 #-}+ {-# LINE 470 "./src-ag/GenerateCode.ag" #-}+ rule448 = \ _funcname _lastExprVars _nextVisitDecl _o_case ((_vssIblockDecls) :: DeclBlocks) ->+ {-# LINE 470 "./src-ag/GenerateCode.ag" #-}+ mkPartitionedFunction _funcname _o_case _nextVisitDecl _lastExprVars _vssIblockDecls+ {-# LINE 3416 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule449 #-}+ {-# LINE 472 "./src-ag/GenerateCode.ag" #-}+ rule449 = \ ((_lhsIcon) :: ConstructorIdent) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ->+ {-# LINE 472 "./src-ag/GenerateCode.ag" #-}+ "b" ++ ":" ++ show _lhsInt ++ ":" ++ show _lhsIcon ++ ":" ++ show _lhsInr+ {-# LINE 3422 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule450 #-}+ {-# LINE 473 "./src-ag/GenerateCode.ag" #-}+ rule450 = \ _costCentreDescr ((_lhsIo_costcentre) :: Bool) ->+ {-# LINE 473 "./src-ag/GenerateCode.ag" #-}+ \v -> if _lhsIo_costcentre+ then PragmaExpr True False ("SCC \"" ++ _costCentreDescr ++ "\"") v+ else v+ {-# LINE 3430 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule451 #-}+ {-# LINE 477 "./src-ag/GenerateCode.ag" #-}+ rule451 = \ ((_lhsInt) :: NontermIdent) ((_lhsIparamMap) :: ParamMap) ->+ {-# LINE 477 "./src-ag/GenerateCode.ag" #-}+ map getName $ Map.findWithDefault [] _lhsInt _lhsIparamMap+ {-# LINE 3436 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule452 #-}+ {-# LINE 478 "./src-ag/GenerateCode.ag" #-}+ rule452 = \ _addCostCentre _blockFirstFunCall _decls _declsType _firstOrderOrig _funcname ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIo_newtypes) :: Bool) ((_lhsIo_unbox) :: Bool) ((_lhsIoptions) :: Options) ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) _nextVisitName _o_splitsems _params inh_ ordered_ syn_ ->+ {-# LINE 478 "./src-ag/GenerateCode.ag" #-}+ let lhs = Fun _funcname lhs_args+ lhs_args = if _lhsInr == 0 then map field _firstOrderOrig else []+ field (name,NT tp tps _,_) = let unwrap | _lhsIo_newtypes = \x -> App (sdtype tp) [x]+ | otherwise = id+ addType expr | null tps = expr+ | otherwise = TypedExpr expr (_lhsIunfoldSemDom tp 0 tps)+ in unwrap $ addType $ SimpleExpr $ funname name 0+ field (name,tp,_) = let expr = SimpleExpr (funname name 0)+ in if null _params+ then expr+ else TypedExpr expr (idEvalType _lhsIoptions $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp)+ mbEvalTp | null _params = const Nothing+ | otherwise = Just . (idEvalType _lhsIoptions)+ rhs = wrap+ . mkSemFun _lhsInt _lhsInr [mkLambdaArg (lhsname _lhsIoptions True nm) (mbEvalTp $ typeToCodeType (Just _lhsInt) _params $ removeDeforested tp) | (nm,tp) <- Map.assocs inh_]+ $ _addCostCentre+ $ if ordered_ && _o_splitsems+ then _blockFirstFunCall+ else mkDecls _declsType _decls+ . ResultExpr (typeName _lhsInt _lhsInr)+ . mkTupleExpr _lhsIo_unbox (null $ Map.keys inh_)+ $ map (SimpleExpr . lhsname _lhsIoptions False) (Map.keys syn_) ++ map SimpleExpr _nextVisitName+ wrap = if _lhsIo_newtypes+ then \x -> App (typeName _lhsInt _lhsInr) [x]+ else id+ in Decl lhs rhs Set.empty Set.empty+ {-# LINE 3467 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule453 #-}+ {-# LINE 509 "./src-ag/GenerateCode.ag" #-}+ rule453 = \ _funcname _semType ->+ {-# LINE 509 "./src-ag/GenerateCode.ag" #-}+ TSig _funcname _semType+ {-# LINE 3473 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule454 #-}+ {-# LINE 510 "./src-ag/GenerateCode.ag" #-}+ rule454 = \ _firstOrderOrig ((_lhsIcontextMap) :: ContextMap) ((_lhsInr) :: Int) ((_lhsInt) :: NontermIdent) ((_lhsIoptions) :: Options) ((_lhsIquantMap) :: QuantMap) _params ->+ {-# LINE 510 "./src-ag/GenerateCode.ag" #-}+ let argType (NT tp tps _) r | tp /= _SELF = typeAppStrs (sdtype tp) tps `Arr` r+ | tp == _SELF = error "GenerateCode: found an intra-type with type SELF, which should have been prevented by CRule.tps"+ argType (Haskell tp) r = SimpleType tp `Arr` r+ argType _ _ = error "Self type not allowed here"+ evalTp | null _params = id+ | otherwise = idEvalType _lhsIoptions+ in appQuant _lhsIquantMap _lhsInt $ appContext _lhsIcontextMap _lhsInt $ evalTp $+ if _lhsInr == 0+ then foldr argType (typeAppStrs (sdtype _lhsInt ) _params ) (map (\(_,t,_) -> t) _firstOrderOrig )+ else foldr argType (typeAppStrs (typeName _lhsInt _lhsInr) _params ) []+ {-# LINE 3488 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule455 #-}+ {-# LINE 521 "./src-ag/GenerateCode.ag" #-}+ rule455 = \ _blockFunDecls ((_lhsIwith_sig) :: Bool) _o_splitsems _semFun _tsig ordered_ ->+ {-# LINE 521 "./src-ag/GenerateCode.ag" #-}+ ( if _lhsIwith_sig+ then [_tsig, _semFun]+ else [_semFun]+ ) +++ ( if ordered_ && _o_splitsems+ then _blockFunDecls+ else []+ )+ {-# LINE 3501 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule456 #-}+ {-# LINE 529 "./src-ag/GenerateCode.ag" #-}+ rule456 = \ ((_lhsIo_sig) :: Bool) _o_case ((_vssItSigs) :: [Decl]) ->+ {-# LINE 529 "./src-ag/GenerateCode.ag" #-}+ if _lhsIo_sig && not _o_case+ then _vssItSigs+ else []+ {-# LINE 3509 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule457 #-}+ {-# LINE 532 "./src-ag/GenerateCode.ag" #-}+ rule457 = \ ((_lhsIo_monadic) :: Bool) ordered_ ->+ {-# LINE 532 "./src-ag/GenerateCode.ag" #-}+ ordered_ && _lhsIo_monadic+ {-# LINE 3515 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule458 #-}+ {-# LINE 533 "./src-ag/GenerateCode.ag" #-}+ rule458 = \ ((_lhsIallPragmas) :: PragmaMap) ((_lhsIcon) :: ConstructorIdent) ((_lhsInt) :: NontermIdent) ((_lhsIo_case) :: Bool) _o_do ordered_ ->+ {-# LINE 533 "./src-ag/GenerateCode.ag" #-}+ not _o_do && _lhsIo_case && ordered_ && not (hasPragma _lhsIallPragmas _lhsInt _lhsIcon _NOCASE)+ {-# LINE 3521 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule459 #-}+ {-# LINE 534 "./src-ag/GenerateCode.ag" #-}+ rule459 = \ _o_case _o_do ->+ {-# LINE 534 "./src-ag/GenerateCode.ag" #-}+ if _o_do+ then DeclsDo+ else if _o_case+ then DeclsCase+ else DeclsLet+ {-# LINE 3531 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule460 #-}+ {-# LINE 539 "./src-ag/GenerateCode.ag" #-}+ rule460 = \ ((_lhsIo_splitsems) :: Bool) ordered_ ->+ {-# LINE 539 "./src-ag/GenerateCode.ag" #-}+ ordered_ && _lhsIo_splitsems+ {-# LINE 3537 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule461 #-}+ {-# LINE 573 "./src-ag/GenerateCode.ag" #-}+ rule461 = \ ((_lhsInr) :: Int) ((_vssIdefinedInsts) :: [Identifier]) ->+ {-# LINE 573 "./src-ag/GenerateCode.ag" #-}+ Map.fromList [(i,_lhsInr) | i <- _vssIdefinedInsts]+ {-# LINE 3543 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule462 #-}+ {-# LINE 616 "./src-ag/GenerateCode.ag" #-}+ rule462 = \ (_ :: ()) ->+ {-# LINE 616 "./src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 3549 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule463 #-}+ {-# LINE 617 "./src-ag/GenerateCode.ag" #-}+ rule463 = \ (_ :: ()) ->+ {-# LINE 617 "./src-ag/GenerateCode.ag" #-}+ error "declsAbove: not used here"+ {-# LINE 3555 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule464 #-}+ {-# LINE 900 "./src-ag/GenerateCode.ag" #-}+ rule464 = \ ((_intraIcomments) :: [String]) ((_lhsInr) :: Int) ((_vssIcomments) :: [String]) ->+ {-# LINE 900 "./src-ag/GenerateCode.ag" #-}+ let body = map ind (_vssIcomments ++ _intraIcomments)+ in if null body+ then []+ else ("visit " ++ show _lhsInr ++ ":") : body+ {-# LINE 3564 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule465 #-}+ {-# LINE 904 "./src-ag/GenerateCode.ag" #-}+ rule465 = \ (_ :: ()) ->+ {-# LINE 904 "./src-ag/GenerateCode.ag" #-}+ "local"+ {-# LINE 3570 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule466 #-}+ {-# LINE 905 "./src-ag/GenerateCode.ag" #-}+ rule466 = \ (_ :: ()) ->+ {-# LINE 905 "./src-ag/GenerateCode.ag" #-}+ "intra"+ {-# LINE 3576 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule467 #-}+ {-# LINE 1167 "./src-ag/GenerateCode.ag" #-}+ rule467 = \ _funcname ->+ {-# LINE 1167 "./src-ag/GenerateCode.ag" #-}+ [_funcname ]+ {-# LINE 3582 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule468 #-}+ rule468 = \ ((_intraIvisitedSet) :: Set Identifier) ->+ _intraIvisitedSet+ {-# INLINE rule469 #-}+ rule469 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule470 #-}+ rule470 = \ ((_lhsIaroundMap) :: Set Identifier) ->+ _lhsIaroundMap+ {-# INLINE rule471 #-}+ rule471 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->+ _lhsIchildren+ {-# INLINE rule472 #-}+ rule472 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule473 #-}+ rule473 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule474 #-}+ rule474 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->+ _lhsIinstVisitNrs+ {-# INLINE rule475 #-}+ rule475 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule476 #-}+ rule476 = \ ((_lhsInr) :: Int) ->+ _lhsInr+ {-# INLINE rule477 #-}+ rule477 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule478 #-}+ rule478 = \ _o_case ->+ _o_case+ {-# INLINE rule479 #-}+ rule479 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule480 #-}+ rule480 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule481 #-}+ rule481 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule482 #-}+ rule482 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule483 #-}+ rule483 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule484 #-}+ rule484 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule485 #-}+ rule485 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule486 #-}+ rule486 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule487 #-}+ rule487 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule488 #-}+ rule488 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule489 #-}+ rule489 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule490 #-}+ rule490 = \ _o_splitsems ->+ _o_splitsems+ {-# INLINE rule491 #-}+ rule491 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule492 #-}+ rule492 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule493 #-}+ rule493 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule494 #-}+ rule494 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule495 #-}+ rule495 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->+ _lhsIparamInstMap+ {-# INLINE rule496 #-}+ rule496 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule497 #-}+ rule497 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule498 #-}+ rule498 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule499 #-}+ rule499 = \ ((_lhsIterminals) :: [Identifier]) ->+ _lhsIterminals+ {-# INLINE rule500 #-}+ rule500 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule501 #-}+ rule501 = \ ((_lhsIvisitedSet) :: Set Identifier) ->+ _lhsIvisitedSet+ {-# INLINE rule502 #-}+ rule502 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule503 #-}+ rule503 = \ ((_lhsIaroundMap) :: Set Identifier) ->+ _lhsIaroundMap+ {-# INLINE rule504 #-}+ rule504 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->+ _lhsIchildren+ {-# INLINE rule505 #-}+ rule505 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule506 #-}+ rule506 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule507 #-}+ rule507 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->+ _lhsIinstVisitNrs+ {-# INLINE rule508 #-}+ rule508 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule509 #-}+ rule509 = \ ((_lhsInr) :: Int) ->+ _lhsInr+ {-# INLINE rule510 #-}+ rule510 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule511 #-}+ rule511 = \ _o_case ->+ _o_case+ {-# INLINE rule512 #-}+ rule512 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule513 #-}+ rule513 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule514 #-}+ rule514 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule515 #-}+ rule515 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule516 #-}+ rule516 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule517 #-}+ rule517 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule518 #-}+ rule518 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule519 #-}+ rule519 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule520 #-}+ rule520 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule521 #-}+ rule521 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule522 #-}+ rule522 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule523 #-}+ rule523 = \ _o_splitsems ->+ _o_splitsems+ {-# INLINE rule524 #-}+ rule524 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule525 #-}+ rule525 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule526 #-}+ rule526 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule527 #-}+ rule527 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule528 #-}+ rule528 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->+ _lhsIparamInstMap+ {-# INLINE rule529 #-}+ rule529 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule530 #-}+ rule530 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule531 #-}+ rule531 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule532 #-}+ rule532 = \ ((_lhsIterminals) :: [Identifier]) ->+ _lhsIterminals+ {-# INLINE rule533 #-}+ rule533 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule534 #-}+ rule534 = \ ((_vssIvisitedSet) :: Set Identifier) ->+ _vssIvisitedSet++-- CVisits -----------------------------------------------------+-- wrapper+data Inh_CVisits = Inh_CVisits { allNts_Inh_CVisits :: (Set NontermIdent), allPragmas_Inh_CVisits :: (PragmaMap), aroundMap_Inh_CVisits :: (Set Identifier), children_Inh_CVisits :: ([(Identifier,Type, ChildKind)]), con_Inh_CVisits :: (ConstructorIdent), contextMap_Inh_CVisits :: (ContextMap), inh_Inh_CVisits :: (Attributes), instVisitNrs_Inh_CVisits :: (Map Identifier Int), mergeMap_Inh_CVisits :: (Map Identifier (Identifier, [Identifier])), nr_Inh_CVisits :: (Int), nt_Inh_CVisits :: (NontermIdent), o_case_Inh_CVisits :: (Bool), o_cata_Inh_CVisits :: (Bool), o_clean_Inh_CVisits :: (Bool), o_costcentre_Inh_CVisits :: (Bool), o_data_Inh_CVisits :: (Maybe Bool), o_linePragmas_Inh_CVisits :: (Bool), o_monadic_Inh_CVisits :: (Bool), o_newtypes_Inh_CVisits :: (Bool), o_pretty_Inh_CVisits :: (Bool), o_rename_Inh_CVisits :: (Bool), o_sem_Inh_CVisits :: (Bool), o_sig_Inh_CVisits :: (Bool), o_splitsems_Inh_CVisits :: (Bool), o_strictwrap_Inh_CVisits :: (Bool), o_traces_Inh_CVisits :: (Bool), o_unbox_Inh_CVisits :: (Bool), options_Inh_CVisits :: (Options), paramInstMap_Inh_CVisits :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_CVisits :: (ParamMap), prefix_Inh_CVisits :: (String), quantMap_Inh_CVisits :: (QuantMap), syn_Inh_CVisits :: (Attributes), terminals_Inh_CVisits :: ([Identifier]), unfoldSemDom_Inh_CVisits :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_CVisits :: (Set Identifier), with_sig_Inh_CVisits :: (Bool), wrappers_Inh_CVisits :: (Set NontermIdent) }+data Syn_CVisits = Syn_CVisits { comments_Syn_CVisits :: ([String]), decls_Syn_CVisits :: (Decls), gatherInstVisitNrs_Syn_CVisits :: (Map Identifier Int), intra_Syn_CVisits :: (Exprs), intraVars_Syn_CVisits :: (Set String), isNil_Syn_CVisits :: (Bool), semNames_Syn_CVisits :: ([String]), visitedSet_Syn_CVisits :: (Set Identifier) }+{-# INLINABLE wrap_CVisits #-}+wrap_CVisits :: T_CVisits -> Inh_CVisits -> (Syn_CVisits )+wrap_CVisits (T_CVisits act) (Inh_CVisits _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_CVisits_vIn31 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers+ (T_CVisits_vOut31 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet) <- return (inv_CVisits_s32 sem arg)+ return (Syn_CVisits _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet)+ )++-- cata+{-# NOINLINE sem_CVisits #-}+sem_CVisits :: CVisits -> T_CVisits +sem_CVisits list = Prelude.foldr sem_CVisits_Cons sem_CVisits_Nil (Prelude.map sem_CVisit list)++-- semantic domain+newtype T_CVisits = T_CVisits {+ attach_T_CVisits :: Identity (T_CVisits_s32 )+ }+newtype T_CVisits_s32 = C_CVisits_s32 {+ inv_CVisits_s32 :: (T_CVisits_v31 )+ }+data T_CVisits_s33 = C_CVisits_s33+type T_CVisits_v31 = (T_CVisits_vIn31 ) -> (T_CVisits_vOut31 )+data T_CVisits_vIn31 = T_CVisits_vIn31 (Set NontermIdent) (PragmaMap) (Set Identifier) ([(Identifier,Type, ChildKind)]) (ConstructorIdent) (ContextMap) (Attributes) (Map Identifier Int) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (QuantMap) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (Bool) (Set NontermIdent)+data T_CVisits_vOut31 = T_CVisits_vOut31 ([String]) (Decls) (Map Identifier Int) (Exprs) (Set String) (Bool) ([String]) (Set Identifier)+{-# NOINLINE sem_CVisits_Cons #-}+sem_CVisits_Cons :: T_CVisit -> T_CVisits -> T_CVisits +sem_CVisits_Cons arg_hd_ arg_tl_ = T_CVisits (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_CVisits_v31 + v31 = \ (T_CVisits_vIn31 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) -> ( let+ _hdX29 = Control.Monad.Identity.runIdentity (attach_T_CVisit (arg_hd_))+ _tlX32 = Control.Monad.Identity.runIdentity (attach_T_CVisits (arg_tl_))+ (T_CVisit_vOut28 _hdIcomments _hdIdecls _hdIgatherInstVisitNrs _hdIintra _hdIintraVars _hdIsemNames _hdIvisitedSet) = inv_CVisit_s29 _hdX29 (T_CVisit_vIn28 _hdOallNts _hdOallPragmas _hdOaroundMap _hdOchildren _hdOcon _hdOcontextMap _hdOdecls _hdOinh _hdOinstVisitNrs _hdOisLast _hdOmergeMap _hdOnextIntra _hdOnextIntraVars _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_clean _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOquantMap _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwith_sig _hdOwrappers)+ (T_CVisits_vOut31 _tlIcomments _tlIdecls _tlIgatherInstVisitNrs _tlIintra _tlIintraVars _tlIisNil _tlIsemNames _tlIvisitedSet) = inv_CVisits_s32 _tlX32 (T_CVisits_vIn31 _tlOallNts _tlOallPragmas _tlOaroundMap _tlOchildren _tlOcon _tlOcontextMap _tlOinh _tlOinstVisitNrs _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_clean _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOquantMap _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwith_sig _tlOwrappers)+ _tlOnr = rule535 _lhsInr+ _lhsOisNil :: Bool+ _lhsOisNil = rule536 ()+ _hdOisLast = rule537 _tlIisNil+ _hdOnextIntra = rule538 _tlIintra+ _hdOnextIntraVars = rule539 _tlIintraVars+ _lhsOintra :: Exprs+ _lhsOintra = rule540 _hdIintra+ _lhsOintraVars :: Set String+ _lhsOintraVars = rule541 _hdIintraVars+ _lhsOdecls :: Decls+ _lhsOdecls = rule542 _hdIdecls+ _hdOdecls = rule543 _tlIdecls+ _lhsOcomments :: [String]+ _lhsOcomments = rule544 _hdIcomments _tlIcomments+ _lhsOgatherInstVisitNrs :: Map Identifier Int+ _lhsOgatherInstVisitNrs = rule545 _hdIgatherInstVisitNrs _tlIgatherInstVisitNrs+ _lhsOsemNames :: [String]+ _lhsOsemNames = rule546 _hdIsemNames _tlIsemNames+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule547 _tlIvisitedSet+ _hdOallNts = rule548 _lhsIallNts+ _hdOallPragmas = rule549 _lhsIallPragmas+ _hdOaroundMap = rule550 _lhsIaroundMap+ _hdOchildren = rule551 _lhsIchildren+ _hdOcon = rule552 _lhsIcon+ _hdOcontextMap = rule553 _lhsIcontextMap+ _hdOinh = rule554 _lhsIinh+ _hdOinstVisitNrs = rule555 _lhsIinstVisitNrs+ _hdOmergeMap = rule556 _lhsImergeMap+ _hdOnr = rule557 _lhsInr+ _hdOnt = rule558 _lhsInt+ _hdOo_case = rule559 _lhsIo_case+ _hdOo_cata = rule560 _lhsIo_cata+ _hdOo_clean = rule561 _lhsIo_clean+ _hdOo_costcentre = rule562 _lhsIo_costcentre+ _hdOo_data = rule563 _lhsIo_data+ _hdOo_linePragmas = rule564 _lhsIo_linePragmas+ _hdOo_monadic = rule565 _lhsIo_monadic+ _hdOo_newtypes = rule566 _lhsIo_newtypes+ _hdOo_pretty = rule567 _lhsIo_pretty+ _hdOo_rename = rule568 _lhsIo_rename+ _hdOo_sem = rule569 _lhsIo_sem+ _hdOo_sig = rule570 _lhsIo_sig+ _hdOo_splitsems = rule571 _lhsIo_splitsems+ _hdOo_strictwrap = rule572 _lhsIo_strictwrap+ _hdOo_traces = rule573 _lhsIo_traces+ _hdOo_unbox = rule574 _lhsIo_unbox+ _hdOoptions = rule575 _lhsIoptions+ _hdOparamInstMap = rule576 _lhsIparamInstMap+ _hdOparamMap = rule577 _lhsIparamMap+ _hdOprefix = rule578 _lhsIprefix+ _hdOquantMap = rule579 _lhsIquantMap+ _hdOsyn = rule580 _lhsIsyn+ _hdOterminals = rule581 _lhsIterminals+ _hdOunfoldSemDom = rule582 _lhsIunfoldSemDom+ _hdOvisitedSet = rule583 _lhsIvisitedSet+ _hdOwith_sig = rule584 _lhsIwith_sig+ _hdOwrappers = rule585 _lhsIwrappers+ _tlOallNts = rule586 _lhsIallNts+ _tlOallPragmas = rule587 _lhsIallPragmas+ _tlOaroundMap = rule588 _lhsIaroundMap+ _tlOchildren = rule589 _lhsIchildren+ _tlOcon = rule590 _lhsIcon+ _tlOcontextMap = rule591 _lhsIcontextMap+ _tlOinh = rule592 _lhsIinh+ _tlOinstVisitNrs = rule593 _lhsIinstVisitNrs+ _tlOmergeMap = rule594 _lhsImergeMap+ _tlOnt = rule595 _lhsInt+ _tlOo_case = rule596 _lhsIo_case+ _tlOo_cata = rule597 _lhsIo_cata+ _tlOo_clean = rule598 _lhsIo_clean+ _tlOo_costcentre = rule599 _lhsIo_costcentre+ _tlOo_data = rule600 _lhsIo_data+ _tlOo_linePragmas = rule601 _lhsIo_linePragmas+ _tlOo_monadic = rule602 _lhsIo_monadic+ _tlOo_newtypes = rule603 _lhsIo_newtypes+ _tlOo_pretty = rule604 _lhsIo_pretty+ _tlOo_rename = rule605 _lhsIo_rename+ _tlOo_sem = rule606 _lhsIo_sem+ _tlOo_sig = rule607 _lhsIo_sig+ _tlOo_splitsems = rule608 _lhsIo_splitsems+ _tlOo_strictwrap = rule609 _lhsIo_strictwrap+ _tlOo_traces = rule610 _lhsIo_traces+ _tlOo_unbox = rule611 _lhsIo_unbox+ _tlOoptions = rule612 _lhsIoptions+ _tlOparamInstMap = rule613 _lhsIparamInstMap+ _tlOparamMap = rule614 _lhsIparamMap+ _tlOprefix = rule615 _lhsIprefix+ _tlOquantMap = rule616 _lhsIquantMap+ _tlOsyn = rule617 _lhsIsyn+ _tlOterminals = rule618 _lhsIterminals+ _tlOunfoldSemDom = rule619 _lhsIunfoldSemDom+ _tlOvisitedSet = rule620 _hdIvisitedSet+ _tlOwith_sig = rule621 _lhsIwith_sig+ _tlOwrappers = rule622 _lhsIwrappers+ __result_ = T_CVisits_vOut31 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet+ in __result_ )+ in C_CVisits_s32 v31+ {-# INLINE rule535 #-}+ {-# LINE 284 "./src-ag/GenerateCode.ag" #-}+ rule535 = \ ((_lhsInr) :: Int) ->+ {-# LINE 284 "./src-ag/GenerateCode.ag" #-}+ _lhsInr + 1+ {-# LINE 3930 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule536 #-}+ {-# LINE 297 "./src-ag/GenerateCode.ag" #-}+ rule536 = \ (_ :: ()) ->+ {-# LINE 297 "./src-ag/GenerateCode.ag" #-}+ False+ {-# LINE 3936 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule537 #-}+ {-# LINE 298 "./src-ag/GenerateCode.ag" #-}+ rule537 = \ ((_tlIisNil) :: Bool) ->+ {-# LINE 298 "./src-ag/GenerateCode.ag" #-}+ _tlIisNil+ {-# LINE 3942 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule538 #-}+ {-# LINE 315 "./src-ag/GenerateCode.ag" #-}+ rule538 = \ ((_tlIintra) :: Exprs) ->+ {-# LINE 315 "./src-ag/GenerateCode.ag" #-}+ _tlIintra+ {-# LINE 3948 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule539 #-}+ {-# LINE 316 "./src-ag/GenerateCode.ag" #-}+ rule539 = \ ((_tlIintraVars) :: Set String) ->+ {-# LINE 316 "./src-ag/GenerateCode.ag" #-}+ _tlIintraVars+ {-# LINE 3954 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule540 #-}+ {-# LINE 317 "./src-ag/GenerateCode.ag" #-}+ rule540 = \ ((_hdIintra) :: Exprs) ->+ {-# LINE 317 "./src-ag/GenerateCode.ag" #-}+ _hdIintra+ {-# LINE 3960 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule541 #-}+ {-# LINE 318 "./src-ag/GenerateCode.ag" #-}+ rule541 = \ ((_hdIintraVars) :: Set String) ->+ {-# LINE 318 "./src-ag/GenerateCode.ag" #-}+ _hdIintraVars+ {-# LINE 3966 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule542 #-}+ {-# LINE 433 "./src-ag/GenerateCode.ag" #-}+ rule542 = \ ((_hdIdecls) :: Decls) ->+ {-# LINE 433 "./src-ag/GenerateCode.ag" #-}+ _hdIdecls+ {-# LINE 3972 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule543 #-}+ {-# LINE 434 "./src-ag/GenerateCode.ag" #-}+ rule543 = \ ((_tlIdecls) :: Decls) ->+ {-# LINE 434 "./src-ag/GenerateCode.ag" #-}+ _tlIdecls+ {-# LINE 3978 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule544 #-}+ rule544 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->+ _hdIcomments ++ _tlIcomments+ {-# INLINE rule545 #-}+ rule545 = \ ((_hdIgatherInstVisitNrs) :: Map Identifier Int) ((_tlIgatherInstVisitNrs) :: Map Identifier Int) ->+ _hdIgatherInstVisitNrs `Map.union` _tlIgatherInstVisitNrs+ {-# INLINE rule546 #-}+ rule546 = \ ((_hdIsemNames) :: [String]) ((_tlIsemNames) :: [String]) ->+ _hdIsemNames ++ _tlIsemNames+ {-# INLINE rule547 #-}+ rule547 = \ ((_tlIvisitedSet) :: Set Identifier) ->+ _tlIvisitedSet+ {-# INLINE rule548 #-}+ rule548 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule549 #-}+ rule549 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule550 #-}+ rule550 = \ ((_lhsIaroundMap) :: Set Identifier) ->+ _lhsIaroundMap+ {-# INLINE rule551 #-}+ rule551 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->+ _lhsIchildren+ {-# INLINE rule552 #-}+ rule552 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule553 #-}+ rule553 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule554 #-}+ rule554 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule555 #-}+ rule555 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->+ _lhsIinstVisitNrs+ {-# INLINE rule556 #-}+ rule556 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule557 #-}+ rule557 = \ ((_lhsInr) :: Int) ->+ _lhsInr+ {-# INLINE rule558 #-}+ rule558 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule559 #-}+ rule559 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule560 #-}+ rule560 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule561 #-}+ rule561 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule562 #-}+ rule562 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule563 #-}+ rule563 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule564 #-}+ rule564 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule565 #-}+ rule565 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule566 #-}+ rule566 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule567 #-}+ rule567 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule568 #-}+ rule568 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule569 #-}+ rule569 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule570 #-}+ rule570 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule571 #-}+ rule571 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule572 #-}+ rule572 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule573 #-}+ rule573 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule574 #-}+ rule574 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule575 #-}+ rule575 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule576 #-}+ rule576 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->+ _lhsIparamInstMap+ {-# INLINE rule577 #-}+ rule577 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule578 #-}+ rule578 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule579 #-}+ rule579 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule580 #-}+ rule580 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule581 #-}+ rule581 = \ ((_lhsIterminals) :: [Identifier]) ->+ _lhsIterminals+ {-# INLINE rule582 #-}+ rule582 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule583 #-}+ rule583 = \ ((_lhsIvisitedSet) :: Set Identifier) ->+ _lhsIvisitedSet+ {-# INLINE rule584 #-}+ rule584 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule585 #-}+ rule585 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+ {-# INLINE rule586 #-}+ rule586 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule587 #-}+ rule587 = \ ((_lhsIallPragmas) :: PragmaMap) ->+ _lhsIallPragmas+ {-# INLINE rule588 #-}+ rule588 = \ ((_lhsIaroundMap) :: Set Identifier) ->+ _lhsIaroundMap+ {-# INLINE rule589 #-}+ rule589 = \ ((_lhsIchildren) :: [(Identifier,Type, ChildKind)]) ->+ _lhsIchildren+ {-# INLINE rule590 #-}+ rule590 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule591 #-}+ rule591 = \ ((_lhsIcontextMap) :: ContextMap) ->+ _lhsIcontextMap+ {-# INLINE rule592 #-}+ rule592 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule593 #-}+ rule593 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->+ _lhsIinstVisitNrs+ {-# INLINE rule594 #-}+ rule594 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule595 #-}+ rule595 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule596 #-}+ rule596 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule597 #-}+ rule597 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule598 #-}+ rule598 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule599 #-}+ rule599 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule600 #-}+ rule600 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule601 #-}+ rule601 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule602 #-}+ rule602 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule603 #-}+ rule603 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule604 #-}+ rule604 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule605 #-}+ rule605 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule606 #-}+ rule606 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule607 #-}+ rule607 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule608 #-}+ rule608 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule609 #-}+ rule609 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule610 #-}+ rule610 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule611 #-}+ rule611 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule612 #-}+ rule612 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule613 #-}+ rule613 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->+ _lhsIparamInstMap+ {-# INLINE rule614 #-}+ rule614 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule615 #-}+ rule615 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule616 #-}+ rule616 = \ ((_lhsIquantMap) :: QuantMap) ->+ _lhsIquantMap+ {-# INLINE rule617 #-}+ rule617 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule618 #-}+ rule618 = \ ((_lhsIterminals) :: [Identifier]) ->+ _lhsIterminals+ {-# INLINE rule619 #-}+ rule619 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule620 #-}+ rule620 = \ ((_hdIvisitedSet) :: Set Identifier) ->+ _hdIvisitedSet+ {-# INLINE rule621 #-}+ rule621 = \ ((_lhsIwith_sig) :: Bool) ->+ _lhsIwith_sig+ {-# INLINE rule622 #-}+ rule622 = \ ((_lhsIwrappers) :: Set NontermIdent) ->+ _lhsIwrappers+{-# NOINLINE sem_CVisits_Nil #-}+sem_CVisits_Nil :: T_CVisits +sem_CVisits_Nil = T_CVisits (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_CVisits_v31 + v31 = \ (T_CVisits_vIn31 _lhsIallNts _lhsIallPragmas _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIcontextMap _lhsIinh _lhsIinstVisitNrs _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIquantMap _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwith_sig _lhsIwrappers) -> ( let+ _lhsOisNil :: Bool+ _lhsOisNil = rule623 ()+ _lhsOintra :: Exprs+ _lhsOintra = rule624 ()+ _lhsOintraVars :: Set String+ _lhsOintraVars = rule625 ()+ _lhsOdecls :: Decls+ _lhsOdecls = rule626 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule627 ()+ _lhsOgatherInstVisitNrs :: Map Identifier Int+ _lhsOgatherInstVisitNrs = rule628 ()+ _lhsOsemNames :: [String]+ _lhsOsemNames = rule629 ()+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule630 _lhsIvisitedSet+ __result_ = T_CVisits_vOut31 _lhsOcomments _lhsOdecls _lhsOgatherInstVisitNrs _lhsOintra _lhsOintraVars _lhsOisNil _lhsOsemNames _lhsOvisitedSet+ in __result_ )+ in C_CVisits_s32 v31+ {-# INLINE rule623 #-}+ {-# LINE 299 "./src-ag/GenerateCode.ag" #-}+ rule623 = \ (_ :: ()) ->+ {-# LINE 299 "./src-ag/GenerateCode.ag" #-}+ True+ {-# LINE 4247 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule624 #-}+ {-# LINE 319 "./src-ag/GenerateCode.ag" #-}+ rule624 = \ (_ :: ()) ->+ {-# LINE 319 "./src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 4253 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule625 #-}+ {-# LINE 320 "./src-ag/GenerateCode.ag" #-}+ rule625 = \ (_ :: ()) ->+ {-# LINE 320 "./src-ag/GenerateCode.ag" #-}+ Set.empty+ {-# LINE 4259 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule626 #-}+ {-# LINE 432 "./src-ag/GenerateCode.ag" #-}+ rule626 = \ (_ :: ()) ->+ {-# LINE 432 "./src-ag/GenerateCode.ag" #-}+ []+ {-# LINE 4265 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule627 #-}+ rule627 = \ (_ :: ()) ->+ []+ {-# INLINE rule628 #-}+ rule628 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule629 #-}+ rule629 = \ (_ :: ()) ->+ []+ {-# INLINE rule630 #-}+ rule630 = \ ((_lhsIvisitedSet) :: Set Identifier) ->+ _lhsIvisitedSet++-- DeclBlocks --------------------------------------------------+-- wrapper+data Inh_DeclBlocks = Inh_DeclBlocks { blockNr_Inh_DeclBlocks :: (Int), lastExprVars_Inh_DeclBlocks :: ([String]), nextVisitDecls_Inh_DeclBlocks :: ([Decl]), optCase_Inh_DeclBlocks :: (Bool), prefix_Inh_DeclBlocks :: (String) }+data Syn_DeclBlocks = Syn_DeclBlocks { callExpr_Syn_DeclBlocks :: (Expr), decls_Syn_DeclBlocks :: ([Decl]), freeVars_Syn_DeclBlocks :: ([String]) }+{-# INLINABLE wrap_DeclBlocks #-}+wrap_DeclBlocks :: T_DeclBlocks -> Inh_DeclBlocks -> (Syn_DeclBlocks )+wrap_DeclBlocks (T_DeclBlocks act) (Inh_DeclBlocks _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_DeclBlocks_vIn34 _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix+ (T_DeclBlocks_vOut34 _lhsOcallExpr _lhsOdecls _lhsOfreeVars) <- return (inv_DeclBlocks_s35 sem arg)+ return (Syn_DeclBlocks _lhsOcallExpr _lhsOdecls _lhsOfreeVars)+ )++-- cata+{-# NOINLINE sem_DeclBlocks #-}+sem_DeclBlocks :: DeclBlocks -> T_DeclBlocks +sem_DeclBlocks ( DeclBlock defs_ visit_ next_ ) = sem_DeclBlocks_DeclBlock defs_ visit_ ( sem_DeclBlocks next_ )+sem_DeclBlocks ( DeclTerminator defs_ result_ ) = sem_DeclBlocks_DeclTerminator defs_ result_++-- semantic domain+newtype T_DeclBlocks = T_DeclBlocks {+ attach_T_DeclBlocks :: Identity (T_DeclBlocks_s35 )+ }+newtype T_DeclBlocks_s35 = C_DeclBlocks_s35 {+ inv_DeclBlocks_s35 :: (T_DeclBlocks_v34 )+ }+data T_DeclBlocks_s36 = C_DeclBlocks_s36+type T_DeclBlocks_v34 = (T_DeclBlocks_vIn34 ) -> (T_DeclBlocks_vOut34 )+data T_DeclBlocks_vIn34 = T_DeclBlocks_vIn34 (Int) ([String]) ([Decl]) (Bool) (String)+data T_DeclBlocks_vOut34 = T_DeclBlocks_vOut34 (Expr) ([Decl]) ([String])+{-# NOINLINE sem_DeclBlocks_DeclBlock #-}+sem_DeclBlocks_DeclBlock :: ([Decl]) -> (Decl) -> T_DeclBlocks -> T_DeclBlocks +sem_DeclBlocks_DeclBlock arg_defs_ arg_visit_ arg_next_ = T_DeclBlocks (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_DeclBlocks_v34 + v34 = \ (T_DeclBlocks_vIn34 _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) -> ( let+ _nextX35 = Control.Monad.Identity.runIdentity (attach_T_DeclBlocks (arg_next_))+ (T_DeclBlocks_vOut34 _nextIcallExpr _nextIdecls _nextIfreeVars) = inv_DeclBlocks_s35 _nextX35 (T_DeclBlocks_vIn34 _nextOblockNr _nextOlastExprVars _nextOnextVisitDecls _nextOoptCase _nextOprefix)+ _nextOblockNr = rule631 _lhsIblockNr+ _lambdaName = rule632 _lhsIblockNr _lhsIprefix+ _pragmaDecl = rule633 _lambdaName+ _lhsOcallExpr :: Expr+ _lhsOcallExpr = rule634 _freeVars _lambdaName+ _freeVars = rule635 _nextIfreeVars arg_defs_ arg_visit_+ _decl = rule636 _freeVars _lambdaName _lhsIoptCase _nextIcallExpr arg_defs_ arg_visit_+ _lhsOdecls :: [Decl]+ _lhsOdecls = rule637 _decl _lhsIblockNr _nextIdecls _pragmaDecl+ _lhsOfreeVars :: [String]+ _lhsOfreeVars = rule638 _freeVars+ _nextOlastExprVars = rule639 _lhsIlastExprVars+ _nextOnextVisitDecls = rule640 _lhsInextVisitDecls+ _nextOoptCase = rule641 _lhsIoptCase+ _nextOprefix = rule642 _lhsIprefix+ __result_ = T_DeclBlocks_vOut34 _lhsOcallExpr _lhsOdecls _lhsOfreeVars+ in __result_ )+ in C_DeclBlocks_s35 v34+ {-# INLINE rule631 #-}+ {-# LINE 667 "./src-ag/GenerateCode.ag" #-}+ rule631 = \ ((_lhsIblockNr) :: Int) ->+ {-# LINE 667 "./src-ag/GenerateCode.ag" #-}+ _lhsIblockNr + 1+ {-# LINE 4342 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule632 #-}+ {-# LINE 672 "./src-ag/GenerateCode.ag" #-}+ rule632 = \ ((_lhsIblockNr) :: Int) ((_lhsIprefix) :: String) ->+ {-# LINE 672 "./src-ag/GenerateCode.ag" #-}+ _lhsIprefix ++ "_block" ++ show _lhsIblockNr+ {-# LINE 4348 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule633 #-}+ {-# LINE 673 "./src-ag/GenerateCode.ag" #-}+ rule633 = \ _lambdaName ->+ {-# LINE 673 "./src-ag/GenerateCode.ag" #-}+ PragmaDecl ("NOINLINE " ++ _lambdaName )+ {-# LINE 4354 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule634 #-}+ {-# LINE 674 "./src-ag/GenerateCode.ag" #-}+ rule634 = \ _freeVars _lambdaName ->+ {-# LINE 674 "./src-ag/GenerateCode.ag" #-}+ App _lambdaName (map SimpleExpr _freeVars )+ {-# LINE 4360 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule635 #-}+ {-# LINE 678 "./src-ag/GenerateCode.ag" #-}+ rule635 = \ ((_nextIfreeVars) :: [String]) defs_ visit_ ->+ {-# LINE 678 "./src-ag/GenerateCode.ag" #-}+ freevars _nextIfreeVars (visit_ : defs_)+ {-# LINE 4366 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule636 #-}+ {-# LINE 685 "./src-ag/GenerateCode.ag" #-}+ rule636 = \ _freeVars _lambdaName ((_lhsIoptCase) :: Bool) ((_nextIcallExpr) :: Expr) defs_ visit_ ->+ {-# LINE 685 "./src-ag/GenerateCode.ag" #-}+ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ [visit_]) _nextIcallExpr+ {-# LINE 4372 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule637 #-}+ {-# LINE 686 "./src-ag/GenerateCode.ag" #-}+ rule637 = \ _decl ((_lhsIblockNr) :: Int) ((_nextIdecls) :: [Decl]) _pragmaDecl ->+ {-# LINE 686 "./src-ag/GenerateCode.ag" #-}+ (if _lhsIblockNr > 1 then [_pragmaDecl ] else []) ++ [_decl ] ++ _nextIdecls+ {-# LINE 4378 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule638 #-}+ rule638 = \ _freeVars ->+ _freeVars+ {-# INLINE rule639 #-}+ rule639 = \ ((_lhsIlastExprVars) :: [String]) ->+ _lhsIlastExprVars+ {-# INLINE rule640 #-}+ rule640 = \ ((_lhsInextVisitDecls) :: [Decl]) ->+ _lhsInextVisitDecls+ {-# INLINE rule641 #-}+ rule641 = \ ((_lhsIoptCase) :: Bool) ->+ _lhsIoptCase+ {-# INLINE rule642 #-}+ rule642 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+{-# NOINLINE sem_DeclBlocks_DeclTerminator #-}+sem_DeclBlocks_DeclTerminator :: ([Decl]) -> (Expr) -> T_DeclBlocks +sem_DeclBlocks_DeclTerminator arg_defs_ arg_result_ = T_DeclBlocks (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_DeclBlocks_v34 + v34 = \ (T_DeclBlocks_vIn34 _lhsIblockNr _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) -> ( let+ _lambdaName = rule643 _lhsIblockNr _lhsIprefix+ _pragmaDecl = rule644 _lambdaName+ _lhsOcallExpr :: Expr+ _lhsOcallExpr = rule645 _freeVars _lambdaName+ _freeVars = rule646 _lhsIlastExprVars _lhsInextVisitDecls arg_defs_+ _lhsOdecls :: [Decl]+ _lhsOdecls = rule647 _freeVars _lambdaName _lhsInextVisitDecls _lhsIoptCase arg_defs_ arg_result_+ _lhsOfreeVars :: [String]+ _lhsOfreeVars = rule648 _freeVars+ __result_ = T_DeclBlocks_vOut34 _lhsOcallExpr _lhsOdecls _lhsOfreeVars+ in __result_ )+ in C_DeclBlocks_s35 v34+ {-# INLINE rule643 #-}+ {-# LINE 672 "./src-ag/GenerateCode.ag" #-}+ rule643 = \ ((_lhsIblockNr) :: Int) ((_lhsIprefix) :: String) ->+ {-# LINE 672 "./src-ag/GenerateCode.ag" #-}+ _lhsIprefix ++ "_block" ++ show _lhsIblockNr+ {-# LINE 4418 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule644 #-}+ {-# LINE 673 "./src-ag/GenerateCode.ag" #-}+ rule644 = \ _lambdaName ->+ {-# LINE 673 "./src-ag/GenerateCode.ag" #-}+ PragmaDecl ("NOINLINE " ++ _lambdaName )+ {-# LINE 4424 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule645 #-}+ {-# LINE 674 "./src-ag/GenerateCode.ag" #-}+ rule645 = \ _freeVars _lambdaName ->+ {-# LINE 674 "./src-ag/GenerateCode.ag" #-}+ App _lambdaName (map SimpleExpr _freeVars )+ {-# LINE 4430 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule646 #-}+ {-# LINE 676 "./src-ag/GenerateCode.ag" #-}+ rule646 = \ ((_lhsIlastExprVars) :: [String]) ((_lhsInextVisitDecls) :: [Decl]) defs_ ->+ {-# LINE 676 "./src-ag/GenerateCode.ag" #-}+ freevars _lhsIlastExprVars (defs_ ++ _lhsInextVisitDecls)+ {-# LINE 4436 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule647 #-}+ {-# LINE 683 "./src-ag/GenerateCode.ag" #-}+ rule647 = \ _freeVars _lambdaName ((_lhsInextVisitDecls) :: [Decl]) ((_lhsIoptCase) :: Bool) defs_ result_ ->+ {-# LINE 683 "./src-ag/GenerateCode.ag" #-}+ [ mkBlockLambda _lhsIoptCase _lambdaName _freeVars (defs_ ++ _lhsInextVisitDecls) result_ ]+ {-# LINE 4442 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule648 #-}+ rule648 = \ _freeVars ->+ _freeVars++-- DeclBlocksRoot ----------------------------------------------+-- wrapper+data Inh_DeclBlocksRoot = Inh_DeclBlocksRoot { lastExprVars_Inh_DeclBlocksRoot :: ([String]), nextVisitDecls_Inh_DeclBlocksRoot :: ([Decl]), optCase_Inh_DeclBlocksRoot :: (Bool), prefix_Inh_DeclBlocksRoot :: (String) }+data Syn_DeclBlocksRoot = Syn_DeclBlocksRoot { firstCall_Syn_DeclBlocksRoot :: (Expr), lambdas_Syn_DeclBlocksRoot :: ([Decl]) }+{-# INLINABLE wrap_DeclBlocksRoot #-}+wrap_DeclBlocksRoot :: T_DeclBlocksRoot -> Inh_DeclBlocksRoot -> (Syn_DeclBlocksRoot )+wrap_DeclBlocksRoot (T_DeclBlocksRoot act) (Inh_DeclBlocksRoot _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_DeclBlocksRoot_vIn37 _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix+ (T_DeclBlocksRoot_vOut37 _lhsOfirstCall _lhsOlambdas) <- return (inv_DeclBlocksRoot_s38 sem arg)+ return (Syn_DeclBlocksRoot _lhsOfirstCall _lhsOlambdas)+ )++-- cata+{-# INLINE sem_DeclBlocksRoot #-}+sem_DeclBlocksRoot :: DeclBlocksRoot -> T_DeclBlocksRoot +sem_DeclBlocksRoot ( DeclBlocksRoot blocks_ ) = sem_DeclBlocksRoot_DeclBlocksRoot ( sem_DeclBlocks blocks_ )++-- semantic domain+newtype T_DeclBlocksRoot = T_DeclBlocksRoot {+ attach_T_DeclBlocksRoot :: Identity (T_DeclBlocksRoot_s38 )+ }+newtype T_DeclBlocksRoot_s38 = C_DeclBlocksRoot_s38 {+ inv_DeclBlocksRoot_s38 :: (T_DeclBlocksRoot_v37 )+ }+data T_DeclBlocksRoot_s39 = C_DeclBlocksRoot_s39+type T_DeclBlocksRoot_v37 = (T_DeclBlocksRoot_vIn37 ) -> (T_DeclBlocksRoot_vOut37 )+data T_DeclBlocksRoot_vIn37 = T_DeclBlocksRoot_vIn37 ([String]) ([Decl]) (Bool) (String)+data T_DeclBlocksRoot_vOut37 = T_DeclBlocksRoot_vOut37 (Expr) ([Decl])+{-# NOINLINE sem_DeclBlocksRoot_DeclBlocksRoot #-}+sem_DeclBlocksRoot_DeclBlocksRoot :: T_DeclBlocks -> T_DeclBlocksRoot +sem_DeclBlocksRoot_DeclBlocksRoot arg_blocks_ = T_DeclBlocksRoot (return st38) where+ {-# NOINLINE st38 #-}+ st38 = let+ v37 :: T_DeclBlocksRoot_v37 + v37 = \ (T_DeclBlocksRoot_vIn37 _lhsIlastExprVars _lhsInextVisitDecls _lhsIoptCase _lhsIprefix) -> ( let+ _blocksX35 = Control.Monad.Identity.runIdentity (attach_T_DeclBlocks (arg_blocks_))+ (T_DeclBlocks_vOut34 _blocksIcallExpr _blocksIdecls _blocksIfreeVars) = inv_DeclBlocks_s35 _blocksX35 (T_DeclBlocks_vIn34 _blocksOblockNr _blocksOlastExprVars _blocksOnextVisitDecls _blocksOoptCase _blocksOprefix)+ _lhsOlambdas :: [Decl]+ _lhsOlambdas = rule649 _blocksIdecls+ _lhsOfirstCall :: Expr+ _lhsOfirstCall = rule650 _blocksIcallExpr+ _blocksOblockNr = rule651 ()+ _blocksOlastExprVars = rule652 _lhsIlastExprVars+ _blocksOnextVisitDecls = rule653 _lhsInextVisitDecls+ _blocksOoptCase = rule654 _lhsIoptCase+ _blocksOprefix = rule655 _lhsIprefix+ __result_ = T_DeclBlocksRoot_vOut37 _lhsOfirstCall _lhsOlambdas+ in __result_ )+ in C_DeclBlocksRoot_s38 v37+ {-# INLINE rule649 #-}+ {-# LINE 658 "./src-ag/GenerateCode.ag" #-}+ rule649 = \ ((_blocksIdecls) :: [Decl]) ->+ {-# LINE 658 "./src-ag/GenerateCode.ag" #-}+ _blocksIdecls+ {-# LINE 4503 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule650 #-}+ {-# LINE 659 "./src-ag/GenerateCode.ag" #-}+ rule650 = \ ((_blocksIcallExpr) :: Expr) ->+ {-# LINE 659 "./src-ag/GenerateCode.ag" #-}+ _blocksIcallExpr+ {-# LINE 4509 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule651 #-}+ {-# LINE 664 "./src-ag/GenerateCode.ag" #-}+ rule651 = \ (_ :: ()) ->+ {-# LINE 664 "./src-ag/GenerateCode.ag" #-}+ 1+ {-# LINE 4515 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule652 #-}+ rule652 = \ ((_lhsIlastExprVars) :: [String]) ->+ _lhsIlastExprVars+ {-# INLINE rule653 #-}+ rule653 = \ ((_lhsInextVisitDecls) :: [Decl]) ->+ _lhsInextVisitDecls+ {-# INLINE rule654 #-}+ rule654 = \ ((_lhsIoptCase) :: Bool) ->+ _lhsIoptCase+ {-# INLINE rule655 #-}+ rule655 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { }+data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: (Pattern), definedInsts_Syn_Pattern :: ([Identifier]), patternAttributes_Syn_Pattern :: ([(Identifier, Identifier)]) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern (T_Pattern act) (Inh_Pattern ) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Pattern_vIn40 + (T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes) <- return (inv_Pattern_s41 sem arg)+ return (Syn_Pattern _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s41 )+ }+newtype T_Pattern_s41 = C_Pattern_s41 {+ inv_Pattern_s41 :: (T_Pattern_v40 )+ }+data T_Pattern_s42 = C_Pattern_s42+type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )+data T_Pattern_vIn40 = T_Pattern_vIn40 +data T_Pattern_vOut40 = T_Pattern_vOut40 (Pattern) ([Identifier]) ([(Identifier, Identifier)])+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 ) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIcopy _patsIdefinedInsts _patsIpatternAttributes) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 )+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule656 _patsIdefinedInsts+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule657 _patsIpatternAttributes+ _copy = rule658 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule659 _copy+ __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule656 #-}+ rule656 = \ ((_patsIdefinedInsts) :: [Identifier]) ->+ _patsIdefinedInsts+ {-# INLINE rule657 #-}+ rule657 = \ ((_patsIpatternAttributes) :: [(Identifier, Identifier)]) ->+ _patsIpatternAttributes+ {-# INLINE rule658 #-}+ rule658 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule659 #-}+ rule659 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 ) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIcopy _patsIdefinedInsts _patsIpatternAttributes) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 )+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule660 _patsIdefinedInsts+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule661 _patsIpatternAttributes+ _copy = rule662 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule663 _copy+ __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule660 #-}+ rule660 = \ ((_patsIdefinedInsts) :: [Identifier]) ->+ _patsIdefinedInsts+ {-# INLINE rule661 #-}+ rule661 = \ ((_patsIpatternAttributes) :: [(Identifier, Identifier)]) ->+ _patsIpatternAttributes+ {-# INLINE rule662 #-}+ rule662 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule663 #-}+ rule663 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 ) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIcopy _patIdefinedInsts _patIpatternAttributes) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 )+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule664 _patIdefinedInsts arg_attr_ arg_field_+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule665 _patIpatternAttributes arg_attr_ arg_field_+ _copy = rule666 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule667 _copy+ __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule664 #-}+ {-# LINE 265 "./src-ag/GenerateCode.ag" #-}+ rule664 = \ ((_patIdefinedInsts) :: [Identifier]) attr_ field_ ->+ {-# LINE 265 "./src-ag/GenerateCode.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 4649 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule665 #-}+ {-# LINE 273 "./src-ag/GenerateCode.ag" #-}+ rule665 = \ ((_patIpatternAttributes) :: [(Identifier, Identifier)]) attr_ field_ ->+ {-# LINE 273 "./src-ag/GenerateCode.ag" #-}+ (field_,attr_) : _patIpatternAttributes+ {-# LINE 4655 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule666 #-}+ rule666 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule667 #-}+ rule667 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 ) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIcopy _patIdefinedInsts _patIpatternAttributes) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 )+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule668 _patIdefinedInsts+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule669 _patIpatternAttributes+ _copy = rule670 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule671 _copy+ __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule668 #-}+ rule668 = \ ((_patIdefinedInsts) :: [Identifier]) ->+ _patIdefinedInsts+ {-# INLINE rule669 #-}+ rule669 = \ ((_patIpatternAttributes) :: [(Identifier, Identifier)]) ->+ _patIpatternAttributes+ {-# INLINE rule670 #-}+ rule670 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule671 #-}+ rule671 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore arg_pos_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_Pattern_v40 + v40 = \ (T_Pattern_vIn40 ) -> ( let+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule672 ()+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule673 ()+ _copy = rule674 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule675 _copy+ __result_ = T_Pattern_vOut40 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule672 #-}+ rule672 = \ (_ :: ()) ->+ []+ {-# INLINE rule673 #-}+ rule673 = \ (_ :: ()) ->+ []+ {-# INLINE rule674 #-}+ rule674 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule675 #-}+ rule675 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { }+data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: (Patterns), definedInsts_Syn_Patterns :: ([Identifier]), patternAttributes_Syn_Patterns :: ([(Identifier, Identifier)]) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns (T_Patterns act) (Inh_Patterns ) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Patterns_vIn43 + (T_Patterns_vOut43 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes) <- return (inv_Patterns_s44 sem arg)+ return (Syn_Patterns _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s44 )+ }+newtype T_Patterns_s44 = C_Patterns_s44 {+ inv_Patterns_s44 :: (T_Patterns_v43 )+ }+data T_Patterns_s45 = C_Patterns_s45+type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )+data T_Patterns_vIn43 = T_Patterns_vIn43 +data T_Patterns_vOut43 = T_Patterns_vOut43 (Patterns) ([Identifier]) ([(Identifier, Identifier)])+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 ) -> ( let+ _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut40 _hdIcopy _hdIdefinedInsts _hdIpatternAttributes) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 )+ (T_Patterns_vOut43 _tlIcopy _tlIdefinedInsts _tlIpatternAttributes) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 )+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule676 _hdIdefinedInsts _tlIdefinedInsts+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule677 _hdIpatternAttributes _tlIpatternAttributes+ _copy = rule678 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule679 _copy+ __result_ = T_Patterns_vOut43 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule676 #-}+ rule676 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# INLINE rule677 #-}+ rule677 = \ ((_hdIpatternAttributes) :: [(Identifier, Identifier)]) ((_tlIpatternAttributes) :: [(Identifier, Identifier)]) ->+ _hdIpatternAttributes ++ _tlIpatternAttributes+ {-# INLINE rule678 #-}+ rule678 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule679 #-}+ rule679 = \ _copy ->+ _copy+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_Patterns_v43 + v43 = \ (T_Patterns_vIn43 ) -> ( let+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule680 ()+ _lhsOpatternAttributes :: [(Identifier, Identifier)]+ _lhsOpatternAttributes = rule681 ()+ _copy = rule682 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule683 _copy+ __result_ = T_Patterns_vOut43 _lhsOcopy _lhsOdefinedInsts _lhsOpatternAttributes+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule680 #-}+ rule680 = \ (_ :: ()) ->+ []+ {-# INLINE rule681 #-}+ rule681 = \ (_ :: ()) ->+ []+ {-# INLINE rule682 #-}+ rule682 = \ (_ :: ()) ->+ []+ {-# INLINE rule683 #-}+ rule683 = \ _copy ->+ _copy++-- Sequence ----------------------------------------------------+-- wrapper+data Inh_Sequence = Inh_Sequence { allNts_Inh_Sequence :: (Set NontermIdent), aroundMap_Inh_Sequence :: (Set Identifier), children_Inh_Sequence :: ([(Identifier,Type,ChildKind)]), con_Inh_Sequence :: (ConstructorIdent), declsAbove_Inh_Sequence :: ([Decl]), inh_Inh_Sequence :: (Attributes), instVisitNrs_Inh_Sequence :: (Map Identifier Int), lastExpr_Inh_Sequence :: (Expr), mergeMap_Inh_Sequence :: (Map Identifier (Identifier, [Identifier])), nr_Inh_Sequence :: (Int), nt_Inh_Sequence :: (NontermIdent), o_case_Inh_Sequence :: (Bool), o_cata_Inh_Sequence :: (Bool), o_clean_Inh_Sequence :: (Bool), o_costcentre_Inh_Sequence :: (Bool), o_data_Inh_Sequence :: (Maybe Bool), o_linePragmas_Inh_Sequence :: (Bool), o_monadic_Inh_Sequence :: (Bool), o_newtypes_Inh_Sequence :: (Bool), o_pretty_Inh_Sequence :: (Bool), o_rename_Inh_Sequence :: (Bool), o_sem_Inh_Sequence :: (Bool), o_sig_Inh_Sequence :: (Bool), o_splitsems_Inh_Sequence :: (Bool), o_strictwrap_Inh_Sequence :: (Bool), o_traces_Inh_Sequence :: (Bool), o_unbox_Inh_Sequence :: (Bool), options_Inh_Sequence :: (Options), paramInstMap_Inh_Sequence :: (Map Identifier (NontermIdent, [String])), paramMap_Inh_Sequence :: (ParamMap), prefix_Inh_Sequence :: (String), syn_Inh_Sequence :: (Attributes), terminals_Inh_Sequence :: ([Identifier]), unfoldSemDom_Inh_Sequence :: (NontermIdent -> Int -> [String] -> Code.Type), visitedSet_Inh_Sequence :: (Set Identifier), what_Inh_Sequence :: (String) }+data Syn_Sequence = Syn_Sequence { allTpsFound_Syn_Sequence :: (Bool), blockDecls_Syn_Sequence :: (DeclBlocks), comments_Syn_Sequence :: ([String]), decls_Syn_Sequence :: (Decls), declsAbove_Syn_Sequence :: ([Decl]), definedInsts_Syn_Sequence :: ([Identifier]), exprs_Syn_Sequence :: (Exprs), tSigs_Syn_Sequence :: ([Decl]), tps_Syn_Sequence :: ([Type]), usedVars_Syn_Sequence :: (Set String), visitedSet_Syn_Sequence :: (Set Identifier) }+{-# INLINABLE wrap_Sequence #-}+wrap_Sequence :: T_Sequence -> Inh_Sequence -> (Syn_Sequence )+wrap_Sequence (T_Sequence act) (Inh_Sequence _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Sequence_vIn46 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat+ (T_Sequence_vOut46 _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet) <- return (inv_Sequence_s47 sem arg)+ return (Syn_Sequence _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet)+ )++-- cata+{-# NOINLINE sem_Sequence #-}+sem_Sequence :: Sequence -> T_Sequence +sem_Sequence list = Prelude.foldr sem_Sequence_Cons sem_Sequence_Nil (Prelude.map sem_CRule list)++-- semantic domain+newtype T_Sequence = T_Sequence {+ attach_T_Sequence :: Identity (T_Sequence_s47 )+ }+newtype T_Sequence_s47 = C_Sequence_s47 {+ inv_Sequence_s47 :: (T_Sequence_v46 )+ }+data T_Sequence_s48 = C_Sequence_s48+type T_Sequence_v46 = (T_Sequence_vIn46 ) -> (T_Sequence_vOut46 )+data T_Sequence_vIn46 = T_Sequence_vIn46 (Set NontermIdent) (Set Identifier) ([(Identifier,Type,ChildKind)]) (ConstructorIdent) ([Decl]) (Attributes) (Map Identifier Int) (Expr) (Map Identifier (Identifier, [Identifier])) (Int) (NontermIdent) (Bool) (Bool) (Bool) (Bool) (Maybe Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (Map Identifier (NontermIdent, [String])) (ParamMap) (String) (Attributes) ([Identifier]) (NontermIdent -> Int -> [String] -> Code.Type) (Set Identifier) (String)+data T_Sequence_vOut46 = T_Sequence_vOut46 (Bool) (DeclBlocks) ([String]) (Decls) ([Decl]) ([Identifier]) (Exprs) ([Decl]) ([Type]) (Set String) (Set Identifier)+{-# NOINLINE sem_Sequence_Cons #-}+sem_Sequence_Cons :: T_CRule -> T_Sequence -> T_Sequence +sem_Sequence_Cons arg_hd_ arg_tl_ = T_Sequence (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_Sequence_v46 + v46 = \ (T_Sequence_vIn46 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let+ _hdX20 = Control.Monad.Identity.runIdentity (attach_T_CRule (arg_hd_))+ _tlX47 = Control.Monad.Identity.runIdentity (attach_T_Sequence (arg_tl_))+ (T_CRule_vOut19 _hdIallTpsFound _hdIbldBlocksFun _hdIcomments _hdIdecls _hdIdeclsAbove _hdIdefinedInsts _hdIexprs _hdItSigs _hdItps _hdIusedVars _hdIvisitedSet) = inv_CRule_s20 _hdX20 (T_CRule_vIn19 _hdOallNts _hdOaroundMap _hdOchildren _hdOcon _hdOdeclsAbove _hdOinh _hdOinstVisitNrs _hdOmergeMap _hdOnr _hdOnt _hdOo_case _hdOo_cata _hdOo_clean _hdOo_costcentre _hdOo_data _hdOo_linePragmas _hdOo_monadic _hdOo_newtypes _hdOo_pretty _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_splitsems _hdOo_strictwrap _hdOo_traces _hdOo_unbox _hdOoptions _hdOparamInstMap _hdOparamMap _hdOprefix _hdOsyn _hdOterminals _hdOunfoldSemDom _hdOvisitedSet _hdOwhat)+ (T_Sequence_vOut46 _tlIallTpsFound _tlIblockDecls _tlIcomments _tlIdecls _tlIdeclsAbove _tlIdefinedInsts _tlIexprs _tlItSigs _tlItps _tlIusedVars _tlIvisitedSet) = inv_Sequence_s47 _tlX47 (T_Sequence_vIn46 _tlOallNts _tlOaroundMap _tlOchildren _tlOcon _tlOdeclsAbove _tlOinh _tlOinstVisitNrs _tlOlastExpr _tlOmergeMap _tlOnr _tlOnt _tlOo_case _tlOo_cata _tlOo_clean _tlOo_costcentre _tlOo_data _tlOo_linePragmas _tlOo_monadic _tlOo_newtypes _tlOo_pretty _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_splitsems _tlOo_strictwrap _tlOo_traces _tlOo_unbox _tlOoptions _tlOparamInstMap _tlOparamMap _tlOprefix _tlOsyn _tlOterminals _tlOunfoldSemDom _tlOvisitedSet _tlOwhat)+ _lhsOblockDecls :: DeclBlocks+ _lhsOblockDecls = rule684 _hdIbldBlocksFun _tlIblockDecls+ _lhsOallTpsFound :: Bool+ _lhsOallTpsFound = rule685 _hdIallTpsFound _tlIallTpsFound+ _lhsOcomments :: [String]+ _lhsOcomments = rule686 _hdIcomments _tlIcomments+ _lhsOdecls :: Decls+ _lhsOdecls = rule687 _hdIdecls _tlIdecls+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule688 _hdIdefinedInsts _tlIdefinedInsts+ _lhsOexprs :: Exprs+ _lhsOexprs = rule689 _hdIexprs _tlIexprs+ _lhsOtSigs :: [Decl]+ _lhsOtSigs = rule690 _hdItSigs _tlItSigs+ _lhsOtps :: [Type]+ _lhsOtps = rule691 _hdItps _tlItps+ _lhsOusedVars :: Set String+ _lhsOusedVars = rule692 _hdIusedVars _tlIusedVars+ _lhsOdeclsAbove :: [Decl]+ _lhsOdeclsAbove = rule693 _tlIdeclsAbove+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule694 _tlIvisitedSet+ _hdOallNts = rule695 _lhsIallNts+ _hdOaroundMap = rule696 _lhsIaroundMap+ _hdOchildren = rule697 _lhsIchildren+ _hdOcon = rule698 _lhsIcon+ _hdOdeclsAbove = rule699 _lhsIdeclsAbove+ _hdOinh = rule700 _lhsIinh+ _hdOinstVisitNrs = rule701 _lhsIinstVisitNrs+ _hdOmergeMap = rule702 _lhsImergeMap+ _hdOnr = rule703 _lhsInr+ _hdOnt = rule704 _lhsInt+ _hdOo_case = rule705 _lhsIo_case+ _hdOo_cata = rule706 _lhsIo_cata+ _hdOo_clean = rule707 _lhsIo_clean+ _hdOo_costcentre = rule708 _lhsIo_costcentre+ _hdOo_data = rule709 _lhsIo_data+ _hdOo_linePragmas = rule710 _lhsIo_linePragmas+ _hdOo_monadic = rule711 _lhsIo_monadic+ _hdOo_newtypes = rule712 _lhsIo_newtypes+ _hdOo_pretty = rule713 _lhsIo_pretty+ _hdOo_rename = rule714 _lhsIo_rename+ _hdOo_sem = rule715 _lhsIo_sem+ _hdOo_sig = rule716 _lhsIo_sig+ _hdOo_splitsems = rule717 _lhsIo_splitsems+ _hdOo_strictwrap = rule718 _lhsIo_strictwrap+ _hdOo_traces = rule719 _lhsIo_traces+ _hdOo_unbox = rule720 _lhsIo_unbox+ _hdOoptions = rule721 _lhsIoptions+ _hdOparamInstMap = rule722 _lhsIparamInstMap+ _hdOparamMap = rule723 _lhsIparamMap+ _hdOprefix = rule724 _lhsIprefix+ _hdOsyn = rule725 _lhsIsyn+ _hdOterminals = rule726 _lhsIterminals+ _hdOunfoldSemDom = rule727 _lhsIunfoldSemDom+ _hdOvisitedSet = rule728 _lhsIvisitedSet+ _hdOwhat = rule729 _lhsIwhat+ _tlOallNts = rule730 _lhsIallNts+ _tlOaroundMap = rule731 _lhsIaroundMap+ _tlOchildren = rule732 _lhsIchildren+ _tlOcon = rule733 _lhsIcon+ _tlOdeclsAbove = rule734 _hdIdeclsAbove+ _tlOinh = rule735 _lhsIinh+ _tlOinstVisitNrs = rule736 _lhsIinstVisitNrs+ _tlOlastExpr = rule737 _lhsIlastExpr+ _tlOmergeMap = rule738 _lhsImergeMap+ _tlOnr = rule739 _lhsInr+ _tlOnt = rule740 _lhsInt+ _tlOo_case = rule741 _lhsIo_case+ _tlOo_cata = rule742 _lhsIo_cata+ _tlOo_clean = rule743 _lhsIo_clean+ _tlOo_costcentre = rule744 _lhsIo_costcentre+ _tlOo_data = rule745 _lhsIo_data+ _tlOo_linePragmas = rule746 _lhsIo_linePragmas+ _tlOo_monadic = rule747 _lhsIo_monadic+ _tlOo_newtypes = rule748 _lhsIo_newtypes+ _tlOo_pretty = rule749 _lhsIo_pretty+ _tlOo_rename = rule750 _lhsIo_rename+ _tlOo_sem = rule751 _lhsIo_sem+ _tlOo_sig = rule752 _lhsIo_sig+ _tlOo_splitsems = rule753 _lhsIo_splitsems+ _tlOo_strictwrap = rule754 _lhsIo_strictwrap+ _tlOo_traces = rule755 _lhsIo_traces+ _tlOo_unbox = rule756 _lhsIo_unbox+ _tlOoptions = rule757 _lhsIoptions+ _tlOparamInstMap = rule758 _lhsIparamInstMap+ _tlOparamMap = rule759 _lhsIparamMap+ _tlOprefix = rule760 _lhsIprefix+ _tlOsyn = rule761 _lhsIsyn+ _tlOterminals = rule762 _lhsIterminals+ _tlOunfoldSemDom = rule763 _lhsIunfoldSemDom+ _tlOvisitedSet = rule764 _hdIvisitedSet+ _tlOwhat = rule765 _lhsIwhat+ __result_ = T_Sequence_vOut46 _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet+ in __result_ )+ in C_Sequence_s47 v46+ {-# INLINE rule684 #-}+ {-# LINE 627 "./src-ag/GenerateCode.ag" #-}+ rule684 = \ ((_hdIbldBlocksFun) :: DeclBlocks -> DeclBlocks) ((_tlIblockDecls) :: DeclBlocks) ->+ {-# LINE 627 "./src-ag/GenerateCode.ag" #-}+ _hdIbldBlocksFun _tlIblockDecls+ {-# LINE 4958 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule685 #-}+ rule685 = \ ((_hdIallTpsFound) :: Bool) ((_tlIallTpsFound) :: Bool) ->+ _hdIallTpsFound && _tlIallTpsFound+ {-# INLINE rule686 #-}+ rule686 = \ ((_hdIcomments) :: [String]) ((_tlIcomments) :: [String]) ->+ _hdIcomments ++ _tlIcomments+ {-# INLINE rule687 #-}+ rule687 = \ ((_hdIdecls) :: Decls) ((_tlIdecls) :: Decls) ->+ _hdIdecls ++ _tlIdecls+ {-# INLINE rule688 #-}+ rule688 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# INLINE rule689 #-}+ rule689 = \ ((_hdIexprs) :: Exprs) ((_tlIexprs) :: Exprs) ->+ _hdIexprs ++ _tlIexprs+ {-# INLINE rule690 #-}+ rule690 = \ ((_hdItSigs) :: [Decl]) ((_tlItSigs) :: [Decl]) ->+ _hdItSigs ++ _tlItSigs+ {-# INLINE rule691 #-}+ rule691 = \ ((_hdItps) :: [Type]) ((_tlItps) :: [Type]) ->+ _hdItps ++ _tlItps+ {-# INLINE rule692 #-}+ rule692 = \ ((_hdIusedVars) :: Set String) ((_tlIusedVars) :: Set String) ->+ _hdIusedVars `Set.union` _tlIusedVars+ {-# INLINE rule693 #-}+ rule693 = \ ((_tlIdeclsAbove) :: [Decl]) ->+ _tlIdeclsAbove+ {-# INLINE rule694 #-}+ rule694 = \ ((_tlIvisitedSet) :: Set Identifier) ->+ _tlIvisitedSet+ {-# INLINE rule695 #-}+ rule695 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule696 #-}+ rule696 = \ ((_lhsIaroundMap) :: Set Identifier) ->+ _lhsIaroundMap+ {-# INLINE rule697 #-}+ rule697 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIchildren+ {-# INLINE rule698 #-}+ rule698 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule699 #-}+ rule699 = \ ((_lhsIdeclsAbove) :: [Decl]) ->+ _lhsIdeclsAbove+ {-# INLINE rule700 #-}+ rule700 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule701 #-}+ rule701 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->+ _lhsIinstVisitNrs+ {-# INLINE rule702 #-}+ rule702 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule703 #-}+ rule703 = \ ((_lhsInr) :: Int) ->+ _lhsInr+ {-# INLINE rule704 #-}+ rule704 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule705 #-}+ rule705 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule706 #-}+ rule706 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule707 #-}+ rule707 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule708 #-}+ rule708 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule709 #-}+ rule709 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule710 #-}+ rule710 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule711 #-}+ rule711 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule712 #-}+ rule712 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule713 #-}+ rule713 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule714 #-}+ rule714 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule715 #-}+ rule715 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule716 #-}+ rule716 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule717 #-}+ rule717 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule718 #-}+ rule718 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule719 #-}+ rule719 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule720 #-}+ rule720 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule721 #-}+ rule721 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule722 #-}+ rule722 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->+ _lhsIparamInstMap+ {-# INLINE rule723 #-}+ rule723 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule724 #-}+ rule724 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule725 #-}+ rule725 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule726 #-}+ rule726 = \ ((_lhsIterminals) :: [Identifier]) ->+ _lhsIterminals+ {-# INLINE rule727 #-}+ rule727 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule728 #-}+ rule728 = \ ((_lhsIvisitedSet) :: Set Identifier) ->+ _lhsIvisitedSet+ {-# INLINE rule729 #-}+ rule729 = \ ((_lhsIwhat) :: String) ->+ _lhsIwhat+ {-# INLINE rule730 #-}+ rule730 = \ ((_lhsIallNts) :: Set NontermIdent) ->+ _lhsIallNts+ {-# INLINE rule731 #-}+ rule731 = \ ((_lhsIaroundMap) :: Set Identifier) ->+ _lhsIaroundMap+ {-# INLINE rule732 #-}+ rule732 = \ ((_lhsIchildren) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIchildren+ {-# INLINE rule733 #-}+ rule733 = \ ((_lhsIcon) :: ConstructorIdent) ->+ _lhsIcon+ {-# INLINE rule734 #-}+ rule734 = \ ((_hdIdeclsAbove) :: [Decl]) ->+ _hdIdeclsAbove+ {-# INLINE rule735 #-}+ rule735 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule736 #-}+ rule736 = \ ((_lhsIinstVisitNrs) :: Map Identifier Int) ->+ _lhsIinstVisitNrs+ {-# INLINE rule737 #-}+ rule737 = \ ((_lhsIlastExpr) :: Expr) ->+ _lhsIlastExpr+ {-# INLINE rule738 #-}+ rule738 = \ ((_lhsImergeMap) :: Map Identifier (Identifier, [Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule739 #-}+ rule739 = \ ((_lhsInr) :: Int) ->+ _lhsInr+ {-# INLINE rule740 #-}+ rule740 = \ ((_lhsInt) :: NontermIdent) ->+ _lhsInt+ {-# INLINE rule741 #-}+ rule741 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule742 #-}+ rule742 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule743 #-}+ rule743 = \ ((_lhsIo_clean) :: Bool) ->+ _lhsIo_clean+ {-# INLINE rule744 #-}+ rule744 = \ ((_lhsIo_costcentre) :: Bool) ->+ _lhsIo_costcentre+ {-# INLINE rule745 #-}+ rule745 = \ ((_lhsIo_data) :: Maybe Bool) ->+ _lhsIo_data+ {-# INLINE rule746 #-}+ rule746 = \ ((_lhsIo_linePragmas) :: Bool) ->+ _lhsIo_linePragmas+ {-# INLINE rule747 #-}+ rule747 = \ ((_lhsIo_monadic) :: Bool) ->+ _lhsIo_monadic+ {-# INLINE rule748 #-}+ rule748 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule749 #-}+ rule749 = \ ((_lhsIo_pretty) :: Bool) ->+ _lhsIo_pretty+ {-# INLINE rule750 #-}+ rule750 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule751 #-}+ rule751 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule752 #-}+ rule752 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule753 #-}+ rule753 = \ ((_lhsIo_splitsems) :: Bool) ->+ _lhsIo_splitsems+ {-# INLINE rule754 #-}+ rule754 = \ ((_lhsIo_strictwrap) :: Bool) ->+ _lhsIo_strictwrap+ {-# INLINE rule755 #-}+ rule755 = \ ((_lhsIo_traces) :: Bool) ->+ _lhsIo_traces+ {-# INLINE rule756 #-}+ rule756 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule757 #-}+ rule757 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule758 #-}+ rule758 = \ ((_lhsIparamInstMap) :: Map Identifier (NontermIdent, [String])) ->+ _lhsIparamInstMap+ {-# INLINE rule759 #-}+ rule759 = \ ((_lhsIparamMap) :: ParamMap) ->+ _lhsIparamMap+ {-# INLINE rule760 #-}+ rule760 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule761 #-}+ rule761 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule762 #-}+ rule762 = \ ((_lhsIterminals) :: [Identifier]) ->+ _lhsIterminals+ {-# INLINE rule763 #-}+ rule763 = \ ((_lhsIunfoldSemDom) :: NontermIdent -> Int -> [String] -> Code.Type) ->+ _lhsIunfoldSemDom+ {-# INLINE rule764 #-}+ rule764 = \ ((_hdIvisitedSet) :: Set Identifier) ->+ _hdIvisitedSet+ {-# INLINE rule765 #-}+ rule765 = \ ((_lhsIwhat) :: String) ->+ _lhsIwhat+{-# NOINLINE sem_Sequence_Nil #-}+sem_Sequence_Nil :: T_Sequence +sem_Sequence_Nil = T_Sequence (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_Sequence_v46 + v46 = \ (T_Sequence_vIn46 _lhsIallNts _lhsIaroundMap _lhsIchildren _lhsIcon _lhsIdeclsAbove _lhsIinh _lhsIinstVisitNrs _lhsIlastExpr _lhsImergeMap _lhsInr _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_clean _lhsIo_costcentre _lhsIo_data _lhsIo_linePragmas _lhsIo_monadic _lhsIo_newtypes _lhsIo_pretty _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_splitsems _lhsIo_strictwrap _lhsIo_traces _lhsIo_unbox _lhsIoptions _lhsIparamInstMap _lhsIparamMap _lhsIprefix _lhsIsyn _lhsIterminals _lhsIunfoldSemDom _lhsIvisitedSet _lhsIwhat) -> ( let+ _lhsOblockDecls :: DeclBlocks+ _lhsOblockDecls = rule766 _lhsIdeclsAbove _lhsIlastExpr+ _lhsOallTpsFound :: Bool+ _lhsOallTpsFound = rule767 ()+ _lhsOcomments :: [String]+ _lhsOcomments = rule768 ()+ _lhsOdecls :: Decls+ _lhsOdecls = rule769 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule770 ()+ _lhsOexprs :: Exprs+ _lhsOexprs = rule771 ()+ _lhsOtSigs :: [Decl]+ _lhsOtSigs = rule772 ()+ _lhsOtps :: [Type]+ _lhsOtps = rule773 ()+ _lhsOusedVars :: Set String+ _lhsOusedVars = rule774 ()+ _lhsOdeclsAbove :: [Decl]+ _lhsOdeclsAbove = rule775 _lhsIdeclsAbove+ _lhsOvisitedSet :: Set Identifier+ _lhsOvisitedSet = rule776 _lhsIvisitedSet+ __result_ = T_Sequence_vOut46 _lhsOallTpsFound _lhsOblockDecls _lhsOcomments _lhsOdecls _lhsOdeclsAbove _lhsOdefinedInsts _lhsOexprs _lhsOtSigs _lhsOtps _lhsOusedVars _lhsOvisitedSet+ in __result_ )+ in C_Sequence_s47 v46+ {-# INLINE rule766 #-}+ {-# LINE 629 "./src-ag/GenerateCode.ag" #-}+ rule766 = \ ((_lhsIdeclsAbove) :: [Decl]) ((_lhsIlastExpr) :: Expr) ->+ {-# LINE 629 "./src-ag/GenerateCode.ag" #-}+ DeclTerminator _lhsIdeclsAbove _lhsIlastExpr+ {-# LINE 5239 "dist/build/GenerateCode.hs"#-}+ {-# INLINE rule767 #-}+ rule767 = \ (_ :: ()) ->+ True+ {-# INLINE rule768 #-}+ rule768 = \ (_ :: ()) ->+ []+ {-# INLINE rule769 #-}+ rule769 = \ (_ :: ()) ->+ []+ {-# INLINE rule770 #-}+ rule770 = \ (_ :: ()) ->+ []+ {-# INLINE rule771 #-}+ rule771 = \ (_ :: ()) ->+ []+ {-# INLINE rule772 #-}+ rule772 = \ (_ :: ()) ->+ []+ {-# INLINE rule773 #-}+ rule773 = \ (_ :: ()) ->+ []+ {-# INLINE rule774 #-}+ rule774 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule775 #-}+ rule775 = \ ((_lhsIdeclsAbove) :: [Decl]) ->+ _lhsIdeclsAbove+ {-# INLINE rule776 #-}+ rule776 = \ ((_lhsIvisitedSet) :: Set Identifier) -> _lhsIvisitedSet
src-generated/HsToken.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/HsToken.ag)+-- UUAGC 0.9.50 (src-ag/HsToken.ag) module HsToken where {-# LINE 2 "./src-ag/HsToken.ag" #-}
src-generated/Interfaces.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/Interfaces.ag)+-- UUAGC 0.9.50 (src-ag/Interfaces.ag) module Interfaces where {-# LINE 2 "./src-ag/Interfaces.ag" #-}
src-generated/KWOrder.hs view
@@ -2,35 +2,35 @@ {-# LANGUAGE ScopedTypeVariables #-} module KWOrder where-{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 16 "dist/build/KWOrder.hs" #-}--{-# LINE 2 "./src-ag/HsToken.ag" #-}+{-# LINE 2 "./src-ag/Patterns.ag" #-} -import CommonTypes+-- Patterns.ag imports import UU.Scanner.Position(Pos)-{-# LINE 22 "dist/build/KWOrder.hs" #-}+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 11 "dist/build/KWOrder.hs" #-} {-# LINE 2 "./src-ag/Expression.ag" #-} import UU.Scanner.Position(Pos) import HsToken-{-# LINE 28 "dist/build/KWOrder.hs" #-}+{-# LINE 17 "dist/build/KWOrder.hs" #-} -{-# LINE 2 "./src-ag/Patterns.ag" #-}+{-# LINE 2 "./src-ag/HsToken.ag" #-} --- Patterns.ag imports+import CommonTypes import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 23 "dist/build/KWOrder.hs" #-}++{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages {-# LINE 35 "dist/build/KWOrder.hs" #-} {-# LINE 8 "./src-ag/KWOrder.ag" #-}
src-generated/Macro.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/Macro.ag)+-- UUAGC 0.9.50 (src-ag/Macro.ag) module Macro where {-# LINE 4 "./src-ag/Macro.ag" #-} @@ -50,4 +50,4 @@ child just : Macro alternative Nothing: -}-type MaybeMacro = Maybe Macro+type MaybeMacro = Maybe (Macro)
src-generated/Order.hs view
@@ -2,3805 +2,3845 @@ {-# LANGUAGE ScopedTypeVariables #-} module Order where-{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 11 "dist/build/Order.hs" #-}--{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken-{-# LINE 17 "dist/build/Order.hs" #-}--{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}---- AbstractSyntax.ag imports-import Data.Set(Set)-import Data.Map(Map)-import Patterns (Pattern(..),Patterns)-import Expression (Expression(..))-import Macro --marcos-import CommonTypes-import ErrorMessages-{-# LINE 29 "dist/build/Order.hs" #-}--{-# LINE 10 "./src-ag/Order.ag" #-}---- From uuagc-import CommonTypes-import Patterns-import ErrorMessages-import AbstractSyntax-import Code hiding (Type)-import qualified Code-import Expression-import Options-import SequentialComputation-import SequentialTypes-import CodeSyntax-import GrammarInfo-import HsToken(HsTokensRoot(HsTokensRoot))-import HsTokenScanner(lexTokens)-import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))--- From uulib-import qualified Data.Map as Map-import qualified Data.Set as Set-import qualified Data.Sequence as Seq-import Data.Map(Map)-import Data.Set(Set)-import Data.Sequence(Seq, (><))-import UU.Util.Utils-import UU.Scanner.Position(Pos(..),initPos)-import Data.Foldable(toList)---- From haskell libraries-import Control.Monad(liftM)-import qualified Data.Array as Array-import Data.Array((!),bounds,inRange)-import Data.List(elemIndex,partition,sort,mapAccumL,find,nubBy,intersperse,groupBy,transpose)-import qualified Data.Tree as Tree-import Data.Maybe-{-# LINE 67 "dist/build/Order.hs" #-}-import Control.Monad.Identity (Identity)-import qualified Control.Monad.Identity-{-# LINE 47 "./src-ag/Order.ag" #-}---- Terminates with an error if the key is not in the map-findWithErr1 :: (Ord k, Show k) => String -> k -> Map k a -> a-findWithErr1 s k- = Map.findWithDefault (error ("findWithErr1 " ++ s ++ ": key " ++ show k ++ " not in map.")) k--findWithErr2 :: (Ord k, Show k, Show a) => k -> Map k a -> a-findWithErr2 k m- = Map.findWithDefault (error ("findWithErr2: key " ++ show k ++ " not in map: " ++ show m)) k m-{-# LINE 80 "dist/build/Order.hs" #-}--{-# LINE 72 "./src-ag/Order.ag" #-}--startsWith :: String -> String -> Bool-startsWith k h = k == take (length k) h-{-# LINE 86 "dist/build/Order.hs" #-}--{-# LINE 139 "./src-ag/Order.ag" #-}--getNtName :: Type -> NontermIdent-getNtName (NT nt _ _) = nt-getNtName _ = nullIdent-{-# LINE 93 "dist/build/Order.hs" #-}--{-# LINE 167 "./src-ag/Order.ag" #-}--data AltAttr = AltAttr Identifier Identifier Bool- deriving (Eq, Ord, Show)-{-# LINE 99 "dist/build/Order.hs" #-}--{-# LINE 237 "./src-ag/Order.ag" #-}--substSelf nt tp- = case tp of- NT n tps defor | n == _SELF -> NT nt tps defor- _ -> tp--haskellTupel :: [Type] -> Maybe Type-haskellTupel ts = Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))-{-# LINE 110 "dist/build/Order.hs" #-}--{-# LINE 688 "./src-ag/Order.ag" #-}--swap (a,b) = (b,a)--showPath :: Table CRule -> [Vertex] -> [String]-showPath ruleTable path- = let look a | inRange (bounds ruleTable) a = [showOrigin (ruleTable ! a)]- | otherwise = ["Vertex " ++ show a]- showOrigin cr | getHasCode cr && getName (getAttr cr) /= "self" = prettyCRule cr ++ " (" ++ show (getPos (getAttr cr)) ++ ")"- | otherwise = prettyCRule cr- in concatMap look path---showPathLocal :: Table CRule -> [Vertex] -> [String]-showPathLocal _ [] = []-showPathLocal ruleTable xs = showP (xs++[-1])- where showP [] = []- showP (v1:v2:vs) = let line = step v1 v2- lines = showP vs- in line:lines- step v1 v2 = " - " ++ a1- where r1 = ruleTable ! v1- a1 = show (getAttr r1)---limitTo :: Int -> [String] -> [String]-limitTo _ [] = []-limitTo 0 _ = ["....etcetera, etcetera...."]-limitTo n (x:xs) = x : limitTo (n-1) xs--showPathNice :: Table CRule -> [Vertex] -> [String]-showPathNice _ [] = []-showPathNice ruleTable xs = limitTo 100 (showP ((-1):xs++[-1]))- where [maxf, maxa, maxn, maxc] = maxWidths ruleTable (take 100 xs)- showP [] = []- showP (v1:v2:vs) = let line = step v1 v2- lines = showP vs- in if null line then lines else line:lines- step v1 v2 | last && first = induced- | last && isSyn r1 = "pass up " ++ alignR maxf "" ++ " " ++ alignL maxa a1 ++ " in " ++ alignR maxn n1 ++ "|" ++ c1 ++ induced- | first&& not(isSyn r2) = "get from above " ++ alignR maxf "" ++ " " ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2- | last = "pass down " ++ alignR maxf f1 ++ "." ++ a1 ++ induced- | isSyn r2 = "get from below " ++ alignR maxf f2 ++ "." ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2- | isLocal r1 = if head a1 == '_'- then ""- else "calculate " ++ alignR maxf "loc" ++ "." ++ a1- | otherwise = "pass down " ++ alignR maxf f1 ++ "." ++ alignL maxa a1 ++ " to " ++ alignR maxn n2 ++ "|" ++ c2- where- first = v1<0- last = v2<0- r1 = ruleTable ! v1- r2 = ruleTable ! v2- a1 = show (getAttr r1)- a2 = show (getAttr r2)- f1 = show (getField r1)- f2 = show (getField r2)- n1 = show (getLhsNt r1)- n2 = show (getLhsNt r2)- c1 = show (getCon r1)- c2 = show (getCon r2)- induced | v2== -2 = " INDUCED dependency to "- | otherwise = ""---maxWidths ruleTable vs- = map maximum (transpose (map getWidth vs))- where getWidth v | v<0 = [0,0,0,0]- | otherwise = map (length . show . ($ (ruleTable!v))) [getField, getAttr, getLhsNt, getCon]--alignL n xs | k<n = xs ++ replicate (n-k) ' '- | otherwise = xs- where k = length xs--alignR n xs | k<n = replicate (n-k) ' ' ++ xs- | otherwise = xs- where k = length xs--localCycleErr :: Table CRule -> Bool -> Route -> Error-localCycleErr ruleTable o_visit (s:path)- = let cr = ruleTable ! s- attr = getAttr cr- nt = getLhsNt cr- con = getCon cr- in LocalCirc nt con attr o_visit (showPathLocal ruleTable path)--instCycleErr :: Table CRule -> Bool -> Route -> Error-instCycleErr ruleTable o_visit (s:path)- = let cr = ruleTable ! s- attr = getAttr cr- nt = getLhsNt cr- con = getCon cr- in InstCirc nt con attr o_visit (showPathLocal ruleTable path)--directCycleErrs :: Table NTAttr -> Table CRule -> Bool -> [EdgeRoutes] -> [Error]-directCycleErrs attrTable ruleTable o_visit xs- = let getNont v = case attrTable ! v of- NTASyn nt _ _ -> nt- NTAInh nt _ _ -> nt- getAttr v = case attrTable ! v of- NTASyn _ a _ -> a- NTAInh _ a _ -> a- sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2- procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)- wrapGroup gr@(((v1,_),_,_):_) = DirectCirc (getNont v1) o_visit (map procCycle gr)- in map wrapGroup (groupBy sameNont xs)--inducedCycleErrs :: Table NTAttr -> Table CRule -> CInterfaceMap -> [EdgeRoutes] -> [Error]-inducedCycleErrs attrTable ruleTable cim xs- = let getNont v = case attrTable ! v of- NTASyn nt _ _ -> nt- NTAInh nt _ _ -> nt- getAttr v = case attrTable ! v of- NTASyn _ a _ -> a- NTAInh _ a _ -> a- sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2- procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)- wrapGroup gr@(((v1,_),_,_):_) = InducedCirc (getNont v1) (findWithErr1 "inducedCycleErr.cinter" (getNont v1) cim) (map procCycle gr)- in map wrapGroup (groupBy sameNont xs)-{-# LINE 230 "dist/build/Order.hs" #-}--- Child ---------------------------------------------------------- wrapper-data Inh_Child = Inh_Child { allfields_Inh_Child :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Child :: ([Identifier]), attrs_Inh_Child :: ([(Identifier,Identifier)]), con_Inh_Child :: (Identifier), inh_Inh_Child :: (Attributes), inhMap_Inh_Child :: (Map Identifier Attributes), mergeMap_Inh_Child :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Child :: (Identifier), o_unbox_Inh_Child :: (Bool), syn_Inh_Child :: (Attributes), synMap_Inh_Child :: (Map Identifier Attributes) }-data Syn_Child = Syn_Child { attributes_Syn_Child :: ([(Identifier,Attributes,Attributes)]), collectChildrenInhs_Syn_Child :: (Map Identifier Attributes ), collectChildrenSyns_Syn_Child :: (Map Identifier Attributes ), errors_Syn_Child :: (Seq Error), field_Syn_Child :: ((Identifier,Type,ChildKind)), gathAltAttrs_Syn_Child :: ([AltAttr]), gathRules_Syn_Child :: (Seq CRule), inhs_Syn_Child :: (Seq (Identifier,Attributes)), nts_Syn_Child :: (Seq (Identifier,NontermIdent)), singlevisits_Syn_Child :: ([CRule]), terminals_Syn_Child :: ([Identifier]) }-{-# INLINABLE wrap_Child #-}-wrap_Child :: T_Child -> Inh_Child -> (Syn_Child )-wrap_Child (T_Child act) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Child_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap- (T_Child_vOut1 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals) <- return (inv_Child_s2 sem arg)- return (Syn_Child _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals)- )---- cata-{-# INLINE sem_Child #-}-sem_Child :: Child -> T_Child -sem_Child ( Child name_ tp_ kind_ ) = sem_Child_Child name_ tp_ kind_---- semantic domain-newtype T_Child = T_Child {- attach_T_Child :: Identity (T_Child_s2 )- }-newtype T_Child_s2 = C_Child_s2 {- inv_Child_s2 :: (T_Child_v1 )- }-data T_Child_s3 = C_Child_s3-type T_Child_v1 = (T_Child_vIn1 ) -> (T_Child_vOut1 )-data T_Child_vIn1 = T_Child_vIn1 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Attributes) (Map Identifier Attributes)-data T_Child_vOut1 = T_Child_vOut1 ([(Identifier,Attributes,Attributes)]) (Map Identifier Attributes ) (Map Identifier Attributes ) (Seq Error) ((Identifier,Type,ChildKind)) ([AltAttr]) (Seq CRule) (Seq (Identifier,Attributes)) (Seq (Identifier,NontermIdent)) ([CRule]) ([Identifier])-{-# NOINLINE sem_Child_Child #-}-sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child -sem_Child_Child arg_name_ arg_tp_ arg_kind_ = T_Child (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_Child_v1 - v1 = \ (T_Child_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) -> ( let- _chnt = rule0 arg_name_ arg_tp_- _inh = rule1 _chnt _lhsIinhMap- _syn = rule2 _chnt _lhsIsynMap- _maptolocal = rule3 _syn arg_tp_- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule4 _maptolocal _syn arg_name_- _lhsOnts :: Seq (Identifier,NontermIdent)- _lhsOnts = rule5 arg_name_ arg_tp_- _lhsOinhs :: Seq (Identifier,Attributes)- _lhsOinhs = rule6 _inh arg_name_- _gathRules = rule7 _lhsIcon _lhsInt _maptolocal _syn arg_name_ arg_tp_- _lhsOcollectChildrenSyns :: Map Identifier Attributes - _lhsOcollectChildrenSyns = rule8 _syn arg_name_- _lhsOcollectChildrenInhs :: Map Identifier Attributes - _lhsOcollectChildrenInhs = rule9 _inh arg_name_- _lhsOsinglevisits :: [CRule]- _lhsOsinglevisits = rule10 _inh _maptolocal _syn arg_name_ arg_tp_- _lhsOterminals :: [Identifier]- _lhsOterminals = rule11 _maptolocal arg_name_- _lhsOattributes :: [(Identifier,Attributes,Attributes)]- _lhsOattributes = rule12 _inh _syn arg_name_- _lhsOfield :: (Identifier,Type,ChildKind)- _lhsOfield = rule13 arg_kind_ arg_name_ arg_tp_- _lhsOerrors :: Seq Error- _lhsOerrors = rule14 ()- _lhsOgathRules :: Seq CRule- _lhsOgathRules = rule15 _gathRules- __result_ = T_Child_vOut1 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals- in __result_ )- in C_Child_s2 v1- {-# INLINE rule0 #-}- {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}- rule0 = \ name_ tp_ ->- {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}- case tp_ of- NT nt _ _ -> nt- Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")- Haskell t -> identifier ""- {-# LINE 306 "dist/build/Order.hs"#-}- {-# INLINE rule1 #-}- {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}- rule1 = \ _chnt ((_lhsIinhMap) :: Map Identifier Attributes) ->- {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 312 "dist/build/Order.hs"#-}- {-# INLINE rule2 #-}- {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}- rule2 = \ _chnt ((_lhsIsynMap) :: Map Identifier Attributes) ->- {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}- Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 318 "dist/build/Order.hs"#-}- {-# INLINE rule3 #-}- {-# LINE 178 "./src-ag/Order.ag" #-}- rule3 = \ _syn tp_ ->- {-# LINE 178 "./src-ag/Order.ag" #-}- case tp_ of- NT nt _ _ -> Map.null _syn- _ -> True- {-# LINE 326 "dist/build/Order.hs"#-}- {-# INLINE rule4 #-}- {-# LINE 181 "./src-ag/Order.ag" #-}- rule4 = \ _maptolocal _syn name_ ->- {-# LINE 181 "./src-ag/Order.ag" #-}- if _maptolocal- then [ AltAttr _LOC name_ True ]- else [ AltAttr name_ syn True | syn <- Map.keys _syn ]- {-# LINE 334 "dist/build/Order.hs"#-}- {-# INLINE rule5 #-}- {-# LINE 196 "./src-ag/Order.ag" #-}- rule5 = \ name_ tp_ ->- {-# LINE 196 "./src-ag/Order.ag" #-}- Seq.singleton (name_,getNtName tp_)- {-# LINE 340 "dist/build/Order.hs"#-}- {-# INLINE rule6 #-}- {-# LINE 197 "./src-ag/Order.ag" #-}- rule6 = \ _inh name_ ->- {-# LINE 197 "./src-ag/Order.ag" #-}- Seq.singleton (name_,_inh )- {-# LINE 346 "dist/build/Order.hs"#-}- {-# INLINE rule7 #-}- {-# LINE 213 "./src-ag/Order.ag" #-}- rule7 = \ ((_lhsIcon) :: Identifier) ((_lhsInt) :: Identifier) _maptolocal _syn name_ tp_ ->- {-# LINE 213 "./src-ag/Order.ag" #-}- if _maptolocal- then Seq.singleton (cRuleTerminal name_ _lhsInt _lhsIcon tp_)- else Seq.fromList [ cRuleRhsSyn syn _lhsInt _lhsIcon tp name_ (getNtName tp_) | (syn,tp) <- Map.assocs _syn ]- {-# LINE 354 "dist/build/Order.hs"#-}- {-# INLINE rule8 #-}- {-# LINE 345 "./src-ag/Order.ag" #-}- rule8 = \ _syn name_ ->- {-# LINE 345 "./src-ag/Order.ag" #-}- Map.singleton name_ _syn- {-# LINE 360 "dist/build/Order.hs"#-}- {-# INLINE rule9 #-}- {-# LINE 346 "./src-ag/Order.ag" #-}- rule9 = \ _inh name_ ->- {-# LINE 346 "./src-ag/Order.ag" #-}- Map.singleton name_ _inh- {-# LINE 366 "dist/build/Order.hs"#-}- {-# INLINE rule10 #-}- {-# LINE 614 "./src-ag/Order.ag" #-}- rule10 = \ _inh _maptolocal _syn name_ tp_ ->- {-# LINE 614 "./src-ag/Order.ag" #-}- if _maptolocal- then []- else [CChildVisit name_ (getNtName tp_) 0 _inh _syn True]- {-# LINE 374 "dist/build/Order.hs"#-}- {-# INLINE rule11 #-}- {-# LINE 639 "./src-ag/Order.ag" #-}- rule11 = \ _maptolocal name_ ->- {-# LINE 639 "./src-ag/Order.ag" #-}- if _maptolocal- then [name_]- else []- {-# LINE 382 "dist/build/Order.hs"#-}- {-# INLINE rule12 #-}- {-# LINE 668 "./src-ag/Order.ag" #-}- rule12 = \ _inh _syn name_ ->- {-# LINE 668 "./src-ag/Order.ag" #-}- [(name_, _inh , _syn )]- {-# LINE 388 "dist/build/Order.hs"#-}- {-# INLINE rule13 #-}- {-# LINE 672 "./src-ag/Order.ag" #-}- rule13 = \ kind_ name_ tp_ ->- {-# LINE 672 "./src-ag/Order.ag" #-}- (name_, tp_, kind_)- {-# LINE 394 "dist/build/Order.hs"#-}- {-# INLINE rule14 #-}- rule14 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule15 #-}- rule15 = \ _gathRules ->- _gathRules---- Children ------------------------------------------------------- wrapper-data Inh_Children = Inh_Children { allfields_Inh_Children :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Children :: ([Identifier]), attrs_Inh_Children :: ([(Identifier,Identifier)]), con_Inh_Children :: (Identifier), inh_Inh_Children :: (Attributes), inhMap_Inh_Children :: (Map Identifier Attributes), mergeMap_Inh_Children :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Children :: (Identifier), o_unbox_Inh_Children :: (Bool), syn_Inh_Children :: (Attributes), synMap_Inh_Children :: (Map Identifier Attributes) }-data Syn_Children = Syn_Children { attributes_Syn_Children :: ([(Identifier,Attributes,Attributes)]), collectChildrenInhs_Syn_Children :: (Map Identifier Attributes ), collectChildrenSyns_Syn_Children :: (Map Identifier Attributes ), errors_Syn_Children :: (Seq Error), fields_Syn_Children :: ([(Identifier,Type,ChildKind)]), gathAltAttrs_Syn_Children :: ([AltAttr]), gathRules_Syn_Children :: (Seq CRule), inhs_Syn_Children :: (Seq (Identifier,Attributes)), nts_Syn_Children :: (Seq (Identifier,NontermIdent)), singlevisits_Syn_Children :: ([CRule]), terminals_Syn_Children :: ([Identifier]) }-{-# INLINABLE wrap_Children #-}-wrap_Children :: T_Children -> Inh_Children -> (Syn_Children )-wrap_Children (T_Children act) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Children_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap- (T_Children_vOut4 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals) <- return (inv_Children_s5 sem arg)- return (Syn_Children _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals)- )---- cata-{-# NOINLINE sem_Children #-}-sem_Children :: Children -> T_Children -sem_Children list = Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list)---- semantic domain-newtype T_Children = T_Children {- attach_T_Children :: Identity (T_Children_s5 )- }-newtype T_Children_s5 = C_Children_s5 {- inv_Children_s5 :: (T_Children_v4 )- }-data T_Children_s6 = C_Children_s6-type T_Children_v4 = (T_Children_vIn4 ) -> (T_Children_vOut4 )-data T_Children_vIn4 = T_Children_vIn4 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Attributes) (Map Identifier Attributes)-data T_Children_vOut4 = T_Children_vOut4 ([(Identifier,Attributes,Attributes)]) (Map Identifier Attributes ) (Map Identifier Attributes ) (Seq Error) ([(Identifier,Type,ChildKind)]) ([AltAttr]) (Seq CRule) (Seq (Identifier,Attributes)) (Seq (Identifier,NontermIdent)) ([CRule]) ([Identifier])-{-# NOINLINE sem_Children_Cons #-}-sem_Children_Cons :: T_Child -> T_Children -> T_Children -sem_Children_Cons arg_hd_ arg_tl_ = T_Children (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_Children_v4 - v4 = \ (T_Children_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) -> ( let- _hdX2 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_))- _tlX5 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_))- (T_Child_vOut1 _hdIattributes _hdIcollectChildrenInhs _hdIcollectChildrenSyns _hdIerrors _hdIfield _hdIgathAltAttrs _hdIgathRules _hdIinhs _hdInts _hdIsinglevisits _hdIterminals) = inv_Child_s2 _hdX2 (T_Child_vIn1 _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOo_unbox _hdOsyn _hdOsynMap)- (T_Children_vOut4 _tlIattributes _tlIcollectChildrenInhs _tlIcollectChildrenSyns _tlIerrors _tlIfields _tlIgathAltAttrs _tlIgathRules _tlIinhs _tlInts _tlIsinglevisits _tlIterminals) = inv_Children_s5 _tlX5 (T_Children_vIn4 _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOo_unbox _tlOsyn _tlOsynMap)- _lhsOfields :: [(Identifier,Type,ChildKind)]- _lhsOfields = rule16 _hdIfield _tlIfields- _lhsOattributes :: [(Identifier,Attributes,Attributes)]- _lhsOattributes = rule17 _hdIattributes _tlIattributes- _lhsOcollectChildrenInhs :: Map Identifier Attributes - _lhsOcollectChildrenInhs = rule18 _hdIcollectChildrenInhs _tlIcollectChildrenInhs- _lhsOcollectChildrenSyns :: Map Identifier Attributes - _lhsOcollectChildrenSyns = rule19 _hdIcollectChildrenSyns _tlIcollectChildrenSyns- _lhsOerrors :: Seq Error- _lhsOerrors = rule20 _hdIerrors _tlIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule21 _hdIgathAltAttrs _tlIgathAltAttrs- _lhsOgathRules :: Seq CRule- _lhsOgathRules = rule22 _hdIgathRules _tlIgathRules- _lhsOinhs :: Seq (Identifier,Attributes)- _lhsOinhs = rule23 _hdIinhs _tlIinhs- _lhsOnts :: Seq (Identifier,NontermIdent)- _lhsOnts = rule24 _hdInts _tlInts- _lhsOsinglevisits :: [CRule]- _lhsOsinglevisits = rule25 _hdIsinglevisits _tlIsinglevisits- _lhsOterminals :: [Identifier]- _lhsOterminals = rule26 _hdIterminals _tlIterminals- _hdOallfields = rule27 _lhsIallfields- _hdOallnts = rule28 _lhsIallnts- _hdOattrs = rule29 _lhsIattrs- _hdOcon = rule30 _lhsIcon- _hdOinh = rule31 _lhsIinh- _hdOinhMap = rule32 _lhsIinhMap- _hdOmergeMap = rule33 _lhsImergeMap- _hdOnt = rule34 _lhsInt- _hdOo_unbox = rule35 _lhsIo_unbox- _hdOsyn = rule36 _lhsIsyn- _hdOsynMap = rule37 _lhsIsynMap- _tlOallfields = rule38 _lhsIallfields- _tlOallnts = rule39 _lhsIallnts- _tlOattrs = rule40 _lhsIattrs- _tlOcon = rule41 _lhsIcon- _tlOinh = rule42 _lhsIinh- _tlOinhMap = rule43 _lhsIinhMap- _tlOmergeMap = rule44 _lhsImergeMap- _tlOnt = rule45 _lhsInt- _tlOo_unbox = rule46 _lhsIo_unbox- _tlOsyn = rule47 _lhsIsyn- _tlOsynMap = rule48 _lhsIsynMap- __result_ = T_Children_vOut4 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals- in __result_ )- in C_Children_s5 v4- {-# INLINE rule16 #-}- {-# LINE 675 "./src-ag/Order.ag" #-}- rule16 = \ ((_hdIfield) :: (Identifier,Type,ChildKind)) ((_tlIfields) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 675 "./src-ag/Order.ag" #-}- _hdIfield : _tlIfields- {-# LINE 495 "dist/build/Order.hs"#-}- {-# INLINE rule17 #-}- rule17 = \ ((_hdIattributes) :: [(Identifier,Attributes,Attributes)]) ((_tlIattributes) :: [(Identifier,Attributes,Attributes)]) ->- _hdIattributes ++ _tlIattributes- {-# INLINE rule18 #-}- rule18 = \ ((_hdIcollectChildrenInhs) :: Map Identifier Attributes ) ((_tlIcollectChildrenInhs) :: Map Identifier Attributes ) ->- _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs- {-# INLINE rule19 #-}- rule19 = \ ((_hdIcollectChildrenSyns) :: Map Identifier Attributes ) ((_tlIcollectChildrenSyns) :: Map Identifier Attributes ) ->- _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns- {-# INLINE rule20 #-}- rule20 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule21 #-}- rule21 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# INLINE rule22 #-}- rule22 = \ ((_hdIgathRules) :: Seq CRule) ((_tlIgathRules) :: Seq CRule) ->- _hdIgathRules Seq.>< _tlIgathRules- {-# INLINE rule23 #-}- rule23 = \ ((_hdIinhs) :: Seq (Identifier,Attributes)) ((_tlIinhs) :: Seq (Identifier,Attributes)) ->- _hdIinhs Seq.>< _tlIinhs- {-# INLINE rule24 #-}- rule24 = \ ((_hdInts) :: Seq (Identifier,NontermIdent)) ((_tlInts) :: Seq (Identifier,NontermIdent)) ->- _hdInts Seq.>< _tlInts- {-# INLINE rule25 #-}- rule25 = \ ((_hdIsinglevisits) :: [CRule]) ((_tlIsinglevisits) :: [CRule]) ->- _hdIsinglevisits ++ _tlIsinglevisits- {-# INLINE rule26 #-}- rule26 = \ ((_hdIterminals) :: [Identifier]) ((_tlIterminals) :: [Identifier]) ->- _hdIterminals ++ _tlIterminals- {-# INLINE rule27 #-}- rule27 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- _lhsIallfields- {-# INLINE rule28 #-}- rule28 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule29 #-}- rule29 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->- _lhsIattrs- {-# INLINE rule30 #-}- rule30 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule31 #-}- rule31 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule32 #-}- rule32 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule33 #-}- rule33 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->- _lhsImergeMap- {-# INLINE rule34 #-}- rule34 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule35 #-}- rule35 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule36 #-}- rule36 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule37 #-}- rule37 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule38 #-}- rule38 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- _lhsIallfields- {-# INLINE rule39 #-}- rule39 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule40 #-}- rule40 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->- _lhsIattrs- {-# INLINE rule41 #-}- rule41 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule42 #-}- rule42 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule43 #-}- rule43 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule44 #-}- rule44 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->- _lhsImergeMap- {-# INLINE rule45 #-}- rule45 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule46 #-}- rule46 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule47 #-}- rule47 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule48 #-}- rule48 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap-{-# NOINLINE sem_Children_Nil #-}-sem_Children_Nil :: T_Children -sem_Children_Nil = T_Children (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_Children_v4 - v4 = \ (T_Children_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) -> ( let- _lhsOfields :: [(Identifier,Type,ChildKind)]- _lhsOfields = rule49 ()- _lhsOattributes :: [(Identifier,Attributes,Attributes)]- _lhsOattributes = rule50 ()- _lhsOcollectChildrenInhs :: Map Identifier Attributes - _lhsOcollectChildrenInhs = rule51 ()- _lhsOcollectChildrenSyns :: Map Identifier Attributes - _lhsOcollectChildrenSyns = rule52 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule53 ()- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule54 ()- _lhsOgathRules :: Seq CRule- _lhsOgathRules = rule55 ()- _lhsOinhs :: Seq (Identifier,Attributes)- _lhsOinhs = rule56 ()- _lhsOnts :: Seq (Identifier,NontermIdent)- _lhsOnts = rule57 ()- _lhsOsinglevisits :: [CRule]- _lhsOsinglevisits = rule58 ()- _lhsOterminals :: [Identifier]- _lhsOterminals = rule59 ()- __result_ = T_Children_vOut4 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals- in __result_ )- in C_Children_s5 v4- {-# INLINE rule49 #-}- {-# LINE 676 "./src-ag/Order.ag" #-}- rule49 = \ (_ :: ()) ->- {-# LINE 676 "./src-ag/Order.ag" #-}- []- {-# LINE 629 "dist/build/Order.hs"#-}- {-# INLINE rule50 #-}- rule50 = \ (_ :: ()) ->- []- {-# INLINE rule51 #-}- rule51 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule52 #-}- rule52 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule53 #-}- rule53 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule54 #-}- rule54 = \ (_ :: ()) ->- []- {-# INLINE rule55 #-}- rule55 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule56 #-}- rule56 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule57 #-}- rule57 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule58 #-}- rule58 = \ (_ :: ()) ->- []- {-# INLINE rule59 #-}- rule59 = \ (_ :: ()) ->- []---- Expression ----------------------------------------------------- wrapper-data Inh_Expression = Inh_Expression { allfields_Inh_Expression :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Expression :: ([Identifier]), attrs_Inh_Expression :: ([(Identifier,Identifier)]), con_Inh_Expression :: (Identifier), mergeMap_Inh_Expression :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Expression :: (Identifier) }-data Syn_Expression = Syn_Expression { allRhsVars_Syn_Expression :: (Set (Identifier,Identifier)), copy_Syn_Expression :: (Expression), errors_Syn_Expression :: (Seq Error), textLines_Syn_Expression :: ([String]), usedAttrs_Syn_Expression :: ([(Identifier,Identifier)]), usedFields_Syn_Expression :: ([Identifier]), usedLocals_Syn_Expression :: ([Identifier]) }-{-# INLINABLE wrap_Expression #-}-wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )-wrap_Expression (T_Expression act) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Expression_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt- (T_Expression_vOut7 _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) <- return (inv_Expression_s8 sem arg)- return (Syn_Expression _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals)- )---- cata-{-# INLINE sem_Expression #-}-sem_Expression :: Expression -> T_Expression -sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_---- semantic domain-newtype T_Expression = T_Expression {- attach_T_Expression :: Identity (T_Expression_s8 )- }-newtype T_Expression_s8 = C_Expression_s8 {- inv_Expression_s8 :: (T_Expression_v7 )- }-data T_Expression_s9 = C_Expression_s9-type T_Expression_v7 = (T_Expression_vIn7 ) -> (T_Expression_vOut7 )-data T_Expression_vIn7 = T_Expression_vIn7 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Map Identifier (Identifier,[Identifier])) (Identifier)-data T_Expression_vOut7 = T_Expression_vOut7 (Set (Identifier,Identifier)) (Expression) (Seq Error) ([String]) ([(Identifier,Identifier)]) ([Identifier]) ([Identifier])-{-# NOINLINE sem_Expression_Expression #-}-sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression -sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st8) where- {-# NOINLINE st8 #-}- st8 = let- v7 :: T_Expression_v7 - v7 = \ (T_Expression_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt) -> ( let- (_textLines,_usedAttrs,_usedLocals,_usedFields) = rule60 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt arg_tks_- _lhsOerrors :: Seq Error- _lhsOerrors = rule61 ()- _lhsOallRhsVars :: Set (Identifier,Identifier)- _lhsOallRhsVars = rule62 _usedAttrs _usedFields _usedLocals- _copy = rule63 arg_pos_ arg_tks_- _lhsOcopy :: Expression- _lhsOcopy = rule64 _copy- _lhsOtextLines :: [String]- _lhsOtextLines = rule65 _textLines- _lhsOusedAttrs :: [(Identifier,Identifier)]- _lhsOusedAttrs = rule66 _usedAttrs- _lhsOusedFields :: [Identifier]- _lhsOusedFields = rule67 _usedFields- _lhsOusedLocals :: [Identifier]- _lhsOusedLocals = rule68 _usedLocals- __result_ = T_Expression_vOut7 _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals- in __result_ )- in C_Expression_s8 v7- {-# INLINE rule60 #-}- {-# LINE 466 "./src-ag/Order.ag" #-}- rule60 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ((_lhsInt) :: Identifier) tks_ ->- {-# LINE 466 "./src-ag/Order.ag" #-}- let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]- attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs- inherited = Inh_HsTokensRoot- { attrs_Inh_HsTokensRoot = attrsIn- , con_Inh_HsTokensRoot = _lhsIcon- , allfields_Inh_HsTokensRoot = _lhsIallfields- , allnts_Inh_HsTokensRoot = _lhsIallnts- , nt_Inh_HsTokensRoot = _lhsInt- }- synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited- in case synthesized of- Syn_HsTokensRoot- { textLines_Syn_HsTokensRoot = textLines- , usedAttrs_Syn_HsTokensRoot = usedAttrs- , usedLocals_Syn_HsTokensRoot = usedLocals- , usedFields_Syn_HsTokensRoot = usedFields- } -> let extraAttrs = [ (src,attr)- | (fld,attr) <- usedAttrs, let mbMerged = Map.lookup fld _lhsImergeMap, isJust mbMerged- , let (Just (_, srcs)) = mbMerged, src <- srcs ]- usedAttrs' = usedAttrs ++ extraAttrs- in (textLines,usedAttrs',usedLocals,usedFields)- {-# LINE 742 "dist/build/Order.hs"#-}- {-# INLINE rule61 #-}- {-# LINE 488 "./src-ag/Order.ag" #-}- rule61 = \ (_ :: ()) ->- {-# LINE 488 "./src-ag/Order.ag" #-}- Seq.empty- {-# LINE 748 "dist/build/Order.hs"#-}- {-# INLINE rule62 #-}- {-# LINE 489 "./src-ag/Order.ag" #-}- rule62 = \ _usedAttrs _usedFields _usedLocals ->- {-# LINE 489 "./src-ag/Order.ag" #-}- Set.fromList _usedAttrs- `Set.union`- Set.fromList [ (_LOC, l) | l <- _usedLocals ]- `Set.union`- Set.fromList [ (_FIELD, fld) | fld <- _usedFields ]- {-# LINE 758 "dist/build/Order.hs"#-}- {-# INLINE rule63 #-}- rule63 = \ pos_ tks_ ->- Expression pos_ tks_- {-# INLINE rule64 #-}- rule64 = \ _copy ->- _copy- {-# INLINE rule65 #-}- rule65 = \ _textLines ->- _textLines- {-# INLINE rule66 #-}- rule66 = \ _usedAttrs ->- _usedAttrs- {-# INLINE rule67 #-}- rule67 = \ _usedFields ->- _usedFields- {-# INLINE rule68 #-}- rule68 = \ _usedLocals ->- _usedLocals---- Grammar -------------------------------------------------------- wrapper-data Inh_Grammar = Inh_Grammar { options_Inh_Grammar :: (Options) }-data Syn_Grammar = Syn_Grammar { errors_Syn_Grammar :: (Seq Error), nAutoRules_Syn_Grammar :: (Int), nExplicitRules_Syn_Grammar :: (Int), output_Syn_Grammar :: (CGrammar) }-{-# INLINABLE wrap_Grammar #-}-wrap_Grammar :: T_Grammar -> Inh_Grammar -> (Syn_Grammar )-wrap_Grammar (T_Grammar act) (Inh_Grammar _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Grammar_vIn10 _lhsIoptions- (T_Grammar_vOut10 _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput) <- return (inv_Grammar_s11 sem arg)- return (Syn_Grammar _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput)- )---- cata-{-# INLINE sem_Grammar #-}-sem_Grammar :: Grammar -> T_Grammar -sem_Grammar ( Grammar typeSyns_ useMap_ derivings_ wrappers_ nonts_ pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ ) = sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ ( sem_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_---- semantic domain-newtype T_Grammar = T_Grammar {- attach_T_Grammar :: Identity (T_Grammar_s11 )- }-newtype T_Grammar_s11 = C_Grammar_s11 {- inv_Grammar_s11 :: (T_Grammar_v10 )- }-data T_Grammar_s12 = C_Grammar_s12-type T_Grammar_v10 = (T_Grammar_vIn10 ) -> (T_Grammar_vOut10 )-data T_Grammar_vIn10 = T_Grammar_vIn10 (Options)-data T_Grammar_vOut10 = T_Grammar_vOut10 (Seq Error) (Int) (Int) (CGrammar)-{-# 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 arg_typeSyns_ _ arg_derivings_ arg_wrappers_ arg_nonts_ arg_pragmas_ arg_manualAttrOrderMap_ arg_paramMap_ arg_contextMap_ arg_quantMap_ _ _ arg_aroundsMap_ arg_mergeMap_ = T_Grammar (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_Grammar_v10 - v10 = \ (T_Grammar_vIn10 _lhsIoptions) -> ( let- _nontsX17 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_nonts_))- (T_Nonterminals_vOut16 _nontsIacount _nontsIadditionalDep _nontsIaranges _nontsIaroundDep _nontsIcNonterminals _nontsIdirectDep _nontsIerrors _nontsIinhMap' _nontsIinstDep _nontsImergeDep _nontsInAutoRules _nontsInExplicitRules _nontsInonts _nontsIntattrs _nontsIrules _nontsIsynMap' _nontsIvcount) = inv_Nonterminals_s17 _nontsX17 (T_Nonterminals_vIn16 _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOinhMap _nontsOmanualAttrDepMap _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOprefix _nontsOsynMap _nontsOvcount)- _nontsOinhMap = rule69 _nontsIinhMap'- _nontsOsynMap = rule70 _nontsIsynMap'- _o_dovisit = rule71 _cyclesErrors _lhsIoptions- _nontsOo_cata = rule72 _lhsIoptions- _nontsOo_data = rule73 _lhsIoptions- _nontsOo_sig = rule74 _lhsIoptions- _nontsOo_sem = rule75 _lhsIoptions- _nontsOo_rename = rule76 _lhsIoptions- _nontsOo_newtypes = rule77 _lhsIoptions- _nontsOo_wantvisit = rule78 _lhsIoptions- _nontsOo_unbox = rule79 _lhsIoptions- _nontsOo_case = rule80 _lhsIoptions- _nontsOprefix = rule81 _lhsIoptions- _nontsOvcount = rule82 ()- _nontsOmanualAttrDepMap = rule83 arg_manualAttrOrderMap_- _nontsOaroundMap = rule84 arg_aroundsMap_- _nontsOacount = rule85 ()- _ruleTable = rule86 _nontsIrules _nontsIvcount- _attrTable = rule87 _nontsIacount _nontsIntattrs- _attrVertex = rule88 _nontsIntattrs- _tdpToTds = rule89 _attrVertex _nontsIrules- _tdsToTdp = rule90 _tdpToTds- _directDep = rule91 _nontsIadditionalDep _nontsIdirectDep- _instDep = rule92 _nontsIinstDep- _aroundDep = rule93 _nontsIaroundDep- _mergeDep = rule94 _nontsImergeDep- _info = rule95 _attrTable _nontsIacount _nontsIaranges _nontsInonts _nontsIvcount _ruleTable _tdpToTds _tdsToTdp arg_wrappers_- (_cInterfaceMap,_cVisitsMap,_cyclesErrors) = rule96 _aroundDep _attrTable _directDep _info _instDep _lhsIoptions _mergeDep _ruleTable- _lhsOerrors :: Seq Error- _lhsOerrors = rule97 _cyclesErrors _lhsIoptions _nontsIerrors- _lhsOoutput :: CGrammar- _lhsOoutput = rule98 _aroundMap _mergeMap _nontsIcNonterminals _o_dovisit arg_contextMap_ arg_derivings_ arg_paramMap_ arg_pragmas_ arg_quantMap_ arg_typeSyns_ arg_wrappers_- _aroundMap = rule99 arg_aroundsMap_- _mergeMap = rule100 arg_mergeMap_- _nontsOallnts = rule101 _nontsInonts- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule102 _nontsInAutoRules- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule103 _nontsInExplicitRules- _nontsOcInterfaceMap = rule104 _cInterfaceMap- _nontsOcVisitsMap = rule105 _cVisitsMap- _nontsOmergeMap = rule106 _mergeMap- _nontsOo_dovisit = rule107 _o_dovisit- __result_ = T_Grammar_vOut10 _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput- in __result_ )- in C_Grammar_s11 v10- {-# INLINE rule69 #-}- {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}- rule69 = \ ((_nontsIinhMap') :: Map Identifier Attributes) ->- {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}- _nontsIinhMap'- {-# LINE 868 "dist/build/Order.hs"#-}- {-# INLINE rule70 #-}- {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}- rule70 = \ ((_nontsIsynMap') :: Map Identifier Attributes) ->- {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}- _nontsIsynMap'- {-# LINE 874 "dist/build/Order.hs"#-}- {-# INLINE rule71 #-}- {-# LINE 124 "./src-ag/Order.ag" #-}- rule71 = \ _cyclesErrors ((_lhsIoptions) :: Options) ->- {-# LINE 124 "./src-ag/Order.ag" #-}- visit _lhsIoptions && null _cyclesErrors- {-# LINE 880 "dist/build/Order.hs"#-}- {-# INLINE rule72 #-}- {-# LINE 125 "./src-ag/Order.ag" #-}- rule72 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 125 "./src-ag/Order.ag" #-}- folds _lhsIoptions- {-# LINE 886 "dist/build/Order.hs"#-}- {-# INLINE rule73 #-}- {-# LINE 126 "./src-ag/Order.ag" #-}- rule73 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 126 "./src-ag/Order.ag" #-}- dataTypes _lhsIoptions- {-# LINE 892 "dist/build/Order.hs"#-}- {-# INLINE rule74 #-}- {-# LINE 127 "./src-ag/Order.ag" #-}- rule74 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 127 "./src-ag/Order.ag" #-}- typeSigs _lhsIoptions- {-# LINE 898 "dist/build/Order.hs"#-}- {-# INLINE rule75 #-}- {-# LINE 128 "./src-ag/Order.ag" #-}- rule75 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 128 "./src-ag/Order.ag" #-}- semfuns _lhsIoptions- {-# LINE 904 "dist/build/Order.hs"#-}- {-# INLINE rule76 #-}- {-# LINE 129 "./src-ag/Order.ag" #-}- rule76 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 129 "./src-ag/Order.ag" #-}- rename _lhsIoptions- {-# LINE 910 "dist/build/Order.hs"#-}- {-# INLINE rule77 #-}- {-# LINE 130 "./src-ag/Order.ag" #-}- rule77 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 130 "./src-ag/Order.ag" #-}- newtypes _lhsIoptions- {-# LINE 916 "dist/build/Order.hs"#-}- {-# INLINE rule78 #-}- {-# LINE 131 "./src-ag/Order.ag" #-}- rule78 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 131 "./src-ag/Order.ag" #-}- visit _lhsIoptions- {-# LINE 922 "dist/build/Order.hs"#-}- {-# INLINE rule79 #-}- {-# LINE 132 "./src-ag/Order.ag" #-}- rule79 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 132 "./src-ag/Order.ag" #-}- unbox _lhsIoptions- {-# LINE 928 "dist/build/Order.hs"#-}- {-# INLINE rule80 #-}- {-# LINE 133 "./src-ag/Order.ag" #-}- rule80 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 133 "./src-ag/Order.ag" #-}- cases _lhsIoptions- {-# LINE 934 "dist/build/Order.hs"#-}- {-# INLINE rule81 #-}- {-# LINE 134 "./src-ag/Order.ag" #-}- rule81 = \ ((_lhsIoptions) :: Options) ->- {-# LINE 134 "./src-ag/Order.ag" #-}- prefix _lhsIoptions- {-# LINE 940 "dist/build/Order.hs"#-}- {-# INLINE rule82 #-}- {-# LINE 260 "./src-ag/Order.ag" #-}- rule82 = \ (_ :: ()) ->- {-# LINE 260 "./src-ag/Order.ag" #-}- 0- {-# LINE 946 "dist/build/Order.hs"#-}- {-# INLINE rule83 #-}- {-# LINE 286 "./src-ag/Order.ag" #-}- rule83 = \ manualAttrOrderMap_ ->- {-# LINE 286 "./src-ag/Order.ag" #-}- manualAttrOrderMap_- {-# LINE 952 "dist/build/Order.hs"#-}- {-# INLINE rule84 #-}- {-# LINE 415 "./src-ag/Order.ag" #-}- rule84 = \ aroundsMap_ ->- {-# LINE 415 "./src-ag/Order.ag" #-}- aroundsMap_- {-# LINE 958 "dist/build/Order.hs"#-}- {-# INLINE rule85 #-}- {-# LINE 504 "./src-ag/Order.ag" #-}- rule85 = \ (_ :: ()) ->- {-# LINE 504 "./src-ag/Order.ag" #-}- 0- {-# LINE 964 "dist/build/Order.hs"#-}- {-# INLINE rule86 #-}- {-# LINE 542 "./src-ag/Order.ag" #-}- rule86 = \ ((_nontsIrules) :: Seq (Vertex,CRule)) ((_nontsIvcount) :: Int) ->- {-# LINE 542 "./src-ag/Order.ag" #-}- Array.array (0,_nontsIvcount-1) (toList _nontsIrules)- {-# LINE 970 "dist/build/Order.hs"#-}- {-# INLINE rule87 #-}- {-# LINE 543 "./src-ag/Order.ag" #-}- rule87 = \ ((_nontsIacount) :: Int) ((_nontsIntattrs) :: Seq (Vertex,NTAttr)) ->- {-# LINE 543 "./src-ag/Order.ag" #-}- Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)- {-# LINE 976 "dist/build/Order.hs"#-}- {-# INLINE rule88 #-}- {-# LINE 544 "./src-ag/Order.ag" #-}- rule88 = \ ((_nontsIntattrs) :: Seq (Vertex,NTAttr)) ->- {-# LINE 544 "./src-ag/Order.ag" #-}- Map.fromList (map swap (toList _nontsIntattrs))- {-# LINE 982 "dist/build/Order.hs"#-}- {-# INLINE rule89 #-}- {-# LINE 545 "./src-ag/Order.ag" #-}- rule89 = \ _attrVertex ((_nontsIrules) :: Seq (Vertex,CRule)) ->- {-# LINE 545 "./src-ag/Order.ag" #-}- [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))- | (s,cr) <- toList _nontsIrules]- {-# LINE 989 "dist/build/Order.hs"#-}- {-# INLINE rule90 #-}- {-# LINE 547 "./src-ag/Order.ag" #-}- rule90 = \ _tdpToTds ->- {-# LINE 547 "./src-ag/Order.ag" #-}- let eq (_,v) (_,v') = v == v'- conv ((s,v):svs) | v == -1 = Nothing- | otherwise = Just (v,s:map fst svs)- in mapMaybe conv (eqClasses eq _tdpToTds)- {-# LINE 998 "dist/build/Order.hs"#-}- {-# INLINE rule91 #-}- {-# LINE 551 "./src-ag/Order.ag" #-}- rule91 = \ ((_nontsIadditionalDep) :: Seq Edge) ((_nontsIdirectDep) :: Seq Edge) ->- {-# LINE 551 "./src-ag/Order.ag" #-}- toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)- {-# LINE 1004 "dist/build/Order.hs"#-}- {-# INLINE rule92 #-}- {-# LINE 552 "./src-ag/Order.ag" #-}- rule92 = \ ((_nontsIinstDep) :: Seq Edge) ->- {-# LINE 552 "./src-ag/Order.ag" #-}- toList _nontsIinstDep- {-# LINE 1010 "dist/build/Order.hs"#-}- {-# INLINE rule93 #-}- {-# LINE 553 "./src-ag/Order.ag" #-}- rule93 = \ ((_nontsIaroundDep) :: Seq Edge) ->- {-# LINE 553 "./src-ag/Order.ag" #-}- toList _nontsIaroundDep- {-# LINE 1016 "dist/build/Order.hs"#-}- {-# INLINE rule94 #-}- {-# LINE 554 "./src-ag/Order.ag" #-}- rule94 = \ ((_nontsImergeDep) :: Seq Edge) ->- {-# LINE 554 "./src-ag/Order.ag" #-}- toList _nontsImergeDep- {-# LINE 1022 "dist/build/Order.hs"#-}- {-# INLINE rule95 #-}- {-# LINE 555 "./src-ag/Order.ag" #-}- rule95 = \ _attrTable ((_nontsIacount) :: Int) ((_nontsIaranges) :: Seq (Int,Int,Int)) ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ((_nontsIvcount) :: Int) _ruleTable _tdpToTds _tdsToTdp wrappers_ ->- {-# LINE 555 "./src-ag/Order.ag" #-}- let def [] = -1- def (v:vs) = v- in Info { tdsToTdp = Array.array (0,_nontsIacount-1) _tdsToTdp- , tdpToTds = Array.array (0,_nontsIvcount-1) _tdpToTds- , attrTable = _attrTable- , ruleTable = _ruleTable- , lmh = toList _nontsIaranges- , nonts = _nontsInonts- , wraps = wrappers_- }- {-# LINE 1037 "dist/build/Order.hs"#-}- {-# INLINE rule96 #-}- {-# LINE 567 "./src-ag/Order.ag" #-}- rule96 = \ _aroundDep _attrTable _directDep _info _instDep ((_lhsIoptions) :: Options) _mergeDep _ruleTable ->- {-# LINE 567 "./src-ag/Order.ag" #-}- case computeSequential _info _directDep (_instDep ++ _aroundDep ++ _mergeDep ) of- CycleFree cim cvm -> ( cim- , cvm- , []- )- LocalCycle errs -> ( error "No interfaces for AG with local cycles"- , error "No visit sub-sequences for AG with local cycles"- , map (localCycleErr _ruleTable (visit _lhsIoptions)) errs- )- InstCycle errs -> ( error "No interfaces for AG with cycles through insts"- , error "No visit sub-sequences for AG with cycles through insts"- , map (instCycleErr _ruleTable (visit _lhsIoptions)) errs- )- DirectCycle errs -> ( error "No interfaces for AG with direct cycles"- , error "No visit sub-sequences for AG with direct cycles"- , directCycleErrs _attrTable _ruleTable (visit _lhsIoptions) errs- )- InducedCycle cim errs -> ( cim- , error "No visit sub-sequences for AG with induced cycles"- , inducedCycleErrs _attrTable _ruleTable cim errs- )- {-# LINE 1063 "dist/build/Order.hs"#-}- {-# INLINE rule97 #-}- {-# LINE 588 "./src-ag/Order.ag" #-}- rule97 = \ _cyclesErrors ((_lhsIoptions) :: Options) ((_nontsIerrors) :: Seq Error) ->- {-# LINE 588 "./src-ag/Order.ag" #-}- (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)- Seq.>< _nontsIerrors- {-# LINE 1070 "dist/build/Order.hs"#-}- {-# INLINE rule98 #-}- {-# LINE 620 "./src-ag/Order.ag" #-}- rule98 = \ _aroundMap _mergeMap ((_nontsIcNonterminals) :: CNonterminals) _o_dovisit contextMap_ derivings_ paramMap_ pragmas_ quantMap_ typeSyns_ wrappers_ ->- {-# LINE 620 "./src-ag/Order.ag" #-}- CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ quantMap_ _aroundMap _mergeMap _o_dovisit- {-# LINE 1076 "dist/build/Order.hs"#-}- {-# INLINE rule99 #-}- {-# LINE 633 "./src-ag/Order.ag" #-}- rule99 = \ aroundsMap_ ->- {-# LINE 633 "./src-ag/Order.ag" #-}- Map.map (Map.map Map.keysSet) aroundsMap_- {-# LINE 1082 "dist/build/Order.hs"#-}- {-# INLINE rule100 #-}- {-# LINE 634 "./src-ag/Order.ag" #-}- rule100 = \ mergeMap_ ->- {-# LINE 634 "./src-ag/Order.ag" #-}- Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_- {-# LINE 1088 "dist/build/Order.hs"#-}- {-# INLINE rule101 #-}- {-# LINE 651 "./src-ag/Order.ag" #-}- rule101 = \ ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ->- {-# LINE 651 "./src-ag/Order.ag" #-}- map fst (_nontsInonts)- {-# LINE 1094 "dist/build/Order.hs"#-}- {-# INLINE rule102 #-}- rule102 = \ ((_nontsInAutoRules) :: Int) ->- _nontsInAutoRules- {-# INLINE rule103 #-}- rule103 = \ ((_nontsInExplicitRules) :: Int) ->- _nontsInExplicitRules- {-# INLINE rule104 #-}- rule104 = \ _cInterfaceMap ->- _cInterfaceMap- {-# INLINE rule105 #-}- rule105 = \ _cVisitsMap ->- _cVisitsMap- {-# INLINE rule106 #-}- rule106 = \ _mergeMap ->- _mergeMap- {-# INLINE rule107 #-}- rule107 = \ _o_dovisit ->- _o_dovisit---- Nonterminal ---------------------------------------------------- wrapper-data Inh_Nonterminal = Inh_Nonterminal { acount_Inh_Nonterminal :: (Int), allnts_Inh_Nonterminal :: ([Identifier]), aroundMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), cInterfaceMap_Inh_Nonterminal :: (CInterfaceMap), cVisitsMap_Inh_Nonterminal :: (CVisitsMap), inhMap_Inh_Nonterminal :: (Map Identifier Attributes), manualAttrDepMap_Inh_Nonterminal :: (AttrOrderMap), mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), o_case_Inh_Nonterminal :: (Bool), o_cata_Inh_Nonterminal :: (Bool), o_data_Inh_Nonterminal :: (Bool), o_dovisit_Inh_Nonterminal :: (Bool), o_newtypes_Inh_Nonterminal :: (Bool), o_rename_Inh_Nonterminal :: (Bool), o_sem_Inh_Nonterminal :: (Bool), o_sig_Inh_Nonterminal :: (Bool), o_unbox_Inh_Nonterminal :: (Bool), o_wantvisit_Inh_Nonterminal :: (Bool), prefix_Inh_Nonterminal :: (String), synMap_Inh_Nonterminal :: (Map Identifier Attributes), vcount_Inh_Nonterminal :: (Int) }-data Syn_Nonterminal = Syn_Nonterminal { acount_Syn_Nonterminal :: (Int), additionalDep_Syn_Nonterminal :: (Seq Edge), aranges_Syn_Nonterminal :: (Seq (Int,Int,Int)), aroundDep_Syn_Nonterminal :: (Seq Edge), cNonterminal_Syn_Nonterminal :: (CNonterminal), directDep_Syn_Nonterminal :: (Seq Edge), errors_Syn_Nonterminal :: (Seq Error), inhMap'_Syn_Nonterminal :: (Map Identifier Attributes), instDep_Syn_Nonterminal :: (Seq Edge), mergeDep_Syn_Nonterminal :: (Seq Edge), nAutoRules_Syn_Nonterminal :: (Int), nExplicitRules_Syn_Nonterminal :: (Int), nonts_Syn_Nonterminal :: ([(NontermIdent,[ConstructorIdent])]), ntattrs_Syn_Nonterminal :: (Seq (Vertex,NTAttr)), rules_Syn_Nonterminal :: (Seq (Vertex,CRule)), synMap'_Syn_Nonterminal :: (Map Identifier Attributes), vcount_Syn_Nonterminal :: (Int) }-{-# INLINABLE wrap_Nonterminal #-}-wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> (Syn_Nonterminal )-wrap_Nonterminal (T_Nonterminal act) (Inh_Nonterminal _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Nonterminal_vIn13 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount- (T_Nonterminal_vOut13 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount) <- return (inv_Nonterminal_s14 sem arg)- return (Syn_Nonterminal _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount)- )---- cata-{-# INLINE sem_Nonterminal #-}-sem_Nonterminal :: Nonterminal -> T_Nonterminal -sem_Nonterminal ( Nonterminal nt_ params_ inh_ syn_ prods_ ) = sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ ( sem_Productions prods_ )---- semantic domain-newtype T_Nonterminal = T_Nonterminal {- attach_T_Nonterminal :: Identity (T_Nonterminal_s14 )- }-newtype T_Nonterminal_s14 = C_Nonterminal_s14 {- inv_Nonterminal_s14 :: (T_Nonterminal_v13 )- }-data T_Nonterminal_s15 = C_Nonterminal_s15-type T_Nonterminal_v13 = (T_Nonterminal_vIn13 ) -> (T_Nonterminal_vOut13 )-data T_Nonterminal_vIn13 = T_Nonterminal_vIn13 (Int) ([Identifier]) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (CInterfaceMap) (CVisitsMap) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (String) (Map Identifier Attributes) (Int)-data T_Nonterminal_vOut13 = T_Nonterminal_vOut13 (Int) (Seq Edge) (Seq (Int,Int,Int)) (Seq Edge) (CNonterminal) (Seq Edge) (Seq Error) (Map Identifier Attributes) (Seq Edge) (Seq Edge) (Int) (Int) ([(NontermIdent,[ConstructorIdent])]) (Seq (Vertex,NTAttr)) (Seq (Vertex,CRule)) (Map Identifier Attributes) (Int)-{-# NOINLINE sem_Nonterminal_Nonterminal #-}-sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions -> T_Nonterminal -sem_Nonterminal_Nonterminal arg_nt_ arg_params_ arg_inh_ arg_syn_ arg_prods_ = T_Nonterminal (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_Nonterminal_v13 - v13 = \ (T_Nonterminal_vIn13 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) -> ( let- _prodsX29 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_))- (T_Productions_vOut28 _prodsIadditionalDep _prodsIaroundDep _prodsIcProductions _prodsIcons _prodsIdirectDep _prodsIerrors _prodsIinstDep _prodsImergeDep _prodsInAutoRules _prodsInExplicitRules _prodsIrules _prodsIvcount) = inv_Productions_s29 _prodsX29 (T_Productions_vIn28 _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOinhMap _prodsOmanualAttrDepMap _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_dovisit _prodsOo_newtypes _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_unbox _prodsOo_wantvisit _prodsOprefix _prodsOsyn _prodsOsynMap _prodsOvcount)- _lhsOinhMap' :: Map Identifier Attributes- _lhsOinhMap' = rule108 arg_inh_ arg_nt_- _lhsOsynMap' :: Map Identifier Attributes- _lhsOsynMap' = rule109 arg_nt_ arg_syn_- _prodsOnt = rule110 arg_nt_- _prodsOinh = rule111 arg_inh_- _prodsOsyn = rule112 arg_syn_- _mergeMap = rule113 _lhsImergeMap arg_nt_- _aroundMap = rule114 _lhsIaroundMap arg_nt_- _ntattrs = rule115 arg_inh_ arg_nt_ arg_syn_- _lhsOntattrs :: Seq (Vertex,NTAttr)- _lhsOntattrs = rule116 _lhsIacount _ntattrs- _lhsOacount :: Int- _lhsOacount = rule117 _lhsIacount arg_inh_ arg_syn_- _lhsOaranges :: Seq (Int,Int,Int)- _lhsOaranges = rule118 _lhsIacount arg_inh_ arg_syn_- _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]- _lhsOnonts = rule119 _prodsIcons arg_nt_- _cInter = rule120 _lhsIcInterfaceMap _lhsIo_dovisit arg_inh_ arg_nt_ arg_syn_- _lhsOcNonterminal :: CNonterminal- _lhsOcNonterminal = rule121 _cInter _prodsIcProductions arg_inh_ arg_nt_ arg_params_ arg_syn_- _lhsOadditionalDep :: Seq Edge- _lhsOadditionalDep = rule122 _prodsIadditionalDep- _lhsOaroundDep :: Seq Edge- _lhsOaroundDep = rule123 _prodsIaroundDep- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule124 _prodsIdirectDep- _lhsOerrors :: Seq Error- _lhsOerrors = rule125 _prodsIerrors- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule126 _prodsIinstDep- _lhsOmergeDep :: Seq Edge- _lhsOmergeDep = rule127 _prodsImergeDep- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule128 _prodsInAutoRules- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule129 _prodsInExplicitRules- _lhsOrules :: Seq (Vertex,CRule)- _lhsOrules = rule130 _prodsIrules- _lhsOvcount :: Int- _lhsOvcount = rule131 _prodsIvcount- _prodsOallnts = rule132 _lhsIallnts- _prodsOaroundMap = rule133 _aroundMap- _prodsOcVisitsMap = rule134 _lhsIcVisitsMap- _prodsOinhMap = rule135 _lhsIinhMap- _prodsOmanualAttrDepMap = rule136 _lhsImanualAttrDepMap- _prodsOmergeMap = rule137 _mergeMap- _prodsOo_case = rule138 _lhsIo_case- _prodsOo_cata = rule139 _lhsIo_cata- _prodsOo_dovisit = rule140 _lhsIo_dovisit- _prodsOo_newtypes = rule141 _lhsIo_newtypes- _prodsOo_rename = rule142 _lhsIo_rename- _prodsOo_sem = rule143 _lhsIo_sem- _prodsOo_sig = rule144 _lhsIo_sig- _prodsOo_unbox = rule145 _lhsIo_unbox- _prodsOo_wantvisit = rule146 _lhsIo_wantvisit- _prodsOprefix = rule147 _lhsIprefix- _prodsOsynMap = rule148 _lhsIsynMap- _prodsOvcount = rule149 _lhsIvcount- __result_ = T_Nonterminal_vOut13 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount- in __result_ )- in C_Nonterminal_s14 v13- {-# INLINE rule108 #-}- {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}- rule108 = \ inh_ nt_ ->- {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ inh_- {-# LINE 1220 "dist/build/Order.hs"#-}- {-# INLINE rule109 #-}- {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}- rule109 = \ nt_ syn_ ->- {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}- Map.singleton nt_ syn_- {-# LINE 1226 "dist/build/Order.hs"#-}- {-# INLINE rule110 #-}- {-# LINE 98 "./src-ag/Order.ag" #-}- rule110 = \ nt_ ->- {-# LINE 98 "./src-ag/Order.ag" #-}- nt_- {-# LINE 1232 "dist/build/Order.hs"#-}- {-# INLINE rule111 #-}- {-# LINE 101 "./src-ag/Order.ag" #-}- rule111 = \ inh_ ->- {-# LINE 101 "./src-ag/Order.ag" #-}- inh_- {-# LINE 1238 "dist/build/Order.hs"#-}- {-# INLINE rule112 #-}- {-# LINE 102 "./src-ag/Order.ag" #-}- rule112 = \ syn_ ->- {-# LINE 102 "./src-ag/Order.ag" #-}- syn_- {-# LINE 1244 "dist/build/Order.hs"#-}- {-# INLINE rule113 #-}- {-# LINE 358 "./src-ag/Order.ag" #-}- rule113 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) nt_ ->- {-# LINE 358 "./src-ag/Order.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsImergeMap- {-# LINE 1250 "dist/build/Order.hs"#-}- {-# INLINE rule114 #-}- {-# LINE 411 "./src-ag/Order.ag" #-}- rule114 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) nt_ ->- {-# LINE 411 "./src-ag/Order.ag" #-}- Map.findWithDefault Map.empty nt_ _lhsIaroundMap- {-# LINE 1256 "dist/build/Order.hs"#-}- {-# INLINE rule115 #-}- {-# LINE 507 "./src-ag/Order.ag" #-}- rule115 = \ inh_ nt_ syn_ ->- {-# LINE 507 "./src-ag/Order.ag" #-}- [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]- ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]- {-# LINE 1263 "dist/build/Order.hs"#-}- {-# INLINE rule116 #-}- {-# LINE 509 "./src-ag/Order.ag" #-}- rule116 = \ ((_lhsIacount) :: Int) _ntattrs ->- {-# LINE 509 "./src-ag/Order.ag" #-}- Seq.fromList (zip [_lhsIacount ..] _ntattrs)- {-# LINE 1269 "dist/build/Order.hs"#-}- {-# INLINE rule117 #-}- {-# LINE 510 "./src-ag/Order.ag" #-}- rule117 = \ ((_lhsIacount) :: Int) inh_ syn_ ->- {-# LINE 510 "./src-ag/Order.ag" #-}- _lhsIacount + Map.size inh_ + Map.size syn_- {-# LINE 1275 "dist/build/Order.hs"#-}- {-# INLINE rule118 #-}- {-# LINE 511 "./src-ag/Order.ag" #-}- rule118 = \ ((_lhsIacount) :: Int) inh_ syn_ ->- {-# LINE 511 "./src-ag/Order.ag" #-}- Seq.singleton- (_lhsIacount- ,_lhsIacount + Map.size inh_- ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)- {-# LINE 1284 "dist/build/Order.hs"#-}- {-# INLINE rule119 #-}- {-# LINE 520 "./src-ag/Order.ag" #-}- rule119 = \ ((_prodsIcons) :: [ConstructorIdent]) nt_ ->- {-# LINE 520 "./src-ag/Order.ag" #-}- [(nt_,_prodsIcons)]- {-# LINE 1290 "dist/build/Order.hs"#-}- {-# INLINE rule120 #-}- {-# LINE 597 "./src-ag/Order.ag" #-}- rule120 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ((_lhsIo_dovisit) :: Bool) inh_ nt_ syn_ ->- {-# LINE 597 "./src-ag/Order.ag" #-}- if _lhsIo_dovisit- then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap- else CInterface [CSegment inh_ syn_]- {-# LINE 1298 "dist/build/Order.hs"#-}- {-# INLINE rule121 #-}- {-# LINE 625 "./src-ag/Order.ag" #-}- rule121 = \ _cInter ((_prodsIcProductions) :: CProductions) inh_ nt_ params_ syn_ ->- {-# LINE 625 "./src-ag/Order.ag" #-}- CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter- {-# LINE 1304 "dist/build/Order.hs"#-}- {-# INLINE rule122 #-}- rule122 = \ ((_prodsIadditionalDep) :: Seq Edge) ->- _prodsIadditionalDep- {-# INLINE rule123 #-}- rule123 = \ ((_prodsIaroundDep) :: Seq Edge) ->- _prodsIaroundDep- {-# INLINE rule124 #-}- rule124 = \ ((_prodsIdirectDep) :: Seq Edge) ->- _prodsIdirectDep- {-# INLINE rule125 #-}- rule125 = \ ((_prodsIerrors) :: Seq Error) ->- _prodsIerrors- {-# INLINE rule126 #-}- rule126 = \ ((_prodsIinstDep) :: Seq Edge) ->- _prodsIinstDep- {-# INLINE rule127 #-}- rule127 = \ ((_prodsImergeDep) :: Seq Edge) ->- _prodsImergeDep- {-# INLINE rule128 #-}- rule128 = \ ((_prodsInAutoRules) :: Int) ->- _prodsInAutoRules- {-# INLINE rule129 #-}- rule129 = \ ((_prodsInExplicitRules) :: Int) ->- _prodsInExplicitRules- {-# INLINE rule130 #-}- rule130 = \ ((_prodsIrules) :: Seq (Vertex,CRule)) ->- _prodsIrules- {-# INLINE rule131 #-}- rule131 = \ ((_prodsIvcount) :: Int) ->- _prodsIvcount- {-# INLINE rule132 #-}- rule132 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule133 #-}- rule133 = \ _aroundMap ->- _aroundMap- {-# INLINE rule134 #-}- rule134 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->- _lhsIcVisitsMap- {-# INLINE rule135 #-}- rule135 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule136 #-}- rule136 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->- _lhsImanualAttrDepMap- {-# INLINE rule137 #-}- rule137 = \ _mergeMap ->- _mergeMap- {-# INLINE rule138 #-}- rule138 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule139 #-}- rule139 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule140 #-}- rule140 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule141 #-}- rule141 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule142 #-}- rule142 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule143 #-}- rule143 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule144 #-}- rule144 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule145 #-}- rule145 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule146 #-}- rule146 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule147 #-}- rule147 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule148 #-}- rule148 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule149 #-}- rule149 = \ ((_lhsIvcount) :: Int) ->- _lhsIvcount---- Nonterminals --------------------------------------------------- wrapper-data Inh_Nonterminals = Inh_Nonterminals { acount_Inh_Nonterminals :: (Int), allnts_Inh_Nonterminals :: ([Identifier]), aroundMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), cInterfaceMap_Inh_Nonterminals :: (CInterfaceMap), cVisitsMap_Inh_Nonterminals :: (CVisitsMap), inhMap_Inh_Nonterminals :: (Map Identifier Attributes), manualAttrDepMap_Inh_Nonterminals :: (AttrOrderMap), mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), o_case_Inh_Nonterminals :: (Bool), o_cata_Inh_Nonterminals :: (Bool), o_data_Inh_Nonterminals :: (Bool), o_dovisit_Inh_Nonterminals :: (Bool), o_newtypes_Inh_Nonterminals :: (Bool), o_rename_Inh_Nonterminals :: (Bool), o_sem_Inh_Nonterminals :: (Bool), o_sig_Inh_Nonterminals :: (Bool), o_unbox_Inh_Nonterminals :: (Bool), o_wantvisit_Inh_Nonterminals :: (Bool), prefix_Inh_Nonterminals :: (String), synMap_Inh_Nonterminals :: (Map Identifier Attributes), vcount_Inh_Nonterminals :: (Int) }-data Syn_Nonterminals = Syn_Nonterminals { acount_Syn_Nonterminals :: (Int), additionalDep_Syn_Nonterminals :: (Seq Edge), aranges_Syn_Nonterminals :: (Seq (Int,Int,Int)), aroundDep_Syn_Nonterminals :: (Seq Edge), cNonterminals_Syn_Nonterminals :: (CNonterminals), directDep_Syn_Nonterminals :: (Seq Edge), errors_Syn_Nonterminals :: (Seq Error), inhMap'_Syn_Nonterminals :: (Map Identifier Attributes), instDep_Syn_Nonterminals :: (Seq Edge), mergeDep_Syn_Nonterminals :: (Seq Edge), nAutoRules_Syn_Nonterminals :: (Int), nExplicitRules_Syn_Nonterminals :: (Int), nonts_Syn_Nonterminals :: ([(NontermIdent,[ConstructorIdent])]), ntattrs_Syn_Nonterminals :: (Seq (Vertex,NTAttr)), rules_Syn_Nonterminals :: (Seq (Vertex,CRule)), synMap'_Syn_Nonterminals :: (Map Identifier Attributes), vcount_Syn_Nonterminals :: (Int) }-{-# INLINABLE wrap_Nonterminals #-}-wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> (Syn_Nonterminals )-wrap_Nonterminals (T_Nonterminals act) (Inh_Nonterminals _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Nonterminals_vIn16 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount- (T_Nonterminals_vOut16 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount) <- return (inv_Nonterminals_s17 sem arg)- return (Syn_Nonterminals _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount)- )---- cata-{-# NOINLINE sem_Nonterminals #-}-sem_Nonterminals :: Nonterminals -> T_Nonterminals -sem_Nonterminals list = Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list)---- semantic domain-newtype T_Nonterminals = T_Nonterminals {- attach_T_Nonterminals :: Identity (T_Nonterminals_s17 )- }-newtype T_Nonterminals_s17 = C_Nonterminals_s17 {- inv_Nonterminals_s17 :: (T_Nonterminals_v16 )- }-data T_Nonterminals_s18 = C_Nonterminals_s18-type T_Nonterminals_v16 = (T_Nonterminals_vIn16 ) -> (T_Nonterminals_vOut16 )-data T_Nonterminals_vIn16 = T_Nonterminals_vIn16 (Int) ([Identifier]) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (CInterfaceMap) (CVisitsMap) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (String) (Map Identifier Attributes) (Int)-data T_Nonterminals_vOut16 = T_Nonterminals_vOut16 (Int) (Seq Edge) (Seq (Int,Int,Int)) (Seq Edge) (CNonterminals) (Seq Edge) (Seq Error) (Map Identifier Attributes) (Seq Edge) (Seq Edge) (Int) (Int) ([(NontermIdent,[ConstructorIdent])]) (Seq (Vertex,NTAttr)) (Seq (Vertex,CRule)) (Map Identifier Attributes) (Int)-{-# NOINLINE sem_Nonterminals_Cons #-}-sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals -sem_Nonterminals_Cons arg_hd_ arg_tl_ = T_Nonterminals (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Nonterminals_v16 - v16 = \ (T_Nonterminals_vIn16 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) -> ( let- _hdX14 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_))- _tlX17 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_))- (T_Nonterminal_vOut13 _hdIacount _hdIadditionalDep _hdIaranges _hdIaroundDep _hdIcNonterminal _hdIdirectDep _hdIerrors _hdIinhMap' _hdIinstDep _hdImergeDep _hdInAutoRules _hdInExplicitRules _hdInonts _hdIntattrs _hdIrules _hdIsynMap' _hdIvcount) = inv_Nonterminal_s14 _hdX14 (T_Nonterminal_vIn13 _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_data _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsynMap _hdOvcount)- (T_Nonterminals_vOut16 _tlIacount _tlIadditionalDep _tlIaranges _tlIaroundDep _tlIcNonterminals _tlIdirectDep _tlIerrors _tlIinhMap' _tlIinstDep _tlImergeDep _tlInAutoRules _tlInExplicitRules _tlInonts _tlIntattrs _tlIrules _tlIsynMap' _tlIvcount) = inv_Nonterminals_s17 _tlX17 (T_Nonterminals_vIn16 _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_data _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsynMap _tlOvcount)- _lhsOcNonterminals :: CNonterminals- _lhsOcNonterminals = rule150 _hdIcNonterminal _tlIcNonterminals- _lhsOadditionalDep :: Seq Edge- _lhsOadditionalDep = rule151 _hdIadditionalDep _tlIadditionalDep- _lhsOaranges :: Seq (Int,Int,Int)- _lhsOaranges = rule152 _hdIaranges _tlIaranges- _lhsOaroundDep :: Seq Edge- _lhsOaroundDep = rule153 _hdIaroundDep _tlIaroundDep- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule154 _hdIdirectDep _tlIdirectDep- _lhsOerrors :: Seq Error- _lhsOerrors = rule155 _hdIerrors _tlIerrors- _lhsOinhMap' :: Map Identifier Attributes- _lhsOinhMap' = rule156 _hdIinhMap' _tlIinhMap'- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule157 _hdIinstDep _tlIinstDep- _lhsOmergeDep :: Seq Edge- _lhsOmergeDep = rule158 _hdImergeDep _tlImergeDep- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule159 _hdInAutoRules _tlInAutoRules- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule160 _hdInExplicitRules _tlInExplicitRules- _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]- _lhsOnonts = rule161 _hdInonts _tlInonts- _lhsOntattrs :: Seq (Vertex,NTAttr)- _lhsOntattrs = rule162 _hdIntattrs _tlIntattrs- _lhsOrules :: Seq (Vertex,CRule)- _lhsOrules = rule163 _hdIrules _tlIrules- _lhsOsynMap' :: Map Identifier Attributes- _lhsOsynMap' = rule164 _hdIsynMap' _tlIsynMap'- _lhsOacount :: Int- _lhsOacount = rule165 _tlIacount- _lhsOvcount :: Int- _lhsOvcount = rule166 _tlIvcount- _hdOacount = rule167 _lhsIacount- _hdOallnts = rule168 _lhsIallnts- _hdOaroundMap = rule169 _lhsIaroundMap- _hdOcInterfaceMap = rule170 _lhsIcInterfaceMap- _hdOcVisitsMap = rule171 _lhsIcVisitsMap- _hdOinhMap = rule172 _lhsIinhMap- _hdOmanualAttrDepMap = rule173 _lhsImanualAttrDepMap- _hdOmergeMap = rule174 _lhsImergeMap- _hdOo_case = rule175 _lhsIo_case- _hdOo_cata = rule176 _lhsIo_cata- _hdOo_data = rule177 _lhsIo_data- _hdOo_dovisit = rule178 _lhsIo_dovisit- _hdOo_newtypes = rule179 _lhsIo_newtypes- _hdOo_rename = rule180 _lhsIo_rename- _hdOo_sem = rule181 _lhsIo_sem- _hdOo_sig = rule182 _lhsIo_sig- _hdOo_unbox = rule183 _lhsIo_unbox- _hdOo_wantvisit = rule184 _lhsIo_wantvisit- _hdOprefix = rule185 _lhsIprefix- _hdOsynMap = rule186 _lhsIsynMap- _hdOvcount = rule187 _lhsIvcount- _tlOacount = rule188 _hdIacount- _tlOallnts = rule189 _lhsIallnts- _tlOaroundMap = rule190 _lhsIaroundMap- _tlOcInterfaceMap = rule191 _lhsIcInterfaceMap- _tlOcVisitsMap = rule192 _lhsIcVisitsMap- _tlOinhMap = rule193 _lhsIinhMap- _tlOmanualAttrDepMap = rule194 _lhsImanualAttrDepMap- _tlOmergeMap = rule195 _lhsImergeMap- _tlOo_case = rule196 _lhsIo_case- _tlOo_cata = rule197 _lhsIo_cata- _tlOo_data = rule198 _lhsIo_data- _tlOo_dovisit = rule199 _lhsIo_dovisit- _tlOo_newtypes = rule200 _lhsIo_newtypes- _tlOo_rename = rule201 _lhsIo_rename- _tlOo_sem = rule202 _lhsIo_sem- _tlOo_sig = rule203 _lhsIo_sig- _tlOo_unbox = rule204 _lhsIo_unbox- _tlOo_wantvisit = rule205 _lhsIo_wantvisit- _tlOprefix = rule206 _lhsIprefix- _tlOsynMap = rule207 _lhsIsynMap- _tlOvcount = rule208 _hdIvcount- __result_ = T_Nonterminals_vOut16 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount- in __result_ )- in C_Nonterminals_s17 v16- {-# INLINE rule150 #-}- {-# LINE 622 "./src-ag/Order.ag" #-}- rule150 = \ ((_hdIcNonterminal) :: CNonterminal) ((_tlIcNonterminals) :: CNonterminals) ->- {-# LINE 622 "./src-ag/Order.ag" #-}- _hdIcNonterminal : _tlIcNonterminals- {-# LINE 1515 "dist/build/Order.hs"#-}- {-# INLINE rule151 #-}- rule151 = \ ((_hdIadditionalDep) :: Seq Edge) ((_tlIadditionalDep) :: Seq Edge) ->- _hdIadditionalDep Seq.>< _tlIadditionalDep- {-# INLINE rule152 #-}- rule152 = \ ((_hdIaranges) :: Seq (Int,Int,Int)) ((_tlIaranges) :: Seq (Int,Int,Int)) ->- _hdIaranges Seq.>< _tlIaranges- {-# INLINE rule153 #-}- rule153 = \ ((_hdIaroundDep) :: Seq Edge) ((_tlIaroundDep) :: Seq Edge) ->- _hdIaroundDep Seq.>< _tlIaroundDep- {-# INLINE rule154 #-}- rule154 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->- _hdIdirectDep Seq.>< _tlIdirectDep- {-# INLINE rule155 #-}- rule155 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule156 #-}- rule156 = \ ((_hdIinhMap') :: Map Identifier Attributes) ((_tlIinhMap') :: Map Identifier Attributes) ->- _hdIinhMap' `Map.union` _tlIinhMap'- {-# INLINE rule157 #-}- rule157 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->- _hdIinstDep Seq.>< _tlIinstDep- {-# INLINE rule158 #-}- rule158 = \ ((_hdImergeDep) :: Seq Edge) ((_tlImergeDep) :: Seq Edge) ->- _hdImergeDep Seq.>< _tlImergeDep- {-# INLINE rule159 #-}- rule159 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->- _hdInAutoRules + _tlInAutoRules- {-# INLINE rule160 #-}- rule160 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->- _hdInExplicitRules + _tlInExplicitRules- {-# INLINE rule161 #-}- rule161 = \ ((_hdInonts) :: [(NontermIdent,[ConstructorIdent])]) ((_tlInonts) :: [(NontermIdent,[ConstructorIdent])]) ->- _hdInonts ++ _tlInonts- {-# INLINE rule162 #-}- rule162 = \ ((_hdIntattrs) :: Seq (Vertex,NTAttr)) ((_tlIntattrs) :: Seq (Vertex,NTAttr)) ->- _hdIntattrs Seq.>< _tlIntattrs- {-# INLINE rule163 #-}- rule163 = \ ((_hdIrules) :: Seq (Vertex,CRule)) ((_tlIrules) :: Seq (Vertex,CRule)) ->- _hdIrules Seq.>< _tlIrules- {-# INLINE rule164 #-}- rule164 = \ ((_hdIsynMap') :: Map Identifier Attributes) ((_tlIsynMap') :: Map Identifier Attributes) ->- _hdIsynMap' `Map.union` _tlIsynMap'- {-# INLINE rule165 #-}- rule165 = \ ((_tlIacount) :: Int) ->- _tlIacount- {-# INLINE rule166 #-}- rule166 = \ ((_tlIvcount) :: Int) ->- _tlIvcount- {-# INLINE rule167 #-}- rule167 = \ ((_lhsIacount) :: Int) ->- _lhsIacount- {-# INLINE rule168 #-}- rule168 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule169 #-}- rule169 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- _lhsIaroundMap- {-# INLINE rule170 #-}- rule170 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ->- _lhsIcInterfaceMap- {-# INLINE rule171 #-}- rule171 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->- _lhsIcVisitsMap- {-# INLINE rule172 #-}- rule172 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule173 #-}- rule173 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->- _lhsImanualAttrDepMap- {-# INLINE rule174 #-}- rule174 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- _lhsImergeMap- {-# INLINE rule175 #-}- rule175 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule176 #-}- rule176 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule177 #-}- rule177 = \ ((_lhsIo_data) :: Bool) ->- _lhsIo_data- {-# INLINE rule178 #-}- rule178 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule179 #-}- rule179 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule180 #-}- rule180 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule181 #-}- rule181 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule182 #-}- rule182 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule183 #-}- rule183 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule184 #-}- rule184 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule185 #-}- rule185 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule186 #-}- rule186 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule187 #-}- rule187 = \ ((_lhsIvcount) :: Int) ->- _lhsIvcount- {-# INLINE rule188 #-}- rule188 = \ ((_hdIacount) :: Int) ->- _hdIacount- {-# INLINE rule189 #-}- rule189 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule190 #-}- rule190 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->- _lhsIaroundMap- {-# INLINE rule191 #-}- rule191 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ->- _lhsIcInterfaceMap- {-# INLINE rule192 #-}- rule192 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->- _lhsIcVisitsMap- {-# INLINE rule193 #-}- rule193 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule194 #-}- rule194 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->- _lhsImanualAttrDepMap- {-# INLINE rule195 #-}- rule195 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->- _lhsImergeMap- {-# INLINE rule196 #-}- rule196 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule197 #-}- rule197 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule198 #-}- rule198 = \ ((_lhsIo_data) :: Bool) ->- _lhsIo_data- {-# INLINE rule199 #-}- rule199 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule200 #-}- rule200 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule201 #-}- rule201 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule202 #-}- rule202 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule203 #-}- rule203 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule204 #-}- rule204 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule205 #-}- rule205 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule206 #-}- rule206 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule207 #-}- rule207 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule208 #-}- rule208 = \ ((_hdIvcount) :: Int) ->- _hdIvcount-{-# NOINLINE sem_Nonterminals_Nil #-}-sem_Nonterminals_Nil :: T_Nonterminals -sem_Nonterminals_Nil = T_Nonterminals (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Nonterminals_v16 - v16 = \ (T_Nonterminals_vIn16 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsynMap _lhsIvcount) -> ( let- _lhsOcNonterminals :: CNonterminals- _lhsOcNonterminals = rule209 ()- _lhsOadditionalDep :: Seq Edge- _lhsOadditionalDep = rule210 ()- _lhsOaranges :: Seq (Int,Int,Int)- _lhsOaranges = rule211 ()- _lhsOaroundDep :: Seq Edge- _lhsOaroundDep = rule212 ()- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule213 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule214 ()- _lhsOinhMap' :: Map Identifier Attributes- _lhsOinhMap' = rule215 ()- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule216 ()- _lhsOmergeDep :: Seq Edge- _lhsOmergeDep = rule217 ()- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule218 ()- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule219 ()- _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]- _lhsOnonts = rule220 ()- _lhsOntattrs :: Seq (Vertex,NTAttr)- _lhsOntattrs = rule221 ()- _lhsOrules :: Seq (Vertex,CRule)- _lhsOrules = rule222 ()- _lhsOsynMap' :: Map Identifier Attributes- _lhsOsynMap' = rule223 ()- _lhsOacount :: Int- _lhsOacount = rule224 _lhsIacount- _lhsOvcount :: Int- _lhsOvcount = rule225 _lhsIvcount- __result_ = T_Nonterminals_vOut16 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount- in __result_ )- in C_Nonterminals_s17 v16- {-# INLINE rule209 #-}- {-# LINE 623 "./src-ag/Order.ag" #-}- rule209 = \ (_ :: ()) ->- {-# LINE 623 "./src-ag/Order.ag" #-}- []- {-# LINE 1739 "dist/build/Order.hs"#-}- {-# INLINE rule210 #-}- rule210 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule211 #-}- rule211 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule212 #-}- rule212 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule213 #-}- rule213 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule214 #-}- rule214 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule215 #-}- rule215 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule216 #-}- rule216 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule217 #-}- rule217 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule218 #-}- rule218 = \ (_ :: ()) ->- 0- {-# INLINE rule219 #-}- rule219 = \ (_ :: ()) ->- 0- {-# INLINE rule220 #-}- rule220 = \ (_ :: ()) ->- []- {-# INLINE rule221 #-}- rule221 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule222 #-}- rule222 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule223 #-}- rule223 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule224 #-}- rule224 = \ ((_lhsIacount) :: Int) ->- _lhsIacount- {-# INLINE rule225 #-}- rule225 = \ ((_lhsIvcount) :: Int) ->- _lhsIvcount---- Pattern -------------------------------------------------------- wrapper-data Inh_Pattern = Inh_Pattern { allTypeSigs_Inh_Pattern :: (Map Identifier Type), altAttrs_Inh_Pattern :: (Map AltAttr Vertex), con_Inh_Pattern :: (Identifier), inh_Inh_Pattern :: (Attributes), nt_Inh_Pattern :: (Identifier), syn_Inh_Pattern :: (Attributes) }-data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: (Pattern), errors_Syn_Pattern :: (Seq Error), gathAltAttrs_Syn_Pattern :: ([AltAttr]), instVars_Syn_Pattern :: ([Identifier]), locVars_Syn_Pattern :: ([Identifier]), patternAttrs_Syn_Pattern :: ([(Identifier,Identifier,Bool)]) }-{-# INLINABLE wrap_Pattern #-}-wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )-wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn- (T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs) <- return (inv_Pattern_s20 sem arg)- return (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs)- )---- cata-{-# NOINLINE sem_Pattern #-}-sem_Pattern :: Pattern -> T_Pattern -sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )-sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )-sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )-sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )-sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_---- semantic domain-newtype T_Pattern = T_Pattern {- attach_T_Pattern :: Identity (T_Pattern_s20 )- }-newtype T_Pattern_s20 = C_Pattern_s20 {- inv_Pattern_s20 :: (T_Pattern_v19 )- }-data T_Pattern_s21 = C_Pattern_s21-type T_Pattern_v19 = (T_Pattern_vIn19 ) -> (T_Pattern_vOut19 )-data T_Pattern_vIn19 = T_Pattern_vIn19 (Map Identifier Type) (Map AltAttr Vertex) (Identifier) (Attributes) (Identifier) (Attributes)-data T_Pattern_vOut19 = T_Pattern_vOut19 (Pattern) (Seq Error) ([AltAttr]) ([Identifier]) ([Identifier]) ([(Identifier,Identifier,Bool)])-{-# NOINLINE sem_Pattern_Constr #-}-sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern -sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Pattern_v19 - v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _patsX23 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut22 _patsIcopy _patsIerrors _patsIgathAltAttrs _patsIinstVars _patsIlocVars _patsIpatternAttrs) = inv_Patterns_s23 _patsX23 (T_Patterns_vIn22 _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn)- _lhsOerrors :: Seq Error- _lhsOerrors = rule226 _patsIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule227 _patsIgathAltAttrs- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule228 _patsIinstVars- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule229 _patsIlocVars- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule230 _patsIpatternAttrs- _copy = rule231 _patsIcopy arg_name_- _lhsOcopy :: Pattern- _lhsOcopy = rule232 _copy- _patsOallTypeSigs = rule233 _lhsIallTypeSigs- _patsOaltAttrs = rule234 _lhsIaltAttrs- _patsOcon = rule235 _lhsIcon- _patsOinh = rule236 _lhsIinh- _patsOnt = rule237 _lhsInt- _patsOsyn = rule238 _lhsIsyn- __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Pattern_s20 v19- {-# INLINE rule226 #-}- rule226 = \ ((_patsIerrors) :: Seq Error) ->- _patsIerrors- {-# INLINE rule227 #-}- rule227 = \ ((_patsIgathAltAttrs) :: [AltAttr]) ->- _patsIgathAltAttrs- {-# INLINE rule228 #-}- rule228 = \ ((_patsIinstVars) :: [Identifier]) ->- _patsIinstVars- {-# INLINE rule229 #-}- rule229 = \ ((_patsIlocVars) :: [Identifier]) ->- _patsIlocVars- {-# INLINE rule230 #-}- rule230 = \ ((_patsIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->- _patsIpatternAttrs- {-# INLINE rule231 #-}- rule231 = \ ((_patsIcopy) :: Patterns) name_ ->- Constr name_ _patsIcopy- {-# INLINE rule232 #-}- rule232 = \ _copy ->- _copy- {-# INLINE rule233 #-}- rule233 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule234 #-}- rule234 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule235 #-}- rule235 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule236 #-}- rule236 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule237 #-}- rule237 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule238 #-}- rule238 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn-{-# NOINLINE sem_Pattern_Product #-}-sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern -sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Pattern_v19 - v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _patsX23 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut22 _patsIcopy _patsIerrors _patsIgathAltAttrs _patsIinstVars _patsIlocVars _patsIpatternAttrs) = inv_Patterns_s23 _patsX23 (T_Patterns_vIn22 _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn)- _lhsOerrors :: Seq Error- _lhsOerrors = rule239 _patsIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule240 _patsIgathAltAttrs- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule241 _patsIinstVars- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule242 _patsIlocVars- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule243 _patsIpatternAttrs- _copy = rule244 _patsIcopy arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule245 _copy- _patsOallTypeSigs = rule246 _lhsIallTypeSigs- _patsOaltAttrs = rule247 _lhsIaltAttrs- _patsOcon = rule248 _lhsIcon- _patsOinh = rule249 _lhsIinh- _patsOnt = rule250 _lhsInt- _patsOsyn = rule251 _lhsIsyn- __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Pattern_s20 v19- {-# INLINE rule239 #-}- rule239 = \ ((_patsIerrors) :: Seq Error) ->- _patsIerrors- {-# INLINE rule240 #-}- rule240 = \ ((_patsIgathAltAttrs) :: [AltAttr]) ->- _patsIgathAltAttrs- {-# INLINE rule241 #-}- rule241 = \ ((_patsIinstVars) :: [Identifier]) ->- _patsIinstVars- {-# INLINE rule242 #-}- rule242 = \ ((_patsIlocVars) :: [Identifier]) ->- _patsIlocVars- {-# INLINE rule243 #-}- rule243 = \ ((_patsIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->- _patsIpatternAttrs- {-# INLINE rule244 #-}- rule244 = \ ((_patsIcopy) :: Patterns) pos_ ->- Product pos_ _patsIcopy- {-# INLINE rule245 #-}- rule245 = \ _copy ->- _copy- {-# INLINE rule246 #-}- rule246 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule247 #-}- rule247 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule248 #-}- rule248 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule249 #-}- rule249 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule250 #-}- rule250 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule251 #-}- rule251 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn-{-# NOINLINE sem_Pattern_Alias #-}-sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern -sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Pattern_v19 - v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _patX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut19 _patIcopy _patIerrors _patIgathAltAttrs _patIinstVars _patIlocVars _patIpatternAttrs) = inv_Pattern_s20 _patX20 (T_Pattern_vIn19 _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn)- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule252 arg_attr_ arg_field_- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule253 arg_attr_ arg_field_- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule254 arg_attr_ arg_field_- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule255 arg_attr_ arg_field_- _lhsOerrors :: Seq Error- _lhsOerrors = rule256 _patIerrors- _copy = rule257 _patIcopy arg_attr_ arg_field_- _lhsOcopy :: Pattern- _lhsOcopy = rule258 _copy- _patOallTypeSigs = rule259 _lhsIallTypeSigs- _patOaltAttrs = rule260 _lhsIaltAttrs- _patOcon = rule261 _lhsIcon- _patOinh = rule262 _lhsIinh- _patOnt = rule263 _lhsInt- _patOsyn = rule264 _lhsIsyn- __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Pattern_s20 v19- {-# INLINE rule252 #-}- {-# LINE 185 "./src-ag/Order.ag" #-}- rule252 = \ attr_ field_ ->- {-# LINE 185 "./src-ag/Order.ag" #-}- [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]- {-# LINE 1999 "dist/build/Order.hs"#-}- {-# INLINE rule253 #-}- {-# LINE 251 "./src-ag/Order.ag" #-}- rule253 = \ attr_ field_ ->- {-# LINE 251 "./src-ag/Order.ag" #-}- [(field_,attr_,(field_ == _LOC || field_ == _INST))]- {-# LINE 2005 "dist/build/Order.hs"#-}- {-# INLINE rule254 #-}- {-# LINE 681 "./src-ag/Order.ag" #-}- rule254 = \ attr_ field_ ->- {-# LINE 681 "./src-ag/Order.ag" #-}- if field_ == _LOC- then [attr_]- else []- {-# LINE 2013 "dist/build/Order.hs"#-}- {-# INLINE rule255 #-}- {-# LINE 684 "./src-ag/Order.ag" #-}- rule255 = \ attr_ field_ ->- {-# LINE 684 "./src-ag/Order.ag" #-}- if field_ == _INST- then [attr_]- else []- {-# LINE 2021 "dist/build/Order.hs"#-}- {-# INLINE rule256 #-}- rule256 = \ ((_patIerrors) :: Seq Error) ->- _patIerrors- {-# INLINE rule257 #-}- rule257 = \ ((_patIcopy) :: Pattern) attr_ field_ ->- Alias field_ attr_ _patIcopy- {-# INLINE rule258 #-}- rule258 = \ _copy ->- _copy- {-# INLINE rule259 #-}- rule259 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule260 #-}- rule260 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule261 #-}- rule261 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule262 #-}- rule262 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule263 #-}- rule263 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule264 #-}- rule264 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn-{-# NOINLINE sem_Pattern_Irrefutable #-}-sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern -sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Pattern_v19 - v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _patX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut19 _patIcopy _patIerrors _patIgathAltAttrs _patIinstVars _patIlocVars _patIpatternAttrs) = inv_Pattern_s20 _patX20 (T_Pattern_vIn19 _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn)- _lhsOerrors :: Seq Error- _lhsOerrors = rule265 _patIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule266 _patIgathAltAttrs- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule267 _patIinstVars- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule268 _patIlocVars- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule269 _patIpatternAttrs- _copy = rule270 _patIcopy- _lhsOcopy :: Pattern- _lhsOcopy = rule271 _copy- _patOallTypeSigs = rule272 _lhsIallTypeSigs- _patOaltAttrs = rule273 _lhsIaltAttrs- _patOcon = rule274 _lhsIcon- _patOinh = rule275 _lhsIinh- _patOnt = rule276 _lhsInt- _patOsyn = rule277 _lhsIsyn- __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Pattern_s20 v19- {-# INLINE rule265 #-}- rule265 = \ ((_patIerrors) :: Seq Error) ->- _patIerrors- {-# INLINE rule266 #-}- rule266 = \ ((_patIgathAltAttrs) :: [AltAttr]) ->- _patIgathAltAttrs- {-# INLINE rule267 #-}- rule267 = \ ((_patIinstVars) :: [Identifier]) ->- _patIinstVars- {-# INLINE rule268 #-}- rule268 = \ ((_patIlocVars) :: [Identifier]) ->- _patIlocVars- {-# INLINE rule269 #-}- rule269 = \ ((_patIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->- _patIpatternAttrs- {-# INLINE rule270 #-}- rule270 = \ ((_patIcopy) :: Pattern) ->- Irrefutable _patIcopy- {-# INLINE rule271 #-}- rule271 = \ _copy ->- _copy- {-# INLINE rule272 #-}- rule272 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule273 #-}- rule273 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule274 #-}- rule274 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule275 #-}- rule275 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule276 #-}- rule276 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule277 #-}- rule277 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn-{-# NOINLINE sem_Pattern_Underscore #-}-sem_Pattern_Underscore :: (Pos) -> T_Pattern -sem_Pattern_Underscore arg_pos_ = T_Pattern (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Pattern_v19 - v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _lhsOerrors :: Seq Error- _lhsOerrors = rule278 ()- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule279 ()- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule280 ()- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule281 ()- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule282 ()- _copy = rule283 arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule284 _copy- __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Pattern_s20 v19- {-# INLINE rule278 #-}- rule278 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule279 #-}- rule279 = \ (_ :: ()) ->- []- {-# INLINE rule280 #-}- rule280 = \ (_ :: ()) ->- []- {-# INLINE rule281 #-}- rule281 = \ (_ :: ()) ->- []- {-# INLINE rule282 #-}- rule282 = \ (_ :: ()) ->- []- {-# INLINE rule283 #-}- rule283 = \ pos_ ->- Underscore pos_- {-# INLINE rule284 #-}- rule284 = \ _copy ->- _copy---- Patterns ------------------------------------------------------- wrapper-data Inh_Patterns = Inh_Patterns { allTypeSigs_Inh_Patterns :: (Map Identifier Type), altAttrs_Inh_Patterns :: (Map AltAttr Vertex), con_Inh_Patterns :: (Identifier), inh_Inh_Patterns :: (Attributes), nt_Inh_Patterns :: (Identifier), syn_Inh_Patterns :: (Attributes) }-data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: (Patterns), errors_Syn_Patterns :: (Seq Error), gathAltAttrs_Syn_Patterns :: ([AltAttr]), instVars_Syn_Patterns :: ([Identifier]), locVars_Syn_Patterns :: ([Identifier]), patternAttrs_Syn_Patterns :: ([(Identifier,Identifier,Bool)]) }-{-# INLINABLE wrap_Patterns #-}-wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )-wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Patterns_vIn22 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn- (T_Patterns_vOut22 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs) <- return (inv_Patterns_s23 sem arg)- return (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs)- )---- cata-{-# NOINLINE sem_Patterns #-}-sem_Patterns :: Patterns -> T_Patterns -sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)---- semantic domain-newtype T_Patterns = T_Patterns {- attach_T_Patterns :: Identity (T_Patterns_s23 )- }-newtype T_Patterns_s23 = C_Patterns_s23 {- inv_Patterns_s23 :: (T_Patterns_v22 )- }-data T_Patterns_s24 = C_Patterns_s24-type T_Patterns_v22 = (T_Patterns_vIn22 ) -> (T_Patterns_vOut22 )-data T_Patterns_vIn22 = T_Patterns_vIn22 (Map Identifier Type) (Map AltAttr Vertex) (Identifier) (Attributes) (Identifier) (Attributes)-data T_Patterns_vOut22 = T_Patterns_vOut22 (Patterns) (Seq Error) ([AltAttr]) ([Identifier]) ([Identifier]) ([(Identifier,Identifier,Bool)])-{-# NOINLINE sem_Patterns_Cons #-}-sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns -sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_Patterns_v22 - v22 = \ (T_Patterns_vIn22 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _hdX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))- _tlX23 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))- (T_Pattern_vOut19 _hdIcopy _hdIerrors _hdIgathAltAttrs _hdIinstVars _hdIlocVars _hdIpatternAttrs) = inv_Pattern_s20 _hdX20 (T_Pattern_vIn19 _hdOallTypeSigs _hdOaltAttrs _hdOcon _hdOinh _hdOnt _hdOsyn)- (T_Patterns_vOut22 _tlIcopy _tlIerrors _tlIgathAltAttrs _tlIinstVars _tlIlocVars _tlIpatternAttrs) = inv_Patterns_s23 _tlX23 (T_Patterns_vIn22 _tlOallTypeSigs _tlOaltAttrs _tlOcon _tlOinh _tlOnt _tlOsyn)- _lhsOerrors :: Seq Error- _lhsOerrors = rule285 _hdIerrors _tlIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule286 _hdIgathAltAttrs _tlIgathAltAttrs- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule287 _hdIinstVars _tlIinstVars- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule288 _hdIlocVars _tlIlocVars- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule289 _hdIpatternAttrs _tlIpatternAttrs- _copy = rule290 _hdIcopy _tlIcopy- _lhsOcopy :: Patterns- _lhsOcopy = rule291 _copy- _hdOallTypeSigs = rule292 _lhsIallTypeSigs- _hdOaltAttrs = rule293 _lhsIaltAttrs- _hdOcon = rule294 _lhsIcon- _hdOinh = rule295 _lhsIinh- _hdOnt = rule296 _lhsInt- _hdOsyn = rule297 _lhsIsyn- _tlOallTypeSigs = rule298 _lhsIallTypeSigs- _tlOaltAttrs = rule299 _lhsIaltAttrs- _tlOcon = rule300 _lhsIcon- _tlOinh = rule301 _lhsIinh- _tlOnt = rule302 _lhsInt- _tlOsyn = rule303 _lhsIsyn- __result_ = T_Patterns_vOut22 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Patterns_s23 v22- {-# INLINE rule285 #-}- rule285 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule286 #-}- rule286 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# INLINE rule287 #-}- rule287 = \ ((_hdIinstVars) :: [Identifier]) ((_tlIinstVars) :: [Identifier]) ->- _hdIinstVars ++ _tlIinstVars- {-# INLINE rule288 #-}- rule288 = \ ((_hdIlocVars) :: [Identifier]) ((_tlIlocVars) :: [Identifier]) ->- _hdIlocVars ++ _tlIlocVars- {-# INLINE rule289 #-}- rule289 = \ ((_hdIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ((_tlIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->- _hdIpatternAttrs ++ _tlIpatternAttrs- {-# INLINE rule290 #-}- rule290 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->- (:) _hdIcopy _tlIcopy- {-# INLINE rule291 #-}- rule291 = \ _copy ->- _copy- {-# INLINE rule292 #-}- rule292 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule293 #-}- rule293 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule294 #-}- rule294 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule295 #-}- rule295 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule296 #-}- rule296 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule297 #-}- rule297 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule298 #-}- rule298 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule299 #-}- rule299 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule300 #-}- rule300 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule301 #-}- rule301 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule302 #-}- rule302 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule303 #-}- rule303 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn-{-# NOINLINE sem_Patterns_Nil #-}-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil = T_Patterns (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_Patterns_v22 - v22 = \ (T_Patterns_vIn22 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let- _lhsOerrors :: Seq Error- _lhsOerrors = rule304 ()- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule305 ()- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule306 ()- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule307 ()- _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]- _lhsOpatternAttrs = rule308 ()- _copy = rule309 ()- _lhsOcopy :: Patterns- _lhsOcopy = rule310 _copy- __result_ = T_Patterns_vOut22 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs- in __result_ )- in C_Patterns_s23 v22- {-# INLINE rule304 #-}- rule304 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule305 #-}- rule305 = \ (_ :: ()) ->- []- {-# INLINE rule306 #-}- rule306 = \ (_ :: ()) ->- []- {-# INLINE rule307 #-}- rule307 = \ (_ :: ()) ->- []- {-# INLINE rule308 #-}- rule308 = \ (_ :: ()) ->- []- {-# INLINE rule309 #-}- rule309 = \ (_ :: ()) ->- []- {-# INLINE rule310 #-}- rule310 = \ _copy ->- _copy---- Production ----------------------------------------------------- wrapper-data Inh_Production = Inh_Production { allnts_Inh_Production :: ([Identifier]), aroundMap_Inh_Production :: (Map ConstructorIdent (Map Identifier [Expression])), cVisitsMap_Inh_Production :: (CVisitsMap), inh_Inh_Production :: (Attributes), inhMap_Inh_Production :: (Map Identifier Attributes), manualAttrDepMap_Inh_Production :: (AttrOrderMap), mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), nt_Inh_Production :: (Identifier), o_case_Inh_Production :: (Bool), o_cata_Inh_Production :: (Bool), o_dovisit_Inh_Production :: (Bool), o_newtypes_Inh_Production :: (Bool), o_rename_Inh_Production :: (Bool), o_sem_Inh_Production :: (Bool), o_sig_Inh_Production :: (Bool), o_unbox_Inh_Production :: (Bool), o_wantvisit_Inh_Production :: (Bool), prefix_Inh_Production :: (String), syn_Inh_Production :: (Attributes), synMap_Inh_Production :: (Map Identifier Attributes), vcount_Inh_Production :: (Int) }-data Syn_Production = Syn_Production { additionalDep_Syn_Production :: (Seq Edge), aroundDep_Syn_Production :: (Seq Edge), cProduction_Syn_Production :: (CProduction), cons_Syn_Production :: ([ConstructorIdent]), directDep_Syn_Production :: (Seq Edge), errors_Syn_Production :: (Seq Error), instDep_Syn_Production :: (Seq Edge), mergeDep_Syn_Production :: (Seq Edge), nAutoRules_Syn_Production :: (Int), nExplicitRules_Syn_Production :: (Int), rules_Syn_Production :: (Seq (Vertex,CRule)), vcount_Syn_Production :: (Int) }-{-# INLINABLE wrap_Production #-}-wrap_Production :: T_Production -> Inh_Production -> (Syn_Production )-wrap_Production (T_Production act) (Inh_Production _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Production_vIn25 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount- (T_Production_vOut25 _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount) <- return (inv_Production_s26 sem arg)- return (Syn_Production _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount)- )---- cata-{-# INLINE sem_Production #-}-sem_Production :: Production -> T_Production -sem_Production ( Production con_ params_ constraints_ children_ rules_ typeSigs_ macro_ ) = sem_Production_Production con_ params_ constraints_ ( sem_Children children_ ) ( sem_Rules rules_ ) ( sem_TypeSigs typeSigs_ ) macro_---- semantic domain-newtype T_Production = T_Production {- attach_T_Production :: Identity (T_Production_s26 )- }-newtype T_Production_s26 = C_Production_s26 {- inv_Production_s26 :: (T_Production_v25 )- }-data T_Production_s27 = C_Production_s27-type T_Production_v25 = (T_Production_vIn25 ) -> (T_Production_vOut25 )-data T_Production_vIn25 = T_Production_vIn25 ([Identifier]) (Map ConstructorIdent (Map Identifier [Expression])) (CVisitsMap) (Attributes) (Map Identifier Attributes) (AttrOrderMap) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (String) (Attributes) (Map Identifier Attributes) (Int)-data T_Production_vOut25 = T_Production_vOut25 (Seq Edge) (Seq Edge) (CProduction) ([ConstructorIdent]) (Seq Edge) (Seq Error) (Seq Edge) (Seq Edge) (Int) (Int) (Seq (Vertex,CRule)) (Int)-{-# NOINLINE sem_Production_Production #-}-sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children -> T_Rules -> T_TypeSigs -> (MaybeMacro) -> T_Production -sem_Production_Production arg_con_ _ _ arg_children_ arg_rules_ arg_typeSigs_ _ = T_Production (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_Production_v25 - v25 = \ (T_Production_vIn25 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) -> ( let- _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_))- _rulesX35 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_))- _typeSigsX41 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_))- (T_Children_vOut4 _childrenIattributes _childrenIcollectChildrenInhs _childrenIcollectChildrenSyns _childrenIerrors _childrenIfields _childrenIgathAltAttrs _childrenIgathRules _childrenIinhs _childrenInts _childrenIsinglevisits _childrenIterminals) = inv_Children_s5 _childrenX5 (T_Children_vIn4 _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOinhMap _childrenOmergeMap _childrenOnt _childrenOo_unbox _childrenOsyn _childrenOsynMap)- (T_Rules_vOut34 _rulesIdirectDep _rulesIerrors _rulesIgathAltAttrs _rulesIgathRules _rulesIinstDep _rulesIinstVars _rulesIlocVars _rulesInAutoRules _rulesInExplicitRules) = inv_Rules_s35 _rulesX35 (T_Rules_vIn34 _rulesOallTypeSigs _rulesOallfields _rulesOallnts _rulesOaltAttrs _rulesOattrs _rulesOchildInhs _rulesOchildNts _rulesOcon _rulesOinh _rulesOinhsOfChildren _rulesOmergeMap _rulesOnt _rulesOo_case _rulesOo_cata _rulesOo_dovisit _rulesOo_newtypes _rulesOo_rename _rulesOo_sem _rulesOo_sig _rulesOo_wantvisit _rulesOprefix _rulesOsyn _rulesOsynsOfChildren)- (T_TypeSigs_vOut40 _typeSigsItypeSigs) = inv_TypeSigs_s41 _typeSigsX41 (T_TypeSigs_vIn40 _typeSigsOtypeSigs)- _childrenOcon = rule311 arg_con_- _rulesOcon = rule312 arg_con_- _gathAltAttrs = rule313 _childrenIgathAltAttrs _lhsIinh _rulesIgathAltAttrs- _altAttrs = rule314 _gathAltAttrs _lhsIvcount- _rulesOchildNts = rule315 _childrenInts- _rulesOchildInhs = rule316 _childrenIinhs- _inhRules = rule317 _lhsIinh _lhsInt arg_con_- _gathRules = rule318 _childrenIgathRules _inhRules _rulesIgathRules- _lhsOrules :: Seq (Vertex,CRule)- _lhsOrules = rule319 _gathRules _lhsIvcount- _lhsOvcount :: Int- _lhsOvcount = rule320 _gathRules _lhsIvcount- _manualDeps = rule321 _lhsImanualAttrDepMap _lhsInt arg_con_- _lhsOadditionalDep :: Seq Edge- _lhsOadditionalDep = rule322 _altAttrs _manualDeps- _rulesOsynsOfChildren = rule323 _childrenIcollectChildrenSyns- _rulesOinhsOfChildren = rule324 _childrenIcollectChildrenInhs- _mergeMap = rule325 _lhsImergeMap arg_con_- _lhsOmergeDep :: Seq Edge- _lhsOmergeDep = rule326 _mergeDep1 _mergeDep2- _mergeDep1 = rule327 _altAttrs _childrenIcollectChildrenSyns _mergeMap- _mergeDep2 = rule328 _altAttrs _childrenIcollectChildrenSyns _mergeMap- _aroundMap = rule329 _lhsIaroundMap arg_con_- _aroundDep1 = rule330 _altAttrs _aroundMap _childrenIcollectChildrenSyns- _aroundDep2 = rule331 _altAttrs _aroundMap _childrenIcollectChildrenInhs- _lhsOaroundDep :: Seq Edge- _lhsOaroundDep = rule332 _aroundDep1 _aroundDep2- _lhsOcons :: [ConstructorIdent]- _lhsOcons = rule333 arg_con_- _typeSigsOtypeSigs = rule334 ()- _rulesOallTypeSigs = rule335 _typeSigsItypeSigs- _cVisits = rule336 _childrenIsinglevisits _gathRules _lhsIcVisitsMap _lhsIinh _lhsInt _lhsIo_dovisit _lhsIsyn arg_con_- _lhsOcProduction :: CProduction- _lhsOcProduction = rule337 _cVisits _childrenIfields _childrenIterminals arg_con_- _allfields = rule338 _childrenIfields- _attrs = rule339 _childrenIattributes _inhnames _rulesIinstVars _rulesIlocVars- _inhnames = rule340 _lhsIinh- _synnames = rule341 _lhsIsyn- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule342 _rulesIdirectDep- _lhsOerrors :: Seq Error- _lhsOerrors = rule343 _childrenIerrors _rulesIerrors- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule344 _rulesIinstDep- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule345 _rulesInAutoRules- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule346 _rulesInExplicitRules- _childrenOallfields = rule347 _allfields- _childrenOallnts = rule348 _lhsIallnts- _childrenOattrs = rule349 _attrs- _childrenOinh = rule350 _lhsIinh- _childrenOinhMap = rule351 _lhsIinhMap- _childrenOmergeMap = rule352 _mergeMap- _childrenOnt = rule353 _lhsInt- _childrenOo_unbox = rule354 _lhsIo_unbox- _childrenOsyn = rule355 _lhsIsyn- _childrenOsynMap = rule356 _lhsIsynMap- _rulesOallfields = rule357 _allfields- _rulesOallnts = rule358 _lhsIallnts- _rulesOaltAttrs = rule359 _altAttrs- _rulesOattrs = rule360 _attrs- _rulesOinh = rule361 _lhsIinh- _rulesOmergeMap = rule362 _mergeMap- _rulesOnt = rule363 _lhsInt- _rulesOo_case = rule364 _lhsIo_case- _rulesOo_cata = rule365 _lhsIo_cata- _rulesOo_dovisit = rule366 _lhsIo_dovisit- _rulesOo_newtypes = rule367 _lhsIo_newtypes- _rulesOo_rename = rule368 _lhsIo_rename- _rulesOo_sem = rule369 _lhsIo_sem- _rulesOo_sig = rule370 _lhsIo_sig- _rulesOo_wantvisit = rule371 _lhsIo_wantvisit- _rulesOprefix = rule372 _lhsIprefix- _rulesOsyn = rule373 _lhsIsyn- __result_ = T_Production_vOut25 _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount- in __result_ )- in C_Production_s26 v25- {-# INLINE rule311 #-}- {-# LINE 94 "./src-ag/Order.ag" #-}- rule311 = \ con_ ->- {-# LINE 94 "./src-ag/Order.ag" #-}- con_- {-# LINE 2461 "dist/build/Order.hs"#-}- {-# INLINE rule312 #-}- {-# LINE 96 "./src-ag/Order.ag" #-}- rule312 = \ con_ ->- {-# LINE 96 "./src-ag/Order.ag" #-}- con_- {-# LINE 2467 "dist/build/Order.hs"#-}- {-# INLINE rule313 #-}- {-# LINE 173 "./src-ag/Order.ag" #-}- rule313 = \ ((_childrenIgathAltAttrs) :: [AltAttr]) ((_lhsIinh) :: Attributes) ((_rulesIgathAltAttrs) :: [AltAttr]) ->- {-# LINE 173 "./src-ag/Order.ag" #-}- [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]- ++ _childrenIgathAltAttrs- ++ _rulesIgathAltAttrs- {-# LINE 2475 "dist/build/Order.hs"#-}- {-# INLINE rule314 #-}- {-# LINE 189 "./src-ag/Order.ag" #-}- rule314 = \ _gathAltAttrs ((_lhsIvcount) :: Int) ->- {-# LINE 189 "./src-ag/Order.ag" #-}- Map.fromList (zip _gathAltAttrs [_lhsIvcount..])- {-# LINE 2481 "dist/build/Order.hs"#-}- {-# INLINE rule315 #-}- {-# LINE 202 "./src-ag/Order.ag" #-}- rule315 = \ ((_childrenInts) :: Seq (Identifier,NontermIdent)) ->- {-# LINE 202 "./src-ag/Order.ag" #-}- Map.fromList (toList _childrenInts)- {-# LINE 2487 "dist/build/Order.hs"#-}- {-# INLINE rule316 #-}- {-# LINE 203 "./src-ag/Order.ag" #-}- rule316 = \ ((_childrenIinhs) :: Seq (Identifier,Attributes)) ->- {-# LINE 203 "./src-ag/Order.ag" #-}- Map.fromList (toList _childrenIinhs)- {-# LINE 2493 "dist/build/Order.hs"#-}- {-# INLINE rule317 #-}- {-# LINE 209 "./src-ag/Order.ag" #-}- rule317 = \ ((_lhsIinh) :: Attributes) ((_lhsInt) :: Identifier) con_ ->- {-# LINE 209 "./src-ag/Order.ag" #-}- [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]- {-# LINE 2499 "dist/build/Order.hs"#-}- {-# INLINE rule318 #-}- {-# LINE 210 "./src-ag/Order.ag" #-}- rule318 = \ ((_childrenIgathRules) :: Seq CRule) _inhRules ((_rulesIgathRules) :: Seq CRule) ->- {-# LINE 210 "./src-ag/Order.ag" #-}- _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)- {-# LINE 2505 "dist/build/Order.hs"#-}- {-# INLINE rule319 #-}- {-# LINE 262 "./src-ag/Order.ag" #-}- rule319 = \ _gathRules ((_lhsIvcount) :: Int) ->- {-# LINE 262 "./src-ag/Order.ag" #-}- Seq.fromList (zip [_lhsIvcount..] _gathRules)- {-# LINE 2511 "dist/build/Order.hs"#-}- {-# INLINE rule320 #-}- {-# LINE 263 "./src-ag/Order.ag" #-}- rule320 = \ _gathRules ((_lhsIvcount) :: Int) ->- {-# LINE 263 "./src-ag/Order.ag" #-}- _lhsIvcount + length _gathRules- {-# LINE 2517 "dist/build/Order.hs"#-}- {-# INLINE rule321 #-}- {-# LINE 291 "./src-ag/Order.ag" #-}- rule321 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ((_lhsInt) :: Identifier) con_ ->- {-# LINE 291 "./src-ag/Order.ag" #-}- Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap- {-# LINE 2523 "dist/build/Order.hs"#-}- {-# INLINE rule322 #-}- {-# LINE 294 "./src-ag/Order.ag" #-}- rule322 = \ _altAttrs _manualDeps ->- {-# LINE 294 "./src-ag/Order.ag" #-}- Seq.fromList [ (vertex True occA, vertex False occB)- | Dependency occA occB <- _manualDeps- , let vertex inout (OccAttr child nm)- | child == _LOC = findWithErr2 (AltAttr _LOC nm True) _altAttrs- | otherwise = findWithErr2 (AltAttr child nm inout) _altAttrs- vertex _ (OccRule nm)- = findWithErr2 (AltAttr _LOC (Ident ("_rule_" ++ show nm) (getPos nm)) True) _altAttrs- ]- {-# LINE 2536 "dist/build/Order.hs"#-}- {-# INLINE rule323 #-}- {-# LINE 340 "./src-ag/Order.ag" #-}- rule323 = \ ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) ->- {-# LINE 340 "./src-ag/Order.ag" #-}- _childrenIcollectChildrenSyns- {-# LINE 2542 "dist/build/Order.hs"#-}- {-# INLINE rule324 #-}- {-# LINE 341 "./src-ag/Order.ag" #-}- rule324 = \ ((_childrenIcollectChildrenInhs) :: Map Identifier Attributes ) ->- {-# LINE 341 "./src-ag/Order.ag" #-}- _childrenIcollectChildrenInhs- {-# LINE 2548 "dist/build/Order.hs"#-}- {-# INLINE rule325 #-}- {-# LINE 359 "./src-ag/Order.ag" #-}- rule325 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) con_ ->- {-# LINE 359 "./src-ag/Order.ag" #-}- Map.findWithDefault Map.empty con_ _lhsImergeMap- {-# LINE 2554 "dist/build/Order.hs"#-}- {-# INLINE rule326 #-}- {-# LINE 370 "./src-ag/Order.ag" #-}- rule326 = \ _mergeDep1 _mergeDep2 ->- {-# LINE 370 "./src-ag/Order.ag" #-}- _mergeDep1 Seq.>< _mergeDep2- {-# LINE 2560 "dist/build/Order.hs"#-}- {-# INLINE rule327 #-}- {-# LINE 372 "./src-ag/Order.ag" #-}- rule327 = \ _altAttrs ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) _mergeMap ->- {-# LINE 372 "./src-ag/Order.ag" #-}- Seq.fromList $- [ (childVert, synVert)- | childNm <- Map.keys _mergeMap- , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)- , let childNm' = Ident (show childNm ++ "_merge") (getPos childNm)- childAttr = AltAttr _LOC childNm' True- synAttr = AltAttr childNm synNm True- childVert = findWithErr2 childAttr _altAttrs- synVert = findWithErr2 synAttr _altAttrs- ]- {-# LINE 2575 "dist/build/Order.hs"#-}- {-# INLINE rule328 #-}- {-# LINE 383 "./src-ag/Order.ag" #-}- rule328 = \ _altAttrs ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) _mergeMap ->- {-# LINE 383 "./src-ag/Order.ag" #-}- Seq.fromList $- [ (mergedVert, sourceVert)- | (childNm, (_,cs)) <- Map.assocs _mergeMap- , c <- cs- , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)- , let sourceAttr = AltAttr childNm synNm True- mergedAttr = AltAttr c synNm True- sourceVert = findWithErr2 sourceAttr _altAttrs- mergedVert = findWithErr2 mergedAttr _altAttrs- ]- {-# LINE 2590 "dist/build/Order.hs"#-}- {-# INLINE rule329 #-}- {-# LINE 412 "./src-ag/Order.ag" #-}- rule329 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) con_ ->- {-# LINE 412 "./src-ag/Order.ag" #-}- Map.findWithDefault Map.empty con_ _lhsIaroundMap- {-# LINE 2596 "dist/build/Order.hs"#-}- {-# INLINE rule330 #-}- {-# LINE 420 "./src-ag/Order.ag" #-}- rule330 = \ _altAttrs _aroundMap ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) ->- {-# LINE 420 "./src-ag/Order.ag" #-}- Seq.fromList $- [ (childVert, synVert)- | childNm <- Map.keys _aroundMap- , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)- , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)- childAttr = AltAttr _LOC childNm' True- synAttr = AltAttr childNm synNm True- childVert = findWithErr2 childAttr _altAttrs- synVert = findWithErr2 synAttr _altAttrs- ]- {-# LINE 2611 "dist/build/Order.hs"#-}- {-# INLINE rule331 #-}- {-# LINE 431 "./src-ag/Order.ag" #-}- rule331 = \ _altAttrs _aroundMap ((_childrenIcollectChildrenInhs) :: Map Identifier Attributes ) ->- {-# LINE 431 "./src-ag/Order.ag" #-}- Seq.fromList $- [ (childVert, inhVert)- | childNm <- Map.keys _aroundMap- , inhNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenInhs)- , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)- childAttr = AltAttr _LOC childNm' True- inhAttr = AltAttr childNm inhNm False- childVert = findWithErr2 childAttr _altAttrs- inhVert = findWithErr2 inhAttr _altAttrs- ]- {-# LINE 2626 "dist/build/Order.hs"#-}- {-# INLINE rule332 #-}- {-# LINE 441 "./src-ag/Order.ag" #-}- rule332 = \ _aroundDep1 _aroundDep2 ->- {-# LINE 441 "./src-ag/Order.ag" #-}- _aroundDep1 Seq.>< _aroundDep2- {-# LINE 2632 "dist/build/Order.hs"#-}- {-# INLINE rule333 #-}- {-# LINE 523 "./src-ag/Order.ag" #-}- rule333 = \ con_ ->- {-# LINE 523 "./src-ag/Order.ag" #-}- [con_]- {-# LINE 2638 "dist/build/Order.hs"#-}- {-# INLINE rule334 #-}- {-# LINE 530 "./src-ag/Order.ag" #-}- rule334 = \ (_ :: ()) ->- {-# LINE 530 "./src-ag/Order.ag" #-}- Map.empty- {-# LINE 2644 "dist/build/Order.hs"#-}- {-# INLINE rule335 #-}- {-# LINE 536 "./src-ag/Order.ag" #-}- rule335 = \ ((_typeSigsItypeSigs) :: Map Identifier Type) ->- {-# LINE 536 "./src-ag/Order.ag" #-}- _typeSigsItypeSigs- {-# LINE 2650 "dist/build/Order.hs"#-}- {-# INLINE rule336 #-}- {-# LINE 604 "./src-ag/Order.ag" #-}- rule336 = \ ((_childrenIsinglevisits) :: [CRule]) _gathRules ((_lhsIcVisitsMap) :: CVisitsMap) ((_lhsIinh) :: Attributes) ((_lhsInt) :: Identifier) ((_lhsIo_dovisit) :: Bool) ((_lhsIsyn) :: Attributes) con_ ->- {-# LINE 604 "./src-ag/Order.ag" #-}- if _lhsIo_dovisit- then let prodsVisitsMap = findWithErr1 "Production.cVisits.nt" _lhsInt _lhsIcVisitsMap- visits = findWithErr1 "Production.cVisits.con" con_ prodsVisitsMap- in visits- else let vss = nubBy eqCRuleDefines _gathRules ++ _childrenIsinglevisits- in [CVisit _lhsIinh _lhsIsyn vss [] False]- {-# LINE 2661 "dist/build/Order.hs"#-}- {-# INLINE rule337 #-}- {-# LINE 630 "./src-ag/Order.ag" #-}- rule337 = \ _cVisits ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ((_childrenIterminals) :: [Identifier]) con_ ->- {-# LINE 630 "./src-ag/Order.ag" #-}- CProduction con_ _cVisits _childrenIfields _childrenIterminals- {-# LINE 2667 "dist/build/Order.hs"#-}- {-# INLINE rule338 #-}- {-# LINE 658 "./src-ag/Order.ag" #-}- rule338 = \ ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 658 "./src-ag/Order.ag" #-}- _childrenIfields- {-# LINE 2673 "dist/build/Order.hs"#-}- {-# INLINE rule339 #-}- {-# LINE 659 "./src-ag/Order.ag" #-}- rule339 = \ ((_childrenIattributes) :: [(Identifier,Attributes,Attributes)]) _inhnames ((_rulesIinstVars) :: [Identifier]) ((_rulesIlocVars) :: [Identifier]) ->- {-# LINE 659 "./src-ag/Order.ag" #-}- map ((,) _LOC) _rulesIlocVars ++- map ((,) _INST) _rulesIinstVars ++- map ((,) _LHS) _inhnames ++- concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]- {-# LINE 2682 "dist/build/Order.hs"#-}- {-# INLINE rule340 #-}- {-# LINE 663 "./src-ag/Order.ag" #-}- rule340 = \ ((_lhsIinh) :: Attributes) ->- {-# LINE 663 "./src-ag/Order.ag" #-}- Map.keys _lhsIinh- {-# LINE 2688 "dist/build/Order.hs"#-}- {-# INLINE rule341 #-}- {-# LINE 664 "./src-ag/Order.ag" #-}- rule341 = \ ((_lhsIsyn) :: Attributes) ->- {-# LINE 664 "./src-ag/Order.ag" #-}- Map.keys _lhsIsyn- {-# LINE 2694 "dist/build/Order.hs"#-}- {-# INLINE rule342 #-}- rule342 = \ ((_rulesIdirectDep) :: Seq Edge) ->- _rulesIdirectDep- {-# INLINE rule343 #-}- rule343 = \ ((_childrenIerrors) :: Seq Error) ((_rulesIerrors) :: Seq Error) ->- _childrenIerrors Seq.>< _rulesIerrors- {-# INLINE rule344 #-}- rule344 = \ ((_rulesIinstDep) :: Seq Edge) ->- _rulesIinstDep- {-# INLINE rule345 #-}- rule345 = \ ((_rulesInAutoRules) :: Int) ->- _rulesInAutoRules- {-# INLINE rule346 #-}- rule346 = \ ((_rulesInExplicitRules) :: Int) ->- _rulesInExplicitRules- {-# INLINE rule347 #-}- rule347 = \ _allfields ->- _allfields- {-# INLINE rule348 #-}- rule348 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule349 #-}- rule349 = \ _attrs ->- _attrs- {-# INLINE rule350 #-}- rule350 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule351 #-}- rule351 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule352 #-}- rule352 = \ _mergeMap ->- _mergeMap- {-# INLINE rule353 #-}- rule353 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule354 #-}- rule354 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule355 #-}- rule355 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule356 #-}- rule356 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule357 #-}- rule357 = \ _allfields ->- _allfields- {-# INLINE rule358 #-}- rule358 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule359 #-}- rule359 = \ _altAttrs ->- _altAttrs- {-# INLINE rule360 #-}- rule360 = \ _attrs ->- _attrs- {-# INLINE rule361 #-}- rule361 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule362 #-}- rule362 = \ _mergeMap ->- _mergeMap- {-# INLINE rule363 #-}- rule363 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule364 #-}- rule364 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule365 #-}- rule365 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule366 #-}- rule366 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule367 #-}- rule367 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule368 #-}- rule368 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule369 #-}- rule369 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule370 #-}- rule370 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule371 #-}- rule371 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule372 #-}- rule372 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule373 #-}- rule373 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn---- Productions ---------------------------------------------------- wrapper-data Inh_Productions = Inh_Productions { allnts_Inh_Productions :: ([Identifier]), aroundMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier [Expression])), cVisitsMap_Inh_Productions :: (CVisitsMap), inh_Inh_Productions :: (Attributes), inhMap_Inh_Productions :: (Map Identifier Attributes), manualAttrDepMap_Inh_Productions :: (AttrOrderMap), mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), nt_Inh_Productions :: (Identifier), o_case_Inh_Productions :: (Bool), o_cata_Inh_Productions :: (Bool), o_dovisit_Inh_Productions :: (Bool), o_newtypes_Inh_Productions :: (Bool), o_rename_Inh_Productions :: (Bool), o_sem_Inh_Productions :: (Bool), o_sig_Inh_Productions :: (Bool), o_unbox_Inh_Productions :: (Bool), o_wantvisit_Inh_Productions :: (Bool), prefix_Inh_Productions :: (String), syn_Inh_Productions :: (Attributes), synMap_Inh_Productions :: (Map Identifier Attributes), vcount_Inh_Productions :: (Int) }-data Syn_Productions = Syn_Productions { additionalDep_Syn_Productions :: (Seq Edge), aroundDep_Syn_Productions :: (Seq Edge), cProductions_Syn_Productions :: (CProductions), cons_Syn_Productions :: ([ConstructorIdent]), directDep_Syn_Productions :: (Seq Edge), errors_Syn_Productions :: (Seq Error), instDep_Syn_Productions :: (Seq Edge), mergeDep_Syn_Productions :: (Seq Edge), nAutoRules_Syn_Productions :: (Int), nExplicitRules_Syn_Productions :: (Int), rules_Syn_Productions :: (Seq (Vertex,CRule)), vcount_Syn_Productions :: (Int) }-{-# INLINABLE wrap_Productions #-}-wrap_Productions :: T_Productions -> Inh_Productions -> (Syn_Productions )-wrap_Productions (T_Productions act) (Inh_Productions _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Productions_vIn28 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount- (T_Productions_vOut28 _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount) <- return (inv_Productions_s29 sem arg)- return (Syn_Productions _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount)- )---- cata-{-# NOINLINE sem_Productions #-}-sem_Productions :: Productions -> T_Productions -sem_Productions list = Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list)---- semantic domain-newtype T_Productions = T_Productions {- attach_T_Productions :: Identity (T_Productions_s29 )- }-newtype T_Productions_s29 = C_Productions_s29 {- inv_Productions_s29 :: (T_Productions_v28 )- }-data T_Productions_s30 = C_Productions_s30-type T_Productions_v28 = (T_Productions_vIn28 ) -> (T_Productions_vOut28 )-data T_Productions_vIn28 = T_Productions_vIn28 ([Identifier]) (Map ConstructorIdent (Map Identifier [Expression])) (CVisitsMap) (Attributes) (Map Identifier Attributes) (AttrOrderMap) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (String) (Attributes) (Map Identifier Attributes) (Int)-data T_Productions_vOut28 = T_Productions_vOut28 (Seq Edge) (Seq Edge) (CProductions) ([ConstructorIdent]) (Seq Edge) (Seq Error) (Seq Edge) (Seq Edge) (Int) (Int) (Seq (Vertex,CRule)) (Int)-{-# NOINLINE sem_Productions_Cons #-}-sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions -sem_Productions_Cons arg_hd_ arg_tl_ = T_Productions (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_Productions_v28 - v28 = \ (T_Productions_vIn28 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) -> ( let- _hdX26 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_))- _tlX29 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_))- (T_Production_vOut25 _hdIadditionalDep _hdIaroundDep _hdIcProduction _hdIcons _hdIdirectDep _hdIerrors _hdIinstDep _hdImergeDep _hdInAutoRules _hdInExplicitRules _hdIrules _hdIvcount) = inv_Production_s26 _hdX26 (T_Production_vIn25 _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynMap _hdOvcount)- (T_Productions_vOut28 _tlIadditionalDep _tlIaroundDep _tlIcProductions _tlIcons _tlIdirectDep _tlIerrors _tlIinstDep _tlImergeDep _tlInAutoRules _tlInExplicitRules _tlIrules _tlIvcount) = inv_Productions_s29 _tlX29 (T_Productions_vIn28 _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynMap _tlOvcount)- _lhsOcProductions :: CProductions- _lhsOcProductions = rule374 _hdIcProduction _tlIcProductions- _lhsOadditionalDep :: Seq Edge- _lhsOadditionalDep = rule375 _hdIadditionalDep _tlIadditionalDep- _lhsOaroundDep :: Seq Edge- _lhsOaroundDep = rule376 _hdIaroundDep _tlIaroundDep- _lhsOcons :: [ConstructorIdent]- _lhsOcons = rule377 _hdIcons _tlIcons- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule378 _hdIdirectDep _tlIdirectDep- _lhsOerrors :: Seq Error- _lhsOerrors = rule379 _hdIerrors _tlIerrors- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule380 _hdIinstDep _tlIinstDep- _lhsOmergeDep :: Seq Edge- _lhsOmergeDep = rule381 _hdImergeDep _tlImergeDep- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule382 _hdInAutoRules _tlInAutoRules- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule383 _hdInExplicitRules _tlInExplicitRules- _lhsOrules :: Seq (Vertex,CRule)- _lhsOrules = rule384 _hdIrules _tlIrules- _lhsOvcount :: Int- _lhsOvcount = rule385 _tlIvcount- _hdOallnts = rule386 _lhsIallnts- _hdOaroundMap = rule387 _lhsIaroundMap- _hdOcVisitsMap = rule388 _lhsIcVisitsMap- _hdOinh = rule389 _lhsIinh- _hdOinhMap = rule390 _lhsIinhMap- _hdOmanualAttrDepMap = rule391 _lhsImanualAttrDepMap- _hdOmergeMap = rule392 _lhsImergeMap- _hdOnt = rule393 _lhsInt- _hdOo_case = rule394 _lhsIo_case- _hdOo_cata = rule395 _lhsIo_cata- _hdOo_dovisit = rule396 _lhsIo_dovisit- _hdOo_newtypes = rule397 _lhsIo_newtypes- _hdOo_rename = rule398 _lhsIo_rename- _hdOo_sem = rule399 _lhsIo_sem- _hdOo_sig = rule400 _lhsIo_sig- _hdOo_unbox = rule401 _lhsIo_unbox- _hdOo_wantvisit = rule402 _lhsIo_wantvisit- _hdOprefix = rule403 _lhsIprefix- _hdOsyn = rule404 _lhsIsyn- _hdOsynMap = rule405 _lhsIsynMap- _hdOvcount = rule406 _lhsIvcount- _tlOallnts = rule407 _lhsIallnts- _tlOaroundMap = rule408 _lhsIaroundMap- _tlOcVisitsMap = rule409 _lhsIcVisitsMap- _tlOinh = rule410 _lhsIinh- _tlOinhMap = rule411 _lhsIinhMap- _tlOmanualAttrDepMap = rule412 _lhsImanualAttrDepMap- _tlOmergeMap = rule413 _lhsImergeMap- _tlOnt = rule414 _lhsInt- _tlOo_case = rule415 _lhsIo_case- _tlOo_cata = rule416 _lhsIo_cata- _tlOo_dovisit = rule417 _lhsIo_dovisit- _tlOo_newtypes = rule418 _lhsIo_newtypes- _tlOo_rename = rule419 _lhsIo_rename- _tlOo_sem = rule420 _lhsIo_sem- _tlOo_sig = rule421 _lhsIo_sig- _tlOo_unbox = rule422 _lhsIo_unbox- _tlOo_wantvisit = rule423 _lhsIo_wantvisit- _tlOprefix = rule424 _lhsIprefix- _tlOsyn = rule425 _lhsIsyn- _tlOsynMap = rule426 _lhsIsynMap- _tlOvcount = rule427 _hdIvcount- __result_ = T_Productions_vOut28 _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount- in __result_ )- in C_Productions_s29 v28- {-# INLINE rule374 #-}- {-# LINE 627 "./src-ag/Order.ag" #-}- rule374 = \ ((_hdIcProduction) :: CProduction) ((_tlIcProductions) :: CProductions) ->- {-# LINE 627 "./src-ag/Order.ag" #-}- _hdIcProduction : _tlIcProductions- {-# LINE 2907 "dist/build/Order.hs"#-}- {-# INLINE rule375 #-}- rule375 = \ ((_hdIadditionalDep) :: Seq Edge) ((_tlIadditionalDep) :: Seq Edge) ->- _hdIadditionalDep Seq.>< _tlIadditionalDep- {-# INLINE rule376 #-}- rule376 = \ ((_hdIaroundDep) :: Seq Edge) ((_tlIaroundDep) :: Seq Edge) ->- _hdIaroundDep Seq.>< _tlIaroundDep- {-# INLINE rule377 #-}- rule377 = \ ((_hdIcons) :: [ConstructorIdent]) ((_tlIcons) :: [ConstructorIdent]) ->- _hdIcons ++ _tlIcons- {-# INLINE rule378 #-}- rule378 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->- _hdIdirectDep Seq.>< _tlIdirectDep- {-# INLINE rule379 #-}- rule379 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule380 #-}- rule380 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->- _hdIinstDep Seq.>< _tlIinstDep- {-# INLINE rule381 #-}- rule381 = \ ((_hdImergeDep) :: Seq Edge) ((_tlImergeDep) :: Seq Edge) ->- _hdImergeDep Seq.>< _tlImergeDep- {-# INLINE rule382 #-}- rule382 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->- _hdInAutoRules + _tlInAutoRules- {-# INLINE rule383 #-}- rule383 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->- _hdInExplicitRules + _tlInExplicitRules- {-# INLINE rule384 #-}- rule384 = \ ((_hdIrules) :: Seq (Vertex,CRule)) ((_tlIrules) :: Seq (Vertex,CRule)) ->- _hdIrules Seq.>< _tlIrules- {-# INLINE rule385 #-}- rule385 = \ ((_tlIvcount) :: Int) ->- _tlIvcount- {-# INLINE rule386 #-}- rule386 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule387 #-}- rule387 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->- _lhsIaroundMap- {-# INLINE rule388 #-}- rule388 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->- _lhsIcVisitsMap- {-# INLINE rule389 #-}- rule389 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule390 #-}- rule390 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule391 #-}- rule391 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->- _lhsImanualAttrDepMap- {-# INLINE rule392 #-}- rule392 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- _lhsImergeMap- {-# INLINE rule393 #-}- rule393 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule394 #-}- rule394 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule395 #-}- rule395 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule396 #-}- rule396 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule397 #-}- rule397 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule398 #-}- rule398 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule399 #-}- rule399 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule400 #-}- rule400 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule401 #-}- rule401 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule402 #-}- rule402 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule403 #-}- rule403 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule404 #-}- rule404 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule405 #-}- rule405 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule406 #-}- rule406 = \ ((_lhsIvcount) :: Int) ->- _lhsIvcount- {-# INLINE rule407 #-}- rule407 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule408 #-}- rule408 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->- _lhsIaroundMap- {-# INLINE rule409 #-}- rule409 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->- _lhsIcVisitsMap- {-# INLINE rule410 #-}- rule410 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule411 #-}- rule411 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->- _lhsIinhMap- {-# INLINE rule412 #-}- rule412 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->- _lhsImanualAttrDepMap- {-# INLINE rule413 #-}- rule413 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->- _lhsImergeMap- {-# INLINE rule414 #-}- rule414 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule415 #-}- rule415 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule416 #-}- rule416 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule417 #-}- rule417 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule418 #-}- rule418 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule419 #-}- rule419 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule420 #-}- rule420 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule421 #-}- rule421 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule422 #-}- rule422 = \ ((_lhsIo_unbox) :: Bool) ->- _lhsIo_unbox- {-# INLINE rule423 #-}- rule423 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule424 #-}- rule424 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule425 #-}- rule425 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule426 #-}- rule426 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->- _lhsIsynMap- {-# INLINE rule427 #-}- rule427 = \ ((_hdIvcount) :: Int) ->- _hdIvcount-{-# NOINLINE sem_Productions_Nil #-}-sem_Productions_Nil :: T_Productions -sem_Productions_Nil = T_Productions (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_Productions_v28 - v28 = \ (T_Productions_vIn28 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) -> ( let- _lhsOcProductions :: CProductions- _lhsOcProductions = rule428 ()- _lhsOadditionalDep :: Seq Edge- _lhsOadditionalDep = rule429 ()- _lhsOaroundDep :: Seq Edge- _lhsOaroundDep = rule430 ()- _lhsOcons :: [ConstructorIdent]- _lhsOcons = rule431 ()- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule432 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule433 ()- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule434 ()- _lhsOmergeDep :: Seq Edge- _lhsOmergeDep = rule435 ()- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule436 ()- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule437 ()- _lhsOrules :: Seq (Vertex,CRule)- _lhsOrules = rule438 ()- _lhsOvcount :: Int- _lhsOvcount = rule439 _lhsIvcount- __result_ = T_Productions_vOut28 _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount- in __result_ )- in C_Productions_s29 v28- {-# INLINE rule428 #-}- {-# LINE 628 "./src-ag/Order.ag" #-}- rule428 = \ (_ :: ()) ->- {-# LINE 628 "./src-ag/Order.ag" #-}- []- {-# LINE 3106 "dist/build/Order.hs"#-}- {-# INLINE rule429 #-}- rule429 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule430 #-}- rule430 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule431 #-}- rule431 = \ (_ :: ()) ->- []- {-# INLINE rule432 #-}- rule432 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule433 #-}- rule433 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule434 #-}- rule434 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule435 #-}- rule435 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule436 #-}- rule436 = \ (_ :: ()) ->- 0- {-# INLINE rule437 #-}- rule437 = \ (_ :: ()) ->- 0- {-# INLINE rule438 #-}- rule438 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule439 #-}- rule439 = \ ((_lhsIvcount) :: Int) ->- _lhsIvcount---- Rule ----------------------------------------------------------- wrapper-data Inh_Rule = Inh_Rule { allTypeSigs_Inh_Rule :: (Map Identifier Type), allfields_Inh_Rule :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Rule :: ([Identifier]), altAttrs_Inh_Rule :: (Map AltAttr Vertex), attrs_Inh_Rule :: ([(Identifier,Identifier)]), childInhs_Inh_Rule :: (Map Identifier Attributes), childNts_Inh_Rule :: (Map Identifier NontermIdent), con_Inh_Rule :: (Identifier), inh_Inh_Rule :: (Attributes), inhsOfChildren_Inh_Rule :: (Map Identifier Attributes), mergeMap_Inh_Rule :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Rule :: (Identifier), o_case_Inh_Rule :: (Bool), o_cata_Inh_Rule :: (Bool), o_dovisit_Inh_Rule :: (Bool), o_newtypes_Inh_Rule :: (Bool), o_rename_Inh_Rule :: (Bool), o_sem_Inh_Rule :: (Bool), o_sig_Inh_Rule :: (Bool), o_wantvisit_Inh_Rule :: (Bool), prefix_Inh_Rule :: (String), syn_Inh_Rule :: (Attributes), synsOfChildren_Inh_Rule :: (Map Identifier Attributes) }-data Syn_Rule = Syn_Rule { directDep_Syn_Rule :: (Seq Edge), errors_Syn_Rule :: (Seq Error), gathAltAttrs_Syn_Rule :: ([AltAttr]), gathRules_Syn_Rule :: (Seq CRule), instDep_Syn_Rule :: (Seq Edge), instVars_Syn_Rule :: ([Identifier]), locVars_Syn_Rule :: ([Identifier]), nAutoRules_Syn_Rule :: (Int), nExplicitRules_Syn_Rule :: (Int) }-{-# INLINABLE wrap_Rule #-}-wrap_Rule :: T_Rule -> Inh_Rule -> (Syn_Rule )-wrap_Rule (T_Rule act) (Inh_Rule _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Rule_vIn31 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren- (T_Rule_vOut31 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules) <- return (inv_Rule_s32 sem arg)- return (Syn_Rule _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules)- )---- cata-{-# INLINE sem_Rule #-}-sem_Rule :: Rule -> T_Rule -sem_Rule ( Rule mbName_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ ) = sem_Rule_Rule mbName_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_---- semantic domain-newtype T_Rule = T_Rule {- attach_T_Rule :: Identity (T_Rule_s32 )- }-newtype T_Rule_s32 = C_Rule_s32 {- inv_Rule_s32 :: (T_Rule_v31 )- }-data T_Rule_s33 = C_Rule_s33-type T_Rule_v31 = (T_Rule_vIn31 ) -> (T_Rule_vOut31 )-data T_Rule_vIn31 = T_Rule_vIn31 (Map Identifier Type) ([(Identifier,Type,ChildKind)]) ([Identifier]) (Map AltAttr Vertex) ([(Identifier,Identifier)]) (Map Identifier Attributes) (Map Identifier NontermIdent) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (String) (Attributes) (Map Identifier Attributes)-data T_Rule_vOut31 = T_Rule_vOut31 (Seq Edge) (Seq Error) ([AltAttr]) (Seq CRule) (Seq Edge) ([Identifier]) ([Identifier]) (Int) (Int)-{-# 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 arg_mbName_ arg_pattern_ arg_rhs_ arg_owrt_ arg_origin_ arg_explicit_ _ _ _ _ = T_Rule (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_Rule_v31 - v31 = \ (T_Rule_vIn31 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) -> ( let- _patternX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))- _rhsX8 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))- (T_Pattern_vOut19 _patternIcopy _patternIerrors _patternIgathAltAttrs _patternIinstVars _patternIlocVars _patternIpatternAttrs) = inv_Pattern_s20 _patternX20 (T_Pattern_vIn19 _patternOallTypeSigs _patternOaltAttrs _patternOcon _patternOinh _patternOnt _patternOsyn)- (T_Expression_vOut7 _rhsIallRhsVars _rhsIcopy _rhsIerrors _rhsItextLines _rhsIusedAttrs _rhsIusedFields _rhsIusedLocals) = inv_Expression_s8 _rhsX8 (T_Expression_vIn7 _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt)- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule440 arg_explicit_- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule441 arg_origin_- _defines = rule442 _lhsIallTypeSigs _lhsIaltAttrs _lhsIchildInhs _lhsIsyn _patternIpatternAttrs- _gathRules = rule443 _defines _lhsIchildNts _lhsIcon _lhsInt _patternIcopy _rhsIallRhsVars _rhsItextLines arg_explicit_ arg_mbName_ arg_origin_ arg_owrt_- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule444 _defines _lhsIaltAttrs _rhsIusedAttrs _rhsIusedFields _rhsIusedLocals- _instDep1 = rule445 _defines _lhsIaltAttrs _lhsIsynsOfChildren- _instDep2 = rule446 _defines _lhsIaltAttrs _lhsIinhsOfChildren- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule447 _instDep1 _instDep2- _lhsOerrors :: Seq Error- _lhsOerrors = rule448 _patternIerrors _rhsIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule449 _patternIgathAltAttrs- _lhsOgathRules :: Seq CRule- _lhsOgathRules = rule450 _gathRules- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule451 _patternIinstVars- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule452 _patternIlocVars- _patternOallTypeSigs = rule453 _lhsIallTypeSigs- _patternOaltAttrs = rule454 _lhsIaltAttrs- _patternOcon = rule455 _lhsIcon- _patternOinh = rule456 _lhsIinh- _patternOnt = rule457 _lhsInt- _patternOsyn = rule458 _lhsIsyn- _rhsOallfields = rule459 _lhsIallfields- _rhsOallnts = rule460 _lhsIallnts- _rhsOattrs = rule461 _lhsIattrs- _rhsOcon = rule462 _lhsIcon- _rhsOmergeMap = rule463 _lhsImergeMap- _rhsOnt = rule464 _lhsInt- __result_ = T_Rule_vOut31 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules- in __result_ )- in C_Rule_s32 v31- {-# INLINE rule440 #-}- {-# LINE 65 "./src-ag/Order.ag" #-}- rule440 = \ explicit_ ->- {-# LINE 65 "./src-ag/Order.ag" #-}- if explicit_- then 1- else 0- {-# LINE 3226 "dist/build/Order.hs"#-}- {-# INLINE rule441 #-}- {-# LINE 68 "./src-ag/Order.ag" #-}- rule441 = \ origin_ ->- {-# LINE 68 "./src-ag/Order.ag" #-}- if startsWith "use rule" origin_ || startsWith "copy rule" origin_- then 1- else 0- {-# LINE 3234 "dist/build/Order.hs"#-}- {-# INLINE rule442 #-}- {-# LINE 218 "./src-ag/Order.ag" #-}- rule442 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIchildInhs) :: Map Identifier Attributes) ((_lhsIsyn) :: Attributes) ((_patternIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->- {-# LINE 218 "./src-ag/Order.ag" #-}- let tp field attr | field == _LOC || field == _INST- = Map.lookup attr _lhsIallTypeSigs- | field == _LHS = Map.lookup attr _lhsIsyn- | otherwise = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)- typ :: Pattern -> Maybe Type- typ (Alias field attr _) = tp field attr- typ (Underscore _) = Nothing- typ _ = Nothing- in Map.fromList [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr)))- | (field,attr,isLocalOrInst) <- _patternIpatternAttrs- , let aa = AltAttr field attr isLocalOrInst- ]- {-# LINE 3251 "dist/build/Order.hs"#-}- {-# INLINE rule443 #-}- {-# LINE 232 "./src-ag/Order.ag" #-}- rule443 = \ _defines ((_lhsIchildNts) :: Map Identifier NontermIdent) ((_lhsIcon) :: Identifier) ((_lhsInt) :: Identifier) ((_patternIcopy) :: Pattern) ((_rhsIallRhsVars) :: Set (Identifier,Identifier)) ((_rhsItextLines) :: [String]) explicit_ mbName_ origin_ owrt_ ->- {-# LINE 232 "./src-ag/Order.ag" #-}- let childnt field = Map.lookup field _lhsIchildNts- in Seq.fromList [ CRule attr False True _lhsInt _lhsIcon field (childnt field) tp _patternIcopy _rhsItextLines _defines owrt_ origin_ _rhsIallRhsVars explicit_ mbName_- | (field,attr,tp) <- Map.elems _defines- ]- {-# LINE 3260 "dist/build/Order.hs"#-}- {-# INLINE rule444 #-}- {-# LINE 271 "./src-ag/Order.ag" #-}- rule444 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_rhsIusedAttrs) :: [(Identifier,Identifier)]) ((_rhsIusedFields) :: [Identifier]) ((_rhsIusedLocals) :: [Identifier]) ->- {-# LINE 271 "./src-ag/Order.ag" #-}- let defined = Map.keys _defines- used = [ Map.lookup (AltAttr field attr True) _lhsIaltAttrs | (field,attr) <- _rhsIusedAttrs]- ++ [ Map.lookup (AltAttr _LOC attr True) _lhsIaltAttrs | attr <- _rhsIusedLocals ++ _rhsIusedFields ]- in Seq.fromList [ (x,y) | Just x <- used, y <- defined ]- {-# LINE 3269 "dist/build/Order.hs"#-}- {-# INLINE rule445 #-}- {-# LINE 315 "./src-ag/Order.ag" #-}- rule445 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->- {-# LINE 315 "./src-ag/Order.ag" #-}- Seq.fromList $- [ (instVert, synVert)- | (field,instNm,_) <- Map.elems _defines- , field == _INST- , synNm <- Map.keys (findWithErr2 instNm _lhsIsynsOfChildren)- , let instAttr = AltAttr _INST instNm True- synAttr = AltAttr instNm synNm True- instVert = findWithErr2 instAttr _lhsIaltAttrs- synVert = findWithErr2 synAttr _lhsIaltAttrs- ]- {-# LINE 3284 "dist/build/Order.hs"#-}- {-# INLINE rule446 #-}- {-# LINE 326 "./src-ag/Order.ag" #-}- rule446 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->- {-# LINE 326 "./src-ag/Order.ag" #-}- Seq.fromList $- [ (instVert, inhVert)- | (field,instNm,_) <- Map.elems _defines- , field == _INST- , inhNm <- Map.keys (findWithErr2 instNm _lhsIinhsOfChildren)- , let instAttr = AltAttr _INST instNm True- inhAttr = AltAttr instNm inhNm False- instVert = findWithErr2 instAttr _lhsIaltAttrs- inhVert = findWithErr2 inhAttr _lhsIaltAttrs- ]- {-# LINE 3299 "dist/build/Order.hs"#-}- {-# INLINE rule447 #-}- {-# LINE 336 "./src-ag/Order.ag" #-}- rule447 = \ _instDep1 _instDep2 ->- {-# LINE 336 "./src-ag/Order.ag" #-}- _instDep1 Seq.>< _instDep2- {-# LINE 3305 "dist/build/Order.hs"#-}- {-# INLINE rule448 #-}- rule448 = \ ((_patternIerrors) :: Seq Error) ((_rhsIerrors) :: Seq Error) ->- _patternIerrors Seq.>< _rhsIerrors- {-# INLINE rule449 #-}- rule449 = \ ((_patternIgathAltAttrs) :: [AltAttr]) ->- _patternIgathAltAttrs- {-# INLINE rule450 #-}- rule450 = \ _gathRules ->- _gathRules- {-# INLINE rule451 #-}- rule451 = \ ((_patternIinstVars) :: [Identifier]) ->- _patternIinstVars- {-# INLINE rule452 #-}- rule452 = \ ((_patternIlocVars) :: [Identifier]) ->- _patternIlocVars- {-# INLINE rule453 #-}- rule453 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule454 #-}- rule454 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule455 #-}- rule455 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule456 #-}- rule456 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule457 #-}- rule457 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule458 #-}- rule458 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule459 #-}- rule459 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- _lhsIallfields- {-# INLINE rule460 #-}- rule460 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule461 #-}- rule461 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->- _lhsIattrs- {-# INLINE rule462 #-}- rule462 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule463 #-}- rule463 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->- _lhsImergeMap- {-# INLINE rule464 #-}- rule464 = \ ((_lhsInt) :: Identifier) ->- _lhsInt---- Rules ---------------------------------------------------------- wrapper-data Inh_Rules = Inh_Rules { allTypeSigs_Inh_Rules :: (Map Identifier Type), allfields_Inh_Rules :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Rules :: ([Identifier]), altAttrs_Inh_Rules :: (Map AltAttr Vertex), attrs_Inh_Rules :: ([(Identifier,Identifier)]), childInhs_Inh_Rules :: (Map Identifier Attributes), childNts_Inh_Rules :: (Map Identifier NontermIdent), con_Inh_Rules :: (Identifier), inh_Inh_Rules :: (Attributes), inhsOfChildren_Inh_Rules :: (Map Identifier Attributes), mergeMap_Inh_Rules :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Rules :: (Identifier), o_case_Inh_Rules :: (Bool), o_cata_Inh_Rules :: (Bool), o_dovisit_Inh_Rules :: (Bool), o_newtypes_Inh_Rules :: (Bool), o_rename_Inh_Rules :: (Bool), o_sem_Inh_Rules :: (Bool), o_sig_Inh_Rules :: (Bool), o_wantvisit_Inh_Rules :: (Bool), prefix_Inh_Rules :: (String), syn_Inh_Rules :: (Attributes), synsOfChildren_Inh_Rules :: (Map Identifier Attributes) }-data Syn_Rules = Syn_Rules { directDep_Syn_Rules :: (Seq Edge), errors_Syn_Rules :: (Seq Error), gathAltAttrs_Syn_Rules :: ([AltAttr]), gathRules_Syn_Rules :: (Seq CRule), instDep_Syn_Rules :: (Seq Edge), instVars_Syn_Rules :: ([Identifier]), locVars_Syn_Rules :: ([Identifier]), nAutoRules_Syn_Rules :: (Int), nExplicitRules_Syn_Rules :: (Int) }-{-# INLINABLE wrap_Rules #-}-wrap_Rules :: T_Rules -> Inh_Rules -> (Syn_Rules )-wrap_Rules (T_Rules act) (Inh_Rules _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Rules_vIn34 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren- (T_Rules_vOut34 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules) <- return (inv_Rules_s35 sem arg)- return (Syn_Rules _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules)- )---- cata-{-# NOINLINE sem_Rules #-}-sem_Rules :: Rules -> T_Rules -sem_Rules list = Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list)---- semantic domain-newtype T_Rules = T_Rules {- attach_T_Rules :: Identity (T_Rules_s35 )- }-newtype T_Rules_s35 = C_Rules_s35 {- inv_Rules_s35 :: (T_Rules_v34 )- }-data T_Rules_s36 = C_Rules_s36-type T_Rules_v34 = (T_Rules_vIn34 ) -> (T_Rules_vOut34 )-data T_Rules_vIn34 = T_Rules_vIn34 (Map Identifier Type) ([(Identifier,Type,ChildKind)]) ([Identifier]) (Map AltAttr Vertex) ([(Identifier,Identifier)]) (Map Identifier Attributes) (Map Identifier NontermIdent) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (String) (Attributes) (Map Identifier Attributes)-data T_Rules_vOut34 = T_Rules_vOut34 (Seq Edge) (Seq Error) ([AltAttr]) (Seq CRule) (Seq Edge) ([Identifier]) ([Identifier]) (Int) (Int)-{-# NOINLINE sem_Rules_Cons #-}-sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules -sem_Rules_Cons arg_hd_ arg_tl_ = T_Rules (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_Rules_v34 - v34 = \ (T_Rules_vIn34 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) -> ( let- _hdX32 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_))- _tlX35 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_))- (T_Rule_vOut31 _hdIdirectDep _hdIerrors _hdIgathAltAttrs _hdIgathRules _hdIinstDep _hdIinstVars _hdIlocVars _hdInAutoRules _hdInExplicitRules) = inv_Rule_s32 _hdX32 (T_Rule_vIn31 _hdOallTypeSigs _hdOallfields _hdOallnts _hdOaltAttrs _hdOattrs _hdOchildInhs _hdOchildNts _hdOcon _hdOinh _hdOinhsOfChildren _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_wantvisit _hdOprefix _hdOsyn _hdOsynsOfChildren)- (T_Rules_vOut34 _tlIdirectDep _tlIerrors _tlIgathAltAttrs _tlIgathRules _tlIinstDep _tlIinstVars _tlIlocVars _tlInAutoRules _tlInExplicitRules) = inv_Rules_s35 _tlX35 (T_Rules_vIn34 _tlOallTypeSigs _tlOallfields _tlOallnts _tlOaltAttrs _tlOattrs _tlOchildInhs _tlOchildNts _tlOcon _tlOinh _tlOinhsOfChildren _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_wantvisit _tlOprefix _tlOsyn _tlOsynsOfChildren)- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule465 _hdIdirectDep _tlIdirectDep- _lhsOerrors :: Seq Error- _lhsOerrors = rule466 _hdIerrors _tlIerrors- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule467 _hdIgathAltAttrs _tlIgathAltAttrs- _lhsOgathRules :: Seq CRule- _lhsOgathRules = rule468 _hdIgathRules _tlIgathRules- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule469 _hdIinstDep _tlIinstDep- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule470 _hdIinstVars _tlIinstVars- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule471 _hdIlocVars _tlIlocVars- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule472 _hdInAutoRules _tlInAutoRules- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule473 _hdInExplicitRules _tlInExplicitRules- _hdOallTypeSigs = rule474 _lhsIallTypeSigs- _hdOallfields = rule475 _lhsIallfields- _hdOallnts = rule476 _lhsIallnts- _hdOaltAttrs = rule477 _lhsIaltAttrs- _hdOattrs = rule478 _lhsIattrs- _hdOchildInhs = rule479 _lhsIchildInhs- _hdOchildNts = rule480 _lhsIchildNts- _hdOcon = rule481 _lhsIcon- _hdOinh = rule482 _lhsIinh- _hdOinhsOfChildren = rule483 _lhsIinhsOfChildren- _hdOmergeMap = rule484 _lhsImergeMap- _hdOnt = rule485 _lhsInt- _hdOo_case = rule486 _lhsIo_case- _hdOo_cata = rule487 _lhsIo_cata- _hdOo_dovisit = rule488 _lhsIo_dovisit- _hdOo_newtypes = rule489 _lhsIo_newtypes- _hdOo_rename = rule490 _lhsIo_rename- _hdOo_sem = rule491 _lhsIo_sem- _hdOo_sig = rule492 _lhsIo_sig- _hdOo_wantvisit = rule493 _lhsIo_wantvisit- _hdOprefix = rule494 _lhsIprefix- _hdOsyn = rule495 _lhsIsyn- _hdOsynsOfChildren = rule496 _lhsIsynsOfChildren- _tlOallTypeSigs = rule497 _lhsIallTypeSigs- _tlOallfields = rule498 _lhsIallfields- _tlOallnts = rule499 _lhsIallnts- _tlOaltAttrs = rule500 _lhsIaltAttrs- _tlOattrs = rule501 _lhsIattrs- _tlOchildInhs = rule502 _lhsIchildInhs- _tlOchildNts = rule503 _lhsIchildNts- _tlOcon = rule504 _lhsIcon- _tlOinh = rule505 _lhsIinh- _tlOinhsOfChildren = rule506 _lhsIinhsOfChildren- _tlOmergeMap = rule507 _lhsImergeMap- _tlOnt = rule508 _lhsInt- _tlOo_case = rule509 _lhsIo_case- _tlOo_cata = rule510 _lhsIo_cata- _tlOo_dovisit = rule511 _lhsIo_dovisit- _tlOo_newtypes = rule512 _lhsIo_newtypes- _tlOo_rename = rule513 _lhsIo_rename- _tlOo_sem = rule514 _lhsIo_sem- _tlOo_sig = rule515 _lhsIo_sig- _tlOo_wantvisit = rule516 _lhsIo_wantvisit- _tlOprefix = rule517 _lhsIprefix- _tlOsyn = rule518 _lhsIsyn- _tlOsynsOfChildren = rule519 _lhsIsynsOfChildren- __result_ = T_Rules_vOut34 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules- in __result_ )- in C_Rules_s35 v34- {-# INLINE rule465 #-}- rule465 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->- _hdIdirectDep Seq.>< _tlIdirectDep- {-# INLINE rule466 #-}- rule466 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule467 #-}- rule467 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->- _hdIgathAltAttrs ++ _tlIgathAltAttrs- {-# INLINE rule468 #-}- rule468 = \ ((_hdIgathRules) :: Seq CRule) ((_tlIgathRules) :: Seq CRule) ->- _hdIgathRules Seq.>< _tlIgathRules- {-# INLINE rule469 #-}- rule469 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->- _hdIinstDep Seq.>< _tlIinstDep- {-# INLINE rule470 #-}- rule470 = \ ((_hdIinstVars) :: [Identifier]) ((_tlIinstVars) :: [Identifier]) ->- _hdIinstVars ++ _tlIinstVars- {-# INLINE rule471 #-}- rule471 = \ ((_hdIlocVars) :: [Identifier]) ((_tlIlocVars) :: [Identifier]) ->- _hdIlocVars ++ _tlIlocVars- {-# INLINE rule472 #-}- rule472 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->- _hdInAutoRules + _tlInAutoRules- {-# INLINE rule473 #-}- rule473 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->- _hdInExplicitRules + _tlInExplicitRules- {-# INLINE rule474 #-}- rule474 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule475 #-}- rule475 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- _lhsIallfields- {-# INLINE rule476 #-}- rule476 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule477 #-}- rule477 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule478 #-}- rule478 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->- _lhsIattrs- {-# INLINE rule479 #-}- rule479 = \ ((_lhsIchildInhs) :: Map Identifier Attributes) ->- _lhsIchildInhs- {-# INLINE rule480 #-}- rule480 = \ ((_lhsIchildNts) :: Map Identifier NontermIdent) ->- _lhsIchildNts- {-# INLINE rule481 #-}- rule481 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule482 #-}- rule482 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule483 #-}- rule483 = \ ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->- _lhsIinhsOfChildren- {-# INLINE rule484 #-}- rule484 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->- _lhsImergeMap- {-# INLINE rule485 #-}- rule485 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule486 #-}- rule486 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule487 #-}- rule487 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule488 #-}- rule488 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule489 #-}- rule489 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule490 #-}- rule490 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule491 #-}- rule491 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule492 #-}- rule492 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule493 #-}- rule493 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule494 #-}- rule494 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule495 #-}- rule495 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule496 #-}- rule496 = \ ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->- _lhsIsynsOfChildren- {-# INLINE rule497 #-}- rule497 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->- _lhsIallTypeSigs- {-# INLINE rule498 #-}- rule498 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- _lhsIallfields- {-# INLINE rule499 #-}- rule499 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts- {-# INLINE rule500 #-}- rule500 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->- _lhsIaltAttrs- {-# INLINE rule501 #-}- rule501 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->- _lhsIattrs- {-# INLINE rule502 #-}- rule502 = \ ((_lhsIchildInhs) :: Map Identifier Attributes) ->- _lhsIchildInhs- {-# INLINE rule503 #-}- rule503 = \ ((_lhsIchildNts) :: Map Identifier NontermIdent) ->- _lhsIchildNts- {-# INLINE rule504 #-}- rule504 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon- {-# INLINE rule505 #-}- rule505 = \ ((_lhsIinh) :: Attributes) ->- _lhsIinh- {-# INLINE rule506 #-}- rule506 = \ ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->- _lhsIinhsOfChildren- {-# INLINE rule507 #-}- rule507 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->- _lhsImergeMap- {-# INLINE rule508 #-}- rule508 = \ ((_lhsInt) :: Identifier) ->- _lhsInt- {-# INLINE rule509 #-}- rule509 = \ ((_lhsIo_case) :: Bool) ->- _lhsIo_case- {-# INLINE rule510 #-}- rule510 = \ ((_lhsIo_cata) :: Bool) ->- _lhsIo_cata- {-# INLINE rule511 #-}- rule511 = \ ((_lhsIo_dovisit) :: Bool) ->- _lhsIo_dovisit- {-# INLINE rule512 #-}- rule512 = \ ((_lhsIo_newtypes) :: Bool) ->- _lhsIo_newtypes- {-# INLINE rule513 #-}- rule513 = \ ((_lhsIo_rename) :: Bool) ->- _lhsIo_rename- {-# INLINE rule514 #-}- rule514 = \ ((_lhsIo_sem) :: Bool) ->- _lhsIo_sem- {-# INLINE rule515 #-}- rule515 = \ ((_lhsIo_sig) :: Bool) ->- _lhsIo_sig- {-# INLINE rule516 #-}- rule516 = \ ((_lhsIo_wantvisit) :: Bool) ->- _lhsIo_wantvisit- {-# INLINE rule517 #-}- rule517 = \ ((_lhsIprefix) :: String) ->- _lhsIprefix- {-# INLINE rule518 #-}- rule518 = \ ((_lhsIsyn) :: Attributes) ->- _lhsIsyn- {-# INLINE rule519 #-}- rule519 = \ ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->- _lhsIsynsOfChildren-{-# NOINLINE sem_Rules_Nil #-}-sem_Rules_Nil :: T_Rules -sem_Rules_Nil = T_Rules (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_Rules_v34 - v34 = \ (T_Rules_vIn34 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) -> ( let- _lhsOdirectDep :: Seq Edge- _lhsOdirectDep = rule520 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule521 ()- _lhsOgathAltAttrs :: [AltAttr]- _lhsOgathAltAttrs = rule522 ()- _lhsOgathRules :: Seq CRule- _lhsOgathRules = rule523 ()- _lhsOinstDep :: Seq Edge- _lhsOinstDep = rule524 ()- _lhsOinstVars :: [Identifier]- _lhsOinstVars = rule525 ()- _lhsOlocVars :: [Identifier]- _lhsOlocVars = rule526 ()- _lhsOnAutoRules :: Int- _lhsOnAutoRules = rule527 ()- _lhsOnExplicitRules :: Int- _lhsOnExplicitRules = rule528 ()- __result_ = T_Rules_vOut34 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules- in __result_ )- in C_Rules_s35 v34- {-# INLINE rule520 #-}- rule520 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule521 #-}- rule521 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule522 #-}- rule522 = \ (_ :: ()) ->- []- {-# INLINE rule523 #-}- rule523 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule524 #-}- rule524 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule525 #-}- rule525 = \ (_ :: ()) ->- []- {-# INLINE rule526 #-}- rule526 = \ (_ :: ()) ->- []- {-# INLINE rule527 #-}- rule527 = \ (_ :: ()) ->- 0- {-# INLINE rule528 #-}- rule528 = \ (_ :: ()) ->- 0---- TypeSig -------------------------------------------------------- wrapper-data Inh_TypeSig = Inh_TypeSig { typeSigs_Inh_TypeSig :: (Map Identifier Type) }-data Syn_TypeSig = Syn_TypeSig { typeSigs_Syn_TypeSig :: (Map Identifier Type) }-{-# INLINABLE wrap_TypeSig #-}-wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> (Syn_TypeSig )-wrap_TypeSig (T_TypeSig act) (Inh_TypeSig _lhsItypeSigs) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_TypeSig_vIn37 _lhsItypeSigs- (T_TypeSig_vOut37 _lhsOtypeSigs) <- return (inv_TypeSig_s38 sem arg)- return (Syn_TypeSig _lhsOtypeSigs)- )---- cata-{-# INLINE sem_TypeSig #-}-sem_TypeSig :: TypeSig -> T_TypeSig -sem_TypeSig ( TypeSig name_ tp_ ) = sem_TypeSig_TypeSig name_ tp_---- semantic domain-newtype T_TypeSig = T_TypeSig {- attach_T_TypeSig :: Identity (T_TypeSig_s38 )- }-newtype T_TypeSig_s38 = C_TypeSig_s38 {- inv_TypeSig_s38 :: (T_TypeSig_v37 )- }-data T_TypeSig_s39 = C_TypeSig_s39-type T_TypeSig_v37 = (T_TypeSig_vIn37 ) -> (T_TypeSig_vOut37 )-data T_TypeSig_vIn37 = T_TypeSig_vIn37 (Map Identifier Type)-data T_TypeSig_vOut37 = T_TypeSig_vOut37 (Map Identifier Type)-{-# NOINLINE sem_TypeSig_TypeSig #-}-sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig -sem_TypeSig_TypeSig arg_name_ arg_tp_ = T_TypeSig (return st38) where- {-# NOINLINE st38 #-}- st38 = let- v37 :: T_TypeSig_v37 - v37 = \ (T_TypeSig_vIn37 _lhsItypeSigs) -> ( let- _lhsOtypeSigs :: Map Identifier Type- _lhsOtypeSigs = rule529 _lhsItypeSigs arg_name_ arg_tp_- __result_ = T_TypeSig_vOut37 _lhsOtypeSigs- in __result_ )- in C_TypeSig_s38 v37- {-# INLINE rule529 #-}- {-# LINE 532 "./src-ag/Order.ag" #-}- rule529 = \ ((_lhsItypeSigs) :: Map Identifier Type) name_ tp_ ->- {-# LINE 532 "./src-ag/Order.ag" #-}- Map.insert name_ tp_ _lhsItypeSigs- {-# LINE 3734 "dist/build/Order.hs"#-}---- TypeSigs ------------------------------------------------------- wrapper-data Inh_TypeSigs = Inh_TypeSigs { typeSigs_Inh_TypeSigs :: (Map Identifier Type) }-data Syn_TypeSigs = Syn_TypeSigs { typeSigs_Syn_TypeSigs :: (Map Identifier Type) }-{-# INLINABLE wrap_TypeSigs #-}-wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> (Syn_TypeSigs )-wrap_TypeSigs (T_TypeSigs act) (Inh_TypeSigs _lhsItypeSigs) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_TypeSigs_vIn40 _lhsItypeSigs- (T_TypeSigs_vOut40 _lhsOtypeSigs) <- return (inv_TypeSigs_s41 sem arg)- return (Syn_TypeSigs _lhsOtypeSigs)- )---- cata-{-# NOINLINE sem_TypeSigs #-}-sem_TypeSigs :: TypeSigs -> T_TypeSigs -sem_TypeSigs list = Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list)---- semantic domain-newtype T_TypeSigs = T_TypeSigs {- attach_T_TypeSigs :: Identity (T_TypeSigs_s41 )- }-newtype T_TypeSigs_s41 = C_TypeSigs_s41 {- inv_TypeSigs_s41 :: (T_TypeSigs_v40 )- }-data T_TypeSigs_s42 = C_TypeSigs_s42-type T_TypeSigs_v40 = (T_TypeSigs_vIn40 ) -> (T_TypeSigs_vOut40 )-data T_TypeSigs_vIn40 = T_TypeSigs_vIn40 (Map Identifier Type)-data T_TypeSigs_vOut40 = T_TypeSigs_vOut40 (Map Identifier Type)-{-# NOINLINE sem_TypeSigs_Cons #-}-sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs -sem_TypeSigs_Cons arg_hd_ arg_tl_ = T_TypeSigs (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_TypeSigs_v40 - v40 = \ (T_TypeSigs_vIn40 _lhsItypeSigs) -> ( let- _hdX38 = Control.Monad.Identity.runIdentity (attach_T_TypeSig (arg_hd_))- _tlX41 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_tl_))- (T_TypeSig_vOut37 _hdItypeSigs) = inv_TypeSig_s38 _hdX38 (T_TypeSig_vIn37 _hdOtypeSigs)- (T_TypeSigs_vOut40 _tlItypeSigs) = inv_TypeSigs_s41 _tlX41 (T_TypeSigs_vIn40 _tlOtypeSigs)- _lhsOtypeSigs :: Map Identifier Type- _lhsOtypeSigs = rule530 _tlItypeSigs- _hdOtypeSigs = rule531 _lhsItypeSigs- _tlOtypeSigs = rule532 _hdItypeSigs- __result_ = T_TypeSigs_vOut40 _lhsOtypeSigs- in __result_ )- in C_TypeSigs_s41 v40- {-# INLINE rule530 #-}- rule530 = \ ((_tlItypeSigs) :: Map Identifier Type) ->- _tlItypeSigs- {-# INLINE rule531 #-}- rule531 = \ ((_lhsItypeSigs) :: Map Identifier Type) ->- _lhsItypeSigs- {-# INLINE rule532 #-}- rule532 = \ ((_hdItypeSigs) :: Map Identifier Type) ->- _hdItypeSigs-{-# NOINLINE sem_TypeSigs_Nil #-}-sem_TypeSigs_Nil :: T_TypeSigs -sem_TypeSigs_Nil = T_TypeSigs (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_TypeSigs_v40 - v40 = \ (T_TypeSigs_vIn40 _lhsItypeSigs) -> ( let- _lhsOtypeSigs :: Map Identifier Type- _lhsOtypeSigs = rule533 _lhsItypeSigs- __result_ = T_TypeSigs_vOut40 _lhsOtypeSigs- in __result_ )- in C_TypeSigs_s41 v40- {-# INLINE rule533 #-}- rule533 = \ ((_lhsItypeSigs) :: Map Identifier Type) ->+{-# LINE 2 "./src-ag/AbstractSyntax.ag" #-}++-- AbstractSyntax.ag imports+import Data.Set(Set)+import Data.Map(Map)+import Patterns (Pattern(..),Patterns)+import Expression (Expression(..))+import Macro --marcos+import CommonTypes+import ErrorMessages+{-# LINE 16 "dist/build/Order.hs" #-}++{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 22 "dist/build/Order.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 29 "dist/build/Order.hs" #-}++{-# LINE 10 "./src-ag/Order.ag" #-}++-- From uuagc+import CommonTypes+import Patterns+import ErrorMessages+import AbstractSyntax+import Code hiding (Type)+import qualified Code+import Expression+import Options+import SequentialComputation+import SequentialTypes+import CodeSyntax+import GrammarInfo+import HsToken(HsTokensRoot(HsTokensRoot))+import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..))+-- From uulib+import qualified Data.Map as Map+import qualified Data.Set as Set+import qualified Data.Sequence as Seq+import Data.Map(Map)+import Data.Set(Set)+import Data.Sequence(Seq, (><))+import UU.Util.Utils+import UU.Scanner.Position(Pos(..),initPos)+import Data.Foldable(toList)++-- From haskell libraries+import Control.Monad(liftM)+import qualified Data.Array as Array+import Data.Array((!),bounds,inRange)+import Data.List(elemIndex,partition,sort,mapAccumL,find,nubBy,intersperse,groupBy,transpose)+import qualified Data.Tree as Tree+import Data.Maybe+{-# LINE 66 "dist/build/Order.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 46 "./src-ag/Order.ag" #-}++-- Terminates with an error if the key is not in the map+findWithErr1 :: (Ord k, Show k) => String -> k -> Map k a -> a+findWithErr1 s k+ = Map.findWithDefault (error ("findWithErr1 " ++ s ++ ": key " ++ show k ++ " not in map.")) k++findWithErr2 :: (Ord k, Show k, Show a) => k -> Map k a -> a+findWithErr2 k m+ = Map.findWithDefault (error ("findWithErr2: key " ++ show k ++ " not in map: " ++ show m)) k m+{-# LINE 79 "dist/build/Order.hs" #-}++{-# LINE 71 "./src-ag/Order.ag" #-}++startsWith :: String -> String -> Bool+startsWith k h = k == take (length k) h+{-# LINE 85 "dist/build/Order.hs" #-}++{-# LINE 138 "./src-ag/Order.ag" #-}++getNtName :: Type -> NontermIdent+getNtName (NT nt _ _) = nt+getNtName _ = nullIdent+{-# LINE 92 "dist/build/Order.hs" #-}++{-# LINE 166 "./src-ag/Order.ag" #-}++data AltAttr = AltAttr Identifier Identifier Bool+ deriving (Eq, Ord, Show)+{-# LINE 98 "dist/build/Order.hs" #-}++{-# LINE 239 "./src-ag/Order.ag" #-}++substSelf nt tp+ = case tp of+ NT n tps defor | n == _SELF -> NT nt tps defor+ _ -> tp++haskellTupel :: [Type] -> Maybe Type+haskellTupel ts = Just ( Haskell ( '(' : (concat (intersperse "," (map show ts))) ++ ")" ))+{-# LINE 109 "dist/build/Order.hs" #-}++{-# LINE 692 "./src-ag/Order.ag" #-}++swap (a,b) = (b,a)++showPath :: Table CRule -> [Vertex] -> [String]+showPath ruleTable path+ = let look a | inRange (bounds ruleTable) a = [showOrigin (ruleTable ! a)]+ | otherwise = ["Vertex " ++ show a]+ showOrigin cr | getHasCode cr && getName (getAttr cr) /= "self" = prettyCRule cr ++ " (" ++ show (getPos (getAttr cr)) ++ ")"+ | otherwise = prettyCRule cr+ in concatMap look path+++showPathLocal :: Table CRule -> [Vertex] -> [String]+showPathLocal _ [] = []+showPathLocal ruleTable xs = showP (xs++[-1])+ where showP [] = []+ showP (v1:v2:vs) = let line = step v1 v2+ lines = showP vs+ in line:lines+ step v1 v2 = " - " ++ a1+ where r1 = ruleTable ! v1+ a1 = show (getAttr r1)+++limitTo :: Int -> [String] -> [String]+limitTo _ [] = []+limitTo 0 _ = ["....etcetera, etcetera...."]+limitTo n (x:xs) = x : limitTo (n-1) xs++showPathNice :: Table CRule -> [Vertex] -> [String]+showPathNice _ [] = []+showPathNice ruleTable xs = limitTo 100 (showP ((-1):xs++[-1]))+ where [maxf, maxa, maxn, maxc] = maxWidths ruleTable (take 100 xs)+ showP [] = []+ showP (v1:v2:vs) = let line = step v1 v2+ lines = showP vs+ in if null line then lines else line:lines+ step v1 v2 | last && first = induced+ | last && isSyn r1 = "pass up " ++ alignR maxf "" ++ " " ++ alignL maxa a1 ++ " in " ++ alignR maxn n1 ++ "|" ++ c1 ++ induced+ | first&& not(isSyn r2) = "get from above " ++ alignR maxf "" ++ " " ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2+ | last = "pass down " ++ alignR maxf f1 ++ "." ++ a1 ++ induced+ | isSyn r2 = "get from below " ++ alignR maxf f2 ++ "." ++ alignL maxa a2 ++ " in " ++ alignR maxn n2 ++ "|" ++ c2+ | isLocal r1 = if head a1 == '_'+ then ""+ else "calculate " ++ alignR maxf "loc" ++ "." ++ a1+ | otherwise = "pass down " ++ alignR maxf f1 ++ "." ++ alignL maxa a1 ++ " to " ++ alignR maxn n2 ++ "|" ++ c2+ where+ first = v1<0+ last = v2<0+ r1 = ruleTable ! v1+ r2 = ruleTable ! v2+ a1 = show (getAttr r1)+ a2 = show (getAttr r2)+ f1 = show (getField r1)+ f2 = show (getField r2)+ n1 = show (getLhsNt r1)+ n2 = show (getLhsNt r2)+ c1 = show (getCon r1)+ c2 = show (getCon r2)+ induced | v2== -2 = " INDUCED dependency to "+ | otherwise = ""+++maxWidths ruleTable vs+ = map maximum (transpose (map getWidth vs))+ where getWidth v | v<0 = [0,0,0,0]+ | otherwise = map (length . show . ($ (ruleTable!v))) [getField, getAttr, getLhsNt, getCon]++alignL n xs | k<n = xs ++ replicate (n-k) ' '+ | otherwise = xs+ where k = length xs++alignR n xs | k<n = replicate (n-k) ' ' ++ xs+ | otherwise = xs+ where k = length xs++localCycleErr :: Table CRule -> Bool -> Route -> Error+localCycleErr ruleTable o_visit (s:path)+ = let cr = ruleTable ! s+ attr = getAttr cr+ nt = getLhsNt cr+ con = getCon cr+ in LocalCirc nt con attr o_visit (showPathLocal ruleTable path)++instCycleErr :: Table CRule -> Bool -> Route -> Error+instCycleErr ruleTable o_visit (s:path)+ = let cr = ruleTable ! s+ attr = getAttr cr+ nt = getLhsNt cr+ con = getCon cr+ in InstCirc nt con attr o_visit (showPathLocal ruleTable path)++directCycleErrs :: Table NTAttr -> Table CRule -> Bool -> [EdgeRoutes] -> [Error]+directCycleErrs attrTable ruleTable o_visit xs+ = let getNont v = case attrTable ! v of+ NTASyn nt _ _ -> nt+ NTAInh nt _ _ -> nt+ getAttr v = case attrTable ! v of+ NTASyn _ a _ -> a+ NTAInh _ a _ -> a+ sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2+ procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)+ wrapGroup gr@(((v1,_),_,_):_) = DirectCirc (getNont v1) o_visit (map procCycle gr)+ in map wrapGroup (groupBy sameNont xs)++inducedCycleErrs :: Table NTAttr -> Table CRule -> CInterfaceMap -> [EdgeRoutes] -> [Error]+inducedCycleErrs attrTable ruleTable cim xs+ = let getNont v = case attrTable ! v of+ NTASyn nt _ _ -> nt+ NTAInh nt _ _ -> nt+ getAttr v = case attrTable ! v of+ NTASyn _ a _ -> a+ NTAInh _ a _ -> a+ sameNont ((v1,_),_,_) ((v2,_),_,_) = getNont v1 == getNont v2+ procCycle ((v1,v2),p1,p2) = ((getAttr v1, getAttr v2), showPathNice ruleTable p1, showPathNice ruleTable p2)+ wrapGroup gr@(((v1,_),_,_):_) = InducedCirc (getNont v1) (findWithErr1 "inducedCycleErr.cinter" (getNont v1) cim) (map procCycle gr)+ in map wrapGroup (groupBy sameNont xs)+{-# LINE 229 "dist/build/Order.hs" #-}+-- Child -------------------------------------------------------+-- wrapper+data Inh_Child = Inh_Child { allfields_Inh_Child :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Child :: ([Identifier]), attrs_Inh_Child :: ([(Identifier,Identifier)]), con_Inh_Child :: (Identifier), inh_Inh_Child :: (Attributes), inhMap_Inh_Child :: (Map Identifier Attributes), mergeMap_Inh_Child :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Child :: (Identifier), o_unbox_Inh_Child :: (Bool), syn_Inh_Child :: (Attributes), synMap_Inh_Child :: (Map Identifier Attributes) }+data Syn_Child = Syn_Child { attributes_Syn_Child :: ([(Identifier,Attributes,Attributes)]), collectChildrenInhs_Syn_Child :: (Map Identifier Attributes ), collectChildrenSyns_Syn_Child :: (Map Identifier Attributes ), errors_Syn_Child :: (Seq Error), field_Syn_Child :: ((Identifier,Type,ChildKind)), gathAltAttrs_Syn_Child :: ([AltAttr]), gathRules_Syn_Child :: (Seq CRule), inhs_Syn_Child :: (Seq (Identifier,Attributes)), nts_Syn_Child :: (Seq (Identifier,NontermIdent)), singlevisits_Syn_Child :: ([CRule]), terminals_Syn_Child :: ([Identifier]) }+{-# INLINABLE wrap_Child #-}+wrap_Child :: T_Child -> Inh_Child -> (Syn_Child )+wrap_Child (T_Child act) (Inh_Child _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Child_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap+ (T_Child_vOut1 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals) <- return (inv_Child_s2 sem arg)+ return (Syn_Child _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals)+ )++-- cata+{-# INLINE sem_Child #-}+sem_Child :: Child -> T_Child +sem_Child ( Child name_ tp_ kind_ ) = sem_Child_Child name_ tp_ kind_++-- semantic domain+newtype T_Child = T_Child {+ attach_T_Child :: Identity (T_Child_s2 )+ }+newtype T_Child_s2 = C_Child_s2 {+ inv_Child_s2 :: (T_Child_v1 )+ }+data T_Child_s3 = C_Child_s3+type T_Child_v1 = (T_Child_vIn1 ) -> (T_Child_vOut1 )+data T_Child_vIn1 = T_Child_vIn1 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Attributes) (Map Identifier Attributes)+data T_Child_vOut1 = T_Child_vOut1 ([(Identifier,Attributes,Attributes)]) (Map Identifier Attributes ) (Map Identifier Attributes ) (Seq Error) ((Identifier,Type,ChildKind)) ([AltAttr]) (Seq CRule) (Seq (Identifier,Attributes)) (Seq (Identifier,NontermIdent)) ([CRule]) ([Identifier])+{-# NOINLINE sem_Child_Child #-}+sem_Child_Child :: (Identifier) -> (Type) -> (ChildKind) -> T_Child +sem_Child_Child arg_name_ arg_tp_ arg_kind_ = T_Child (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_Child_v1 + v1 = \ (T_Child_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) -> ( let+ _chnt = rule0 arg_name_ arg_tp_+ _inh = rule1 _chnt _lhsIinhMap+ _syn = rule2 _chnt _lhsIsynMap+ _maptolocal = rule3 _syn arg_tp_+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule4 _maptolocal _syn arg_name_+ _lhsOnts :: Seq (Identifier,NontermIdent)+ _lhsOnts = rule5 arg_name_ arg_tp_+ _lhsOinhs :: Seq (Identifier,Attributes)+ _lhsOinhs = rule6 _inh arg_name_+ _gathRules = rule7 _lhsIcon _lhsInt _maptolocal _syn arg_name_ arg_tp_+ _lhsOcollectChildrenSyns :: Map Identifier Attributes + _lhsOcollectChildrenSyns = rule8 _syn arg_name_+ _lhsOcollectChildrenInhs :: Map Identifier Attributes + _lhsOcollectChildrenInhs = rule9 _inh arg_name_+ _lhsOsinglevisits :: [CRule]+ _lhsOsinglevisits = rule10 _inh _maptolocal _syn arg_name_ arg_tp_+ _lhsOterminals :: [Identifier]+ _lhsOterminals = rule11 _maptolocal arg_name_+ _lhsOattributes :: [(Identifier,Attributes,Attributes)]+ _lhsOattributes = rule12 _inh _syn arg_name_+ _lhsOfield :: (Identifier,Type,ChildKind)+ _lhsOfield = rule13 arg_kind_ arg_name_ arg_tp_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule14 ()+ _lhsOgathRules :: Seq CRule+ _lhsOgathRules = rule15 _gathRules+ __result_ = T_Child_vOut1 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfield _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals+ in __result_ )+ in C_Child_s2 v1+ {-# INLINE rule0 #-}+ {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}+ rule0 = \ name_ tp_ ->+ {-# LINE 19 "./src-ag/DistChildAttr.ag" #-}+ case tp_ of+ NT nt _ _ -> nt+ Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.")+ Haskell t -> identifier ""+ {-# LINE 305 "dist/build/Order.hs"#-}+ {-# INLINE rule1 #-}+ {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}+ rule1 = \ _chnt ((_lhsIinhMap) :: Map Identifier Attributes) ->+ {-# LINE 23 "./src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIinhMap+ {-# LINE 311 "dist/build/Order.hs"#-}+ {-# INLINE rule2 #-}+ {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}+ rule2 = \ _chnt ((_lhsIsynMap) :: Map Identifier Attributes) ->+ {-# LINE 24 "./src-ag/DistChildAttr.ag" #-}+ Map.findWithDefault Map.empty _chnt _lhsIsynMap+ {-# LINE 317 "dist/build/Order.hs"#-}+ {-# INLINE rule3 #-}+ {-# LINE 180 "./src-ag/Order.ag" #-}+ rule3 = \ _syn tp_ ->+ {-# LINE 180 "./src-ag/Order.ag" #-}+ case tp_ of+ NT nt _ _ -> Map.null _syn+ _ -> True+ {-# LINE 325 "dist/build/Order.hs"#-}+ {-# INLINE rule4 #-}+ {-# LINE 183 "./src-ag/Order.ag" #-}+ rule4 = \ _maptolocal _syn name_ ->+ {-# LINE 183 "./src-ag/Order.ag" #-}+ if _maptolocal+ then [ AltAttr _LOC name_ True ]+ else [ AltAttr name_ syn True | syn <- Map.keys _syn ]+ {-# LINE 333 "dist/build/Order.hs"#-}+ {-# INLINE rule5 #-}+ {-# LINE 198 "./src-ag/Order.ag" #-}+ rule5 = \ name_ tp_ ->+ {-# LINE 198 "./src-ag/Order.ag" #-}+ Seq.singleton (name_,getNtName tp_)+ {-# LINE 339 "dist/build/Order.hs"#-}+ {-# INLINE rule6 #-}+ {-# LINE 199 "./src-ag/Order.ag" #-}+ rule6 = \ _inh name_ ->+ {-# LINE 199 "./src-ag/Order.ag" #-}+ Seq.singleton (name_,_inh )+ {-# LINE 345 "dist/build/Order.hs"#-}+ {-# INLINE rule7 #-}+ {-# LINE 215 "./src-ag/Order.ag" #-}+ rule7 = \ ((_lhsIcon) :: Identifier) ((_lhsInt) :: Identifier) _maptolocal _syn name_ tp_ ->+ {-# LINE 215 "./src-ag/Order.ag" #-}+ if _maptolocal+ then Seq.singleton (cRuleTerminal name_ _lhsInt _lhsIcon tp_)+ else Seq.fromList [ cRuleRhsSyn syn _lhsInt _lhsIcon tp name_ (getNtName tp_) | (syn,tp) <- Map.assocs _syn ]+ {-# LINE 353 "dist/build/Order.hs"#-}+ {-# INLINE rule8 #-}+ {-# LINE 347 "./src-ag/Order.ag" #-}+ rule8 = \ _syn name_ ->+ {-# LINE 347 "./src-ag/Order.ag" #-}+ Map.singleton name_ _syn+ {-# LINE 359 "dist/build/Order.hs"#-}+ {-# INLINE rule9 #-}+ {-# LINE 348 "./src-ag/Order.ag" #-}+ rule9 = \ _inh name_ ->+ {-# LINE 348 "./src-ag/Order.ag" #-}+ Map.singleton name_ _inh+ {-# LINE 365 "dist/build/Order.hs"#-}+ {-# INLINE rule10 #-}+ {-# LINE 618 "./src-ag/Order.ag" #-}+ rule10 = \ _inh _maptolocal _syn name_ tp_ ->+ {-# LINE 618 "./src-ag/Order.ag" #-}+ if _maptolocal+ then []+ else [CChildVisit name_ (getNtName tp_) 0 _inh _syn True]+ {-# LINE 373 "dist/build/Order.hs"#-}+ {-# INLINE rule11 #-}+ {-# LINE 643 "./src-ag/Order.ag" #-}+ rule11 = \ _maptolocal name_ ->+ {-# LINE 643 "./src-ag/Order.ag" #-}+ if _maptolocal+ then [name_]+ else []+ {-# LINE 381 "dist/build/Order.hs"#-}+ {-# INLINE rule12 #-}+ {-# LINE 672 "./src-ag/Order.ag" #-}+ rule12 = \ _inh _syn name_ ->+ {-# LINE 672 "./src-ag/Order.ag" #-}+ [(name_, _inh , _syn )]+ {-# LINE 387 "dist/build/Order.hs"#-}+ {-# INLINE rule13 #-}+ {-# LINE 676 "./src-ag/Order.ag" #-}+ rule13 = \ kind_ name_ tp_ ->+ {-# LINE 676 "./src-ag/Order.ag" #-}+ (name_, tp_, kind_)+ {-# LINE 393 "dist/build/Order.hs"#-}+ {-# INLINE rule14 #-}+ rule14 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule15 #-}+ rule15 = \ _gathRules ->+ _gathRules++-- Children ----------------------------------------------------+-- wrapper+data Inh_Children = Inh_Children { allfields_Inh_Children :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Children :: ([Identifier]), attrs_Inh_Children :: ([(Identifier,Identifier)]), con_Inh_Children :: (Identifier), inh_Inh_Children :: (Attributes), inhMap_Inh_Children :: (Map Identifier Attributes), mergeMap_Inh_Children :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Children :: (Identifier), o_unbox_Inh_Children :: (Bool), syn_Inh_Children :: (Attributes), synMap_Inh_Children :: (Map Identifier Attributes) }+data Syn_Children = Syn_Children { attributes_Syn_Children :: ([(Identifier,Attributes,Attributes)]), collectChildrenInhs_Syn_Children :: (Map Identifier Attributes ), collectChildrenSyns_Syn_Children :: (Map Identifier Attributes ), errors_Syn_Children :: (Seq Error), fields_Syn_Children :: ([(Identifier,Type,ChildKind)]), gathAltAttrs_Syn_Children :: ([AltAttr]), gathRules_Syn_Children :: (Seq CRule), inhs_Syn_Children :: (Seq (Identifier,Attributes)), nts_Syn_Children :: (Seq (Identifier,NontermIdent)), singlevisits_Syn_Children :: ([CRule]), terminals_Syn_Children :: ([Identifier]) }+{-# INLINABLE wrap_Children #-}+wrap_Children :: T_Children -> Inh_Children -> (Syn_Children )+wrap_Children (T_Children act) (Inh_Children _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Children_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap+ (T_Children_vOut4 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals) <- return (inv_Children_s5 sem arg)+ return (Syn_Children _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals)+ )++-- cata+{-# NOINLINE sem_Children #-}+sem_Children :: Children -> T_Children +sem_Children list = Prelude.foldr sem_Children_Cons sem_Children_Nil (Prelude.map sem_Child list)++-- semantic domain+newtype T_Children = T_Children {+ attach_T_Children :: Identity (T_Children_s5 )+ }+newtype T_Children_s5 = C_Children_s5 {+ inv_Children_s5 :: (T_Children_v4 )+ }+data T_Children_s6 = C_Children_s6+type T_Children_v4 = (T_Children_vIn4 ) -> (T_Children_vOut4 )+data T_Children_vIn4 = T_Children_vIn4 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Attributes) (Map Identifier Attributes)+data T_Children_vOut4 = T_Children_vOut4 ([(Identifier,Attributes,Attributes)]) (Map Identifier Attributes ) (Map Identifier Attributes ) (Seq Error) ([(Identifier,Type,ChildKind)]) ([AltAttr]) (Seq CRule) (Seq (Identifier,Attributes)) (Seq (Identifier,NontermIdent)) ([CRule]) ([Identifier])+{-# NOINLINE sem_Children_Cons #-}+sem_Children_Cons :: T_Child -> T_Children -> T_Children +sem_Children_Cons arg_hd_ arg_tl_ = T_Children (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_Children_v4 + v4 = \ (T_Children_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) -> ( let+ _hdX2 = Control.Monad.Identity.runIdentity (attach_T_Child (arg_hd_))+ _tlX5 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_tl_))+ (T_Child_vOut1 _hdIattributes _hdIcollectChildrenInhs _hdIcollectChildrenSyns _hdIerrors _hdIfield _hdIgathAltAttrs _hdIgathRules _hdIinhs _hdInts _hdIsinglevisits _hdIterminals) = inv_Child_s2 _hdX2 (T_Child_vIn1 _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOinh _hdOinhMap _hdOmergeMap _hdOnt _hdOo_unbox _hdOsyn _hdOsynMap)+ (T_Children_vOut4 _tlIattributes _tlIcollectChildrenInhs _tlIcollectChildrenSyns _tlIerrors _tlIfields _tlIgathAltAttrs _tlIgathRules _tlIinhs _tlInts _tlIsinglevisits _tlIterminals) = inv_Children_s5 _tlX5 (T_Children_vIn4 _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOinh _tlOinhMap _tlOmergeMap _tlOnt _tlOo_unbox _tlOsyn _tlOsynMap)+ _lhsOfields :: [(Identifier,Type,ChildKind)]+ _lhsOfields = rule16 _hdIfield _tlIfields+ _lhsOattributes :: [(Identifier,Attributes,Attributes)]+ _lhsOattributes = rule17 _hdIattributes _tlIattributes+ _lhsOcollectChildrenInhs :: Map Identifier Attributes + _lhsOcollectChildrenInhs = rule18 _hdIcollectChildrenInhs _tlIcollectChildrenInhs+ _lhsOcollectChildrenSyns :: Map Identifier Attributes + _lhsOcollectChildrenSyns = rule19 _hdIcollectChildrenSyns _tlIcollectChildrenSyns+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule20 _hdIerrors _tlIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule21 _hdIgathAltAttrs _tlIgathAltAttrs+ _lhsOgathRules :: Seq CRule+ _lhsOgathRules = rule22 _hdIgathRules _tlIgathRules+ _lhsOinhs :: Seq (Identifier,Attributes)+ _lhsOinhs = rule23 _hdIinhs _tlIinhs+ _lhsOnts :: Seq (Identifier,NontermIdent)+ _lhsOnts = rule24 _hdInts _tlInts+ _lhsOsinglevisits :: [CRule]+ _lhsOsinglevisits = rule25 _hdIsinglevisits _tlIsinglevisits+ _lhsOterminals :: [Identifier]+ _lhsOterminals = rule26 _hdIterminals _tlIterminals+ _hdOallfields = rule27 _lhsIallfields+ _hdOallnts = rule28 _lhsIallnts+ _hdOattrs = rule29 _lhsIattrs+ _hdOcon = rule30 _lhsIcon+ _hdOinh = rule31 _lhsIinh+ _hdOinhMap = rule32 _lhsIinhMap+ _hdOmergeMap = rule33 _lhsImergeMap+ _hdOnt = rule34 _lhsInt+ _hdOo_unbox = rule35 _lhsIo_unbox+ _hdOsyn = rule36 _lhsIsyn+ _hdOsynMap = rule37 _lhsIsynMap+ _tlOallfields = rule38 _lhsIallfields+ _tlOallnts = rule39 _lhsIallnts+ _tlOattrs = rule40 _lhsIattrs+ _tlOcon = rule41 _lhsIcon+ _tlOinh = rule42 _lhsIinh+ _tlOinhMap = rule43 _lhsIinhMap+ _tlOmergeMap = rule44 _lhsImergeMap+ _tlOnt = rule45 _lhsInt+ _tlOo_unbox = rule46 _lhsIo_unbox+ _tlOsyn = rule47 _lhsIsyn+ _tlOsynMap = rule48 _lhsIsynMap+ __result_ = T_Children_vOut4 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals+ in __result_ )+ in C_Children_s5 v4+ {-# INLINE rule16 #-}+ {-# LINE 679 "./src-ag/Order.ag" #-}+ rule16 = \ ((_hdIfield) :: (Identifier,Type,ChildKind)) ((_tlIfields) :: [(Identifier,Type,ChildKind)]) ->+ {-# LINE 679 "./src-ag/Order.ag" #-}+ _hdIfield : _tlIfields+ {-# LINE 494 "dist/build/Order.hs"#-}+ {-# INLINE rule17 #-}+ rule17 = \ ((_hdIattributes) :: [(Identifier,Attributes,Attributes)]) ((_tlIattributes) :: [(Identifier,Attributes,Attributes)]) ->+ _hdIattributes ++ _tlIattributes+ {-# INLINE rule18 #-}+ rule18 = \ ((_hdIcollectChildrenInhs) :: Map Identifier Attributes ) ((_tlIcollectChildrenInhs) :: Map Identifier Attributes ) ->+ _hdIcollectChildrenInhs `Map.union` _tlIcollectChildrenInhs+ {-# INLINE rule19 #-}+ rule19 = \ ((_hdIcollectChildrenSyns) :: Map Identifier Attributes ) ((_tlIcollectChildrenSyns) :: Map Identifier Attributes ) ->+ _hdIcollectChildrenSyns `Map.union` _tlIcollectChildrenSyns+ {-# INLINE rule20 #-}+ rule20 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule21 #-}+ rule21 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# INLINE rule22 #-}+ rule22 = \ ((_hdIgathRules) :: Seq CRule) ((_tlIgathRules) :: Seq CRule) ->+ _hdIgathRules Seq.>< _tlIgathRules+ {-# INLINE rule23 #-}+ rule23 = \ ((_hdIinhs) :: Seq (Identifier,Attributes)) ((_tlIinhs) :: Seq (Identifier,Attributes)) ->+ _hdIinhs Seq.>< _tlIinhs+ {-# INLINE rule24 #-}+ rule24 = \ ((_hdInts) :: Seq (Identifier,NontermIdent)) ((_tlInts) :: Seq (Identifier,NontermIdent)) ->+ _hdInts Seq.>< _tlInts+ {-# INLINE rule25 #-}+ rule25 = \ ((_hdIsinglevisits) :: [CRule]) ((_tlIsinglevisits) :: [CRule]) ->+ _hdIsinglevisits ++ _tlIsinglevisits+ {-# INLINE rule26 #-}+ rule26 = \ ((_hdIterminals) :: [Identifier]) ((_tlIterminals) :: [Identifier]) ->+ _hdIterminals ++ _tlIterminals+ {-# INLINE rule27 #-}+ rule27 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIallfields+ {-# INLINE rule28 #-}+ rule28 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule29 #-}+ rule29 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ _lhsIattrs+ {-# INLINE rule30 #-}+ rule30 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule31 #-}+ rule31 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule32 #-}+ rule32 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule33 #-}+ rule33 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule34 #-}+ rule34 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule35 #-}+ rule35 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule36 #-}+ rule36 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule37 #-}+ rule37 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule38 #-}+ rule38 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIallfields+ {-# INLINE rule39 #-}+ rule39 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule40 #-}+ rule40 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ _lhsIattrs+ {-# INLINE rule41 #-}+ rule41 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule42 #-}+ rule42 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule43 #-}+ rule43 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule44 #-}+ rule44 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule45 #-}+ rule45 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule46 #-}+ rule46 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule47 #-}+ rule47 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule48 #-}+ rule48 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+{-# NOINLINE sem_Children_Nil #-}+sem_Children_Nil :: T_Children +sem_Children_Nil = T_Children (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_Children_v4 + v4 = \ (T_Children_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIinh _lhsIinhMap _lhsImergeMap _lhsInt _lhsIo_unbox _lhsIsyn _lhsIsynMap) -> ( let+ _lhsOfields :: [(Identifier,Type,ChildKind)]+ _lhsOfields = rule49 ()+ _lhsOattributes :: [(Identifier,Attributes,Attributes)]+ _lhsOattributes = rule50 ()+ _lhsOcollectChildrenInhs :: Map Identifier Attributes + _lhsOcollectChildrenInhs = rule51 ()+ _lhsOcollectChildrenSyns :: Map Identifier Attributes + _lhsOcollectChildrenSyns = rule52 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule53 ()+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule54 ()+ _lhsOgathRules :: Seq CRule+ _lhsOgathRules = rule55 ()+ _lhsOinhs :: Seq (Identifier,Attributes)+ _lhsOinhs = rule56 ()+ _lhsOnts :: Seq (Identifier,NontermIdent)+ _lhsOnts = rule57 ()+ _lhsOsinglevisits :: [CRule]+ _lhsOsinglevisits = rule58 ()+ _lhsOterminals :: [Identifier]+ _lhsOterminals = rule59 ()+ __result_ = T_Children_vOut4 _lhsOattributes _lhsOcollectChildrenInhs _lhsOcollectChildrenSyns _lhsOerrors _lhsOfields _lhsOgathAltAttrs _lhsOgathRules _lhsOinhs _lhsOnts _lhsOsinglevisits _lhsOterminals+ in __result_ )+ in C_Children_s5 v4+ {-# INLINE rule49 #-}+ {-# LINE 680 "./src-ag/Order.ag" #-}+ rule49 = \ (_ :: ()) ->+ {-# LINE 680 "./src-ag/Order.ag" #-}+ []+ {-# LINE 628 "dist/build/Order.hs"#-}+ {-# INLINE rule50 #-}+ rule50 = \ (_ :: ()) ->+ []+ {-# INLINE rule51 #-}+ rule51 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule52 #-}+ rule52 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule53 #-}+ rule53 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule54 #-}+ rule54 = \ (_ :: ()) ->+ []+ {-# INLINE rule55 #-}+ rule55 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule56 #-}+ rule56 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule57 #-}+ rule57 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule58 #-}+ rule58 = \ (_ :: ()) ->+ []+ {-# INLINE rule59 #-}+ rule59 = \ (_ :: ()) ->+ []++-- Expression --------------------------------------------------+-- wrapper+data Inh_Expression = Inh_Expression { allfields_Inh_Expression :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Expression :: ([Identifier]), attrs_Inh_Expression :: ([(Identifier,Identifier)]), con_Inh_Expression :: (Identifier), mergeMap_Inh_Expression :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Expression :: (Identifier), options_Inh_Expression :: (Options) }+data Syn_Expression = Syn_Expression { allRhsVars_Syn_Expression :: (Set (Identifier,Identifier)), copy_Syn_Expression :: (Expression), errors_Syn_Expression :: (Seq Error), textLines_Syn_Expression :: ([String]), usedAttrs_Syn_Expression :: ([(Identifier,Identifier)]), usedFields_Syn_Expression :: ([Identifier]), usedLocals_Syn_Expression :: ([Identifier]) }+{-# INLINABLE wrap_Expression #-}+wrap_Expression :: T_Expression -> Inh_Expression -> (Syn_Expression )+wrap_Expression (T_Expression act) (Inh_Expression _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Expression_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions+ (T_Expression_vOut7 _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) <- return (inv_Expression_s8 sem arg)+ return (Syn_Expression _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals)+ )++-- cata+{-# INLINE sem_Expression #-}+sem_Expression :: Expression -> T_Expression +sem_Expression ( Expression pos_ tks_ ) = sem_Expression_Expression pos_ tks_++-- semantic domain+newtype T_Expression = T_Expression {+ attach_T_Expression :: Identity (T_Expression_s8 )+ }+newtype T_Expression_s8 = C_Expression_s8 {+ inv_Expression_s8 :: (T_Expression_v7 )+ }+data T_Expression_s9 = C_Expression_s9+type T_Expression_v7 = (T_Expression_vIn7 ) -> (T_Expression_vOut7 )+data T_Expression_vIn7 = T_Expression_vIn7 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Map Identifier (Identifier,[Identifier])) (Identifier) (Options)+data T_Expression_vOut7 = T_Expression_vOut7 (Set (Identifier,Identifier)) (Expression) (Seq Error) ([String]) ([(Identifier,Identifier)]) ([Identifier]) ([Identifier])+{-# NOINLINE sem_Expression_Expression #-}+sem_Expression_Expression :: (Pos) -> ([HsToken]) -> T_Expression +sem_Expression_Expression arg_pos_ arg_tks_ = T_Expression (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_Expression_v7 + v7 = \ (T_Expression_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions) -> ( let+ (_textLines,_usedAttrs,_usedLocals,_usedFields) = rule60 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions arg_tks_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule61 ()+ _lhsOallRhsVars :: Set (Identifier,Identifier)+ _lhsOallRhsVars = rule62 _usedAttrs _usedFields _usedLocals+ _copy = rule63 arg_pos_ arg_tks_+ _lhsOcopy :: Expression+ _lhsOcopy = rule64 _copy+ _lhsOtextLines :: [String]+ _lhsOtextLines = rule65 _textLines+ _lhsOusedAttrs :: [(Identifier,Identifier)]+ _lhsOusedAttrs = rule66 _usedAttrs+ _lhsOusedFields :: [Identifier]+ _lhsOusedFields = rule67 _usedFields+ _lhsOusedLocals :: [Identifier]+ _lhsOusedLocals = rule68 _usedLocals+ __result_ = T_Expression_vOut7 _lhsOallRhsVars _lhsOcopy _lhsOerrors _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals+ in __result_ )+ in C_Expression_s8 v7+ {-# INLINE rule60 #-}+ {-# LINE 469 "./src-ag/Order.ag" #-}+ rule60 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ((_lhsInt) :: Identifier) ((_lhsIoptions) :: Options) tks_ ->+ {-# LINE 469 "./src-ag/Order.ag" #-}+ let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ]+ attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs+ inherited = Inh_HsTokensRoot+ { attrs_Inh_HsTokensRoot = attrsIn+ , con_Inh_HsTokensRoot = _lhsIcon+ , allfields_Inh_HsTokensRoot = _lhsIallfields+ , allnts_Inh_HsTokensRoot = _lhsIallnts+ , nt_Inh_HsTokensRoot = _lhsInt+ , options_Inh_HsTokensRoot = _lhsIoptions+ }+ synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited+ in case synthesized of+ Syn_HsTokensRoot+ { textLines_Syn_HsTokensRoot = textLines+ , usedAttrs_Syn_HsTokensRoot = usedAttrs+ , usedLocals_Syn_HsTokensRoot = usedLocals+ , usedFields_Syn_HsTokensRoot = usedFields+ } -> let extraAttrs = [ (src,attr)+ | (fld,attr) <- usedAttrs, let mbMerged = Map.lookup fld _lhsImergeMap, isJust mbMerged+ , let (Just (_, srcs)) = mbMerged, src <- srcs ]+ usedAttrs' = usedAttrs ++ extraAttrs+ in (textLines,usedAttrs',usedLocals,usedFields)+ {-# LINE 742 "dist/build/Order.hs"#-}+ {-# INLINE rule61 #-}+ {-# LINE 492 "./src-ag/Order.ag" #-}+ rule61 = \ (_ :: ()) ->+ {-# LINE 492 "./src-ag/Order.ag" #-}+ Seq.empty+ {-# LINE 748 "dist/build/Order.hs"#-}+ {-# INLINE rule62 #-}+ {-# LINE 493 "./src-ag/Order.ag" #-}+ rule62 = \ _usedAttrs _usedFields _usedLocals ->+ {-# LINE 493 "./src-ag/Order.ag" #-}+ Set.fromList _usedAttrs+ `Set.union`+ Set.fromList [ (_LOC, l) | l <- _usedLocals ]+ `Set.union`+ Set.fromList [ (_FIELD, fld) | fld <- _usedFields ]+ {-# LINE 758 "dist/build/Order.hs"#-}+ {-# INLINE rule63 #-}+ rule63 = \ pos_ tks_ ->+ Expression pos_ tks_+ {-# INLINE rule64 #-}+ rule64 = \ _copy ->+ _copy+ {-# INLINE rule65 #-}+ rule65 = \ _textLines ->+ _textLines+ {-# INLINE rule66 #-}+ rule66 = \ _usedAttrs ->+ _usedAttrs+ {-# INLINE rule67 #-}+ rule67 = \ _usedFields ->+ _usedFields+ {-# INLINE rule68 #-}+ rule68 = \ _usedLocals ->+ _usedLocals++-- Grammar -----------------------------------------------------+-- wrapper+data Inh_Grammar = Inh_Grammar { options_Inh_Grammar :: (Options) }+data Syn_Grammar = Syn_Grammar { errors_Syn_Grammar :: (Seq Error), nAutoRules_Syn_Grammar :: (Int), nExplicitRules_Syn_Grammar :: (Int), output_Syn_Grammar :: (CGrammar) }+{-# INLINABLE wrap_Grammar #-}+wrap_Grammar :: T_Grammar -> Inh_Grammar -> (Syn_Grammar )+wrap_Grammar (T_Grammar act) (Inh_Grammar _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Grammar_vIn10 _lhsIoptions+ (T_Grammar_vOut10 _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput) <- return (inv_Grammar_s11 sem arg)+ return (Syn_Grammar _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput)+ )++-- cata+{-# INLINE sem_Grammar #-}+sem_Grammar :: Grammar -> T_Grammar +sem_Grammar ( Grammar typeSyns_ useMap_ derivings_ wrappers_ nonts_ pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_ ) = sem_Grammar_Grammar typeSyns_ useMap_ derivings_ wrappers_ ( sem_Nonterminals nonts_ ) pragmas_ manualAttrOrderMap_ paramMap_ contextMap_ quantMap_ uniqueMap_ augmentsMap_ aroundsMap_ mergeMap_++-- semantic domain+newtype T_Grammar = T_Grammar {+ attach_T_Grammar :: Identity (T_Grammar_s11 )+ }+newtype T_Grammar_s11 = C_Grammar_s11 {+ inv_Grammar_s11 :: (T_Grammar_v10 )+ }+data T_Grammar_s12 = C_Grammar_s12+type T_Grammar_v10 = (T_Grammar_vIn10 ) -> (T_Grammar_vOut10 )+data T_Grammar_vIn10 = T_Grammar_vIn10 (Options)+data T_Grammar_vOut10 = T_Grammar_vOut10 (Seq Error) (Int) (Int) (CGrammar)+{-# 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 arg_typeSyns_ _ arg_derivings_ arg_wrappers_ arg_nonts_ arg_pragmas_ arg_manualAttrOrderMap_ arg_paramMap_ arg_contextMap_ arg_quantMap_ _ _ arg_aroundsMap_ arg_mergeMap_ = T_Grammar (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_Grammar_v10 + v10 = \ (T_Grammar_vIn10 _lhsIoptions) -> ( let+ _nontsX17 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_nonts_))+ (T_Nonterminals_vOut16 _nontsIacount _nontsIadditionalDep _nontsIaranges _nontsIaroundDep _nontsIcNonterminals _nontsIdirectDep _nontsIerrors _nontsIinhMap' _nontsIinstDep _nontsImergeDep _nontsInAutoRules _nontsInExplicitRules _nontsInonts _nontsIntattrs _nontsIrules _nontsIsynMap' _nontsIvcount) = inv_Nonterminals_s17 _nontsX17 (T_Nonterminals_vIn16 _nontsOacount _nontsOallnts _nontsOaroundMap _nontsOcInterfaceMap _nontsOcVisitsMap _nontsOinhMap _nontsOmanualAttrDepMap _nontsOmergeMap _nontsOo_case _nontsOo_cata _nontsOo_data _nontsOo_dovisit _nontsOo_newtypes _nontsOo_rename _nontsOo_sem _nontsOo_sig _nontsOo_unbox _nontsOo_wantvisit _nontsOoptions _nontsOprefix _nontsOsynMap _nontsOvcount)+ _nontsOinhMap = rule69 _nontsIinhMap'+ _nontsOsynMap = rule70 _nontsIsynMap'+ _o_dovisit = rule71 _cyclesErrors _lhsIoptions+ _nontsOo_cata = rule72 _lhsIoptions+ _nontsOo_data = rule73 _lhsIoptions+ _nontsOo_sig = rule74 _lhsIoptions+ _nontsOo_sem = rule75 _lhsIoptions+ _nontsOo_rename = rule76 _lhsIoptions+ _nontsOo_newtypes = rule77 _lhsIoptions+ _nontsOo_wantvisit = rule78 _lhsIoptions+ _nontsOo_unbox = rule79 _lhsIoptions+ _nontsOo_case = rule80 _lhsIoptions+ _nontsOprefix = rule81 _lhsIoptions+ _nontsOvcount = rule82 ()+ _nontsOmanualAttrDepMap = rule83 arg_manualAttrOrderMap_+ _nontsOaroundMap = rule84 arg_aroundsMap_+ _nontsOacount = rule85 ()+ _ruleTable = rule86 _nontsIrules _nontsIvcount+ _attrTable = rule87 _nontsIacount _nontsIntattrs+ _attrVertex = rule88 _nontsIntattrs+ _tdpToTds = rule89 _attrVertex _nontsIrules+ _tdsToTdp = rule90 _tdpToTds+ _directDep = rule91 _nontsIadditionalDep _nontsIdirectDep+ _instDep = rule92 _nontsIinstDep+ _aroundDep = rule93 _nontsIaroundDep+ _mergeDep = rule94 _nontsImergeDep+ _info = rule95 _attrTable _nontsIacount _nontsIaranges _nontsInonts _nontsIvcount _ruleTable _tdpToTds _tdsToTdp arg_wrappers_+ (_cInterfaceMap,_cVisitsMap,_cyclesErrors) = rule96 _aroundDep _attrTable _directDep _info _instDep _lhsIoptions _mergeDep _ruleTable+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule97 _cyclesErrors _lhsIoptions _nontsIerrors+ _lhsOoutput :: CGrammar+ _lhsOoutput = rule98 _aroundMap _mergeMap _nontsIcNonterminals _o_dovisit arg_contextMap_ arg_derivings_ arg_paramMap_ arg_pragmas_ arg_quantMap_ arg_typeSyns_ arg_wrappers_+ _aroundMap = rule99 arg_aroundsMap_+ _mergeMap = rule100 arg_mergeMap_+ _nontsOallnts = rule101 _nontsInonts+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule102 _nontsInAutoRules+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule103 _nontsInExplicitRules+ _nontsOcInterfaceMap = rule104 _cInterfaceMap+ _nontsOcVisitsMap = rule105 _cVisitsMap+ _nontsOmergeMap = rule106 _mergeMap+ _nontsOo_dovisit = rule107 _o_dovisit+ _nontsOoptions = rule108 _lhsIoptions+ __result_ = T_Grammar_vOut10 _lhsOerrors _lhsOnAutoRules _lhsOnExplicitRules _lhsOoutput+ in __result_ )+ in C_Grammar_s11 v10+ {-# INLINE rule69 #-}+ {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}+ rule69 = \ ((_nontsIinhMap') :: Map Identifier Attributes) ->+ {-# LINE 15 "./src-ag/DistChildAttr.ag" #-}+ _nontsIinhMap'+ {-# LINE 869 "dist/build/Order.hs"#-}+ {-# INLINE rule70 #-}+ {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}+ rule70 = \ ((_nontsIsynMap') :: Map Identifier Attributes) ->+ {-# LINE 16 "./src-ag/DistChildAttr.ag" #-}+ _nontsIsynMap'+ {-# LINE 875 "dist/build/Order.hs"#-}+ {-# INLINE rule71 #-}+ {-# LINE 123 "./src-ag/Order.ag" #-}+ rule71 = \ _cyclesErrors ((_lhsIoptions) :: Options) ->+ {-# LINE 123 "./src-ag/Order.ag" #-}+ visit _lhsIoptions && null _cyclesErrors+ {-# LINE 881 "dist/build/Order.hs"#-}+ {-# INLINE rule72 #-}+ {-# LINE 124 "./src-ag/Order.ag" #-}+ rule72 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 124 "./src-ag/Order.ag" #-}+ folds _lhsIoptions+ {-# LINE 887 "dist/build/Order.hs"#-}+ {-# INLINE rule73 #-}+ {-# LINE 125 "./src-ag/Order.ag" #-}+ rule73 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 125 "./src-ag/Order.ag" #-}+ dataTypes _lhsIoptions+ {-# LINE 893 "dist/build/Order.hs"#-}+ {-# INLINE rule74 #-}+ {-# LINE 126 "./src-ag/Order.ag" #-}+ rule74 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 126 "./src-ag/Order.ag" #-}+ typeSigs _lhsIoptions+ {-# LINE 899 "dist/build/Order.hs"#-}+ {-# INLINE rule75 #-}+ {-# LINE 127 "./src-ag/Order.ag" #-}+ rule75 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 127 "./src-ag/Order.ag" #-}+ semfuns _lhsIoptions+ {-# LINE 905 "dist/build/Order.hs"#-}+ {-# INLINE rule76 #-}+ {-# LINE 128 "./src-ag/Order.ag" #-}+ rule76 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 128 "./src-ag/Order.ag" #-}+ rename _lhsIoptions+ {-# LINE 911 "dist/build/Order.hs"#-}+ {-# INLINE rule77 #-}+ {-# LINE 129 "./src-ag/Order.ag" #-}+ rule77 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 129 "./src-ag/Order.ag" #-}+ newtypes _lhsIoptions+ {-# LINE 917 "dist/build/Order.hs"#-}+ {-# INLINE rule78 #-}+ {-# LINE 130 "./src-ag/Order.ag" #-}+ rule78 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 130 "./src-ag/Order.ag" #-}+ visit _lhsIoptions+ {-# LINE 923 "dist/build/Order.hs"#-}+ {-# INLINE rule79 #-}+ {-# LINE 131 "./src-ag/Order.ag" #-}+ rule79 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 131 "./src-ag/Order.ag" #-}+ unbox _lhsIoptions+ {-# LINE 929 "dist/build/Order.hs"#-}+ {-# INLINE rule80 #-}+ {-# LINE 132 "./src-ag/Order.ag" #-}+ rule80 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 132 "./src-ag/Order.ag" #-}+ cases _lhsIoptions+ {-# LINE 935 "dist/build/Order.hs"#-}+ {-# INLINE rule81 #-}+ {-# LINE 133 "./src-ag/Order.ag" #-}+ rule81 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 133 "./src-ag/Order.ag" #-}+ prefix _lhsIoptions+ {-# LINE 941 "dist/build/Order.hs"#-}+ {-# INLINE rule82 #-}+ {-# LINE 262 "./src-ag/Order.ag" #-}+ rule82 = \ (_ :: ()) ->+ {-# LINE 262 "./src-ag/Order.ag" #-}+ 0+ {-# LINE 947 "dist/build/Order.hs"#-}+ {-# INLINE rule83 #-}+ {-# LINE 288 "./src-ag/Order.ag" #-}+ rule83 = \ manualAttrOrderMap_ ->+ {-# LINE 288 "./src-ag/Order.ag" #-}+ manualAttrOrderMap_+ {-# LINE 953 "dist/build/Order.hs"#-}+ {-# INLINE rule84 #-}+ {-# LINE 417 "./src-ag/Order.ag" #-}+ rule84 = \ aroundsMap_ ->+ {-# LINE 417 "./src-ag/Order.ag" #-}+ aroundsMap_+ {-# LINE 959 "dist/build/Order.hs"#-}+ {-# INLINE rule85 #-}+ {-# LINE 508 "./src-ag/Order.ag" #-}+ rule85 = \ (_ :: ()) ->+ {-# LINE 508 "./src-ag/Order.ag" #-}+ 0+ {-# LINE 965 "dist/build/Order.hs"#-}+ {-# INLINE rule86 #-}+ {-# LINE 546 "./src-ag/Order.ag" #-}+ rule86 = \ ((_nontsIrules) :: Seq (Vertex,CRule)) ((_nontsIvcount) :: Int) ->+ {-# LINE 546 "./src-ag/Order.ag" #-}+ Array.array (0,_nontsIvcount-1) (toList _nontsIrules)+ {-# LINE 971 "dist/build/Order.hs"#-}+ {-# INLINE rule87 #-}+ {-# LINE 547 "./src-ag/Order.ag" #-}+ rule87 = \ ((_nontsIacount) :: Int) ((_nontsIntattrs) :: Seq (Vertex,NTAttr)) ->+ {-# LINE 547 "./src-ag/Order.ag" #-}+ Array.array (0,_nontsIacount-1) (toList _nontsIntattrs)+ {-# LINE 977 "dist/build/Order.hs"#-}+ {-# INLINE rule88 #-}+ {-# LINE 548 "./src-ag/Order.ag" #-}+ rule88 = \ ((_nontsIntattrs) :: Seq (Vertex,NTAttr)) ->+ {-# LINE 548 "./src-ag/Order.ag" #-}+ Map.fromList (map swap (toList _nontsIntattrs))+ {-# LINE 983 "dist/build/Order.hs"#-}+ {-# INLINE rule89 #-}+ {-# LINE 549 "./src-ag/Order.ag" #-}+ rule89 = \ _attrVertex ((_nontsIrules) :: Seq (Vertex,CRule)) ->+ {-# LINE 549 "./src-ag/Order.ag" #-}+ [ (s, maybe (-1) (\v -> findWithErr1 "Grammar.tdpToTds" v _attrVertex) (ntattr cr))+ | (s,cr) <- toList _nontsIrules]+ {-# LINE 990 "dist/build/Order.hs"#-}+ {-# INLINE rule90 #-}+ {-# LINE 551 "./src-ag/Order.ag" #-}+ rule90 = \ _tdpToTds ->+ {-# LINE 551 "./src-ag/Order.ag" #-}+ let eq (_,v) (_,v') = v == v'+ conv ((s,v):svs) | v == -1 = Nothing+ | otherwise = Just (v,s:map fst svs)+ in mapMaybe conv (eqClasses eq _tdpToTds)+ {-# LINE 999 "dist/build/Order.hs"#-}+ {-# INLINE rule91 #-}+ {-# LINE 555 "./src-ag/Order.ag" #-}+ rule91 = \ ((_nontsIadditionalDep) :: Seq Edge) ((_nontsIdirectDep) :: Seq Edge) ->+ {-# LINE 555 "./src-ag/Order.ag" #-}+ toList (_nontsIdirectDep Seq.>< _nontsIadditionalDep)+ {-# LINE 1005 "dist/build/Order.hs"#-}+ {-# INLINE rule92 #-}+ {-# LINE 556 "./src-ag/Order.ag" #-}+ rule92 = \ ((_nontsIinstDep) :: Seq Edge) ->+ {-# LINE 556 "./src-ag/Order.ag" #-}+ toList _nontsIinstDep+ {-# LINE 1011 "dist/build/Order.hs"#-}+ {-# INLINE rule93 #-}+ {-# LINE 557 "./src-ag/Order.ag" #-}+ rule93 = \ ((_nontsIaroundDep) :: Seq Edge) ->+ {-# LINE 557 "./src-ag/Order.ag" #-}+ toList _nontsIaroundDep+ {-# LINE 1017 "dist/build/Order.hs"#-}+ {-# INLINE rule94 #-}+ {-# LINE 558 "./src-ag/Order.ag" #-}+ rule94 = \ ((_nontsImergeDep) :: Seq Edge) ->+ {-# LINE 558 "./src-ag/Order.ag" #-}+ toList _nontsImergeDep+ {-# LINE 1023 "dist/build/Order.hs"#-}+ {-# INLINE rule95 #-}+ {-# LINE 559 "./src-ag/Order.ag" #-}+ rule95 = \ _attrTable ((_nontsIacount) :: Int) ((_nontsIaranges) :: Seq (Int,Int,Int)) ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ((_nontsIvcount) :: Int) _ruleTable _tdpToTds _tdsToTdp wrappers_ ->+ {-# LINE 559 "./src-ag/Order.ag" #-}+ let def [] = -1+ def (v:vs) = v+ in Info { tdsToTdp = Array.array (0,_nontsIacount-1) _tdsToTdp+ , tdpToTds = Array.array (0,_nontsIvcount-1) _tdpToTds+ , attrTable = _attrTable+ , ruleTable = _ruleTable+ , lmh = toList _nontsIaranges+ , nonts = _nontsInonts+ , wraps = wrappers_+ }+ {-# LINE 1038 "dist/build/Order.hs"#-}+ {-# INLINE rule96 #-}+ {-# LINE 571 "./src-ag/Order.ag" #-}+ rule96 = \ _aroundDep _attrTable _directDep _info _instDep ((_lhsIoptions) :: Options) _mergeDep _ruleTable ->+ {-# LINE 571 "./src-ag/Order.ag" #-}+ case computeSequential _info _directDep (_instDep ++ _aroundDep ++ _mergeDep ) of+ CycleFree cim cvm -> ( cim+ , cvm+ , []+ )+ LocalCycle errs -> ( error "No interfaces for AG with local cycles"+ , error "No visit sub-sequences for AG with local cycles"+ , map (localCycleErr _ruleTable (visit _lhsIoptions)) errs+ )+ InstCycle errs -> ( error "No interfaces for AG with cycles through insts"+ , error "No visit sub-sequences for AG with cycles through insts"+ , map (instCycleErr _ruleTable (visit _lhsIoptions)) errs+ )+ DirectCycle errs -> ( error "No interfaces for AG with direct cycles"+ , error "No visit sub-sequences for AG with direct cycles"+ , directCycleErrs _attrTable _ruleTable (visit _lhsIoptions) errs+ )+ InducedCycle cim errs -> ( cim+ , error "No visit sub-sequences for AG with induced cycles"+ , inducedCycleErrs _attrTable _ruleTable cim errs+ )+ {-# LINE 1064 "dist/build/Order.hs"#-}+ {-# INLINE rule97 #-}+ {-# LINE 592 "./src-ag/Order.ag" #-}+ rule97 = \ _cyclesErrors ((_lhsIoptions) :: Options) ((_nontsIerrors) :: Seq Error) ->+ {-# LINE 592 "./src-ag/Order.ag" #-}+ (if withCycle _lhsIoptions then Seq.fromList _cyclesErrors else Seq.empty)+ Seq.>< _nontsIerrors+ {-# LINE 1071 "dist/build/Order.hs"#-}+ {-# INLINE rule98 #-}+ {-# LINE 624 "./src-ag/Order.ag" #-}+ rule98 = \ _aroundMap _mergeMap ((_nontsIcNonterminals) :: CNonterminals) _o_dovisit contextMap_ derivings_ paramMap_ pragmas_ quantMap_ typeSyns_ wrappers_ ->+ {-# LINE 624 "./src-ag/Order.ag" #-}+ CGrammar typeSyns_ derivings_ wrappers_ _nontsIcNonterminals pragmas_ paramMap_ contextMap_ quantMap_ _aroundMap _mergeMap _o_dovisit+ {-# LINE 1077 "dist/build/Order.hs"#-}+ {-# INLINE rule99 #-}+ {-# LINE 637 "./src-ag/Order.ag" #-}+ rule99 = \ aroundsMap_ ->+ {-# LINE 637 "./src-ag/Order.ag" #-}+ Map.map (Map.map Map.keysSet) aroundsMap_+ {-# LINE 1083 "dist/build/Order.hs"#-}+ {-# INLINE rule100 #-}+ {-# LINE 638 "./src-ag/Order.ag" #-}+ rule100 = \ mergeMap_ ->+ {-# LINE 638 "./src-ag/Order.ag" #-}+ Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_+ {-# LINE 1089 "dist/build/Order.hs"#-}+ {-# INLINE rule101 #-}+ {-# LINE 655 "./src-ag/Order.ag" #-}+ rule101 = \ ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ->+ {-# LINE 655 "./src-ag/Order.ag" #-}+ map fst (_nontsInonts)+ {-# LINE 1095 "dist/build/Order.hs"#-}+ {-# INLINE rule102 #-}+ rule102 = \ ((_nontsInAutoRules) :: Int) ->+ _nontsInAutoRules+ {-# INLINE rule103 #-}+ rule103 = \ ((_nontsInExplicitRules) :: Int) ->+ _nontsInExplicitRules+ {-# INLINE rule104 #-}+ rule104 = \ _cInterfaceMap ->+ _cInterfaceMap+ {-# INLINE rule105 #-}+ rule105 = \ _cVisitsMap ->+ _cVisitsMap+ {-# INLINE rule106 #-}+ rule106 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule107 #-}+ rule107 = \ _o_dovisit ->+ _o_dovisit+ {-# INLINE rule108 #-}+ rule108 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Nonterminal -------------------------------------------------+-- wrapper+data Inh_Nonterminal = Inh_Nonterminal { acount_Inh_Nonterminal :: (Int), allnts_Inh_Nonterminal :: ([Identifier]), aroundMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), cInterfaceMap_Inh_Nonterminal :: (CInterfaceMap), cVisitsMap_Inh_Nonterminal :: (CVisitsMap), inhMap_Inh_Nonterminal :: (Map Identifier Attributes), manualAttrDepMap_Inh_Nonterminal :: (AttrOrderMap), mergeMap_Inh_Nonterminal :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), o_case_Inh_Nonterminal :: (Bool), o_cata_Inh_Nonterminal :: (Bool), o_data_Inh_Nonterminal :: (Bool), o_dovisit_Inh_Nonterminal :: (Bool), o_newtypes_Inh_Nonterminal :: (Bool), o_rename_Inh_Nonterminal :: (Bool), o_sem_Inh_Nonterminal :: (Bool), o_sig_Inh_Nonterminal :: (Bool), o_unbox_Inh_Nonterminal :: (Bool), o_wantvisit_Inh_Nonterminal :: (Bool), options_Inh_Nonterminal :: (Options), prefix_Inh_Nonterminal :: (String), synMap_Inh_Nonterminal :: (Map Identifier Attributes), vcount_Inh_Nonterminal :: (Int) }+data Syn_Nonterminal = Syn_Nonterminal { acount_Syn_Nonterminal :: (Int), additionalDep_Syn_Nonterminal :: (Seq Edge), aranges_Syn_Nonterminal :: (Seq (Int,Int,Int)), aroundDep_Syn_Nonterminal :: (Seq Edge), cNonterminal_Syn_Nonterminal :: (CNonterminal), directDep_Syn_Nonterminal :: (Seq Edge), errors_Syn_Nonterminal :: (Seq Error), inhMap'_Syn_Nonterminal :: (Map Identifier Attributes), instDep_Syn_Nonterminal :: (Seq Edge), mergeDep_Syn_Nonterminal :: (Seq Edge), nAutoRules_Syn_Nonterminal :: (Int), nExplicitRules_Syn_Nonterminal :: (Int), nonts_Syn_Nonterminal :: ([(NontermIdent,[ConstructorIdent])]), ntattrs_Syn_Nonterminal :: (Seq (Vertex,NTAttr)), rules_Syn_Nonterminal :: (Seq (Vertex,CRule)), synMap'_Syn_Nonterminal :: (Map Identifier Attributes), vcount_Syn_Nonterminal :: (Int) }+{-# INLINABLE wrap_Nonterminal #-}+wrap_Nonterminal :: T_Nonterminal -> Inh_Nonterminal -> (Syn_Nonterminal )+wrap_Nonterminal (T_Nonterminal act) (Inh_Nonterminal _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Nonterminal_vIn13 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount+ (T_Nonterminal_vOut13 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount) <- return (inv_Nonterminal_s14 sem arg)+ return (Syn_Nonterminal _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount)+ )++-- cata+{-# INLINE sem_Nonterminal #-}+sem_Nonterminal :: Nonterminal -> T_Nonterminal +sem_Nonterminal ( Nonterminal nt_ params_ inh_ syn_ prods_ ) = sem_Nonterminal_Nonterminal nt_ params_ inh_ syn_ ( sem_Productions prods_ )++-- semantic domain+newtype T_Nonterminal = T_Nonterminal {+ attach_T_Nonterminal :: Identity (T_Nonterminal_s14 )+ }+newtype T_Nonterminal_s14 = C_Nonterminal_s14 {+ inv_Nonterminal_s14 :: (T_Nonterminal_v13 )+ }+data T_Nonterminal_s15 = C_Nonterminal_s15+type T_Nonterminal_v13 = (T_Nonterminal_vIn13 ) -> (T_Nonterminal_vOut13 )+data T_Nonterminal_vIn13 = T_Nonterminal_vIn13 (Int) ([Identifier]) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (CInterfaceMap) (CVisitsMap) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Map Identifier Attributes) (Int)+data T_Nonterminal_vOut13 = T_Nonterminal_vOut13 (Int) (Seq Edge) (Seq (Int,Int,Int)) (Seq Edge) (CNonterminal) (Seq Edge) (Seq Error) (Map Identifier Attributes) (Seq Edge) (Seq Edge) (Int) (Int) ([(NontermIdent,[ConstructorIdent])]) (Seq (Vertex,NTAttr)) (Seq (Vertex,CRule)) (Map Identifier Attributes) (Int)+{-# NOINLINE sem_Nonterminal_Nonterminal #-}+sem_Nonterminal_Nonterminal :: (NontermIdent) -> ([Identifier]) -> (Attributes) -> (Attributes) -> T_Productions -> T_Nonterminal +sem_Nonterminal_Nonterminal arg_nt_ arg_params_ arg_inh_ arg_syn_ arg_prods_ = T_Nonterminal (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_Nonterminal_v13 + v13 = \ (T_Nonterminal_vIn13 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount) -> ( let+ _prodsX29 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_prods_))+ (T_Productions_vOut28 _prodsIadditionalDep _prodsIaroundDep _prodsIcProductions _prodsIcons _prodsIdirectDep _prodsIerrors _prodsIinstDep _prodsImergeDep _prodsInAutoRules _prodsInExplicitRules _prodsIrules _prodsIvcount) = inv_Productions_s29 _prodsX29 (T_Productions_vIn28 _prodsOallnts _prodsOaroundMap _prodsOcVisitsMap _prodsOinh _prodsOinhMap _prodsOmanualAttrDepMap _prodsOmergeMap _prodsOnt _prodsOo_case _prodsOo_cata _prodsOo_dovisit _prodsOo_newtypes _prodsOo_rename _prodsOo_sem _prodsOo_sig _prodsOo_unbox _prodsOo_wantvisit _prodsOoptions _prodsOprefix _prodsOsyn _prodsOsynMap _prodsOvcount)+ _lhsOinhMap' :: Map Identifier Attributes+ _lhsOinhMap' = rule109 arg_inh_ arg_nt_+ _lhsOsynMap' :: Map Identifier Attributes+ _lhsOsynMap' = rule110 arg_nt_ arg_syn_+ _prodsOnt = rule111 arg_nt_+ _prodsOinh = rule112 arg_inh_+ _prodsOsyn = rule113 arg_syn_+ _mergeMap = rule114 _lhsImergeMap arg_nt_+ _aroundMap = rule115 _lhsIaroundMap arg_nt_+ _ntattrs = rule116 arg_inh_ arg_nt_ arg_syn_+ _lhsOntattrs :: Seq (Vertex,NTAttr)+ _lhsOntattrs = rule117 _lhsIacount _ntattrs+ _lhsOacount :: Int+ _lhsOacount = rule118 _lhsIacount arg_inh_ arg_syn_+ _lhsOaranges :: Seq (Int,Int,Int)+ _lhsOaranges = rule119 _lhsIacount arg_inh_ arg_syn_+ _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]+ _lhsOnonts = rule120 _prodsIcons arg_nt_+ _cInter = rule121 _lhsIcInterfaceMap _lhsIo_dovisit arg_inh_ arg_nt_ arg_syn_+ _lhsOcNonterminal :: CNonterminal+ _lhsOcNonterminal = rule122 _cInter _prodsIcProductions arg_inh_ arg_nt_ arg_params_ arg_syn_+ _lhsOadditionalDep :: Seq Edge+ _lhsOadditionalDep = rule123 _prodsIadditionalDep+ _lhsOaroundDep :: Seq Edge+ _lhsOaroundDep = rule124 _prodsIaroundDep+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule125 _prodsIdirectDep+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule126 _prodsIerrors+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule127 _prodsIinstDep+ _lhsOmergeDep :: Seq Edge+ _lhsOmergeDep = rule128 _prodsImergeDep+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule129 _prodsInAutoRules+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule130 _prodsInExplicitRules+ _lhsOrules :: Seq (Vertex,CRule)+ _lhsOrules = rule131 _prodsIrules+ _lhsOvcount :: Int+ _lhsOvcount = rule132 _prodsIvcount+ _prodsOallnts = rule133 _lhsIallnts+ _prodsOaroundMap = rule134 _aroundMap+ _prodsOcVisitsMap = rule135 _lhsIcVisitsMap+ _prodsOinhMap = rule136 _lhsIinhMap+ _prodsOmanualAttrDepMap = rule137 _lhsImanualAttrDepMap+ _prodsOmergeMap = rule138 _mergeMap+ _prodsOo_case = rule139 _lhsIo_case+ _prodsOo_cata = rule140 _lhsIo_cata+ _prodsOo_dovisit = rule141 _lhsIo_dovisit+ _prodsOo_newtypes = rule142 _lhsIo_newtypes+ _prodsOo_rename = rule143 _lhsIo_rename+ _prodsOo_sem = rule144 _lhsIo_sem+ _prodsOo_sig = rule145 _lhsIo_sig+ _prodsOo_unbox = rule146 _lhsIo_unbox+ _prodsOo_wantvisit = rule147 _lhsIo_wantvisit+ _prodsOoptions = rule148 _lhsIoptions+ _prodsOprefix = rule149 _lhsIprefix+ _prodsOsynMap = rule150 _lhsIsynMap+ _prodsOvcount = rule151 _lhsIvcount+ __result_ = T_Nonterminal_vOut13 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminal _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount+ in __result_ )+ in C_Nonterminal_s14 v13+ {-# INLINE rule109 #-}+ {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}+ rule109 = \ inh_ nt_ ->+ {-# LINE 7 "./src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ inh_+ {-# LINE 1225 "dist/build/Order.hs"#-}+ {-# INLINE rule110 #-}+ {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}+ rule110 = \ nt_ syn_ ->+ {-# LINE 8 "./src-ag/DistChildAttr.ag" #-}+ Map.singleton nt_ syn_+ {-# LINE 1231 "dist/build/Order.hs"#-}+ {-# INLINE rule111 #-}+ {-# LINE 97 "./src-ag/Order.ag" #-}+ rule111 = \ nt_ ->+ {-# LINE 97 "./src-ag/Order.ag" #-}+ nt_+ {-# LINE 1237 "dist/build/Order.hs"#-}+ {-# INLINE rule112 #-}+ {-# LINE 100 "./src-ag/Order.ag" #-}+ rule112 = \ inh_ ->+ {-# LINE 100 "./src-ag/Order.ag" #-}+ inh_+ {-# LINE 1243 "dist/build/Order.hs"#-}+ {-# INLINE rule113 #-}+ {-# LINE 101 "./src-ag/Order.ag" #-}+ rule113 = \ syn_ ->+ {-# LINE 101 "./src-ag/Order.ag" #-}+ syn_+ {-# LINE 1249 "dist/build/Order.hs"#-}+ {-# INLINE rule114 #-}+ {-# LINE 360 "./src-ag/Order.ag" #-}+ rule114 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) nt_ ->+ {-# LINE 360 "./src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsImergeMap+ {-# LINE 1255 "dist/build/Order.hs"#-}+ {-# INLINE rule115 #-}+ {-# LINE 413 "./src-ag/Order.ag" #-}+ rule115 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) nt_ ->+ {-# LINE 413 "./src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty nt_ _lhsIaroundMap+ {-# LINE 1261 "dist/build/Order.hs"#-}+ {-# INLINE rule116 #-}+ {-# LINE 511 "./src-ag/Order.ag" #-}+ rule116 = \ inh_ nt_ syn_ ->+ {-# LINE 511 "./src-ag/Order.ag" #-}+ [ NTAInh nt_ inh tp | (inh,tp) <- Map.assocs inh_ ]+ ++ [NTASyn nt_ syn tp | (syn,tp) <- Map.assocs syn_ ]+ {-# LINE 1268 "dist/build/Order.hs"#-}+ {-# INLINE rule117 #-}+ {-# LINE 513 "./src-ag/Order.ag" #-}+ rule117 = \ ((_lhsIacount) :: Int) _ntattrs ->+ {-# LINE 513 "./src-ag/Order.ag" #-}+ Seq.fromList (zip [_lhsIacount ..] _ntattrs)+ {-# LINE 1274 "dist/build/Order.hs"#-}+ {-# INLINE rule118 #-}+ {-# LINE 514 "./src-ag/Order.ag" #-}+ rule118 = \ ((_lhsIacount) :: Int) inh_ syn_ ->+ {-# LINE 514 "./src-ag/Order.ag" #-}+ _lhsIacount + Map.size inh_ + Map.size syn_+ {-# LINE 1280 "dist/build/Order.hs"#-}+ {-# INLINE rule119 #-}+ {-# LINE 515 "./src-ag/Order.ag" #-}+ rule119 = \ ((_lhsIacount) :: Int) inh_ syn_ ->+ {-# LINE 515 "./src-ag/Order.ag" #-}+ Seq.singleton+ (_lhsIacount+ ,_lhsIacount + Map.size inh_+ ,_lhsIacount + Map.size syn_ + Map.size inh_ - 1)+ {-# LINE 1289 "dist/build/Order.hs"#-}+ {-# INLINE rule120 #-}+ {-# LINE 524 "./src-ag/Order.ag" #-}+ rule120 = \ ((_prodsIcons) :: [ConstructorIdent]) nt_ ->+ {-# LINE 524 "./src-ag/Order.ag" #-}+ [(nt_,_prodsIcons)]+ {-# LINE 1295 "dist/build/Order.hs"#-}+ {-# INLINE rule121 #-}+ {-# LINE 601 "./src-ag/Order.ag" #-}+ rule121 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ((_lhsIo_dovisit) :: Bool) inh_ nt_ syn_ ->+ {-# LINE 601 "./src-ag/Order.ag" #-}+ if _lhsIo_dovisit+ then findWithErr1 "Nonterminal.cInter" nt_ _lhsIcInterfaceMap+ else CInterface [CSegment inh_ syn_]+ {-# LINE 1303 "dist/build/Order.hs"#-}+ {-# INLINE rule122 #-}+ {-# LINE 629 "./src-ag/Order.ag" #-}+ rule122 = \ _cInter ((_prodsIcProductions) :: CProductions) inh_ nt_ params_ syn_ ->+ {-# LINE 629 "./src-ag/Order.ag" #-}+ CNonterminal nt_ params_ inh_ syn_ _prodsIcProductions _cInter+ {-# LINE 1309 "dist/build/Order.hs"#-}+ {-# INLINE rule123 #-}+ rule123 = \ ((_prodsIadditionalDep) :: Seq Edge) ->+ _prodsIadditionalDep+ {-# INLINE rule124 #-}+ rule124 = \ ((_prodsIaroundDep) :: Seq Edge) ->+ _prodsIaroundDep+ {-# INLINE rule125 #-}+ rule125 = \ ((_prodsIdirectDep) :: Seq Edge) ->+ _prodsIdirectDep+ {-# INLINE rule126 #-}+ rule126 = \ ((_prodsIerrors) :: Seq Error) ->+ _prodsIerrors+ {-# INLINE rule127 #-}+ rule127 = \ ((_prodsIinstDep) :: Seq Edge) ->+ _prodsIinstDep+ {-# INLINE rule128 #-}+ rule128 = \ ((_prodsImergeDep) :: Seq Edge) ->+ _prodsImergeDep+ {-# INLINE rule129 #-}+ rule129 = \ ((_prodsInAutoRules) :: Int) ->+ _prodsInAutoRules+ {-# INLINE rule130 #-}+ rule130 = \ ((_prodsInExplicitRules) :: Int) ->+ _prodsInExplicitRules+ {-# INLINE rule131 #-}+ rule131 = \ ((_prodsIrules) :: Seq (Vertex,CRule)) ->+ _prodsIrules+ {-# INLINE rule132 #-}+ rule132 = \ ((_prodsIvcount) :: Int) ->+ _prodsIvcount+ {-# INLINE rule133 #-}+ rule133 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule134 #-}+ rule134 = \ _aroundMap ->+ _aroundMap+ {-# INLINE rule135 #-}+ rule135 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->+ _lhsIcVisitsMap+ {-# INLINE rule136 #-}+ rule136 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule137 #-}+ rule137 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->+ _lhsImanualAttrDepMap+ {-# INLINE rule138 #-}+ rule138 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule139 #-}+ rule139 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule140 #-}+ rule140 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule141 #-}+ rule141 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule142 #-}+ rule142 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule143 #-}+ rule143 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule144 #-}+ rule144 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule145 #-}+ rule145 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule146 #-}+ rule146 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule147 #-}+ rule147 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule148 #-}+ rule148 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule149 #-}+ rule149 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule150 #-}+ rule150 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule151 #-}+ rule151 = \ ((_lhsIvcount) :: Int) ->+ _lhsIvcount++-- Nonterminals ------------------------------------------------+-- wrapper+data Inh_Nonterminals = Inh_Nonterminals { acount_Inh_Nonterminals :: (Int), allnts_Inh_Nonterminals :: ([Identifier]), aroundMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))), cInterfaceMap_Inh_Nonterminals :: (CInterfaceMap), cVisitsMap_Inh_Nonterminals :: (CVisitsMap), inhMap_Inh_Nonterminals :: (Map Identifier Attributes), manualAttrDepMap_Inh_Nonterminals :: (AttrOrderMap), mergeMap_Inh_Nonterminals :: (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))), o_case_Inh_Nonterminals :: (Bool), o_cata_Inh_Nonterminals :: (Bool), o_data_Inh_Nonterminals :: (Bool), o_dovisit_Inh_Nonterminals :: (Bool), o_newtypes_Inh_Nonterminals :: (Bool), o_rename_Inh_Nonterminals :: (Bool), o_sem_Inh_Nonterminals :: (Bool), o_sig_Inh_Nonterminals :: (Bool), o_unbox_Inh_Nonterminals :: (Bool), o_wantvisit_Inh_Nonterminals :: (Bool), options_Inh_Nonterminals :: (Options), prefix_Inh_Nonterminals :: (String), synMap_Inh_Nonterminals :: (Map Identifier Attributes), vcount_Inh_Nonterminals :: (Int) }+data Syn_Nonterminals = Syn_Nonterminals { acount_Syn_Nonterminals :: (Int), additionalDep_Syn_Nonterminals :: (Seq Edge), aranges_Syn_Nonterminals :: (Seq (Int,Int,Int)), aroundDep_Syn_Nonterminals :: (Seq Edge), cNonterminals_Syn_Nonterminals :: (CNonterminals), directDep_Syn_Nonterminals :: (Seq Edge), errors_Syn_Nonterminals :: (Seq Error), inhMap'_Syn_Nonterminals :: (Map Identifier Attributes), instDep_Syn_Nonterminals :: (Seq Edge), mergeDep_Syn_Nonterminals :: (Seq Edge), nAutoRules_Syn_Nonterminals :: (Int), nExplicitRules_Syn_Nonterminals :: (Int), nonts_Syn_Nonterminals :: ([(NontermIdent,[ConstructorIdent])]), ntattrs_Syn_Nonterminals :: (Seq (Vertex,NTAttr)), rules_Syn_Nonterminals :: (Seq (Vertex,CRule)), synMap'_Syn_Nonterminals :: (Map Identifier Attributes), vcount_Syn_Nonterminals :: (Int) }+{-# INLINABLE wrap_Nonterminals #-}+wrap_Nonterminals :: T_Nonterminals -> Inh_Nonterminals -> (Syn_Nonterminals )+wrap_Nonterminals (T_Nonterminals act) (Inh_Nonterminals _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Nonterminals_vIn16 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount+ (T_Nonterminals_vOut16 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount) <- return (inv_Nonterminals_s17 sem arg)+ return (Syn_Nonterminals _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount)+ )++-- cata+{-# NOINLINE sem_Nonterminals #-}+sem_Nonterminals :: Nonterminals -> T_Nonterminals +sem_Nonterminals list = Prelude.foldr sem_Nonterminals_Cons sem_Nonterminals_Nil (Prelude.map sem_Nonterminal list)++-- semantic domain+newtype T_Nonterminals = T_Nonterminals {+ attach_T_Nonterminals :: Identity (T_Nonterminals_s17 )+ }+newtype T_Nonterminals_s17 = C_Nonterminals_s17 {+ inv_Nonterminals_s17 :: (T_Nonterminals_v16 )+ }+data T_Nonterminals_s18 = C_Nonterminals_s18+type T_Nonterminals_v16 = (T_Nonterminals_vIn16 ) -> (T_Nonterminals_vOut16 )+data T_Nonterminals_vIn16 = T_Nonterminals_vIn16 (Int) ([Identifier]) (Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) (CInterfaceMap) (CVisitsMap) (Map Identifier Attributes) (AttrOrderMap) (Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Map Identifier Attributes) (Int)+data T_Nonterminals_vOut16 = T_Nonterminals_vOut16 (Int) (Seq Edge) (Seq (Int,Int,Int)) (Seq Edge) (CNonterminals) (Seq Edge) (Seq Error) (Map Identifier Attributes) (Seq Edge) (Seq Edge) (Int) (Int) ([(NontermIdent,[ConstructorIdent])]) (Seq (Vertex,NTAttr)) (Seq (Vertex,CRule)) (Map Identifier Attributes) (Int)+{-# NOINLINE sem_Nonterminals_Cons #-}+sem_Nonterminals_Cons :: T_Nonterminal -> T_Nonterminals -> T_Nonterminals +sem_Nonterminals_Cons arg_hd_ arg_tl_ = T_Nonterminals (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Nonterminals_v16 + v16 = \ (T_Nonterminals_vIn16 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount) -> ( let+ _hdX14 = Control.Monad.Identity.runIdentity (attach_T_Nonterminal (arg_hd_))+ _tlX17 = Control.Monad.Identity.runIdentity (attach_T_Nonterminals (arg_tl_))+ (T_Nonterminal_vOut13 _hdIacount _hdIadditionalDep _hdIaranges _hdIaroundDep _hdIcNonterminal _hdIdirectDep _hdIerrors _hdIinhMap' _hdIinstDep _hdImergeDep _hdInAutoRules _hdInExplicitRules _hdInonts _hdIntattrs _hdIrules _hdIsynMap' _hdIvcount) = inv_Nonterminal_s14 _hdX14 (T_Nonterminal_vIn13 _hdOacount _hdOallnts _hdOaroundMap _hdOcInterfaceMap _hdOcVisitsMap _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOo_case _hdOo_cata _hdOo_data _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOoptions _hdOprefix _hdOsynMap _hdOvcount)+ (T_Nonterminals_vOut16 _tlIacount _tlIadditionalDep _tlIaranges _tlIaroundDep _tlIcNonterminals _tlIdirectDep _tlIerrors _tlIinhMap' _tlIinstDep _tlImergeDep _tlInAutoRules _tlInExplicitRules _tlInonts _tlIntattrs _tlIrules _tlIsynMap' _tlIvcount) = inv_Nonterminals_s17 _tlX17 (T_Nonterminals_vIn16 _tlOacount _tlOallnts _tlOaroundMap _tlOcInterfaceMap _tlOcVisitsMap _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOo_case _tlOo_cata _tlOo_data _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOoptions _tlOprefix _tlOsynMap _tlOvcount)+ _lhsOcNonterminals :: CNonterminals+ _lhsOcNonterminals = rule152 _hdIcNonterminal _tlIcNonterminals+ _lhsOadditionalDep :: Seq Edge+ _lhsOadditionalDep = rule153 _hdIadditionalDep _tlIadditionalDep+ _lhsOaranges :: Seq (Int,Int,Int)+ _lhsOaranges = rule154 _hdIaranges _tlIaranges+ _lhsOaroundDep :: Seq Edge+ _lhsOaroundDep = rule155 _hdIaroundDep _tlIaroundDep+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule156 _hdIdirectDep _tlIdirectDep+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule157 _hdIerrors _tlIerrors+ _lhsOinhMap' :: Map Identifier Attributes+ _lhsOinhMap' = rule158 _hdIinhMap' _tlIinhMap'+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule159 _hdIinstDep _tlIinstDep+ _lhsOmergeDep :: Seq Edge+ _lhsOmergeDep = rule160 _hdImergeDep _tlImergeDep+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule161 _hdInAutoRules _tlInAutoRules+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule162 _hdInExplicitRules _tlInExplicitRules+ _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]+ _lhsOnonts = rule163 _hdInonts _tlInonts+ _lhsOntattrs :: Seq (Vertex,NTAttr)+ _lhsOntattrs = rule164 _hdIntattrs _tlIntattrs+ _lhsOrules :: Seq (Vertex,CRule)+ _lhsOrules = rule165 _hdIrules _tlIrules+ _lhsOsynMap' :: Map Identifier Attributes+ _lhsOsynMap' = rule166 _hdIsynMap' _tlIsynMap'+ _lhsOacount :: Int+ _lhsOacount = rule167 _tlIacount+ _lhsOvcount :: Int+ _lhsOvcount = rule168 _tlIvcount+ _hdOacount = rule169 _lhsIacount+ _hdOallnts = rule170 _lhsIallnts+ _hdOaroundMap = rule171 _lhsIaroundMap+ _hdOcInterfaceMap = rule172 _lhsIcInterfaceMap+ _hdOcVisitsMap = rule173 _lhsIcVisitsMap+ _hdOinhMap = rule174 _lhsIinhMap+ _hdOmanualAttrDepMap = rule175 _lhsImanualAttrDepMap+ _hdOmergeMap = rule176 _lhsImergeMap+ _hdOo_case = rule177 _lhsIo_case+ _hdOo_cata = rule178 _lhsIo_cata+ _hdOo_data = rule179 _lhsIo_data+ _hdOo_dovisit = rule180 _lhsIo_dovisit+ _hdOo_newtypes = rule181 _lhsIo_newtypes+ _hdOo_rename = rule182 _lhsIo_rename+ _hdOo_sem = rule183 _lhsIo_sem+ _hdOo_sig = rule184 _lhsIo_sig+ _hdOo_unbox = rule185 _lhsIo_unbox+ _hdOo_wantvisit = rule186 _lhsIo_wantvisit+ _hdOoptions = rule187 _lhsIoptions+ _hdOprefix = rule188 _lhsIprefix+ _hdOsynMap = rule189 _lhsIsynMap+ _hdOvcount = rule190 _lhsIvcount+ _tlOacount = rule191 _hdIacount+ _tlOallnts = rule192 _lhsIallnts+ _tlOaroundMap = rule193 _lhsIaroundMap+ _tlOcInterfaceMap = rule194 _lhsIcInterfaceMap+ _tlOcVisitsMap = rule195 _lhsIcVisitsMap+ _tlOinhMap = rule196 _lhsIinhMap+ _tlOmanualAttrDepMap = rule197 _lhsImanualAttrDepMap+ _tlOmergeMap = rule198 _lhsImergeMap+ _tlOo_case = rule199 _lhsIo_case+ _tlOo_cata = rule200 _lhsIo_cata+ _tlOo_data = rule201 _lhsIo_data+ _tlOo_dovisit = rule202 _lhsIo_dovisit+ _tlOo_newtypes = rule203 _lhsIo_newtypes+ _tlOo_rename = rule204 _lhsIo_rename+ _tlOo_sem = rule205 _lhsIo_sem+ _tlOo_sig = rule206 _lhsIo_sig+ _tlOo_unbox = rule207 _lhsIo_unbox+ _tlOo_wantvisit = rule208 _lhsIo_wantvisit+ _tlOoptions = rule209 _lhsIoptions+ _tlOprefix = rule210 _lhsIprefix+ _tlOsynMap = rule211 _lhsIsynMap+ _tlOvcount = rule212 _hdIvcount+ __result_ = T_Nonterminals_vOut16 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount+ in __result_ )+ in C_Nonterminals_s17 v16+ {-# INLINE rule152 #-}+ {-# LINE 626 "./src-ag/Order.ag" #-}+ rule152 = \ ((_hdIcNonterminal) :: CNonterminal) ((_tlIcNonterminals) :: CNonterminals) ->+ {-# LINE 626 "./src-ag/Order.ag" #-}+ _hdIcNonterminal : _tlIcNonterminals+ {-# LINE 1525 "dist/build/Order.hs"#-}+ {-# INLINE rule153 #-}+ rule153 = \ ((_hdIadditionalDep) :: Seq Edge) ((_tlIadditionalDep) :: Seq Edge) ->+ _hdIadditionalDep Seq.>< _tlIadditionalDep+ {-# INLINE rule154 #-}+ rule154 = \ ((_hdIaranges) :: Seq (Int,Int,Int)) ((_tlIaranges) :: Seq (Int,Int,Int)) ->+ _hdIaranges Seq.>< _tlIaranges+ {-# INLINE rule155 #-}+ rule155 = \ ((_hdIaroundDep) :: Seq Edge) ((_tlIaroundDep) :: Seq Edge) ->+ _hdIaroundDep Seq.>< _tlIaroundDep+ {-# INLINE rule156 #-}+ rule156 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# INLINE rule157 #-}+ rule157 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule158 #-}+ rule158 = \ ((_hdIinhMap') :: Map Identifier Attributes) ((_tlIinhMap') :: Map Identifier Attributes) ->+ _hdIinhMap' `Map.union` _tlIinhMap'+ {-# INLINE rule159 #-}+ rule159 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->+ _hdIinstDep Seq.>< _tlIinstDep+ {-# INLINE rule160 #-}+ rule160 = \ ((_hdImergeDep) :: Seq Edge) ((_tlImergeDep) :: Seq Edge) ->+ _hdImergeDep Seq.>< _tlImergeDep+ {-# INLINE rule161 #-}+ rule161 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->+ _hdInAutoRules + _tlInAutoRules+ {-# INLINE rule162 #-}+ rule162 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->+ _hdInExplicitRules + _tlInExplicitRules+ {-# INLINE rule163 #-}+ rule163 = \ ((_hdInonts) :: [(NontermIdent,[ConstructorIdent])]) ((_tlInonts) :: [(NontermIdent,[ConstructorIdent])]) ->+ _hdInonts ++ _tlInonts+ {-# INLINE rule164 #-}+ rule164 = \ ((_hdIntattrs) :: Seq (Vertex,NTAttr)) ((_tlIntattrs) :: Seq (Vertex,NTAttr)) ->+ _hdIntattrs Seq.>< _tlIntattrs+ {-# INLINE rule165 #-}+ rule165 = \ ((_hdIrules) :: Seq (Vertex,CRule)) ((_tlIrules) :: Seq (Vertex,CRule)) ->+ _hdIrules Seq.>< _tlIrules+ {-# INLINE rule166 #-}+ rule166 = \ ((_hdIsynMap') :: Map Identifier Attributes) ((_tlIsynMap') :: Map Identifier Attributes) ->+ _hdIsynMap' `Map.union` _tlIsynMap'+ {-# INLINE rule167 #-}+ rule167 = \ ((_tlIacount) :: Int) ->+ _tlIacount+ {-# INLINE rule168 #-}+ rule168 = \ ((_tlIvcount) :: Int) ->+ _tlIvcount+ {-# INLINE rule169 #-}+ rule169 = \ ((_lhsIacount) :: Int) ->+ _lhsIacount+ {-# INLINE rule170 #-}+ rule170 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule171 #-}+ rule171 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ _lhsIaroundMap+ {-# INLINE rule172 #-}+ rule172 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ->+ _lhsIcInterfaceMap+ {-# INLINE rule173 #-}+ rule173 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->+ _lhsIcVisitsMap+ {-# INLINE rule174 #-}+ rule174 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule175 #-}+ rule175 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->+ _lhsImanualAttrDepMap+ {-# INLINE rule176 #-}+ rule176 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ _lhsImergeMap+ {-# INLINE rule177 #-}+ rule177 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule178 #-}+ rule178 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule179 #-}+ rule179 = \ ((_lhsIo_data) :: Bool) ->+ _lhsIo_data+ {-# INLINE rule180 #-}+ rule180 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule181 #-}+ rule181 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule182 #-}+ rule182 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule183 #-}+ rule183 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule184 #-}+ rule184 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule185 #-}+ rule185 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule186 #-}+ rule186 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule187 #-}+ rule187 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule188 #-}+ rule188 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule189 #-}+ rule189 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule190 #-}+ rule190 = \ ((_lhsIvcount) :: Int) ->+ _lhsIvcount+ {-# INLINE rule191 #-}+ rule191 = \ ((_hdIacount) :: Int) ->+ _hdIacount+ {-# INLINE rule192 #-}+ rule192 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule193 #-}+ rule193 = \ ((_lhsIaroundMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))) ->+ _lhsIaroundMap+ {-# INLINE rule194 #-}+ rule194 = \ ((_lhsIcInterfaceMap) :: CInterfaceMap) ->+ _lhsIcInterfaceMap+ {-# INLINE rule195 #-}+ rule195 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->+ _lhsIcVisitsMap+ {-# INLINE rule196 #-}+ rule196 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule197 #-}+ rule197 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->+ _lhsImanualAttrDepMap+ {-# INLINE rule198 #-}+ rule198 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) ->+ _lhsImergeMap+ {-# INLINE rule199 #-}+ rule199 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule200 #-}+ rule200 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule201 #-}+ rule201 = \ ((_lhsIo_data) :: Bool) ->+ _lhsIo_data+ {-# INLINE rule202 #-}+ rule202 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule203 #-}+ rule203 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule204 #-}+ rule204 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule205 #-}+ rule205 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule206 #-}+ rule206 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule207 #-}+ rule207 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule208 #-}+ rule208 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule209 #-}+ rule209 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule210 #-}+ rule210 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule211 #-}+ rule211 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule212 #-}+ rule212 = \ ((_hdIvcount) :: Int) ->+ _hdIvcount+{-# NOINLINE sem_Nonterminals_Nil #-}+sem_Nonterminals_Nil :: T_Nonterminals +sem_Nonterminals_Nil = T_Nonterminals (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Nonterminals_v16 + v16 = \ (T_Nonterminals_vIn16 _lhsIacount _lhsIallnts _lhsIaroundMap _lhsIcInterfaceMap _lhsIcVisitsMap _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsIo_case _lhsIo_cata _lhsIo_data _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsynMap _lhsIvcount) -> ( let+ _lhsOcNonterminals :: CNonterminals+ _lhsOcNonterminals = rule213 ()+ _lhsOadditionalDep :: Seq Edge+ _lhsOadditionalDep = rule214 ()+ _lhsOaranges :: Seq (Int,Int,Int)+ _lhsOaranges = rule215 ()+ _lhsOaroundDep :: Seq Edge+ _lhsOaroundDep = rule216 ()+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule217 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule218 ()+ _lhsOinhMap' :: Map Identifier Attributes+ _lhsOinhMap' = rule219 ()+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule220 ()+ _lhsOmergeDep :: Seq Edge+ _lhsOmergeDep = rule221 ()+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule222 ()+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule223 ()+ _lhsOnonts :: [(NontermIdent,[ConstructorIdent])]+ _lhsOnonts = rule224 ()+ _lhsOntattrs :: Seq (Vertex,NTAttr)+ _lhsOntattrs = rule225 ()+ _lhsOrules :: Seq (Vertex,CRule)+ _lhsOrules = rule226 ()+ _lhsOsynMap' :: Map Identifier Attributes+ _lhsOsynMap' = rule227 ()+ _lhsOacount :: Int+ _lhsOacount = rule228 _lhsIacount+ _lhsOvcount :: Int+ _lhsOvcount = rule229 _lhsIvcount+ __result_ = T_Nonterminals_vOut16 _lhsOacount _lhsOadditionalDep _lhsOaranges _lhsOaroundDep _lhsOcNonterminals _lhsOdirectDep _lhsOerrors _lhsOinhMap' _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOnonts _lhsOntattrs _lhsOrules _lhsOsynMap' _lhsOvcount+ in __result_ )+ in C_Nonterminals_s17 v16+ {-# INLINE rule213 #-}+ {-# LINE 627 "./src-ag/Order.ag" #-}+ rule213 = \ (_ :: ()) ->+ {-# LINE 627 "./src-ag/Order.ag" #-}+ []+ {-# LINE 1755 "dist/build/Order.hs"#-}+ {-# INLINE rule214 #-}+ rule214 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule215 #-}+ rule215 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule216 #-}+ rule216 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule217 #-}+ rule217 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule218 #-}+ rule218 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule219 #-}+ rule219 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule220 #-}+ rule220 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule221 #-}+ rule221 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule222 #-}+ rule222 = \ (_ :: ()) ->+ 0+ {-# INLINE rule223 #-}+ rule223 = \ (_ :: ()) ->+ 0+ {-# INLINE rule224 #-}+ rule224 = \ (_ :: ()) ->+ []+ {-# INLINE rule225 #-}+ rule225 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule226 #-}+ rule226 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule227 #-}+ rule227 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule228 #-}+ rule228 = \ ((_lhsIacount) :: Int) ->+ _lhsIacount+ {-# INLINE rule229 #-}+ rule229 = \ ((_lhsIvcount) :: Int) ->+ _lhsIvcount++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { allTypeSigs_Inh_Pattern :: (Map Identifier Type), altAttrs_Inh_Pattern :: (Map AltAttr Vertex), con_Inh_Pattern :: (Identifier), inh_Inh_Pattern :: (Attributes), nt_Inh_Pattern :: (Identifier), syn_Inh_Pattern :: (Attributes) }+data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: (Pattern), errors_Syn_Pattern :: (Seq Error), gathAltAttrs_Syn_Pattern :: ([AltAttr]), instVars_Syn_Pattern :: ([Identifier]), locVars_Syn_Pattern :: ([Identifier]), patternAttrs_Syn_Pattern :: ([(Identifier,Identifier,Bool)]) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern (T_Pattern act) (Inh_Pattern _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn+ (T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs) <- return (inv_Pattern_s20 sem arg)+ return (Syn_Pattern _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s20 )+ }+newtype T_Pattern_s20 = C_Pattern_s20 {+ inv_Pattern_s20 :: (T_Pattern_v19 )+ }+data T_Pattern_s21 = C_Pattern_s21+type T_Pattern_v19 = (T_Pattern_vIn19 ) -> (T_Pattern_vOut19 )+data T_Pattern_vIn19 = T_Pattern_vIn19 (Map Identifier Type) (Map AltAttr Vertex) (Identifier) (Attributes) (Identifier) (Attributes)+data T_Pattern_vOut19 = T_Pattern_vOut19 (Pattern) (Seq Error) ([AltAttr]) ([Identifier]) ([Identifier]) ([(Identifier,Identifier,Bool)])+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Pattern_v19 + v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _patsX23 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut22 _patsIcopy _patsIerrors _patsIgathAltAttrs _patsIinstVars _patsIlocVars _patsIpatternAttrs) = inv_Patterns_s23 _patsX23 (T_Patterns_vIn22 _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule230 _patsIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule231 _patsIgathAltAttrs+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule232 _patsIinstVars+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule233 _patsIlocVars+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule234 _patsIpatternAttrs+ _copy = rule235 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule236 _copy+ _patsOallTypeSigs = rule237 _lhsIallTypeSigs+ _patsOaltAttrs = rule238 _lhsIaltAttrs+ _patsOcon = rule239 _lhsIcon+ _patsOinh = rule240 _lhsIinh+ _patsOnt = rule241 _lhsInt+ _patsOsyn = rule242 _lhsIsyn+ __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Pattern_s20 v19+ {-# INLINE rule230 #-}+ rule230 = \ ((_patsIerrors) :: Seq Error) ->+ _patsIerrors+ {-# INLINE rule231 #-}+ rule231 = \ ((_patsIgathAltAttrs) :: [AltAttr]) ->+ _patsIgathAltAttrs+ {-# INLINE rule232 #-}+ rule232 = \ ((_patsIinstVars) :: [Identifier]) ->+ _patsIinstVars+ {-# INLINE rule233 #-}+ rule233 = \ ((_patsIlocVars) :: [Identifier]) ->+ _patsIlocVars+ {-# INLINE rule234 #-}+ rule234 = \ ((_patsIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->+ _patsIpatternAttrs+ {-# INLINE rule235 #-}+ rule235 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule236 #-}+ rule236 = \ _copy ->+ _copy+ {-# INLINE rule237 #-}+ rule237 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule238 #-}+ rule238 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule239 #-}+ rule239 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule240 #-}+ rule240 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule241 #-}+ rule241 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule242 #-}+ rule242 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Pattern_v19 + v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _patsX23 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut22 _patsIcopy _patsIerrors _patsIgathAltAttrs _patsIinstVars _patsIlocVars _patsIpatternAttrs) = inv_Patterns_s23 _patsX23 (T_Patterns_vIn22 _patsOallTypeSigs _patsOaltAttrs _patsOcon _patsOinh _patsOnt _patsOsyn)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule243 _patsIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule244 _patsIgathAltAttrs+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule245 _patsIinstVars+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule246 _patsIlocVars+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule247 _patsIpatternAttrs+ _copy = rule248 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule249 _copy+ _patsOallTypeSigs = rule250 _lhsIallTypeSigs+ _patsOaltAttrs = rule251 _lhsIaltAttrs+ _patsOcon = rule252 _lhsIcon+ _patsOinh = rule253 _lhsIinh+ _patsOnt = rule254 _lhsInt+ _patsOsyn = rule255 _lhsIsyn+ __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Pattern_s20 v19+ {-# INLINE rule243 #-}+ rule243 = \ ((_patsIerrors) :: Seq Error) ->+ _patsIerrors+ {-# INLINE rule244 #-}+ rule244 = \ ((_patsIgathAltAttrs) :: [AltAttr]) ->+ _patsIgathAltAttrs+ {-# INLINE rule245 #-}+ rule245 = \ ((_patsIinstVars) :: [Identifier]) ->+ _patsIinstVars+ {-# INLINE rule246 #-}+ rule246 = \ ((_patsIlocVars) :: [Identifier]) ->+ _patsIlocVars+ {-# INLINE rule247 #-}+ rule247 = \ ((_patsIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->+ _patsIpatternAttrs+ {-# INLINE rule248 #-}+ rule248 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule249 #-}+ rule249 = \ _copy ->+ _copy+ {-# INLINE rule250 #-}+ rule250 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule251 #-}+ rule251 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule252 #-}+ rule252 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule253 #-}+ rule253 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule254 #-}+ rule254 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule255 #-}+ rule255 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Pattern_v19 + v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _patX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut19 _patIcopy _patIerrors _patIgathAltAttrs _patIinstVars _patIlocVars _patIpatternAttrs) = inv_Pattern_s20 _patX20 (T_Pattern_vIn19 _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn)+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule256 arg_attr_ arg_field_+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule257 arg_attr_ arg_field_+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule258 arg_attr_ arg_field_+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule259 arg_attr_ arg_field_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule260 _patIerrors+ _copy = rule261 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule262 _copy+ _patOallTypeSigs = rule263 _lhsIallTypeSigs+ _patOaltAttrs = rule264 _lhsIaltAttrs+ _patOcon = rule265 _lhsIcon+ _patOinh = rule266 _lhsIinh+ _patOnt = rule267 _lhsInt+ _patOsyn = rule268 _lhsIsyn+ __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Pattern_s20 v19+ {-# INLINE rule256 #-}+ {-# LINE 187 "./src-ag/Order.ag" #-}+ rule256 = \ attr_ field_ ->+ {-# LINE 187 "./src-ag/Order.ag" #-}+ [AltAttr field_ attr_ (field_ == _LOC || field_ == _INST)]+ {-# LINE 2015 "dist/build/Order.hs"#-}+ {-# INLINE rule257 #-}+ {-# LINE 253 "./src-ag/Order.ag" #-}+ rule257 = \ attr_ field_ ->+ {-# LINE 253 "./src-ag/Order.ag" #-}+ [(field_,attr_,(field_ == _LOC || field_ == _INST))]+ {-# LINE 2021 "dist/build/Order.hs"#-}+ {-# INLINE rule258 #-}+ {-# LINE 685 "./src-ag/Order.ag" #-}+ rule258 = \ attr_ field_ ->+ {-# LINE 685 "./src-ag/Order.ag" #-}+ if field_ == _LOC+ then [attr_]+ else []+ {-# LINE 2029 "dist/build/Order.hs"#-}+ {-# INLINE rule259 #-}+ {-# LINE 688 "./src-ag/Order.ag" #-}+ rule259 = \ attr_ field_ ->+ {-# LINE 688 "./src-ag/Order.ag" #-}+ if field_ == _INST+ then [attr_]+ else []+ {-# LINE 2037 "dist/build/Order.hs"#-}+ {-# INLINE rule260 #-}+ rule260 = \ ((_patIerrors) :: Seq Error) ->+ _patIerrors+ {-# INLINE rule261 #-}+ rule261 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule262 #-}+ rule262 = \ _copy ->+ _copy+ {-# INLINE rule263 #-}+ rule263 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule264 #-}+ rule264 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule265 #-}+ rule265 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule266 #-}+ rule266 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule267 #-}+ rule267 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule268 #-}+ rule268 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Pattern_v19 + v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _patX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut19 _patIcopy _patIerrors _patIgathAltAttrs _patIinstVars _patIlocVars _patIpatternAttrs) = inv_Pattern_s20 _patX20 (T_Pattern_vIn19 _patOallTypeSigs _patOaltAttrs _patOcon _patOinh _patOnt _patOsyn)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule269 _patIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule270 _patIgathAltAttrs+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule271 _patIinstVars+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule272 _patIlocVars+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule273 _patIpatternAttrs+ _copy = rule274 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule275 _copy+ _patOallTypeSigs = rule276 _lhsIallTypeSigs+ _patOaltAttrs = rule277 _lhsIaltAttrs+ _patOcon = rule278 _lhsIcon+ _patOinh = rule279 _lhsIinh+ _patOnt = rule280 _lhsInt+ _patOsyn = rule281 _lhsIsyn+ __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Pattern_s20 v19+ {-# INLINE rule269 #-}+ rule269 = \ ((_patIerrors) :: Seq Error) ->+ _patIerrors+ {-# INLINE rule270 #-}+ rule270 = \ ((_patIgathAltAttrs) :: [AltAttr]) ->+ _patIgathAltAttrs+ {-# INLINE rule271 #-}+ rule271 = \ ((_patIinstVars) :: [Identifier]) ->+ _patIinstVars+ {-# INLINE rule272 #-}+ rule272 = \ ((_patIlocVars) :: [Identifier]) ->+ _patIlocVars+ {-# INLINE rule273 #-}+ rule273 = \ ((_patIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->+ _patIpatternAttrs+ {-# INLINE rule274 #-}+ rule274 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule275 #-}+ rule275 = \ _copy ->+ _copy+ {-# INLINE rule276 #-}+ rule276 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule277 #-}+ rule277 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule278 #-}+ rule278 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule279 #-}+ rule279 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule280 #-}+ rule280 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule281 #-}+ rule281 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore arg_pos_ = T_Pattern (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Pattern_v19 + v19 = \ (T_Pattern_vIn19 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule282 ()+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule283 ()+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule284 ()+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule285 ()+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule286 ()+ _copy = rule287 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule288 _copy+ __result_ = T_Pattern_vOut19 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Pattern_s20 v19+ {-# INLINE rule282 #-}+ rule282 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule283 #-}+ rule283 = \ (_ :: ()) ->+ []+ {-# INLINE rule284 #-}+ rule284 = \ (_ :: ()) ->+ []+ {-# INLINE rule285 #-}+ rule285 = \ (_ :: ()) ->+ []+ {-# INLINE rule286 #-}+ rule286 = \ (_ :: ()) ->+ []+ {-# INLINE rule287 #-}+ rule287 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule288 #-}+ rule288 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { allTypeSigs_Inh_Patterns :: (Map Identifier Type), altAttrs_Inh_Patterns :: (Map AltAttr Vertex), con_Inh_Patterns :: (Identifier), inh_Inh_Patterns :: (Attributes), nt_Inh_Patterns :: (Identifier), syn_Inh_Patterns :: (Attributes) }+data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: (Patterns), errors_Syn_Patterns :: (Seq Error), gathAltAttrs_Syn_Patterns :: ([AltAttr]), instVars_Syn_Patterns :: ([Identifier]), locVars_Syn_Patterns :: ([Identifier]), patternAttrs_Syn_Patterns :: ([(Identifier,Identifier,Bool)]) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns (T_Patterns act) (Inh_Patterns _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Patterns_vIn22 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn+ (T_Patterns_vOut22 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs) <- return (inv_Patterns_s23 sem arg)+ return (Syn_Patterns _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s23 )+ }+newtype T_Patterns_s23 = C_Patterns_s23 {+ inv_Patterns_s23 :: (T_Patterns_v22 )+ }+data T_Patterns_s24 = C_Patterns_s24+type T_Patterns_v22 = (T_Patterns_vIn22 ) -> (T_Patterns_vOut22 )+data T_Patterns_vIn22 = T_Patterns_vIn22 (Map Identifier Type) (Map AltAttr Vertex) (Identifier) (Attributes) (Identifier) (Attributes)+data T_Patterns_vOut22 = T_Patterns_vOut22 (Patterns) (Seq Error) ([AltAttr]) ([Identifier]) ([Identifier]) ([(Identifier,Identifier,Bool)])+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_Patterns_v22 + v22 = \ (T_Patterns_vIn22 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _hdX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX23 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut19 _hdIcopy _hdIerrors _hdIgathAltAttrs _hdIinstVars _hdIlocVars _hdIpatternAttrs) = inv_Pattern_s20 _hdX20 (T_Pattern_vIn19 _hdOallTypeSigs _hdOaltAttrs _hdOcon _hdOinh _hdOnt _hdOsyn)+ (T_Patterns_vOut22 _tlIcopy _tlIerrors _tlIgathAltAttrs _tlIinstVars _tlIlocVars _tlIpatternAttrs) = inv_Patterns_s23 _tlX23 (T_Patterns_vIn22 _tlOallTypeSigs _tlOaltAttrs _tlOcon _tlOinh _tlOnt _tlOsyn)+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule289 _hdIerrors _tlIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule290 _hdIgathAltAttrs _tlIgathAltAttrs+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule291 _hdIinstVars _tlIinstVars+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule292 _hdIlocVars _tlIlocVars+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule293 _hdIpatternAttrs _tlIpatternAttrs+ _copy = rule294 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule295 _copy+ _hdOallTypeSigs = rule296 _lhsIallTypeSigs+ _hdOaltAttrs = rule297 _lhsIaltAttrs+ _hdOcon = rule298 _lhsIcon+ _hdOinh = rule299 _lhsIinh+ _hdOnt = rule300 _lhsInt+ _hdOsyn = rule301 _lhsIsyn+ _tlOallTypeSigs = rule302 _lhsIallTypeSigs+ _tlOaltAttrs = rule303 _lhsIaltAttrs+ _tlOcon = rule304 _lhsIcon+ _tlOinh = rule305 _lhsIinh+ _tlOnt = rule306 _lhsInt+ _tlOsyn = rule307 _lhsIsyn+ __result_ = T_Patterns_vOut22 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Patterns_s23 v22+ {-# INLINE rule289 #-}+ rule289 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule290 #-}+ rule290 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# INLINE rule291 #-}+ rule291 = \ ((_hdIinstVars) :: [Identifier]) ((_tlIinstVars) :: [Identifier]) ->+ _hdIinstVars ++ _tlIinstVars+ {-# INLINE rule292 #-}+ rule292 = \ ((_hdIlocVars) :: [Identifier]) ((_tlIlocVars) :: [Identifier]) ->+ _hdIlocVars ++ _tlIlocVars+ {-# INLINE rule293 #-}+ rule293 = \ ((_hdIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ((_tlIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->+ _hdIpatternAttrs ++ _tlIpatternAttrs+ {-# INLINE rule294 #-}+ rule294 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule295 #-}+ rule295 = \ _copy ->+ _copy+ {-# INLINE rule296 #-}+ rule296 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule297 #-}+ rule297 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule298 #-}+ rule298 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule299 #-}+ rule299 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule300 #-}+ rule300 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule301 #-}+ rule301 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule302 #-}+ rule302 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule303 #-}+ rule303 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule304 #-}+ rule304 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule305 #-}+ rule305 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule306 #-}+ rule306 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule307 #-}+ rule307 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_Patterns_v22 + v22 = \ (T_Patterns_vIn22 _lhsIallTypeSigs _lhsIaltAttrs _lhsIcon _lhsIinh _lhsInt _lhsIsyn) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule308 ()+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule309 ()+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule310 ()+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule311 ()+ _lhsOpatternAttrs :: [(Identifier,Identifier,Bool)]+ _lhsOpatternAttrs = rule312 ()+ _copy = rule313 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule314 _copy+ __result_ = T_Patterns_vOut22 _lhsOcopy _lhsOerrors _lhsOgathAltAttrs _lhsOinstVars _lhsOlocVars _lhsOpatternAttrs+ in __result_ )+ in C_Patterns_s23 v22+ {-# INLINE rule308 #-}+ rule308 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule309 #-}+ rule309 = \ (_ :: ()) ->+ []+ {-# INLINE rule310 #-}+ rule310 = \ (_ :: ()) ->+ []+ {-# INLINE rule311 #-}+ rule311 = \ (_ :: ()) ->+ []+ {-# INLINE rule312 #-}+ rule312 = \ (_ :: ()) ->+ []+ {-# INLINE rule313 #-}+ rule313 = \ (_ :: ()) ->+ []+ {-# INLINE rule314 #-}+ rule314 = \ _copy ->+ _copy++-- Production --------------------------------------------------+-- wrapper+data Inh_Production = Inh_Production { allnts_Inh_Production :: ([Identifier]), aroundMap_Inh_Production :: (Map ConstructorIdent (Map Identifier [Expression])), cVisitsMap_Inh_Production :: (CVisitsMap), inh_Inh_Production :: (Attributes), inhMap_Inh_Production :: (Map Identifier Attributes), manualAttrDepMap_Inh_Production :: (AttrOrderMap), mergeMap_Inh_Production :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), nt_Inh_Production :: (Identifier), o_case_Inh_Production :: (Bool), o_cata_Inh_Production :: (Bool), o_dovisit_Inh_Production :: (Bool), o_newtypes_Inh_Production :: (Bool), o_rename_Inh_Production :: (Bool), o_sem_Inh_Production :: (Bool), o_sig_Inh_Production :: (Bool), o_unbox_Inh_Production :: (Bool), o_wantvisit_Inh_Production :: (Bool), options_Inh_Production :: (Options), prefix_Inh_Production :: (String), syn_Inh_Production :: (Attributes), synMap_Inh_Production :: (Map Identifier Attributes), vcount_Inh_Production :: (Int) }+data Syn_Production = Syn_Production { additionalDep_Syn_Production :: (Seq Edge), aroundDep_Syn_Production :: (Seq Edge), cProduction_Syn_Production :: (CProduction), cons_Syn_Production :: ([ConstructorIdent]), directDep_Syn_Production :: (Seq Edge), errors_Syn_Production :: (Seq Error), instDep_Syn_Production :: (Seq Edge), mergeDep_Syn_Production :: (Seq Edge), nAutoRules_Syn_Production :: (Int), nExplicitRules_Syn_Production :: (Int), rules_Syn_Production :: (Seq (Vertex,CRule)), vcount_Syn_Production :: (Int) }+{-# INLINABLE wrap_Production #-}+wrap_Production :: T_Production -> Inh_Production -> (Syn_Production )+wrap_Production (T_Production act) (Inh_Production _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Production_vIn25 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount+ (T_Production_vOut25 _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount) <- return (inv_Production_s26 sem arg)+ return (Syn_Production _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount)+ )++-- cata+{-# INLINE sem_Production #-}+sem_Production :: Production -> T_Production +sem_Production ( Production con_ params_ constraints_ children_ rules_ typeSigs_ macro_ ) = sem_Production_Production con_ params_ constraints_ ( sem_Children children_ ) ( sem_Rules rules_ ) ( sem_TypeSigs typeSigs_ ) macro_++-- semantic domain+newtype T_Production = T_Production {+ attach_T_Production :: Identity (T_Production_s26 )+ }+newtype T_Production_s26 = C_Production_s26 {+ inv_Production_s26 :: (T_Production_v25 )+ }+data T_Production_s27 = C_Production_s27+type T_Production_v25 = (T_Production_vIn25 ) -> (T_Production_vOut25 )+data T_Production_vIn25 = T_Production_vIn25 ([Identifier]) (Map ConstructorIdent (Map Identifier [Expression])) (CVisitsMap) (Attributes) (Map Identifier Attributes) (AttrOrderMap) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes) (Int)+data T_Production_vOut25 = T_Production_vOut25 (Seq Edge) (Seq Edge) (CProduction) ([ConstructorIdent]) (Seq Edge) (Seq Error) (Seq Edge) (Seq Edge) (Int) (Int) (Seq (Vertex,CRule)) (Int)+{-# NOINLINE sem_Production_Production #-}+sem_Production_Production :: (ConstructorIdent) -> ([Identifier]) -> ([Type]) -> T_Children -> T_Rules -> T_TypeSigs -> (MaybeMacro) -> T_Production +sem_Production_Production arg_con_ _ _ arg_children_ arg_rules_ arg_typeSigs_ _ = T_Production (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_Production_v25 + v25 = \ (T_Production_vIn25 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) -> ( let+ _childrenX5 = Control.Monad.Identity.runIdentity (attach_T_Children (arg_children_))+ _rulesX35 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_rules_))+ _typeSigsX41 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_typeSigs_))+ (T_Children_vOut4 _childrenIattributes _childrenIcollectChildrenInhs _childrenIcollectChildrenSyns _childrenIerrors _childrenIfields _childrenIgathAltAttrs _childrenIgathRules _childrenIinhs _childrenInts _childrenIsinglevisits _childrenIterminals) = inv_Children_s5 _childrenX5 (T_Children_vIn4 _childrenOallfields _childrenOallnts _childrenOattrs _childrenOcon _childrenOinh _childrenOinhMap _childrenOmergeMap _childrenOnt _childrenOo_unbox _childrenOsyn _childrenOsynMap)+ (T_Rules_vOut34 _rulesIdirectDep _rulesIerrors _rulesIgathAltAttrs _rulesIgathRules _rulesIinstDep _rulesIinstVars _rulesIlocVars _rulesInAutoRules _rulesInExplicitRules) = inv_Rules_s35 _rulesX35 (T_Rules_vIn34 _rulesOallTypeSigs _rulesOallfields _rulesOallnts _rulesOaltAttrs _rulesOattrs _rulesOchildInhs _rulesOchildNts _rulesOcon _rulesOinh _rulesOinhsOfChildren _rulesOmergeMap _rulesOnt _rulesOo_case _rulesOo_cata _rulesOo_dovisit _rulesOo_newtypes _rulesOo_rename _rulesOo_sem _rulesOo_sig _rulesOo_wantvisit _rulesOoptions _rulesOprefix _rulesOsyn _rulesOsynsOfChildren)+ (T_TypeSigs_vOut40 _typeSigsItypeSigs) = inv_TypeSigs_s41 _typeSigsX41 (T_TypeSigs_vIn40 _typeSigsOtypeSigs)+ _childrenOcon = rule315 arg_con_+ _rulesOcon = rule316 arg_con_+ _gathAltAttrs = rule317 _childrenIgathAltAttrs _lhsIinh _rulesIgathAltAttrs+ _altAttrs = rule318 _gathAltAttrs _lhsIvcount+ _rulesOchildNts = rule319 _childrenInts+ _rulesOchildInhs = rule320 _childrenIinhs+ _inhRules = rule321 _lhsIinh _lhsInt arg_con_+ _gathRules = rule322 _childrenIgathRules _inhRules _rulesIgathRules+ _lhsOrules :: Seq (Vertex,CRule)+ _lhsOrules = rule323 _gathRules _lhsIvcount+ _lhsOvcount :: Int+ _lhsOvcount = rule324 _gathRules _lhsIvcount+ _manualDeps = rule325 _lhsImanualAttrDepMap _lhsInt arg_con_+ _lhsOadditionalDep :: Seq Edge+ _lhsOadditionalDep = rule326 _altAttrs _manualDeps+ _rulesOsynsOfChildren = rule327 _childrenIcollectChildrenSyns+ _rulesOinhsOfChildren = rule328 _childrenIcollectChildrenInhs+ _mergeMap = rule329 _lhsImergeMap arg_con_+ _lhsOmergeDep :: Seq Edge+ _lhsOmergeDep = rule330 _mergeDep1 _mergeDep2+ _mergeDep1 = rule331 _altAttrs _childrenIcollectChildrenSyns _mergeMap+ _mergeDep2 = rule332 _altAttrs _childrenIcollectChildrenSyns _mergeMap+ _aroundMap = rule333 _lhsIaroundMap arg_con_+ _aroundDep1 = rule334 _altAttrs _aroundMap _childrenIcollectChildrenSyns+ _aroundDep2 = rule335 _altAttrs _aroundMap _childrenIcollectChildrenInhs+ _lhsOaroundDep :: Seq Edge+ _lhsOaroundDep = rule336 _aroundDep1 _aroundDep2+ _lhsOcons :: [ConstructorIdent]+ _lhsOcons = rule337 arg_con_+ _typeSigsOtypeSigs = rule338 ()+ _rulesOallTypeSigs = rule339 _typeSigsItypeSigs+ _cVisits = rule340 _childrenIsinglevisits _gathRules _lhsIcVisitsMap _lhsIinh _lhsInt _lhsIo_dovisit _lhsIsyn arg_con_+ _lhsOcProduction :: CProduction+ _lhsOcProduction = rule341 _cVisits _childrenIfields _childrenIterminals arg_con_+ _allfields = rule342 _childrenIfields+ _attrs = rule343 _childrenIattributes _inhnames _rulesIinstVars _rulesIlocVars+ _inhnames = rule344 _lhsIinh+ _synnames = rule345 _lhsIsyn+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule346 _rulesIdirectDep+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule347 _childrenIerrors _rulesIerrors+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule348 _rulesIinstDep+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule349 _rulesInAutoRules+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule350 _rulesInExplicitRules+ _childrenOallfields = rule351 _allfields+ _childrenOallnts = rule352 _lhsIallnts+ _childrenOattrs = rule353 _attrs+ _childrenOinh = rule354 _lhsIinh+ _childrenOinhMap = rule355 _lhsIinhMap+ _childrenOmergeMap = rule356 _mergeMap+ _childrenOnt = rule357 _lhsInt+ _childrenOo_unbox = rule358 _lhsIo_unbox+ _childrenOsyn = rule359 _lhsIsyn+ _childrenOsynMap = rule360 _lhsIsynMap+ _rulesOallfields = rule361 _allfields+ _rulesOallnts = rule362 _lhsIallnts+ _rulesOaltAttrs = rule363 _altAttrs+ _rulesOattrs = rule364 _attrs+ _rulesOinh = rule365 _lhsIinh+ _rulesOmergeMap = rule366 _mergeMap+ _rulesOnt = rule367 _lhsInt+ _rulesOo_case = rule368 _lhsIo_case+ _rulesOo_cata = rule369 _lhsIo_cata+ _rulesOo_dovisit = rule370 _lhsIo_dovisit+ _rulesOo_newtypes = rule371 _lhsIo_newtypes+ _rulesOo_rename = rule372 _lhsIo_rename+ _rulesOo_sem = rule373 _lhsIo_sem+ _rulesOo_sig = rule374 _lhsIo_sig+ _rulesOo_wantvisit = rule375 _lhsIo_wantvisit+ _rulesOoptions = rule376 _lhsIoptions+ _rulesOprefix = rule377 _lhsIprefix+ _rulesOsyn = rule378 _lhsIsyn+ __result_ = T_Production_vOut25 _lhsOadditionalDep _lhsOaroundDep _lhsOcProduction _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount+ in __result_ )+ in C_Production_s26 v25+ {-# INLINE rule315 #-}+ {-# LINE 93 "./src-ag/Order.ag" #-}+ rule315 = \ con_ ->+ {-# LINE 93 "./src-ag/Order.ag" #-}+ con_+ {-# LINE 2478 "dist/build/Order.hs"#-}+ {-# INLINE rule316 #-}+ {-# LINE 95 "./src-ag/Order.ag" #-}+ rule316 = \ con_ ->+ {-# LINE 95 "./src-ag/Order.ag" #-}+ con_+ {-# LINE 2484 "dist/build/Order.hs"#-}+ {-# INLINE rule317 #-}+ {-# LINE 175 "./src-ag/Order.ag" #-}+ rule317 = \ ((_childrenIgathAltAttrs) :: [AltAttr]) ((_lhsIinh) :: Attributes) ((_rulesIgathAltAttrs) :: [AltAttr]) ->+ {-# LINE 175 "./src-ag/Order.ag" #-}+ [ AltAttr _LHS inh True | inh <- Map.keys _lhsIinh ]+ ++ _childrenIgathAltAttrs+ ++ _rulesIgathAltAttrs+ {-# LINE 2492 "dist/build/Order.hs"#-}+ {-# INLINE rule318 #-}+ {-# LINE 191 "./src-ag/Order.ag" #-}+ rule318 = \ _gathAltAttrs ((_lhsIvcount) :: Int) ->+ {-# LINE 191 "./src-ag/Order.ag" #-}+ Map.fromList (zip _gathAltAttrs [_lhsIvcount..])+ {-# LINE 2498 "dist/build/Order.hs"#-}+ {-# INLINE rule319 #-}+ {-# LINE 204 "./src-ag/Order.ag" #-}+ rule319 = \ ((_childrenInts) :: Seq (Identifier,NontermIdent)) ->+ {-# LINE 204 "./src-ag/Order.ag" #-}+ Map.fromList (toList _childrenInts)+ {-# LINE 2504 "dist/build/Order.hs"#-}+ {-# INLINE rule320 #-}+ {-# LINE 205 "./src-ag/Order.ag" #-}+ rule320 = \ ((_childrenIinhs) :: Seq (Identifier,Attributes)) ->+ {-# LINE 205 "./src-ag/Order.ag" #-}+ Map.fromList (toList _childrenIinhs)+ {-# LINE 2510 "dist/build/Order.hs"#-}+ {-# INLINE rule321 #-}+ {-# LINE 211 "./src-ag/Order.ag" #-}+ rule321 = \ ((_lhsIinh) :: Attributes) ((_lhsInt) :: Identifier) con_ ->+ {-# LINE 211 "./src-ag/Order.ag" #-}+ [ cRuleLhsInh inh _lhsInt con_ tp | (inh,tp) <- Map.assocs _lhsIinh ]+ {-# LINE 2516 "dist/build/Order.hs"#-}+ {-# INLINE rule322 #-}+ {-# LINE 212 "./src-ag/Order.ag" #-}+ rule322 = \ ((_childrenIgathRules) :: Seq CRule) _inhRules ((_rulesIgathRules) :: Seq CRule) ->+ {-# LINE 212 "./src-ag/Order.ag" #-}+ _inhRules ++ toList (_childrenIgathRules Seq.>< _rulesIgathRules)+ {-# LINE 2522 "dist/build/Order.hs"#-}+ {-# INLINE rule323 #-}+ {-# LINE 264 "./src-ag/Order.ag" #-}+ rule323 = \ _gathRules ((_lhsIvcount) :: Int) ->+ {-# LINE 264 "./src-ag/Order.ag" #-}+ Seq.fromList (zip [_lhsIvcount..] _gathRules)+ {-# LINE 2528 "dist/build/Order.hs"#-}+ {-# INLINE rule324 #-}+ {-# LINE 265 "./src-ag/Order.ag" #-}+ rule324 = \ _gathRules ((_lhsIvcount) :: Int) ->+ {-# LINE 265 "./src-ag/Order.ag" #-}+ _lhsIvcount + length _gathRules+ {-# LINE 2534 "dist/build/Order.hs"#-}+ {-# INLINE rule325 #-}+ {-# LINE 293 "./src-ag/Order.ag" #-}+ rule325 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ((_lhsInt) :: Identifier) con_ ->+ {-# LINE 293 "./src-ag/Order.ag" #-}+ Set.toList $ Map.findWithDefault Set.empty con_ $ Map.findWithDefault Map.empty _lhsInt _lhsImanualAttrDepMap+ {-# LINE 2540 "dist/build/Order.hs"#-}+ {-# INLINE rule326 #-}+ {-# LINE 296 "./src-ag/Order.ag" #-}+ rule326 = \ _altAttrs _manualDeps ->+ {-# LINE 296 "./src-ag/Order.ag" #-}+ Seq.fromList [ (vertex True occA, vertex False occB)+ | Dependency occA occB <- _manualDeps+ , let vertex inout (OccAttr child nm)+ | child == _LOC = findWithErr2 (AltAttr _LOC nm True) _altAttrs+ | otherwise = findWithErr2 (AltAttr child nm inout) _altAttrs+ vertex _ (OccRule nm)+ = findWithErr2 (AltAttr _LOC (Ident ("_rule_" ++ show nm) (getPos nm)) True) _altAttrs+ ]+ {-# LINE 2553 "dist/build/Order.hs"#-}+ {-# INLINE rule327 #-}+ {-# LINE 342 "./src-ag/Order.ag" #-}+ rule327 = \ ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) ->+ {-# LINE 342 "./src-ag/Order.ag" #-}+ _childrenIcollectChildrenSyns+ {-# LINE 2559 "dist/build/Order.hs"#-}+ {-# INLINE rule328 #-}+ {-# LINE 343 "./src-ag/Order.ag" #-}+ rule328 = \ ((_childrenIcollectChildrenInhs) :: Map Identifier Attributes ) ->+ {-# LINE 343 "./src-ag/Order.ag" #-}+ _childrenIcollectChildrenInhs+ {-# LINE 2565 "dist/build/Order.hs"#-}+ {-# INLINE rule329 #-}+ {-# LINE 361 "./src-ag/Order.ag" #-}+ rule329 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) con_ ->+ {-# LINE 361 "./src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsImergeMap+ {-# LINE 2571 "dist/build/Order.hs"#-}+ {-# INLINE rule330 #-}+ {-# LINE 372 "./src-ag/Order.ag" #-}+ rule330 = \ _mergeDep1 _mergeDep2 ->+ {-# LINE 372 "./src-ag/Order.ag" #-}+ _mergeDep1 Seq.>< _mergeDep2+ {-# LINE 2577 "dist/build/Order.hs"#-}+ {-# INLINE rule331 #-}+ {-# LINE 374 "./src-ag/Order.ag" #-}+ rule331 = \ _altAttrs ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) _mergeMap ->+ {-# LINE 374 "./src-ag/Order.ag" #-}+ Seq.fromList $+ [ (childVert, synVert)+ | childNm <- Map.keys _mergeMap+ , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)+ , let childNm' = Ident (show childNm ++ "_merge") (getPos childNm)+ childAttr = AltAttr _LOC childNm' True+ synAttr = AltAttr childNm synNm True+ childVert = findWithErr2 childAttr _altAttrs+ synVert = findWithErr2 synAttr _altAttrs+ ]+ {-# LINE 2592 "dist/build/Order.hs"#-}+ {-# INLINE rule332 #-}+ {-# LINE 385 "./src-ag/Order.ag" #-}+ rule332 = \ _altAttrs ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) _mergeMap ->+ {-# LINE 385 "./src-ag/Order.ag" #-}+ Seq.fromList $+ [ (mergedVert, sourceVert)+ | (childNm, (_,cs)) <- Map.assocs _mergeMap+ , c <- cs+ , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)+ , let sourceAttr = AltAttr childNm synNm True+ mergedAttr = AltAttr c synNm True+ sourceVert = findWithErr2 sourceAttr _altAttrs+ mergedVert = findWithErr2 mergedAttr _altAttrs+ ]+ {-# LINE 2607 "dist/build/Order.hs"#-}+ {-# INLINE rule333 #-}+ {-# LINE 414 "./src-ag/Order.ag" #-}+ rule333 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) con_ ->+ {-# LINE 414 "./src-ag/Order.ag" #-}+ Map.findWithDefault Map.empty con_ _lhsIaroundMap+ {-# LINE 2613 "dist/build/Order.hs"#-}+ {-# INLINE rule334 #-}+ {-# LINE 422 "./src-ag/Order.ag" #-}+ rule334 = \ _altAttrs _aroundMap ((_childrenIcollectChildrenSyns) :: Map Identifier Attributes ) ->+ {-# LINE 422 "./src-ag/Order.ag" #-}+ Seq.fromList $+ [ (childVert, synVert)+ | childNm <- Map.keys _aroundMap+ , synNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenSyns)+ , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)+ childAttr = AltAttr _LOC childNm' True+ synAttr = AltAttr childNm synNm True+ childVert = findWithErr2 childAttr _altAttrs+ synVert = findWithErr2 synAttr _altAttrs+ ]+ {-# LINE 2628 "dist/build/Order.hs"#-}+ {-# INLINE rule335 #-}+ {-# LINE 433 "./src-ag/Order.ag" #-}+ rule335 = \ _altAttrs _aroundMap ((_childrenIcollectChildrenInhs) :: Map Identifier Attributes ) ->+ {-# LINE 433 "./src-ag/Order.ag" #-}+ Seq.fromList $+ [ (childVert, inhVert)+ | childNm <- Map.keys _aroundMap+ , inhNm <- Map.keys (findWithErr2 childNm _childrenIcollectChildrenInhs)+ , let childNm' = Ident (show childNm ++ "_around") (getPos childNm)+ childAttr = AltAttr _LOC childNm' True+ inhAttr = AltAttr childNm inhNm False+ childVert = findWithErr2 childAttr _altAttrs+ inhVert = findWithErr2 inhAttr _altAttrs+ ]+ {-# LINE 2643 "dist/build/Order.hs"#-}+ {-# INLINE rule336 #-}+ {-# LINE 443 "./src-ag/Order.ag" #-}+ rule336 = \ _aroundDep1 _aroundDep2 ->+ {-# LINE 443 "./src-ag/Order.ag" #-}+ _aroundDep1 Seq.>< _aroundDep2+ {-# LINE 2649 "dist/build/Order.hs"#-}+ {-# INLINE rule337 #-}+ {-# LINE 527 "./src-ag/Order.ag" #-}+ rule337 = \ con_ ->+ {-# LINE 527 "./src-ag/Order.ag" #-}+ [con_]+ {-# LINE 2655 "dist/build/Order.hs"#-}+ {-# INLINE rule338 #-}+ {-# LINE 534 "./src-ag/Order.ag" #-}+ rule338 = \ (_ :: ()) ->+ {-# LINE 534 "./src-ag/Order.ag" #-}+ Map.empty+ {-# LINE 2661 "dist/build/Order.hs"#-}+ {-# INLINE rule339 #-}+ {-# LINE 540 "./src-ag/Order.ag" #-}+ rule339 = \ ((_typeSigsItypeSigs) :: Map Identifier Type) ->+ {-# LINE 540 "./src-ag/Order.ag" #-}+ _typeSigsItypeSigs+ {-# LINE 2667 "dist/build/Order.hs"#-}+ {-# INLINE rule340 #-}+ {-# LINE 608 "./src-ag/Order.ag" #-}+ rule340 = \ ((_childrenIsinglevisits) :: [CRule]) _gathRules ((_lhsIcVisitsMap) :: CVisitsMap) ((_lhsIinh) :: Attributes) ((_lhsInt) :: Identifier) ((_lhsIo_dovisit) :: Bool) ((_lhsIsyn) :: Attributes) con_ ->+ {-# LINE 608 "./src-ag/Order.ag" #-}+ if _lhsIo_dovisit+ then let prodsVisitsMap = findWithErr1 "Production.cVisits.nt" _lhsInt _lhsIcVisitsMap+ visits = findWithErr1 "Production.cVisits.con" con_ prodsVisitsMap+ in visits+ else let vss = nubBy eqCRuleDefines _gathRules ++ _childrenIsinglevisits+ in [CVisit _lhsIinh _lhsIsyn vss [] False]+ {-# LINE 2678 "dist/build/Order.hs"#-}+ {-# INLINE rule341 #-}+ {-# LINE 634 "./src-ag/Order.ag" #-}+ rule341 = \ _cVisits ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ((_childrenIterminals) :: [Identifier]) con_ ->+ {-# LINE 634 "./src-ag/Order.ag" #-}+ CProduction con_ _cVisits _childrenIfields _childrenIterminals+ {-# LINE 2684 "dist/build/Order.hs"#-}+ {-# INLINE rule342 #-}+ {-# LINE 662 "./src-ag/Order.ag" #-}+ rule342 = \ ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ->+ {-# LINE 662 "./src-ag/Order.ag" #-}+ _childrenIfields+ {-# LINE 2690 "dist/build/Order.hs"#-}+ {-# INLINE rule343 #-}+ {-# LINE 663 "./src-ag/Order.ag" #-}+ rule343 = \ ((_childrenIattributes) :: [(Identifier,Attributes,Attributes)]) _inhnames ((_rulesIinstVars) :: [Identifier]) ((_rulesIlocVars) :: [Identifier]) ->+ {-# LINE 663 "./src-ag/Order.ag" #-}+ map ((,) _LOC) _rulesIlocVars +++ map ((,) _INST) _rulesIinstVars +++ map ((,) _LHS) _inhnames +++ concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes]+ {-# LINE 2699 "dist/build/Order.hs"#-}+ {-# INLINE rule344 #-}+ {-# LINE 667 "./src-ag/Order.ag" #-}+ rule344 = \ ((_lhsIinh) :: Attributes) ->+ {-# LINE 667 "./src-ag/Order.ag" #-}+ Map.keys _lhsIinh+ {-# LINE 2705 "dist/build/Order.hs"#-}+ {-# INLINE rule345 #-}+ {-# LINE 668 "./src-ag/Order.ag" #-}+ rule345 = \ ((_lhsIsyn) :: Attributes) ->+ {-# LINE 668 "./src-ag/Order.ag" #-}+ Map.keys _lhsIsyn+ {-# LINE 2711 "dist/build/Order.hs"#-}+ {-# INLINE rule346 #-}+ rule346 = \ ((_rulesIdirectDep) :: Seq Edge) ->+ _rulesIdirectDep+ {-# INLINE rule347 #-}+ rule347 = \ ((_childrenIerrors) :: Seq Error) ((_rulesIerrors) :: Seq Error) ->+ _childrenIerrors Seq.>< _rulesIerrors+ {-# INLINE rule348 #-}+ rule348 = \ ((_rulesIinstDep) :: Seq Edge) ->+ _rulesIinstDep+ {-# INLINE rule349 #-}+ rule349 = \ ((_rulesInAutoRules) :: Int) ->+ _rulesInAutoRules+ {-# INLINE rule350 #-}+ rule350 = \ ((_rulesInExplicitRules) :: Int) ->+ _rulesInExplicitRules+ {-# INLINE rule351 #-}+ rule351 = \ _allfields ->+ _allfields+ {-# INLINE rule352 #-}+ rule352 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule353 #-}+ rule353 = \ _attrs ->+ _attrs+ {-# INLINE rule354 #-}+ rule354 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule355 #-}+ rule355 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule356 #-}+ rule356 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule357 #-}+ rule357 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule358 #-}+ rule358 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule359 #-}+ rule359 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule360 #-}+ rule360 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule361 #-}+ rule361 = \ _allfields ->+ _allfields+ {-# INLINE rule362 #-}+ rule362 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule363 #-}+ rule363 = \ _altAttrs ->+ _altAttrs+ {-# INLINE rule364 #-}+ rule364 = \ _attrs ->+ _attrs+ {-# INLINE rule365 #-}+ rule365 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule366 #-}+ rule366 = \ _mergeMap ->+ _mergeMap+ {-# INLINE rule367 #-}+ rule367 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule368 #-}+ rule368 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule369 #-}+ rule369 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule370 #-}+ rule370 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule371 #-}+ rule371 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule372 #-}+ rule372 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule373 #-}+ rule373 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule374 #-}+ rule374 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule375 #-}+ rule375 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule376 #-}+ rule376 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule377 #-}+ rule377 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule378 #-}+ rule378 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn++-- Productions -------------------------------------------------+-- wrapper+data Inh_Productions = Inh_Productions { allnts_Inh_Productions :: ([Identifier]), aroundMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier [Expression])), cVisitsMap_Inh_Productions :: (CVisitsMap), inh_Inh_Productions :: (Attributes), inhMap_Inh_Productions :: (Map Identifier Attributes), manualAttrDepMap_Inh_Productions :: (AttrOrderMap), mergeMap_Inh_Productions :: (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))), nt_Inh_Productions :: (Identifier), o_case_Inh_Productions :: (Bool), o_cata_Inh_Productions :: (Bool), o_dovisit_Inh_Productions :: (Bool), o_newtypes_Inh_Productions :: (Bool), o_rename_Inh_Productions :: (Bool), o_sem_Inh_Productions :: (Bool), o_sig_Inh_Productions :: (Bool), o_unbox_Inh_Productions :: (Bool), o_wantvisit_Inh_Productions :: (Bool), options_Inh_Productions :: (Options), prefix_Inh_Productions :: (String), syn_Inh_Productions :: (Attributes), synMap_Inh_Productions :: (Map Identifier Attributes), vcount_Inh_Productions :: (Int) }+data Syn_Productions = Syn_Productions { additionalDep_Syn_Productions :: (Seq Edge), aroundDep_Syn_Productions :: (Seq Edge), cProductions_Syn_Productions :: (CProductions), cons_Syn_Productions :: ([ConstructorIdent]), directDep_Syn_Productions :: (Seq Edge), errors_Syn_Productions :: (Seq Error), instDep_Syn_Productions :: (Seq Edge), mergeDep_Syn_Productions :: (Seq Edge), nAutoRules_Syn_Productions :: (Int), nExplicitRules_Syn_Productions :: (Int), rules_Syn_Productions :: (Seq (Vertex,CRule)), vcount_Syn_Productions :: (Int) }+{-# INLINABLE wrap_Productions #-}+wrap_Productions :: T_Productions -> Inh_Productions -> (Syn_Productions )+wrap_Productions (T_Productions act) (Inh_Productions _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Productions_vIn28 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount+ (T_Productions_vOut28 _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount) <- return (inv_Productions_s29 sem arg)+ return (Syn_Productions _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount)+ )++-- cata+{-# NOINLINE sem_Productions #-}+sem_Productions :: Productions -> T_Productions +sem_Productions list = Prelude.foldr sem_Productions_Cons sem_Productions_Nil (Prelude.map sem_Production list)++-- semantic domain+newtype T_Productions = T_Productions {+ attach_T_Productions :: Identity (T_Productions_s29 )+ }+newtype T_Productions_s29 = C_Productions_s29 {+ inv_Productions_s29 :: (T_Productions_v28 )+ }+data T_Productions_s30 = C_Productions_s30+type T_Productions_v28 = (T_Productions_vIn28 ) -> (T_Productions_vOut28 )+data T_Productions_vIn28 = T_Productions_vIn28 ([Identifier]) (Map ConstructorIdent (Map Identifier [Expression])) (CVisitsMap) (Attributes) (Map Identifier Attributes) (AttrOrderMap) (Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes) (Int)+data T_Productions_vOut28 = T_Productions_vOut28 (Seq Edge) (Seq Edge) (CProductions) ([ConstructorIdent]) (Seq Edge) (Seq Error) (Seq Edge) (Seq Edge) (Int) (Int) (Seq (Vertex,CRule)) (Int)+{-# NOINLINE sem_Productions_Cons #-}+sem_Productions_Cons :: T_Production -> T_Productions -> T_Productions +sem_Productions_Cons arg_hd_ arg_tl_ = T_Productions (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_Productions_v28 + v28 = \ (T_Productions_vIn28 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) -> ( let+ _hdX26 = Control.Monad.Identity.runIdentity (attach_T_Production (arg_hd_))+ _tlX29 = Control.Monad.Identity.runIdentity (attach_T_Productions (arg_tl_))+ (T_Production_vOut25 _hdIadditionalDep _hdIaroundDep _hdIcProduction _hdIcons _hdIdirectDep _hdIerrors _hdIinstDep _hdImergeDep _hdInAutoRules _hdInExplicitRules _hdIrules _hdIvcount) = inv_Production_s26 _hdX26 (T_Production_vIn25 _hdOallnts _hdOaroundMap _hdOcVisitsMap _hdOinh _hdOinhMap _hdOmanualAttrDepMap _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_unbox _hdOo_wantvisit _hdOoptions _hdOprefix _hdOsyn _hdOsynMap _hdOvcount)+ (T_Productions_vOut28 _tlIadditionalDep _tlIaroundDep _tlIcProductions _tlIcons _tlIdirectDep _tlIerrors _tlIinstDep _tlImergeDep _tlInAutoRules _tlInExplicitRules _tlIrules _tlIvcount) = inv_Productions_s29 _tlX29 (T_Productions_vIn28 _tlOallnts _tlOaroundMap _tlOcVisitsMap _tlOinh _tlOinhMap _tlOmanualAttrDepMap _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_unbox _tlOo_wantvisit _tlOoptions _tlOprefix _tlOsyn _tlOsynMap _tlOvcount)+ _lhsOcProductions :: CProductions+ _lhsOcProductions = rule379 _hdIcProduction _tlIcProductions+ _lhsOadditionalDep :: Seq Edge+ _lhsOadditionalDep = rule380 _hdIadditionalDep _tlIadditionalDep+ _lhsOaroundDep :: Seq Edge+ _lhsOaroundDep = rule381 _hdIaroundDep _tlIaroundDep+ _lhsOcons :: [ConstructorIdent]+ _lhsOcons = rule382 _hdIcons _tlIcons+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule383 _hdIdirectDep _tlIdirectDep+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule384 _hdIerrors _tlIerrors+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule385 _hdIinstDep _tlIinstDep+ _lhsOmergeDep :: Seq Edge+ _lhsOmergeDep = rule386 _hdImergeDep _tlImergeDep+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule387 _hdInAutoRules _tlInAutoRules+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule388 _hdInExplicitRules _tlInExplicitRules+ _lhsOrules :: Seq (Vertex,CRule)+ _lhsOrules = rule389 _hdIrules _tlIrules+ _lhsOvcount :: Int+ _lhsOvcount = rule390 _tlIvcount+ _hdOallnts = rule391 _lhsIallnts+ _hdOaroundMap = rule392 _lhsIaroundMap+ _hdOcVisitsMap = rule393 _lhsIcVisitsMap+ _hdOinh = rule394 _lhsIinh+ _hdOinhMap = rule395 _lhsIinhMap+ _hdOmanualAttrDepMap = rule396 _lhsImanualAttrDepMap+ _hdOmergeMap = rule397 _lhsImergeMap+ _hdOnt = rule398 _lhsInt+ _hdOo_case = rule399 _lhsIo_case+ _hdOo_cata = rule400 _lhsIo_cata+ _hdOo_dovisit = rule401 _lhsIo_dovisit+ _hdOo_newtypes = rule402 _lhsIo_newtypes+ _hdOo_rename = rule403 _lhsIo_rename+ _hdOo_sem = rule404 _lhsIo_sem+ _hdOo_sig = rule405 _lhsIo_sig+ _hdOo_unbox = rule406 _lhsIo_unbox+ _hdOo_wantvisit = rule407 _lhsIo_wantvisit+ _hdOoptions = rule408 _lhsIoptions+ _hdOprefix = rule409 _lhsIprefix+ _hdOsyn = rule410 _lhsIsyn+ _hdOsynMap = rule411 _lhsIsynMap+ _hdOvcount = rule412 _lhsIvcount+ _tlOallnts = rule413 _lhsIallnts+ _tlOaroundMap = rule414 _lhsIaroundMap+ _tlOcVisitsMap = rule415 _lhsIcVisitsMap+ _tlOinh = rule416 _lhsIinh+ _tlOinhMap = rule417 _lhsIinhMap+ _tlOmanualAttrDepMap = rule418 _lhsImanualAttrDepMap+ _tlOmergeMap = rule419 _lhsImergeMap+ _tlOnt = rule420 _lhsInt+ _tlOo_case = rule421 _lhsIo_case+ _tlOo_cata = rule422 _lhsIo_cata+ _tlOo_dovisit = rule423 _lhsIo_dovisit+ _tlOo_newtypes = rule424 _lhsIo_newtypes+ _tlOo_rename = rule425 _lhsIo_rename+ _tlOo_sem = rule426 _lhsIo_sem+ _tlOo_sig = rule427 _lhsIo_sig+ _tlOo_unbox = rule428 _lhsIo_unbox+ _tlOo_wantvisit = rule429 _lhsIo_wantvisit+ _tlOoptions = rule430 _lhsIoptions+ _tlOprefix = rule431 _lhsIprefix+ _tlOsyn = rule432 _lhsIsyn+ _tlOsynMap = rule433 _lhsIsynMap+ _tlOvcount = rule434 _hdIvcount+ __result_ = T_Productions_vOut28 _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount+ in __result_ )+ in C_Productions_s29 v28+ {-# INLINE rule379 #-}+ {-# LINE 631 "./src-ag/Order.ag" #-}+ rule379 = \ ((_hdIcProduction) :: CProduction) ((_tlIcProductions) :: CProductions) ->+ {-# LINE 631 "./src-ag/Order.ag" #-}+ _hdIcProduction : _tlIcProductions+ {-# LINE 2929 "dist/build/Order.hs"#-}+ {-# INLINE rule380 #-}+ rule380 = \ ((_hdIadditionalDep) :: Seq Edge) ((_tlIadditionalDep) :: Seq Edge) ->+ _hdIadditionalDep Seq.>< _tlIadditionalDep+ {-# INLINE rule381 #-}+ rule381 = \ ((_hdIaroundDep) :: Seq Edge) ((_tlIaroundDep) :: Seq Edge) ->+ _hdIaroundDep Seq.>< _tlIaroundDep+ {-# INLINE rule382 #-}+ rule382 = \ ((_hdIcons) :: [ConstructorIdent]) ((_tlIcons) :: [ConstructorIdent]) ->+ _hdIcons ++ _tlIcons+ {-# INLINE rule383 #-}+ rule383 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# INLINE rule384 #-}+ rule384 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule385 #-}+ rule385 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->+ _hdIinstDep Seq.>< _tlIinstDep+ {-# INLINE rule386 #-}+ rule386 = \ ((_hdImergeDep) :: Seq Edge) ((_tlImergeDep) :: Seq Edge) ->+ _hdImergeDep Seq.>< _tlImergeDep+ {-# INLINE rule387 #-}+ rule387 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->+ _hdInAutoRules + _tlInAutoRules+ {-# INLINE rule388 #-}+ rule388 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->+ _hdInExplicitRules + _tlInExplicitRules+ {-# INLINE rule389 #-}+ rule389 = \ ((_hdIrules) :: Seq (Vertex,CRule)) ((_tlIrules) :: Seq (Vertex,CRule)) ->+ _hdIrules Seq.>< _tlIrules+ {-# INLINE rule390 #-}+ rule390 = \ ((_tlIvcount) :: Int) ->+ _tlIvcount+ {-# INLINE rule391 #-}+ rule391 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule392 #-}+ rule392 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->+ _lhsIaroundMap+ {-# INLINE rule393 #-}+ rule393 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->+ _lhsIcVisitsMap+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule395 #-}+ rule395 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule396 #-}+ rule396 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->+ _lhsImanualAttrDepMap+ {-# INLINE rule397 #-}+ rule397 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ _lhsImergeMap+ {-# INLINE rule398 #-}+ rule398 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule399 #-}+ rule399 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule400 #-}+ rule400 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule401 #-}+ rule401 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule402 #-}+ rule402 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule403 #-}+ rule403 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule404 #-}+ rule404 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule405 #-}+ rule405 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule406 #-}+ rule406 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule407 #-}+ rule407 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule408 #-}+ rule408 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule409 #-}+ rule409 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule410 #-}+ rule410 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule411 #-}+ rule411 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule412 #-}+ rule412 = \ ((_lhsIvcount) :: Int) ->+ _lhsIvcount+ {-# INLINE rule413 #-}+ rule413 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule414 #-}+ rule414 = \ ((_lhsIaroundMap) :: Map ConstructorIdent (Map Identifier [Expression])) ->+ _lhsIaroundMap+ {-# INLINE rule415 #-}+ rule415 = \ ((_lhsIcVisitsMap) :: CVisitsMap) ->+ _lhsIcVisitsMap+ {-# INLINE rule416 #-}+ rule416 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule417 #-}+ rule417 = \ ((_lhsIinhMap) :: Map Identifier Attributes) ->+ _lhsIinhMap+ {-# INLINE rule418 #-}+ rule418 = \ ((_lhsImanualAttrDepMap) :: AttrOrderMap) ->+ _lhsImanualAttrDepMap+ {-# INLINE rule419 #-}+ rule419 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) ->+ _lhsImergeMap+ {-# INLINE rule420 #-}+ rule420 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule421 #-}+ rule421 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule422 #-}+ rule422 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule423 #-}+ rule423 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule424 #-}+ rule424 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule425 #-}+ rule425 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule426 #-}+ rule426 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule427 #-}+ rule427 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule428 #-}+ rule428 = \ ((_lhsIo_unbox) :: Bool) ->+ _lhsIo_unbox+ {-# INLINE rule429 #-}+ rule429 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule430 #-}+ rule430 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule431 #-}+ rule431 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule432 #-}+ rule432 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule433 #-}+ rule433 = \ ((_lhsIsynMap) :: Map Identifier Attributes) ->+ _lhsIsynMap+ {-# INLINE rule434 #-}+ rule434 = \ ((_hdIvcount) :: Int) ->+ _hdIvcount+{-# NOINLINE sem_Productions_Nil #-}+sem_Productions_Nil :: T_Productions +sem_Productions_Nil = T_Productions (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_Productions_v28 + v28 = \ (T_Productions_vIn28 _lhsIallnts _lhsIaroundMap _lhsIcVisitsMap _lhsIinh _lhsIinhMap _lhsImanualAttrDepMap _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_unbox _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynMap _lhsIvcount) -> ( let+ _lhsOcProductions :: CProductions+ _lhsOcProductions = rule435 ()+ _lhsOadditionalDep :: Seq Edge+ _lhsOadditionalDep = rule436 ()+ _lhsOaroundDep :: Seq Edge+ _lhsOaroundDep = rule437 ()+ _lhsOcons :: [ConstructorIdent]+ _lhsOcons = rule438 ()+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule439 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule440 ()+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule441 ()+ _lhsOmergeDep :: Seq Edge+ _lhsOmergeDep = rule442 ()+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule443 ()+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule444 ()+ _lhsOrules :: Seq (Vertex,CRule)+ _lhsOrules = rule445 ()+ _lhsOvcount :: Int+ _lhsOvcount = rule446 _lhsIvcount+ __result_ = T_Productions_vOut28 _lhsOadditionalDep _lhsOaroundDep _lhsOcProductions _lhsOcons _lhsOdirectDep _lhsOerrors _lhsOinstDep _lhsOmergeDep _lhsOnAutoRules _lhsOnExplicitRules _lhsOrules _lhsOvcount+ in __result_ )+ in C_Productions_s29 v28+ {-# INLINE rule435 #-}+ {-# LINE 632 "./src-ag/Order.ag" #-}+ rule435 = \ (_ :: ()) ->+ {-# LINE 632 "./src-ag/Order.ag" #-}+ []+ {-# LINE 3134 "dist/build/Order.hs"#-}+ {-# INLINE rule436 #-}+ rule436 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule437 #-}+ rule437 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule438 #-}+ rule438 = \ (_ :: ()) ->+ []+ {-# INLINE rule439 #-}+ rule439 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule440 #-}+ rule440 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule441 #-}+ rule441 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule442 #-}+ rule442 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule443 #-}+ rule443 = \ (_ :: ()) ->+ 0+ {-# INLINE rule444 #-}+ rule444 = \ (_ :: ()) ->+ 0+ {-# INLINE rule445 #-}+ rule445 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule446 #-}+ rule446 = \ ((_lhsIvcount) :: Int) ->+ _lhsIvcount++-- Rule --------------------------------------------------------+-- wrapper+data Inh_Rule = Inh_Rule { allTypeSigs_Inh_Rule :: (Map Identifier Type), allfields_Inh_Rule :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Rule :: ([Identifier]), altAttrs_Inh_Rule :: (Map AltAttr Vertex), attrs_Inh_Rule :: ([(Identifier,Identifier)]), childInhs_Inh_Rule :: (Map Identifier Attributes), childNts_Inh_Rule :: (Map Identifier NontermIdent), con_Inh_Rule :: (Identifier), inh_Inh_Rule :: (Attributes), inhsOfChildren_Inh_Rule :: (Map Identifier Attributes), mergeMap_Inh_Rule :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Rule :: (Identifier), o_case_Inh_Rule :: (Bool), o_cata_Inh_Rule :: (Bool), o_dovisit_Inh_Rule :: (Bool), o_newtypes_Inh_Rule :: (Bool), o_rename_Inh_Rule :: (Bool), o_sem_Inh_Rule :: (Bool), o_sig_Inh_Rule :: (Bool), o_wantvisit_Inh_Rule :: (Bool), options_Inh_Rule :: (Options), prefix_Inh_Rule :: (String), syn_Inh_Rule :: (Attributes), synsOfChildren_Inh_Rule :: (Map Identifier Attributes) }+data Syn_Rule = Syn_Rule { directDep_Syn_Rule :: (Seq Edge), errors_Syn_Rule :: (Seq Error), gathAltAttrs_Syn_Rule :: ([AltAttr]), gathRules_Syn_Rule :: (Seq CRule), instDep_Syn_Rule :: (Seq Edge), instVars_Syn_Rule :: ([Identifier]), locVars_Syn_Rule :: ([Identifier]), nAutoRules_Syn_Rule :: (Int), nExplicitRules_Syn_Rule :: (Int) }+{-# INLINABLE wrap_Rule #-}+wrap_Rule :: T_Rule -> Inh_Rule -> (Syn_Rule )+wrap_Rule (T_Rule act) (Inh_Rule _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Rule_vIn31 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren+ (T_Rule_vOut31 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules) <- return (inv_Rule_s32 sem arg)+ return (Syn_Rule _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules)+ )++-- cata+{-# INLINE sem_Rule #-}+sem_Rule :: Rule -> T_Rule +sem_Rule ( Rule mbName_ pattern_ rhs_ owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_ ) = sem_Rule_Rule mbName_ ( sem_Pattern pattern_ ) ( sem_Expression rhs_ ) owrt_ origin_ explicit_ pure_ identity_ mbError_ eager_++-- semantic domain+newtype T_Rule = T_Rule {+ attach_T_Rule :: Identity (T_Rule_s32 )+ }+newtype T_Rule_s32 = C_Rule_s32 {+ inv_Rule_s32 :: (T_Rule_v31 )+ }+data T_Rule_s33 = C_Rule_s33+type T_Rule_v31 = (T_Rule_vIn31 ) -> (T_Rule_vOut31 )+data T_Rule_vIn31 = T_Rule_vIn31 (Map Identifier Type) ([(Identifier,Type,ChildKind)]) ([Identifier]) (Map AltAttr Vertex) ([(Identifier,Identifier)]) (Map Identifier Attributes) (Map Identifier NontermIdent) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes)+data T_Rule_vOut31 = T_Rule_vOut31 (Seq Edge) (Seq Error) ([AltAttr]) (Seq CRule) (Seq Edge) ([Identifier]) ([Identifier]) (Int) (Int)+{-# 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 arg_mbName_ arg_pattern_ arg_rhs_ arg_owrt_ arg_origin_ arg_explicit_ _ _ _ _ = T_Rule (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_Rule_v31 + v31 = \ (T_Rule_vIn31 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) -> ( let+ _patternX20 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))+ _rhsX8 = Control.Monad.Identity.runIdentity (attach_T_Expression (arg_rhs_))+ (T_Pattern_vOut19 _patternIcopy _patternIerrors _patternIgathAltAttrs _patternIinstVars _patternIlocVars _patternIpatternAttrs) = inv_Pattern_s20 _patternX20 (T_Pattern_vIn19 _patternOallTypeSigs _patternOaltAttrs _patternOcon _patternOinh _patternOnt _patternOsyn)+ (T_Expression_vOut7 _rhsIallRhsVars _rhsIcopy _rhsIerrors _rhsItextLines _rhsIusedAttrs _rhsIusedFields _rhsIusedLocals) = inv_Expression_s8 _rhsX8 (T_Expression_vIn7 _rhsOallfields _rhsOallnts _rhsOattrs _rhsOcon _rhsOmergeMap _rhsOnt _rhsOoptions)+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule447 arg_explicit_+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule448 arg_origin_+ _defines = rule449 _lhsIallTypeSigs _lhsIaltAttrs _lhsIchildInhs _lhsIsyn _patternIpatternAttrs+ _gathRules = rule450 _defines _lhsIchildNts _lhsIcon _lhsInt _patternIcopy _rhsIallRhsVars _rhsItextLines arg_explicit_ arg_mbName_ arg_origin_ arg_owrt_+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule451 _defines _lhsIaltAttrs _rhsIusedAttrs _rhsIusedFields _rhsIusedLocals+ _instDep1 = rule452 _defines _lhsIaltAttrs _lhsIsynsOfChildren+ _instDep2 = rule453 _defines _lhsIaltAttrs _lhsIinhsOfChildren+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule454 _instDep1 _instDep2+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule455 _patternIerrors _rhsIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule456 _patternIgathAltAttrs+ _lhsOgathRules :: Seq CRule+ _lhsOgathRules = rule457 _gathRules+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule458 _patternIinstVars+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule459 _patternIlocVars+ _patternOallTypeSigs = rule460 _lhsIallTypeSigs+ _patternOaltAttrs = rule461 _lhsIaltAttrs+ _patternOcon = rule462 _lhsIcon+ _patternOinh = rule463 _lhsIinh+ _patternOnt = rule464 _lhsInt+ _patternOsyn = rule465 _lhsIsyn+ _rhsOallfields = rule466 _lhsIallfields+ _rhsOallnts = rule467 _lhsIallnts+ _rhsOattrs = rule468 _lhsIattrs+ _rhsOcon = rule469 _lhsIcon+ _rhsOmergeMap = rule470 _lhsImergeMap+ _rhsOnt = rule471 _lhsInt+ _rhsOoptions = rule472 _lhsIoptions+ __result_ = T_Rule_vOut31 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules+ in __result_ )+ in C_Rule_s32 v31+ {-# INLINE rule447 #-}+ {-# LINE 64 "./src-ag/Order.ag" #-}+ rule447 = \ explicit_ ->+ {-# LINE 64 "./src-ag/Order.ag" #-}+ if explicit_+ then 1+ else 0+ {-# LINE 3255 "dist/build/Order.hs"#-}+ {-# INLINE rule448 #-}+ {-# LINE 67 "./src-ag/Order.ag" #-}+ rule448 = \ origin_ ->+ {-# LINE 67 "./src-ag/Order.ag" #-}+ if startsWith "use rule" origin_ || startsWith "copy rule" origin_+ then 1+ else 0+ {-# LINE 3263 "dist/build/Order.hs"#-}+ {-# INLINE rule449 #-}+ {-# LINE 220 "./src-ag/Order.ag" #-}+ rule449 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIchildInhs) :: Map Identifier Attributes) ((_lhsIsyn) :: Attributes) ((_patternIpatternAttrs) :: [(Identifier,Identifier,Bool)]) ->+ {-# LINE 220 "./src-ag/Order.ag" #-}+ let tp field attr | field == _LOC || field == _INST+ = Map.lookup attr _lhsIallTypeSigs+ | field == _LHS = Map.lookup attr _lhsIsyn+ | otherwise = Map.lookup attr (findWithErr1 "Rule.defines.tp" field _lhsIchildInhs)+ typ :: Pattern -> Maybe Type+ typ (Alias field attr _) = tp field attr+ typ (Underscore _) = Nothing+ typ _ = Nothing+ in Map.fromList [ (findWithErr1 "Rule.defines" aa _lhsIaltAttrs, (field,attr,(tp field attr)))+ | (field,attr,isLocalOrInst) <- _patternIpatternAttrs+ , let aa = AltAttr field attr isLocalOrInst+ ]+ {-# LINE 3280 "dist/build/Order.hs"#-}+ {-# INLINE rule450 #-}+ {-# LINE 234 "./src-ag/Order.ag" #-}+ rule450 = \ _defines ((_lhsIchildNts) :: Map Identifier NontermIdent) ((_lhsIcon) :: Identifier) ((_lhsInt) :: Identifier) ((_patternIcopy) :: Pattern) ((_rhsIallRhsVars) :: Set (Identifier,Identifier)) ((_rhsItextLines) :: [String]) explicit_ mbName_ origin_ owrt_ ->+ {-# LINE 234 "./src-ag/Order.ag" #-}+ let childnt field = Map.lookup field _lhsIchildNts+ in Seq.fromList [ CRule attr False True _lhsInt _lhsIcon field (childnt field) tp _patternIcopy _rhsItextLines _defines owrt_ origin_ _rhsIallRhsVars explicit_ mbName_+ | (field,attr,tp) <- Map.elems _defines+ ]+ {-# LINE 3289 "dist/build/Order.hs"#-}+ {-# INLINE rule451 #-}+ {-# LINE 273 "./src-ag/Order.ag" #-}+ rule451 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_rhsIusedAttrs) :: [(Identifier,Identifier)]) ((_rhsIusedFields) :: [Identifier]) ((_rhsIusedLocals) :: [Identifier]) ->+ {-# LINE 273 "./src-ag/Order.ag" #-}+ let defined = Map.keys _defines+ used = [ Map.lookup (AltAttr field attr True) _lhsIaltAttrs | (field,attr) <- _rhsIusedAttrs]+ ++ [ Map.lookup (AltAttr _LOC attr True) _lhsIaltAttrs | attr <- _rhsIusedLocals ++ _rhsIusedFields ]+ in Seq.fromList [ (x,y) | Just x <- used, y <- defined ]+ {-# LINE 3298 "dist/build/Order.hs"#-}+ {-# INLINE rule452 #-}+ {-# LINE 317 "./src-ag/Order.ag" #-}+ rule452 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->+ {-# LINE 317 "./src-ag/Order.ag" #-}+ Seq.fromList $+ [ (instVert, synVert)+ | (field,instNm,_) <- Map.elems _defines+ , field == _INST+ , synNm <- Map.keys (findWithErr2 instNm _lhsIsynsOfChildren)+ , let instAttr = AltAttr _INST instNm True+ synAttr = AltAttr instNm synNm True+ instVert = findWithErr2 instAttr _lhsIaltAttrs+ synVert = findWithErr2 synAttr _lhsIaltAttrs+ ]+ {-# LINE 3313 "dist/build/Order.hs"#-}+ {-# INLINE rule453 #-}+ {-# LINE 328 "./src-ag/Order.ag" #-}+ rule453 = \ _defines ((_lhsIaltAttrs) :: Map AltAttr Vertex) ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->+ {-# LINE 328 "./src-ag/Order.ag" #-}+ Seq.fromList $+ [ (instVert, inhVert)+ | (field,instNm,_) <- Map.elems _defines+ , field == _INST+ , inhNm <- Map.keys (findWithErr2 instNm _lhsIinhsOfChildren)+ , let instAttr = AltAttr _INST instNm True+ inhAttr = AltAttr instNm inhNm False+ instVert = findWithErr2 instAttr _lhsIaltAttrs+ inhVert = findWithErr2 inhAttr _lhsIaltAttrs+ ]+ {-# LINE 3328 "dist/build/Order.hs"#-}+ {-# INLINE rule454 #-}+ {-# LINE 338 "./src-ag/Order.ag" #-}+ rule454 = \ _instDep1 _instDep2 ->+ {-# LINE 338 "./src-ag/Order.ag" #-}+ _instDep1 Seq.>< _instDep2+ {-# LINE 3334 "dist/build/Order.hs"#-}+ {-# INLINE rule455 #-}+ rule455 = \ ((_patternIerrors) :: Seq Error) ((_rhsIerrors) :: Seq Error) ->+ _patternIerrors Seq.>< _rhsIerrors+ {-# INLINE rule456 #-}+ rule456 = \ ((_patternIgathAltAttrs) :: [AltAttr]) ->+ _patternIgathAltAttrs+ {-# INLINE rule457 #-}+ rule457 = \ _gathRules ->+ _gathRules+ {-# INLINE rule458 #-}+ rule458 = \ ((_patternIinstVars) :: [Identifier]) ->+ _patternIinstVars+ {-# INLINE rule459 #-}+ rule459 = \ ((_patternIlocVars) :: [Identifier]) ->+ _patternIlocVars+ {-# INLINE rule460 #-}+ rule460 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule461 #-}+ rule461 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule462 #-}+ rule462 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule463 #-}+ rule463 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule464 #-}+ rule464 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule465 #-}+ rule465 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule466 #-}+ rule466 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIallfields+ {-# INLINE rule467 #-}+ rule467 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule468 #-}+ rule468 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ _lhsIattrs+ {-# INLINE rule469 #-}+ rule469 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule470 #-}+ rule470 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule471 #-}+ rule471 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule472 #-}+ rule472 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Rules -------------------------------------------------------+-- wrapper+data Inh_Rules = Inh_Rules { allTypeSigs_Inh_Rules :: (Map Identifier Type), allfields_Inh_Rules :: ([(Identifier,Type,ChildKind)]), allnts_Inh_Rules :: ([Identifier]), altAttrs_Inh_Rules :: (Map AltAttr Vertex), attrs_Inh_Rules :: ([(Identifier,Identifier)]), childInhs_Inh_Rules :: (Map Identifier Attributes), childNts_Inh_Rules :: (Map Identifier NontermIdent), con_Inh_Rules :: (Identifier), inh_Inh_Rules :: (Attributes), inhsOfChildren_Inh_Rules :: (Map Identifier Attributes), mergeMap_Inh_Rules :: (Map Identifier (Identifier,[Identifier])), nt_Inh_Rules :: (Identifier), o_case_Inh_Rules :: (Bool), o_cata_Inh_Rules :: (Bool), o_dovisit_Inh_Rules :: (Bool), o_newtypes_Inh_Rules :: (Bool), o_rename_Inh_Rules :: (Bool), o_sem_Inh_Rules :: (Bool), o_sig_Inh_Rules :: (Bool), o_wantvisit_Inh_Rules :: (Bool), options_Inh_Rules :: (Options), prefix_Inh_Rules :: (String), syn_Inh_Rules :: (Attributes), synsOfChildren_Inh_Rules :: (Map Identifier Attributes) }+data Syn_Rules = Syn_Rules { directDep_Syn_Rules :: (Seq Edge), errors_Syn_Rules :: (Seq Error), gathAltAttrs_Syn_Rules :: ([AltAttr]), gathRules_Syn_Rules :: (Seq CRule), instDep_Syn_Rules :: (Seq Edge), instVars_Syn_Rules :: ([Identifier]), locVars_Syn_Rules :: ([Identifier]), nAutoRules_Syn_Rules :: (Int), nExplicitRules_Syn_Rules :: (Int) }+{-# INLINABLE wrap_Rules #-}+wrap_Rules :: T_Rules -> Inh_Rules -> (Syn_Rules )+wrap_Rules (T_Rules act) (Inh_Rules _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Rules_vIn34 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren+ (T_Rules_vOut34 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules) <- return (inv_Rules_s35 sem arg)+ return (Syn_Rules _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules)+ )++-- cata+{-# NOINLINE sem_Rules #-}+sem_Rules :: Rules -> T_Rules +sem_Rules list = Prelude.foldr sem_Rules_Cons sem_Rules_Nil (Prelude.map sem_Rule list)++-- semantic domain+newtype T_Rules = T_Rules {+ attach_T_Rules :: Identity (T_Rules_s35 )+ }+newtype T_Rules_s35 = C_Rules_s35 {+ inv_Rules_s35 :: (T_Rules_v34 )+ }+data T_Rules_s36 = C_Rules_s36+type T_Rules_v34 = (T_Rules_vIn34 ) -> (T_Rules_vOut34 )+data T_Rules_vIn34 = T_Rules_vIn34 (Map Identifier Type) ([(Identifier,Type,ChildKind)]) ([Identifier]) (Map AltAttr Vertex) ([(Identifier,Identifier)]) (Map Identifier Attributes) (Map Identifier NontermIdent) (Identifier) (Attributes) (Map Identifier Attributes) (Map Identifier (Identifier,[Identifier])) (Identifier) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Bool) (Options) (String) (Attributes) (Map Identifier Attributes)+data T_Rules_vOut34 = T_Rules_vOut34 (Seq Edge) (Seq Error) ([AltAttr]) (Seq CRule) (Seq Edge) ([Identifier]) ([Identifier]) (Int) (Int)+{-# NOINLINE sem_Rules_Cons #-}+sem_Rules_Cons :: T_Rule -> T_Rules -> T_Rules +sem_Rules_Cons arg_hd_ arg_tl_ = T_Rules (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_Rules_v34 + v34 = \ (T_Rules_vIn34 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) -> ( let+ _hdX32 = Control.Monad.Identity.runIdentity (attach_T_Rule (arg_hd_))+ _tlX35 = Control.Monad.Identity.runIdentity (attach_T_Rules (arg_tl_))+ (T_Rule_vOut31 _hdIdirectDep _hdIerrors _hdIgathAltAttrs _hdIgathRules _hdIinstDep _hdIinstVars _hdIlocVars _hdInAutoRules _hdInExplicitRules) = inv_Rule_s32 _hdX32 (T_Rule_vIn31 _hdOallTypeSigs _hdOallfields _hdOallnts _hdOaltAttrs _hdOattrs _hdOchildInhs _hdOchildNts _hdOcon _hdOinh _hdOinhsOfChildren _hdOmergeMap _hdOnt _hdOo_case _hdOo_cata _hdOo_dovisit _hdOo_newtypes _hdOo_rename _hdOo_sem _hdOo_sig _hdOo_wantvisit _hdOoptions _hdOprefix _hdOsyn _hdOsynsOfChildren)+ (T_Rules_vOut34 _tlIdirectDep _tlIerrors _tlIgathAltAttrs _tlIgathRules _tlIinstDep _tlIinstVars _tlIlocVars _tlInAutoRules _tlInExplicitRules) = inv_Rules_s35 _tlX35 (T_Rules_vIn34 _tlOallTypeSigs _tlOallfields _tlOallnts _tlOaltAttrs _tlOattrs _tlOchildInhs _tlOchildNts _tlOcon _tlOinh _tlOinhsOfChildren _tlOmergeMap _tlOnt _tlOo_case _tlOo_cata _tlOo_dovisit _tlOo_newtypes _tlOo_rename _tlOo_sem _tlOo_sig _tlOo_wantvisit _tlOoptions _tlOprefix _tlOsyn _tlOsynsOfChildren)+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule473 _hdIdirectDep _tlIdirectDep+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule474 _hdIerrors _tlIerrors+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule475 _hdIgathAltAttrs _tlIgathAltAttrs+ _lhsOgathRules :: Seq CRule+ _lhsOgathRules = rule476 _hdIgathRules _tlIgathRules+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule477 _hdIinstDep _tlIinstDep+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule478 _hdIinstVars _tlIinstVars+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule479 _hdIlocVars _tlIlocVars+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule480 _hdInAutoRules _tlInAutoRules+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule481 _hdInExplicitRules _tlInExplicitRules+ _hdOallTypeSigs = rule482 _lhsIallTypeSigs+ _hdOallfields = rule483 _lhsIallfields+ _hdOallnts = rule484 _lhsIallnts+ _hdOaltAttrs = rule485 _lhsIaltAttrs+ _hdOattrs = rule486 _lhsIattrs+ _hdOchildInhs = rule487 _lhsIchildInhs+ _hdOchildNts = rule488 _lhsIchildNts+ _hdOcon = rule489 _lhsIcon+ _hdOinh = rule490 _lhsIinh+ _hdOinhsOfChildren = rule491 _lhsIinhsOfChildren+ _hdOmergeMap = rule492 _lhsImergeMap+ _hdOnt = rule493 _lhsInt+ _hdOo_case = rule494 _lhsIo_case+ _hdOo_cata = rule495 _lhsIo_cata+ _hdOo_dovisit = rule496 _lhsIo_dovisit+ _hdOo_newtypes = rule497 _lhsIo_newtypes+ _hdOo_rename = rule498 _lhsIo_rename+ _hdOo_sem = rule499 _lhsIo_sem+ _hdOo_sig = rule500 _lhsIo_sig+ _hdOo_wantvisit = rule501 _lhsIo_wantvisit+ _hdOoptions = rule502 _lhsIoptions+ _hdOprefix = rule503 _lhsIprefix+ _hdOsyn = rule504 _lhsIsyn+ _hdOsynsOfChildren = rule505 _lhsIsynsOfChildren+ _tlOallTypeSigs = rule506 _lhsIallTypeSigs+ _tlOallfields = rule507 _lhsIallfields+ _tlOallnts = rule508 _lhsIallnts+ _tlOaltAttrs = rule509 _lhsIaltAttrs+ _tlOattrs = rule510 _lhsIattrs+ _tlOchildInhs = rule511 _lhsIchildInhs+ _tlOchildNts = rule512 _lhsIchildNts+ _tlOcon = rule513 _lhsIcon+ _tlOinh = rule514 _lhsIinh+ _tlOinhsOfChildren = rule515 _lhsIinhsOfChildren+ _tlOmergeMap = rule516 _lhsImergeMap+ _tlOnt = rule517 _lhsInt+ _tlOo_case = rule518 _lhsIo_case+ _tlOo_cata = rule519 _lhsIo_cata+ _tlOo_dovisit = rule520 _lhsIo_dovisit+ _tlOo_newtypes = rule521 _lhsIo_newtypes+ _tlOo_rename = rule522 _lhsIo_rename+ _tlOo_sem = rule523 _lhsIo_sem+ _tlOo_sig = rule524 _lhsIo_sig+ _tlOo_wantvisit = rule525 _lhsIo_wantvisit+ _tlOoptions = rule526 _lhsIoptions+ _tlOprefix = rule527 _lhsIprefix+ _tlOsyn = rule528 _lhsIsyn+ _tlOsynsOfChildren = rule529 _lhsIsynsOfChildren+ __result_ = T_Rules_vOut34 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules+ in __result_ )+ in C_Rules_s35 v34+ {-# INLINE rule473 #-}+ rule473 = \ ((_hdIdirectDep) :: Seq Edge) ((_tlIdirectDep) :: Seq Edge) ->+ _hdIdirectDep Seq.>< _tlIdirectDep+ {-# INLINE rule474 #-}+ rule474 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule475 #-}+ rule475 = \ ((_hdIgathAltAttrs) :: [AltAttr]) ((_tlIgathAltAttrs) :: [AltAttr]) ->+ _hdIgathAltAttrs ++ _tlIgathAltAttrs+ {-# INLINE rule476 #-}+ rule476 = \ ((_hdIgathRules) :: Seq CRule) ((_tlIgathRules) :: Seq CRule) ->+ _hdIgathRules Seq.>< _tlIgathRules+ {-# INLINE rule477 #-}+ rule477 = \ ((_hdIinstDep) :: Seq Edge) ((_tlIinstDep) :: Seq Edge) ->+ _hdIinstDep Seq.>< _tlIinstDep+ {-# INLINE rule478 #-}+ rule478 = \ ((_hdIinstVars) :: [Identifier]) ((_tlIinstVars) :: [Identifier]) ->+ _hdIinstVars ++ _tlIinstVars+ {-# INLINE rule479 #-}+ rule479 = \ ((_hdIlocVars) :: [Identifier]) ((_tlIlocVars) :: [Identifier]) ->+ _hdIlocVars ++ _tlIlocVars+ {-# INLINE rule480 #-}+ rule480 = \ ((_hdInAutoRules) :: Int) ((_tlInAutoRules) :: Int) ->+ _hdInAutoRules + _tlInAutoRules+ {-# INLINE rule481 #-}+ rule481 = \ ((_hdInExplicitRules) :: Int) ((_tlInExplicitRules) :: Int) ->+ _hdInExplicitRules + _tlInExplicitRules+ {-# INLINE rule482 #-}+ rule482 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule483 #-}+ rule483 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIallfields+ {-# INLINE rule484 #-}+ rule484 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule485 #-}+ rule485 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule486 #-}+ rule486 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ _lhsIattrs+ {-# INLINE rule487 #-}+ rule487 = \ ((_lhsIchildInhs) :: Map Identifier Attributes) ->+ _lhsIchildInhs+ {-# INLINE rule488 #-}+ rule488 = \ ((_lhsIchildNts) :: Map Identifier NontermIdent) ->+ _lhsIchildNts+ {-# INLINE rule489 #-}+ rule489 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule490 #-}+ rule490 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule491 #-}+ rule491 = \ ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->+ _lhsIinhsOfChildren+ {-# INLINE rule492 #-}+ rule492 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule493 #-}+ rule493 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule494 #-}+ rule494 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule495 #-}+ rule495 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule496 #-}+ rule496 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule497 #-}+ rule497 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule498 #-}+ rule498 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule499 #-}+ rule499 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule500 #-}+ rule500 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule501 #-}+ rule501 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule502 #-}+ rule502 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule503 #-}+ rule503 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule504 #-}+ rule504 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule505 #-}+ rule505 = \ ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->+ _lhsIsynsOfChildren+ {-# INLINE rule506 #-}+ rule506 = \ ((_lhsIallTypeSigs) :: Map Identifier Type) ->+ _lhsIallTypeSigs+ {-# INLINE rule507 #-}+ rule507 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIallfields+ {-# INLINE rule508 #-}+ rule508 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts+ {-# INLINE rule509 #-}+ rule509 = \ ((_lhsIaltAttrs) :: Map AltAttr Vertex) ->+ _lhsIaltAttrs+ {-# INLINE rule510 #-}+ rule510 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ _lhsIattrs+ {-# INLINE rule511 #-}+ rule511 = \ ((_lhsIchildInhs) :: Map Identifier Attributes) ->+ _lhsIchildInhs+ {-# INLINE rule512 #-}+ rule512 = \ ((_lhsIchildNts) :: Map Identifier NontermIdent) ->+ _lhsIchildNts+ {-# INLINE rule513 #-}+ rule513 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon+ {-# INLINE rule514 #-}+ rule514 = \ ((_lhsIinh) :: Attributes) ->+ _lhsIinh+ {-# INLINE rule515 #-}+ rule515 = \ ((_lhsIinhsOfChildren) :: Map Identifier Attributes) ->+ _lhsIinhsOfChildren+ {-# INLINE rule516 #-}+ rule516 = \ ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ->+ _lhsImergeMap+ {-# INLINE rule517 #-}+ rule517 = \ ((_lhsInt) :: Identifier) ->+ _lhsInt+ {-# INLINE rule518 #-}+ rule518 = \ ((_lhsIo_case) :: Bool) ->+ _lhsIo_case+ {-# INLINE rule519 #-}+ rule519 = \ ((_lhsIo_cata) :: Bool) ->+ _lhsIo_cata+ {-# INLINE rule520 #-}+ rule520 = \ ((_lhsIo_dovisit) :: Bool) ->+ _lhsIo_dovisit+ {-# INLINE rule521 #-}+ rule521 = \ ((_lhsIo_newtypes) :: Bool) ->+ _lhsIo_newtypes+ {-# INLINE rule522 #-}+ rule522 = \ ((_lhsIo_rename) :: Bool) ->+ _lhsIo_rename+ {-# INLINE rule523 #-}+ rule523 = \ ((_lhsIo_sem) :: Bool) ->+ _lhsIo_sem+ {-# INLINE rule524 #-}+ rule524 = \ ((_lhsIo_sig) :: Bool) ->+ _lhsIo_sig+ {-# INLINE rule525 #-}+ rule525 = \ ((_lhsIo_wantvisit) :: Bool) ->+ _lhsIo_wantvisit+ {-# INLINE rule526 #-}+ rule526 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule527 #-}+ rule527 = \ ((_lhsIprefix) :: String) ->+ _lhsIprefix+ {-# INLINE rule528 #-}+ rule528 = \ ((_lhsIsyn) :: Attributes) ->+ _lhsIsyn+ {-# INLINE rule529 #-}+ rule529 = \ ((_lhsIsynsOfChildren) :: Map Identifier Attributes) ->+ _lhsIsynsOfChildren+{-# NOINLINE sem_Rules_Nil #-}+sem_Rules_Nil :: T_Rules +sem_Rules_Nil = T_Rules (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_Rules_v34 + v34 = \ (T_Rules_vIn34 _lhsIallTypeSigs _lhsIallfields _lhsIallnts _lhsIaltAttrs _lhsIattrs _lhsIchildInhs _lhsIchildNts _lhsIcon _lhsIinh _lhsIinhsOfChildren _lhsImergeMap _lhsInt _lhsIo_case _lhsIo_cata _lhsIo_dovisit _lhsIo_newtypes _lhsIo_rename _lhsIo_sem _lhsIo_sig _lhsIo_wantvisit _lhsIoptions _lhsIprefix _lhsIsyn _lhsIsynsOfChildren) -> ( let+ _lhsOdirectDep :: Seq Edge+ _lhsOdirectDep = rule530 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule531 ()+ _lhsOgathAltAttrs :: [AltAttr]+ _lhsOgathAltAttrs = rule532 ()+ _lhsOgathRules :: Seq CRule+ _lhsOgathRules = rule533 ()+ _lhsOinstDep :: Seq Edge+ _lhsOinstDep = rule534 ()+ _lhsOinstVars :: [Identifier]+ _lhsOinstVars = rule535 ()+ _lhsOlocVars :: [Identifier]+ _lhsOlocVars = rule536 ()+ _lhsOnAutoRules :: Int+ _lhsOnAutoRules = rule537 ()+ _lhsOnExplicitRules :: Int+ _lhsOnExplicitRules = rule538 ()+ __result_ = T_Rules_vOut34 _lhsOdirectDep _lhsOerrors _lhsOgathAltAttrs _lhsOgathRules _lhsOinstDep _lhsOinstVars _lhsOlocVars _lhsOnAutoRules _lhsOnExplicitRules+ in __result_ )+ in C_Rules_s35 v34+ {-# INLINE rule530 #-}+ rule530 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule531 #-}+ rule531 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule532 #-}+ rule532 = \ (_ :: ()) ->+ []+ {-# INLINE rule533 #-}+ rule533 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule534 #-}+ rule534 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule535 #-}+ rule535 = \ (_ :: ()) ->+ []+ {-# INLINE rule536 #-}+ rule536 = \ (_ :: ()) ->+ []+ {-# INLINE rule537 #-}+ rule537 = \ (_ :: ()) ->+ 0+ {-# INLINE rule538 #-}+ rule538 = \ (_ :: ()) ->+ 0++-- TypeSig -----------------------------------------------------+-- wrapper+data Inh_TypeSig = Inh_TypeSig { typeSigs_Inh_TypeSig :: (Map Identifier Type) }+data Syn_TypeSig = Syn_TypeSig { typeSigs_Syn_TypeSig :: (Map Identifier Type) }+{-# INLINABLE wrap_TypeSig #-}+wrap_TypeSig :: T_TypeSig -> Inh_TypeSig -> (Syn_TypeSig )+wrap_TypeSig (T_TypeSig act) (Inh_TypeSig _lhsItypeSigs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_TypeSig_vIn37 _lhsItypeSigs+ (T_TypeSig_vOut37 _lhsOtypeSigs) <- return (inv_TypeSig_s38 sem arg)+ return (Syn_TypeSig _lhsOtypeSigs)+ )++-- cata+{-# INLINE sem_TypeSig #-}+sem_TypeSig :: TypeSig -> T_TypeSig +sem_TypeSig ( TypeSig name_ tp_ ) = sem_TypeSig_TypeSig name_ tp_++-- semantic domain+newtype T_TypeSig = T_TypeSig {+ attach_T_TypeSig :: Identity (T_TypeSig_s38 )+ }+newtype T_TypeSig_s38 = C_TypeSig_s38 {+ inv_TypeSig_s38 :: (T_TypeSig_v37 )+ }+data T_TypeSig_s39 = C_TypeSig_s39+type T_TypeSig_v37 = (T_TypeSig_vIn37 ) -> (T_TypeSig_vOut37 )+data T_TypeSig_vIn37 = T_TypeSig_vIn37 (Map Identifier Type)+data T_TypeSig_vOut37 = T_TypeSig_vOut37 (Map Identifier Type)+{-# NOINLINE sem_TypeSig_TypeSig #-}+sem_TypeSig_TypeSig :: (Identifier) -> (Type) -> T_TypeSig +sem_TypeSig_TypeSig arg_name_ arg_tp_ = T_TypeSig (return st38) where+ {-# NOINLINE st38 #-}+ st38 = let+ v37 :: T_TypeSig_v37 + v37 = \ (T_TypeSig_vIn37 _lhsItypeSigs) -> ( let+ _lhsOtypeSigs :: Map Identifier Type+ _lhsOtypeSigs = rule539 _lhsItypeSigs arg_name_ arg_tp_+ __result_ = T_TypeSig_vOut37 _lhsOtypeSigs+ in __result_ )+ in C_TypeSig_s38 v37+ {-# INLINE rule539 #-}+ {-# LINE 536 "./src-ag/Order.ag" #-}+ rule539 = \ ((_lhsItypeSigs) :: Map Identifier Type) name_ tp_ ->+ {-# LINE 536 "./src-ag/Order.ag" #-}+ Map.insert name_ tp_ _lhsItypeSigs+ {-# LINE 3774 "dist/build/Order.hs"#-}++-- TypeSigs ----------------------------------------------------+-- wrapper+data Inh_TypeSigs = Inh_TypeSigs { typeSigs_Inh_TypeSigs :: (Map Identifier Type) }+data Syn_TypeSigs = Syn_TypeSigs { typeSigs_Syn_TypeSigs :: (Map Identifier Type) }+{-# INLINABLE wrap_TypeSigs #-}+wrap_TypeSigs :: T_TypeSigs -> Inh_TypeSigs -> (Syn_TypeSigs )+wrap_TypeSigs (T_TypeSigs act) (Inh_TypeSigs _lhsItypeSigs) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_TypeSigs_vIn40 _lhsItypeSigs+ (T_TypeSigs_vOut40 _lhsOtypeSigs) <- return (inv_TypeSigs_s41 sem arg)+ return (Syn_TypeSigs _lhsOtypeSigs)+ )++-- cata+{-# NOINLINE sem_TypeSigs #-}+sem_TypeSigs :: TypeSigs -> T_TypeSigs +sem_TypeSigs list = Prelude.foldr sem_TypeSigs_Cons sem_TypeSigs_Nil (Prelude.map sem_TypeSig list)++-- semantic domain+newtype T_TypeSigs = T_TypeSigs {+ attach_T_TypeSigs :: Identity (T_TypeSigs_s41 )+ }+newtype T_TypeSigs_s41 = C_TypeSigs_s41 {+ inv_TypeSigs_s41 :: (T_TypeSigs_v40 )+ }+data T_TypeSigs_s42 = C_TypeSigs_s42+type T_TypeSigs_v40 = (T_TypeSigs_vIn40 ) -> (T_TypeSigs_vOut40 )+data T_TypeSigs_vIn40 = T_TypeSigs_vIn40 (Map Identifier Type)+data T_TypeSigs_vOut40 = T_TypeSigs_vOut40 (Map Identifier Type)+{-# NOINLINE sem_TypeSigs_Cons #-}+sem_TypeSigs_Cons :: T_TypeSig -> T_TypeSigs -> T_TypeSigs +sem_TypeSigs_Cons arg_hd_ arg_tl_ = T_TypeSigs (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_TypeSigs_v40 + v40 = \ (T_TypeSigs_vIn40 _lhsItypeSigs) -> ( let+ _hdX38 = Control.Monad.Identity.runIdentity (attach_T_TypeSig (arg_hd_))+ _tlX41 = Control.Monad.Identity.runIdentity (attach_T_TypeSigs (arg_tl_))+ (T_TypeSig_vOut37 _hdItypeSigs) = inv_TypeSig_s38 _hdX38 (T_TypeSig_vIn37 _hdOtypeSigs)+ (T_TypeSigs_vOut40 _tlItypeSigs) = inv_TypeSigs_s41 _tlX41 (T_TypeSigs_vIn40 _tlOtypeSigs)+ _lhsOtypeSigs :: Map Identifier Type+ _lhsOtypeSigs = rule540 _tlItypeSigs+ _hdOtypeSigs = rule541 _lhsItypeSigs+ _tlOtypeSigs = rule542 _hdItypeSigs+ __result_ = T_TypeSigs_vOut40 _lhsOtypeSigs+ in __result_ )+ in C_TypeSigs_s41 v40+ {-# INLINE rule540 #-}+ rule540 = \ ((_tlItypeSigs) :: Map Identifier Type) ->+ _tlItypeSigs+ {-# INLINE rule541 #-}+ rule541 = \ ((_lhsItypeSigs) :: Map Identifier Type) ->+ _lhsItypeSigs+ {-# INLINE rule542 #-}+ rule542 = \ ((_hdItypeSigs) :: Map Identifier Type) ->+ _hdItypeSigs+{-# NOINLINE sem_TypeSigs_Nil #-}+sem_TypeSigs_Nil :: T_TypeSigs +sem_TypeSigs_Nil = T_TypeSigs (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_TypeSigs_v40 + v40 = \ (T_TypeSigs_vIn40 _lhsItypeSigs) -> ( let+ _lhsOtypeSigs :: Map Identifier Type+ _lhsOtypeSigs = rule543 _lhsItypeSigs+ __result_ = T_TypeSigs_vOut40 _lhsOtypeSigs+ in __result_ )+ in C_TypeSigs_s41 v40+ {-# INLINE rule543 #-}+ rule543 = \ ((_lhsItypeSigs) :: Map Identifier Type) -> _lhsItypeSigs
src-generated/Patterns.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/Patterns.ag)+-- UUAGC 0.9.50 (src-ag/Patterns.ag) module Patterns where {-# LINE 2 "./src-ag/Patterns.ag" #-}
+ src-generated/PrintCleanCode.hs view
@@ -0,0 +1,4329 @@+{-# LANGUAGE Rank2Types, GADTs #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE ScopedTypeVariables #-}++module PrintCleanCode where+{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 12 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 2 "./src-ag/Code.ag" #-}++import Patterns+import Data.Set(Set)+import qualified Data.Set as Set+import Data.Map(Map)+import qualified Data.Map as Map+{-# LINE 21 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 10 "./src-ag/PrintCleanCode.ag" #-}++import Data.Char (isAlphaNum)+import Pretty+import Code+import Options+import CommonTypes (attrname, _LOC, nullIdent)+import Data.List(intersperse)+import System.IO+import System.Directory+import System.FilePath+import CommonTypes(BlockInfo, BlockKind(..))+{-# LINE 35 "dist/build/PrintCleanCode.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 144 "./src-ag/Code.ag" #-}++-- Unboxed tuples+-- unbox Whether unboxed tuples are wanted or not+-- inh The inherited attributes.+-- If there are none, no unboxing can take place,+-- because in that case the semantic function (a top-level identifier) would have an unboxed type.+-- Of course we can't have an unboxed 1-tuple+mkTupleExpr :: Bool -> Bool -> Exprs -> Expr+mkTupleExpr unbox' noInh exprs | not unbox' || noInh || length exprs == 1 = TupleExpr exprs+ | otherwise = UnboxedTupleExpr exprs+mkTupleType :: Bool -> Bool -> Types -> Type+mkTupleType unbox' noInh tps | not unbox' || noInh || length tps == 1 = TupleType tps+ | otherwise = UnboxedTupleType tps+mkTupleLhs :: Bool -> Bool -> [String] -> Lhs+mkTupleLhs unbox' noInh comps | not unbox' || noInh || length comps == 1 = TupleLhs comps+ | otherwise = UnboxedTupleLhs comps+{-# LINE 55 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 23 "./src-ag/PrintCleanCode.ag" #-}++type PP_Docs = [PP_Doc]+{-# LINE 60 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 27 "./src-ag/PrintCleanCode.ag" #-}++ppMultiSeqH :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqH = ppMultiSeq' (>#<)++ppMultiSeqV :: [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeqV = ppMultiSeq' (>-<)++ppMultiSeq' :: (PP_Doc -> PP_Doc -> PP_Doc) -> [PP_Doc] -> PP_Doc -> PP_Doc+ppMultiSeq' next strictArgs expr+ = foldr (\v r -> (v >#< "`seq`") `next` pp_parens r) expr strictArgs+{-# LINE 73 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 318 "./src-ag/PrintCleanCode.ag" #-}+++reallySimple :: String -> Bool+reallySimple = and . map (\x -> isAlphaNum x || x=='_')++ppTuple :: Bool -> [PP_Doc] -> PP_Doc+ppTuple _ [x] = pp x+ppTuple True pps = "(" >|< pp_block " " (replicate (length pps `max` 1) ')') ",(" pps+ppTuple False pps = "(" >|< pp_block " " ")" "," pps+ppUnboxedTuple :: Bool -> [PP_Doc] -> PP_Doc+ppUnboxedTuple = ppTuple+--ppUnboxedTuple True pps = "(# " >|< pp_block " " (concat $ replicate (length pps `max` 1) " #)") ",(# " pps+--ppUnboxedTuple False pps = "(# " >|< pp_block " " " #)" "," pps++{-# LINE 90 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 421 "./src-ag/PrintCleanCode.ag" #-}++locname' :: Identifier -> [Char]+locname' n = "_loc_" ++ getName n+{-# LINE 96 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 496 "./src-ag/PrintCleanCode.ag" #-}++renderDocs :: [PP_Doc] -> String+renderDocs pps = foldr (.) id (map (\d -> (disp d 50000) . ( '\n':) ) pps) ""+{-# LINE 102 "dist/build/PrintCleanCode.hs" #-}++{-# LINE 544 "./src-ag/PrintCleanCode.ag" #-}++writeModule :: FilePath -> [PP_Doc] -> IO ()+writeModule path docs+ = do bExists <- doesFileExist path+ if bExists+ then do input <- readFile path+ seq (length input) (return ())+ if input /= output+ then dumpIt+ else return ()+ else dumpIt+ where+ output = renderDocs docs+ dumpIt = writeFile path output+{-# LINE 119 "dist/build/PrintCleanCode.hs" #-}+-- CaseAlt -----------------------------------------------------+-- wrapper+data Inh_CaseAlt = Inh_CaseAlt { nested_Inh_CaseAlt :: !(Bool), options_Inh_CaseAlt :: !(Options), outputfile_Inh_CaseAlt :: !(String) }+data Syn_CaseAlt = Syn_CaseAlt { pps_Syn_CaseAlt :: !(PP_Docs) }+{-# INLINABLE wrap_CaseAlt #-}+wrap_CaseAlt :: T_CaseAlt -> Inh_CaseAlt -> (Syn_CaseAlt )+wrap_CaseAlt !(T_CaseAlt act) !(Inh_CaseAlt _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_CaseAlt_vIn1 _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_CaseAlt_vOut1 _lhsOpps) <- return (inv_CaseAlt_s2 sem arg)+ return (Syn_CaseAlt _lhsOpps)+ )++-- cata+{-# NOINLINE sem_CaseAlt #-}+sem_CaseAlt :: CaseAlt -> T_CaseAlt +sem_CaseAlt ( CaseAlt left_ expr_ ) = sem_CaseAlt_CaseAlt ( sem_Lhs left_ ) ( sem_Expr expr_ )++-- semantic domain+newtype T_CaseAlt = T_CaseAlt {+ attach_T_CaseAlt :: Identity (T_CaseAlt_s2 )+ }+newtype T_CaseAlt_s2 = C_CaseAlt_s2 {+ inv_CaseAlt_s2 :: (T_CaseAlt_v1 )+ }+data T_CaseAlt_s3 = C_CaseAlt_s3+type T_CaseAlt_v1 = (T_CaseAlt_vIn1 ) -> (T_CaseAlt_vOut1 )+data T_CaseAlt_vIn1 = T_CaseAlt_vIn1 (Bool) (Options) (String)+data T_CaseAlt_vOut1 = T_CaseAlt_vOut1 (PP_Docs)+{-# NOINLINE sem_CaseAlt_CaseAlt #-}+sem_CaseAlt_CaseAlt :: T_Lhs -> T_Expr -> T_CaseAlt +sem_CaseAlt_CaseAlt arg_left_ arg_expr_ = T_CaseAlt (return st2) where+ {-# NOINLINE st2 #-}+ !st2 = let+ v1 :: T_CaseAlt_v1 + v1 = \ !(T_CaseAlt_vIn1 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule0 _exprIpp _leftIpp+ _leftOisDeclOfLet = rule1 ()+ _leftOnested = rule2 _lhsInested+ _leftOoptions = rule3 _lhsIoptions+ _leftOoutputfile = rule4 _lhsIoutputfile+ _exprOnested = rule5 _lhsInested+ _exprOoptions = rule6 _lhsIoptions+ _exprOoutputfile = rule7 _lhsIoutputfile+ !__result_ = T_CaseAlt_vOut1 _lhsOpps+ in __result_ )+ in C_CaseAlt_s2 v1+ {-# INLINE rule0 #-}+ {-# LINE 228 "./src-ag/PrintCleanCode.ag" #-}+ rule0 = \ ((_exprIpp) :: PP_Doc) ((_leftIpp) :: PP_Doc) ->+ {-# LINE 228 "./src-ag/PrintCleanCode.ag" #-}+ ["{" >#< _leftIpp >#< "->", _exprIpp >#< "}"]+ {-# LINE 178 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule1 #-}+ {-# LINE 445 "./src-ag/PrintCleanCode.ag" #-}+ rule1 = \ (_ :: ()) ->+ {-# LINE 445 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 184 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule2 #-}+ rule2 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule3 #-}+ rule3 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule4 #-}+ rule4 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule5 #-}+ rule5 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule6 #-}+ rule6 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule7 #-}+ rule7 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile++-- CaseAlts ----------------------------------------------------+-- wrapper+data Inh_CaseAlts = Inh_CaseAlts { nested_Inh_CaseAlts :: !(Bool), options_Inh_CaseAlts :: !(Options), outputfile_Inh_CaseAlts :: !(String) }+data Syn_CaseAlts = Syn_CaseAlts { pps_Syn_CaseAlts :: !(PP_Docs) }+{-# INLINABLE wrap_CaseAlts #-}+wrap_CaseAlts :: T_CaseAlts -> Inh_CaseAlts -> (Syn_CaseAlts )+wrap_CaseAlts !(T_CaseAlts act) !(Inh_CaseAlts _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_CaseAlts_vIn4 _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_CaseAlts_vOut4 _lhsOpps) <- return (inv_CaseAlts_s5 sem arg)+ return (Syn_CaseAlts _lhsOpps)+ )++-- cata+{-# NOINLINE sem_CaseAlts #-}+sem_CaseAlts :: CaseAlts -> T_CaseAlts +sem_CaseAlts list = Prelude.foldr sem_CaseAlts_Cons sem_CaseAlts_Nil (Prelude.map sem_CaseAlt list)++-- semantic domain+newtype T_CaseAlts = T_CaseAlts {+ attach_T_CaseAlts :: Identity (T_CaseAlts_s5 )+ }+newtype T_CaseAlts_s5 = C_CaseAlts_s5 {+ inv_CaseAlts_s5 :: (T_CaseAlts_v4 )+ }+data T_CaseAlts_s6 = C_CaseAlts_s6+type T_CaseAlts_v4 = (T_CaseAlts_vIn4 ) -> (T_CaseAlts_vOut4 )+data T_CaseAlts_vIn4 = T_CaseAlts_vIn4 (Bool) (Options) (String)+data T_CaseAlts_vOut4 = T_CaseAlts_vOut4 (PP_Docs)+{-# NOINLINE sem_CaseAlts_Cons #-}+sem_CaseAlts_Cons :: T_CaseAlt -> T_CaseAlts -> T_CaseAlts +sem_CaseAlts_Cons arg_hd_ arg_tl_ = T_CaseAlts (return st5) where+ {-# NOINLINE st5 #-}+ !st5 = let+ v4 :: T_CaseAlts_v4 + v4 = \ !(T_CaseAlts_vIn4 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _hdX2 = Control.Monad.Identity.runIdentity (attach_T_CaseAlt (arg_hd_))+ _tlX5 = Control.Monad.Identity.runIdentity (attach_T_CaseAlts (arg_tl_))+ (T_CaseAlt_vOut1 _hdIpps) = inv_CaseAlt_s2 _hdX2 (T_CaseAlt_vIn1 _hdOnested _hdOoptions _hdOoutputfile)+ (T_CaseAlts_vOut4 _tlIpps) = inv_CaseAlts_s5 _tlX5 (T_CaseAlts_vIn4 _tlOnested _tlOoptions _tlOoutputfile)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule8 _hdIpps _tlIpps+ _hdOnested = rule9 _lhsInested+ _hdOoptions = rule10 _lhsIoptions+ _hdOoutputfile = rule11 _lhsIoutputfile+ _tlOnested = rule12 _lhsInested+ _tlOoptions = rule13 _lhsIoptions+ _tlOoutputfile = rule14 _lhsIoutputfile+ !__result_ = T_CaseAlts_vOut4 _lhsOpps+ in __result_ )+ in C_CaseAlts_s5 v4+ {-# INLINE rule8 #-}+ {-# LINE 72 "./src-ag/PrintCleanCode.ag" #-}+ rule8 = \ ((_hdIpps) :: PP_Docs) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 72 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 261 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule9 #-}+ rule9 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule10 #-}+ rule10 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule11 #-}+ rule11 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule12 #-}+ rule12 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule13 #-}+ rule13 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule14 #-}+ rule14 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_CaseAlts_Nil #-}+sem_CaseAlts_Nil :: T_CaseAlts +sem_CaseAlts_Nil = T_CaseAlts (return st5) where+ {-# NOINLINE st5 #-}+ !st5 = let+ v4 :: T_CaseAlts_v4 + v4 = \ !(T_CaseAlts_vIn4 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule15 ()+ !__result_ = T_CaseAlts_vOut4 _lhsOpps+ in __result_ )+ in C_CaseAlts_s5 v4+ {-# INLINE rule15 #-}+ {-# LINE 73 "./src-ag/PrintCleanCode.ag" #-}+ rule15 = \ (_ :: ()) ->+ {-# LINE 73 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 297 "dist/build/PrintCleanCode.hs"#-}++-- Chunk -------------------------------------------------------+-- wrapper+data Inh_Chunk = Inh_Chunk { importBlocks_Inh_Chunk :: !(PP_Doc), isDeclOfLet_Inh_Chunk :: !(Bool), mainFile_Inh_Chunk :: !(String), mainName_Inh_Chunk :: !(String), moduleHeader_Inh_Chunk :: !(String -> String -> String -> Bool -> String), nested_Inh_Chunk :: !(Bool), options_Inh_Chunk :: !(Options), optionsLine_Inh_Chunk :: !(String), pragmaBlocks_Inh_Chunk :: !(String), textBlockMap_Inh_Chunk :: !(Map BlockInfo PP_Doc), textBlocks_Inh_Chunk :: !(PP_Doc) }+data Syn_Chunk = Syn_Chunk { appendCommon_Syn_Chunk :: !([[PP_Doc]]), appendMain_Syn_Chunk :: !([[PP_Doc]]), genSems_Syn_Chunk :: !(IO ()), imports_Syn_Chunk :: !([String]), pps_Syn_Chunk :: !(PP_Docs) }+{-# INLINABLE wrap_Chunk #-}+wrap_Chunk :: T_Chunk -> Inh_Chunk -> (Syn_Chunk )+wrap_Chunk !(T_Chunk act) !(Inh_Chunk _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Chunk_vIn7 _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks+ !(T_Chunk_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps) <- return (inv_Chunk_s8 sem arg)+ return (Syn_Chunk _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps)+ )++-- cata+{-# INLINE sem_Chunk #-}+sem_Chunk :: Chunk -> T_Chunk +sem_Chunk ( Chunk !name_ comment_ info_ dataDef_ cataFun_ semDom_ semWrapper_ semFunctions_ !semNames_ ) = sem_Chunk_Chunk name_ ( sem_Decl comment_ ) ( sem_Decls info_ ) ( sem_Decls dataDef_ ) ( sem_Decls cataFun_ ) ( sem_Decls semDom_ ) ( sem_Decls semWrapper_ ) ( sem_Decls semFunctions_ ) semNames_++-- semantic domain+newtype T_Chunk = T_Chunk {+ attach_T_Chunk :: Identity (T_Chunk_s8 )+ }+newtype T_Chunk_s8 = C_Chunk_s8 {+ inv_Chunk_s8 :: (T_Chunk_v7 )+ }+data T_Chunk_s9 = C_Chunk_s9+type T_Chunk_v7 = (T_Chunk_vIn7 ) -> (T_Chunk_vOut7 )+data T_Chunk_vIn7 = T_Chunk_vIn7 (PP_Doc) (Bool) (String) (String) (String -> String -> String -> Bool -> String) (Bool) (Options) (String) (String) (Map BlockInfo PP_Doc) (PP_Doc)+data T_Chunk_vOut7 = T_Chunk_vOut7 ([[PP_Doc]]) ([[PP_Doc]]) (IO ()) ([String]) (PP_Docs)+{-# NOINLINE sem_Chunk_Chunk #-}+sem_Chunk_Chunk :: (String) -> T_Decl -> T_Decls -> T_Decls -> T_Decls -> T_Decls -> T_Decls -> T_Decls -> ([String]) -> T_Chunk +sem_Chunk_Chunk !arg_name_ arg_comment_ arg_info_ arg_dataDef_ arg_cataFun_ arg_semDom_ arg_semWrapper_ arg_semFunctions_ !arg_semNames_ = T_Chunk (return st8) where+ {-# NOINLINE st8 #-}+ !st8 = let+ v7 :: T_Chunk_v7 + v7 = \ !(T_Chunk_vIn7 _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) -> ( let+ _commentX20 = Control.Monad.Identity.runIdentity (attach_T_Decl (arg_comment_))+ _infoX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_info_))+ _dataDefX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_dataDef_))+ _cataFunX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_cataFun_))+ _semDomX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_semDom_))+ _semWrapperX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_semWrapper_))+ _semFunctionsX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_semFunctions_))+ (T_Decl_vOut19 _commentIpp _commentIppa) = inv_Decl_s20 _commentX20 (T_Decl_vIn19 _commentOisDeclOfLet _commentOnested _commentOoptions _commentOoutputfile)+ (T_Decls_vOut22 _infoIpps) = inv_Decls_s23 _infoX23 (T_Decls_vIn22 _infoOisDeclOfLet _infoOnested _infoOoptions _infoOoutputfile)+ (T_Decls_vOut22 _dataDefIpps) = inv_Decls_s23 _dataDefX23 (T_Decls_vIn22 _dataDefOisDeclOfLet _dataDefOnested _dataDefOoptions _dataDefOoutputfile)+ (T_Decls_vOut22 _cataFunIpps) = inv_Decls_s23 _cataFunX23 (T_Decls_vIn22 _cataFunOisDeclOfLet _cataFunOnested _cataFunOoptions _cataFunOoutputfile)+ (T_Decls_vOut22 _semDomIpps) = inv_Decls_s23 _semDomX23 (T_Decls_vIn22 _semDomOisDeclOfLet _semDomOnested _semDomOoptions _semDomOoutputfile)+ (T_Decls_vOut22 _semWrapperIpps) = inv_Decls_s23 _semWrapperX23 (T_Decls_vIn22 _semWrapperOisDeclOfLet _semWrapperOnested _semWrapperOoptions _semWrapperOoutputfile)+ (T_Decls_vOut22 _semFunctionsIpps) = inv_Decls_s23 _semFunctionsX23 (T_Decls_vIn22 _semFunctionsOisDeclOfLet _semFunctionsOnested _semFunctionsOoptions _semFunctionsOoutputfile)+ _outputfile = rule16 _lhsImainFile _lhsIoptions arg_name_+ _lhsOpps :: PP_Docs+ _lhsOpps = rule17 _cataFunIpps _commentIpp _dataDefIpps _infoIpps _lhsItextBlockMap _semDomIpps _semFunctionsIpps _semWrapperIpps arg_name_+ _lhsOimports :: [String]+ _lhsOimports = rule18 _lhsImainName arg_name_+ _lhsOappendCommon :: [[PP_Doc]]+ _lhsOappendCommon = rule19 _commentIpp _dataDefIpps _lhsIoptions _semDomIpps _semWrapperIpps+ _lhsOappendMain :: [[PP_Doc]]+ _lhsOappendMain = rule20 _cataFunIpps _commentIpp _lhsIoptions _semWrapperIpps+ _lhsOgenSems :: IO ()+ _lhsOgenSems = rule21 _commentIpp _exports _infoIpps _lhsImainName _lhsImoduleHeader _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _outputfile _semFunctionsIpps arg_name_+ _exports = rule22 arg_semNames_+ _commentOisDeclOfLet = rule23 _lhsIisDeclOfLet+ _commentOnested = rule24 _lhsInested+ _commentOoptions = rule25 _lhsIoptions+ _commentOoutputfile = rule26 _outputfile+ _infoOisDeclOfLet = rule27 _lhsIisDeclOfLet+ _infoOnested = rule28 _lhsInested+ _infoOoptions = rule29 _lhsIoptions+ _infoOoutputfile = rule30 _outputfile+ _dataDefOisDeclOfLet = rule31 _lhsIisDeclOfLet+ _dataDefOnested = rule32 _lhsInested+ _dataDefOoptions = rule33 _lhsIoptions+ _dataDefOoutputfile = rule34 _outputfile+ _cataFunOisDeclOfLet = rule35 _lhsIisDeclOfLet+ _cataFunOnested = rule36 _lhsInested+ _cataFunOoptions = rule37 _lhsIoptions+ _cataFunOoutputfile = rule38 _outputfile+ _semDomOisDeclOfLet = rule39 _lhsIisDeclOfLet+ _semDomOnested = rule40 _lhsInested+ _semDomOoptions = rule41 _lhsIoptions+ _semDomOoutputfile = rule42 _outputfile+ _semWrapperOisDeclOfLet = rule43 _lhsIisDeclOfLet+ _semWrapperOnested = rule44 _lhsInested+ _semWrapperOoptions = rule45 _lhsIoptions+ _semWrapperOoutputfile = rule46 _outputfile+ _semFunctionsOisDeclOfLet = rule47 _lhsIisDeclOfLet+ _semFunctionsOnested = rule48 _lhsInested+ _semFunctionsOoptions = rule49 _lhsIoptions+ _semFunctionsOoutputfile = rule50 _outputfile+ !__result_ = T_Chunk_vOut7 _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps+ in __result_ )+ in C_Chunk_s8 v7+ {-# INLINE rule16 #-}+ {-# LINE 43 "./src-ag/PrintCleanCode.ag" #-}+ rule16 = \ ((_lhsImainFile) :: String) ((_lhsIoptions) :: Options) name_ ->+ {-# LINE 43 "./src-ag/PrintCleanCode.ag" #-}+ if sepSemMods _lhsIoptions+ then replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_" ++ name_)+ else _lhsImainFile+ {-# LINE 400 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule17 #-}+ {-# LINE 104 "./src-ag/PrintCleanCode.ag" #-}+ rule17 = \ ((_cataFunIpps) :: PP_Docs) ((_commentIpp) :: PP_Doc) ((_dataDefIpps) :: PP_Docs) ((_infoIpps) :: PP_Docs) ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ((_semDomIpps) :: PP_Docs) ((_semFunctionsIpps) :: PP_Docs) ((_semWrapperIpps) :: PP_Docs) name_ ->+ {-# LINE 104 "./src-ag/PrintCleanCode.ag" #-}+ _commentIpp+ : _infoIpps+ ++ _dataDefIpps+ ++ _cataFunIpps+ ++ _semDomIpps+ ++ _semWrapperIpps+ ++ _semFunctionsIpps+ ++ [Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap]+ {-# LINE 413 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule18 #-}+ {-# LINE 504 "./src-ag/PrintCleanCode.ag" #-}+ rule18 = \ ((_lhsImainName) :: String) name_ ->+ {-# LINE 504 "./src-ag/PrintCleanCode.ag" #-}+ ["import " ++ _lhsImainName ++ "_" ++ name_ ++ "\n"]+ {-# LINE 419 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule19 #-}+ {-# LINE 511 "./src-ag/PrintCleanCode.ag" #-}+ rule19 = \ ((_commentIpp) :: PP_Doc) ((_dataDefIpps) :: PP_Docs) ((_lhsIoptions) :: Options) ((_semDomIpps) :: PP_Docs) ((_semWrapperIpps) :: PP_Docs) ->+ {-# LINE 511 "./src-ag/PrintCleanCode.ag" #-}+ [ [_commentIpp]+ , _dataDefIpps+ , _semDomIpps+ , if reference _lhsIoptions then _semWrapperIpps else []+ ]+ {-# LINE 429 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule20 #-}+ {-# LINE 517 "./src-ag/PrintCleanCode.ag" #-}+ rule20 = \ ((_cataFunIpps) :: PP_Docs) ((_commentIpp) :: PP_Doc) ((_lhsIoptions) :: Options) ((_semWrapperIpps) :: PP_Docs) ->+ {-# LINE 517 "./src-ag/PrintCleanCode.ag" #-}+ [ [_commentIpp]+ , _cataFunIpps+ , if reference _lhsIoptions then [] else _semWrapperIpps+ ]+ {-# LINE 438 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule21 #-}+ {-# LINE 527 "./src-ag/PrintCleanCode.ag" #-}+ rule21 = \ ((_commentIpp) :: PP_Doc) _exports ((_infoIpps) :: PP_Docs) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptionsLine) :: String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) _outputfile ((_semFunctionsIpps) :: PP_Docs) name_ ->+ {-# LINE 527 "./src-ag/PrintCleanCode.ag" #-}+ writeModule _outputfile+ [ pp $ _lhsIpragmaBlocks+ , pp $ Map.findWithDefault empty (BlockPragma, Just $ identifier name_) _lhsItextBlockMap+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName ("_" ++ name_) _exports True+ , pp $ ("import " ++ _lhsImainName ++ "_common\n")+ , pp $ Map.findWithDefault empty (BlockImport, Just $ identifier name_) _lhsItextBlockMap+ , _commentIpp+ , vlist_sep "" _infoIpps+ , vlist_sep "" _semFunctionsIpps+ , Map.findWithDefault empty (BlockOther, Just $ identifier name_) _lhsItextBlockMap+ ]+ {-# LINE 455 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule22 #-}+ {-# LINE 542 "./src-ag/PrintCleanCode.ag" #-}+ rule22 = \ semNames_ ->+ {-# LINE 542 "./src-ag/PrintCleanCode.ag" #-}+ concat $ intersperse "," semNames_+ {-# LINE 461 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule23 #-}+ rule23 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule24 #-}+ rule24 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule25 #-}+ rule25 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule26 #-}+ rule26 = \ _outputfile ->+ _outputfile+ {-# INLINE rule27 #-}+ rule27 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule28 #-}+ rule28 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule29 #-}+ rule29 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule30 #-}+ rule30 = \ _outputfile ->+ _outputfile+ {-# INLINE rule31 #-}+ rule31 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule32 #-}+ rule32 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule33 #-}+ rule33 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule34 #-}+ rule34 = \ _outputfile ->+ _outputfile+ {-# INLINE rule35 #-}+ rule35 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule36 #-}+ rule36 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule37 #-}+ rule37 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule38 #-}+ rule38 = \ _outputfile ->+ _outputfile+ {-# INLINE rule39 #-}+ rule39 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule40 #-}+ rule40 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule41 #-}+ rule41 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule42 #-}+ rule42 = \ _outputfile ->+ _outputfile+ {-# INLINE rule43 #-}+ rule43 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule44 #-}+ rule44 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule45 #-}+ rule45 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule46 #-}+ rule46 = \ _outputfile ->+ _outputfile+ {-# INLINE rule47 #-}+ rule47 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule48 #-}+ rule48 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule49 #-}+ rule49 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule50 #-}+ rule50 = \ _outputfile ->+ _outputfile++-- Chunks ------------------------------------------------------+-- wrapper+data Inh_Chunks = Inh_Chunks { importBlocks_Inh_Chunks :: !(PP_Doc), isDeclOfLet_Inh_Chunks :: !(Bool), mainFile_Inh_Chunks :: !(String), mainName_Inh_Chunks :: !(String), moduleHeader_Inh_Chunks :: !(String -> String -> String -> Bool -> String), nested_Inh_Chunks :: !(Bool), options_Inh_Chunks :: !(Options), optionsLine_Inh_Chunks :: !(String), pragmaBlocks_Inh_Chunks :: !(String), textBlockMap_Inh_Chunks :: !(Map BlockInfo PP_Doc), textBlocks_Inh_Chunks :: !(PP_Doc) }+data Syn_Chunks = Syn_Chunks { appendCommon_Syn_Chunks :: !([[PP_Doc]]), appendMain_Syn_Chunks :: !([[PP_Doc]]), genSems_Syn_Chunks :: !(IO ()), imports_Syn_Chunks :: !([String]), pps_Syn_Chunks :: !(PP_Docs) }+{-# INLINABLE wrap_Chunks #-}+wrap_Chunks :: T_Chunks -> Inh_Chunks -> (Syn_Chunks )+wrap_Chunks !(T_Chunks act) !(Inh_Chunks _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Chunks_vIn10 _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks+ !(T_Chunks_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps) <- return (inv_Chunks_s11 sem arg)+ return (Syn_Chunks _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps)+ )++-- cata+{-# NOINLINE sem_Chunks #-}+sem_Chunks :: Chunks -> T_Chunks +sem_Chunks list = Prelude.foldr sem_Chunks_Cons sem_Chunks_Nil (Prelude.map sem_Chunk list)++-- semantic domain+newtype T_Chunks = T_Chunks {+ attach_T_Chunks :: Identity (T_Chunks_s11 )+ }+newtype T_Chunks_s11 = C_Chunks_s11 {+ inv_Chunks_s11 :: (T_Chunks_v10 )+ }+data T_Chunks_s12 = C_Chunks_s12+type T_Chunks_v10 = (T_Chunks_vIn10 ) -> (T_Chunks_vOut10 )+data T_Chunks_vIn10 = T_Chunks_vIn10 (PP_Doc) (Bool) (String) (String) (String -> String -> String -> Bool -> String) (Bool) (Options) (String) (String) (Map BlockInfo PP_Doc) (PP_Doc)+data T_Chunks_vOut10 = T_Chunks_vOut10 ([[PP_Doc]]) ([[PP_Doc]]) (IO ()) ([String]) (PP_Docs)+{-# NOINLINE sem_Chunks_Cons #-}+sem_Chunks_Cons :: T_Chunk -> T_Chunks -> T_Chunks +sem_Chunks_Cons arg_hd_ arg_tl_ = T_Chunks (return st11) where+ {-# NOINLINE st11 #-}+ !st11 = let+ v10 :: T_Chunks_v10 + v10 = \ !(T_Chunks_vIn10 _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) -> ( let+ _hdX8 = Control.Monad.Identity.runIdentity (attach_T_Chunk (arg_hd_))+ _tlX11 = Control.Monad.Identity.runIdentity (attach_T_Chunks (arg_tl_))+ (T_Chunk_vOut7 _hdIappendCommon _hdIappendMain _hdIgenSems _hdIimports _hdIpps) = inv_Chunk_s8 _hdX8 (T_Chunk_vIn7 _hdOimportBlocks _hdOisDeclOfLet _hdOmainFile _hdOmainName _hdOmoduleHeader _hdOnested _hdOoptions _hdOoptionsLine _hdOpragmaBlocks _hdOtextBlockMap _hdOtextBlocks)+ (T_Chunks_vOut10 _tlIappendCommon _tlIappendMain _tlIgenSems _tlIimports _tlIpps) = inv_Chunks_s11 _tlX11 (T_Chunks_vIn10 _tlOimportBlocks _tlOisDeclOfLet _tlOmainFile _tlOmainName _tlOmoduleHeader _tlOnested _tlOoptions _tlOoptionsLine _tlOpragmaBlocks _tlOtextBlockMap _tlOtextBlocks)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule51 _hdIpps _tlIpps+ _lhsOappendCommon :: [[PP_Doc]]+ _lhsOappendCommon = rule52 _hdIappendCommon _tlIappendCommon+ _lhsOappendMain :: [[PP_Doc]]+ _lhsOappendMain = rule53 _hdIappendMain _tlIappendMain+ _lhsOgenSems :: IO ()+ _lhsOgenSems = rule54 _hdIgenSems _tlIgenSems+ _lhsOimports :: [String]+ _lhsOimports = rule55 _hdIimports _tlIimports+ _hdOimportBlocks = rule56 _lhsIimportBlocks+ _hdOisDeclOfLet = rule57 _lhsIisDeclOfLet+ _hdOmainFile = rule58 _lhsImainFile+ _hdOmainName = rule59 _lhsImainName+ _hdOmoduleHeader = rule60 _lhsImoduleHeader+ _hdOnested = rule61 _lhsInested+ _hdOoptions = rule62 _lhsIoptions+ _hdOoptionsLine = rule63 _lhsIoptionsLine+ _hdOpragmaBlocks = rule64 _lhsIpragmaBlocks+ _hdOtextBlockMap = rule65 _lhsItextBlockMap+ _hdOtextBlocks = rule66 _lhsItextBlocks+ _tlOimportBlocks = rule67 _lhsIimportBlocks+ _tlOisDeclOfLet = rule68 _lhsIisDeclOfLet+ _tlOmainFile = rule69 _lhsImainFile+ _tlOmainName = rule70 _lhsImainName+ _tlOmoduleHeader = rule71 _lhsImoduleHeader+ _tlOnested = rule72 _lhsInested+ _tlOoptions = rule73 _lhsIoptions+ _tlOoptionsLine = rule74 _lhsIoptionsLine+ _tlOpragmaBlocks = rule75 _lhsIpragmaBlocks+ _tlOtextBlockMap = rule76 _lhsItextBlockMap+ _tlOtextBlocks = rule77 _lhsItextBlocks+ !__result_ = T_Chunks_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps+ in __result_ )+ in C_Chunks_s11 v10+ {-# INLINE rule51 #-}+ {-# LINE 96 "./src-ag/PrintCleanCode.ag" #-}+ rule51 = \ ((_hdIpps) :: PP_Docs) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 96 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpps ++ _tlIpps+ {-# LINE 628 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule52 #-}+ rule52 = \ ((_hdIappendCommon) :: [[PP_Doc]]) ((_tlIappendCommon) :: [[PP_Doc]]) ->+ _hdIappendCommon ++ _tlIappendCommon+ {-# INLINE rule53 #-}+ rule53 = \ ((_hdIappendMain) :: [[PP_Doc]]) ((_tlIappendMain) :: [[PP_Doc]]) ->+ _hdIappendMain ++ _tlIappendMain+ {-# INLINE rule54 #-}+ rule54 = \ ((_hdIgenSems) :: IO ()) ((_tlIgenSems) :: IO ()) ->+ _hdIgenSems >> _tlIgenSems+ {-# INLINE rule55 #-}+ rule55 = \ ((_hdIimports) :: [String]) ((_tlIimports) :: [String]) ->+ _hdIimports ++ _tlIimports+ {-# INLINE rule56 #-}+ rule56 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule57 #-}+ rule57 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule58 #-}+ rule58 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule59 #-}+ rule59 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule60 #-}+ rule60 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule61 #-}+ rule61 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule62 #-}+ rule62 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule63 #-}+ rule63 = \ ((_lhsIoptionsLine) :: String) ->+ _lhsIoptionsLine+ {-# INLINE rule64 #-}+ rule64 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule65 #-}+ rule65 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->+ _lhsItextBlockMap+ {-# INLINE rule66 #-}+ rule66 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+ {-# INLINE rule67 #-}+ rule67 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule68 #-}+ rule68 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule69 #-}+ rule69 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule70 #-}+ rule70 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule71 #-}+ rule71 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule72 #-}+ rule72 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule73 #-}+ rule73 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule74 #-}+ rule74 = \ ((_lhsIoptionsLine) :: String) ->+ _lhsIoptionsLine+ {-# INLINE rule75 #-}+ rule75 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule76 #-}+ rule76 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->+ _lhsItextBlockMap+ {-# INLINE rule77 #-}+ rule77 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks+{-# NOINLINE sem_Chunks_Nil #-}+sem_Chunks_Nil :: T_Chunks +sem_Chunks_Nil = T_Chunks (return st11) where+ {-# NOINLINE st11 #-}+ !st11 = let+ v10 :: T_Chunks_v10 + v10 = \ !(T_Chunks_vIn10 _lhsIimportBlocks _lhsIisDeclOfLet _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsInested _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule78 ()+ _lhsOappendCommon :: [[PP_Doc]]+ _lhsOappendCommon = rule79 ()+ _lhsOappendMain :: [[PP_Doc]]+ _lhsOappendMain = rule80 ()+ _lhsOgenSems :: IO ()+ _lhsOgenSems = rule81 ()+ _lhsOimports :: [String]+ _lhsOimports = rule82 ()+ !__result_ = T_Chunks_vOut10 _lhsOappendCommon _lhsOappendMain _lhsOgenSems _lhsOimports _lhsOpps+ in __result_ )+ in C_Chunks_s11 v10+ {-# INLINE rule78 #-}+ {-# LINE 97 "./src-ag/PrintCleanCode.ag" #-}+ rule78 = \ (_ :: ()) ->+ {-# LINE 97 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 732 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule79 #-}+ rule79 = \ (_ :: ()) ->+ []+ {-# INLINE rule80 #-}+ rule80 = \ (_ :: ()) ->+ []+ {-# INLINE rule81 #-}+ rule81 = \ (_ :: ()) ->+ return ()+ {-# INLINE rule82 #-}+ rule82 = \ (_ :: ()) ->+ []++-- DataAlt -----------------------------------------------------+-- wrapper+data Inh_DataAlt = Inh_DataAlt { nested_Inh_DataAlt :: !(Bool), strictPre_Inh_DataAlt :: !(PP_Doc) }+data Syn_DataAlt = Syn_DataAlt { pp_Syn_DataAlt :: !(PP_Doc), ppa_Syn_DataAlt :: !(PP_Doc) }+{-# INLINABLE wrap_DataAlt #-}+wrap_DataAlt :: T_DataAlt -> Inh_DataAlt -> (Syn_DataAlt )+wrap_DataAlt !(T_DataAlt act) !(Inh_DataAlt _lhsInested _lhsIstrictPre) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_DataAlt_vIn13 _lhsInested _lhsIstrictPre+ !(T_DataAlt_vOut13 _lhsOpp _lhsOppa) <- return (inv_DataAlt_s14 sem arg)+ return (Syn_DataAlt _lhsOpp _lhsOppa)+ )++-- cata+{-# NOINLINE sem_DataAlt #-}+sem_DataAlt :: DataAlt -> T_DataAlt +sem_DataAlt ( DataAlt !name_ args_ ) = sem_DataAlt_DataAlt name_ ( sem_Types args_ )+sem_DataAlt ( Record !name_ args_ ) = sem_DataAlt_Record name_ ( sem_NamedTypes args_ )++-- semantic domain+newtype T_DataAlt = T_DataAlt {+ attach_T_DataAlt :: Identity (T_DataAlt_s14 )+ }+newtype T_DataAlt_s14 = C_DataAlt_s14 {+ inv_DataAlt_s14 :: (T_DataAlt_v13 )+ }+data T_DataAlt_s15 = C_DataAlt_s15+type T_DataAlt_v13 = (T_DataAlt_vIn13 ) -> (T_DataAlt_vOut13 )+data T_DataAlt_vIn13 = T_DataAlt_vIn13 (Bool) (PP_Doc)+data T_DataAlt_vOut13 = T_DataAlt_vOut13 (PP_Doc) (PP_Doc)+{-# NOINLINE sem_DataAlt_DataAlt #-}+sem_DataAlt_DataAlt :: (String) -> T_Types -> T_DataAlt +sem_DataAlt_DataAlt !arg_name_ arg_args_ = T_DataAlt (return st14) where+ {-# NOINLINE st14 #-}+ !st14 = let+ v13 :: T_DataAlt_v13 + v13 = \ !(T_DataAlt_vIn13 _lhsInested _lhsIstrictPre) -> ( let+ _argsX53 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_args_))+ (T_Types_vOut52 _argsIcopy _argsIpps) = inv_Types_s53 _argsX53 (T_Types_vIn52 _argsOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule83 _argsIpps _lhsIstrictPre arg_name_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule84 ()+ _argsOnested = rule85 _lhsInested+ !__result_ = T_DataAlt_vOut13 _lhsOpp _lhsOppa+ in __result_ )+ in C_DataAlt_s14 v13+ {-# INLINE rule83 #-}+ {-# LINE 231 "./src-ag/PrintCleanCode.ag" #-}+ rule83 = \ ((_argsIpps) :: PP_Docs) ((_lhsIstrictPre) :: PP_Doc) name_ ->+ {-# LINE 231 "./src-ag/PrintCleanCode.ag" #-}+ name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)+ {-# LINE 799 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule84 #-}+ {-# LINE 232 "./src-ag/PrintCleanCode.ag" #-}+ rule84 = \ (_ :: ()) ->+ {-# LINE 232 "./src-ag/PrintCleanCode.ag" #-}+ empty+ {-# LINE 805 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule85 #-}+ rule85 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_DataAlt_Record #-}+sem_DataAlt_Record :: (String) -> T_NamedTypes -> T_DataAlt +sem_DataAlt_Record !arg_name_ arg_args_ = T_DataAlt (return st14) where+ {-# NOINLINE st14 #-}+ !st14 = let+ v13 :: T_DataAlt_v13 + v13 = \ !(T_DataAlt_vIn13 _lhsInested _lhsIstrictPre) -> ( let+ _argsX38 = Control.Monad.Identity.runIdentity (attach_T_NamedTypes (arg_args_))+ (T_NamedTypes_vOut37 _argsIppas _argsIpps) = inv_NamedTypes_s38 _argsX38 (T_NamedTypes_vIn37 _argsOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule86 _argsIpps _lhsIstrictPre arg_name_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule87 _argsIppas arg_name_+ _argsOnested = rule88 _lhsInested+ !__result_ = T_DataAlt_vOut13 _lhsOpp _lhsOppa+ in __result_ )+ in C_DataAlt_s14 v13+ {-# INLINE rule86 #-}+ {-# LINE 233 "./src-ag/PrintCleanCode.ag" #-}+ rule86 = \ ((_argsIpps) :: PP_Docs) ((_lhsIstrictPre) :: PP_Doc) name_ ->+ {-# LINE 233 "./src-ag/PrintCleanCode.ag" #-}+ name_ >#< hv_sp (map ((_lhsIstrictPre >|<) . pp_parens) _argsIpps)+ {-# LINE 831 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule87 #-}+ {-# LINE 234 "./src-ag/PrintCleanCode.ag" #-}+ rule87 = \ ((_argsIppas) :: PP_Docs) name_ ->+ {-# LINE 234 "./src-ag/PrintCleanCode.ag" #-}+ let f n d = d >#< (pp_block ("(" ++ name_) ")" "" $ map pp (ppat n))+ >#< pp "=" >#< pp "x"+ ppat n = replicate (length _argsIppas - n - 1) (pp " _") ++ [pp " x"] ++ replicate n (pp " _")+ in snd $ foldr (\x (n, xs) -> (n + 1, f n x >-< xs)) (0, empty) _argsIppas+ {-# LINE 840 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule88 #-}+ rule88 = \ ((_lhsInested) :: Bool) ->+ _lhsInested++-- DataAlts ----------------------------------------------------+-- wrapper+data Inh_DataAlts = Inh_DataAlts { nested_Inh_DataAlts :: !(Bool), strictPre_Inh_DataAlts :: !(PP_Doc) }+data Syn_DataAlts = Syn_DataAlts { ppas_Syn_DataAlts :: !(PP_Docs), pps_Syn_DataAlts :: !(PP_Docs) }+{-# INLINABLE wrap_DataAlts #-}+wrap_DataAlts :: T_DataAlts -> Inh_DataAlts -> (Syn_DataAlts )+wrap_DataAlts !(T_DataAlts act) !(Inh_DataAlts _lhsInested _lhsIstrictPre) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_DataAlts_vIn16 _lhsInested _lhsIstrictPre+ !(T_DataAlts_vOut16 _lhsOppas _lhsOpps) <- return (inv_DataAlts_s17 sem arg)+ return (Syn_DataAlts _lhsOppas _lhsOpps)+ )++-- cata+{-# NOINLINE sem_DataAlts #-}+sem_DataAlts :: DataAlts -> T_DataAlts +sem_DataAlts list = Prelude.foldr sem_DataAlts_Cons sem_DataAlts_Nil (Prelude.map sem_DataAlt list)++-- semantic domain+newtype T_DataAlts = T_DataAlts {+ attach_T_DataAlts :: Identity (T_DataAlts_s17 )+ }+newtype T_DataAlts_s17 = C_DataAlts_s17 {+ inv_DataAlts_s17 :: (T_DataAlts_v16 )+ }+data T_DataAlts_s18 = C_DataAlts_s18+type T_DataAlts_v16 = (T_DataAlts_vIn16 ) -> (T_DataAlts_vOut16 )+data T_DataAlts_vIn16 = T_DataAlts_vIn16 (Bool) (PP_Doc)+data T_DataAlts_vOut16 = T_DataAlts_vOut16 (PP_Docs) (PP_Docs)+{-# NOINLINE sem_DataAlts_Cons #-}+sem_DataAlts_Cons :: T_DataAlt -> T_DataAlts -> T_DataAlts +sem_DataAlts_Cons arg_hd_ arg_tl_ = T_DataAlts (return st17) where+ {-# NOINLINE st17 #-}+ !st17 = let+ v16 :: T_DataAlts_v16 + v16 = \ !(T_DataAlts_vIn16 _lhsInested _lhsIstrictPre) -> ( let+ _hdX14 = Control.Monad.Identity.runIdentity (attach_T_DataAlt (arg_hd_))+ _tlX17 = Control.Monad.Identity.runIdentity (attach_T_DataAlts (arg_tl_))+ (T_DataAlt_vOut13 _hdIpp _hdIppa) = inv_DataAlt_s14 _hdX14 (T_DataAlt_vIn13 _hdOnested _hdOstrictPre)+ (T_DataAlts_vOut16 _tlIppas _tlIpps) = inv_DataAlts_s17 _tlX17 (T_DataAlts_vIn16 _tlOnested _tlOstrictPre)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule89 _hdIpp _tlIpps+ _lhsOppas :: PP_Docs+ _lhsOppas = rule90 _hdIppa _tlIppas+ _hdOnested = rule91 _lhsInested+ _hdOstrictPre = rule92 _lhsIstrictPre+ _tlOnested = rule93 _lhsInested+ _tlOstrictPre = rule94 _lhsIstrictPre+ !__result_ = T_DataAlts_vOut16 _lhsOppas _lhsOpps+ in __result_ )+ in C_DataAlts_s17 v16+ {-# INLINE rule89 #-}+ {-# LINE 76 "./src-ag/PrintCleanCode.ag" #-}+ rule89 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 76 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 902 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule90 #-}+ {-# LINE 77 "./src-ag/PrintCleanCode.ag" #-}+ rule90 = \ ((_hdIppa) :: PP_Doc) ((_tlIppas) :: PP_Docs) ->+ {-# LINE 77 "./src-ag/PrintCleanCode.ag" #-}+ _hdIppa : _tlIppas+ {-# LINE 908 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule91 #-}+ rule91 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule92 #-}+ rule92 = \ ((_lhsIstrictPre) :: PP_Doc) ->+ _lhsIstrictPre+ {-# INLINE rule93 #-}+ rule93 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule94 #-}+ rule94 = \ ((_lhsIstrictPre) :: PP_Doc) ->+ _lhsIstrictPre+{-# NOINLINE sem_DataAlts_Nil #-}+sem_DataAlts_Nil :: T_DataAlts +sem_DataAlts_Nil = T_DataAlts (return st17) where+ {-# NOINLINE st17 #-}+ !st17 = let+ v16 :: T_DataAlts_v16 + v16 = \ !(T_DataAlts_vIn16 _lhsInested _lhsIstrictPre) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule95 ()+ _lhsOppas :: PP_Docs+ _lhsOppas = rule96 ()+ !__result_ = T_DataAlts_vOut16 _lhsOppas _lhsOpps+ in __result_ )+ in C_DataAlts_s17 v16+ {-# INLINE rule95 #-}+ {-# LINE 78 "./src-ag/PrintCleanCode.ag" #-}+ rule95 = \ (_ :: ()) ->+ {-# LINE 78 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 940 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule96 #-}+ {-# LINE 79 "./src-ag/PrintCleanCode.ag" #-}+ rule96 = \ (_ :: ()) ->+ {-# LINE 79 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 946 "dist/build/PrintCleanCode.hs"#-}++-- Decl --------------------------------------------------------+-- wrapper+data Inh_Decl = Inh_Decl { isDeclOfLet_Inh_Decl :: !(Bool), nested_Inh_Decl :: !(Bool), options_Inh_Decl :: !(Options), outputfile_Inh_Decl :: !(String) }+data Syn_Decl = Syn_Decl { pp_Syn_Decl :: !(PP_Doc), ppa_Syn_Decl :: !(PP_Doc) }+{-# INLINABLE wrap_Decl #-}+wrap_Decl :: T_Decl -> Inh_Decl -> (Syn_Decl )+wrap_Decl !(T_Decl act) !(Inh_Decl _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_Decl_vOut19 _lhsOpp _lhsOppa) <- return (inv_Decl_s20 sem arg)+ return (Syn_Decl _lhsOpp _lhsOppa)+ )++-- cata+{-# NOINLINE sem_Decl #-}+sem_Decl :: Decl -> T_Decl +sem_Decl ( Decl left_ rhs_ !binds_ !uses_ ) = sem_Decl_Decl ( sem_Lhs left_ ) ( sem_Expr rhs_ ) binds_ uses_+sem_Decl ( Bind left_ rhs_ ) = sem_Decl_Bind ( sem_Lhs left_ ) ( sem_Expr rhs_ )+sem_Decl ( BindLet left_ rhs_ ) = sem_Decl_BindLet ( sem_Lhs left_ ) ( sem_Expr rhs_ )+sem_Decl ( Data !name_ !params_ alts_ !strict_ !derivings_ ) = sem_Decl_Data name_ params_ ( sem_DataAlts alts_ ) strict_ derivings_+sem_Decl ( NewType !name_ !params_ !con_ tp_ ) = sem_Decl_NewType name_ params_ con_ ( sem_Type tp_ )+sem_Decl ( Type !name_ !params_ tp_ ) = sem_Decl_Type name_ params_ ( sem_Type tp_ )+sem_Decl ( TSig !name_ tp_ ) = sem_Decl_TSig name_ ( sem_Type tp_ )+sem_Decl ( Comment !txt_ ) = sem_Decl_Comment txt_+sem_Decl ( PragmaDecl !txt_ ) = sem_Decl_PragmaDecl txt_+sem_Decl ( Resume !monadic_ !nt_ left_ rhs_ ) = sem_Decl_Resume monadic_ nt_ ( sem_Lhs left_ ) ( sem_Expr rhs_ )+sem_Decl ( EvalDecl !nt_ left_ rhs_ ) = sem_Decl_EvalDecl nt_ ( sem_Lhs left_ ) ( sem_Expr rhs_ )++-- semantic domain+newtype T_Decl = T_Decl {+ attach_T_Decl :: Identity (T_Decl_s20 )+ }+newtype T_Decl_s20 = C_Decl_s20 {+ inv_Decl_s20 :: (T_Decl_v19 )+ }+data T_Decl_s21 = C_Decl_s21+type T_Decl_v19 = (T_Decl_vIn19 ) -> (T_Decl_vOut19 )+data T_Decl_vIn19 = T_Decl_vIn19 (Bool) (Bool) (Options) (String)+data T_Decl_vOut19 = T_Decl_vOut19 (PP_Doc) (PP_Doc)+{-# NOINLINE sem_Decl_Decl #-}+sem_Decl_Decl :: T_Lhs -> T_Expr -> (Set String) -> (Set String) -> T_Decl +sem_Decl_Decl arg_left_ arg_rhs_ _ _ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _rhsX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_rhs_))+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _rhsIpp) = inv_Expr_s26 _rhsX26 (T_Expr_vIn25 _rhsOnested _rhsOoptions _rhsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule97 _leftIpp _rhsIpp+ _lhsOppa :: PP_Doc+ _lhsOppa = rule98 ()+ _leftOisDeclOfLet = rule99 _lhsIisDeclOfLet+ _leftOnested = rule100 _lhsInested+ _leftOoptions = rule101 _lhsIoptions+ _leftOoutputfile = rule102 _lhsIoutputfile+ _rhsOnested = rule103 _lhsInested+ _rhsOoptions = rule104 _lhsIoptions+ _rhsOoutputfile = rule105 _lhsIoutputfile+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule97 #-}+ {-# LINE 114 "./src-ag/PrintCleanCode.ag" #-}+ rule97 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) ->+ {-# LINE 114 "./src-ag/PrintCleanCode.ag" #-}+ _leftIpp >#< "="+ >-< indent 4 _rhsIpp+ {-# LINE 1019 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule98 #-}+ rule98 = \ (_ :: ()) ->+ empty+ {-# INLINE rule99 #-}+ rule99 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule100 #-}+ rule100 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule101 #-}+ rule101 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule102 #-}+ rule102 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule103 #-}+ rule103 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule104 #-}+ rule104 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule105 #-}+ rule105 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Decl_Bind #-}+sem_Decl_Bind :: T_Lhs -> T_Expr -> T_Decl +sem_Decl_Bind arg_left_ arg_rhs_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _rhsX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_rhs_))+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _rhsIpp) = inv_Expr_s26 _rhsX26 (T_Expr_vIn25 _rhsOnested _rhsOoptions _rhsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule106 _leftIpp _rhsIpp+ _lhsOppa :: PP_Doc+ _lhsOppa = rule107 ()+ _leftOisDeclOfLet = rule108 _lhsIisDeclOfLet+ _leftOnested = rule109 _lhsInested+ _leftOoptions = rule110 _lhsIoptions+ _leftOoutputfile = rule111 _lhsIoutputfile+ _rhsOnested = rule112 _lhsInested+ _rhsOoptions = rule113 _lhsIoptions+ _rhsOoutputfile = rule114 _lhsIoutputfile+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule106 #-}+ {-# LINE 116 "./src-ag/PrintCleanCode.ag" #-}+ rule106 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) ->+ {-# LINE 116 "./src-ag/PrintCleanCode.ag" #-}+ _leftIpp >#< "<-" >#< _rhsIpp+ {-# LINE 1074 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule107 #-}+ rule107 = \ (_ :: ()) ->+ empty+ {-# INLINE rule108 #-}+ rule108 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule109 #-}+ rule109 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule110 #-}+ rule110 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule111 #-}+ rule111 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule112 #-}+ rule112 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule113 #-}+ rule113 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule114 #-}+ rule114 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Decl_BindLet #-}+sem_Decl_BindLet :: T_Lhs -> T_Expr -> T_Decl +sem_Decl_BindLet arg_left_ arg_rhs_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _rhsX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_rhs_))+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _rhsIpp) = inv_Expr_s26 _rhsX26 (T_Expr_vIn25 _rhsOnested _rhsOoptions _rhsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule115 _leftIpp _rhsIpp+ _lhsOppa :: PP_Doc+ _lhsOppa = rule116 ()+ _leftOisDeclOfLet = rule117 _lhsIisDeclOfLet+ _leftOnested = rule118 _lhsInested+ _leftOoptions = rule119 _lhsIoptions+ _leftOoutputfile = rule120 _lhsIoutputfile+ _rhsOnested = rule121 _lhsInested+ _rhsOoptions = rule122 _lhsIoptions+ _rhsOoutputfile = rule123 _lhsIoutputfile+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule115 #-}+ {-# LINE 117 "./src-ag/PrintCleanCode.ag" #-}+ rule115 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) ->+ {-# LINE 117 "./src-ag/PrintCleanCode.ag" #-}+ "let" >#< _leftIpp >#< "=" >#< _rhsIpp+ {-# LINE 1129 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule116 #-}+ rule116 = \ (_ :: ()) ->+ empty+ {-# INLINE rule117 #-}+ rule117 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule118 #-}+ rule118 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule119 #-}+ rule119 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule120 #-}+ rule120 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule121 #-}+ rule121 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule122 #-}+ rule122 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule123 #-}+ rule123 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Decl_Data #-}+sem_Decl_Data :: (String) -> ([String]) -> T_DataAlts -> (Bool) -> ([String]) -> T_Decl +sem_Decl_Data !arg_name_ !arg_params_ arg_alts_ !arg_strict_ !arg_derivings_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _altsX17 = Control.Monad.Identity.runIdentity (attach_T_DataAlts (arg_alts_))+ (T_DataAlts_vOut16 _altsIppas _altsIpps) = inv_DataAlts_s17 _altsX17 (T_DataAlts_vIn16 _altsOnested _altsOstrictPre)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule124 _altsIppas _altsIpps arg_derivings_ arg_name_ arg_params_+ _altsOstrictPre = rule125 arg_strict_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule126 ()+ _altsOnested = rule127 _lhsInested+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule124 #-}+ {-# LINE 118 "./src-ag/PrintCleanCode.ag" #-}+ rule124 = \ ((_altsIppas) :: PP_Docs) ((_altsIpps) :: PP_Docs) derivings_ name_ params_ ->+ {-# LINE 118 "./src-ag/PrintCleanCode.ag" #-}+ "::" >#< hv_sp (name_ : params_)+ >#< ( case _altsIpps of+ [] -> empty+ (x:xs) -> "=" >#< x+ >-< vlist (map ("|" >#<) xs)+ >-< if null derivings_+ then empty+ else "deriving" >#< ppTuple False (map text derivings_)+ )+ >-< foldr (>-<) empty _altsIppas+ {-# LINE 1186 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule125 #-}+ {-# LINE 342 "./src-ag/PrintCleanCode.ag" #-}+ rule125 = \ strict_ ->+ {-# LINE 342 "./src-ag/PrintCleanCode.ag" #-}+ if strict_ then pp "!" else empty+ {-# LINE 1192 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule126 #-}+ rule126 = \ (_ :: ()) ->+ empty+ {-# INLINE rule127 #-}+ rule127 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Decl_NewType #-}+sem_Decl_NewType :: (String) -> ([String]) -> (String) -> T_Type -> T_Decl +sem_Decl_NewType !arg_name_ !arg_params_ !arg_con_ arg_tp_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule128 _tpIpp arg_con_ arg_name_ arg_params_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule129 ()+ _tpOnested = rule130 _lhsInested+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule128 #-}+ {-# LINE 129 "./src-ag/PrintCleanCode.ag" #-}+ rule128 = \ ((_tpIpp) :: PP_Doc) con_ name_ params_ ->+ {-# LINE 129 "./src-ag/PrintCleanCode.ag" #-}+ "::" >#< hv_sp (name_ : params_) >#< "=" >#< con_ >#< pp_parens _tpIpp+ {-# LINE 1221 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule129 #-}+ rule129 = \ (_ :: ()) ->+ empty+ {-# INLINE rule130 #-}+ rule130 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Decl_Type #-}+sem_Decl_Type :: (String) -> ([String]) -> T_Type -> T_Decl +sem_Decl_Type !arg_name_ !arg_params_ arg_tp_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule131 _tpIpp arg_name_ arg_params_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule132 ()+ _tpOnested = rule133 _lhsInested+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule131 #-}+ {-# LINE 130 "./src-ag/PrintCleanCode.ag" #-}+ rule131 = \ ((_tpIpp) :: PP_Doc) name_ params_ ->+ {-# LINE 130 "./src-ag/PrintCleanCode.ag" #-}+ "::" >#< hv_sp (name_ : params_) >#< ":==" >#< _tpIpp+ {-# LINE 1250 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule132 #-}+ rule132 = \ (_ :: ()) ->+ empty+ {-# INLINE rule133 #-}+ rule133 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Decl_TSig #-}+sem_Decl_TSig :: (String) -> T_Type -> T_Decl +sem_Decl_TSig !arg_name_ arg_tp_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule134 _tpIpp arg_name_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule135 ()+ _tpOnested = rule136 _lhsInested+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule134 #-}+ {-# LINE 131 "./src-ag/PrintCleanCode.ag" #-}+ rule134 = \ ((_tpIpp) :: PP_Doc) name_ ->+ {-# LINE 131 "./src-ag/PrintCleanCode.ag" #-}+ name_ >#< "::" >#< _tpIpp+ {-# LINE 1279 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule135 #-}+ rule135 = \ (_ :: ()) ->+ empty+ {-# INLINE rule136 #-}+ rule136 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Decl_Comment #-}+sem_Decl_Comment :: (String) -> T_Decl +sem_Decl_Comment !arg_txt_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpp :: PP_Doc+ _lhsOpp = rule137 arg_txt_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule138 ()+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule137 #-}+ {-# LINE 132 "./src-ag/PrintCleanCode.ag" #-}+ rule137 = \ txt_ ->+ {-# LINE 132 "./src-ag/PrintCleanCode.ag" #-}+ if '\n' `elem` txt_+ then "/*" >-< vlist (lines txt_) >-< "*/"+ else "//" >#< txt_+ {-# LINE 1307 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule138 #-}+ rule138 = \ (_ :: ()) ->+ empty+{-# NOINLINE sem_Decl_PragmaDecl #-}+sem_Decl_PragmaDecl :: (String) -> T_Decl +sem_Decl_PragmaDecl !arg_txt_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpp :: PP_Doc+ _lhsOpp = rule139 arg_txt_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule140 ()+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule139 #-}+ {-# LINE 135 "./src-ag/PrintCleanCode.ag" #-}+ rule139 = \ txt_ ->+ {-# LINE 135 "./src-ag/PrintCleanCode.ag" #-}+ "/*#" >#< text txt_ >#< "#*/"+ {-# LINE 1330 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule140 #-}+ rule140 = \ (_ :: ()) ->+ empty+{-# NOINLINE sem_Decl_Resume #-}+sem_Decl_Resume :: (Bool) -> (String) -> T_Lhs -> T_Expr -> T_Decl +sem_Decl_Resume !arg_monadic_ _ arg_left_ arg_rhs_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _rhsX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_rhs_))+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _rhsIpp) = inv_Expr_s26 _rhsX26 (T_Expr_vIn25 _rhsOnested _rhsOoptions _rhsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule141 _leftIpp _rhsIpp arg_monadic_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule142 ()+ _leftOisDeclOfLet = rule143 _lhsIisDeclOfLet+ _leftOnested = rule144 _lhsInested+ _leftOoptions = rule145 _lhsIoptions+ _leftOoutputfile = rule146 _lhsIoutputfile+ _rhsOnested = rule147 _lhsInested+ _rhsOoptions = rule148 _lhsIoptions+ _rhsOoutputfile = rule149 _lhsIoutputfile+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule141 #-}+ {-# LINE 136 "./src-ag/PrintCleanCode.ag" #-}+ rule141 = \ ((_leftIpp) :: PP_Doc) ((_rhsIpp) :: PP_Doc) monadic_ ->+ {-# LINE 136 "./src-ag/PrintCleanCode.ag" #-}+ if monadic_+ then _leftIpp >#< "<-" >#< _rhsIpp+ else _leftIpp >#< "=" >-< indent 4 _rhsIpp+ {-# LINE 1366 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule142 #-}+ rule142 = \ (_ :: ()) ->+ empty+ {-# INLINE rule143 #-}+ rule143 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule144 #-}+ rule144 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule145 #-}+ rule145 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule146 #-}+ rule146 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule147 #-}+ rule147 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule148 #-}+ rule148 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule149 #-}+ rule149 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Decl_EvalDecl #-}+sem_Decl_EvalDecl :: (String) -> T_Lhs -> T_Expr -> T_Decl +sem_Decl_EvalDecl !arg_nt_ arg_left_ arg_rhs_ = T_Decl (return st20) where+ {-# NOINLINE st20 #-}+ !st20 = let+ v19 :: T_Decl_v19 + v19 = \ !(T_Decl_vIn19 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _rhsX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_rhs_))+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _rhsIpp) = inv_Expr_s26 _rhsX26 (T_Expr_vIn25 _rhsOnested _rhsOoptions _rhsOoutputfile)+ _strat = rule150 _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule151 _leftIpp _lhsIoptions _rhsIpp _strat arg_nt_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule152 ()+ _leftOisDeclOfLet = rule153 _lhsIisDeclOfLet+ _leftOnested = rule154 _lhsInested+ _leftOoptions = rule155 _lhsIoptions+ _leftOoutputfile = rule156 _lhsIoutputfile+ _rhsOnested = rule157 _lhsInested+ _rhsOoptions = rule158 _lhsIoptions+ _rhsOoutputfile = rule159 _lhsIoutputfile+ !__result_ = T_Decl_vOut19 _lhsOpp _lhsOppa+ in __result_ )+ in C_Decl_s20 v19+ {-# INLINE rule150 #-}+ {-# LINE 139 "./src-ag/PrintCleanCode.ag" #-}+ rule150 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 139 "./src-ag/PrintCleanCode.ag" #-}+ if breadthFirstStrict _lhsIoptions+ then "stepwiseEval"+ else "lazyEval"+ {-# LINE 1424 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule151 #-}+ {-# LINE 142 "./src-ag/PrintCleanCode.ag" #-}+ rule151 = \ ((_leftIpp) :: PP_Doc) ((_lhsIoptions) :: Options) ((_rhsIpp) :: PP_Doc) _strat nt_ ->+ {-# LINE 142 "./src-ag/PrintCleanCode.ag" #-}+ if breadthFirst _lhsIoptions+ then _leftIpp >#< "=" >#< "case" >#< _strat >#< pp_parens _rhsIpp >#< "of"+ >-< indent 4 (+ pp_parens (nt_ >|< "_Syn" >#< "_val") >#< "-> _val"+ )+ else _leftIpp >#< "=" >#< _rhsIpp+ {-# LINE 1435 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule152 #-}+ rule152 = \ (_ :: ()) ->+ empty+ {-# INLINE rule153 #-}+ rule153 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule154 #-}+ rule154 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule155 #-}+ rule155 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule156 #-}+ rule156 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule157 #-}+ rule157 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule158 #-}+ rule158 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule159 #-}+ rule159 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile++-- Decls -------------------------------------------------------+-- wrapper+data Inh_Decls = Inh_Decls { isDeclOfLet_Inh_Decls :: !(Bool), nested_Inh_Decls :: !(Bool), options_Inh_Decls :: !(Options), outputfile_Inh_Decls :: !(String) }+data Syn_Decls = Syn_Decls { pps_Syn_Decls :: !(PP_Docs) }+{-# INLINABLE wrap_Decls #-}+wrap_Decls :: T_Decls -> Inh_Decls -> (Syn_Decls )+wrap_Decls !(T_Decls act) !(Inh_Decls _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Decls_vIn22 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_Decls_vOut22 _lhsOpps) <- return (inv_Decls_s23 sem arg)+ return (Syn_Decls _lhsOpps)+ )++-- cata+{-# NOINLINE sem_Decls #-}+sem_Decls :: Decls -> T_Decls +sem_Decls list = Prelude.foldr sem_Decls_Cons sem_Decls_Nil (Prelude.map sem_Decl list)++-- semantic domain+newtype T_Decls = T_Decls {+ attach_T_Decls :: Identity (T_Decls_s23 )+ }+newtype T_Decls_s23 = C_Decls_s23 {+ inv_Decls_s23 :: (T_Decls_v22 )+ }+data T_Decls_s24 = C_Decls_s24+type T_Decls_v22 = (T_Decls_vIn22 ) -> (T_Decls_vOut22 )+data T_Decls_vIn22 = T_Decls_vIn22 (Bool) (Bool) (Options) (String)+data T_Decls_vOut22 = T_Decls_vOut22 (PP_Docs)+{-# NOINLINE sem_Decls_Cons #-}+sem_Decls_Cons :: T_Decl -> T_Decls -> T_Decls +sem_Decls_Cons arg_hd_ arg_tl_ = T_Decls (return st23) where+ {-# NOINLINE st23 #-}+ !st23 = let+ v22 :: T_Decls_v22 + v22 = \ !(T_Decls_vIn22 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _hdX20 = Control.Monad.Identity.runIdentity (attach_T_Decl (arg_hd_))+ _tlX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_tl_))+ (T_Decl_vOut19 _hdIpp _hdIppa) = inv_Decl_s20 _hdX20 (T_Decl_vIn19 _hdOisDeclOfLet _hdOnested _hdOoptions _hdOoutputfile)+ (T_Decls_vOut22 _tlIpps) = inv_Decls_s23 _tlX23 (T_Decls_vIn22 _tlOisDeclOfLet _tlOnested _tlOoptions _tlOoutputfile)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule160 _hdIpp _tlIpps+ _hdOisDeclOfLet = rule161 _lhsIisDeclOfLet+ _hdOnested = rule162 _lhsInested+ _hdOoptions = rule163 _lhsIoptions+ _hdOoutputfile = rule164 _lhsIoutputfile+ _tlOisDeclOfLet = rule165 _lhsIisDeclOfLet+ _tlOnested = rule166 _lhsInested+ _tlOoptions = rule167 _lhsIoptions+ _tlOoutputfile = rule168 _lhsIoutputfile+ !__result_ = T_Decls_vOut22 _lhsOpps+ in __result_ )+ in C_Decls_s23 v22+ {-# INLINE rule160 #-}+ {-# LINE 92 "./src-ag/PrintCleanCode.ag" #-}+ rule160 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 92 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 1520 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule161 #-}+ rule161 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule162 #-}+ rule162 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule163 #-}+ rule163 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule164 #-}+ rule164 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule165 #-}+ rule165 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule166 #-}+ rule166 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule167 #-}+ rule167 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule168 #-}+ rule168 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Decls_Nil #-}+sem_Decls_Nil :: T_Decls +sem_Decls_Nil = T_Decls (return st23) where+ {-# NOINLINE st23 #-}+ !st23 = let+ v22 :: T_Decls_v22 + v22 = \ !(T_Decls_vIn22 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule169 ()+ !__result_ = T_Decls_vOut22 _lhsOpps+ in __result_ )+ in C_Decls_s23 v22+ {-# INLINE rule169 #-}+ {-# LINE 93 "./src-ag/PrintCleanCode.ag" #-}+ rule169 = \ (_ :: ()) ->+ {-# LINE 93 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 1562 "dist/build/PrintCleanCode.hs"#-}++-- Expr --------------------------------------------------------+-- wrapper+data Inh_Expr = Inh_Expr { nested_Inh_Expr :: !(Bool), options_Inh_Expr :: !(Options), outputfile_Inh_Expr :: !(String) }+data Syn_Expr = Syn_Expr { pp_Syn_Expr :: !(PP_Doc) }+{-# INLINABLE wrap_Expr #-}+wrap_Expr :: T_Expr -> Inh_Expr -> (Syn_Expr )+wrap_Expr !(T_Expr act) !(Inh_Expr _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_Expr_vOut25 _lhsOpp) <- return (inv_Expr_s26 sem arg)+ return (Syn_Expr _lhsOpp)+ )++-- cata+{-# NOINLINE sem_Expr #-}+sem_Expr :: Expr -> T_Expr +sem_Expr ( Let decls_ body_ ) = sem_Expr_Let ( sem_Decls decls_ ) ( sem_Expr body_ )+sem_Expr ( Case expr_ alts_ ) = sem_Expr_Case ( sem_Expr expr_ ) ( sem_CaseAlts alts_ )+sem_Expr ( Do stmts_ body_ ) = sem_Expr_Do ( sem_Decls stmts_ ) ( sem_Expr body_ )+sem_Expr ( Lambda args_ body_ ) = sem_Expr_Lambda ( sem_Exprs args_ ) ( sem_Expr body_ )+sem_Expr ( TupleExpr exprs_ ) = sem_Expr_TupleExpr ( sem_Exprs exprs_ )+sem_Expr ( UnboxedTupleExpr exprs_ ) = sem_Expr_UnboxedTupleExpr ( sem_Exprs exprs_ )+sem_Expr ( App !name_ args_ ) = sem_Expr_App name_ ( sem_Exprs args_ )+sem_Expr ( SimpleExpr !txt_ ) = sem_Expr_SimpleExpr txt_+sem_Expr ( TextExpr !lns_ ) = sem_Expr_TextExpr lns_+sem_Expr ( Trace !txt_ expr_ ) = sem_Expr_Trace txt_ ( sem_Expr expr_ )+sem_Expr ( PragmaExpr !onLeftSide_ !onNewLine_ !txt_ expr_ ) = sem_Expr_PragmaExpr onLeftSide_ onNewLine_ txt_ ( sem_Expr expr_ )+sem_Expr ( LineExpr expr_ ) = sem_Expr_LineExpr ( sem_Expr expr_ )+sem_Expr ( TypedExpr expr_ tp_ ) = sem_Expr_TypedExpr ( sem_Expr expr_ ) ( sem_Type tp_ )+sem_Expr ( ResultExpr !nt_ expr_ ) = sem_Expr_ResultExpr nt_ ( sem_Expr expr_ )+sem_Expr ( InvokeExpr !nt_ expr_ args_ ) = sem_Expr_InvokeExpr nt_ ( sem_Expr expr_ ) ( sem_Exprs args_ )+sem_Expr ( ResumeExpr !nt_ expr_ left_ rhs_ ) = sem_Expr_ResumeExpr nt_ ( sem_Expr expr_ ) ( sem_Lhs left_ ) ( sem_Expr rhs_ )+sem_Expr ( SemFun !nt_ args_ body_ ) = sem_Expr_SemFun nt_ ( sem_Exprs args_ ) ( sem_Expr body_ )++-- semantic domain+newtype T_Expr = T_Expr {+ attach_T_Expr :: Identity (T_Expr_s26 )+ }+newtype T_Expr_s26 = C_Expr_s26 {+ inv_Expr_s26 :: (T_Expr_v25 )+ }+data T_Expr_s27 = C_Expr_s27+type T_Expr_v25 = (T_Expr_vIn25 ) -> (T_Expr_vOut25 )+data T_Expr_vIn25 = T_Expr_vIn25 (Bool) (Options) (String)+data T_Expr_vOut25 = T_Expr_vOut25 (PP_Doc)+{-# NOINLINE sem_Expr_Let #-}+sem_Expr_Let :: T_Decls -> T_Expr -> T_Expr +sem_Expr_Let arg_decls_ arg_body_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _declsX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_decls_))+ _bodyX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_body_))+ (T_Decls_vOut22 _declsIpps) = inv_Decls_s23 _declsX23 (T_Decls_vIn22 _declsOisDeclOfLet _declsOnested _declsOoptions _declsOoutputfile)+ (T_Expr_vOut25 _bodyIpp) = inv_Expr_s26 _bodyX26 (T_Expr_vIn25 _bodyOnested _bodyOoptions _bodyOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule170 _bodyIpp _declsIpps+ _declsOisDeclOfLet = rule171 ()+ _declsOnested = rule172 _lhsInested+ _declsOoptions = rule173 _lhsIoptions+ _declsOoutputfile = rule174 _lhsIoutputfile+ _bodyOnested = rule175 _lhsInested+ _bodyOoptions = rule176 _lhsIoptions+ _bodyOoutputfile = rule177 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule170 #-}+ {-# LINE 150 "./src-ag/PrintCleanCode.ag" #-}+ rule170 = \ ((_bodyIpp) :: PP_Doc) ((_declsIpps) :: PP_Docs) ->+ {-# LINE 150 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens ( "let" >#< (vlist _declsIpps)+ >-< "in " >#< _bodyIpp+ )+ {-# LINE 1640 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule171 #-}+ {-# LINE 437 "./src-ag/PrintCleanCode.ag" #-}+ rule171 = \ (_ :: ()) ->+ {-# LINE 437 "./src-ag/PrintCleanCode.ag" #-}+ True+ {-# LINE 1646 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule172 #-}+ rule172 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule173 #-}+ rule173 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule174 #-}+ rule174 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule175 #-}+ rule175 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule176 #-}+ rule176 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule177 #-}+ rule177 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_Case #-}+sem_Expr_Case :: T_Expr -> T_CaseAlts -> T_Expr +sem_Expr_Case arg_expr_ arg_alts_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ _altsX5 = Control.Monad.Identity.runIdentity (attach_T_CaseAlts (arg_alts_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ (T_CaseAlts_vOut4 _altsIpps) = inv_CaseAlts_s5 _altsX5 (T_CaseAlts_vIn4 _altsOnested _altsOoptions _altsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule178 _altsIpps _exprIpp+ _exprOnested = rule179 _lhsInested+ _exprOoptions = rule180 _lhsIoptions+ _exprOoutputfile = rule181 _lhsIoutputfile+ _altsOnested = rule182 _lhsInested+ _altsOoptions = rule183 _lhsIoptions+ _altsOoutputfile = rule184 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule178 #-}+ {-# LINE 153 "./src-ag/PrintCleanCode.ag" #-}+ rule178 = \ ((_altsIpps) :: PP_Docs) ((_exprIpp) :: PP_Doc) ->+ {-# LINE 153 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"+ >-< (vlist _altsIpps)+ )+ {-# LINE 1694 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule179 #-}+ rule179 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule180 #-}+ rule180 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule181 #-}+ rule181 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule182 #-}+ rule182 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule183 #-}+ rule183 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule184 #-}+ rule184 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_Do #-}+sem_Expr_Do :: T_Decls -> T_Expr -> T_Expr +sem_Expr_Do arg_stmts_ arg_body_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _stmtsX23 = Control.Monad.Identity.runIdentity (attach_T_Decls (arg_stmts_))+ _bodyX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_body_))+ (T_Decls_vOut22 _stmtsIpps) = inv_Decls_s23 _stmtsX23 (T_Decls_vIn22 _stmtsOisDeclOfLet _stmtsOnested _stmtsOoptions _stmtsOoutputfile)+ (T_Expr_vOut25 _bodyIpp) = inv_Expr_s26 _bodyX26 (T_Expr_vIn25 _bodyOnested _bodyOoptions _bodyOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule185 _bodyIpp _stmtsIpps+ _stmtsOisDeclOfLet = rule186 ()+ _stmtsOnested = rule187 _lhsInested+ _stmtsOoptions = rule188 _lhsIoptions+ _stmtsOoutputfile = rule189 _lhsIoutputfile+ _bodyOnested = rule190 _lhsInested+ _bodyOoptions = rule191 _lhsIoptions+ _bodyOoutputfile = rule192 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule185 #-}+ {-# LINE 156 "./src-ag/PrintCleanCode.ag" #-}+ rule185 = \ ((_bodyIpp) :: PP_Doc) ((_stmtsIpps) :: PP_Docs) ->+ {-# LINE 156 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens ( "do" >#< ( vlist _stmtsIpps+ >-< ("return" >#< _bodyIpp))+ )+ {-# LINE 1743 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule186 #-}+ {-# LINE 439 "./src-ag/PrintCleanCode.ag" #-}+ rule186 = \ (_ :: ()) ->+ {-# LINE 439 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 1749 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule187 #-}+ rule187 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule188 #-}+ rule188 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule189 #-}+ rule189 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule190 #-}+ rule190 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule191 #-}+ rule191 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule192 #-}+ rule192 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_Lambda #-}+sem_Expr_Lambda :: T_Exprs -> T_Expr -> T_Expr +sem_Expr_Lambda arg_args_ arg_body_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _argsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_args_))+ _bodyX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_body_))+ (T_Exprs_vOut28 _argsIpps) = inv_Exprs_s29 _argsX29 (T_Exprs_vIn28 _argsOnested _argsOoptions _argsOoutputfile)+ (T_Expr_vOut25 _bodyIpp) = inv_Expr_s26 _bodyX26 (T_Expr_vIn25 _bodyOnested _bodyOoptions _bodyOoutputfile)+ _strictParams = rule193 _argsIpps _lhsIoptions+ _addBang = rule194 _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule195 _addBang _argsIpps _bodyIpp _strictParams+ _argsOnested = rule196 _lhsInested+ _argsOoptions = rule197 _lhsIoptions+ _argsOoutputfile = rule198 _lhsIoutputfile+ _bodyOnested = rule199 _lhsInested+ _bodyOoptions = rule200 _lhsIoptions+ _bodyOoutputfile = rule201 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule193 #-}+ {-# LINE 159 "./src-ag/PrintCleanCode.ag" #-}+ rule193 = \ ((_argsIpps) :: PP_Docs) ((_lhsIoptions) :: Options) ->+ {-# LINE 159 "./src-ag/PrintCleanCode.ag" #-}+ if strictSems _lhsIoptions+ then _argsIpps+ else []+ {-# LINE 1799 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule194 #-}+ {-# LINE 162 "./src-ag/PrintCleanCode.ag" #-}+ rule194 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 162 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> pp_parens ("!" >|< p)+ else id+ {-# LINE 1807 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule195 #-}+ {-# LINE 165 "./src-ag/PrintCleanCode.ag" #-}+ rule195 = \ _addBang ((_argsIpps) :: PP_Docs) ((_bodyIpp) :: PP_Doc) _strictParams ->+ {-# LINE 165 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"+ >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)+ )+ {-# LINE 1815 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule196 #-}+ rule196 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule197 #-}+ rule197 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule198 #-}+ rule198 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule199 #-}+ rule199 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule200 #-}+ rule200 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule201 #-}+ rule201 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_TupleExpr #-}+sem_Expr_TupleExpr :: T_Exprs -> T_Expr +sem_Expr_TupleExpr arg_exprs_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_exprs_))+ (T_Exprs_vOut28 _exprsIpps) = inv_Exprs_s29 _exprsX29 (T_Exprs_vIn28 _exprsOnested _exprsOoptions _exprsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule202 _exprsIpps _lhsInested+ _exprsOnested = rule203 _lhsInested+ _exprsOoptions = rule204 _lhsIoptions+ _exprsOoutputfile = rule205 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule202 #-}+ {-# LINE 168 "./src-ag/PrintCleanCode.ag" #-}+ rule202 = \ ((_exprsIpps) :: PP_Docs) ((_lhsInested) :: Bool) ->+ {-# LINE 168 "./src-ag/PrintCleanCode.ag" #-}+ ppTuple _lhsInested _exprsIpps+ {-# LINE 1856 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule203 #-}+ rule203 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule204 #-}+ rule204 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule205 #-}+ rule205 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_UnboxedTupleExpr #-}+sem_Expr_UnboxedTupleExpr :: T_Exprs -> T_Expr +sem_Expr_UnboxedTupleExpr arg_exprs_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_exprs_))+ (T_Exprs_vOut28 _exprsIpps) = inv_Exprs_s29 _exprsX29 (T_Exprs_vIn28 _exprsOnested _exprsOoptions _exprsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule206 _exprsIpps _lhsInested+ _exprsOnested = rule207 _lhsInested+ _exprsOoptions = rule208 _lhsIoptions+ _exprsOoutputfile = rule209 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule206 #-}+ {-# LINE 169 "./src-ag/PrintCleanCode.ag" #-}+ rule206 = \ ((_exprsIpps) :: PP_Docs) ((_lhsInested) :: Bool) ->+ {-# LINE 169 "./src-ag/PrintCleanCode.ag" #-}+ ppUnboxedTuple _lhsInested _exprsIpps+ {-# LINE 1888 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule207 #-}+ rule207 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule208 #-}+ rule208 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule209 #-}+ rule209 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_App #-}+sem_Expr_App :: (String) -> T_Exprs -> T_Expr +sem_Expr_App !arg_name_ arg_args_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _argsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_args_))+ (T_Exprs_vOut28 _argsIpps) = inv_Exprs_s29 _argsX29 (T_Exprs_vIn28 _argsOnested _argsOoptions _argsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule210 _argsIpps arg_name_+ _argsOnested = rule211 _lhsInested+ _argsOoptions = rule212 _lhsIoptions+ _argsOoutputfile = rule213 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule210 #-}+ {-# LINE 170 "./src-ag/PrintCleanCode.ag" #-}+ rule210 = \ ((_argsIpps) :: PP_Docs) name_ ->+ {-# LINE 170 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens $ name_ >#< hv_sp _argsIpps+ {-# LINE 1920 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule211 #-}+ rule211 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule212 #-}+ rule212 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule213 #-}+ rule213 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_SimpleExpr #-}+sem_Expr_SimpleExpr :: (String) -> T_Expr +sem_Expr_SimpleExpr !arg_txt_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpp :: PP_Doc+ _lhsOpp = rule214 arg_txt_+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule214 #-}+ {-# LINE 171 "./src-ag/PrintCleanCode.ag" #-}+ rule214 = \ txt_ ->+ {-# LINE 171 "./src-ag/PrintCleanCode.ag" #-}+ text txt_+ {-# LINE 1947 "dist/build/PrintCleanCode.hs"#-}+{-# NOINLINE sem_Expr_TextExpr #-}+sem_Expr_TextExpr :: ([String]) -> T_Expr +sem_Expr_TextExpr !arg_lns_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpp :: PP_Doc+ _lhsOpp = rule215 arg_lns_+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule215 #-}+ {-# LINE 172 "./src-ag/PrintCleanCode.ag" #-}+ rule215 = \ lns_ ->+ {-# LINE 172 "./src-ag/PrintCleanCode.ag" #-}+ vlist (map text lns_)+ {-# LINE 1965 "dist/build/PrintCleanCode.hs"#-}+{-# NOINLINE sem_Expr_Trace #-}+sem_Expr_Trace :: (String) -> T_Expr -> T_Expr +sem_Expr_Trace !arg_txt_ arg_expr_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule216 _exprIpp arg_txt_+ _exprOnested = rule217 _lhsInested+ _exprOoptions = rule218 _lhsIoptions+ _exprOoutputfile = rule219 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule216 #-}+ {-# LINE 173 "./src-ag/PrintCleanCode.ag" #-}+ rule216 = \ ((_exprIpp) :: PP_Doc) txt_ ->+ {-# LINE 173 "./src-ag/PrintCleanCode.ag" #-}+ "trace" >#< ( pp_parens ("\"" >|< text txt_ >|< "\"")+ >-< pp_parens _exprIpp+ )+ {-# LINE 1990 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule217 #-}+ rule217 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule218 #-}+ rule218 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule219 #-}+ rule219 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_PragmaExpr #-}+sem_Expr_PragmaExpr :: (Bool) -> (Bool) -> (String) -> T_Expr -> T_Expr +sem_Expr_PragmaExpr !arg_onLeftSide_ !arg_onNewLine_ !arg_txt_ arg_expr_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule220 _exprIpp arg_onLeftSide_ arg_onNewLine_ arg_txt_+ _exprOnested = rule221 _lhsInested+ _exprOoptions = rule222 _lhsIoptions+ _exprOoutputfile = rule223 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule220 #-}+ {-# LINE 176 "./src-ag/PrintCleanCode.ag" #-}+ rule220 = \ ((_exprIpp) :: PP_Doc) onLeftSide_ onNewLine_ txt_ ->+ {-# LINE 176 "./src-ag/PrintCleanCode.ag" #-}+ let pragmaDoc = "/*#" >#< txt_ >#< "#*/"+ op = if onNewLine_+ then (>-<)+ else (>#<)+ leftOp x y = if onLeftSide_+ then x `op` y+ else y+ rightOp x y = if onLeftSide_+ then x+ else x `op` y+ in pp_parens (pragmaDoc `leftOp` _exprIpp `rightOp` pragmaDoc)+ {-# LINE 2032 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule221 #-}+ rule221 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule222 #-}+ rule222 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule223 #-}+ rule223 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_LineExpr #-}+sem_Expr_LineExpr :: T_Expr -> T_Expr +sem_Expr_LineExpr arg_expr_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule224 _exprIpp _lhsIoutputfile+ _exprOnested = rule225 _lhsInested+ _exprOoptions = rule226 _lhsIoptions+ _exprOoutputfile = rule227 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule224 #-}+ {-# LINE 187 "./src-ag/PrintCleanCode.ag" #-}+ rule224 = \ ((_exprIpp) :: PP_Doc) ((_lhsIoutputfile) :: String) ->+ {-# LINE 187 "./src-ag/PrintCleanCode.ag" #-}+ _exprIpp >-< "/*# LINE" >#< ppWithLineNr (\n -> pp $ show $ n + 1) >#< show _lhsIoutputfile >#< "#*/"+ >-< ""+ {-# LINE 2065 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule225 #-}+ rule225 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule226 #-}+ rule226 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule227 #-}+ rule227 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_TypedExpr #-}+sem_Expr_TypedExpr :: T_Expr -> T_Type -> T_Expr +sem_Expr_TypedExpr arg_expr_ arg_tp_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule228 _exprIpp _tpIpp+ _exprOnested = rule229 _lhsInested+ _exprOoptions = rule230 _lhsIoptions+ _exprOoutputfile = rule231 _lhsIoutputfile+ _tpOnested = rule232 _lhsInested+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule228 #-}+ {-# LINE 189 "./src-ag/PrintCleanCode.ag" #-}+ rule228 = \ ((_exprIpp) :: PP_Doc) ((_tpIpp) :: PP_Doc) ->+ {-# LINE 189 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens (_exprIpp >#< "::" >#< _tpIpp)+ {-# LINE 2100 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule229 #-}+ rule229 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule230 #-}+ rule230 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule231 #-}+ rule231 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule232 #-}+ rule232 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Expr_ResultExpr #-}+sem_Expr_ResultExpr :: (String) -> T_Expr -> T_Expr +sem_Expr_ResultExpr !arg_nt_ arg_expr_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule233 _exprIpp _lhsIoptions arg_nt_+ _exprOnested = rule234 _lhsInested+ _exprOoptions = rule235 _lhsIoptions+ _exprOoutputfile = rule236 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule233 #-}+ {-# LINE 190 "./src-ag/PrintCleanCode.ag" #-}+ rule233 = \ ((_exprIpp) :: PP_Doc) ((_lhsIoptions) :: Options) nt_ ->+ {-# LINE 190 "./src-ag/PrintCleanCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "final" >#<+ pp_parens (nt_ >|< "_Syn" >#< pp_parens _exprIpp)+ else _exprIpp+ {-# LINE 2138 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule234 #-}+ rule234 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule235 #-}+ rule235 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule236 #-}+ rule236 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_InvokeExpr #-}+sem_Expr_InvokeExpr :: (String) -> T_Expr -> T_Exprs -> T_Expr +sem_Expr_InvokeExpr !arg_nt_ arg_expr_ arg_args_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ _argsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_args_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ (T_Exprs_vOut28 _argsIpps) = inv_Exprs_s29 _argsX29 (T_Exprs_vIn28 _argsOnested _argsOoptions _argsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule237 _argsIpps _exprIpp _lhsIoptions arg_nt_+ _exprOnested = rule238 _lhsInested+ _exprOoptions = rule239 _lhsIoptions+ _exprOoutputfile = rule240 _lhsIoutputfile+ _argsOnested = rule241 _lhsInested+ _argsOoptions = rule242 _lhsIoptions+ _argsOoutputfile = rule243 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule237 #-}+ {-# LINE 194 "./src-ag/PrintCleanCode.ag" #-}+ rule237 = \ ((_argsIpps) :: PP_Docs) ((_exprIpp) :: PP_Doc) ((_lhsIoptions) :: Options) nt_ ->+ {-# LINE 194 "./src-ag/PrintCleanCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "invoke" >#< pp_parens _exprIpp >#< pp_parens (+ nt_ >|< "_Inh" >#< pp_parens (ppTuple False _argsIpps))+ else _exprIpp >#< hv_sp _argsIpps+ {-# LINE 2178 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule238 #-}+ rule238 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule239 #-}+ rule239 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule240 #-}+ rule240 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule241 #-}+ rule241 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule242 #-}+ rule242 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule243 #-}+ rule243 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_ResumeExpr #-}+sem_Expr_ResumeExpr :: (String) -> T_Expr -> T_Lhs -> T_Expr -> T_Expr +sem_Expr_ResumeExpr !arg_nt_ arg_expr_ arg_left_ arg_rhs_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_))+ _leftX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_left_))+ _rhsX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_rhs_))+ (T_Expr_vOut25 _exprIpp) = inv_Expr_s26 _exprX26 (T_Expr_vIn25 _exprOnested _exprOoptions _exprOoutputfile)+ (T_Lhs_vOut31 _leftIpp) = inv_Lhs_s32 _leftX32 (T_Lhs_vIn31 _leftOisDeclOfLet _leftOnested _leftOoptions _leftOoutputfile)+ (T_Expr_vOut25 _rhsIpp) = inv_Expr_s26 _rhsX26 (T_Expr_vIn25 _rhsOnested _rhsOoptions _rhsOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule244 _exprIpp _leftIpp _lhsIoptions _rhsIpp arg_nt_+ _leftOisDeclOfLet = rule245 ()+ _exprOnested = rule246 _lhsInested+ _exprOoptions = rule247 _lhsIoptions+ _exprOoutputfile = rule248 _lhsIoutputfile+ _leftOnested = rule249 _lhsInested+ _leftOoptions = rule250 _lhsIoptions+ _leftOoutputfile = rule251 _lhsIoutputfile+ _rhsOnested = rule252 _lhsInested+ _rhsOoptions = rule253 _lhsIoptions+ _rhsOoutputfile = rule254 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule244 #-}+ {-# LINE 198 "./src-ag/PrintCleanCode.ag" #-}+ rule244 = \ ((_exprIpp) :: PP_Doc) ((_leftIpp) :: PP_Doc) ((_lhsIoptions) :: Options) ((_rhsIpp) :: PP_Doc) nt_ ->+ {-# LINE 198 "./src-ag/PrintCleanCode.ag" #-}+ if breadthFirst _lhsIoptions+ then pp_parens ("resume" >#< pp_parens _exprIpp+ >-< indent 2 (pp_parens ( "\\" >|<+ pp_parens ("~" >|< pp_parens (nt_ >|< "_Syn" >#< "_inh_arg"))+ >#< "->"+ >-< indent 2 ( "let" >#< _leftIpp >#< "= _inh_arg"+ >-< indent 2 ("in" >#< _rhsIpp)+ ))))+ else pp_parens ( "case" >#< pp_parens _exprIpp >#< "of"+ >-< ("{" >#< _leftIpp >#< "->")+ >-< indent 4 (_rhsIpp >#< "}")+ )+ {-# LINE 2241 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule245 #-}+ {-# LINE 441 "./src-ag/PrintCleanCode.ag" #-}+ rule245 = \ (_ :: ()) ->+ {-# LINE 441 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 2247 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule246 #-}+ rule246 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule247 #-}+ rule247 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule248 #-}+ rule248 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule249 #-}+ rule249 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule250 #-}+ rule250 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule251 #-}+ rule251 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule252 #-}+ rule252 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule253 #-}+ rule253 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule254 #-}+ rule254 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Expr_SemFun #-}+sem_Expr_SemFun :: (String) -> T_Exprs -> T_Expr -> T_Expr +sem_Expr_SemFun !arg_nt_ arg_args_ arg_body_ = T_Expr (return st26) where+ {-# NOINLINE st26 #-}+ !st26 = let+ v25 :: T_Expr_v25 + v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _argsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_args_))+ _bodyX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_body_))+ (T_Exprs_vOut28 _argsIpps) = inv_Exprs_s29 _argsX29 (T_Exprs_vIn28 _argsOnested _argsOoptions _argsOoutputfile)+ (T_Expr_vOut25 _bodyIpp) = inv_Expr_s26 _bodyX26 (T_Expr_vIn25 _bodyOnested _bodyOoptions _bodyOoutputfile)+ _strictParams = rule255 _argsIpps _lhsIoptions+ _addBang = rule256 _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule257 _addBang _argsIpps _bodyIpp _lhsIoptions _strictParams arg_nt_+ _argsOnested = rule258 _lhsInested+ _argsOoptions = rule259 _lhsIoptions+ _argsOoutputfile = rule260 _lhsIoutputfile+ _bodyOnested = rule261 _lhsInested+ _bodyOoptions = rule262 _lhsIoptions+ _bodyOoutputfile = rule263 _lhsIoutputfile+ !__result_ = T_Expr_vOut25 _lhsOpp+ in __result_ )+ in C_Expr_s26 v25+ {-# INLINE rule255 #-}+ {-# LINE 210 "./src-ag/PrintCleanCode.ag" #-}+ rule255 = \ ((_argsIpps) :: PP_Docs) ((_lhsIoptions) :: Options) ->+ {-# LINE 210 "./src-ag/PrintCleanCode.ag" #-}+ if strictSems _lhsIoptions+ then _argsIpps+ else []+ {-# LINE 2306 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule256 #-}+ {-# LINE 213 "./src-ag/PrintCleanCode.ag" #-}+ rule256 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 213 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> pp_parens ("!" >|< p)+ else id+ {-# LINE 2314 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule257 #-}+ {-# LINE 216 "./src-ag/PrintCleanCode.ag" #-}+ rule257 = \ _addBang ((_argsIpps) :: PP_Docs) ((_bodyIpp) :: PP_Doc) ((_lhsIoptions) :: Options) _strictParams nt_ ->+ {-# LINE 216 "./src-ag/PrintCleanCode.ag" #-}+ if breadthFirst _lhsIoptions+ then "Child" >#< pp_parens ( "\\" >|<+ pp_parens (nt_ >|< "_Inh" >#<+ ppTuple False (map _addBang _argsIpps)) >#< "->"+ >-< indent 2 (_strictParams `ppMultiSeqV` _bodyIpp))+ else if null _argsIpps+ then _bodyIpp+ else pp_parens ( "\\" >#< (vlist (map _addBang _argsIpps)) >#< "->"+ >-< indent 4 (_strictParams `ppMultiSeqV` _bodyIpp)+ )+ {-# LINE 2329 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule258 #-}+ rule258 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule259 #-}+ rule259 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule260 #-}+ rule260 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule261 #-}+ rule261 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule262 #-}+ rule262 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule263 #-}+ rule263 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile++-- Exprs -------------------------------------------------------+-- wrapper+data Inh_Exprs = Inh_Exprs { nested_Inh_Exprs :: !(Bool), options_Inh_Exprs :: !(Options), outputfile_Inh_Exprs :: !(String) }+data Syn_Exprs = Syn_Exprs { pps_Syn_Exprs :: !(PP_Docs) }+{-# INLINABLE wrap_Exprs #-}+wrap_Exprs :: T_Exprs -> Inh_Exprs -> (Syn_Exprs )+wrap_Exprs !(T_Exprs act) !(Inh_Exprs _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Exprs_vIn28 _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_Exprs_vOut28 _lhsOpps) <- return (inv_Exprs_s29 sem arg)+ return (Syn_Exprs _lhsOpps)+ )++-- cata+{-# NOINLINE sem_Exprs #-}+sem_Exprs :: Exprs -> T_Exprs +sem_Exprs list = Prelude.foldr sem_Exprs_Cons sem_Exprs_Nil (Prelude.map sem_Expr list)++-- semantic domain+newtype T_Exprs = T_Exprs {+ attach_T_Exprs :: Identity (T_Exprs_s29 )+ }+newtype T_Exprs_s29 = C_Exprs_s29 {+ inv_Exprs_s29 :: (T_Exprs_v28 )+ }+data T_Exprs_s30 = C_Exprs_s30+type T_Exprs_v28 = (T_Exprs_vIn28 ) -> (T_Exprs_vOut28 )+data T_Exprs_vIn28 = T_Exprs_vIn28 (Bool) (Options) (String)+data T_Exprs_vOut28 = T_Exprs_vOut28 (PP_Docs)+{-# NOINLINE sem_Exprs_Cons #-}+sem_Exprs_Cons :: T_Expr -> T_Exprs -> T_Exprs +sem_Exprs_Cons arg_hd_ arg_tl_ = T_Exprs (return st29) where+ {-# NOINLINE st29 #-}+ !st29 = let+ v28 :: T_Exprs_v28 + v28 = \ !(T_Exprs_vIn28 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _hdX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_hd_))+ _tlX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_tl_))+ (T_Expr_vOut25 _hdIpp) = inv_Expr_s26 _hdX26 (T_Expr_vIn25 _hdOnested _hdOoptions _hdOoutputfile)+ (T_Exprs_vOut28 _tlIpps) = inv_Exprs_s29 _tlX29 (T_Exprs_vIn28 _tlOnested _tlOoptions _tlOoutputfile)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule264 _hdIpp _tlIpps+ _hdOnested = rule265 _lhsInested+ _hdOoptions = rule266 _lhsIoptions+ _hdOoutputfile = rule267 _lhsIoutputfile+ _tlOnested = rule268 _lhsInested+ _tlOoptions = rule269 _lhsIoptions+ _tlOoutputfile = rule270 _lhsIoutputfile+ !__result_ = T_Exprs_vOut28 _lhsOpps+ in __result_ )+ in C_Exprs_s29 v28+ {-# INLINE rule264 #-}+ {-# LINE 68 "./src-ag/PrintCleanCode.ag" #-}+ rule264 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 68 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2406 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule265 #-}+ rule265 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule266 #-}+ rule266 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule267 #-}+ rule267 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+ {-# INLINE rule268 #-}+ rule268 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule269 #-}+ rule269 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule270 #-}+ rule270 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Exprs_Nil #-}+sem_Exprs_Nil :: T_Exprs +sem_Exprs_Nil = T_Exprs (return st29) where+ {-# NOINLINE st29 #-}+ !st29 = let+ v28 :: T_Exprs_v28 + v28 = \ !(T_Exprs_vIn28 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule271 ()+ !__result_ = T_Exprs_vOut28 _lhsOpps+ in __result_ )+ in C_Exprs_s29 v28+ {-# INLINE rule271 #-}+ {-# LINE 69 "./src-ag/PrintCleanCode.ag" #-}+ rule271 = \ (_ :: ()) ->+ {-# LINE 69 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 2442 "dist/build/PrintCleanCode.hs"#-}++-- Lhs ---------------------------------------------------------+-- wrapper+data Inh_Lhs = Inh_Lhs { isDeclOfLet_Inh_Lhs :: !(Bool), nested_Inh_Lhs :: !(Bool), options_Inh_Lhs :: !(Options), outputfile_Inh_Lhs :: !(String) }+data Syn_Lhs = Syn_Lhs { pp_Syn_Lhs :: !(PP_Doc) }+{-# INLINABLE wrap_Lhs #-}+wrap_Lhs :: T_Lhs -> Inh_Lhs -> (Syn_Lhs )+wrap_Lhs !(T_Lhs act) !(Inh_Lhs _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile+ !(T_Lhs_vOut31 _lhsOpp) <- return (inv_Lhs_s32 sem arg)+ return (Syn_Lhs _lhsOpp)+ )++-- cata+{-# NOINLINE sem_Lhs #-}+sem_Lhs :: Lhs -> T_Lhs +sem_Lhs ( Pattern3 pat3_ ) = sem_Lhs_Pattern3 ( sem_Pattern pat3_ )+sem_Lhs ( Pattern3SM pat3_ ) = sem_Lhs_Pattern3SM ( sem_Pattern pat3_ )+sem_Lhs ( TupleLhs !comps_ ) = sem_Lhs_TupleLhs comps_+sem_Lhs ( UnboxedTupleLhs !comps_ ) = sem_Lhs_UnboxedTupleLhs comps_+sem_Lhs ( Fun !name_ args_ ) = sem_Lhs_Fun name_ ( sem_Exprs args_ )+sem_Lhs ( Unwrap !name_ sub_ ) = sem_Lhs_Unwrap name_ ( sem_Lhs sub_ )++-- semantic domain+newtype T_Lhs = T_Lhs {+ attach_T_Lhs :: Identity (T_Lhs_s32 )+ }+newtype T_Lhs_s32 = C_Lhs_s32 {+ inv_Lhs_s32 :: (T_Lhs_v31 )+ }+data T_Lhs_s33 = C_Lhs_s33+type T_Lhs_v31 = (T_Lhs_vIn31 ) -> (T_Lhs_vOut31 )+data T_Lhs_vIn31 = T_Lhs_vIn31 (Bool) (Bool) (Options) (String)+data T_Lhs_vOut31 = T_Lhs_vOut31 (PP_Doc)+{-# NOINLINE sem_Lhs_Pattern3 #-}+sem_Lhs_Pattern3 :: T_Pattern -> T_Lhs +sem_Lhs_Pattern3 arg_pat3_ = T_Lhs (return st32) where+ {-# NOINLINE st32 #-}+ !st32 = let+ v31 :: T_Lhs_v31 + v31 = \ !(T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _pat3X41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat3_))+ (T_Pattern_vOut40 _pat3Icopy _pat3IisUnderscore _pat3Ipp _pat3Ipp' _pat3IstrictVars) = inv_Pattern_s41 _pat3X41 (T_Pattern_vIn40 _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions)+ _addStrictGuard = rule272 _hasStrictVars _lhsIoptions _strictGuard+ _strictGuard = rule273 _pat3IstrictVars+ _hasStrictVars = rule274 _pat3IstrictVars+ _lhsOpp :: PP_Doc+ _lhsOpp = rule275 _addStrictGuard _pat3Ipp+ _pat3ObelowIrrefutable = rule276 ()+ _pat3OisDeclOfLet = rule277 _lhsIisDeclOfLet+ _pat3Ooptions = rule278 _lhsIoptions+ !__result_ = T_Lhs_vOut31 _lhsOpp+ in __result_ )+ in C_Lhs_s32 v31+ {-# INLINE rule272 #-}+ {-# LINE 248 "./src-ag/PrintCleanCode.ag" #-}+ rule272 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->+ {-# LINE 248 "./src-ag/PrintCleanCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2504 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule273 #-}+ {-# LINE 250 "./src-ag/PrintCleanCode.ag" #-}+ rule273 = \ ((_pat3IstrictVars) :: [PP_Doc]) ->+ {-# LINE 250 "./src-ag/PrintCleanCode.ag" #-}+ _pat3IstrictVars `ppMultiSeqH` (pp "True")+ {-# LINE 2510 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule274 #-}+ {-# LINE 251 "./src-ag/PrintCleanCode.ag" #-}+ rule274 = \ ((_pat3IstrictVars) :: [PP_Doc]) ->+ {-# LINE 251 "./src-ag/PrintCleanCode.ag" #-}+ not (null _pat3IstrictVars)+ {-# LINE 2516 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule275 #-}+ {-# LINE 268 "./src-ag/PrintCleanCode.ag" #-}+ rule275 = \ _addStrictGuard ((_pat3Ipp) :: PP_Doc) ->+ {-# LINE 268 "./src-ag/PrintCleanCode.ag" #-}+ _addStrictGuard _pat3Ipp+ {-# LINE 2522 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule276 #-}+ {-# LINE 402 "./src-ag/PrintCleanCode.ag" #-}+ rule276 = \ (_ :: ()) ->+ {-# LINE 402 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 2528 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule277 #-}+ rule277 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule278 #-}+ rule278 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Lhs_Pattern3SM #-}+sem_Lhs_Pattern3SM :: T_Pattern -> T_Lhs +sem_Lhs_Pattern3SM arg_pat3_ = T_Lhs (return st32) where+ {-# NOINLINE st32 #-}+ !st32 = let+ v31 :: T_Lhs_v31 + v31 = \ !(T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _pat3X41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat3_))+ (T_Pattern_vOut40 _pat3Icopy _pat3IisUnderscore _pat3Ipp _pat3Ipp' _pat3IstrictVars) = inv_Pattern_s41 _pat3X41 (T_Pattern_vIn40 _pat3ObelowIrrefutable _pat3OisDeclOfLet _pat3Ooptions)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule279 _pat3Ipp'+ _pat3ObelowIrrefutable = rule280 ()+ _pat3OisDeclOfLet = rule281 _lhsIisDeclOfLet+ _pat3Ooptions = rule282 _lhsIoptions+ !__result_ = T_Lhs_vOut31 _lhsOpp+ in __result_ )+ in C_Lhs_s32 v31+ {-# INLINE rule279 #-}+ {-# LINE 269 "./src-ag/PrintCleanCode.ag" #-}+ rule279 = \ ((_pat3Ipp') :: PP_Doc) ->+ {-# LINE 269 "./src-ag/PrintCleanCode.ag" #-}+ _pat3Ipp'+ {-# LINE 2557 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule280 #-}+ {-# LINE 402 "./src-ag/PrintCleanCode.ag" #-}+ rule280 = \ (_ :: ()) ->+ {-# LINE 402 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 2563 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule281 #-}+ rule281 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule282 #-}+ rule282 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Lhs_TupleLhs #-}+sem_Lhs_TupleLhs :: ([String]) -> T_Lhs +sem_Lhs_TupleLhs !arg_comps_ = T_Lhs (return st32) where+ {-# NOINLINE st32 #-}+ !st32 = let+ v31 :: T_Lhs_v31 + v31 = \ !(T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _addStrictGuard = rule283 _hasStrictVars _lhsIoptions _strictGuard+ _strictGuard = rule284 _lhsIisDeclOfLet _lhsIoptions arg_comps_+ _hasStrictVars = rule285 arg_comps_+ _addBang = rule286 _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule287 _addBang _addStrictGuard _lhsInested arg_comps_+ !__result_ = T_Lhs_vOut31 _lhsOpp+ in __result_ )+ in C_Lhs_s32 v31+ {-# INLINE rule283 #-}+ {-# LINE 248 "./src-ag/PrintCleanCode.ag" #-}+ rule283 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->+ {-# LINE 248 "./src-ag/PrintCleanCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2591 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule284 #-}+ {-# LINE 253 "./src-ag/PrintCleanCode.ag" #-}+ rule284 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) comps_ ->+ {-# LINE 253 "./src-ag/PrintCleanCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then map text comps_ `ppMultiSeqH` (pp "True")+ else pp "True"+ {-# LINE 2599 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule285 #-}+ {-# LINE 256 "./src-ag/PrintCleanCode.ag" #-}+ rule285 = \ comps_ ->+ {-# LINE 256 "./src-ag/PrintCleanCode.ag" #-}+ not (null comps_)+ {-# LINE 2605 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule286 #-}+ {-# LINE 264 "./src-ag/PrintCleanCode.ag" #-}+ rule286 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 264 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2613 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule287 #-}+ {-# LINE 270 "./src-ag/PrintCleanCode.ag" #-}+ rule287 = \ _addBang _addStrictGuard ((_lhsInested) :: Bool) comps_ ->+ {-# LINE 270 "./src-ag/PrintCleanCode.ag" #-}+ _addStrictGuard $ ppTuple _lhsInested (map (_addBang . text) comps_)+ {-# LINE 2619 "dist/build/PrintCleanCode.hs"#-}+{-# NOINLINE sem_Lhs_UnboxedTupleLhs #-}+sem_Lhs_UnboxedTupleLhs :: ([String]) -> T_Lhs +sem_Lhs_UnboxedTupleLhs !arg_comps_ = T_Lhs (return st32) where+ {-# NOINLINE st32 #-}+ !st32 = let+ v31 :: T_Lhs_v31 + v31 = \ !(T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _addStrictGuard = rule288 _hasStrictVars _lhsIoptions _strictGuard+ _strictGuard = rule289 _lhsIisDeclOfLet _lhsIoptions arg_comps_+ _hasStrictVars = rule290 arg_comps_+ _addBang = rule291 _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule292 _addBang _addStrictGuard _lhsInested arg_comps_+ !__result_ = T_Lhs_vOut31 _lhsOpp+ in __result_ )+ in C_Lhs_s32 v31+ {-# INLINE rule288 #-}+ {-# LINE 248 "./src-ag/PrintCleanCode.ag" #-}+ rule288 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->+ {-# LINE 248 "./src-ag/PrintCleanCode.ag" #-}+ if strictCases _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2641 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule289 #-}+ {-# LINE 253 "./src-ag/PrintCleanCode.ag" #-}+ rule289 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) comps_ ->+ {-# LINE 253 "./src-ag/PrintCleanCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then map text comps_ `ppMultiSeqH` (pp "True")+ else pp "True"+ {-# LINE 2649 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule290 #-}+ {-# LINE 256 "./src-ag/PrintCleanCode.ag" #-}+ rule290 = \ comps_ ->+ {-# LINE 256 "./src-ag/PrintCleanCode.ag" #-}+ not (null comps_)+ {-# LINE 2655 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule291 #-}+ {-# LINE 264 "./src-ag/PrintCleanCode.ag" #-}+ rule291 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 264 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2663 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule292 #-}+ {-# LINE 271 "./src-ag/PrintCleanCode.ag" #-}+ rule292 = \ _addBang _addStrictGuard ((_lhsInested) :: Bool) comps_ ->+ {-# LINE 271 "./src-ag/PrintCleanCode.ag" #-}+ _addStrictGuard $ ppUnboxedTuple _lhsInested (map (_addBang . text) comps_)+ {-# LINE 2669 "dist/build/PrintCleanCode.hs"#-}+{-# NOINLINE sem_Lhs_Fun #-}+sem_Lhs_Fun :: (String) -> T_Exprs -> T_Lhs +sem_Lhs_Fun !arg_name_ arg_args_ = T_Lhs (return st32) where+ {-# NOINLINE st32 #-}+ !st32 = let+ v31 :: T_Lhs_v31 + v31 = \ !(T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _argsX29 = Control.Monad.Identity.runIdentity (attach_T_Exprs (arg_args_))+ (T_Exprs_vOut28 _argsIpps) = inv_Exprs_s29 _argsX29 (T_Exprs_vIn28 _argsOnested _argsOoptions _argsOoutputfile)+ _addStrictGuard = rule293 _hasStrictVars _lhsIoptions _strictGuard+ _hasStrictVars = rule294 _argsIpps+ _strictGuard = rule295 _argsIpps+ _addBang = rule296 _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule297 _addBang _addStrictGuard _argsIpps arg_name_+ _argsOnested = rule298 _lhsInested+ _argsOoptions = rule299 _lhsIoptions+ _argsOoutputfile = rule300 _lhsIoutputfile+ !__result_ = T_Lhs_vOut31 _lhsOpp+ in __result_ )+ in C_Lhs_s32 v31+ {-# INLINE rule293 #-}+ {-# LINE 259 "./src-ag/PrintCleanCode.ag" #-}+ rule293 = \ _hasStrictVars ((_lhsIoptions) :: Options) _strictGuard ->+ {-# LINE 259 "./src-ag/PrintCleanCode.ag" #-}+ if strictSems _lhsIoptions && _hasStrictVars then \v -> v >#< "|" >#< _strictGuard else id+ {-# LINE 2696 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule294 #-}+ {-# LINE 260 "./src-ag/PrintCleanCode.ag" #-}+ rule294 = \ ((_argsIpps) :: PP_Docs) ->+ {-# LINE 260 "./src-ag/PrintCleanCode.ag" #-}+ not (null _argsIpps)+ {-# LINE 2702 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule295 #-}+ {-# LINE 261 "./src-ag/PrintCleanCode.ag" #-}+ rule295 = \ ((_argsIpps) :: PP_Docs) ->+ {-# LINE 261 "./src-ag/PrintCleanCode.ag" #-}+ _argsIpps `ppMultiSeqH` (pp "True")+ {-# LINE 2708 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule296 #-}+ {-# LINE 264 "./src-ag/PrintCleanCode.ag" #-}+ rule296 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 264 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions+ then \p -> "!" >|< p+ else id+ {-# LINE 2716 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule297 #-}+ {-# LINE 272 "./src-ag/PrintCleanCode.ag" #-}+ rule297 = \ _addBang _addStrictGuard ((_argsIpps) :: PP_Docs) name_ ->+ {-# LINE 272 "./src-ag/PrintCleanCode.ag" #-}+ _addStrictGuard (name_ >#< hv_sp (map _addBang _argsIpps))+ {-# LINE 2722 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule298 #-}+ rule298 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule299 #-}+ rule299 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule300 #-}+ rule300 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile+{-# NOINLINE sem_Lhs_Unwrap #-}+sem_Lhs_Unwrap :: (String) -> T_Lhs -> T_Lhs +sem_Lhs_Unwrap !arg_name_ arg_sub_ = T_Lhs (return st32) where+ {-# NOINLINE st32 #-}+ !st32 = let+ v31 :: T_Lhs_v31 + v31 = \ !(T_Lhs_vIn31 _lhsIisDeclOfLet _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let+ _subX32 = Control.Monad.Identity.runIdentity (attach_T_Lhs (arg_sub_))+ (T_Lhs_vOut31 _subIpp) = inv_Lhs_s32 _subX32 (T_Lhs_vIn31 _subOisDeclOfLet _subOnested _subOoptions _subOoutputfile)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule301 _subIpp arg_name_+ _subOisDeclOfLet = rule302 _lhsIisDeclOfLet+ _subOnested = rule303 _lhsInested+ _subOoptions = rule304 _lhsIoptions+ _subOoutputfile = rule305 _lhsIoutputfile+ !__result_ = T_Lhs_vOut31 _lhsOpp+ in __result_ )+ in C_Lhs_s32 v31+ {-# INLINE rule301 #-}+ {-# LINE 273 "./src-ag/PrintCleanCode.ag" #-}+ rule301 = \ ((_subIpp) :: PP_Doc) name_ ->+ {-# LINE 273 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens (name_ >#< _subIpp)+ {-# LINE 2755 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule302 #-}+ rule302 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule303 #-}+ rule303 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule304 #-}+ rule304 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule305 #-}+ rule305 = \ ((_lhsIoutputfile) :: String) ->+ _lhsIoutputfile++-- NamedType ---------------------------------------------------+-- wrapper+data Inh_NamedType = Inh_NamedType { nested_Inh_NamedType :: !(Bool) }+data Syn_NamedType = Syn_NamedType { pp_Syn_NamedType :: !(PP_Doc), ppa_Syn_NamedType :: !(PP_Doc) }+{-# INLINABLE wrap_NamedType #-}+wrap_NamedType :: T_NamedType -> Inh_NamedType -> (Syn_NamedType )+wrap_NamedType !(T_NamedType act) !(Inh_NamedType _lhsInested) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_NamedType_vIn34 _lhsInested+ !(T_NamedType_vOut34 _lhsOpp _lhsOppa) <- return (inv_NamedType_s35 sem arg)+ return (Syn_NamedType _lhsOpp _lhsOppa)+ )++-- cata+{-# INLINE sem_NamedType #-}+sem_NamedType :: NamedType -> T_NamedType +sem_NamedType ( Named !strict_ !name_ tp_ ) = sem_NamedType_Named strict_ name_ ( sem_Type tp_ )++-- semantic domain+newtype T_NamedType = T_NamedType {+ attach_T_NamedType :: Identity (T_NamedType_s35 )+ }+newtype T_NamedType_s35 = C_NamedType_s35 {+ inv_NamedType_s35 :: (T_NamedType_v34 )+ }+data T_NamedType_s36 = C_NamedType_s36+type T_NamedType_v34 = (T_NamedType_vIn34 ) -> (T_NamedType_vOut34 )+data T_NamedType_vIn34 = T_NamedType_vIn34 (Bool)+data T_NamedType_vOut34 = T_NamedType_vOut34 (PP_Doc) (PP_Doc)+{-# NOINLINE sem_NamedType_Named #-}+sem_NamedType_Named :: (Bool) -> (String) -> T_Type -> T_NamedType +sem_NamedType_Named !arg_strict_ !arg_name_ arg_tp_ = T_NamedType (return st35) where+ {-# NOINLINE st35 #-}+ !st35 = let+ v34 :: T_NamedType_v34 + v34 = \ !(T_NamedType_vIn34 _lhsInested) -> ( let+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule306 _tpIpp arg_strict_+ _lhsOppa :: PP_Doc+ _lhsOppa = rule307 arg_name_+ _tpOnested = rule308 _lhsInested+ !__result_ = T_NamedType_vOut34 _lhsOpp _lhsOppa+ in __result_ )+ in C_NamedType_s35 v34+ {-# INLINE rule306 #-}+ {-# LINE 240 "./src-ag/PrintCleanCode.ag" #-}+ rule306 = \ ((_tpIpp) :: PP_Doc) strict_ ->+ {-# LINE 240 "./src-ag/PrintCleanCode.ag" #-}+ if strict_+ then "!" >|< pp_parens _tpIpp+ else _tpIpp+ {-# LINE 2823 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule307 #-}+ {-# LINE 244 "./src-ag/PrintCleanCode.ag" #-}+ rule307 = \ name_ ->+ {-# LINE 244 "./src-ag/PrintCleanCode.ag" #-}+ pp name_+ {-# LINE 2829 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule308 #-}+ rule308 = \ ((_lhsInested) :: Bool) ->+ _lhsInested++-- NamedTypes --------------------------------------------------+-- wrapper+data Inh_NamedTypes = Inh_NamedTypes { nested_Inh_NamedTypes :: !(Bool) }+data Syn_NamedTypes = Syn_NamedTypes { ppas_Syn_NamedTypes :: !(PP_Docs), pps_Syn_NamedTypes :: !(PP_Docs) }+{-# INLINABLE wrap_NamedTypes #-}+wrap_NamedTypes :: T_NamedTypes -> Inh_NamedTypes -> (Syn_NamedTypes )+wrap_NamedTypes !(T_NamedTypes act) !(Inh_NamedTypes _lhsInested) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_NamedTypes_vIn37 _lhsInested+ !(T_NamedTypes_vOut37 _lhsOppas _lhsOpps) <- return (inv_NamedTypes_s38 sem arg)+ return (Syn_NamedTypes _lhsOppas _lhsOpps)+ )++-- cata+{-# NOINLINE sem_NamedTypes #-}+sem_NamedTypes :: NamedTypes -> T_NamedTypes +sem_NamedTypes list = Prelude.foldr sem_NamedTypes_Cons sem_NamedTypes_Nil (Prelude.map sem_NamedType list)++-- semantic domain+newtype T_NamedTypes = T_NamedTypes {+ attach_T_NamedTypes :: Identity (T_NamedTypes_s38 )+ }+newtype T_NamedTypes_s38 = C_NamedTypes_s38 {+ inv_NamedTypes_s38 :: (T_NamedTypes_v37 )+ }+data T_NamedTypes_s39 = C_NamedTypes_s39+type T_NamedTypes_v37 = (T_NamedTypes_vIn37 ) -> (T_NamedTypes_vOut37 )+data T_NamedTypes_vIn37 = T_NamedTypes_vIn37 (Bool)+data T_NamedTypes_vOut37 = T_NamedTypes_vOut37 (PP_Docs) (PP_Docs)+{-# NOINLINE sem_NamedTypes_Cons #-}+sem_NamedTypes_Cons :: T_NamedType -> T_NamedTypes -> T_NamedTypes +sem_NamedTypes_Cons arg_hd_ arg_tl_ = T_NamedTypes (return st38) where+ {-# NOINLINE st38 #-}+ !st38 = let+ v37 :: T_NamedTypes_v37 + v37 = \ !(T_NamedTypes_vIn37 _lhsInested) -> ( let+ _hdX35 = Control.Monad.Identity.runIdentity (attach_T_NamedType (arg_hd_))+ _tlX38 = Control.Monad.Identity.runIdentity (attach_T_NamedTypes (arg_tl_))+ (T_NamedType_vOut34 _hdIpp _hdIppa) = inv_NamedType_s35 _hdX35 (T_NamedType_vIn34 _hdOnested)+ (T_NamedTypes_vOut37 _tlIppas _tlIpps) = inv_NamedTypes_s38 _tlX38 (T_NamedTypes_vIn37 _tlOnested)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule309 _hdIpp _tlIpps+ _lhsOppas :: PP_Docs+ _lhsOppas = rule310 _hdIppa _tlIppas+ _hdOnested = rule311 _lhsInested+ _tlOnested = rule312 _lhsInested+ !__result_ = T_NamedTypes_vOut37 _lhsOppas _lhsOpps+ in __result_ )+ in C_NamedTypes_s38 v37+ {-# INLINE rule309 #-}+ {-# LINE 86 "./src-ag/PrintCleanCode.ag" #-}+ rule309 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 86 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 2889 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule310 #-}+ {-# LINE 87 "./src-ag/PrintCleanCode.ag" #-}+ rule310 = \ ((_hdIppa) :: PP_Doc) ((_tlIppas) :: PP_Docs) ->+ {-# LINE 87 "./src-ag/PrintCleanCode.ag" #-}+ _hdIppa : _tlIppas+ {-# LINE 2895 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule311 #-}+ rule311 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule312 #-}+ rule312 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_NamedTypes_Nil #-}+sem_NamedTypes_Nil :: T_NamedTypes +sem_NamedTypes_Nil = T_NamedTypes (return st38) where+ {-# NOINLINE st38 #-}+ !st38 = let+ v37 :: T_NamedTypes_v37 + v37 = \ !(T_NamedTypes_vIn37 _lhsInested) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule313 ()+ _lhsOppas :: PP_Docs+ _lhsOppas = rule314 ()+ !__result_ = T_NamedTypes_vOut37 _lhsOppas _lhsOpps+ in __result_ )+ in C_NamedTypes_s38 v37+ {-# INLINE rule313 #-}+ {-# LINE 88 "./src-ag/PrintCleanCode.ag" #-}+ rule313 = \ (_ :: ()) ->+ {-# LINE 88 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 2921 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule314 #-}+ {-# LINE 89 "./src-ag/PrintCleanCode.ag" #-}+ rule314 = \ (_ :: ()) ->+ {-# LINE 89 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 2927 "dist/build/PrintCleanCode.hs"#-}++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { belowIrrefutable_Inh_Pattern :: !(Bool), isDeclOfLet_Inh_Pattern :: !(Bool), options_Inh_Pattern :: !(Options) }+data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: !(Pattern), isUnderscore_Syn_Pattern :: !(Bool), pp_Syn_Pattern :: !(PP_Doc), pp'_Syn_Pattern :: !(PP_Doc), strictVars_Syn_Pattern :: !([PP_Doc]) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern !(T_Pattern act) !(Inh_Pattern _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Pattern_vIn40 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ !(T_Pattern_vOut40 _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars) <- return (inv_Pattern_s41 sem arg)+ return (Syn_Pattern _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr !name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product !pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias !field_ !attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore !pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s41 )+ }+newtype T_Pattern_s41 = C_Pattern_s41 {+ inv_Pattern_s41 :: (T_Pattern_v40 )+ }+data T_Pattern_s42 = C_Pattern_s42+type T_Pattern_v40 = (T_Pattern_vIn40 ) -> (T_Pattern_vOut40 )+data T_Pattern_vIn40 = T_Pattern_vIn40 (Bool) (Bool) (Options)+data T_Pattern_vOut40 = T_Pattern_vOut40 (Pattern) (Bool) (PP_Doc) (PP_Doc) ([PP_Doc])+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr !arg_name_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ !st41 = let+ v40 :: T_Pattern_v40 + v40 = \ !(T_Pattern_vIn40 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIcopy _patsIpps _patsIpps' _patsIstrictVars) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions)+ _addBang = rule315 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule316 _addBang _patsIpps arg_name_+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule317 ()+ _lhsOpp' :: PP_Doc+ _lhsOpp' = rule318 _patsIpps' arg_name_+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule319 _patsIstrictVars+ _copy = rule320 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule321 _copy+ _patsObelowIrrefutable = rule322 _lhsIbelowIrrefutable+ _patsOisDeclOfLet = rule323 _lhsIisDeclOfLet+ _patsOoptions = rule324 _lhsIoptions+ !__result_ = T_Pattern_vOut40 _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule315 #-}+ {-# LINE 374 "./src-ag/PrintCleanCode.ag" #-}+ rule315 = \ ((_lhsIbelowIrrefutable) :: Bool) ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ->+ {-# LINE 374 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 2997 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule316 #-}+ {-# LINE 379 "./src-ag/PrintCleanCode.ag" #-}+ rule316 = \ _addBang ((_patsIpps) :: [PP_Doc]) name_ ->+ {-# LINE 379 "./src-ag/PrintCleanCode.ag" #-}+ _addBang $ pp_parens $ name_ >#< hv_sp _patsIpps+ {-# LINE 3003 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule317 #-}+ {-# LINE 390 "./src-ag/PrintCleanCode.ag" #-}+ rule317 = \ (_ :: ()) ->+ {-# LINE 390 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 3009 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule318 #-}+ {-# LINE 413 "./src-ag/PrintCleanCode.ag" #-}+ rule318 = \ ((_patsIpps') :: [PP_Doc]) name_ ->+ {-# LINE 413 "./src-ag/PrintCleanCode.ag" #-}+ pp_parens $ name_ >#< hv_sp (map pp_parens _patsIpps')+ {-# LINE 3015 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule319 #-}+ rule319 = \ ((_patsIstrictVars) :: [PP_Doc]) ->+ _patsIstrictVars+ {-# INLINE rule320 #-}+ rule320 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule321 #-}+ rule321 = \ _copy ->+ _copy+ {-# INLINE rule322 #-}+ rule322 = \ ((_lhsIbelowIrrefutable) :: Bool) ->+ _lhsIbelowIrrefutable+ {-# INLINE rule323 #-}+ rule323 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule324 #-}+ rule324 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product !arg_pos_ arg_pats_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ !st41 = let+ v40 :: T_Pattern_v40 + v40 = \ !(T_Pattern_vIn40 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _patsX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut43 _patsIcopy _patsIpps _patsIpps' _patsIstrictVars) = inv_Patterns_s44 _patsX44 (T_Patterns_vIn43 _patsObelowIrrefutable _patsOisDeclOfLet _patsOoptions)+ _addBang = rule325 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ _lhsOpp :: PP_Doc+ _lhsOpp = rule326 _addBang _patsIpps+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule327 ()+ _lhsOpp' :: PP_Doc+ _lhsOpp' = rule328 _patsIpps'+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule329 _patsIstrictVars+ _copy = rule330 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule331 _copy+ _patsObelowIrrefutable = rule332 _lhsIbelowIrrefutable+ _patsOisDeclOfLet = rule333 _lhsIisDeclOfLet+ _patsOoptions = rule334 _lhsIoptions+ !__result_ = T_Pattern_vOut40 _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule325 #-}+ {-# LINE 374 "./src-ag/PrintCleanCode.ag" #-}+ rule325 = \ ((_lhsIbelowIrrefutable) :: Bool) ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ->+ {-# LINE 374 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 3068 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule326 #-}+ {-# LINE 380 "./src-ag/PrintCleanCode.ag" #-}+ rule326 = \ _addBang ((_patsIpps) :: [PP_Doc]) ->+ {-# LINE 380 "./src-ag/PrintCleanCode.ag" #-}+ _addBang $ pp_block "(" ")" "," _patsIpps+ {-# LINE 3074 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule327 #-}+ {-# LINE 391 "./src-ag/PrintCleanCode.ag" #-}+ rule327 = \ (_ :: ()) ->+ {-# LINE 391 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 3080 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule328 #-}+ {-# LINE 414 "./src-ag/PrintCleanCode.ag" #-}+ rule328 = \ ((_patsIpps') :: [PP_Doc]) ->+ {-# LINE 414 "./src-ag/PrintCleanCode.ag" #-}+ pp_block "(" ")" "," _patsIpps'+ {-# LINE 3086 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule329 #-}+ rule329 = \ ((_patsIstrictVars) :: [PP_Doc]) ->+ _patsIstrictVars+ {-# INLINE rule330 #-}+ rule330 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule331 #-}+ rule331 = \ _copy ->+ _copy+ {-# INLINE rule332 #-}+ rule332 = \ ((_lhsIbelowIrrefutable) :: Bool) ->+ _lhsIbelowIrrefutable+ {-# INLINE rule333 #-}+ rule333 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule334 #-}+ rule334 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias !arg_field_ !arg_attr_ arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ !st41 = let+ v40 :: T_Pattern_v40 + v40 = \ !(T_Pattern_vIn40 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIcopy _patIisUnderscore _patIpp _patIpp' _patIstrictVars) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patObelowIrrefutable _patOisDeclOfLet _patOoptions)+ _strictVar = rule335 _lhsIisDeclOfLet _lhsIoptions _ppVar+ _strictPatVars = rule336 _lhsIisDeclOfLet _lhsIoptions _patIstrictVars+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule337 _strictPatVars _strictVar+ _addBang = rule338 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ _ppVar = rule339 _lhsIoptions arg_attr_ arg_field_+ _ppVarBang = rule340 _addBang _ppVar+ _lhsOpp :: PP_Doc+ _lhsOpp = rule341 _patIisUnderscore _patIpp _ppVarBang+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule342 ()+ _lhsOpp' :: PP_Doc+ _lhsOpp' = rule343 _lhsIoptions _patIpp' arg_attr_ arg_field_+ _copy = rule344 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule345 _copy+ _patObelowIrrefutable = rule346 _lhsIbelowIrrefutable+ _patOisDeclOfLet = rule347 _lhsIisDeclOfLet+ _patOoptions = rule348 _lhsIoptions+ !__result_ = T_Pattern_vOut40 _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule335 #-}+ {-# LINE 352 "./src-ag/PrintCleanCode.ag" #-}+ rule335 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) _ppVar ->+ {-# LINE 352 "./src-ag/PrintCleanCode.ag" #-}+ if strictCases _lhsIoptions && not _lhsIisDeclOfLet+ then [_ppVar ]+ else []+ {-# LINE 3143 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule336 #-}+ {-# LINE 356 "./src-ag/PrintCleanCode.ag" #-}+ rule336 = \ ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ((_patIstrictVars) :: [PP_Doc]) ->+ {-# LINE 356 "./src-ag/PrintCleanCode.ag" #-}+ if stricterCases _lhsIoptions && not _lhsIisDeclOfLet+ then _patIstrictVars+ else []+ {-# LINE 3151 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule337 #-}+ {-# LINE 360 "./src-ag/PrintCleanCode.ag" #-}+ rule337 = \ _strictPatVars _strictVar ->+ {-# LINE 360 "./src-ag/PrintCleanCode.ag" #-}+ _strictVar ++ _strictPatVars+ {-# LINE 3157 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule338 #-}+ {-# LINE 374 "./src-ag/PrintCleanCode.ag" #-}+ rule338 = \ ((_lhsIbelowIrrefutable) :: Bool) ((_lhsIisDeclOfLet) :: Bool) ((_lhsIoptions) :: Options) ->+ {-# LINE 374 "./src-ag/PrintCleanCode.ag" #-}+ if bangpats _lhsIoptions && not _lhsIisDeclOfLet && not _lhsIbelowIrrefutable+ then \p -> "!" >|< p+ else id+ {-# LINE 3165 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule339 #-}+ {-# LINE 381 "./src-ag/PrintCleanCode.ag" #-}+ rule339 = \ ((_lhsIoptions) :: Options) attr_ field_ ->+ {-# LINE 381 "./src-ag/PrintCleanCode.ag" #-}+ pp (attrname _lhsIoptions False field_ attr_)+ {-# LINE 3171 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule340 #-}+ {-# LINE 382 "./src-ag/PrintCleanCode.ag" #-}+ rule340 = \ _addBang _ppVar ->+ {-# LINE 382 "./src-ag/PrintCleanCode.ag" #-}+ _addBang $ _ppVar+ {-# LINE 3177 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule341 #-}+ {-# LINE 383 "./src-ag/PrintCleanCode.ag" #-}+ rule341 = \ ((_patIisUnderscore) :: Bool) ((_patIpp) :: PP_Doc) _ppVarBang ->+ {-# LINE 383 "./src-ag/PrintCleanCode.ag" #-}+ if _patIisUnderscore+ then _ppVarBang+ else _ppVarBang >|< "@" >|< _patIpp+ {-# LINE 3185 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule342 #-}+ {-# LINE 392 "./src-ag/PrintCleanCode.ag" #-}+ rule342 = \ (_ :: ()) ->+ {-# LINE 392 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 3191 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule343 #-}+ {-# LINE 415 "./src-ag/PrintCleanCode.ag" #-}+ rule343 = \ ((_lhsIoptions) :: Options) ((_patIpp') :: PP_Doc) attr_ field_ ->+ {-# LINE 415 "./src-ag/PrintCleanCode.ag" #-}+ let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_+ | otherwise = attrname _lhsIoptions False field_ attr_+ in attribute >|< "@" >|< _patIpp'+ {-# LINE 3199 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule344 #-}+ rule344 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule345 #-}+ rule345 = \ _copy ->+ _copy+ {-# INLINE rule346 #-}+ rule346 = \ ((_lhsIbelowIrrefutable) :: Bool) ->+ _lhsIbelowIrrefutable+ {-# INLINE rule347 #-}+ rule347 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule348 #-}+ rule348 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ !st41 = let+ v40 :: T_Pattern_v40 + v40 = \ !(T_Pattern_vIn40 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut40 _patIcopy _patIisUnderscore _patIpp _patIpp' _patIstrictVars) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patObelowIrrefutable _patOisDeclOfLet _patOoptions)+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule349 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule350 _patIpp+ _patObelowIrrefutable = rule351 ()+ _lhsOpp' :: PP_Doc+ _lhsOpp' = rule352 _patIpp+ _copy = rule353 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule354 _copy+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule355 _patIisUnderscore+ _patOisDeclOfLet = rule356 _lhsIisDeclOfLet+ _patOoptions = rule357 _lhsIoptions+ !__result_ = T_Pattern_vOut40 _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule349 #-}+ {-# LINE 362 "./src-ag/PrintCleanCode.ag" #-}+ rule349 = \ (_ :: ()) ->+ {-# LINE 362 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 3246 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule350 #-}+ {-# LINE 386 "./src-ag/PrintCleanCode.ag" #-}+ rule350 = \ ((_patIpp) :: PP_Doc) ->+ {-# LINE 386 "./src-ag/PrintCleanCode.ag" #-}+ text "~" >|< pp_parens _patIpp+ {-# LINE 3252 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule351 #-}+ {-# LINE 398 "./src-ag/PrintCleanCode.ag" #-}+ rule351 = \ (_ :: ()) ->+ {-# LINE 398 "./src-ag/PrintCleanCode.ag" #-}+ True+ {-# LINE 3258 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule352 #-}+ {-# LINE 418 "./src-ag/PrintCleanCode.ag" #-}+ rule352 = \ ((_patIpp) :: PP_Doc) ->+ {-# LINE 418 "./src-ag/PrintCleanCode.ag" #-}+ text "~" >|< pp_parens _patIpp+ {-# LINE 3264 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule353 #-}+ rule353 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule354 #-}+ rule354 = \ _copy ->+ _copy+ {-# INLINE rule355 #-}+ rule355 = \ ((_patIisUnderscore) :: Bool) ->+ _patIisUnderscore+ {-# INLINE rule356 #-}+ rule356 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule357 #-}+ rule357 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore !arg_pos_ = T_Pattern (return st41) where+ {-# NOINLINE st41 #-}+ !st41 = let+ v40 :: T_Pattern_v40 + v40 = \ !(T_Pattern_vIn40 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _lhsOpp :: PP_Doc+ _lhsOpp = rule358 ()+ _lhsOisUnderscore :: Bool+ _lhsOisUnderscore = rule359 ()+ _lhsOpp' :: PP_Doc+ _lhsOpp' = rule360 ()+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule361 ()+ _copy = rule362 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule363 _copy+ !__result_ = T_Pattern_vOut40 _lhsOcopy _lhsOisUnderscore _lhsOpp _lhsOpp' _lhsOstrictVars+ in __result_ )+ in C_Pattern_s41 v40+ {-# INLINE rule358 #-}+ {-# LINE 387 "./src-ag/PrintCleanCode.ag" #-}+ rule358 = \ (_ :: ()) ->+ {-# LINE 387 "./src-ag/PrintCleanCode.ag" #-}+ text "_"+ {-# LINE 3306 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule359 #-}+ {-# LINE 393 "./src-ag/PrintCleanCode.ag" #-}+ rule359 = \ (_ :: ()) ->+ {-# LINE 393 "./src-ag/PrintCleanCode.ag" #-}+ True+ {-# LINE 3312 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule360 #-}+ {-# LINE 419 "./src-ag/PrintCleanCode.ag" #-}+ rule360 = \ (_ :: ()) ->+ {-# LINE 419 "./src-ag/PrintCleanCode.ag" #-}+ text "_"+ {-# LINE 3318 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule361 #-}+ rule361 = \ (_ :: ()) ->+ []+ {-# INLINE rule362 #-}+ rule362 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule363 #-}+ rule363 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { belowIrrefutable_Inh_Patterns :: !(Bool), isDeclOfLet_Inh_Patterns :: !(Bool), options_Inh_Patterns :: !(Options) }+data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: !(Patterns), pps_Syn_Patterns :: !([PP_Doc]), pps'_Syn_Patterns :: !([PP_Doc]), strictVars_Syn_Patterns :: !([PP_Doc]) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns !(T_Patterns act) !(Inh_Patterns _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Patterns_vIn43 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions+ !(T_Patterns_vOut43 _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars) <- return (inv_Patterns_s44 sem arg)+ return (Syn_Patterns _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s44 )+ }+newtype T_Patterns_s44 = C_Patterns_s44 {+ inv_Patterns_s44 :: (T_Patterns_v43 )+ }+data T_Patterns_s45 = C_Patterns_s45+type T_Patterns_v43 = (T_Patterns_vIn43 ) -> (T_Patterns_vOut43 )+data T_Patterns_vIn43 = T_Patterns_vIn43 (Bool) (Bool) (Options)+data T_Patterns_vOut43 = T_Patterns_vOut43 (Patterns) ([PP_Doc]) ([PP_Doc]) ([PP_Doc])+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ !st44 = let+ v43 :: T_Patterns_v43 + v43 = \ !(T_Patterns_vIn43 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _hdX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX44 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut40 _hdIcopy _hdIisUnderscore _hdIpp _hdIpp' _hdIstrictVars) = inv_Pattern_s41 _hdX41 (T_Pattern_vIn40 _hdObelowIrrefutable _hdOisDeclOfLet _hdOoptions)+ (T_Patterns_vOut43 _tlIcopy _tlIpps _tlIpps' _tlIstrictVars) = inv_Patterns_s44 _tlX44 (T_Patterns_vIn43 _tlObelowIrrefutable _tlOisDeclOfLet _tlOoptions)+ _lhsOpps :: [PP_Doc]+ _lhsOpps = rule364 _hdIpp _tlIpps+ _lhsOpps' :: [PP_Doc]+ _lhsOpps' = rule365 _hdIpp' _tlIpps'+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule366 _hdIstrictVars _tlIstrictVars+ _copy = rule367 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule368 _copy+ _hdObelowIrrefutable = rule369 _lhsIbelowIrrefutable+ _hdOisDeclOfLet = rule370 _lhsIisDeclOfLet+ _hdOoptions = rule371 _lhsIoptions+ _tlObelowIrrefutable = rule372 _lhsIbelowIrrefutable+ _tlOisDeclOfLet = rule373 _lhsIisDeclOfLet+ _tlOoptions = rule374 _lhsIoptions+ !__result_ = T_Patterns_vOut43 _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule364 #-}+ {-# LINE 369 "./src-ag/PrintCleanCode.ag" #-}+ rule364 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: [PP_Doc]) ->+ {-# LINE 369 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 3393 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule365 #-}+ {-# LINE 409 "./src-ag/PrintCleanCode.ag" #-}+ rule365 = \ ((_hdIpp') :: PP_Doc) ((_tlIpps') :: [PP_Doc]) ->+ {-# LINE 409 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp' : _tlIpps'+ {-# LINE 3399 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule366 #-}+ rule366 = \ ((_hdIstrictVars) :: [PP_Doc]) ((_tlIstrictVars) :: [PP_Doc]) ->+ _hdIstrictVars ++ _tlIstrictVars+ {-# INLINE rule367 #-}+ rule367 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule368 #-}+ rule368 = \ _copy ->+ _copy+ {-# INLINE rule369 #-}+ rule369 = \ ((_lhsIbelowIrrefutable) :: Bool) ->+ _lhsIbelowIrrefutable+ {-# INLINE rule370 #-}+ rule370 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule371 #-}+ rule371 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule372 #-}+ rule372 = \ ((_lhsIbelowIrrefutable) :: Bool) ->+ _lhsIbelowIrrefutable+ {-# INLINE rule373 #-}+ rule373 = \ ((_lhsIisDeclOfLet) :: Bool) ->+ _lhsIisDeclOfLet+ {-# INLINE rule374 #-}+ rule374 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st44) where+ {-# NOINLINE st44 #-}+ !st44 = let+ v43 :: T_Patterns_v43 + v43 = \ !(T_Patterns_vIn43 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions) -> ( let+ _lhsOpps :: [PP_Doc]+ _lhsOpps = rule375 ()+ _lhsOpps' :: [PP_Doc]+ _lhsOpps' = rule376 ()+ _lhsOstrictVars :: [PP_Doc]+ _lhsOstrictVars = rule377 ()+ _copy = rule378 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule379 _copy+ !__result_ = T_Patterns_vOut43 _lhsOcopy _lhsOpps _lhsOpps' _lhsOstrictVars+ in __result_ )+ in C_Patterns_s44 v43+ {-# INLINE rule375 #-}+ {-# LINE 370 "./src-ag/PrintCleanCode.ag" #-}+ rule375 = \ (_ :: ()) ->+ {-# LINE 370 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 3451 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule376 #-}+ {-# LINE 410 "./src-ag/PrintCleanCode.ag" #-}+ rule376 = \ (_ :: ()) ->+ {-# LINE 410 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 3457 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule377 #-}+ rule377 = \ (_ :: ()) ->+ []+ {-# INLINE rule378 #-}+ rule378 = \ (_ :: ()) ->+ []+ {-# INLINE rule379 #-}+ rule379 = \ _copy ->+ _copy++-- Program -----------------------------------------------------+-- wrapper+data Inh_Program = Inh_Program { importBlocks_Inh_Program :: !(PP_Doc), mainBlocksDoc_Inh_Program :: !(PP_Doc), mainFile_Inh_Program :: !(String), mainName_Inh_Program :: !(String), moduleHeader_Inh_Program :: !(String -> String -> String -> Bool -> String), options_Inh_Program :: !(Options), optionsLine_Inh_Program :: !(String), pragmaBlocks_Inh_Program :: !(String), textBlockMap_Inh_Program :: !(Map BlockInfo PP_Doc), textBlocks_Inh_Program :: !(PP_Doc) }+data Syn_Program = Syn_Program { genIO_Syn_Program :: !(IO ()), output_Syn_Program :: !(PP_Docs) }+{-# INLINABLE wrap_Program #-}+wrap_Program :: T_Program -> Inh_Program -> (Syn_Program )+wrap_Program !(T_Program act) !(Inh_Program _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Program_vIn46 _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks+ !(T_Program_vOut46 _lhsOgenIO _lhsOoutput) <- return (inv_Program_s47 sem arg)+ return (Syn_Program _lhsOgenIO _lhsOoutput)+ )++-- cata+{-# INLINE sem_Program #-}+sem_Program :: Program -> T_Program +sem_Program ( Program chunks_ !ordered_ ) = sem_Program_Program ( sem_Chunks chunks_ ) ordered_++-- semantic domain+newtype T_Program = T_Program {+ attach_T_Program :: Identity (T_Program_s47 )+ }+newtype T_Program_s47 = C_Program_s47 {+ inv_Program_s47 :: (T_Program_v46 )+ }+data T_Program_s48 = C_Program_s48+type T_Program_v46 = (T_Program_vIn46 ) -> (T_Program_vOut46 )+data T_Program_vIn46 = T_Program_vIn46 (PP_Doc) (PP_Doc) (String) (String) (String -> String -> String -> Bool -> String) (Options) (String) (String) (Map BlockInfo PP_Doc) (PP_Doc)+data T_Program_vOut46 = T_Program_vOut46 (IO ()) (PP_Docs)+{-# NOINLINE sem_Program_Program #-}+sem_Program_Program :: T_Chunks -> (Bool) -> T_Program +sem_Program_Program arg_chunks_ !arg_ordered_ = T_Program (return st47) where+ {-# NOINLINE st47 #-}+ !st47 = let+ v46 :: T_Program_v46 + v46 = \ !(T_Program_vIn46 _lhsIimportBlocks _lhsImainBlocksDoc _lhsImainFile _lhsImainName _lhsImoduleHeader _lhsIoptions _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlockMap _lhsItextBlocks) -> ( let+ _chunksX11 = Control.Monad.Identity.runIdentity (attach_T_Chunks (arg_chunks_))+ (T_Chunks_vOut10 _chunksIappendCommon _chunksIappendMain _chunksIgenSems _chunksIimports _chunksIpps) = inv_Chunks_s11 _chunksX11 (T_Chunks_vIn10 _chunksOimportBlocks _chunksOisDeclOfLet _chunksOmainFile _chunksOmainName _chunksOmoduleHeader _chunksOnested _chunksOoptions _chunksOoptionsLine _chunksOpragmaBlocks _chunksOtextBlockMap _chunksOtextBlocks)+ _options = rule380 _lhsIoptions arg_ordered_+ _chunksOnested = rule381 _lhsIoptions+ _lhsOoutput :: PP_Docs+ _lhsOoutput = rule382 _chunksIpps+ _chunksOisDeclOfLet = rule383 ()+ _mainModuleFile = rule384 _lhsImainFile+ _genMainModule = rule385 _chunksIappendMain _chunksIimports _lhsImainBlocksDoc _lhsImainName _lhsImoduleHeader _lhsIoptionsLine _lhsIpragmaBlocks _mainModuleFile+ _commonFile = rule386 _lhsImainFile+ _genCommonModule = rule387 _chunksIappendCommon _commonFile _lhsIimportBlocks _lhsImainName _lhsImoduleHeader _lhsIoptionsLine _lhsIpragmaBlocks _lhsItextBlocks+ _lhsOgenIO :: IO ()+ _lhsOgenIO = rule388 _chunksIgenSems _genCommonModule _genMainModule+ _chunksOimportBlocks = rule389 _lhsIimportBlocks+ _chunksOmainFile = rule390 _lhsImainFile+ _chunksOmainName = rule391 _lhsImainName+ _chunksOmoduleHeader = rule392 _lhsImoduleHeader+ _chunksOoptions = rule393 _options+ _chunksOoptionsLine = rule394 _lhsIoptionsLine+ _chunksOpragmaBlocks = rule395 _lhsIpragmaBlocks+ _chunksOtextBlockMap = rule396 _lhsItextBlockMap+ _chunksOtextBlocks = rule397 _lhsItextBlocks+ !__result_ = T_Program_vOut46 _lhsOgenIO _lhsOoutput+ in __result_ )+ in C_Program_s47 v46+ {-# INLINE rule380 #-}+ {-# LINE 62 "./src-ag/PrintCleanCode.ag" #-}+ rule380 = \ ((_lhsIoptions) :: Options) ordered_ ->+ {-# LINE 62 "./src-ag/PrintCleanCode.ag" #-}+ _lhsIoptions { breadthFirst = breadthFirst _lhsIoptions && visit _lhsIoptions && cases _lhsIoptions && ordered_ }+ {-# LINE 3535 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule381 #-}+ {-# LINE 65 "./src-ag/PrintCleanCode.ag" #-}+ rule381 = \ ((_lhsIoptions) :: Options) ->+ {-# LINE 65 "./src-ag/PrintCleanCode.ag" #-}+ nest _lhsIoptions+ {-# LINE 3541 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule382 #-}+ {-# LINE 101 "./src-ag/PrintCleanCode.ag" #-}+ rule382 = \ ((_chunksIpps) :: PP_Docs) ->+ {-# LINE 101 "./src-ag/PrintCleanCode.ag" #-}+ _chunksIpps+ {-# LINE 3547 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule383 #-}+ {-# LINE 433 "./src-ag/PrintCleanCode.ag" #-}+ rule383 = \ (_ :: ()) ->+ {-# LINE 433 "./src-ag/PrintCleanCode.ag" #-}+ False+ {-# LINE 3553 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule384 #-}+ {-# LINE 467 "./src-ag/PrintCleanCode.ag" #-}+ rule384 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 467 "./src-ag/PrintCleanCode.ag" #-}+ _lhsImainFile+ {-# LINE 3559 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule385 #-}+ {-# LINE 469 "./src-ag/PrintCleanCode.ag" #-}+ rule385 = \ ((_chunksIappendMain) :: [[PP_Doc]]) ((_chunksIimports) :: [String]) ((_lhsImainBlocksDoc) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptionsLine) :: String) ((_lhsIpragmaBlocks) :: String) _mainModuleFile ->+ {-# LINE 469 "./src-ag/PrintCleanCode.ag" #-}+ writeModule _mainModuleFile+ ( [ pp $ _lhsIpragmaBlocks+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName "" "" False+ , pp $ ("import " ++ _lhsImainName ++ "_common\n")+ ]+ ++ map pp _chunksIimports+ ++ map vlist _chunksIappendMain+ ++ [_lhsImainBlocksDoc]+ )+ {-# LINE 3574 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule386 #-}+ {-# LINE 480 "./src-ag/PrintCleanCode.ag" #-}+ rule386 = \ ((_lhsImainFile) :: String) ->+ {-# LINE 480 "./src-ag/PrintCleanCode.ag" #-}+ replaceBaseName _lhsImainFile (takeBaseName _lhsImainFile ++ "_common")+ {-# LINE 3580 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule387 #-}+ {-# LINE 482 "./src-ag/PrintCleanCode.ag" #-}+ rule387 = \ ((_chunksIappendCommon) :: [[PP_Doc]]) _commonFile ((_lhsIimportBlocks) :: PP_Doc) ((_lhsImainName) :: String) ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ((_lhsIoptionsLine) :: String) ((_lhsIpragmaBlocks) :: String) ((_lhsItextBlocks) :: PP_Doc) ->+ {-# LINE 482 "./src-ag/PrintCleanCode.ag" #-}+ writeModule _commonFile+ ( [ pp $ _lhsIpragmaBlocks+ , pp $ _lhsIoptionsLine+ , pp $ _lhsImoduleHeader _lhsImainName "_common" "" True+ , _lhsIimportBlocks+ , _lhsItextBlocks+ ]+ ++ map vlist _chunksIappendCommon+ )+ {-# LINE 3594 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule388 #-}+ {-# LINE 492 "./src-ag/PrintCleanCode.ag" #-}+ rule388 = \ ((_chunksIgenSems) :: IO ()) _genCommonModule _genMainModule ->+ {-# LINE 492 "./src-ag/PrintCleanCode.ag" #-}+ do _genMainModule+ _genCommonModule+ _chunksIgenSems+ {-# LINE 3602 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule389 #-}+ rule389 = \ ((_lhsIimportBlocks) :: PP_Doc) ->+ _lhsIimportBlocks+ {-# INLINE rule390 #-}+ rule390 = \ ((_lhsImainFile) :: String) ->+ _lhsImainFile+ {-# INLINE rule391 #-}+ rule391 = \ ((_lhsImainName) :: String) ->+ _lhsImainName+ {-# INLINE rule392 #-}+ rule392 = \ ((_lhsImoduleHeader) :: String -> String -> String -> Bool -> String) ->+ _lhsImoduleHeader+ {-# INLINE rule393 #-}+ rule393 = \ _options ->+ _options+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsIoptionsLine) :: String) ->+ _lhsIoptionsLine+ {-# INLINE rule395 #-}+ rule395 = \ ((_lhsIpragmaBlocks) :: String) ->+ _lhsIpragmaBlocks+ {-# INLINE rule396 #-}+ rule396 = \ ((_lhsItextBlockMap) :: Map BlockInfo PP_Doc) ->+ _lhsItextBlockMap+ {-# INLINE rule397 #-}+ rule397 = \ ((_lhsItextBlocks) :: PP_Doc) ->+ _lhsItextBlocks++-- Type --------------------------------------------------------+-- wrapper+data Inh_Type = Inh_Type { nested_Inh_Type :: !(Bool) }+data Syn_Type = Syn_Type { copy_Syn_Type :: !(Type), pp_Syn_Type :: !(PP_Doc), prec_Syn_Type :: !(Int) }+{-# INLINABLE wrap_Type #-}+wrap_Type :: T_Type -> Inh_Type -> (Syn_Type )+wrap_Type !(T_Type act) !(Inh_Type _lhsInested) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Type_vIn49 _lhsInested+ !(T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec) <- return (inv_Type_s50 sem arg)+ return (Syn_Type _lhsOcopy _lhsOpp _lhsOprec)+ )++-- cata+{-# NOINLINE sem_Type #-}+sem_Type :: Type -> T_Type +sem_Type ( Arr left_ right_ ) = sem_Type_Arr ( sem_Type left_ ) ( sem_Type right_ )+sem_Type ( CtxApp !left_ right_ ) = sem_Type_CtxApp left_ ( sem_Type right_ )+sem_Type ( QuantApp !left_ right_ ) = sem_Type_QuantApp left_ ( sem_Type right_ )+sem_Type ( TypeApp func_ args_ ) = sem_Type_TypeApp ( sem_Type func_ ) ( sem_Types args_ )+sem_Type ( TupleType tps_ ) = sem_Type_TupleType ( sem_Types tps_ )+sem_Type ( UnboxedTupleType tps_ ) = sem_Type_UnboxedTupleType ( sem_Types tps_ )+sem_Type ( List tp_ ) = sem_Type_List ( sem_Type tp_ )+sem_Type ( SimpleType !txt_ ) = sem_Type_SimpleType txt_+sem_Type ( NontermType !name_ !params_ !deforested_ ) = sem_Type_NontermType name_ params_ deforested_+sem_Type ( TMaybe tp_ ) = sem_Type_TMaybe ( sem_Type tp_ )+sem_Type ( TEither left_ right_ ) = sem_Type_TEither ( sem_Type left_ ) ( sem_Type right_ )+sem_Type ( TMap key_ value_ ) = sem_Type_TMap ( sem_Type key_ ) ( sem_Type value_ )+sem_Type ( TIntMap value_ ) = sem_Type_TIntMap ( sem_Type value_ )++-- semantic domain+newtype T_Type = T_Type {+ attach_T_Type :: Identity (T_Type_s50 )+ }+newtype T_Type_s50 = C_Type_s50 {+ inv_Type_s50 :: (T_Type_v49 )+ }+data T_Type_s51 = C_Type_s51+type T_Type_v49 = (T_Type_vIn49 ) -> (T_Type_vOut49 )+data T_Type_vIn49 = T_Type_vIn49 (Bool)+data T_Type_vOut49 = T_Type_vOut49 (Type) (PP_Doc) (Int)+{-# NOINLINE sem_Type_Arr #-}+sem_Type_Arr :: T_Type -> T_Type -> T_Type +sem_Type_Arr arg_left_ arg_right_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _leftX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_left_))+ _rightX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_right_))+ (T_Type_vOut49 _leftIcopy _leftIpp _leftIprec) = inv_Type_s50 _leftX50 (T_Type_vIn49 _leftOnested)+ (T_Type_vOut49 _rightIcopy _rightIpp _rightIprec) = inv_Type_s50 _rightX50 (T_Type_vIn49 _rightOnested)+ _lhsOprec :: Int+ _lhsOprec = rule398 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule399 _l _r _rightIcopy+ _l = rule400 _leftIpp _leftIprec+ _r = rule401 _rightIpp _rightIprec+ _copy = rule402 _leftIcopy _rightIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule403 _copy+ _leftOnested = rule404 _lhsInested+ _rightOnested = rule405 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule398 #-}+ {-# LINE 276 "./src-ag/PrintCleanCode.ag" #-}+ rule398 = \ (_ :: ()) ->+ {-# LINE 276 "./src-ag/PrintCleanCode.ag" #-}+ 2+ {-# LINE 3703 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule399 #-}+ {-# LINE 277 "./src-ag/PrintCleanCode.ag" #-}+ rule399 = \ _l _r ((_rightIcopy) :: Type) ->+ {-# LINE 277 "./src-ag/PrintCleanCode.ag" #-}+ case _rightIcopy of+ Arr{} -> _l >-< _r+ _ -> _l >#< "->" >-< _r+ {-# LINE 3711 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule400 #-}+ {-# LINE 280 "./src-ag/PrintCleanCode.ag" #-}+ rule400 = \ ((_leftIpp) :: PP_Doc) ((_leftIprec) :: Int) ->+ {-# LINE 280 "./src-ag/PrintCleanCode.ag" #-}+ if _leftIprec <= 2 then pp_parens _leftIpp else _leftIpp+ {-# LINE 3717 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule401 #-}+ {-# LINE 281 "./src-ag/PrintCleanCode.ag" #-}+ rule401 = \ ((_rightIpp) :: PP_Doc) ((_rightIprec) :: Int) ->+ {-# LINE 281 "./src-ag/PrintCleanCode.ag" #-}+ if _rightIprec < 2 then pp_parens _rightIpp else _rightIpp+ {-# LINE 3723 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule402 #-}+ rule402 = \ ((_leftIcopy) :: Type) ((_rightIcopy) :: Type) ->+ Arr _leftIcopy _rightIcopy+ {-# INLINE rule403 #-}+ rule403 = \ _copy ->+ _copy+ {-# INLINE rule404 #-}+ rule404 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule405 #-}+ rule405 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_CtxApp #-}+sem_Type_CtxApp :: ([(String, [String])]) -> T_Type -> T_Type +sem_Type_CtxApp !arg_left_ arg_right_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _rightX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_right_))+ (T_Type_vOut49 _rightIcopy _rightIpp _rightIprec) = inv_Type_s50 _rightX50 (T_Type_vIn49 _rightOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule406 _rightIpp arg_left_+ _copy = rule407 _rightIcopy arg_left_+ _lhsOcopy :: Type+ _lhsOcopy = rule408 _copy+ _lhsOprec :: Int+ _lhsOprec = rule409 _rightIprec+ _rightOnested = rule410 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule406 #-}+ {-# LINE 287 "./src-ag/PrintCleanCode.ag" #-}+ rule406 = \ ((_rightIpp) :: PP_Doc) left_ ->+ {-# LINE 287 "./src-ag/PrintCleanCode.ag" #-}+ _rightIpp >#< " | " >#< (pp_block "" "" "&" $ map (\(n,ns) -> hv_sp $ map pp (n:ns)) left_)+ {-# LINE 3761 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule407 #-}+ rule407 = \ ((_rightIcopy) :: Type) left_ ->+ CtxApp left_ _rightIcopy+ {-# INLINE rule408 #-}+ rule408 = \ _copy ->+ _copy+ {-# INLINE rule409 #-}+ rule409 = \ ((_rightIprec) :: Int) ->+ _rightIprec+ {-# INLINE rule410 #-}+ rule410 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_QuantApp #-}+sem_Type_QuantApp :: (String) -> T_Type -> T_Type +sem_Type_QuantApp !arg_left_ arg_right_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _rightX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_right_))+ (T_Type_vOut49 _rightIcopy _rightIpp _rightIprec) = inv_Type_s50 _rightX50 (T_Type_vIn49 _rightOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule411 _rightIpp arg_left_+ _copy = rule412 _rightIcopy arg_left_+ _lhsOcopy :: Type+ _lhsOcopy = rule413 _copy+ _lhsOprec :: Int+ _lhsOprec = rule414 _rightIprec+ _rightOnested = rule415 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule411 #-}+ {-# LINE 289 "./src-ag/PrintCleanCode.ag" #-}+ rule411 = \ ((_rightIpp) :: PP_Doc) left_ ->+ {-# LINE 289 "./src-ag/PrintCleanCode.ag" #-}+ left_ >#< _rightIpp+ {-# LINE 3799 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule412 #-}+ rule412 = \ ((_rightIcopy) :: Type) left_ ->+ QuantApp left_ _rightIcopy+ {-# INLINE rule413 #-}+ rule413 = \ _copy ->+ _copy+ {-# INLINE rule414 #-}+ rule414 = \ ((_rightIprec) :: Int) ->+ _rightIprec+ {-# INLINE rule415 #-}+ rule415 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_TypeApp #-}+sem_Type_TypeApp :: T_Type -> T_Types -> T_Type +sem_Type_TypeApp arg_func_ arg_args_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _funcX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_func_))+ _argsX53 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_args_))+ (T_Type_vOut49 _funcIcopy _funcIpp _funcIprec) = inv_Type_s50 _funcX50 (T_Type_vIn49 _funcOnested)+ (T_Types_vOut52 _argsIcopy _argsIpps) = inv_Types_s53 _argsX53 (T_Types_vIn52 _argsOnested)+ _lhsOpp :: PP_Doc+ _lhsOpp = rule416 _argsIpps _funcIpp+ _copy = rule417 _argsIcopy _funcIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule418 _copy+ _lhsOprec :: Int+ _lhsOprec = rule419 _funcIprec+ _funcOnested = rule420 _lhsInested+ _argsOnested = rule421 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule416 #-}+ {-# LINE 284 "./src-ag/PrintCleanCode.ag" #-}+ rule416 = \ ((_argsIpps) :: PP_Docs) ((_funcIpp) :: PP_Doc) ->+ {-# LINE 284 "./src-ag/PrintCleanCode.ag" #-}+ pp "(" >#< hv_sp (_funcIpp : _argsIpps) >#< pp ")"+ {-# LINE 3840 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule417 #-}+ rule417 = \ ((_argsIcopy) :: Types) ((_funcIcopy) :: Type) ->+ TypeApp _funcIcopy _argsIcopy+ {-# INLINE rule418 #-}+ rule418 = \ _copy ->+ _copy+ {-# INLINE rule419 #-}+ rule419 = \ ((_funcIprec) :: Int) ->+ _funcIprec+ {-# INLINE rule420 #-}+ rule420 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule421 #-}+ rule421 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_TupleType #-}+sem_Type_TupleType :: T_Types -> T_Type +sem_Type_TupleType arg_tps_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _tpsX53 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_tps_))+ (T_Types_vOut52 _tpsIcopy _tpsIpps) = inv_Types_s53 _tpsX53 (T_Types_vIn52 _tpsOnested)+ _lhsOprec :: Int+ _lhsOprec = rule422 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule423 _lhsInested _tpsIpps+ _copy = rule424 _tpsIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule425 _copy+ _tpsOnested = rule426 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule422 #-}+ {-# LINE 291 "./src-ag/PrintCleanCode.ag" #-}+ rule422 = \ (_ :: ()) ->+ {-# LINE 291 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 3881 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule423 #-}+ {-# LINE 292 "./src-ag/PrintCleanCode.ag" #-}+ rule423 = \ ((_lhsInested) :: Bool) ((_tpsIpps) :: PP_Docs) ->+ {-# LINE 292 "./src-ag/PrintCleanCode.ag" #-}+ ppTuple _lhsInested _tpsIpps+ {-# LINE 3887 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule424 #-}+ rule424 = \ ((_tpsIcopy) :: Types) ->+ TupleType _tpsIcopy+ {-# INLINE rule425 #-}+ rule425 = \ _copy ->+ _copy+ {-# INLINE rule426 #-}+ rule426 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_UnboxedTupleType #-}+sem_Type_UnboxedTupleType :: T_Types -> T_Type +sem_Type_UnboxedTupleType arg_tps_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _tpsX53 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_tps_))+ (T_Types_vOut52 _tpsIcopy _tpsIpps) = inv_Types_s53 _tpsX53 (T_Types_vIn52 _tpsOnested)+ _lhsOprec :: Int+ _lhsOprec = rule427 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule428 _lhsInested _tpsIpps+ _copy = rule429 _tpsIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule430 _copy+ _tpsOnested = rule431 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule427 #-}+ {-# LINE 294 "./src-ag/PrintCleanCode.ag" #-}+ rule427 = \ (_ :: ()) ->+ {-# LINE 294 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 3922 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule428 #-}+ {-# LINE 295 "./src-ag/PrintCleanCode.ag" #-}+ rule428 = \ ((_lhsInested) :: Bool) ((_tpsIpps) :: PP_Docs) ->+ {-# LINE 295 "./src-ag/PrintCleanCode.ag" #-}+ ppUnboxedTuple _lhsInested _tpsIpps+ {-# LINE 3928 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule429 #-}+ rule429 = \ ((_tpsIcopy) :: Types) ->+ UnboxedTupleType _tpsIcopy+ {-# INLINE rule430 #-}+ rule430 = \ _copy ->+ _copy+ {-# INLINE rule431 #-}+ rule431 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_List #-}+sem_Type_List :: T_Type -> T_Type +sem_Type_List arg_tp_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOprec :: Int+ _lhsOprec = rule432 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule433 _tpIpp+ _copy = rule434 _tpIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule435 _copy+ _tpOnested = rule436 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule432 #-}+ {-# LINE 297 "./src-ag/PrintCleanCode.ag" #-}+ rule432 = \ (_ :: ()) ->+ {-# LINE 297 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 3963 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule433 #-}+ {-# LINE 298 "./src-ag/PrintCleanCode.ag" #-}+ rule433 = \ ((_tpIpp) :: PP_Doc) ->+ {-# LINE 298 "./src-ag/PrintCleanCode.ag" #-}+ "[" >|< _tpIpp >|< "]"+ {-# LINE 3969 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule434 #-}+ rule434 = \ ((_tpIcopy) :: Type) ->+ List _tpIcopy+ {-# INLINE rule435 #-}+ rule435 = \ _copy ->+ _copy+ {-# INLINE rule436 #-}+ rule436 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_SimpleType #-}+sem_Type_SimpleType :: (String) -> T_Type +sem_Type_SimpleType !arg_txt_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _lhsOprec :: Int+ _lhsOprec = rule437 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule438 arg_txt_+ _copy = rule439 arg_txt_+ _lhsOcopy :: Type+ _lhsOcopy = rule440 _copy+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule437 #-}+ {-# LINE 300 "./src-ag/PrintCleanCode.ag" #-}+ rule437 = \ (_ :: ()) ->+ {-# LINE 300 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 4001 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule438 #-}+ {-# LINE 301 "./src-ag/PrintCleanCode.ag" #-}+ rule438 = \ txt_ ->+ {-# LINE 301 "./src-ag/PrintCleanCode.ag" #-}+ if reallySimple txt_ then text txt_ else pp_parens (text txt_)+ {-# LINE 4007 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule439 #-}+ rule439 = \ txt_ ->+ SimpleType txt_+ {-# INLINE rule440 #-}+ rule440 = \ _copy ->+ _copy+{-# NOINLINE sem_Type_NontermType #-}+sem_Type_NontermType :: (String) -> ([String]) -> (Bool) -> T_Type +sem_Type_NontermType !arg_name_ !arg_params_ !arg_deforested_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _lhsOprec :: Int+ _lhsOprec = rule441 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule442 _prefix arg_name_ arg_params_+ _prefix = rule443 arg_deforested_+ _copy = rule444 arg_deforested_ arg_name_ arg_params_+ _lhsOcopy :: Type+ _lhsOcopy = rule445 _copy+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule441 #-}+ {-# LINE 303 "./src-ag/PrintCleanCode.ag" #-}+ rule441 = \ (_ :: ()) ->+ {-# LINE 303 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 4037 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule442 #-}+ {-# LINE 304 "./src-ag/PrintCleanCode.ag" #-}+ rule442 = \ _prefix name_ params_ ->+ {-# LINE 304 "./src-ag/PrintCleanCode.ag" #-}+ _prefix >|< text name_ >#< hv_sp params_+ {-# LINE 4043 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule443 #-}+ {-# LINE 305 "./src-ag/PrintCleanCode.ag" #-}+ rule443 = \ deforested_ ->+ {-# LINE 305 "./src-ag/PrintCleanCode.ag" #-}+ if deforested_+ then text "T_"+ else empty+ {-# LINE 4051 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule444 #-}+ rule444 = \ deforested_ name_ params_ ->+ NontermType name_ params_ deforested_+ {-# INLINE rule445 #-}+ rule445 = \ _copy ->+ _copy+{-# NOINLINE sem_Type_TMaybe #-}+sem_Type_TMaybe :: T_Type -> T_Type +sem_Type_TMaybe arg_tp_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _tpX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_tp_))+ (T_Type_vOut49 _tpIcopy _tpIpp _tpIprec) = inv_Type_s50 _tpX50 (T_Type_vIn49 _tpOnested)+ _lhsOprec :: Int+ _lhsOprec = rule446 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule447 _tpIpp+ _copy = rule448 _tpIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule449 _copy+ _tpOnested = rule450 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule446 #-}+ {-# LINE 308 "./src-ag/PrintCleanCode.ag" #-}+ rule446 = \ (_ :: ()) ->+ {-# LINE 308 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 4083 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule447 #-}+ {-# LINE 309 "./src-ag/PrintCleanCode.ag" #-}+ rule447 = \ ((_tpIpp) :: PP_Doc) ->+ {-# LINE 309 "./src-ag/PrintCleanCode.ag" #-}+ text "Maybe" >#< pp_parens _tpIpp+ {-# LINE 4089 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule448 #-}+ rule448 = \ ((_tpIcopy) :: Type) ->+ TMaybe _tpIcopy+ {-# INLINE rule449 #-}+ rule449 = \ _copy ->+ _copy+ {-# INLINE rule450 #-}+ rule450 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_TEither #-}+sem_Type_TEither :: T_Type -> T_Type -> T_Type +sem_Type_TEither arg_left_ arg_right_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _leftX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_left_))+ _rightX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_right_))+ (T_Type_vOut49 _leftIcopy _leftIpp _leftIprec) = inv_Type_s50 _leftX50 (T_Type_vIn49 _leftOnested)+ (T_Type_vOut49 _rightIcopy _rightIpp _rightIprec) = inv_Type_s50 _rightX50 (T_Type_vIn49 _rightOnested)+ _lhsOprec :: Int+ _lhsOprec = rule451 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule452 _leftIpp _rightIpp+ _copy = rule453 _leftIcopy _rightIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule454 _copy+ _leftOnested = rule455 _lhsInested+ _rightOnested = rule456 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule451 #-}+ {-# LINE 310 "./src-ag/PrintCleanCode.ag" #-}+ rule451 = \ (_ :: ()) ->+ {-# LINE 310 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 4127 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule452 #-}+ {-# LINE 311 "./src-ag/PrintCleanCode.ag" #-}+ rule452 = \ ((_leftIpp) :: PP_Doc) ((_rightIpp) :: PP_Doc) ->+ {-# LINE 311 "./src-ag/PrintCleanCode.ag" #-}+ text "Either" >#< pp_parens _leftIpp >#< pp_parens _rightIpp+ {-# LINE 4133 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule453 #-}+ rule453 = \ ((_leftIcopy) :: Type) ((_rightIcopy) :: Type) ->+ TEither _leftIcopy _rightIcopy+ {-# INLINE rule454 #-}+ rule454 = \ _copy ->+ _copy+ {-# INLINE rule455 #-}+ rule455 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule456 #-}+ rule456 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_TMap #-}+sem_Type_TMap :: T_Type -> T_Type -> T_Type +sem_Type_TMap arg_key_ arg_value_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _keyX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_key_))+ _valueX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_value_))+ (T_Type_vOut49 _keyIcopy _keyIpp _keyIprec) = inv_Type_s50 _keyX50 (T_Type_vIn49 _keyOnested)+ (T_Type_vOut49 _valueIcopy _valueIpp _valueIprec) = inv_Type_s50 _valueX50 (T_Type_vIn49 _valueOnested)+ _lhsOprec :: Int+ _lhsOprec = rule457 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule458 _keyIpp _valueIpp+ _copy = rule459 _keyIcopy _valueIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule460 _copy+ _keyOnested = rule461 _lhsInested+ _valueOnested = rule462 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule457 #-}+ {-# LINE 312 "./src-ag/PrintCleanCode.ag" #-}+ rule457 = \ (_ :: ()) ->+ {-# LINE 312 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 4174 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule458 #-}+ {-# LINE 313 "./src-ag/PrintCleanCode.ag" #-}+ rule458 = \ ((_keyIpp) :: PP_Doc) ((_valueIpp) :: PP_Doc) ->+ {-# LINE 313 "./src-ag/PrintCleanCode.ag" #-}+ text "'Data.Map'.Map" >#< pp_parens _keyIpp >#< pp_parens _valueIpp+ {-# LINE 4180 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule459 #-}+ rule459 = \ ((_keyIcopy) :: Type) ((_valueIcopy) :: Type) ->+ TMap _keyIcopy _valueIcopy+ {-# INLINE rule460 #-}+ rule460 = \ _copy ->+ _copy+ {-# INLINE rule461 #-}+ rule461 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule462 #-}+ rule462 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Type_TIntMap #-}+sem_Type_TIntMap :: T_Type -> T_Type +sem_Type_TIntMap arg_value_ = T_Type (return st50) where+ {-# NOINLINE st50 #-}+ !st50 = let+ v49 :: T_Type_v49 + v49 = \ !(T_Type_vIn49 _lhsInested) -> ( let+ _valueX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_value_))+ (T_Type_vOut49 _valueIcopy _valueIpp _valueIprec) = inv_Type_s50 _valueX50 (T_Type_vIn49 _valueOnested)+ _lhsOprec :: Int+ _lhsOprec = rule463 ()+ _lhsOpp :: PP_Doc+ _lhsOpp = rule464 _valueIpp+ _copy = rule465 _valueIcopy+ _lhsOcopy :: Type+ _lhsOcopy = rule466 _copy+ _valueOnested = rule467 _lhsInested+ !__result_ = T_Type_vOut49 _lhsOcopy _lhsOpp _lhsOprec+ in __result_ )+ in C_Type_s50 v49+ {-# INLINE rule463 #-}+ {-# LINE 314 "./src-ag/PrintCleanCode.ag" #-}+ rule463 = \ (_ :: ()) ->+ {-# LINE 314 "./src-ag/PrintCleanCode.ag" #-}+ 5+ {-# LINE 4218 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule464 #-}+ {-# LINE 315 "./src-ag/PrintCleanCode.ag" #-}+ rule464 = \ ((_valueIpp) :: PP_Doc) ->+ {-# LINE 315 "./src-ag/PrintCleanCode.ag" #-}+ text "'Data.IntMap'.IntMap" >#< pp_parens _valueIpp+ {-# LINE 4224 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule465 #-}+ rule465 = \ ((_valueIcopy) :: Type) ->+ TIntMap _valueIcopy+ {-# INLINE rule466 #-}+ rule466 = \ _copy ->+ _copy+ {-# INLINE rule467 #-}+ rule467 = \ ((_lhsInested) :: Bool) ->+ _lhsInested++-- Types -------------------------------------------------------+-- wrapper+data Inh_Types = Inh_Types { nested_Inh_Types :: !(Bool) }+data Syn_Types = Syn_Types { copy_Syn_Types :: !(Types), pps_Syn_Types :: !(PP_Docs) }+{-# INLINABLE wrap_Types #-}+wrap_Types :: T_Types -> Inh_Types -> (Syn_Types )+wrap_Types !(T_Types act) !(Inh_Types _lhsInested) =+ Control.Monad.Identity.runIdentity (+ do !sem <- act+ let arg = T_Types_vIn52 _lhsInested+ !(T_Types_vOut52 _lhsOcopy _lhsOpps) <- return (inv_Types_s53 sem arg)+ return (Syn_Types _lhsOcopy _lhsOpps)+ )++-- cata+{-# NOINLINE sem_Types #-}+sem_Types :: Types -> T_Types +sem_Types list = Prelude.foldr sem_Types_Cons sem_Types_Nil (Prelude.map sem_Type list)++-- semantic domain+newtype T_Types = T_Types {+ attach_T_Types :: Identity (T_Types_s53 )+ }+newtype T_Types_s53 = C_Types_s53 {+ inv_Types_s53 :: (T_Types_v52 )+ }+data T_Types_s54 = C_Types_s54+type T_Types_v52 = (T_Types_vIn52 ) -> (T_Types_vOut52 )+data T_Types_vIn52 = T_Types_vIn52 (Bool)+data T_Types_vOut52 = T_Types_vOut52 (Types) (PP_Docs)+{-# NOINLINE sem_Types_Cons #-}+sem_Types_Cons :: T_Type -> T_Types -> T_Types +sem_Types_Cons arg_hd_ arg_tl_ = T_Types (return st53) where+ {-# NOINLINE st53 #-}+ !st53 = let+ v52 :: T_Types_v52 + v52 = \ !(T_Types_vIn52 _lhsInested) -> ( let+ _hdX50 = Control.Monad.Identity.runIdentity (attach_T_Type (arg_hd_))+ _tlX53 = Control.Monad.Identity.runIdentity (attach_T_Types (arg_tl_))+ (T_Type_vOut49 _hdIcopy _hdIpp _hdIprec) = inv_Type_s50 _hdX50 (T_Type_vIn49 _hdOnested)+ (T_Types_vOut52 _tlIcopy _tlIpps) = inv_Types_s53 _tlX53 (T_Types_vIn52 _tlOnested)+ _lhsOpps :: PP_Docs+ _lhsOpps = rule468 _hdIpp _tlIpps+ _copy = rule469 _hdIcopy _tlIcopy+ _lhsOcopy :: Types+ _lhsOcopy = rule470 _copy+ _hdOnested = rule471 _lhsInested+ _tlOnested = rule472 _lhsInested+ !__result_ = T_Types_vOut52 _lhsOcopy _lhsOpps+ in __result_ )+ in C_Types_s53 v52+ {-# INLINE rule468 #-}+ {-# LINE 82 "./src-ag/PrintCleanCode.ag" #-}+ rule468 = \ ((_hdIpp) :: PP_Doc) ((_tlIpps) :: PP_Docs) ->+ {-# LINE 82 "./src-ag/PrintCleanCode.ag" #-}+ _hdIpp : _tlIpps+ {-# LINE 4291 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule469 #-}+ rule469 = \ ((_hdIcopy) :: Type) ((_tlIcopy) :: Types) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule470 #-}+ rule470 = \ _copy ->+ _copy+ {-# INLINE rule471 #-}+ rule471 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+ {-# INLINE rule472 #-}+ rule472 = \ ((_lhsInested) :: Bool) ->+ _lhsInested+{-# NOINLINE sem_Types_Nil #-}+sem_Types_Nil :: T_Types +sem_Types_Nil = T_Types (return st53) where+ {-# NOINLINE st53 #-}+ !st53 = let+ v52 :: T_Types_v52 + v52 = \ !(T_Types_vIn52 _lhsInested) -> ( let+ _lhsOpps :: PP_Docs+ _lhsOpps = rule473 ()+ _copy = rule474 ()+ _lhsOcopy :: Types+ _lhsOcopy = rule475 _copy+ !__result_ = T_Types_vOut52 _lhsOcopy _lhsOpps+ in __result_ )+ in C_Types_s53 v52+ {-# INLINE rule473 #-}+ {-# LINE 83 "./src-ag/PrintCleanCode.ag" #-}+ rule473 = \ (_ :: ()) ->+ {-# LINE 83 "./src-ag/PrintCleanCode.ag" #-}+ []+ {-# LINE 4324 "dist/build/PrintCleanCode.hs"#-}+ {-# INLINE rule474 #-}+ rule474 = \ (_ :: ()) ->+ []+ {-# INLINE rule475 #-}+ rule475 = \ _copy ->+ _copy
src-generated/PrintCode.hs view
@@ -3,6 +3,13 @@ {-# LANGUAGE ScopedTypeVariables #-} module PrintCode where+{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 12 "dist/build/PrintCode.hs" #-}+ {-# LINE 2 "./src-ag/Code.ag" #-} import Patterns@@ -10,13 +17,6 @@ import qualified Data.Set as Set import Data.Map(Map) import qualified Data.Map as Map-{-# LINE 14 "dist/build/PrintCode.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier) {-# LINE 21 "dist/build/PrintCode.hs" #-} {-# LINE 10 "./src-ag/PrintCode.ag" #-}@@ -2998,14 +2998,14 @@ _lhsOstrictVars :: [PP_Doc] _lhsOstrictVars = rule319 _strictPatVars _strictVar _addBang = rule320 _lhsIbelowIrrefutable _lhsIisDeclOfLet _lhsIoptions- _ppVar = rule321 arg_attr_ arg_field_+ _ppVar = rule321 _lhsIoptions arg_attr_ arg_field_ _ppVarBang = rule322 _addBang _ppVar _lhsOpp :: PP_Doc _lhsOpp = rule323 _patIisUnderscore _patIpp _ppVarBang _lhsOisUnderscore :: Bool _lhsOisUnderscore = rule324 () _lhsOpp' :: PP_Doc- _lhsOpp' = rule325 _patIpp' arg_attr_ arg_field_+ _lhsOpp' = rule325 _lhsIoptions _patIpp' arg_attr_ arg_field_ _copy = rule326 _patIcopy arg_attr_ arg_field_ _lhsOcopy :: Pattern _lhsOcopy = rule327 _copy@@ -3047,9 +3047,9 @@ {-# LINE 3048 "dist/build/PrintCode.hs"#-} {-# INLINE rule321 #-} {-# LINE 360 "./src-ag/PrintCode.ag" #-}- rule321 = \ attr_ field_ ->+ rule321 = \ ((_lhsIoptions) :: Options) attr_ field_ -> {-# LINE 360 "./src-ag/PrintCode.ag" #-}- pp (attrname False field_ attr_)+ pp (attrname _lhsIoptions False field_ attr_) {-# LINE 3054 "dist/build/PrintCode.hs"#-} {-# INLINE rule322 #-} {-# LINE 361 "./src-ag/PrintCode.ag" #-}@@ -3073,10 +3073,10 @@ {-# LINE 3074 "dist/build/PrintCode.hs"#-} {-# INLINE rule325 #-} {-# LINE 394 "./src-ag/PrintCode.ag" #-}- rule325 = \ ((_patIpp') :: PP_Doc) attr_ field_ ->+ rule325 = \ ((_lhsIoptions) :: Options) ((_patIpp') :: PP_Doc) attr_ field_ -> {-# LINE 394 "./src-ag/PrintCode.ag" #-} let attribute | field_ == _LOC || field_ == nullIdent = locname' attr_- | otherwise = attrname False field_ attr_+ | otherwise = attrname _lhsIoptions False field_ attr_ in attribute >|< "@" >|< _patIpp' {-# LINE 3082 "dist/build/PrintCode.hs"#-} {-# INLINE rule326 #-}@@ -3881,7 +3881,7 @@ {-# LINE 290 "./src-ag/PrintCode.ag" #-} rule411 = \ ((_tpIpp) :: PP_Doc) -> {-# LINE 290 "./src-ag/PrintCode.ag" #-}- text "Maybe" >#< _tpIpp+ text "Maybe" >#< pp_parens _tpIpp {-# LINE 3886 "dist/build/PrintCode.hs"#-} {-# INLINE rule412 #-} rule412 = \ ((_lhsInested) :: Bool) ->
src-generated/PrintOcamlCode.hs view
@@ -3,6 +3,13 @@ {-# LANGUAGE ScopedTypeVariables #-} module PrintOcamlCode where+{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 12 "dist/build/PrintOcamlCode.hs" #-}+ {-# LINE 2 "./src-ag/Code.ag" #-} import Patterns@@ -10,13 +17,6 @@ import qualified Data.Set as Set import Data.Map(Map) import qualified Data.Map as Map-{-# LINE 14 "dist/build/PrintOcamlCode.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier) {-# LINE 21 "dist/build/PrintOcamlCode.hs" #-} {-# LINE 10 "./src-ag/PrintOcamlCode.ag" #-}@@ -1976,7 +1976,7 @@ _patX41 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_)) (T_Pattern_vOut40 _patIcopy _patIisUnderscore _patIpp) = inv_Pattern_s41 _patX41 (T_Pattern_vIn40 _patOoptions) _lhsOpp :: PP_Doc- _lhsOpp = rule130 _patIisUnderscore arg_attr_ arg_field_+ _lhsOpp = rule130 _lhsIoptions _patIisUnderscore arg_attr_ arg_field_ _lhsOisUnderscore :: Bool _lhsOisUnderscore = rule131 () _copy = rule132 _patIcopy arg_attr_ arg_field_@@ -1988,10 +1988,10 @@ in C_Pattern_s41 v40 {-# INLINE rule130 #-} {-# LINE 195 "./src-ag/PrintOcamlCode.ag" #-}- rule130 = \ ((_patIisUnderscore) :: Bool) attr_ field_ ->+ rule130 = \ ((_lhsIoptions) :: Options) ((_patIisUnderscore) :: Bool) attr_ field_ -> {-# LINE 195 "./src-ag/PrintOcamlCode.ag" #-} if _patIisUnderscore- then pp (attrname False field_ attr_)+ then pp (attrname _lhsIoptions False field_ attr_) else error "pp of Pattern.Alias is only supported in the form (x@_)" {-# LINE 1997 "dist/build/PrintOcamlCode.hs"#-} {-# INLINE rule131 #-}
src-generated/PrintVisitCode.hs view
@@ -2,24 +2,24 @@ {-# LANGUAGE ScopedTypeVariables #-} module PrintVisitCode where-{-# LINE 2 "./src-ag/CodeSyntax.ag" #-}+{-# LINE 2 "./src-ag/DeclBlocks.ag" #-} -import Patterns-import CommonTypes-import Data.Map(Map)-import Data.Set(Set)-{-# LINE 12 "dist/build/PrintVisitCode.hs" #-}+import Code (Decl,Expr)+{-# LINE 9 "dist/build/PrintVisitCode.hs" #-} {-# LINE 2 "./src-ag/Patterns.ag" #-} -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 19 "dist/build/PrintVisitCode.hs" #-}+{-# LINE 16 "dist/build/PrintVisitCode.hs" #-} -{-# LINE 2 "./src-ag/DeclBlocks.ag" #-}+{-# LINE 2 "./src-ag/CodeSyntax.ag" #-} -import Code (Decl,Expr)+import Patterns+import CommonTypes+import Data.Map(Map)+import Data.Set(Set) {-# LINE 24 "dist/build/PrintVisitCode.hs" #-} {-# LINE 10 "./src-ag/PrintVisitCode.ag" #-}
src-generated/ResolveLocals.hs view
@@ -2,6 +2,19 @@ {-# LANGUAGE ScopedTypeVariables #-} module ResolveLocals where+{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 10 "dist/build/ResolveLocals.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 17 "dist/build/ResolveLocals.hs" #-}+ {-# LINE 2 "./src-ag/AbstractSyntax.ag" #-} -- AbstractSyntax.ag imports@@ -12,19 +25,6 @@ import Macro --marcos import CommonTypes import ErrorMessages-{-# LINE 16 "dist/build/ResolveLocals.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 23 "dist/build/ResolveLocals.hs" #-}--{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken {-# LINE 29 "dist/build/ResolveLocals.hs" #-} {-# LINE 15 "./src-ag/ResolveLocals.ag" #-}@@ -41,10 +41,9 @@ import Expression import Options import HsToken(HsTokensRoot(HsTokensRoot))-import HsTokenScanner(lexTokens) import SemHsTokens(sem_HsTokensRoot,wrap_HsTokensRoot, Syn_HsTokensRoot(..),Inh_HsTokensRoot(..)) import Data.Maybe-{-# LINE 48 "dist/build/ResolveLocals.hs" #-}+{-# LINE 47 "dist/build/ResolveLocals.hs" #-} import Control.Monad.Identity (Identity) import qualified Control.Monad.Identity -- Child -------------------------------------------------------@@ -105,31 +104,31 @@ NT nt _ _ -> nt Self -> error ("The type of child " ++ show name_ ++ " should not be a Self type.") Haskell t -> identifier ""- {-# LINE 109 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 108 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule1 #-} {-# LINE 23 "./src-ag/DistChildAttr.ag" #-} rule1 = \ _chnt ((_lhsIinhMap) :: Map Identifier Attributes) -> {-# LINE 23 "./src-ag/DistChildAttr.ag" #-} Map.findWithDefault Map.empty _chnt _lhsIinhMap- {-# LINE 115 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 114 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule2 #-} {-# LINE 24 "./src-ag/DistChildAttr.ag" #-} rule2 = \ _chnt ((_lhsIsynMap) :: Map Identifier Attributes) -> {-# LINE 24 "./src-ag/DistChildAttr.ag" #-} Map.findWithDefault Map.empty _chnt _lhsIsynMap- {-# LINE 121 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 120 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule3 #-}- {-# LINE 84 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 83 "./src-ag/ResolveLocals.ag" #-} rule3 = \ _inh _syn name_ ->- {-# LINE 84 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 83 "./src-ag/ResolveLocals.ag" #-} [(name_, _inh , _syn )]- {-# LINE 127 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 126 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule4 #-}- {-# LINE 87 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 86 "./src-ag/ResolveLocals.ag" #-} rule4 = \ kind_ name_ tp_ ->- {-# LINE 87 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 86 "./src-ag/ResolveLocals.ag" #-} (name_, tp_, kind_)- {-# LINE 133 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 132 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule5 #-} rule5 = \ kind_ name_ tp_ -> Child name_ tp_ kind_@@ -209,11 +208,11 @@ in __result_ ) in C_Children_s5 v4 {-# INLINE rule7 #-}- {-# LINE 90 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 89 "./src-ag/ResolveLocals.ag" #-} rule7 = \ ((_hdIfield) :: (Identifier,Type,ChildKind)) ((_tlIfields) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 90 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 89 "./src-ag/ResolveLocals.ag" #-} _hdIfield : _tlIfields- {-# LINE 217 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 216 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule8 #-} rule8 = \ ((_hdIattributes) :: [(Identifier,Attributes,Attributes)]) ((_tlIattributes) :: [(Identifier,Attributes,Attributes)]) -> _hdIattributes ++ _tlIattributes@@ -301,11 +300,11 @@ in __result_ ) in C_Children_s5 v4 {-# INLINE rule31 #-}- {-# LINE 91 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 90 "./src-ag/ResolveLocals.ag" #-} rule31 = \ (_ :: ()) ->- {-# LINE 91 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 90 "./src-ag/ResolveLocals.ag" #-} []- {-# LINE 309 "dist/build/ResolveLocals.hs"#-}+ {-# LINE 308 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule32 #-} rule32 = \ (_ :: ()) -> []@@ -353,7 +352,7 @@ st8 = let v7 :: T_Expression_v7 v7 = \ (T_Expression_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions) -> ( let- (_errors,_newTks) = rule35 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt arg_tks_+ (_errors,_newTks) = rule35 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsImergeMap _lhsInt _lhsIoptions arg_tks_ _lhsOoutput :: Expression _lhsOoutput = rule36 _newTks arg_pos_ _lhsOerrors :: Seq Error@@ -363,9 +362,9 @@ in __result_ ) in C_Expression_s8 v7 {-# INLINE rule35 #-}- {-# LINE 146 "./src-ag/ResolveLocals.ag" #-}- rule35 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ((_lhsInt) :: Identifier) tks_ ->- {-# LINE 146 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 145 "./src-ag/ResolveLocals.ag" #-}+ rule35 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsImergeMap) :: Map Identifier (Identifier,[Identifier])) ((_lhsInt) :: Identifier) ((_lhsIoptions) :: Options) tks_ ->+ {-# LINE 145 "./src-ag/ResolveLocals.ag" #-} let mergedChildren = [ x | (_,xs) <- Map.elems _lhsImergeMap, x <- xs ] attrsIn = filter (\(fld,_) -> not (fld `elem` mergedChildren)) _lhsIattrs inherited = Inh_HsTokensRoot@@ -374,6 +373,7 @@ , allfields_Inh_HsTokensRoot = _lhsIallfields , allnts_Inh_HsTokensRoot = _lhsIallnts , nt_Inh_HsTokensRoot = _lhsInt+ , options_Inh_HsTokensRoot = _lhsIoptions } synthesized = wrap_HsTokensRoot (sem_HsTokensRoot (HsTokensRoot tks_)) inherited in (errors_Syn_HsTokensRoot synthesized, output_Syn_HsTokensRoot synthesized)@@ -456,15 +456,15 @@ _nontsIsynMap' {-# LINE 458 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule41 #-}- {-# LINE 60 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 59 "./src-ag/ResolveLocals.ag" #-} rule41 = \ ((_nontsInonts) :: [(NontermIdent,[ConstructorIdent])]) ->- {-# LINE 60 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 59 "./src-ag/ResolveLocals.ag" #-} map fst (_nontsInonts) {-# LINE 464 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule42 #-}- {-# LINE 120 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 119 "./src-ag/ResolveLocals.ag" #-} rule42 = \ mergeMap_ ->- {-# LINE 120 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 119 "./src-ag/ResolveLocals.ag" #-} Map.map (Map.map (Map.map (\(nt,srcs,_) -> (nt,srcs)))) mergeMap_ {-# LINE 470 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule43 #-}@@ -555,33 +555,33 @@ Map.singleton nt_ syn_ {-# LINE 557 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule49 #-}- {-# LINE 64 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 63 "./src-ag/ResolveLocals.ag" #-} rule49 = \ ((_prodsIcons) :: [ConstructorIdent]) nt_ ->- {-# LINE 64 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 63 "./src-ag/ResolveLocals.ag" #-} [(nt_,_prodsIcons)] {-# LINE 563 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule50 #-}- {-# LINE 112 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 111 "./src-ag/ResolveLocals.ag" #-} rule50 = \ nt_ ->- {-# LINE 112 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 111 "./src-ag/ResolveLocals.ag" #-} nt_ {-# LINE 569 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule51 #-}- {-# LINE 115 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 114 "./src-ag/ResolveLocals.ag" #-} rule51 = \ inh_ ->- {-# LINE 115 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 114 "./src-ag/ResolveLocals.ag" #-} inh_ {-# LINE 575 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule52 #-}- {-# LINE 116 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 115 "./src-ag/ResolveLocals.ag" #-} rule52 = \ syn_ ->- {-# LINE 116 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 115 "./src-ag/ResolveLocals.ag" #-} syn_ {-# LINE 581 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule53 #-}- {-# LINE 128 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 127 "./src-ag/ResolveLocals.ag" #-} rule53 = \ ((_lhsImergeMap) :: Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier,[Identifier])))) nt_ ->- {-# LINE 128 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 127 "./src-ag/ResolveLocals.ag" #-} Map.findWithDefault Map.empty nt_ _lhsImergeMap {-# LINE 587 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule54 #-}@@ -947,17 +947,17 @@ in __result_ ) in C_Pattern_s20 v19 {-# INLINE rule106 #-}- {-# LINE 96 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 95 "./src-ag/ResolveLocals.ag" #-} rule106 = \ attr_ field_ ->- {-# LINE 96 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 95 "./src-ag/ResolveLocals.ag" #-} if field_ == _LOC then [attr_] else [] {-# LINE 957 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule107 #-}- {-# LINE 99 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 98 "./src-ag/ResolveLocals.ag" #-} rule107 = \ attr_ field_ ->- {-# LINE 99 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 98 "./src-ag/ResolveLocals.ag" #-} if field_ == _INST then [attr_] else []@@ -1325,54 +1325,54 @@ in __result_ ) in C_Production_s26 v25 {-# INLINE rule157 #-}- {-# LINE 67 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 66 "./src-ag/ResolveLocals.ag" #-} rule157 = \ con_ ->- {-# LINE 67 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 66 "./src-ag/ResolveLocals.ag" #-} [con_] {-# LINE 1333 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule158 #-}- {-# LINE 74 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 73 "./src-ag/ResolveLocals.ag" #-} rule158 = \ ((_childrenIfields) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 74 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 73 "./src-ag/ResolveLocals.ag" #-} _childrenIfields {-# LINE 1339 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule159 #-}- {-# LINE 75 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 74 "./src-ag/ResolveLocals.ag" #-} rule159 = \ ((_childrenIattributes) :: [(Identifier,Attributes,Attributes)]) _inhnames ((_rulesIinstVars) :: [Identifier]) ((_rulesIlocVars) :: [Identifier]) ->- {-# LINE 75 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 74 "./src-ag/ResolveLocals.ag" #-} map ((,) _LOC) _rulesIlocVars ++ map ((,) _INST) _rulesIinstVars ++ map ((,) _LHS) _inhnames ++ concat [map ((,) nm) (Map.keys as) | (nm,_,as) <- _childrenIattributes] {-# LINE 1348 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule160 #-}- {-# LINE 79 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 78 "./src-ag/ResolveLocals.ag" #-} rule160 = \ ((_lhsIinh) :: Attributes) ->- {-# LINE 79 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 78 "./src-ag/ResolveLocals.ag" #-} Map.keys _lhsIinh {-# LINE 1354 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule161 #-}- {-# LINE 80 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 79 "./src-ag/ResolveLocals.ag" #-} rule161 = \ ((_lhsIsyn) :: Attributes) ->- {-# LINE 80 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 79 "./src-ag/ResolveLocals.ag" #-} Map.keys _lhsIsyn {-# LINE 1360 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule162 #-}- {-# LINE 108 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 107 "./src-ag/ResolveLocals.ag" #-} rule162 = \ con_ ->- {-# LINE 108 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 107 "./src-ag/ResolveLocals.ag" #-} con_ {-# LINE 1366 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule163 #-}- {-# LINE 110 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 109 "./src-ag/ResolveLocals.ag" #-} rule163 = \ con_ ->- {-# LINE 110 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 109 "./src-ag/ResolveLocals.ag" #-} con_ {-# LINE 1372 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule164 #-}- {-# LINE 129 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 128 "./src-ag/ResolveLocals.ag" #-} rule164 = \ ((_lhsImergeMap) :: Map ConstructorIdent (Map Identifier (Identifier,[Identifier]))) con_ ->- {-# LINE 129 "./src-ag/ResolveLocals.ag" #-}+ {-# LINE 128 "./src-ag/ResolveLocals.ag" #-} Map.findWithDefault Map.empty con_ _lhsImergeMap {-# LINE 1378 "dist/build/ResolveLocals.hs"#-} {-# INLINE rule165 #-}
src-generated/SemHsTokens.hs view
@@ -21,21 +21,21 @@ {-# LINE 22 "dist/build/SemHsTokens.hs" #-} import Control.Monad.Identity (Identity) import qualified Control.Monad.Identity-{-# LINE 57 "./src-ag/SemHsTokens.ag" #-}+{-# LINE 58 "./src-ag/SemHsTokens.ag" #-} isNTname allnts (Just (NT nt _ _)) = nt `elem` allnts isNTname allnts _ = False {-# LINE 29 "dist/build/SemHsTokens.hs" #-} -- HsToken ----------------------------------------------------- -- wrapper-data Inh_HsToken = Inh_HsToken { allfields_Inh_HsToken :: ([(Identifier,Type,ChildKind)]), allnts_Inh_HsToken :: ([Identifier]), attrs_Inh_HsToken :: ([(Identifier,Identifier)]), con_Inh_HsToken :: (Identifier), fieldnames_Inh_HsToken :: ([Identifier]), nt_Inh_HsToken :: (Identifier) }+data Inh_HsToken = Inh_HsToken { allfields_Inh_HsToken :: ([(Identifier,Type,ChildKind)]), allnts_Inh_HsToken :: ([Identifier]), attrs_Inh_HsToken :: ([(Identifier,Identifier)]), con_Inh_HsToken :: (Identifier), fieldnames_Inh_HsToken :: ([Identifier]), nt_Inh_HsToken :: (Identifier), options_Inh_HsToken :: (Options) } data Syn_HsToken = Syn_HsToken { errors_Syn_HsToken :: (Seq Error), output_Syn_HsToken :: (HsToken), tok_Syn_HsToken :: ((Pos,String)), usedAttrs_Syn_HsToken :: ([(Identifier,Identifier)]), usedFields_Syn_HsToken :: (Seq Identifier), usedLocals_Syn_HsToken :: ([Identifier]) } {-# INLINABLE wrap_HsToken #-} wrap_HsToken :: T_HsToken -> Inh_HsToken -> (Syn_HsToken )-wrap_HsToken (T_HsToken act) (Inh_HsToken _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) =+wrap_HsToken (T_HsToken act) (Inh_HsToken _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) = Control.Monad.Identity.runIdentity ( do sem <- act- let arg = T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt+ let arg = T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions (T_HsToken_vOut1 _lhsOerrors _lhsOoutput _lhsOtok _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) <- return (inv_HsToken_s2 sem arg) return (Syn_HsToken _lhsOerrors _lhsOoutput _lhsOtok _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) )@@ -59,7 +59,7 @@ } data T_HsToken_s3 = C_HsToken_s3 type T_HsToken_v1 = (T_HsToken_vIn1 ) -> (T_HsToken_vOut1 )-data T_HsToken_vIn1 = T_HsToken_vIn1 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) ([Identifier]) (Identifier)+data T_HsToken_vIn1 = T_HsToken_vIn1 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) ([Identifier]) (Identifier) (Options) data T_HsToken_vOut1 = T_HsToken_vOut1 (Seq Error) (HsToken) ((Pos,String)) ([(Identifier,Identifier)]) (Seq Identifier) ([Identifier]) {-# NOINLINE sem_HsToken_AGLocal #-} sem_HsToken_AGLocal :: (Identifier) -> (Pos) -> (Maybe String) -> T_HsToken @@ -67,10 +67,10 @@ {-# NOINLINE st2 #-} st2 = let v1 :: T_HsToken_v1 - v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _tkAsLocal = rule0 arg_pos_ arg_rdesc_ arg_var_ _tkAsField = rule1 arg_pos_ arg_rdesc_ arg_var_- (_errors,_output,_tok,_usedLocals) = rule2 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _tkAsField _tkAsLocal arg_pos_ arg_var_+ (_errors,_output,_tok,_usedLocals) = rule2 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions _tkAsField _tkAsLocal arg_pos_ arg_var_ _lhsOusedFields :: Seq Identifier _lhsOusedFields = rule3 _lhsIfieldnames arg_var_ _lhsOerrors :: Seq Error@@ -87,33 +87,33 @@ in __result_ ) in C_HsToken_s2 v1 {-# INLINE rule0 #-}- {-# LINE 65 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 66 "./src-ag/SemHsTokens.ag" #-} rule0 = \ pos_ rdesc_ var_ ->- {-# LINE 65 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 66 "./src-ag/SemHsTokens.ag" #-} AGLocal var_ pos_ rdesc_ {-# LINE 95 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule1 #-}- {-# LINE 66 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 67 "./src-ag/SemHsTokens.ag" #-} rule1 = \ pos_ rdesc_ var_ ->- {-# LINE 66 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 67 "./src-ag/SemHsTokens.ag" #-} AGField _LOC var_ pos_ rdesc_ {-# LINE 101 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule2 #-}- {-# LINE 68 "./src-ag/SemHsTokens.ag" #-}- rule2 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsIfieldnames) :: [Identifier]) ((_lhsInt) :: Identifier) _tkAsField _tkAsLocal pos_ var_ ->- {-# LINE 68 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 69 "./src-ag/SemHsTokens.ag" #-}+ rule2 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ((_lhsIallnts) :: [Identifier]) ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsIfieldnames) :: [Identifier]) ((_lhsInt) :: Identifier) ((_lhsIoptions) :: Options) _tkAsField _tkAsLocal pos_ var_ ->+ {-# LINE 69 "./src-ag/SemHsTokens.ag" #-} if var_ `elem` _lhsIfieldnames then if isNTname _lhsIallnts (lookup var_ (map (\(n,t,_) -> (n,t)) _lhsIallfields)) then (Seq.singleton(ChildAsLocal _lhsInt _lhsIcon var_), _tkAsLocal ,(pos_,fieldname var_), [] ) else (Seq.empty, _tkAsLocal , (pos_,fieldname var_), [] ) else if (_LOC,var_) `elem` _lhsIattrs- then (Seq.empty , _tkAsField , (pos_,locname var_), [var_])- else (Seq.singleton(UndefLocal _lhsInt _lhsIcon var_), _tkAsField , (pos_,locname var_), [] )+ then (Seq.empty , _tkAsField , (pos_,locname _lhsIoptions var_), [var_])+ else (Seq.singleton(UndefLocal _lhsInt _lhsIcon var_), _tkAsField , (pos_,locname _lhsIoptions var_), [] ) {-# LINE 113 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule3 #-}- {-# LINE 103 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 104 "./src-ag/SemHsTokens.ag" #-} rule3 = \ ((_lhsIfieldnames) :: [Identifier]) var_ ->- {-# LINE 103 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 104 "./src-ag/SemHsTokens.ag" #-} if var_ `elem` _lhsIfieldnames then Seq.singleton var_ else Seq.empty@@ -139,7 +139,7 @@ {-# NOINLINE st2 #-} st2 = let v1 :: T_HsToken_v1 - v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _lhsOerrors :: Seq Error _lhsOerrors = rule9 _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt arg_attr_ arg_field_ _lhsOusedAttrs :: [(Identifier,Identifier)]@@ -147,7 +147,7 @@ (_lhsOusedAttrs,_lhsOusedLocals) = rule10 arg_attr_ arg_field_ _addTrace = rule11 arg_attr_ arg_field_ arg_rdesc_ _lhsOtok :: (Pos,String)- _lhsOtok = rule12 _addTrace arg_attr_ arg_field_ arg_pos_+ _lhsOtok = rule12 _addTrace _lhsIoptions arg_attr_ arg_field_ arg_pos_ _lhsOusedFields :: Seq Identifier _lhsOusedFields = rule13 () _output = rule14 arg_attr_ arg_field_ arg_pos_ arg_rdesc_@@ -157,9 +157,9 @@ in __result_ ) in C_HsToken_s2 v1 {-# INLINE rule9 #-}- {-# LINE 77 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 78 "./src-ag/SemHsTokens.ag" #-} rule9 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ((_lhsIcon) :: Identifier) ((_lhsIfieldnames) :: [Identifier]) ((_lhsInt) :: Identifier) attr_ field_ ->- {-# LINE 77 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 78 "./src-ag/SemHsTokens.ag" #-} if (field_,attr_) `elem` _lhsIattrs then Seq.empty else if not(field_ `elem` (_LHS : _LOC: _lhsIfieldnames))@@ -167,26 +167,26 @@ else Seq.singleton (UndefAttr _lhsInt _lhsIcon field_ attr_ False) {-# LINE 169 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule10 #-}- {-# LINE 92 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 93 "./src-ag/SemHsTokens.ag" #-} rule10 = \ attr_ field_ ->- {-# LINE 92 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 93 "./src-ag/SemHsTokens.ag" #-} if field_ == _LOC then ([], [attr_]) else ([(field_,attr_)], []) {-# LINE 177 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule11 #-}- {-# LINE 122 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 123 "./src-ag/SemHsTokens.ag" #-} rule11 = \ attr_ field_ rdesc_ ->- {-# LINE 122 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 123 "./src-ag/SemHsTokens.ag" #-} case rdesc_ of Just d -> \x -> "(trace " ++ show (d ++ " -> " ++ show field_ ++ "." ++ show attr_) ++ " (" ++ x ++ "))" Nothing -> id {-# LINE 185 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule12 #-}- {-# LINE 125 "./src-ag/SemHsTokens.ag" #-}- rule12 = \ _addTrace attr_ field_ pos_ ->- {-# LINE 125 "./src-ag/SemHsTokens.ag" #-}- (pos_, _addTrace $ attrname True field_ attr_)+ {-# LINE 126 "./src-ag/SemHsTokens.ag" #-}+ rule12 = \ _addTrace ((_lhsIoptions) :: Options) attr_ field_ pos_ ->+ {-# LINE 126 "./src-ag/SemHsTokens.ag" #-}+ (pos_, _addTrace $ attrname _lhsIoptions True field_ attr_) {-# LINE 191 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule13 #-} rule13 = \ (_ :: ()) ->@@ -203,7 +203,7 @@ {-# NOINLINE st2 #-} st2 = let v1 :: T_HsToken_v1 - v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _lhsOtok :: (Pos,String) _lhsOtok = rule16 arg_pos_ arg_value_ _lhsOerrors :: Seq Error@@ -221,9 +221,9 @@ in __result_ ) in C_HsToken_s2 v1 {-# INLINE rule16 #-}- {-# LINE 127 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 128 "./src-ag/SemHsTokens.ag" #-} rule16 = \ pos_ value_ ->- {-# LINE 127 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 128 "./src-ag/SemHsTokens.ag" #-} (pos_, value_) {-# LINE 229 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule17 #-}@@ -250,7 +250,7 @@ {-# NOINLINE st2 #-} st2 = let v1 :: T_HsToken_v1 - v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _lhsOtok :: (Pos,String) _lhsOtok = rule23 arg_pos_ arg_value_ _lhsOerrors :: Seq Error@@ -268,9 +268,9 @@ in __result_ ) in C_HsToken_s2 v1 {-# INLINE rule23 #-}- {-# LINE 129 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 130 "./src-ag/SemHsTokens.ag" #-} rule23 = \ pos_ value_ ->- {-# LINE 129 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 130 "./src-ag/SemHsTokens.ag" #-} (pos_, if null value_ then "" else showCharShort (head value_)@@ -300,7 +300,7 @@ {-# NOINLINE st2 #-} st2 = let v1 :: T_HsToken_v1 - v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _lhsOtok :: (Pos,String) _lhsOtok = rule30 arg_pos_ arg_value_ _lhsOerrors :: Seq Error@@ -318,9 +318,9 @@ in __result_ ) in C_HsToken_s2 v1 {-# INLINE rule30 #-}- {-# LINE 134 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 135 "./src-ag/SemHsTokens.ag" #-} rule30 = \ pos_ value_ ->- {-# LINE 134 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 135 "./src-ag/SemHsTokens.ag" #-} (pos_, showStrShort value_) {-# LINE 326 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule31 #-}@@ -347,7 +347,7 @@ {-# NOINLINE st2 #-} st2 = let v1 :: T_HsToken_v1 - v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v1 = \ (T_HsToken_vIn1 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _lhsOerrors :: Seq Error _lhsOerrors = rule37 arg_mesg_ arg_pos_ _lhsOtok :: (Pos,String)@@ -365,16 +365,16 @@ in __result_ ) in C_HsToken_s2 v1 {-# INLINE rule37 #-}- {-# LINE 50 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 51 "./src-ag/SemHsTokens.ag" #-} rule37 = \ mesg_ pos_ ->- {-# LINE 50 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 51 "./src-ag/SemHsTokens.ag" #-} let m = text mesg_ in Seq.singleton (CustomError False pos_ m) {-# LINE 374 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule38 #-}- {-# LINE 135 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 136 "./src-ag/SemHsTokens.ag" #-} rule38 = \ pos_ ->- {-# LINE 135 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 136 "./src-ag/SemHsTokens.ag" #-} (pos_, "") {-# LINE 380 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule39 #-}@@ -395,14 +395,14 @@ -- HsTokens ---------------------------------------------------- -- wrapper-data Inh_HsTokens = Inh_HsTokens { allfields_Inh_HsTokens :: ([(Identifier,Type,ChildKind)]), allnts_Inh_HsTokens :: ([Identifier]), attrs_Inh_HsTokens :: ([(Identifier,Identifier)]), con_Inh_HsTokens :: (Identifier), fieldnames_Inh_HsTokens :: ([Identifier]), nt_Inh_HsTokens :: (Identifier) }+data Inh_HsTokens = Inh_HsTokens { allfields_Inh_HsTokens :: ([(Identifier,Type,ChildKind)]), allnts_Inh_HsTokens :: ([Identifier]), attrs_Inh_HsTokens :: ([(Identifier,Identifier)]), con_Inh_HsTokens :: (Identifier), fieldnames_Inh_HsTokens :: ([Identifier]), nt_Inh_HsTokens :: (Identifier), options_Inh_HsTokens :: (Options) } data Syn_HsTokens = Syn_HsTokens { errors_Syn_HsTokens :: (Seq Error), output_Syn_HsTokens :: (HsTokens), tks_Syn_HsTokens :: ([(Pos,String)]), usedAttrs_Syn_HsTokens :: ([(Identifier,Identifier)]), usedFields_Syn_HsTokens :: (Seq Identifier), usedLocals_Syn_HsTokens :: ([Identifier]) } {-# INLINABLE wrap_HsTokens #-} wrap_HsTokens :: T_HsTokens -> Inh_HsTokens -> (Syn_HsTokens )-wrap_HsTokens (T_HsTokens act) (Inh_HsTokens _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) =+wrap_HsTokens (T_HsTokens act) (Inh_HsTokens _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) = Control.Monad.Identity.runIdentity ( do sem <- act- let arg = T_HsTokens_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt+ let arg = T_HsTokens_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions (T_HsTokens_vOut4 _lhsOerrors _lhsOoutput _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) <- return (inv_HsTokens_s5 sem arg) return (Syn_HsTokens _lhsOerrors _lhsOoutput _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) )@@ -421,7 +421,7 @@ } data T_HsTokens_s6 = C_HsTokens_s6 type T_HsTokens_v4 = (T_HsTokens_vIn4 ) -> (T_HsTokens_vOut4 )-data T_HsTokens_vIn4 = T_HsTokens_vIn4 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) ([Identifier]) (Identifier)+data T_HsTokens_vIn4 = T_HsTokens_vIn4 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) ([Identifier]) (Identifier) (Options) data T_HsTokens_vOut4 = T_HsTokens_vOut4 (Seq Error) (HsTokens) ([(Pos,String)]) ([(Identifier,Identifier)]) (Seq Identifier) ([Identifier]) {-# NOINLINE sem_HsTokens_Cons #-} sem_HsTokens_Cons :: T_HsToken -> T_HsTokens -> T_HsTokens @@ -429,11 +429,11 @@ {-# NOINLINE st5 #-} st5 = let v4 :: T_HsTokens_v4 - v4 = \ (T_HsTokens_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v4 = \ (T_HsTokens_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _hdX2 = Control.Monad.Identity.runIdentity (attach_T_HsToken (arg_hd_)) _tlX5 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tl_))- (T_HsToken_vOut1 _hdIerrors _hdIoutput _hdItok _hdIusedAttrs _hdIusedFields _hdIusedLocals) = inv_HsToken_s2 _hdX2 (T_HsToken_vIn1 _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt)- (T_HsTokens_vOut4 _tlIerrors _tlIoutput _tlItks _tlIusedAttrs _tlIusedFields _tlIusedLocals) = inv_HsTokens_s5 _tlX5 (T_HsTokens_vIn4 _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOfieldnames _tlOnt)+ (T_HsToken_vOut1 _hdIerrors _hdIoutput _hdItok _hdIusedAttrs _hdIusedFields _hdIusedLocals) = inv_HsToken_s2 _hdX2 (T_HsToken_vIn1 _hdOallfields _hdOallnts _hdOattrs _hdOcon _hdOfieldnames _hdOnt _hdOoptions)+ (T_HsTokens_vOut4 _tlIerrors _tlIoutput _tlItks _tlIusedAttrs _tlIusedFields _tlIusedLocals) = inv_HsTokens_s5 _tlX5 (T_HsTokens_vIn4 _tlOallfields _tlOallnts _tlOattrs _tlOcon _tlOfieldnames _tlOnt _tlOoptions) _lhsOtks :: [(Pos,String)] _lhsOtks = rule44 _hdItok _tlItks _lhsOerrors :: Seq Error@@ -453,21 +453,23 @@ _hdOcon = rule54 _lhsIcon _hdOfieldnames = rule55 _lhsIfieldnames _hdOnt = rule56 _lhsInt- _tlOallfields = rule57 _lhsIallfields- _tlOallnts = rule58 _lhsIallnts- _tlOattrs = rule59 _lhsIattrs- _tlOcon = rule60 _lhsIcon- _tlOfieldnames = rule61 _lhsIfieldnames- _tlOnt = rule62 _lhsInt+ _hdOoptions = rule57 _lhsIoptions+ _tlOallfields = rule58 _lhsIallfields+ _tlOallnts = rule59 _lhsIallnts+ _tlOattrs = rule60 _lhsIattrs+ _tlOcon = rule61 _lhsIcon+ _tlOfieldnames = rule62 _lhsIfieldnames+ _tlOnt = rule63 _lhsInt+ _tlOoptions = rule64 _lhsIoptions __result_ = T_HsTokens_vOut4 _lhsOerrors _lhsOoutput _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals in __result_ ) in C_HsTokens_s5 v4 {-# INLINE rule44 #-}- {-# LINE 117 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 118 "./src-ag/SemHsTokens.ag" #-} rule44 = \ ((_hdItok) :: (Pos,String)) ((_tlItks) :: [(Pos,String)]) ->- {-# LINE 117 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 118 "./src-ag/SemHsTokens.ag" #-} _hdItok : _tlItks- {-# LINE 471 "dist/build/SemHsTokens.hs"#-}+ {-# LINE 473 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule45 #-} rule45 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) -> _hdIerrors Seq.>< _tlIerrors@@ -505,58 +507,58 @@ rule56 = \ ((_lhsInt) :: Identifier) -> _lhsInt {-# INLINE rule57 #-}- rule57 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- _lhsIallfields+ rule57 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions {-# INLINE rule58 #-}- rule58 = \ ((_lhsIallnts) :: [Identifier]) ->- _lhsIallnts+ rule58 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ _lhsIallfields {-# INLINE rule59 #-}- rule59 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->- _lhsIattrs+ rule59 = \ ((_lhsIallnts) :: [Identifier]) ->+ _lhsIallnts {-# INLINE rule60 #-}- rule60 = \ ((_lhsIcon) :: Identifier) ->- _lhsIcon+ rule60 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ _lhsIattrs {-# INLINE rule61 #-}- rule61 = \ ((_lhsIfieldnames) :: [Identifier]) ->- _lhsIfieldnames+ rule61 = \ ((_lhsIcon) :: Identifier) ->+ _lhsIcon {-# INLINE rule62 #-}- rule62 = \ ((_lhsInt) :: Identifier) ->+ rule62 = \ ((_lhsIfieldnames) :: [Identifier]) ->+ _lhsIfieldnames+ {-# INLINE rule63 #-}+ rule63 = \ ((_lhsInt) :: Identifier) -> _lhsInt+ {-# INLINE rule64 #-}+ rule64 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions {-# NOINLINE sem_HsTokens_Nil #-} sem_HsTokens_Nil :: T_HsTokens sem_HsTokens_Nil = T_HsTokens (return st5) where {-# NOINLINE st5 #-} st5 = let v4 :: T_HsTokens_v4 - v4 = \ (T_HsTokens_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt) -> ( let+ v4 = \ (T_HsTokens_vIn4 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsIfieldnames _lhsInt _lhsIoptions) -> ( let _lhsOtks :: [(Pos,String)]- _lhsOtks = rule63 ()+ _lhsOtks = rule65 () _lhsOerrors :: Seq Error- _lhsOerrors = rule64 ()+ _lhsOerrors = rule66 () _lhsOusedAttrs :: [(Identifier,Identifier)]- _lhsOusedAttrs = rule65 ()+ _lhsOusedAttrs = rule67 () _lhsOusedFields :: Seq Identifier- _lhsOusedFields = rule66 ()+ _lhsOusedFields = rule68 () _lhsOusedLocals :: [Identifier]- _lhsOusedLocals = rule67 ()- _output = rule68 ()+ _lhsOusedLocals = rule69 ()+ _output = rule70 () _lhsOoutput :: HsTokens- _lhsOoutput = rule69 _output+ _lhsOoutput = rule71 _output __result_ = T_HsTokens_vOut4 _lhsOerrors _lhsOoutput _lhsOtks _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals in __result_ ) in C_HsTokens_s5 v4- {-# INLINE rule63 #-}- {-# LINE 118 "./src-ag/SemHsTokens.ag" #-}- rule63 = \ (_ :: ()) ->- {-# LINE 118 "./src-ag/SemHsTokens.ag" #-}- []- {-# LINE 554 "dist/build/SemHsTokens.hs"#-}- {-# INLINE rule64 #-}- rule64 = \ (_ :: ()) ->- Seq.empty {-# INLINE rule65 #-}+ {-# LINE 119 "./src-ag/SemHsTokens.ag" #-} rule65 = \ (_ :: ()) ->- []+ {-# LINE 119 "./src-ag/SemHsTokens.ag" #-}+ []+ {-# LINE 562 "dist/build/SemHsTokens.hs"#-} {-# INLINE rule66 #-} rule66 = \ (_ :: ()) -> Seq.empty@@ -565,21 +567,27 @@ [] {-# INLINE rule68 #-} rule68 = \ (_ :: ()) ->- []+ Seq.empty {-# INLINE rule69 #-}- rule69 = \ _output ->+ rule69 = \ (_ :: ()) ->+ []+ {-# INLINE rule70 #-}+ rule70 = \ (_ :: ()) ->+ []+ {-# INLINE rule71 #-}+ rule71 = \ _output -> _output -- HsTokensRoot ------------------------------------------------ -- wrapper-data Inh_HsTokensRoot = Inh_HsTokensRoot { allfields_Inh_HsTokensRoot :: ([(Identifier,Type,ChildKind)]), allnts_Inh_HsTokensRoot :: ([Identifier]), attrs_Inh_HsTokensRoot :: ([(Identifier,Identifier)]), con_Inh_HsTokensRoot :: (Identifier), nt_Inh_HsTokensRoot :: (Identifier) }+data Inh_HsTokensRoot = Inh_HsTokensRoot { allfields_Inh_HsTokensRoot :: ([(Identifier,Type,ChildKind)]), allnts_Inh_HsTokensRoot :: ([Identifier]), attrs_Inh_HsTokensRoot :: ([(Identifier,Identifier)]), con_Inh_HsTokensRoot :: (Identifier), nt_Inh_HsTokensRoot :: (Identifier), options_Inh_HsTokensRoot :: (Options) } data Syn_HsTokensRoot = Syn_HsTokensRoot { errors_Syn_HsTokensRoot :: (Seq Error), output_Syn_HsTokensRoot :: ([HsToken]), textLines_Syn_HsTokensRoot :: ([String]), usedAttrs_Syn_HsTokensRoot :: ([(Identifier,Identifier)]), usedFields_Syn_HsTokensRoot :: ([Identifier]), usedLocals_Syn_HsTokensRoot :: ([Identifier]) } {-# INLINABLE wrap_HsTokensRoot #-} wrap_HsTokensRoot :: T_HsTokensRoot -> Inh_HsTokensRoot -> (Syn_HsTokensRoot )-wrap_HsTokensRoot (T_HsTokensRoot act) (Inh_HsTokensRoot _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt) =+wrap_HsTokensRoot (T_HsTokensRoot act) (Inh_HsTokensRoot _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt _lhsIoptions) = Control.Monad.Identity.runIdentity ( do sem <- act- let arg = T_HsTokensRoot_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt+ let arg = T_HsTokensRoot_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt _lhsIoptions (T_HsTokensRoot_vOut7 _lhsOerrors _lhsOoutput _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) <- return (inv_HsTokensRoot_s8 sem arg) return (Syn_HsTokensRoot _lhsOerrors _lhsOoutput _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals) )@@ -598,7 +606,7 @@ } data T_HsTokensRoot_s9 = C_HsTokensRoot_s9 type T_HsTokensRoot_v7 = (T_HsTokensRoot_vIn7 ) -> (T_HsTokensRoot_vOut7 )-data T_HsTokensRoot_vIn7 = T_HsTokensRoot_vIn7 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Identifier)+data T_HsTokensRoot_vIn7 = T_HsTokensRoot_vIn7 ([(Identifier,Type,ChildKind)]) ([Identifier]) ([(Identifier,Identifier)]) (Identifier) (Identifier) (Options) data T_HsTokensRoot_vOut7 = T_HsTokensRoot_vOut7 (Seq Error) ([HsToken]) ([String]) ([(Identifier,Identifier)]) ([Identifier]) ([Identifier]) {-# NOINLINE sem_HsTokensRoot_HsTokensRoot #-} sem_HsTokensRoot_HsTokensRoot :: T_HsTokens -> T_HsTokensRoot @@ -606,72 +614,76 @@ {-# NOINLINE st8 #-} st8 = let v7 :: T_HsTokensRoot_v7 - v7 = \ (T_HsTokensRoot_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt) -> ( let+ v7 = \ (T_HsTokensRoot_vIn7 _lhsIallfields _lhsIallnts _lhsIattrs _lhsIcon _lhsInt _lhsIoptions) -> ( let _tokensX5 = Control.Monad.Identity.runIdentity (attach_T_HsTokens (arg_tokens_))- (T_HsTokens_vOut4 _tokensIerrors _tokensIoutput _tokensItks _tokensIusedAttrs _tokensIusedFields _tokensIusedLocals) = inv_HsTokens_s5 _tokensX5 (T_HsTokens_vIn4 _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt)- _tokensOfieldnames = rule70 _lhsIallfields+ (T_HsTokens_vOut4 _tokensIerrors _tokensIoutput _tokensItks _tokensIusedAttrs _tokensIusedFields _tokensIusedLocals) = inv_HsTokens_s5 _tokensX5 (T_HsTokens_vIn4 _tokensOallfields _tokensOallnts _tokensOattrs _tokensOcon _tokensOfieldnames _tokensOnt _tokensOoptions)+ _tokensOfieldnames = rule72 _lhsIallfields _lhsOusedFields :: [Identifier]- _lhsOusedFields = rule71 _tokensIusedFields+ _lhsOusedFields = rule73 _tokensIusedFields _lhsOtextLines :: [String]- _lhsOtextLines = rule72 _tokensItks+ _lhsOtextLines = rule74 _tokensItks _lhsOerrors :: Seq Error- _lhsOerrors = rule73 _tokensIerrors+ _lhsOerrors = rule75 _tokensIerrors _lhsOoutput :: [HsToken]- _lhsOoutput = rule74 _tokensIoutput+ _lhsOoutput = rule76 _tokensIoutput _lhsOusedAttrs :: [(Identifier,Identifier)]- _lhsOusedAttrs = rule75 _tokensIusedAttrs+ _lhsOusedAttrs = rule77 _tokensIusedAttrs _lhsOusedLocals :: [Identifier]- _lhsOusedLocals = rule76 _tokensIusedLocals- _tokensOallfields = rule77 _lhsIallfields- _tokensOallnts = rule78 _lhsIallnts- _tokensOattrs = rule79 _lhsIattrs- _tokensOcon = rule80 _lhsIcon- _tokensOnt = rule81 _lhsInt+ _lhsOusedLocals = rule78 _tokensIusedLocals+ _tokensOallfields = rule79 _lhsIallfields+ _tokensOallnts = rule80 _lhsIallnts+ _tokensOattrs = rule81 _lhsIattrs+ _tokensOcon = rule82 _lhsIcon+ _tokensOnt = rule83 _lhsInt+ _tokensOoptions = rule84 _lhsIoptions __result_ = T_HsTokensRoot_vOut7 _lhsOerrors _lhsOoutput _lhsOtextLines _lhsOusedAttrs _lhsOusedFields _lhsOusedLocals in __result_ ) in C_HsTokensRoot_s8 v7- {-# INLINE rule70 #-}- {-# LINE 38 "./src-ag/SemHsTokens.ag" #-}- rule70 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->- {-# LINE 38 "./src-ag/SemHsTokens.ag" #-}+ {-# INLINE rule72 #-}+ {-# LINE 39 "./src-ag/SemHsTokens.ag" #-}+ rule72 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ {-# LINE 39 "./src-ag/SemHsTokens.ag" #-} map (\(n,_,_) -> n) _lhsIallfields- {-# LINE 639 "dist/build/SemHsTokens.hs"#-}- {-# INLINE rule71 #-}- {-# LINE 107 "./src-ag/SemHsTokens.ag" #-}- rule71 = \ ((_tokensIusedFields) :: Seq Identifier) ->- {-# LINE 107 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 648 "dist/build/SemHsTokens.hs"#-}+ {-# INLINE rule73 #-}+ {-# LINE 108 "./src-ag/SemHsTokens.ag" #-}+ rule73 = \ ((_tokensIusedFields) :: Seq Identifier) ->+ {-# LINE 108 "./src-ag/SemHsTokens.ag" #-} toList _tokensIusedFields- {-# LINE 645 "dist/build/SemHsTokens.hs"#-}- {-# INLINE rule72 #-}- {-# LINE 114 "./src-ag/SemHsTokens.ag" #-}- rule72 = \ ((_tokensItks) :: [(Pos,String)]) ->- {-# LINE 114 "./src-ag/SemHsTokens.ag" #-}+ {-# LINE 654 "dist/build/SemHsTokens.hs"#-}+ {-# INLINE rule74 #-}+ {-# LINE 115 "./src-ag/SemHsTokens.ag" #-}+ rule74 = \ ((_tokensItks) :: [(Pos,String)]) ->+ {-# LINE 115 "./src-ag/SemHsTokens.ag" #-} showTokens _tokensItks- {-# LINE 651 "dist/build/SemHsTokens.hs"#-}- {-# INLINE rule73 #-}- rule73 = \ ((_tokensIerrors) :: Seq Error) ->+ {-# LINE 660 "dist/build/SemHsTokens.hs"#-}+ {-# INLINE rule75 #-}+ rule75 = \ ((_tokensIerrors) :: Seq Error) -> _tokensIerrors- {-# INLINE rule74 #-}- rule74 = \ ((_tokensIoutput) :: HsTokens) ->+ {-# INLINE rule76 #-}+ rule76 = \ ((_tokensIoutput) :: HsTokens) -> _tokensIoutput- {-# INLINE rule75 #-}- rule75 = \ ((_tokensIusedAttrs) :: [(Identifier,Identifier)]) ->+ {-# INLINE rule77 #-}+ rule77 = \ ((_tokensIusedAttrs) :: [(Identifier,Identifier)]) -> _tokensIusedAttrs- {-# INLINE rule76 #-}- rule76 = \ ((_tokensIusedLocals) :: [Identifier]) ->+ {-# INLINE rule78 #-}+ rule78 = \ ((_tokensIusedLocals) :: [Identifier]) -> _tokensIusedLocals- {-# INLINE rule77 #-}- rule77 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) ->+ {-# INLINE rule79 #-}+ rule79 = \ ((_lhsIallfields) :: [(Identifier,Type,ChildKind)]) -> _lhsIallfields- {-# INLINE rule78 #-}- rule78 = \ ((_lhsIallnts) :: [Identifier]) ->+ {-# INLINE rule80 #-}+ rule80 = \ ((_lhsIallnts) :: [Identifier]) -> _lhsIallnts- {-# INLINE rule79 #-}- rule79 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) ->+ {-# INLINE rule81 #-}+ rule81 = \ ((_lhsIattrs) :: [(Identifier,Identifier)]) -> _lhsIattrs- {-# INLINE rule80 #-}- rule80 = \ ((_lhsIcon) :: Identifier) ->+ {-# INLINE rule82 #-}+ rule82 = \ ((_lhsIcon) :: Identifier) -> _lhsIcon- {-# INLINE rule81 #-}- rule81 = \ ((_lhsInt) :: Identifier) ->+ {-# INLINE rule83 #-}+ rule83 = \ ((_lhsInt) :: Identifier) -> _lhsInt+ {-# INLINE rule84 #-}+ rule84 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions
src-generated/TfmToVisage.hs view
@@ -2,6 +2,19 @@ {-# LANGUAGE ScopedTypeVariables #-} module TfmToVisage where+{-# LINE 2 "./src-ag/Expression.ag" #-}++import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 10 "dist/build/TfmToVisage.hs" #-}++{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 17 "dist/build/TfmToVisage.hs" #-}+ {-# LINE 2 "./src-ag/AbstractSyntax.ag" #-} -- AbstractSyntax.ag imports@@ -12,19 +25,6 @@ import Macro --marcos import CommonTypes import ErrorMessages-{-# LINE 16 "dist/build/TfmToVisage.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 23 "dist/build/TfmToVisage.hs" #-}--{-# LINE 2 "./src-ag/Expression.ag" #-}--import UU.Scanner.Position(Pos)-import HsToken {-# LINE 29 "dist/build/TfmToVisage.hs" #-} {-# LINE 9 "./src-ag/TfmToVisage.ag" #-}
src-generated/Transform.hs view
@@ -2,6183 +2,6257 @@ {-# LANGUAGE ScopedTypeVariables #-} module Transform where-{-# LINE 2 "./src-ag/ConcreteSyntax.ag" #-}--import UU.Scanner.Position (Pos)-import Patterns (Pattern)-import Expression (Expression)-import CommonTypes-import Macro --marcos-{-# LINE 13 "dist/build/Transform.hs" #-}--{-# LINE 2 "./src-ag/Patterns.ag" #-}---- Patterns.ag imports-import UU.Scanner.Position(Pos)-import CommonTypes (ConstructorIdent,Identifier)-{-# LINE 20 "dist/build/Transform.hs" #-}--{-# LINE 8 "./src-ag/Transform.ag" #-}--import Control.Monad(mplus,mzero)-import Data.List (partition, nub,intersperse, union)-import Data.Maybe-import qualified Data.Map as Map-import Data.Map (Map)-import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert, elems)-import qualified Data.Sequence as Seq-import Data.Sequence(Seq, (><))-import UU.Scanner.Position(noPos)--import ConcreteSyntax-import AbstractSyntax-import ErrorMessages-import Patterns (Patterns,Pattern(..))-import Expression (Expression(..))-import HsToken--import RhsCheck-import Debug.Trace-{-# LINE 43 "dist/build/Transform.hs" #-}-import Control.Monad.Identity (Identity)-import qualified Control.Monad.Identity-{-# LINE 104 "./src-ag/Transform.ag" #-}-type DefinedSets = Map Identifier (Set NontermIdent) -{-# LINE 48 "dist/build/Transform.hs" #-}--{-# LINE 124 "./src-ag/Transform.ag" #-}-type FieldMap = [(Identifier, Type)] -{-# LINE 52 "dist/build/Transform.hs" #-}--{-# LINE 125 "./src-ag/Transform.ag" #-}-type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) -{-# LINE 56 "dist/build/Transform.hs" #-}--{-# LINE 148 "./src-ag/Transform.ag" #-}-type AttrName = (Identifier,Identifier) -{-# LINE 60 "dist/build/Transform.hs" #-}--{-# LINE 149 "./src-ag/Transform.ag" #-}-type RuleInfo = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String, Bool, Bool) -{-# LINE 64 "dist/build/Transform.hs" #-}--{-# LINE 150 "./src-ag/Transform.ag" #-}-type SigInfo = (Identifier,Type) -{-# LINE 68 "dist/build/Transform.hs" #-}--{-# LINE 151 "./src-ag/Transform.ag" #-}-type UniqueInfo = (Identifier,Identifier) -{-# LINE 72 "dist/build/Transform.hs" #-}--{-# LINE 152 "./src-ag/Transform.ag" #-}-type AugmentInfo = (Identifier,Expression)-{-# LINE 76 "dist/build/Transform.hs" #-}--{-# LINE 153 "./src-ag/Transform.ag" #-}-type AroundInfo = (Identifier,Expression)-{-# LINE 80 "dist/build/Transform.hs" #-}--{-# LINE 154 "./src-ag/Transform.ag" #-}-type MergeInfo = (Identifier, Identifier, [Identifier], Expression)-{-# LINE 84 "dist/build/Transform.hs" #-}--{-# LINE 203 "./src-ag/Transform.ag" #-}---checkDuplicate :: (Identifier -> Identifier -> Error)- -> Identifier -> val -> Map Identifier val -> (Map Identifier val,Seq Error)-checkDuplicate dupError key val m- = case Map.lookupIndex key m of- Just ix -> let (key',_) = Map.elemAt ix m- in (m,Seq.singleton (dupError key key'))- Nothing -> (Map.insert key val m,Seq.empty)--checkDuplicates :: (Identifier -> Identifier -> Error)- -> [(Identifier, val)] -> Map Identifier val -> (Map Identifier val,Seq Error)-checkDuplicates dupError new m = foldErrors check m new- where check = uncurry (checkDuplicate dupError)--foldErrors :: (b -> t -> (t, Seq Error)) -> t -> [b] -> (t, Seq Error)-foldErrors f n xs = foldl g (n,Seq.empty) xs- where g ~(e,es) x = let (e',es') = f x e- in (e', es >< es')---checkForDuplicates :: (Identifier -> Identifier -> Error) -> [Identifier] -> [Error]-checkForDuplicates _ [] = []-checkForDuplicates err (x:xs) = let (same,other) = partition (equalId x) xs- in map (err x) same ++ checkForDuplicates err other--equalId :: Identifier -> Identifier -> Bool-equalId x y = getName x == getName y--{-# LINE 116 "dist/build/Transform.hs" #-}--{-# LINE 354 "./src-ag/Transform.ag" #-}--type RulesAndErrors = ([Rule], Seq Error)-type SigsAndErrors = ([TypeSig], Seq Error)-type InstsAndErrors = ([(Identifier, Type)], Seq Error)-type UniquesAndErrors = (Map Identifier Identifier, Seq Error)-type AugmentsAndErrors = (Map Identifier [Expression], Seq Error)-type AroundsAndErrors = (Map Identifier [Expression], Seq Error)-type MergesAndErrors = (Map Identifier (Identifier, [Identifier], Expression), Seq Error)-type AttrOverwrite = Map AttrName Bool-type AccumRuleCheck = (RulesAndErrors, AttrOverwrite)-type AccumDefiCheck = (Seq Error, AttrOverwrite, [AttrName], [AttrName])--checkRules :: Map NontermIdent (Attributes, Attributes) -> DataTypes ->- Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->- Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->- NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors-checkRules attributes fields allinsts allsigs _ nt con rs- = let fieldmap :: FieldMap- fieldmap = (_LHS, NT nt [] False) : (_LOC, NT nullIdent [] False) : (_INST, NT nullIdent [] False) : (_FIRST, NT nullIdent [] False) : (_LAST, NT nullIdent [] False)- : Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fields)- ++ mapMaybe (\instNm -> lookup instNm sigs >>= \tp -> return (instNm, tp)) (Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allinsts))- -- merged children are not allowed to have any inherited attrs defined: do not include-- sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allsigs)-- hasAttrib f tp attr = Map.member attr (f (Map.findWithDefault (Map.empty,Map.empty) tp attributes))-- checkRule :: RuleInfo -> AccumRuleCheck -> AccumRuleCheck- checkRule (mbNm, pat,ex,as,owrt,str, pur, eager) ((r1,e1),m1)- = let (e2,m2,u2,_) = foldr (checkDefi owrt) (e1,m1,[],[]) as- in ( (Rule mbNm (pat u2) ex owrt str True pur False Nothing eager : r1, e2), m2)-- checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck- checkDefi owrt fa@(field,attr) (e,m,u,bs)- = case lookup field fieldmap- of Just (NT tp _ _) ->- let tp' = maybe tp id (deforestedNt tp)- in if field == _LOC || field == _INST || field == _FIRST || field == _LAST- || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr- then case Map.lookupIndex fa m of- Just ix -> let ((_,attr2),b) = Map.elemAt ix m- in if b && not (fa `elem` bs)- then ( e, Map.insert fa owrt m, fa:u, fa:bs)- else (((Seq.<|)) (DupRule nt con field attr2 attr) e, m, fa:u, bs)- Nothing -> ( e, Map.insert fa owrt m, u, fa:bs)- else (((Seq.<|)) (SuperfluousRule nt con field attr) e, m, fa:u, bs)- _ -> (((Seq.<|)) (UndefChild nt con field) e, m, fa:u, bs )-- in fst (foldr checkRule (([],Seq.empty),Map.empty) rs)--checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error-checkRuleNames nt con- = fst . foldr checkRule (Seq.empty, Set.empty)- where- checkRule (Just nm,_,_,_,_,_,_,_) (errs, nms)- | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)- | otherwise = (errs, Set.insert nm nms)- checkRule (Nothing,_,_,_,_,_,_,_) inp = inp--checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors-checkSigs nt con sis- = let checkSig (ide,typ) (sigs,errs)- = if ide `elem` map (\(TypeSig n _)-> n) sigs- then (sigs, ((Seq.<|)) (DupSig nt con ide) errs)- -- else if not (ide `elem` locattrdefs)- -- then (sigs, ((Seq.<|)) (SupSig nt con ide) errs)- else (TypeSig ide typ:sigs, errs)- in foldr checkSig ([],Seq.empty) sis--checkInsts :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [SigInfo]) -> DataTypes -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors-checkInsts allNts sigMap _ nt con- = foldr (\inst (insts, errs) ->- maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)- (\info@(k, NT nm args _) ->- case findInst k insts of- Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)- Nothing -> case nm `Set.member` allNts of- True -> (info : insts, errs)- False | take 2 (getName nm) == "T_" -> let nm' = Ident (drop 2 (getName nm)) (getPos nm)- info' = (k, NT nm' args True) -- this should be the only place at which 'for' with value True can be generated- in case nm' `Set.member` allNts of- True -> (info' : insts, errs)- False -> (insts, Seq.singleton (UndefNont nm') >< errs)- | otherwise -> (insts, Seq.singleton (UndefNont nm) >< errs)- )- $ findSig inst- ) ([], Seq.empty)- where- sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)-- findSig name- = do tp@(NT _ _ _) <- lookup name sigs- return (name, tp)-- findInst _ [] = Nothing- findInst k ((k', _): r)- | k == k' = Just k'- | otherwise = findInst k r--checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors-checkUniques allAttrs nt con uniques- = let checkUnique (ident,ref) (us,errs)- = if ident `Map.member` us- then (us, ((Seq.<|)) (DupUnique nt con ident) errs)- else if Map.member ref inhs && Map.member ref syns- then (Map.insert ident ref us, errs)- else (us, ((Seq.<|)) (MissingUnique nt ref) errs)-- (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkUnique (Map.empty, Seq.empty) uniques--checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors-checkAugments allAttrs nt _ augments- = let checkAugment (ident,expr) (as,errs)- = if ident `Map.member` as- then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)- else if Map.member ident syns- then (Map.insert ident [expr] as, errs)- else (as, ((Seq.<|)) (MissingSyn nt ident) errs)-- (_,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs- in foldr checkAugment (Map.empty, Seq.empty) augments--checkArounds :: DataTypes -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors-checkArounds fieldMap nt con arounds- = let checkAround (ident,expr) (as,errs)- = if ident `Map.member` as- then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)- else case lookup ident fields of- Just (NT _ _ _) -> (Map.insert ident [expr] as, errs)- _ -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)- fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)- in foldr checkAround (Map.empty, Seq.empty) arounds--checkMerges :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [Identifier]) -> DataTypes -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors-checkMerges allNts allInsts fieldMap _ con merges- = let checkMerge (target,nt,sources,expr) (m,errs)- = let fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)- insts = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)- allFields = insts ++ map fst fields -- note: sources of merge may not contain a target (for simplicity)- in if target `Map.member` m -- check for duplicate with self- then (m, DupChild nt con target (fst $ Map.elemAt (Map.findIndex target m) m) Seq.<| errs)- else if target `elem` allFields- then (m, DupChild nt con target (head $ filter (== target) allFields) Seq.<| errs)- else let missing = filter (\s -> not (s `elem` allFields)) sources- in if null missing- then if nt `Set.member` allNts -- check if the nonterm is defined- then (Map.insert target (nt, sources, expr) m, errs) -- all ok..- else (m, UndefNont nt Seq.<| errs)- else (m, (Seq.fromList $ map (UndefChild nt con) missing) Seq.>< errs)- in foldr checkMerge (Map.empty, Seq.empty) merges--unionunionplusplus :: Map NontermIdent (Map ConstructorIdent [a]) -> Map NontermIdent (Map ConstructorIdent [a]) -> Map NontermIdent (Map ConstructorIdent [a])-unionunionplusplus = Map.unionWith (Map.unionWith (++))-{-# LINE 273 "dist/build/Transform.hs" #-}--{-# LINE 511 "./src-ag/Transform.ag" #-}--mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [RuleInfo]) -> DataTypes -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]-mkUniqueRules opts allRules allFields allInsts allAttrDecls nt con usMap- = map apply groups- where- fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)- ++ Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)- -- may have duplicates-- attrDefs = let projectDefs (_,_,_,defs,_,_,_,_) = defs- in concatMap projectDefs $ Map.findWithDefault [] con $ Map.findWithDefault Map.empty nt allRules-- groups = Map.assocs $ Map.foldrWithKey (\i r m -> Map.insertWith (++) r [i] m) Map.empty usMap- apply (ref,us) = mkRule ref (findOutField ref) us- findOutField ref = case [ chld | (chld, NT tp _ _) <- fields, tp `hasSyn` ref] of- [] -> _LHS- (x:_) -> x- hasSyn tp ref = Map.member ref $ snd $ Map.findWithDefault (Map.empty,Map.empty) tp allAttrDecls- mkRule ref outFld locAttrs- = let locs = filter (not . existsLoc) locAttrs- outAttr = attr outFld ref- defs = (if hasOut then [] else [outAttr]) ++ [attr _LOC u | u <- locs ]- pat = Product noPos defs- rhs = Expression noPos $ wrap ref $ foldr gencase (finalout hasOut locs) locs- -- [HsToken ("mkUniques" ++ show (length locAttrs) ++ " ") noPos, AGField _LHS ref noPos Nothing]- rul = Rule Nothing pat rhs False "-- generated by the unique rule mechanism." False True False Nothing False- hasOut = exists outAttr- exists (Alias fld a _) = (fld,a) `elem` attrDefs- exists _ = False- existsLoc nm = exists (attr _LOC nm)- in rul- attr fld a = Alias fld a (Underscore noPos)- gencase nm outp- = h ("case " ++ uniqueDispenser opts ++ " __cont of { (__cont, " ++ getName nm ++ ") -> ") ++ outp ++ h "}"- h s = [HsToken s noPos]- finalout noGenCont us = h ("(" ++ concat (intersperse "," ( (if noGenCont then [] else ["__cont"]) ++ map getName us)) ++ ")")- wrap ref inp = h "let __cont = " ++ [AGField _LHS ref noPos Nothing] ++ h " in seq __cont ( " ++ inp ++ h " )"-{-# LINE 313 "dist/build/Transform.hs" #-}--{-# LINE 747 "./src-ag/Transform.ag" #-}--flattenDatas :: DataTypes -> Map NontermIdent (Set NontermIdent)-flattenDatas ds = Map.map flatten ds- where flatten cs = Set.fromList [ nt | (_, NT nt _ _) <- concatMap snd (Map.toList cs)]--reachableFrom :: Map NontermIdent (Set NontermIdent) -> Set NontermIdent -> Set NontermIdent-reachableFrom table = reach- where reach nts = let nts' = Set.unions (nts : [ ns | nt <- Set.toList nts- , let ns = Map.findWithDefault Set.empty nt table ])- in if Set.size nts' > Set.size nts- then reach nts'- else nts-invert :: Map NontermIdent (Set NontermIdent) -> Map NontermIdent (Set NontermIdent)-invert = foldr inv Map.empty . Map.toList- where inv (x,ns) m = fold (\n m' -> Map.insertWith Set.union n (Set.singleton x) m') m ns--path :: Map NontermIdent (Set NontermIdent) -> NontermIdent -> NontermIdent -> Set NontermIdent-path table from to = let children = Map.findWithDefault Set.empty from table- forward = reachableFrom table children- backward = reachableFrom (invert table)- (Set.singleton to)- in Set.intersection forward backward-{-# LINE 338 "dist/build/Transform.hs" #-}--{-# LINE 873 "./src-ag/Transform.ag" #-}--extract :: String -> [String]-extract s = case dropWhile isSeparator s of- "" -> []- s' -> w : extract s''- where (w, s'') = break isSeparator s'-isSeparator :: Char -> Bool-isSeparator x = x == '_'-{-# LINE 349 "dist/build/Transform.hs" #-}--{-# LINE 899 "./src-ag/Transform.ag" #-}--pragmaMapUnion :: PragmaMap -> PragmaMap -> PragmaMap-pragmaMapUnion = Map.unionWith (Map.unionWith Set.union)--pragmaMapSingle :: NontermIdent -> ConstructorIdent -> Set Identifier -> PragmaMap-pragmaMapSingle nt con nms = Map.singleton nt (Map.singleton con nms)-{-# LINE 358 "dist/build/Transform.hs" #-}--{-# LINE 931 "./src-ag/Transform.ag" #-}--orderMapUnion :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap-orderMapUnion = Map.unionWith (Map.unionWith Set.union)--orderMapSingle :: NontermIdent -> ConstructorIdent -> Set Dependency -> AttrOrderMap-orderMapSingle nt con deps = Map.singleton nt (Map.singleton con deps)-{-# LINE 367 "dist/build/Transform.hs" #-}--{-# LINE 957 "./src-ag/Transform.ag" #-}--mergeParams :: ParamMap -> ParamMap -> ParamMap-mergeParams = Map.unionWith (++)-{-# LINE 373 "dist/build/Transform.hs" #-}--{-# LINE 980 "./src-ag/Transform.ag" #-}--mergeCtx :: ContextMap -> ContextMap -> ContextMap-mergeCtx- = Map.unionWith nubconcat- where nubconcat a b = nub (a ++ b)-{-# LINE 381 "dist/build/Transform.hs" #-}--{-# LINE 999 "./src-ag/Transform.ag" #-}--mergeQuant :: QuantMap -> QuantMap -> QuantMap-mergeQuant = Map.unionWith (++)-{-# LINE 387 "dist/build/Transform.hs" #-}--{-# LINE 1010 "./src-ag/Transform.ag" #-}--mergeDerivings :: Derivings -> Derivings -> Derivings-mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)-{-# LINE 393 "dist/build/Transform.hs" #-}--{-# LINE 1022 "./src-ag/Transform.ag" #-}--merge ::(Ord k, Ord k1) => Map k (Map k1 a) -> Map k (Map k1 a) -> Map k (Map k1 a)-merge x y = foldr f y (Map.toList x)- where f ~(k,v) m = Map.insertWith (Map.union) k v m-{-# LINE 400 "dist/build/Transform.hs" #-}--{-# LINE 1065 "./src-ag/Transform.ag" #-}--checkAttrs :: DataTypes -> [NontermIdent] -> [(Identifier, a)] -> [(Identifier, b)] -> Map NontermIdent (Map Identifier a, Map Identifier b) -> (Map NontermIdent (Map Identifier a, Map Identifier b), Seq Error)-checkAttrs allFields nts inherited synthesized decls' = foldErrors check decls' nts where- check nt decls | not (nt `Map.member` allFields) = (decls,Seq.singleton(UndefNont nt))- | otherwise = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt decls- (inh',einh) = checkDuplicates (DupInhAttr nt) inherited inh- (syn',esyn) = checkDuplicates (DupSynAttr nt) synthesized syn- in (Map.insert nt (inh',syn') decls,einh >< esyn)-{-# LINE 411 "dist/build/Transform.hs" #-}--{-# LINE 1077 "./src-ag/Transform.ag" #-}--addSelf :: Ord k1 => k1 -> Map k1 (Map k a, Attributes) -> Map k1 (Map k a, Attributes)-addSelf name atMap = let (eInh,eSyn) = Map.findWithDefault(Map.empty,Map.empty) name atMap- in Map.insert name (eInh, Map.insert (Ident "self" noPos) Self eSyn)atMap-{-# LINE 418 "dist/build/Transform.hs" #-}--{-# LINE 1215 "./src-ag/Transform.ag" #-}---- We want the last Just in the list-flipmplus = flip mplus-{-# LINE 424 "dist/build/Transform.hs" #-}--{-# LINE 1223 "./src-ag/Transform.ag" #-}--makeType :: Set NontermIdent -> Type -> Type-makeType nts tp@(NT x _ _) | Set.member x nts = tp- | otherwise = Haskell (typeToHaskellString Nothing [] tp)-makeType _ tp = tp-{-# LINE 432 "dist/build/Transform.hs" #-}--{-# LINE 1229 "./src-ag/Transform.ag" #-}--constructGrammar :: Set NontermIdent- -> ParamMap- -> Map NontermIdent (Map ConstructorIdent (Set Identifier))- -> DataTypes- -> Map NontermIdent [ConstructorIdent]- -> Map NontermIdent (Map ConstructorIdent [Type])- -> Map NontermIdent (Attributes, Attributes)- -> Map NontermIdent (Map Identifier (String, String, String))- -> Derivings- -> Set NontermIdent- -> Map NontermIdent (Map ConstructorIdent [Rule])- -> Map NontermIdent (Map ConstructorIdent [TypeSig])- -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)])- -> TypeSyns- -> PragmaMap- -> AttrOrderMap- -> 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)))- -> Map NontermIdent (Map ConstructorIdent MaybeMacro)- -> Grammar--constructGrammar _ ntParams prodParams gram prodOrder constraints attrs uses derivings wrap allrules tsigs allinsts tsyns pragmaMap orderMap contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap macros =- let gr = [ (nt,alts) | (nt,alts) <- Map.toList gram]- nonts = map nont gr- nont (nt,alts) = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt attrs- rmap = Map.findWithDefault Map.empty nt allrules- tsmap = Map.findWithDefault Map.empty nt tsigs- instsmap = Map.findWithDefault Map.empty nt allinsts- params = Map.findWithDefault [] nt ntParams- mergemap = Map.findWithDefault Map.empty nt mergeMap- macromap = Map.findWithDefault Map.empty nt macros- csmap = Map.findWithDefault Map.empty nt constraints- psmap = Map.findWithDefault Map.empty nt prodParams- prs = Map.findWithDefault [] nt prodOrder- alt con =- let flds = Map.findWithDefault [] con alts- rules = Map.findWithDefault [] con rmap- tsigs' = Map.findWithDefault [] con tsmap- insts = Map.findWithDefault [] con instsmap- merges = [ (n, NT t [] False) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]- cs = Map.findWithDefault [] con csmap- ps = Set.elems $ Map.findWithDefault Set.empty con psmap- mbMacro = Map.findWithDefault Nothing con macromap-- -- important: keep order of children- cldrn = map child (flds ++ filter (not . existsAsField) insts ++ merges)- child (nm, tp) =- let tpI = if existsAsInst nm- then fromJust $ lookup nm insts- else tp- virt = if existsAsInst nm- then case lookup nm flds of- Just tp' -> ChildReplace tp'- Nothing -> ChildAttr- else if existsAsMerge nm- then ChildAttr- else ChildSyntax- in Child nm tpI virt- existsAsInst nm = maybe False (const True) (lookup nm insts)- existsAsField (nm,_) = maybe False (const True) (lookup nm flds)- existsAsMerge nm = maybe False (const True) (lookup nm merges)- in Production con ps cs cldrn rules tsigs' mbMacro- in Nonterminal nt params inh syn (map alt prs)- in Grammar tsyns uses derivings wrap nonts pragmaMap orderMap ntParams contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap-{-# LINE 504 "dist/build/Transform.hs" #-}--{-# LINE 1300 "./src-ag/Transform.ag" #-}--mapUnionWithSetUnion :: Map NontermIdent (Set ConstructorIdent) -> Map NontermIdent (Set ConstructorIdent) -> Map NontermIdent (Set ConstructorIdent)-mapUnionWithSetUnion = Map.unionWith Set.union-mapUnionWithPlusPlus :: Map BlockInfo [a] -> Map BlockInfo [a] -> Map BlockInfo [a]-mapUnionWithPlusPlus = Map.unionWith (++)-{-# LINE 512 "dist/build/Transform.hs" #-}--- AG ------------------------------------------------------------- wrapper-data Inh_AG = Inh_AG { options_Inh_AG :: (Options) }-data Syn_AG = Syn_AG { agi_Syn_AG :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))), blocks_Syn_AG :: (Blocks), errors_Syn_AG :: (Seq Error), moduleDecl_Syn_AG :: (Maybe (String,String,String)), output_Syn_AG :: (Grammar), pragmas_Syn_AG :: (Options -> Options) }-{-# INLINABLE wrap_AG #-}-wrap_AG :: T_AG -> Inh_AG -> (Syn_AG )-wrap_AG (T_AG act) (Inh_AG _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_AG_vIn1 _lhsIoptions- (T_AG_vOut1 _lhsOagi _lhsOblocks _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas) <- return (inv_AG_s2 sem arg)- return (Syn_AG _lhsOagi _lhsOblocks _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas)- )---- cata-{-# INLINE sem_AG #-}-sem_AG :: AG -> T_AG -sem_AG ( AG elems_ ) = sem_AG_AG ( sem_Elems elems_ )---- semantic domain-newtype T_AG = T_AG {- attach_T_AG :: Identity (T_AG_s2 )- }-newtype T_AG_s2 = C_AG_s2 {- inv_AG_s2 :: (T_AG_v1 )- }-data T_AG_s3 = C_AG_s3-type T_AG_v1 = (T_AG_vIn1 ) -> (T_AG_vOut1 )-data T_AG_vIn1 = T_AG_vIn1 (Options)-data T_AG_vOut1 = T_AG_vOut1 ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))) (Blocks) (Seq Error) (Maybe (String,String,String)) (Grammar) (Options -> Options)-{-# NOINLINE sem_AG_AG #-}-sem_AG_AG :: T_Elems -> T_AG -sem_AG_AG arg_elems_ = T_AG (return st2) where- {-# NOINLINE st2 #-}- st2 = let- v1 :: T_AG_v1 - v1 = \ (T_AG_vIn1 _lhsIoptions) -> ( let- _elemsX20 = Control.Monad.Identity.runIdentity (attach_T_Elems (arg_elems_))- (T_Elems_vOut19 _elemsIattrDecls _elemsIattrOrderCollect _elemsIattrs _elemsIblocks _elemsIcollectedArounds _elemsIcollectedAugments _elemsIcollectedConParams _elemsIcollectedConstraints _elemsIcollectedConstructorsMap _elemsIcollectedFields _elemsIcollectedInsts _elemsIcollectedMacros _elemsIcollectedMerges _elemsIcollectedNames _elemsIcollectedRules _elemsIcollectedSetNames _elemsIcollectedSigs _elemsIcollectedUniques _elemsIctxCollect _elemsIdefSets _elemsIderivings _elemsIerrors _elemsImoduleDecl _elemsIparamsCollect _elemsIpragmas _elemsIquantCollect _elemsIsemPragmasCollect _elemsItypeSyns _elemsIuseMap _elemsIwrappers) = inv_Elems_s20 _elemsX20 (T_Elems_vIn19 _elemsOallAttrDecls _elemsOallAttrs _elemsOallConstructors _elemsOallFields _elemsOallNonterminals _elemsOattrDecls _elemsOattrs _elemsOdefSets _elemsOdefinedSets _elemsOoptions)- _lhsOoutput :: Grammar- _lhsOoutput = rule0 _allAttrDecls _allConParams _allConstraints _allFields _allMacros _allNonterminals _checkedArounds _checkedAugments _checkedInsts _checkedMerges _checkedRules _checkedSigs _checkedUniques _elemsIattrOrderCollect _elemsIctxCollect _elemsIderivings _elemsIparamsCollect _elemsIquantCollect _elemsIsemPragmasCollect _elemsItypeSyns _elemsIuseMap _elemsIwrappers _lhsIoptions _prodOrder- _prodOrder = rule1 _elemsIcollectedFields- _allFields = rule2 _elemsIcollectedFields- _allConstraints = rule3 _elemsIcollectedConstraints- _allConParams = rule4 _elemsIcollectedConParams- _allConstrs = rule5 _elemsIcollectedFields- _allRules = rule6 _elemsIcollectedRules- _allSigs = rule7 _allAttrDecls _elemsIcollectedSigs _elemsIcollectedUniques- _allInsts = rule8 _elemsIcollectedInsts- _allUniques = rule9 _elemsIcollectedUniques- _allAugments = rule10 _elemsIcollectedAugments- _allArounds = rule11 _elemsIcollectedArounds- _allMerges = rule12 _elemsIcollectedMerges- _augmentSigs = rule13 _allAugments- _allRulesErrs = rule14 _allAttrDecls _allFields _allInsts _allMerges _allRules _allSigs- _allNamesErrs = rule15 _allRules- _allSigsErrs = rule16 _allSigs- _allInstsErrs = rule17 _allFields _allInsts _allNonterminals _allSigs- _allUniquesErrs = rule18 _allAttrDecls _allUniques- _allAugmentErrs = rule19 _allAttrDecls _allAugments- _allAroundsErrs = rule20 _allArounds _allFields- _allMergesErrs = rule21 _allFields _allInsts _allMerges _allNonterminals- _checkedRulesPre = rule22 _allRulesErrs- _checkedSigs = rule23 _allSigsErrs _augmentSigs- _checkedInsts = rule24 _allInstsErrs- _checkedUniques = rule25 _allUniquesErrs- _checkedAugments = rule26 _allAugmentErrs- _checkedArounds = rule27 _allAroundsErrs- _checkedRules = rule28 _allAttrDecls _allFields _allRules _checkedInsts _checkedRulesPre _checkedUniques _lhsIoptions- _checkedMerges = rule29 _allMergesErrs- _errs1 = rule30 _elemsItypeSyns- _errs2 = rule31 _allFields- _errs3 = rule32 ()- _errs4 = rule33 _allRulesErrs- _errs5 = rule34 _allSigsErrs- _errs6 = rule35 _allInstsErrs- _errs7 = rule36 _allUniquesErrs- _errs8 = rule37 _allAugmentErrs- _errs9 = rule38 _allAroundsErrs- _errs10 = rule39 _allNamesErrs- _errs11 = rule40 _allMergesErrs- _lhsOerrors :: Seq Error- _lhsOerrors = rule41 _elemsIerrors _errs1 _errs10 _errs11 _errs2 _errs3 _errs4 _errs5 _errs6 _errs7 _errs8 _errs9- _allNonterminals = rule42 _elemsIcollectedNames _elemsIcollectedSetNames- _elemsOallConstructors = rule43 _elemsIcollectedConstructorsMap- _elemsOdefSets = rule44 _allNonterminals- _elemsOdefinedSets = rule45 _elemsIdefSets- _elemsOattrDecls = rule46 ()- _allAttrDecls = rule47 _allNonterminals _elemsIattrDecls _lhsIoptions- _allMacros = rule48 _elemsIcollectedMacros- _lhsOagi :: (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))- _lhsOagi = rule49 _allAttrs _allFields _allNonterminals- _allAttrs = rule50 _allNonterminals _elemsIattrs _lhsIoptions- _elemsOattrs = rule51 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule52 _elemsIblocks- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule53 _elemsImoduleDecl- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule54 _elemsIpragmas- _elemsOallAttrDecls = rule55 _allAttrDecls- _elemsOallAttrs = rule56 _allAttrs- _elemsOallFields = rule57 _allFields- _elemsOallNonterminals = rule58 _allNonterminals- _elemsOoptions = rule59 _lhsIoptions- __result_ = T_AG_vOut1 _lhsOagi _lhsOblocks _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas- in __result_ )- in C_AG_s2 v1- {-# INLINE rule0 #-}- {-# LINE 50 "./src-ag/Transform.ag" #-}- rule0 = \ _allAttrDecls _allConParams _allConstraints _allFields _allMacros _allNonterminals _checkedArounds _checkedAugments _checkedInsts _checkedMerges _checkedRules _checkedSigs _checkedUniques ((_elemsIattrOrderCollect) :: AttrOrderMap) ((_elemsIctxCollect) :: ContextMap) ((_elemsIderivings) :: Derivings) ((_elemsIparamsCollect) :: ParamMap) ((_elemsIquantCollect) :: QuantMap) ((_elemsIsemPragmasCollect) :: PragmaMap) ((_elemsItypeSyns) :: TypeSyns) ((_elemsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ((_elemsIwrappers) :: Set NontermIdent) ((_lhsIoptions) :: Options) _prodOrder ->- {-# LINE 50 "./src-ag/Transform.ag" #-}- constructGrammar _allNonterminals- _elemsIparamsCollect- _allConParams- _allFields- _prodOrder- _allConstraints- _allAttrDecls- _elemsIuseMap- _elemsIderivings- (if wrappers _lhsIoptions then _allNonterminals else _elemsIwrappers)- _checkedRules- _checkedSigs- _checkedInsts- _elemsItypeSyns- _elemsIsemPragmasCollect- _elemsIattrOrderCollect- _elemsIctxCollect- _elemsIquantCollect- _checkedUniques- _checkedAugments- _checkedArounds- _checkedMerges- _allMacros- {-# LINE 648 "dist/build/Transform.hs"#-}- {-# INLINE rule1 #-}- {-# LINE 258 "./src-ag/Transform.ag" #-}- rule1 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->- {-# LINE 258 "./src-ag/Transform.ag" #-}- let f (nt,con,_) = Map.insertWith g nt [con]- g [con] lst | con `elem` lst = lst- | otherwise = con : lst- g _ _ = error "This is not possible"- in foldr f Map.empty _elemsIcollectedFields- {-# LINE 658 "dist/build/Transform.hs"#-}- {-# INLINE rule2 #-}- {-# LINE 263 "./src-ag/Transform.ag" #-}- rule2 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->- {-# LINE 263 "./src-ag/Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedFields- {-# LINE 665 "dist/build/Transform.hs"#-}- {-# INLINE rule3 #-}- {-# LINE 266 "./src-ag/Transform.ag" #-}- rule3 = \ ((_elemsIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->- {-# LINE 266 "./src-ag/Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedConstraints- {-# LINE 672 "dist/build/Transform.hs"#-}- {-# INLINE rule4 #-}- {-# LINE 269 "./src-ag/Transform.ag" #-}- rule4 = \ ((_elemsIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->- {-# LINE 269 "./src-ag/Transform.ag" #-}- let f (nt,con,fm) = Map.insertWith (Map.unionWith Set.union) nt (Map.singleton con fm)- in foldr f (Map.empty) _elemsIcollectedConParams- {-# LINE 679 "dist/build/Transform.hs"#-}- {-# INLINE rule5 #-}- {-# LINE 272 "./src-ag/Transform.ag" #-}- rule5 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->- {-# LINE 272 "./src-ag/Transform.ag" #-}- let f (nt,con,_) = Map.insertWith (++) nt [con]- in foldr f (Map.empty) _elemsIcollectedFields- {-# LINE 686 "dist/build/Transform.hs"#-}- {-# INLINE rule6 #-}- {-# LINE 275 "./src-ag/Transform.ag" #-}- rule6 = \ ((_elemsIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->- {-# LINE 275 "./src-ag/Transform.ag" #-}- let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])- in foldr f (Map.empty) _elemsIcollectedRules- {-# LINE 693 "dist/build/Transform.hs"#-}- {-# INLINE rule7 #-}- {-# LINE 278 "./src-ag/Transform.ag" #-}- rule7 = \ _allAttrDecls ((_elemsIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_elemsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->- {-# LINE 278 "./src-ag/Transform.ag" #-}- let f (nt,con,t) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [t])- typeof nt r = Map.findWithDefault (Haskell "<unknown>") r $ fst $ Map.findWithDefault (Map.empty,Map.empty) nt _allAttrDecls- in foldr f (Map.empty) ( _elemsIcollectedSigs- ++ [ (nt, con, (ident,typeof nt ref)) | (nt, con, us) <- _elemsIcollectedUniques, (ident,ref) <- us ]- )- {-# LINE 703 "dist/build/Transform.hs"#-}- {-# INLINE rule8 #-}- {-# LINE 284 "./src-ag/Transform.ag" #-}- rule8 = \ ((_elemsIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->- {-# LINE 284 "./src-ag/Transform.ag" #-}- let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)- in foldr f (Map.empty) _elemsIcollectedInsts- {-# LINE 710 "dist/build/Transform.hs"#-}- {-# INLINE rule9 #-}- {-# LINE 287 "./src-ag/Transform.ag" #-}- rule9 = \ ((_elemsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->- {-# LINE 287 "./src-ag/Transform.ag" #-}- let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)- in foldr f (Map.empty) _elemsIcollectedUniques- {-# LINE 717 "dist/build/Transform.hs"#-}- {-# INLINE rule10 #-}- {-# LINE 289 "./src-ag/Transform.ag" #-}- rule10 = \ ((_elemsIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->- {-# LINE 289 "./src-ag/Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedAugments- {-# LINE 724 "dist/build/Transform.hs"#-}- {-# INLINE rule11 #-}- {-# LINE 291 "./src-ag/Transform.ag" #-}- rule11 = \ ((_elemsIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->- {-# LINE 291 "./src-ag/Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedArounds- {-# LINE 731 "dist/build/Transform.hs"#-}- {-# INLINE rule12 #-}- {-# LINE 293 "./src-ag/Transform.ag" #-}- rule12 = \ ((_elemsIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->- {-# LINE 293 "./src-ag/Transform.ag" #-}- let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)- in foldr f Map.empty _elemsIcollectedMerges- {-# LINE 738 "dist/build/Transform.hs"#-}- {-# INLINE rule13 #-}- {-# LINE 296 "./src-ag/Transform.ag" #-}- rule13 = \ _allAugments ->- {-# LINE 296 "./src-ag/Transform.ag" #-}- let gen _ = []- in Map.map (Map.map gen) _allAugments- {-# LINE 745 "dist/build/Transform.hs"#-}- {-# INLINE rule14 #-}- {-# LINE 299 "./src-ag/Transform.ag" #-}- rule14 = \ _allAttrDecls _allFields _allInsts _allMerges _allRules _allSigs ->- {-# LINE 299 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs _allMerges )) _allRules- {-# LINE 751 "dist/build/Transform.hs"#-}- {-# INLINE rule15 #-}- {-# LINE 300 "./src-ag/Transform.ag" #-}- rule15 = \ _allRules ->- {-# LINE 300 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules- {-# LINE 757 "dist/build/Transform.hs"#-}- {-# INLINE rule16 #-}- {-# LINE 301 "./src-ag/Transform.ag" #-}- rule16 = \ _allSigs ->- {-# LINE 301 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs- {-# LINE 763 "dist/build/Transform.hs"#-}- {-# INLINE rule17 #-}- {-# LINE 302 "./src-ag/Transform.ag" #-}- rule17 = \ _allFields _allInsts _allNonterminals _allSigs ->- {-# LINE 302 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts- {-# LINE 769 "dist/build/Transform.hs"#-}- {-# INLINE rule18 #-}- {-# LINE 303 "./src-ag/Transform.ag" #-}- rule18 = \ _allAttrDecls _allUniques ->- {-# LINE 303 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques- {-# LINE 775 "dist/build/Transform.hs"#-}- {-# INLINE rule19 #-}- {-# LINE 304 "./src-ag/Transform.ag" #-}- rule19 = \ _allAttrDecls _allAugments ->- {-# LINE 304 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments- {-# LINE 781 "dist/build/Transform.hs"#-}- {-# INLINE rule20 #-}- {-# LINE 305 "./src-ag/Transform.ag" #-}- rule20 = \ _allArounds _allFields ->- {-# LINE 305 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds- {-# LINE 787 "dist/build/Transform.hs"#-}- {-# INLINE rule21 #-}- {-# LINE 306 "./src-ag/Transform.ag" #-}- rule21 = \ _allFields _allInsts _allMerges _allNonterminals ->- {-# LINE 306 "./src-ag/Transform.ag" #-}- Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals _allInsts _allFields )) _allMerges- {-# LINE 793 "dist/build/Transform.hs"#-}- {-# INLINE rule22 #-}- {-# LINE 308 "./src-ag/Transform.ag" #-}- rule22 = \ _allRulesErrs ->- {-# LINE 308 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allRulesErrs- {-# LINE 799 "dist/build/Transform.hs"#-}- {-# INLINE rule23 #-}- {-# LINE 309 "./src-ag/Transform.ag" #-}- rule23 = \ _allSigsErrs _augmentSigs ->- {-# LINE 309 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs- {-# LINE 805 "dist/build/Transform.hs"#-}- {-# INLINE rule24 #-}- {-# LINE 310 "./src-ag/Transform.ag" #-}- rule24 = \ _allInstsErrs ->- {-# LINE 310 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allInstsErrs- {-# LINE 811 "dist/build/Transform.hs"#-}- {-# INLINE rule25 #-}- {-# LINE 311 "./src-ag/Transform.ag" #-}- rule25 = \ _allUniquesErrs ->- {-# LINE 311 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allUniquesErrs- {-# LINE 817 "dist/build/Transform.hs"#-}- {-# INLINE rule26 #-}- {-# LINE 312 "./src-ag/Transform.ag" #-}- rule26 = \ _allAugmentErrs ->- {-# LINE 312 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allAugmentErrs- {-# LINE 823 "dist/build/Transform.hs"#-}- {-# INLINE rule27 #-}- {-# LINE 313 "./src-ag/Transform.ag" #-}- rule27 = \ _allAroundsErrs ->- {-# LINE 313 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allAroundsErrs- {-# LINE 829 "dist/build/Transform.hs"#-}- {-# INLINE rule28 #-}- {-# LINE 314 "./src-ag/Transform.ag" #-}- rule28 = \ _allAttrDecls _allFields _allRules _checkedInsts _checkedRulesPre _checkedUniques ((_lhsIoptions) :: Options) ->- {-# LINE 314 "./src-ag/Transform.ag" #-}- Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allRules _allFields _checkedInsts _allAttrDecls )) _checkedUniques )- {-# LINE 835 "dist/build/Transform.hs"#-}- {-# INLINE rule29 #-}- {-# LINE 315 "./src-ag/Transform.ag" #-}- rule29 = \ _allMergesErrs ->- {-# LINE 315 "./src-ag/Transform.ag" #-}- Map.map (Map.map fst) _allMergesErrs- {-# LINE 841 "dist/build/Transform.hs"#-}- {-# INLINE rule30 #-}- {-# LINE 317 "./src-ag/Transform.ag" #-}- rule30 = \ ((_elemsItypeSyns) :: TypeSyns) ->- {-# LINE 317 "./src-ag/Transform.ag" #-}- let f = checkForDuplicates (DupSynonym)- in Seq.fromList . f . map fst $ _elemsItypeSyns- {-# LINE 848 "dist/build/Transform.hs"#-}- {-# INLINE rule31 #-}- {-# LINE 320 "./src-ag/Transform.ag" #-}- rule31 = \ _allFields ->- {-# LINE 320 "./src-ag/Transform.ag" #-}- let g nt (con,fm) = checkForDuplicates (DupChild nt con) (map fst fm)- f (nt,cfm) = concat . map (g nt) . Map.toList $ cfm- in Seq.fromList . concat . map f . Map.toList $ _allFields- {-# LINE 856 "dist/build/Transform.hs"#-}- {-# INLINE rule32 #-}- {-# LINE 324 "./src-ag/Transform.ag" #-}- rule32 = \ (_ :: ()) ->- {-# LINE 324 "./src-ag/Transform.ag" #-}- let- in Seq.empty- {-# LINE 863 "dist/build/Transform.hs"#-}- {-# INLINE rule33 #-}- {-# LINE 328 "./src-ag/Transform.ag" #-}- rule33 = \ _allRulesErrs ->- {-# LINE 328 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allRulesErrs- {-# LINE 870 "dist/build/Transform.hs"#-}- {-# INLINE rule34 #-}- {-# LINE 331 "./src-ag/Transform.ag" #-}- rule34 = \ _allSigsErrs ->- {-# LINE 331 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allSigsErrs- {-# LINE 877 "dist/build/Transform.hs"#-}- {-# INLINE rule35 #-}- {-# LINE 334 "./src-ag/Transform.ag" #-}- rule35 = \ _allInstsErrs ->- {-# LINE 334 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allInstsErrs- {-# LINE 884 "dist/build/Transform.hs"#-}- {-# INLINE rule36 #-}- {-# LINE 337 "./src-ag/Transform.ag" #-}- rule36 = \ _allUniquesErrs ->- {-# LINE 337 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allUniquesErrs- {-# LINE 891 "dist/build/Transform.hs"#-}- {-# INLINE rule37 #-}- {-# LINE 340 "./src-ag/Transform.ag" #-}- rule37 = \ _allAugmentErrs ->- {-# LINE 340 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAugmentErrs- {-# LINE 898 "dist/build/Transform.hs"#-}- {-# INLINE rule38 #-}- {-# LINE 343 "./src-ag/Transform.ag" #-}- rule38 = \ _allAroundsErrs ->- {-# LINE 343 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allAroundsErrs- {-# LINE 905 "dist/build/Transform.hs"#-}- {-# INLINE rule39 #-}- {-# LINE 346 "./src-ag/Transform.ag" #-}- rule39 = \ _allNamesErrs ->- {-# LINE 346 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><)) s m- in Map.fold f Seq.empty _allNamesErrs- {-# LINE 912 "dist/build/Transform.hs"#-}- {-# INLINE rule40 #-}- {-# LINE 349 "./src-ag/Transform.ag" #-}- rule40 = \ _allMergesErrs ->- {-# LINE 349 "./src-ag/Transform.ag" #-}- let f m s = Map.fold ((><) . snd) s m- in Map.fold f Seq.empty _allMergesErrs- {-# LINE 919 "dist/build/Transform.hs"#-}- {-# INLINE rule41 #-}- {-# LINE 352 "./src-ag/Transform.ag" #-}- rule41 = \ ((_elemsIerrors) :: Seq Error) _errs1 _errs10 _errs11 _errs2 _errs3 _errs4 _errs5 _errs6 _errs7 _errs8 _errs9 ->- {-# LINE 352 "./src-ag/Transform.ag" #-}- _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11- {-# LINE 925 "dist/build/Transform.hs"#-}- {-# INLINE rule42 #-}- {-# LINE 606 "./src-ag/Transform.ag" #-}- rule42 = \ ((_elemsIcollectedNames) :: Set Identifier) ((_elemsIcollectedSetNames) :: Set Identifier) ->- {-# LINE 606 "./src-ag/Transform.ag" #-}- _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames- {-# LINE 931 "dist/build/Transform.hs"#-}- {-# INLINE rule43 #-}- {-# LINE 626 "./src-ag/Transform.ag" #-}- rule43 = \ ((_elemsIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ->- {-# LINE 626 "./src-ag/Transform.ag" #-}- _elemsIcollectedConstructorsMap- {-# LINE 937 "dist/build/Transform.hs"#-}- {-# INLINE rule44 #-}- {-# LINE 709 "./src-ag/Transform.ag" #-}- rule44 = \ _allNonterminals ->- {-# LINE 709 "./src-ag/Transform.ag" #-}- Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))- {-# LINE 943 "dist/build/Transform.hs"#-}- {-# INLINE rule45 #-}- {-# LINE 710 "./src-ag/Transform.ag" #-}- rule45 = \ ((_elemsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- {-# LINE 710 "./src-ag/Transform.ag" #-}- Map.map fst _elemsIdefSets- {-# LINE 949 "dist/build/Transform.hs"#-}- {-# INLINE rule46 #-}- {-# LINE 1029 "./src-ag/Transform.ag" #-}- rule46 = \ (_ :: ()) ->- {-# LINE 1029 "./src-ag/Transform.ag" #-}- Map.empty- {-# LINE 955 "dist/build/Transform.hs"#-}- {-# INLINE rule47 #-}- {-# LINE 1085 "./src-ag/Transform.ag" #-}- rule47 = \ _allNonterminals ((_elemsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ((_lhsIoptions) :: Options) ->- {-# LINE 1085 "./src-ag/Transform.ag" #-}- if withSelf _lhsIoptions- then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )- else _elemsIattrDecls- {-# LINE 963 "dist/build/Transform.hs"#-}- {-# INLINE rule48 #-}- {-# LINE 1327 "./src-ag/Transform.ag" #-}- rule48 = \ ((_elemsIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->- {-# LINE 1327 "./src-ag/Transform.ag" #-}- let f (nt,con,m) = Map.insertWith (Map.union) nt (Map.singleton con m)- in foldr f (Map.empty) _elemsIcollectedMacros- {-# LINE 970 "dist/build/Transform.hs"#-}- {-# INLINE rule49 #-}- {-# LINE 1340 "./src-ag/Transform.ag" #-}- rule49 = \ _allAttrs _allFields _allNonterminals ->- {-# LINE 1340 "./src-ag/Transform.ag" #-}- (_allNonterminals ,_allFields ,_allAttrs )- {-# LINE 976 "dist/build/Transform.hs"#-}- {-# INLINE rule50 #-}- {-# LINE 1342 "./src-ag/Transform.ag" #-}- rule50 = \ _allNonterminals ((_elemsIattrs) :: Map NontermIdent (Attributes, Attributes)) ((_lhsIoptions) :: Options) ->- {-# LINE 1342 "./src-ag/Transform.ag" #-}- if withSelf _lhsIoptions- then foldr addSelf _elemsIattrs (Set.toList _allNonterminals )- else _elemsIattrs- {-# LINE 984 "dist/build/Transform.hs"#-}- {-# INLINE rule51 #-}- {-# LINE 1350 "./src-ag/Transform.ag" #-}- rule51 = \ (_ :: ()) ->- {-# LINE 1350 "./src-ag/Transform.ag" #-}- Map.empty- {-# LINE 990 "dist/build/Transform.hs"#-}- {-# INLINE rule52 #-}- rule52 = \ ((_elemsIblocks) :: Blocks) ->- _elemsIblocks- {-# INLINE rule53 #-}- rule53 = \ ((_elemsImoduleDecl) :: Maybe (String,String,String)) ->- _elemsImoduleDecl- {-# INLINE rule54 #-}- rule54 = \ ((_elemsIpragmas) :: Options -> Options) ->- _elemsIpragmas- {-# INLINE rule55 #-}- rule55 = \ _allAttrDecls ->- _allAttrDecls- {-# INLINE rule56 #-}- rule56 = \ _allAttrs ->- _allAttrs- {-# INLINE rule57 #-}- rule57 = \ _allFields ->- _allFields- {-# INLINE rule58 #-}- rule58 = \ _allNonterminals ->- _allNonterminals- {-# INLINE rule59 #-}- rule59 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions---- Alt ------------------------------------------------------------ wrapper-data Inh_Alt = Inh_Alt { allConstructors_Inh_Alt :: (Map NontermIdent (Set ConstructorIdent)), allNonterminals_Inh_Alt :: (Set NontermIdent), nts_Inh_Alt :: (Set NontermIdent) }-data Syn_Alt = Syn_Alt { collectedConParams_Syn_Alt :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Alt :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorNames_Syn_Alt :: (Set ConstructorIdent), collectedFields_Syn_Alt :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedMacros_Syn_Alt :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]) }-{-# INLINABLE wrap_Alt #-}-wrap_Alt :: T_Alt -> Inh_Alt -> (Syn_Alt )-wrap_Alt (T_Alt act) (Inh_Alt _lhsIallConstructors _lhsIallNonterminals _lhsInts) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Alt_vIn4 _lhsIallConstructors _lhsIallNonterminals _lhsInts- (T_Alt_vOut4 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros) <- return (inv_Alt_s5 sem arg)- return (Syn_Alt _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros)- )---- cata-{-# INLINE sem_Alt #-}-sem_Alt :: Alt -> T_Alt -sem_Alt ( Alt pos_ names_ tyvars_ fields_ macro_ ) = sem_Alt_Alt pos_ ( sem_ConstructorSet names_ ) tyvars_ ( sem_Fields fields_ ) macro_---- semantic domain-newtype T_Alt = T_Alt {- attach_T_Alt :: Identity (T_Alt_s5 )- }-newtype T_Alt_s5 = C_Alt_s5 {- inv_Alt_s5 :: (T_Alt_v4 )- }-data T_Alt_s6 = C_Alt_s6-type T_Alt_v4 = (T_Alt_vIn4 ) -> (T_Alt_vOut4 )-data T_Alt_vIn4 = T_Alt_vIn4 (Map NontermIdent (Set ConstructorIdent)) (Set NontermIdent) (Set NontermIdent)-data T_Alt_vOut4 = T_Alt_vOut4 ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Set ConstructorIdent) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([(NontermIdent, ConstructorIdent, MaybeMacro)])-{-# NOINLINE sem_Alt_Alt #-}-sem_Alt_Alt :: (Pos) -> T_ConstructorSet -> ([Identifier]) -> T_Fields -> (MaybeMacro) -> T_Alt -sem_Alt_Alt _ arg_names_ arg_tyvars_ arg_fields_ arg_macro_ = T_Alt (return st5) where- {-# NOINLINE st5 #-}- st5 = let- v4 :: T_Alt_v4 - v4 = \ (T_Alt_vIn4 _lhsIallConstructors _lhsIallNonterminals _lhsInts) -> ( let- _namesX14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_names_))- _fieldsX26 = Control.Monad.Identity.runIdentity (attach_T_Fields (arg_fields_))- (T_ConstructorSet_vOut13 _namesIcollectedConstructorNames _namesIconstructors _namesIerrors) = inv_ConstructorSet_s14 _namesX14 (T_ConstructorSet_vIn13 )- (T_Fields_vOut25 _fieldsIcollectedConstraints _fieldsIcollectedFields) = inv_Fields_s26 _fieldsX26 (T_Fields_vIn25 _fieldsOallNonterminals)- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule60 _fieldsIcollectedFields _lhsIallConstructors _lhsInts _namesIconstructors- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule61 _fieldsIcollectedConstraints _lhsIallConstructors _lhsInts _namesIconstructors- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule62 _lhsIallConstructors _lhsInts _namesIconstructors arg_tyvars_- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule63 _lhsIallConstructors _lhsInts _namesIconstructors arg_macro_- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule64 _namesIcollectedConstructorNames- _fieldsOallNonterminals = rule65 _lhsIallNonterminals- __result_ = T_Alt_vOut4 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros- in __result_ )- in C_Alt_s5 v4- {-# INLINE rule60 #-}- {-# LINE 240 "./src-ag/Transform.ag" #-}- rule60 = \ ((_fieldsIcollectedFields) :: [(Identifier, Type)]) ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->- {-# LINE 240 "./src-ag/Transform.ag" #-}- [ (nt, con, _fieldsIcollectedFields)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1079 "dist/build/Transform.hs"#-}- {-# INLINE rule61 #-}- {-# LINE 244 "./src-ag/Transform.ag" #-}- rule61 = \ ((_fieldsIcollectedConstraints) :: [Type]) ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->- {-# LINE 244 "./src-ag/Transform.ag" #-}- [ (nt, con, _fieldsIcollectedConstraints)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1088 "dist/build/Transform.hs"#-}- {-# INLINE rule62 #-}- {-# LINE 248 "./src-ag/Transform.ag" #-}- rule62 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) tyvars_ ->- {-# LINE 248 "./src-ag/Transform.ag" #-}- [ (nt, con, Set.fromList tyvars_)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1097 "dist/build/Transform.hs"#-}- {-# INLINE rule63 #-}- {-# LINE 1318 "./src-ag/Transform.ag" #-}- rule63 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) macro_ ->- {-# LINE 1318 "./src-ag/Transform.ag" #-}- [ (nt, con, macro_)- | nt <- Set.toList _lhsInts- , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))- ]- {-# LINE 1106 "dist/build/Transform.hs"#-}- {-# INLINE rule64 #-}- rule64 = \ ((_namesIcollectedConstructorNames) :: Set ConstructorIdent) ->- _namesIcollectedConstructorNames- {-# INLINE rule65 #-}- rule65 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals---- Alts ----------------------------------------------------------- wrapper-data Inh_Alts = Inh_Alts { allConstructors_Inh_Alts :: (Map NontermIdent (Set ConstructorIdent)), allNonterminals_Inh_Alts :: (Set NontermIdent), nts_Inh_Alts :: (Set NontermIdent) }-data Syn_Alts = Syn_Alts { collectedConParams_Syn_Alts :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Alts :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorNames_Syn_Alts :: (Set ConstructorIdent), collectedFields_Syn_Alts :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedMacros_Syn_Alts :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]) }-{-# INLINABLE wrap_Alts #-}-wrap_Alts :: T_Alts -> Inh_Alts -> (Syn_Alts )-wrap_Alts (T_Alts act) (Inh_Alts _lhsIallConstructors _lhsIallNonterminals _lhsInts) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Alts_vIn7 _lhsIallConstructors _lhsIallNonterminals _lhsInts- (T_Alts_vOut7 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros) <- return (inv_Alts_s8 sem arg)- return (Syn_Alts _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros)- )---- cata-{-# NOINLINE sem_Alts #-}-sem_Alts :: Alts -> T_Alts -sem_Alts list = Prelude.foldr sem_Alts_Cons sem_Alts_Nil (Prelude.map sem_Alt list)---- semantic domain-newtype T_Alts = T_Alts {- attach_T_Alts :: Identity (T_Alts_s8 )- }-newtype T_Alts_s8 = C_Alts_s8 {- inv_Alts_s8 :: (T_Alts_v7 )- }-data T_Alts_s9 = C_Alts_s9-type T_Alts_v7 = (T_Alts_vIn7 ) -> (T_Alts_vOut7 )-data T_Alts_vIn7 = T_Alts_vIn7 (Map NontermIdent (Set ConstructorIdent)) (Set NontermIdent) (Set NontermIdent)-data T_Alts_vOut7 = T_Alts_vOut7 ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Set ConstructorIdent) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([(NontermIdent, ConstructorIdent, MaybeMacro)])-{-# NOINLINE sem_Alts_Cons #-}-sem_Alts_Cons :: T_Alt -> T_Alts -> T_Alts -sem_Alts_Cons arg_hd_ arg_tl_ = T_Alts (return st8) where- {-# NOINLINE st8 #-}- st8 = let- v7 :: T_Alts_v7 - v7 = \ (T_Alts_vIn7 _lhsIallConstructors _lhsIallNonterminals _lhsInts) -> ( let- _hdX5 = Control.Monad.Identity.runIdentity (attach_T_Alt (arg_hd_))- _tlX8 = Control.Monad.Identity.runIdentity (attach_T_Alts (arg_tl_))- (T_Alt_vOut4 _hdIcollectedConParams _hdIcollectedConstraints _hdIcollectedConstructorNames _hdIcollectedFields _hdIcollectedMacros) = inv_Alt_s5 _hdX5 (T_Alt_vIn4 _hdOallConstructors _hdOallNonterminals _hdOnts)- (T_Alts_vOut7 _tlIcollectedConParams _tlIcollectedConstraints _tlIcollectedConstructorNames _tlIcollectedFields _tlIcollectedMacros) = inv_Alts_s8 _tlX8 (T_Alts_vIn7 _tlOallConstructors _tlOallNonterminals _tlOnts)- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule66 _hdIcollectedConParams _tlIcollectedConParams- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule67 _hdIcollectedConstraints _tlIcollectedConstraints- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule68 _hdIcollectedConstructorNames _tlIcollectedConstructorNames- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule69 _hdIcollectedFields _tlIcollectedFields- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule70 _hdIcollectedMacros _tlIcollectedMacros- _hdOallConstructors = rule71 _lhsIallConstructors- _hdOallNonterminals = rule72 _lhsIallNonterminals- _hdOnts = rule73 _lhsInts- _tlOallConstructors = rule74 _lhsIallConstructors- _tlOallNonterminals = rule75 _lhsIallNonterminals- _tlOnts = rule76 _lhsInts- __result_ = T_Alts_vOut7 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros- in __result_ )- in C_Alts_s8 v7- {-# INLINE rule66 #-}- rule66 = \ ((_hdIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ((_tlIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->- _hdIcollectedConParams ++ _tlIcollectedConParams- {-# INLINE rule67 #-}- rule67 = \ ((_hdIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ((_tlIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->- _hdIcollectedConstraints ++ _tlIcollectedConstraints- {-# INLINE rule68 #-}- rule68 = \ ((_hdIcollectedConstructorNames) :: Set ConstructorIdent) ((_tlIcollectedConstructorNames) :: Set ConstructorIdent) ->- _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames- {-# INLINE rule69 #-}- rule69 = \ ((_hdIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ((_tlIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->- _hdIcollectedFields ++ _tlIcollectedFields- {-# INLINE rule70 #-}- rule70 = \ ((_hdIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ((_tlIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->- _hdIcollectedMacros ++ _tlIcollectedMacros- {-# INLINE rule71 #-}- rule71 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->- _lhsIallConstructors- {-# INLINE rule72 #-}- rule72 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule73 #-}- rule73 = \ ((_lhsInts) :: Set NontermIdent) ->- _lhsInts- {-# INLINE rule74 #-}- rule74 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->- _lhsIallConstructors- {-# INLINE rule75 #-}- rule75 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule76 #-}- rule76 = \ ((_lhsInts) :: Set NontermIdent) ->- _lhsInts-{-# NOINLINE sem_Alts_Nil #-}-sem_Alts_Nil :: T_Alts -sem_Alts_Nil = T_Alts (return st8) where- {-# NOINLINE st8 #-}- st8 = let- v7 :: T_Alts_v7 - v7 = \ (T_Alts_vIn7 _lhsIallConstructors _lhsIallNonterminals _lhsInts) -> ( let- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule77 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule78 ()- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule79 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule80 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule81 ()- __result_ = T_Alts_vOut7 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros- in __result_ )- in C_Alts_s8 v7- {-# INLINE rule77 #-}- rule77 = \ (_ :: ()) ->- []- {-# INLINE rule78 #-}- rule78 = \ (_ :: ()) ->- []- {-# INLINE rule79 #-}- rule79 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule80 #-}- rule80 = \ (_ :: ()) ->- []- {-# INLINE rule81 #-}- rule81 = \ (_ :: ()) ->- []---- Attrs ---------------------------------------------------------- wrapper-data Inh_Attrs = Inh_Attrs { allFields_Inh_Attrs :: (DataTypes), allNonterminals_Inh_Attrs :: (Set NontermIdent), attrDecls_Inh_Attrs :: (Map NontermIdent (Attributes, Attributes)), attrs_Inh_Attrs :: (Map NontermIdent (Attributes, Attributes)), nts_Inh_Attrs :: (Set NontermIdent), options_Inh_Attrs :: (Options) }-data Syn_Attrs = Syn_Attrs { attrDecls_Syn_Attrs :: (Map NontermIdent (Attributes, Attributes)), attrs_Syn_Attrs :: (Map NontermIdent (Attributes, Attributes)), errors_Syn_Attrs :: (Seq Error), useMap_Syn_Attrs :: (Map NontermIdent (Map Identifier (String,String,String))) }-{-# INLINABLE wrap_Attrs #-}-wrap_Attrs :: T_Attrs -> Inh_Attrs -> (Syn_Attrs )-wrap_Attrs (T_Attrs act) (Inh_Attrs _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Attrs_vIn10 _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions- (T_Attrs_vOut10 _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap) <- return (inv_Attrs_s11 sem arg)- return (Syn_Attrs _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap)- )---- cata-{-# INLINE sem_Attrs #-}-sem_Attrs :: Attrs -> T_Attrs -sem_Attrs ( Attrs pos_ inh_ chn_ syn_ ) = sem_Attrs_Attrs pos_ inh_ chn_ syn_---- semantic domain-newtype T_Attrs = T_Attrs {- attach_T_Attrs :: Identity (T_Attrs_s11 )- }-newtype T_Attrs_s11 = C_Attrs_s11 {- inv_Attrs_s11 :: (T_Attrs_v10 )- }-data T_Attrs_s12 = C_Attrs_s12-type T_Attrs_v10 = (T_Attrs_vIn10 ) -> (T_Attrs_vOut10 )-data T_Attrs_vIn10 = T_Attrs_vIn10 (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Set NontermIdent) (Options)-data T_Attrs_vOut10 = T_Attrs_vOut10 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Seq Error) (Map NontermIdent (Map Identifier (String,String,String)))-{-# NOINLINE sem_Attrs_Attrs #-}-sem_Attrs_Attrs :: (Pos) -> (AttrNames) -> (AttrNames) -> (AttrNames) -> T_Attrs -sem_Attrs_Attrs _ arg_inh_ arg_chn_ arg_syn_ = T_Attrs (return st11) where- {-# NOINLINE st11 #-}- st11 = let- v10 :: T_Attrs_v10 - v10 = \ (T_Attrs_vIn10 _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions) -> ( let- (_attrDecls,_errors) = rule82 _inherited _lhsIallFields _lhsIattrDecls _lhsInts _synthesized- (_inherited,_synthesized,_useMap) = rule83 _lhsIallNonterminals arg_chn_ arg_inh_ arg_syn_- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule84 _lhsInts _useMap- _errors1 = rule85 _lhsIoptions arg_chn_ arg_inh_ arg_syn_- _lhsOerrors :: Seq Error- _lhsOerrors = rule86 _errors _errors1- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule87 _inherited _lhsIattrs _lhsInts _synthesized- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule88 _attrDecls- __result_ = T_Attrs_vOut10 _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap- in __result_ )- in C_Attrs_s11 v10- {-# INLINE rule82 #-}- {-# LINE 1038 "./src-ag/Transform.ag" #-}- rule82 = \ _inherited ((_lhsIallFields) :: DataTypes) ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ((_lhsInts) :: Set NontermIdent) _synthesized ->- {-# LINE 1038 "./src-ag/Transform.ag" #-}- checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls- {-# LINE 1299 "dist/build/Transform.hs"#-}- {-# INLINE rule83 #-}- {-# LINE 1040 "./src-ag/Transform.ag" #-}- rule83 = \ ((_lhsIallNonterminals) :: Set NontermIdent) chn_ inh_ syn_ ->- {-# LINE 1040 "./src-ag/Transform.ag" #-}- let splitAttrs xs = unzip [ ((n,makeType _lhsIallNonterminals t),(n,ud))- | (n,t,ud) <- xs- ]- (inh,_) = splitAttrs inh_- (chn,uses1) = splitAttrs chn_- (syn,uses2) = splitAttrs syn_- isUse (_,(e1,e2,_)) = not (null e1 || null e2)- in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))- {-# LINE 1312 "dist/build/Transform.hs"#-}- {-# INLINE rule84 #-}- {-# LINE 1048 "./src-ag/Transform.ag" #-}- rule84 = \ ((_lhsInts) :: Set NontermIdent) _useMap ->- {-# LINE 1048 "./src-ag/Transform.ag" #-}- Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))- {-# LINE 1318 "dist/build/Transform.hs"#-}- {-# INLINE rule85 #-}- {-# LINE 1050 "./src-ag/Transform.ag" #-}- rule85 = \ ((_lhsIoptions) :: Options) chn_ inh_ syn_ ->- {-# LINE 1050 "./src-ag/Transform.ag" #-}- if checkParseTy _lhsIoptions- then let attrs = inh_ ++ syn_ ++ chn_- items = map (\(ident,tp,_) -> (getPos ident, tp)) attrs- errs = map check items- check (pos,Haskell s) =- let ex = Expression pos tks- tks = [tk]- tk = HsToken s pos- in Seq.fromList $ checkTy ex- check _ = Seq.empty- in foldr (Seq.><) Seq.empty errs- else Seq.empty- {-# LINE 1335 "dist/build/Transform.hs"#-}- {-# INLINE rule86 #-}- {-# LINE 1062 "./src-ag/Transform.ag" #-}- rule86 = \ _errors _errors1 ->- {-# LINE 1062 "./src-ag/Transform.ag" #-}- _errors Seq.>< _errors1- {-# LINE 1341 "dist/build/Transform.hs"#-}- {-# INLINE rule87 #-}- {-# LINE 1354 "./src-ag/Transform.ag" #-}- rule87 = \ _inherited ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ((_lhsInts) :: Set NontermIdent) _synthesized ->- {-# LINE 1354 "./src-ag/Transform.ag" #-}- let ins decls nt = if Map.member nt decls- then Map.update (\(inh,syn) -> Just ( Map.union inh $ Map.fromList _inherited- , Map.union syn $ Map.fromList _synthesized)) nt decls- else Map.insert nt (Map.fromList _inherited, Map.fromList _synthesized) decls- in foldl ins _lhsIattrs (Set.toList _lhsInts)- {-# LINE 1351 "dist/build/Transform.hs"#-}- {-# INLINE rule88 #-}- rule88 = \ _attrDecls ->- _attrDecls---- ConstructorSet ------------------------------------------------- wrapper-data Inh_ConstructorSet = Inh_ConstructorSet { }-data Syn_ConstructorSet = Syn_ConstructorSet { collectedConstructorNames_Syn_ConstructorSet :: (Set ConstructorIdent), constructors_Syn_ConstructorSet :: ((Set ConstructorIdent->Set ConstructorIdent)), errors_Syn_ConstructorSet :: (Seq Error) }-{-# INLINABLE wrap_ConstructorSet #-}-wrap_ConstructorSet :: T_ConstructorSet -> Inh_ConstructorSet -> (Syn_ConstructorSet )-wrap_ConstructorSet (T_ConstructorSet act) (Inh_ConstructorSet ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_ConstructorSet_vIn13 - (T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors) <- return (inv_ConstructorSet_s14 sem arg)- return (Syn_ConstructorSet _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors)- )---- cata-{-# NOINLINE sem_ConstructorSet #-}-sem_ConstructorSet :: ConstructorSet -> T_ConstructorSet -sem_ConstructorSet ( CName name_ ) = sem_ConstructorSet_CName name_-sem_ConstructorSet ( CUnion set1_ set2_ ) = sem_ConstructorSet_CUnion ( sem_ConstructorSet set1_ ) ( sem_ConstructorSet set2_ )-sem_ConstructorSet ( CDifference set1_ set2_ ) = sem_ConstructorSet_CDifference ( sem_ConstructorSet set1_ ) ( sem_ConstructorSet set2_ )-sem_ConstructorSet ( CAll ) = sem_ConstructorSet_CAll ---- semantic domain-newtype T_ConstructorSet = T_ConstructorSet {- attach_T_ConstructorSet :: Identity (T_ConstructorSet_s14 )- }-newtype T_ConstructorSet_s14 = C_ConstructorSet_s14 {- inv_ConstructorSet_s14 :: (T_ConstructorSet_v13 )- }-data T_ConstructorSet_s15 = C_ConstructorSet_s15-type T_ConstructorSet_v13 = (T_ConstructorSet_vIn13 ) -> (T_ConstructorSet_vOut13 )-data T_ConstructorSet_vIn13 = T_ConstructorSet_vIn13 -data T_ConstructorSet_vOut13 = T_ConstructorSet_vOut13 (Set ConstructorIdent) ((Set ConstructorIdent->Set ConstructorIdent)) (Seq Error)-{-# NOINLINE sem_ConstructorSet_CName #-}-sem_ConstructorSet_CName :: (ConstructorIdent) -> T_ConstructorSet -sem_ConstructorSet_CName arg_name_ = T_ConstructorSet (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_ConstructorSet_v13 - v13 = \ (T_ConstructorSet_vIn13 ) -> ( let- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule89 arg_name_- _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)- _lhsOconstructors = rule90 arg_name_- _lhsOerrors :: Seq Error- _lhsOerrors = rule91 ()- __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors- in __result_ )- in C_ConstructorSet_s14 v13- {-# INLINE rule89 #-}- {-# LINE 614 "./src-ag/Transform.ag" #-}- rule89 = \ name_ ->- {-# LINE 614 "./src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 1410 "dist/build/Transform.hs"#-}- {-# INLINE rule90 #-}- {-# LINE 777 "./src-ag/Transform.ag" #-}- rule90 = \ name_ ->- {-# LINE 777 "./src-ag/Transform.ag" #-}- \_ -> Set.singleton name_- {-# LINE 1416 "dist/build/Transform.hs"#-}- {-# INLINE rule91 #-}- rule91 = \ (_ :: ()) ->- Seq.empty-{-# NOINLINE sem_ConstructorSet_CUnion #-}-sem_ConstructorSet_CUnion :: T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet -sem_ConstructorSet_CUnion arg_set1_ arg_set2_ = T_ConstructorSet (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_ConstructorSet_v13 - v13 = \ (T_ConstructorSet_vIn13 ) -> ( let- _set1X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set1_))- _set2X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set2_))- (T_ConstructorSet_vOut13 _set1IcollectedConstructorNames _set1Iconstructors _set1Ierrors) = inv_ConstructorSet_s14 _set1X14 (T_ConstructorSet_vIn13 )- (T_ConstructorSet_vOut13 _set2IcollectedConstructorNames _set2Iconstructors _set2Ierrors) = inv_ConstructorSet_s14 _set2X14 (T_ConstructorSet_vIn13 )- _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)- _lhsOconstructors = rule92 _set1Iconstructors _set2Iconstructors- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule93 _set1IcollectedConstructorNames _set2IcollectedConstructorNames- _lhsOerrors :: Seq Error- _lhsOerrors = rule94 _set1Ierrors _set2Ierrors- __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors- in __result_ )- in C_ConstructorSet_s14 v13- {-# INLINE rule92 #-}- {-# LINE 778 "./src-ag/Transform.ag" #-}- rule92 = \ ((_set1Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_set2Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->- {-# LINE 778 "./src-ag/Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds- {-# LINE 1445 "dist/build/Transform.hs"#-}- {-# INLINE rule93 #-}- rule93 = \ ((_set1IcollectedConstructorNames) :: Set ConstructorIdent) ((_set2IcollectedConstructorNames) :: Set ConstructorIdent) ->- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# INLINE rule94 #-}- rule94 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->- _set1Ierrors Seq.>< _set2Ierrors-{-# NOINLINE sem_ConstructorSet_CDifference #-}-sem_ConstructorSet_CDifference :: T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet -sem_ConstructorSet_CDifference arg_set1_ arg_set2_ = T_ConstructorSet (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_ConstructorSet_v13 - v13 = \ (T_ConstructorSet_vIn13 ) -> ( let- _set1X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set1_))- _set2X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set2_))- (T_ConstructorSet_vOut13 _set1IcollectedConstructorNames _set1Iconstructors _set1Ierrors) = inv_ConstructorSet_s14 _set1X14 (T_ConstructorSet_vIn13 )- (T_ConstructorSet_vOut13 _set2IcollectedConstructorNames _set2Iconstructors _set2Ierrors) = inv_ConstructorSet_s14 _set2X14 (T_ConstructorSet_vIn13 )- _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)- _lhsOconstructors = rule95 _set1Iconstructors _set2Iconstructors- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule96 _set1IcollectedConstructorNames _set2IcollectedConstructorNames- _lhsOerrors :: Seq Error- _lhsOerrors = rule97 _set1Ierrors _set2Ierrors- __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors- in __result_ )- in C_ConstructorSet_s14 v13- {-# INLINE rule95 #-}- {-# LINE 779 "./src-ag/Transform.ag" #-}- rule95 = \ ((_set1Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_set2Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->- {-# LINE 779 "./src-ag/Transform.ag" #-}- \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds- {-# LINE 1477 "dist/build/Transform.hs"#-}- {-# INLINE rule96 #-}- rule96 = \ ((_set1IcollectedConstructorNames) :: Set ConstructorIdent) ((_set2IcollectedConstructorNames) :: Set ConstructorIdent) ->- _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames- {-# INLINE rule97 #-}- rule97 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->- _set1Ierrors Seq.>< _set2Ierrors-{-# NOINLINE sem_ConstructorSet_CAll #-}-sem_ConstructorSet_CAll :: T_ConstructorSet -sem_ConstructorSet_CAll = T_ConstructorSet (return st14) where- {-# NOINLINE st14 #-}- st14 = let- v13 :: T_ConstructorSet_v13 - v13 = \ (T_ConstructorSet_vIn13 ) -> ( let- _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)- _lhsOconstructors = rule98 ()- _lhsOcollectedConstructorNames :: Set ConstructorIdent- _lhsOcollectedConstructorNames = rule99 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule100 ()- __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors- in __result_ )- in C_ConstructorSet_s14 v13- {-# INLINE rule98 #-}- {-# LINE 780 "./src-ag/Transform.ag" #-}- rule98 = \ (_ :: ()) ->- {-# LINE 780 "./src-ag/Transform.ag" #-}- \ds -> ds- {-# LINE 1505 "dist/build/Transform.hs"#-}- {-# INLINE rule99 #-}- rule99 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule100 #-}- rule100 = \ (_ :: ()) ->- Seq.empty---- Elem ----------------------------------------------------------- wrapper-data Inh_Elem = Inh_Elem { allAttrDecls_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), allConstructors_Inh_Elem :: (Map NontermIdent (Set ConstructorIdent)), allFields_Inh_Elem :: (DataTypes), allNonterminals_Inh_Elem :: (Set NontermIdent), attrDecls_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), attrs_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), defSets_Inh_Elem :: (Map Identifier (Set NontermIdent,Set Identifier)), definedSets_Inh_Elem :: (DefinedSets), options_Inh_Elem :: (Options) }-data Syn_Elem = Syn_Elem { attrDecls_Syn_Elem :: (Map NontermIdent (Attributes, Attributes)), attrOrderCollect_Syn_Elem :: (AttrOrderMap), attrs_Syn_Elem :: (Map NontermIdent (Attributes, Attributes)), blocks_Syn_Elem :: (Blocks), collectedArounds_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedConParams_Syn_Elem :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Elem :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorsMap_Syn_Elem :: (Map NontermIdent (Set ConstructorIdent)), collectedFields_Syn_Elem :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedInsts_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMacros_Syn_Elem :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]), collectedMerges_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedNames_Syn_Elem :: (Set Identifier), collectedRules_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSetNames_Syn_Elem :: (Set Identifier), collectedSigs_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), ctxCollect_Syn_Elem :: (ContextMap), defSets_Syn_Elem :: (Map Identifier (Set NontermIdent,Set Identifier)), derivings_Syn_Elem :: (Derivings), errors_Syn_Elem :: (Seq Error), moduleDecl_Syn_Elem :: (Maybe (String,String,String)), paramsCollect_Syn_Elem :: (ParamMap), pragmas_Syn_Elem :: (Options -> Options), quantCollect_Syn_Elem :: (QuantMap), semPragmasCollect_Syn_Elem :: (PragmaMap), typeSyns_Syn_Elem :: (TypeSyns), useMap_Syn_Elem :: (Map NontermIdent (Map Identifier (String,String,String))), wrappers_Syn_Elem :: (Set NontermIdent) }-{-# INLINABLE wrap_Elem #-}-wrap_Elem :: T_Elem -> Inh_Elem -> (Syn_Elem )-wrap_Elem (T_Elem act) (Inh_Elem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions- (T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers) <- return (inv_Elem_s17 sem arg)- return (Syn_Elem _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers)- )---- cata-{-# NOINLINE sem_Elem #-}-sem_Elem :: Elem -> T_Elem -sem_Elem ( Data pos_ ctx_ names_ params_ attrs_ alts_ ext_ ) = sem_Elem_Data pos_ ctx_ ( sem_NontSet names_ ) params_ ( sem_Attrs attrs_ ) ( sem_Alts alts_ ) ext_-sem_Elem ( Type pos_ ctx_ name_ params_ type_ ) = sem_Elem_Type pos_ ctx_ name_ params_ type_-sem_Elem ( Attr pos_ ctx_ names_ quants_ attrs_ ) = sem_Elem_Attr pos_ ctx_ ( sem_NontSet names_ ) quants_ ( sem_Attrs attrs_ )-sem_Elem ( Sem pos_ ctx_ names_ attrs_ quants_ alts_ ) = sem_Elem_Sem pos_ ctx_ ( sem_NontSet names_ ) ( sem_Attrs attrs_ ) quants_ ( sem_SemAlts alts_ )-sem_Elem ( Txt pos_ kind_ mbNt_ lines_ ) = sem_Elem_Txt pos_ kind_ mbNt_ lines_-sem_Elem ( Set pos_ name_ merge_ set_ ) = sem_Elem_Set pos_ name_ merge_ ( sem_NontSet set_ )-sem_Elem ( Deriving pos_ set_ classes_ ) = sem_Elem_Deriving pos_ ( sem_NontSet set_ ) classes_-sem_Elem ( Wrapper pos_ set_ ) = sem_Elem_Wrapper pos_ ( sem_NontSet set_ )-sem_Elem ( Nocatas pos_ set_ ) = sem_Elem_Nocatas pos_ ( sem_NontSet set_ )-sem_Elem ( Pragma pos_ names_ ) = sem_Elem_Pragma pos_ names_-sem_Elem ( Module pos_ name_ exports_ imports_ ) = sem_Elem_Module pos_ name_ exports_ imports_---- semantic domain-newtype T_Elem = T_Elem {- attach_T_Elem :: Identity (T_Elem_s17 )- }-newtype T_Elem_s17 = C_Elem_s17 {- inv_Elem_s17 :: (T_Elem_v16 )- }-data T_Elem_s18 = C_Elem_s18-type T_Elem_v16 = (T_Elem_vIn16 ) -> (T_Elem_vOut16 )-data T_Elem_vIn16 = T_Elem_vIn16 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Set ConstructorIdent)) (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map Identifier (Set NontermIdent,Set Identifier)) (DefinedSets) (Options)-data T_Elem_vOut16 = T_Elem_vOut16 (Map NontermIdent (Attributes, Attributes)) (AttrOrderMap) (Map NontermIdent (Attributes, Attributes)) (Blocks) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Map NontermIdent (Set ConstructorIdent)) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([(NontermIdent, ConstructorIdent, MaybeMacro)]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (ContextMap) (Map Identifier (Set NontermIdent,Set Identifier)) (Derivings) (Seq Error) (Maybe (String,String,String)) (ParamMap) (Options -> Options) (QuantMap) (PragmaMap) (TypeSyns) (Map NontermIdent (Map Identifier (String,String,String))) (Set NontermIdent)-{-# NOINLINE sem_Elem_Data #-}-sem_Elem_Data :: (Pos) -> (ClassContext) -> T_NontSet -> ([Identifier]) -> T_Attrs -> T_Alts -> (Bool) -> T_Elem -sem_Elem_Data _ arg_ctx_ arg_names_ arg_params_ arg_attrs_ arg_alts_ _ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _namesX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_names_))- _attrsX11 = Control.Monad.Identity.runIdentity (attach_T_Attrs (arg_attrs_))- _altsX8 = Control.Monad.Identity.runIdentity (attach_T_Alts (arg_alts_))- (T_NontSet_vOut28 _namesIcollectedNames _namesIerrors _namesInontSet) = inv_NontSet_s29 _namesX29 (T_NontSet_vIn28 _namesOallFields _namesOallNonterminals _namesOdefinedSets)- (T_Attrs_vOut10 _attrsIattrDecls _attrsIattrs _attrsIerrors _attrsIuseMap) = inv_Attrs_s11 _attrsX11 (T_Attrs_vIn10 _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions)- (T_Alts_vOut7 _altsIcollectedConParams _altsIcollectedConstraints _altsIcollectedConstructorNames _altsIcollectedFields _altsIcollectedMacros) = inv_Alts_s8 _altsX8 (T_Alts_vIn7 _altsOallConstructors _altsOallNonterminals _altsOnts)- _altsOnts = rule101 _namesInontSet- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule102 _altsIcollectedConstructorNames _namesInontSet- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule103 _namesInontSet arg_params_- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule104 _namesInontSet arg_ctx_- _attrsOnts = rule105 _namesInontSet- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule106 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule107 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule108 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule109 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule110 _altsIcollectedConParams- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule111 _altsIcollectedConstraints- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule112 _altsIcollectedFields- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule113 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule114 _altsIcollectedMacros- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule115 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule116 _namesIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule117 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule118 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule119 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule120 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule121 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule122 _attrsIerrors _namesIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule123 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule124 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule125 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule126 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule127 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule128 _attrsIuseMap- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule129 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule130 _attrsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule131 _attrsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule132 _lhsIdefSets- _namesOallFields = rule133 _lhsIallFields- _namesOallNonterminals = rule134 _lhsIallNonterminals- _namesOdefinedSets = rule135 _lhsIdefinedSets- _attrsOallFields = rule136 _lhsIallFields- _attrsOallNonterminals = rule137 _lhsIallNonterminals- _attrsOattrDecls = rule138 _lhsIattrDecls- _attrsOattrs = rule139 _lhsIattrs- _attrsOoptions = rule140 _lhsIoptions- _altsOallConstructors = rule141 _lhsIallConstructors- _altsOallNonterminals = rule142 _lhsIallNonterminals- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule101 #-}- {-# LINE 176 "./src-ag/Transform.ag" #-}- rule101 = \ ((_namesInontSet) :: Set NontermIdent) ->- {-# LINE 176 "./src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 1646 "dist/build/Transform.hs"#-}- {-# INLINE rule102 #-}- {-# LINE 620 "./src-ag/Transform.ag" #-}- rule102 = \ ((_altsIcollectedConstructorNames) :: Set ConstructorIdent) ((_namesInontSet) :: Set NontermIdent) ->- {-# LINE 620 "./src-ag/Transform.ag" #-}- Map.fromList- [ (n, _altsIcollectedConstructorNames)- | n <- Set.toList _namesInontSet- ]- {-# LINE 1655 "dist/build/Transform.hs"#-}- {-# INLINE rule103 #-}- {-# LINE 947 "./src-ag/Transform.ag" #-}- rule103 = \ ((_namesInontSet) :: Set NontermIdent) params_ ->- {-# LINE 947 "./src-ag/Transform.ag" #-}- if null params_- then Map.empty- else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]- {-# LINE 1663 "dist/build/Transform.hs"#-}- {-# INLINE rule104 #-}- {-# LINE 970 "./src-ag/Transform.ag" #-}- rule104 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->- {-# LINE 970 "./src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 1671 "dist/build/Transform.hs"#-}- {-# INLINE rule105 #-}- {-# LINE 1032 "./src-ag/Transform.ag" #-}- rule105 = \ ((_namesInontSet) :: Set NontermIdent) ->- {-# LINE 1032 "./src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 1677 "dist/build/Transform.hs"#-}- {-# INLINE rule106 #-}- rule106 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule107 #-}- rule107 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule108 #-}- rule108 = \ (_ :: ()) ->- []- {-# INLINE rule109 #-}- rule109 = \ (_ :: ()) ->- []- {-# INLINE rule110 #-}- rule110 = \ ((_altsIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->- _altsIcollectedConParams- {-# INLINE rule111 #-}- rule111 = \ ((_altsIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->- _altsIcollectedConstraints- {-# INLINE rule112 #-}- rule112 = \ ((_altsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->- _altsIcollectedFields- {-# INLINE rule113 #-}- rule113 = \ (_ :: ()) ->- []- {-# INLINE rule114 #-}- rule114 = \ ((_altsIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->- _altsIcollectedMacros- {-# INLINE rule115 #-}- rule115 = \ (_ :: ()) ->- []- {-# INLINE rule116 #-}- rule116 = \ ((_namesIcollectedNames) :: Set Identifier) ->- _namesIcollectedNames- {-# INLINE rule117 #-}- rule117 = \ (_ :: ()) ->- []- {-# INLINE rule118 #-}- rule118 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule119 #-}- rule119 = \ (_ :: ()) ->- []- {-# INLINE rule120 #-}- rule120 = \ (_ :: ()) ->- []- {-# INLINE rule121 #-}- rule121 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule122 #-}- rule122 = \ ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->- _namesIerrors Seq.>< _attrsIerrors- {-# INLINE rule123 #-}- rule123 = \ (_ :: ()) ->- mzero- {-# INLINE rule124 #-}- rule124 = \ (_ :: ()) ->- id- {-# INLINE rule125 #-}- rule125 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule126 #-}- rule126 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule127 #-}- rule127 = \ (_ :: ()) ->- []- {-# INLINE rule128 #-}- rule128 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->- _attrsIuseMap- {-# INLINE rule129 #-}- rule129 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule130 #-}- rule130 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _attrsIattrDecls- {-# INLINE rule131 #-}- rule131 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _attrsIattrs- {-# INLINE rule132 #-}- rule132 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule133 #-}- rule133 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule134 #-}- rule134 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule135 #-}- rule135 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule136 #-}- rule136 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule137 #-}- rule137 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule138 #-}- rule138 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule139 #-}- rule139 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule140 #-}- rule140 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule141 #-}- rule141 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->- _lhsIallConstructors- {-# INLINE rule142 #-}- rule142 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals-{-# NOINLINE sem_Elem_Type #-}-sem_Elem_Type :: (Pos) -> (ClassContext) -> (NontermIdent) -> ([Identifier]) -> (ComplexType) -> T_Elem -sem_Elem_Type arg_pos_ arg_ctx_ arg_name_ arg_params_ arg_type_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule143 _expanded arg_name_- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule144 arg_name_- _expanded = rule145 _argType arg_name_ arg_params_ arg_pos_- _argType = rule146 _lhsIallNonterminals arg_type_- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule147 _argType arg_name_- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule148 arg_name_ arg_params_- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule149 arg_ctx_ arg_name_- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule150 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule151 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule152 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule153 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule154 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule155 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule156 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule157 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule158 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule159 ()- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule160 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule161 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule162 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule163 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule164 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule165 ()- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule166 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule167 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule168 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule169 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule170 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule171 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule172 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule173 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule174 _lhsIdefSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule143 #-}- {-# LINE 254 "./src-ag/Transform.ag" #-}- rule143 = \ _expanded name_ ->- {-# LINE 254 "./src-ag/Transform.ag" #-}- map (\(x,y)->(name_, x, y)) _expanded- {-# LINE 1866 "dist/build/Transform.hs"#-}- {-# INLINE rule144 #-}- {-# LINE 600 "./src-ag/Transform.ag" #-}- rule144 = \ name_ ->- {-# LINE 600 "./src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 1872 "dist/build/Transform.hs"#-}- {-# INLINE rule145 #-}- {-# LINE 654 "./src-ag/Transform.ag" #-}- rule145 = \ _argType name_ params_ pos_ ->- {-# LINE 654 "./src-ag/Transform.ag" #-}- case _argType of- List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)- ,(Ident "tl" pos_, NT name_ (map getName params_) False)- ]- )- ,(Ident "Nil" pos_, [])- ]- Maybe tp -> [(Ident "Just" pos_, [(Ident "just" pos_, tp)- ]- )- ,(Ident "Nothing" pos_, [])- ]- Either tp1 tp2 -> [- (Ident "Left" pos_, [(Ident "left" pos_, tp1) ])- , (Ident "Right" pos_, [(Ident "right" pos_, tp2) ])- ]- Map tp1 tp2 -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, tp1)- , (Ident "val" pos_, tp2)- , (Ident "tl" pos_, NT name_ (map getName params_) False)- ])- , (Ident "Nil" pos_, [])- ]- IntMap tp -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, Haskell "Int")- , (Ident "val" pos_, tp)- , (Ident "tl" pos_, NT name_ (map getName params_) False)- ])- , (Ident "Nil" pos_, [])- ]- OrdSet tp -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, tp)- , (Ident "tl" pos_, NT name_ (map getName params_) False) ])- , (Ident "Nil" pos_, [])- ]- IntSet -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, Haskell "Int")- , (Ident "tl" pos_, NT name_ (map getName params_) False) ])- , (Ident "Nil" pos_, [])- ]- Tuple xs -> [(Ident "Tuple" pos_, xs)]- {-# LINE 1914 "dist/build/Transform.hs"#-}- {-# INLINE rule146 #-}- {-# LINE 691 "./src-ag/Transform.ag" #-}- rule146 = \ ((_lhsIallNonterminals) :: Set NontermIdent) type_ ->- {-# LINE 691 "./src-ag/Transform.ag" #-}- case type_ of- Maybe tp -> Maybe ( makeType _lhsIallNonterminals tp)- Either tp1 tp2 -> Either ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)- List tp -> List ( makeType _lhsIallNonterminals tp)- Tuple xs -> Tuple [(f,makeType _lhsIallNonterminals tp) | (f,tp) <- xs]- Map tp1 tp2 -> Map ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)- IntMap tp -> IntMap ( makeType _lhsIallNonterminals tp)- OrdSet tp -> OrdSet ( makeType _lhsIallNonterminals tp)- IntSet -> IntSet- {-# LINE 1928 "dist/build/Transform.hs"#-}- {-# INLINE rule147 #-}- {-# LINE 700 "./src-ag/Transform.ag" #-}- rule147 = \ _argType name_ ->- {-# LINE 700 "./src-ag/Transform.ag" #-}- [(name_,_argType)]- {-# LINE 1934 "dist/build/Transform.hs"#-}- {-# INLINE rule148 #-}- {-# LINE 953 "./src-ag/Transform.ag" #-}- rule148 = \ name_ params_ ->- {-# LINE 953 "./src-ag/Transform.ag" #-}- if null params_- then Map.empty- else Map.singleton name_ params_- {-# LINE 1942 "dist/build/Transform.hs"#-}- {-# INLINE rule149 #-}- {-# LINE 976 "./src-ag/Transform.ag" #-}- rule149 = \ ctx_ name_ ->- {-# LINE 976 "./src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.singleton name_ ctx_- {-# LINE 1950 "dist/build/Transform.hs"#-}- {-# INLINE rule150 #-}- rule150 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule151 #-}- rule151 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule152 #-}- rule152 = \ (_ :: ()) ->- []- {-# INLINE rule153 #-}- rule153 = \ (_ :: ()) ->- []- {-# INLINE rule154 #-}- rule154 = \ (_ :: ()) ->- []- {-# INLINE rule155 #-}- rule155 = \ (_ :: ()) ->- []- {-# INLINE rule156 #-}- rule156 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule157 #-}- rule157 = \ (_ :: ()) ->- []- {-# INLINE rule158 #-}- rule158 = \ (_ :: ()) ->- []- {-# INLINE rule159 #-}- rule159 = \ (_ :: ()) ->- []- {-# INLINE rule160 #-}- rule160 = \ (_ :: ()) ->- []- {-# INLINE rule161 #-}- rule161 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule162 #-}- rule162 = \ (_ :: ()) ->- []- {-# INLINE rule163 #-}- rule163 = \ (_ :: ()) ->- []- {-# INLINE rule164 #-}- rule164 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule165 #-}- rule165 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule166 #-}- rule166 = \ (_ :: ()) ->- mzero- {-# INLINE rule167 #-}- rule167 = \ (_ :: ()) ->- id- {-# INLINE rule168 #-}- rule168 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule169 #-}- rule169 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule170 #-}- rule170 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule171 #-}- rule171 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule172 #-}- rule172 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule173 #-}- rule173 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule174 #-}- rule174 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets-{-# NOINLINE sem_Elem_Attr #-}-sem_Elem_Attr :: (Pos) -> (ClassContext) -> T_NontSet -> ([String]) -> T_Attrs -> T_Elem -sem_Elem_Attr _ arg_ctx_ arg_names_ arg_quants_ arg_attrs_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _namesX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_names_))- _attrsX11 = Control.Monad.Identity.runIdentity (attach_T_Attrs (arg_attrs_))- (T_NontSet_vOut28 _namesIcollectedNames _namesIerrors _namesInontSet) = inv_NontSet_s29 _namesX29 (T_NontSet_vIn28 _namesOallFields _namesOallNonterminals _namesOdefinedSets)- (T_Attrs_vOut10 _attrsIattrDecls _attrsIattrs _attrsIerrors _attrsIuseMap) = inv_Attrs_s11 _attrsX11 (T_Attrs_vIn10 _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions)- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule175 _namesInontSet arg_ctx_- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule176 _namesInontSet arg_quants_- _attrsOnts = rule177 _namesInontSet- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule178 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule179 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule180 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule181 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule182 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule183 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule184 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule185 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule186 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule187 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule188 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule189 _namesIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule190 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule191 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule192 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule193 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule194 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule195 _attrsIerrors _namesIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule196 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule197 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule198 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule199 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule200 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule201 _attrsIuseMap- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule202 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule203 _attrsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule204 _attrsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule205 _lhsIdefSets- _namesOallFields = rule206 _lhsIallFields- _namesOallNonterminals = rule207 _lhsIallNonterminals- _namesOdefinedSets = rule208 _lhsIdefinedSets- _attrsOallFields = rule209 _lhsIallFields- _attrsOallNonterminals = rule210 _lhsIallNonterminals- _attrsOattrDecls = rule211 _lhsIattrDecls- _attrsOattrs = rule212 _lhsIattrs- _attrsOoptions = rule213 _lhsIoptions- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule175 #-}- {-# LINE 970 "./src-ag/Transform.ag" #-}- rule175 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->- {-# LINE 970 "./src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 2116 "dist/build/Transform.hs"#-}- {-# INLINE rule176 #-}- {-# LINE 995 "./src-ag/Transform.ag" #-}- rule176 = \ ((_namesInontSet) :: Set NontermIdent) quants_ ->- {-# LINE 995 "./src-ag/Transform.ag" #-}- if null quants_- then Map.empty- else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]- {-# LINE 2124 "dist/build/Transform.hs"#-}- {-# INLINE rule177 #-}- {-# LINE 1033 "./src-ag/Transform.ag" #-}- rule177 = \ ((_namesInontSet) :: Set NontermIdent) ->- {-# LINE 1033 "./src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 2130 "dist/build/Transform.hs"#-}- {-# INLINE rule178 #-}- rule178 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule179 #-}- rule179 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule180 #-}- rule180 = \ (_ :: ()) ->- []- {-# INLINE rule181 #-}- rule181 = \ (_ :: ()) ->- []- {-# INLINE rule182 #-}- rule182 = \ (_ :: ()) ->- []- {-# INLINE rule183 #-}- rule183 = \ (_ :: ()) ->- []- {-# INLINE rule184 #-}- rule184 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule185 #-}- rule185 = \ (_ :: ()) ->- []- {-# INLINE rule186 #-}- rule186 = \ (_ :: ()) ->- []- {-# INLINE rule187 #-}- rule187 = \ (_ :: ()) ->- []- {-# INLINE rule188 #-}- rule188 = \ (_ :: ()) ->- []- {-# INLINE rule189 #-}- rule189 = \ ((_namesIcollectedNames) :: Set Identifier) ->- _namesIcollectedNames- {-# INLINE rule190 #-}- rule190 = \ (_ :: ()) ->- []- {-# INLINE rule191 #-}- rule191 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule192 #-}- rule192 = \ (_ :: ()) ->- []- {-# INLINE rule193 #-}- rule193 = \ (_ :: ()) ->- []- {-# INLINE rule194 #-}- rule194 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule195 #-}- rule195 = \ ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->- _namesIerrors Seq.>< _attrsIerrors- {-# INLINE rule196 #-}- rule196 = \ (_ :: ()) ->- mzero- {-# INLINE rule197 #-}- rule197 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule198 #-}- rule198 = \ (_ :: ()) ->- id- {-# INLINE rule199 #-}- rule199 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule200 #-}- rule200 = \ (_ :: ()) ->- []- {-# INLINE rule201 #-}- rule201 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->- _attrsIuseMap- {-# INLINE rule202 #-}- rule202 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule203 #-}- rule203 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _attrsIattrDecls- {-# INLINE rule204 #-}- rule204 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _attrsIattrs- {-# INLINE rule205 #-}- rule205 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule206 #-}- rule206 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule207 #-}- rule207 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule208 #-}- rule208 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule209 #-}- rule209 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule210 #-}- rule210 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule211 #-}- rule211 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule212 #-}- rule212 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule213 #-}- rule213 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions-{-# NOINLINE sem_Elem_Sem #-}-sem_Elem_Sem :: (Pos) -> (ClassContext) -> T_NontSet -> T_Attrs -> ([String]) -> T_SemAlts -> T_Elem -sem_Elem_Sem _ arg_ctx_ arg_names_ arg_attrs_ arg_quants_ arg_alts_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _namesX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_names_))- _attrsX11 = Control.Monad.Identity.runIdentity (attach_T_Attrs (arg_attrs_))- _altsX41 = Control.Monad.Identity.runIdentity (attach_T_SemAlts (arg_alts_))- (T_NontSet_vOut28 _namesIcollectedNames _namesIerrors _namesInontSet) = inv_NontSet_s29 _namesX29 (T_NontSet_vIn28 _namesOallFields _namesOallNonterminals _namesOdefinedSets)- (T_Attrs_vOut10 _attrsIattrDecls _attrsIattrs _attrsIerrors _attrsIuseMap) = inv_Attrs_s11 _attrsX11 (T_Attrs_vIn10 _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions)- (T_SemAlts_vOut40 _altsIattrOrderCollect _altsIcollectedArounds _altsIcollectedAugments _altsIcollectedInsts _altsIcollectedMerges _altsIcollectedRules _altsIcollectedSigs _altsIcollectedUniques _altsIerrors _altsIsemPragmasCollect) = inv_SemAlts_s41 _altsX41 (T_SemAlts_vIn40 _altsOallAttrDecls _altsOallAttrs _altsOallFields _altsOnts _altsOoptions)- _altsOnts = rule214 _namesInontSet- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule215 _namesInontSet arg_ctx_- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule216 _namesInontSet arg_quants_- _attrsOnts = rule217 _namesInontSet- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule218 _altsIattrOrderCollect- _lhsOblocks :: Blocks- _lhsOblocks = rule219 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule220 _altsIcollectedArounds- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule221 _altsIcollectedAugments- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule222 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule223 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule224 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule225 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule226 _altsIcollectedInsts- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule227 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule228 _altsIcollectedMerges- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule229 _namesIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule230 _altsIcollectedRules- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule231 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule232 _altsIcollectedSigs- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule233 _altsIcollectedUniques- _lhsOderivings :: Derivings- _lhsOderivings = rule234 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule235 _altsIerrors _attrsIerrors _namesIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule236 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule237 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule238 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule239 _altsIsemPragmasCollect- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule240 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule241 _attrsIuseMap- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule242 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule243 _attrsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule244 _attrsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule245 _lhsIdefSets- _namesOallFields = rule246 _lhsIallFields- _namesOallNonterminals = rule247 _lhsIallNonterminals- _namesOdefinedSets = rule248 _lhsIdefinedSets- _attrsOallFields = rule249 _lhsIallFields- _attrsOallNonterminals = rule250 _lhsIallNonterminals- _attrsOattrDecls = rule251 _lhsIattrDecls- _attrsOattrs = rule252 _lhsIattrs- _attrsOoptions = rule253 _lhsIoptions- _altsOallAttrDecls = rule254 _lhsIallAttrDecls- _altsOallAttrs = rule255 _lhsIallAttrs- _altsOallFields = rule256 _lhsIallFields- _altsOoptions = rule257 _lhsIoptions- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule214 #-}- {-# LINE 177 "./src-ag/Transform.ag" #-}- rule214 = \ ((_namesInontSet) :: Set NontermIdent) ->- {-# LINE 177 "./src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 2334 "dist/build/Transform.hs"#-}- {-# INLINE rule215 #-}- {-# LINE 970 "./src-ag/Transform.ag" #-}- rule215 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->- {-# LINE 970 "./src-ag/Transform.ag" #-}- if null ctx_- then Map.empty- else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]- {-# LINE 2342 "dist/build/Transform.hs"#-}- {-# INLINE rule216 #-}- {-# LINE 995 "./src-ag/Transform.ag" #-}- rule216 = \ ((_namesInontSet) :: Set NontermIdent) quants_ ->- {-# LINE 995 "./src-ag/Transform.ag" #-}- if null quants_- then Map.empty- else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]- {-# LINE 2350 "dist/build/Transform.hs"#-}- {-# INLINE rule217 #-}- {-# LINE 1034 "./src-ag/Transform.ag" #-}- rule217 = \ ((_namesInontSet) :: Set NontermIdent) ->- {-# LINE 1034 "./src-ag/Transform.ag" #-}- _namesInontSet- {-# LINE 2356 "dist/build/Transform.hs"#-}- {-# INLINE rule218 #-}- rule218 = \ ((_altsIattrOrderCollect) :: AttrOrderMap) ->- _altsIattrOrderCollect- {-# INLINE rule219 #-}- rule219 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule220 #-}- rule220 = \ ((_altsIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->- _altsIcollectedArounds- {-# INLINE rule221 #-}- rule221 = \ ((_altsIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->- _altsIcollectedAugments- {-# INLINE rule222 #-}- rule222 = \ (_ :: ()) ->- []- {-# INLINE rule223 #-}- rule223 = \ (_ :: ()) ->- []- {-# INLINE rule224 #-}- rule224 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule225 #-}- rule225 = \ (_ :: ()) ->- []- {-# INLINE rule226 #-}- rule226 = \ ((_altsIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->- _altsIcollectedInsts- {-# INLINE rule227 #-}- rule227 = \ (_ :: ()) ->- []- {-# INLINE rule228 #-}- rule228 = \ ((_altsIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->- _altsIcollectedMerges- {-# INLINE rule229 #-}- rule229 = \ ((_namesIcollectedNames) :: Set Identifier) ->- _namesIcollectedNames- {-# INLINE rule230 #-}- rule230 = \ ((_altsIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->- _altsIcollectedRules- {-# INLINE rule231 #-}- rule231 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule232 #-}- rule232 = \ ((_altsIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->- _altsIcollectedSigs- {-# INLINE rule233 #-}- rule233 = \ ((_altsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->- _altsIcollectedUniques- {-# INLINE rule234 #-}- rule234 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule235 #-}- rule235 = \ ((_altsIerrors) :: Seq Error) ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->- _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors- {-# INLINE rule236 #-}- rule236 = \ (_ :: ()) ->- mzero- {-# INLINE rule237 #-}- rule237 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule238 #-}- rule238 = \ (_ :: ()) ->- id- {-# INLINE rule239 #-}- rule239 = \ ((_altsIsemPragmasCollect) :: PragmaMap) ->- _altsIsemPragmasCollect- {-# INLINE rule240 #-}- rule240 = \ (_ :: ()) ->- []- {-# INLINE rule241 #-}- rule241 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->- _attrsIuseMap- {-# INLINE rule242 #-}- rule242 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule243 #-}- rule243 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _attrsIattrDecls- {-# INLINE rule244 #-}- rule244 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _attrsIattrs- {-# INLINE rule245 #-}- rule245 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule246 #-}- rule246 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule247 #-}- rule247 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule248 #-}- rule248 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule249 #-}- rule249 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule250 #-}- rule250 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule251 #-}- rule251 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule252 #-}- rule252 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule253 #-}- rule253 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule254 #-}- rule254 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrDecls- {-# INLINE rule255 #-}- rule255 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrs- {-# INLINE rule256 #-}- rule256 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule257 #-}- rule257 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions-{-# NOINLINE sem_Elem_Txt #-}-sem_Elem_Txt :: (Pos) -> (BlockKind) -> (Maybe NontermIdent) -> ([String]) -> T_Elem -sem_Elem_Txt arg_pos_ arg_kind_ arg_mbNt_ arg_lines_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _blockInfo = rule258 arg_kind_ arg_mbNt_- _blockValue = rule259 arg_lines_ arg_pos_- _lhsOblocks :: Blocks- _lhsOblocks = rule260 _blockInfo _blockValue- _lhsOerrors :: Seq Error- _lhsOerrors = rule261 _lhsIoptions arg_lines_ arg_pos_- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule262 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule263 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule264 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule265 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule266 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule267 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule268 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule269 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule270 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule271 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule272 ()- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule273 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule274 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule275 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule276 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule277 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule278 ()- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule279 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule280 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule281 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule282 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule283 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule284 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule285 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule286 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule287 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule288 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule289 _lhsIdefSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule258 #-}- {-# LINE 186 "./src-ag/Transform.ag" #-}- rule258 = \ kind_ mbNt_ ->- {-# LINE 186 "./src-ag/Transform.ag" #-}- ( kind_- , mbNt_- )- {-# LINE 2556 "dist/build/Transform.hs"#-}- {-# INLINE rule259 #-}- {-# LINE 189 "./src-ag/Transform.ag" #-}- rule259 = \ lines_ pos_ ->- {-# LINE 189 "./src-ag/Transform.ag" #-}- [(lines_, pos_)]- {-# LINE 2562 "dist/build/Transform.hs"#-}- {-# INLINE rule260 #-}- {-# LINE 190 "./src-ag/Transform.ag" #-}- rule260 = \ _blockInfo _blockValue ->- {-# LINE 190 "./src-ag/Transform.ag" #-}- Map.singleton _blockInfo _blockValue- {-# LINE 2568 "dist/build/Transform.hs"#-}- {-# INLINE rule261 #-}- {-# LINE 191 "./src-ag/Transform.ag" #-}- rule261 = \ ((_lhsIoptions) :: Options) lines_ pos_ ->- {-# LINE 191 "./src-ag/Transform.ag" #-}- if checkParseBlock _lhsIoptions- then let ex = Expression pos_ tks- tks = [tk]- tk = HsToken (unlines lines_) pos_- in Seq.fromList $ checkBlock $ ex- else Seq.empty- {-# LINE 2579 "dist/build/Transform.hs"#-}- {-# INLINE rule262 #-}- rule262 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule263 #-}- rule263 = \ (_ :: ()) ->- []- {-# INLINE rule264 #-}- rule264 = \ (_ :: ()) ->- []- {-# INLINE rule265 #-}- rule265 = \ (_ :: ()) ->- []- {-# INLINE rule266 #-}- rule266 = \ (_ :: ()) ->- []- {-# INLINE rule267 #-}- rule267 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule268 #-}- rule268 = \ (_ :: ()) ->- []- {-# INLINE rule269 #-}- rule269 = \ (_ :: ()) ->- []- {-# INLINE rule270 #-}- rule270 = \ (_ :: ()) ->- []- {-# INLINE rule271 #-}- rule271 = \ (_ :: ()) ->- []- {-# INLINE rule272 #-}- rule272 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule273 #-}- rule273 = \ (_ :: ()) ->- []- {-# INLINE rule274 #-}- rule274 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule275 #-}- rule275 = \ (_ :: ()) ->- []- {-# INLINE rule276 #-}- rule276 = \ (_ :: ()) ->- []- {-# INLINE rule277 #-}- rule277 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule278 #-}- rule278 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule279 #-}- rule279 = \ (_ :: ()) ->- mzero- {-# INLINE rule280 #-}- rule280 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule281 #-}- rule281 = \ (_ :: ()) ->- id- {-# INLINE rule282 #-}- rule282 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule283 #-}- rule283 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule284 #-}- rule284 = \ (_ :: ()) ->- []- {-# INLINE rule285 #-}- rule285 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule286 #-}- rule286 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule287 #-}- rule287 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule288 #-}- rule288 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule289 #-}- rule289 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets-{-# NOINLINE sem_Elem_Set #-}-sem_Elem_Set :: (Pos) -> (NontermIdent) -> (Bool) -> T_NontSet -> T_Elem -sem_Elem_Set _ arg_name_ arg_merge_ arg_set_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))- (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule290 arg_name_- (_defSets2,_errs) = rule291 _lhsIallNonterminals _lhsIdefSets _setIcollectedNames _setInontSet arg_merge_ arg_name_- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule292 _defSets2- _lhsOerrors :: Seq Error- _lhsOerrors = rule293 _errs _setIerrors- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule294 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule295 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule296 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule297 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule298 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule299 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule300 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule301 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule302 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule303 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule304 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule305 _setIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule306 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule307 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule308 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule309 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule310 ()- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule311 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule312 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule313 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule314 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule315 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule316 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule317 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule318 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule319 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule320 _lhsIattrs- _setOallFields = rule321 _lhsIallFields- _setOallNonterminals = rule322 _lhsIallNonterminals- _setOdefinedSets = rule323 _lhsIdefinedSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule290 #-}- {-# LINE 597 "./src-ag/Transform.ag" #-}- rule290 = \ name_ ->- {-# LINE 597 "./src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 2745 "dist/build/Transform.hs"#-}- {-# INLINE rule291 #-}- {-# LINE 714 "./src-ag/Transform.ag" #-}- rule291 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ((_setIcollectedNames) :: Set Identifier) ((_setInontSet) :: Set NontermIdent) merge_ name_ ->- {-# LINE 714 "./src-ag/Transform.ag" #-}- let allUsedNames = Set.unions [ maybe (Set.singleton n)- snd- (Map.lookup n _lhsIdefSets)- | n <- Set.toList _setIcollectedNames- ]- (nontSet,e1) | Set.member name_ allUsedNames- = (Set.empty, Seq.singleton(CyclicSet name_))- | otherwise = (_setInontSet, Seq.empty)- (res, e2) = let toAdd = (nontSet,Set.insert name_ allUsedNames)- un (a,b) (c,d) = (a `Set.union` c, b `Set.union` d)- in if Set.member name_ _lhsIallNonterminals || not merge_- then checkDuplicate DupSet name_ toAdd _lhsIdefSets- else (Map.insertWith un name_ toAdd _lhsIdefSets, Seq.empty)- in (res, e1 Seq.>< e2)- {-# LINE 2764 "dist/build/Transform.hs"#-}- {-# INLINE rule292 #-}- {-# LINE 728 "./src-ag/Transform.ag" #-}- rule292 = \ _defSets2 ->- {-# LINE 728 "./src-ag/Transform.ag" #-}- _defSets2- {-# LINE 2770 "dist/build/Transform.hs"#-}- {-# INLINE rule293 #-}- {-# LINE 729 "./src-ag/Transform.ag" #-}- rule293 = \ _errs ((_setIerrors) :: Seq Error) ->- {-# LINE 729 "./src-ag/Transform.ag" #-}- _errs >< _setIerrors- {-# LINE 2776 "dist/build/Transform.hs"#-}- {-# INLINE rule294 #-}- rule294 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule295 #-}- rule295 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule296 #-}- rule296 = \ (_ :: ()) ->- []- {-# INLINE rule297 #-}- rule297 = \ (_ :: ()) ->- []- {-# INLINE rule298 #-}- rule298 = \ (_ :: ()) ->- []- {-# INLINE rule299 #-}- rule299 = \ (_ :: ()) ->- []- {-# INLINE rule300 #-}- rule300 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule301 #-}- rule301 = \ (_ :: ()) ->- []- {-# INLINE rule302 #-}- rule302 = \ (_ :: ()) ->- []- {-# INLINE rule303 #-}- rule303 = \ (_ :: ()) ->- []- {-# INLINE rule304 #-}- rule304 = \ (_ :: ()) ->- []- {-# INLINE rule305 #-}- rule305 = \ ((_setIcollectedNames) :: Set Identifier) ->- _setIcollectedNames- {-# INLINE rule306 #-}- rule306 = \ (_ :: ()) ->- []- {-# INLINE rule307 #-}- rule307 = \ (_ :: ()) ->- []- {-# INLINE rule308 #-}- rule308 = \ (_ :: ()) ->- []- {-# INLINE rule309 #-}- rule309 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule310 #-}- rule310 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule311 #-}- rule311 = \ (_ :: ()) ->- mzero- {-# INLINE rule312 #-}- rule312 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule313 #-}- rule313 = \ (_ :: ()) ->- id- {-# INLINE rule314 #-}- rule314 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule315 #-}- rule315 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule316 #-}- rule316 = \ (_ :: ()) ->- []- {-# INLINE rule317 #-}- rule317 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule318 #-}- rule318 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule319 #-}- rule319 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule320 #-}- rule320 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule321 #-}- rule321 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule322 #-}- rule322 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule323 #-}- rule323 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_Elem_Deriving #-}-sem_Elem_Deriving :: (Pos) -> T_NontSet -> ([NontermIdent]) -> T_Elem -sem_Elem_Deriving _ arg_set_ arg_classes_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))- (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)- _lhsOderivings :: Derivings- _lhsOderivings = rule324 _setInontSet arg_classes_- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule325 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule326 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule327 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule328 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule329 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule330 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule331 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule332 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule333 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule334 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule335 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule336 _setIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule337 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule338 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule339 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule340 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule341 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule342 _setIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule343 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule344 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule345 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule346 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule347 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule348 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule349 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule350 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule351 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule352 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule353 _lhsIdefSets- _setOallFields = rule354 _lhsIallFields- _setOallNonterminals = rule355 _lhsIallNonterminals- _setOdefinedSets = rule356 _lhsIdefinedSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule324 #-}- {-# LINE 1016 "./src-ag/Transform.ag" #-}- rule324 = \ ((_setInontSet) :: Set NontermIdent) classes_ ->- {-# LINE 1016 "./src-ag/Transform.ag" #-}- Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]- {-# LINE 2947 "dist/build/Transform.hs"#-}- {-# INLINE rule325 #-}- rule325 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule326 #-}- rule326 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule327 #-}- rule327 = \ (_ :: ()) ->- []- {-# INLINE rule328 #-}- rule328 = \ (_ :: ()) ->- []- {-# INLINE rule329 #-}- rule329 = \ (_ :: ()) ->- []- {-# INLINE rule330 #-}- rule330 = \ (_ :: ()) ->- []- {-# INLINE rule331 #-}- rule331 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule332 #-}- rule332 = \ (_ :: ()) ->- []- {-# INLINE rule333 #-}- rule333 = \ (_ :: ()) ->- []- {-# INLINE rule334 #-}- rule334 = \ (_ :: ()) ->- []- {-# INLINE rule335 #-}- rule335 = \ (_ :: ()) ->- []- {-# INLINE rule336 #-}- rule336 = \ ((_setIcollectedNames) :: Set Identifier) ->- _setIcollectedNames- {-# INLINE rule337 #-}- rule337 = \ (_ :: ()) ->- []- {-# INLINE rule338 #-}- rule338 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule339 #-}- rule339 = \ (_ :: ()) ->- []- {-# INLINE rule340 #-}- rule340 = \ (_ :: ()) ->- []- {-# INLINE rule341 #-}- rule341 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule342 #-}- rule342 = \ ((_setIerrors) :: Seq Error) ->- _setIerrors- {-# INLINE rule343 #-}- rule343 = \ (_ :: ()) ->- mzero- {-# INLINE rule344 #-}- rule344 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule345 #-}- rule345 = \ (_ :: ()) ->- id- {-# INLINE rule346 #-}- rule346 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule347 #-}- rule347 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule348 #-}- rule348 = \ (_ :: ()) ->- []- {-# INLINE rule349 #-}- rule349 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule350 #-}- rule350 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule351 #-}- rule351 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule352 #-}- rule352 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule353 #-}- rule353 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule354 #-}- rule354 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule355 #-}- rule355 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule356 #-}- rule356 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_Elem_Wrapper #-}-sem_Elem_Wrapper :: (Pos) -> T_NontSet -> T_Elem -sem_Elem_Wrapper _ arg_set_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))- (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule357 _setInontSet- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule358 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule359 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule360 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule361 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule362 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule363 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule364 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule365 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule366 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule367 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule368 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule369 _setIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule370 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule371 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule372 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule373 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule374 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule375 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule376 _setIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule377 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule378 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule379 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule380 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule381 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule382 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule383 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule384 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule385 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule386 _lhsIdefSets- _setOallFields = rule387 _lhsIallFields- _setOallNonterminals = rule388 _lhsIallNonterminals- _setOdefinedSets = rule389 _lhsIdefinedSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule357 #-}- {-# LINE 789 "./src-ag/Transform.ag" #-}- rule357 = \ ((_setInontSet) :: Set NontermIdent) ->- {-# LINE 789 "./src-ag/Transform.ag" #-}- _setInontSet- {-# LINE 3124 "dist/build/Transform.hs"#-}- {-# INLINE rule358 #-}- rule358 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule359 #-}- rule359 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule360 #-}- rule360 = \ (_ :: ()) ->- []- {-# INLINE rule361 #-}- rule361 = \ (_ :: ()) ->- []- {-# INLINE rule362 #-}- rule362 = \ (_ :: ()) ->- []- {-# INLINE rule363 #-}- rule363 = \ (_ :: ()) ->- []- {-# INLINE rule364 #-}- rule364 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule365 #-}- rule365 = \ (_ :: ()) ->- []- {-# INLINE rule366 #-}- rule366 = \ (_ :: ()) ->- []- {-# INLINE rule367 #-}- rule367 = \ (_ :: ()) ->- []- {-# INLINE rule368 #-}- rule368 = \ (_ :: ()) ->- []- {-# INLINE rule369 #-}- rule369 = \ ((_setIcollectedNames) :: Set Identifier) ->- _setIcollectedNames- {-# INLINE rule370 #-}- rule370 = \ (_ :: ()) ->- []- {-# INLINE rule371 #-}- rule371 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule372 #-}- rule372 = \ (_ :: ()) ->- []- {-# INLINE rule373 #-}- rule373 = \ (_ :: ()) ->- []- {-# INLINE rule374 #-}- rule374 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule375 #-}- rule375 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule376 #-}- rule376 = \ ((_setIerrors) :: Seq Error) ->- _setIerrors- {-# INLINE rule377 #-}- rule377 = \ (_ :: ()) ->- mzero- {-# INLINE rule378 #-}- rule378 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule379 #-}- rule379 = \ (_ :: ()) ->- id- {-# INLINE rule380 #-}- rule380 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule381 #-}- rule381 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule382 #-}- rule382 = \ (_ :: ()) ->- []- {-# INLINE rule383 #-}- rule383 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule384 #-}- rule384 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule385 #-}- rule385 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule386 #-}- rule386 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule387 #-}- rule387 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule388 #-}- rule388 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule389 #-}- rule389 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_Elem_Nocatas #-}-sem_Elem_Nocatas :: (Pos) -> T_NontSet -> T_Elem -sem_Elem_Nocatas _ arg_set_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))- (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule390 _setInontSet- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule391 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule392 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule393 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule394 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule395 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule396 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule397 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule398 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule399 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule400 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule401 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule402 _setIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule403 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule404 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule405 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule406 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule407 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule408 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule409 _setIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule410 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule411 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule412 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule413 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule414 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule415 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule416 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule417 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule418 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule419 _lhsIdefSets- _setOallFields = rule420 _lhsIallFields- _setOallNonterminals = rule421 _lhsIallNonterminals- _setOdefinedSets = rule422 _lhsIdefinedSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule390 #-}- {-# LINE 796 "./src-ag/Transform.ag" #-}- rule390 = \ ((_setInontSet) :: Set NontermIdent) ->- {-# LINE 796 "./src-ag/Transform.ag" #-}- \o -> o { nocatas = _setInontSet `Set.union` nocatas o }- {-# LINE 3301 "dist/build/Transform.hs"#-}- {-# INLINE rule391 #-}- rule391 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule392 #-}- rule392 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule393 #-}- rule393 = \ (_ :: ()) ->- []- {-# INLINE rule394 #-}- rule394 = \ (_ :: ()) ->- []- {-# INLINE rule395 #-}- rule395 = \ (_ :: ()) ->- []- {-# INLINE rule396 #-}- rule396 = \ (_ :: ()) ->- []- {-# INLINE rule397 #-}- rule397 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule398 #-}- rule398 = \ (_ :: ()) ->- []- {-# INLINE rule399 #-}- rule399 = \ (_ :: ()) ->- []- {-# INLINE rule400 #-}- rule400 = \ (_ :: ()) ->- []- {-# INLINE rule401 #-}- rule401 = \ (_ :: ()) ->- []- {-# INLINE rule402 #-}- rule402 = \ ((_setIcollectedNames) :: Set Identifier) ->- _setIcollectedNames- {-# INLINE rule403 #-}- rule403 = \ (_ :: ()) ->- []- {-# INLINE rule404 #-}- rule404 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule405 #-}- rule405 = \ (_ :: ()) ->- []- {-# INLINE rule406 #-}- rule406 = \ (_ :: ()) ->- []- {-# INLINE rule407 #-}- rule407 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule408 #-}- rule408 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule409 #-}- rule409 = \ ((_setIerrors) :: Seq Error) ->- _setIerrors- {-# INLINE rule410 #-}- rule410 = \ (_ :: ()) ->- mzero- {-# INLINE rule411 #-}- rule411 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule412 #-}- rule412 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule413 #-}- rule413 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule414 #-}- rule414 = \ (_ :: ()) ->- []- {-# INLINE rule415 #-}- rule415 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule416 #-}- rule416 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule417 #-}- rule417 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule418 #-}- rule418 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule419 #-}- rule419 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule420 #-}- rule420 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule421 #-}- rule421 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule422 #-}- rule422 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_Elem_Pragma #-}-sem_Elem_Pragma :: (Pos) -> ([NontermIdent]) -> T_Elem -sem_Elem_Pragma _ arg_names_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule423 arg_names_- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule424 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule425 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule426 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule427 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule428 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule429 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule430 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule431 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule432 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule433 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule434 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule435 ()- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule436 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule437 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule438 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule439 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule440 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule441 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule442 ()- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule443 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule444 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule445 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule446 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule447 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule448 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule449 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule450 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule451 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule452 _lhsIdefSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule423 #-}- {-# LINE 805 "./src-ag/Transform.ag" #-}- rule423 = \ names_ ->- {-# LINE 805 "./src-ag/Transform.ag" #-}- let mk n o = case getName n of- "gencatas" -> o { folds = True }- "nogencatas" -> o { folds = False }- "gendatas" -> o { dataTypes = True }- "datarecords" -> o { dataRecords = True }- "nogendatas" -> o { dataTypes = False }- "gensems" -> o { semfuns = True }- "nogensems" -> o { semfuns = False }- "gentypesigs" -> o { typeSigs = True }- "nogentypesigs"-> o { typeSigs = False }- "nocycle" -> o { withCycle = False }- "cycle" -> o { withCycle = True }- "nostrictdata" -> o { strictData = False }- "strictdata" -> o { strictData = True }- "nostrictcase" -> o { strictCases = False }- "strictcase" -> o { strictCases = True }- "strictercase" -> o { strictCases = True, stricterCases = True }- "nostrictwrap" -> o { strictWrap = False }- "strictwrap" -> o { strictWrap = True }- "novisit" -> o { visit = False }- "visit" -> o { visit = True }- "nocase" -> o { cases = False }- "case" -> o { cases = True }- "noseq" -> o { withSeq = False }- "seq" -> o { withSeq = True }- "nounbox" -> o { unbox = False }- "unbox" -> o { unbox = True }- "bangpats" -> o { bangpats = True }- "breadthfirst" -> o { breadthFirst = True }- "breadthfirstStrict" -> o { breadthFirstStrict = True }- "nooptimize" -> o { cases = False , visit = False }- "optimize" -> o { cases = True , visit = True }- "strictsem" -> o { strictSems = True }- "gentraces" -> o { genTraces = True }- "genusetraces" -> o { genUseTraces = True }- "splitsems" -> o { splitSems = True }- "gencostcentres" -> o { genCostCentres = True }- "sepsemmods" -> sepSemModsOpt o- "genlinepragmas" -> o { genLinePragmas = True }- "newtypes" -> o { newtypes = True }- "nonewtypes" -> o { newtypes = False }- "nooptimizations" -> o { noOptimizations = True }- "kennedywarren" -> o { kennedyWarren = True }- "aspectag" -> o { genAspectAG = True }- 'n':'o':'g':'r':'o':'u':'p':'_':atts- -> o { noGroup = extract atts ++ noGroup o }- "rename" -> o { rename = True }- "parallel" -> o { parallelInvoke = True }- "monadicwrappers" -> o { monadicWrappers = True }- "dummytokenvisit" -> o { dummyTokenVisit = True }- "tupleasdummytoken" -> o { tupleAsDummyToken = True }- "stateasdummytoken" -> o { tupleAsDummyToken = False }- "strictdummytoken" -> o { strictDummyToken = True }- "noperruletypesigs" -> o { noPerRuleTypeSigs = True }- "noperstatetypesigs" -> o { noPerStateTypeSigs = True }- "noeagerblackholing" -> o { noEagerBlackholing = True }- "noperrulecostcentres" -> o { noPerRuleCostCentres = True }- "nopervisitcostcentres" -> o { noPerVisitCostCentres = True }- "helpinlining" -> o { helpInlining = True }- "noinlinepragmas" -> o { noInlinePragmas = True }- "aggressiveinlinepragmas" -> o { aggressiveInlinePragmas = True }- "latehigherorderbindings" -> o { lateHigherOrderBinding = True }- "ocaml" -> ocamlOpt o- s -> trace ("uuagc: ignoring unknown pragma: " ++ s) o- in \o -> foldr mk o names_- {-# LINE 3537 "dist/build/Transform.hs"#-}- {-# INLINE rule424 #-}- rule424 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule425 #-}- rule425 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule426 #-}- rule426 = \ (_ :: ()) ->- []- {-# INLINE rule427 #-}- rule427 = \ (_ :: ()) ->- []- {-# INLINE rule428 #-}- rule428 = \ (_ :: ()) ->- []- {-# INLINE rule429 #-}- rule429 = \ (_ :: ()) ->- []- {-# INLINE rule430 #-}- rule430 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule431 #-}- rule431 = \ (_ :: ()) ->- []- {-# INLINE rule432 #-}- rule432 = \ (_ :: ()) ->- []- {-# INLINE rule433 #-}- rule433 = \ (_ :: ()) ->- []- {-# INLINE rule434 #-}- rule434 = \ (_ :: ()) ->- []- {-# INLINE rule435 #-}- rule435 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule436 #-}- rule436 = \ (_ :: ()) ->- []- {-# INLINE rule437 #-}- rule437 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule438 #-}- rule438 = \ (_ :: ()) ->- []- {-# INLINE rule439 #-}- rule439 = \ (_ :: ()) ->- []- {-# INLINE rule440 #-}- rule440 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule441 #-}- rule441 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule442 #-}- rule442 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule443 #-}- rule443 = \ (_ :: ()) ->- mzero- {-# INLINE rule444 #-}- rule444 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule445 #-}- rule445 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule446 #-}- rule446 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule447 #-}- rule447 = \ (_ :: ()) ->- []- {-# INLINE rule448 #-}- rule448 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule449 #-}- rule449 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule450 #-}- rule450 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule451 #-}- rule451 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule452 #-}- rule452 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets-{-# NOINLINE sem_Elem_Module #-}-sem_Elem_Module :: (Pos) -> (String) -> (String) -> (String) -> T_Elem -sem_Elem_Module _ arg_name_ arg_exports_ arg_imports_ = T_Elem (return st17) where- {-# NOINLINE st17 #-}- st17 = let- v16 :: T_Elem_v16 - v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule453 arg_exports_ arg_imports_ arg_name_- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule454 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule455 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule456 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule457 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule458 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule459 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule460 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule461 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule462 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule463 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule464 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule465 ()- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule466 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule467 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule468 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule469 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule470 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule471 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule472 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule473 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule474 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule475 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule476 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule477 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule478 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule479 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule480 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule481 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule482 _lhsIdefSets- __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elem_s17 v16- {-# INLINE rule453 #-}- {-# LINE 1213 "./src-ag/Transform.ag" #-}- rule453 = \ exports_ imports_ name_ ->- {-# LINE 1213 "./src-ag/Transform.ag" #-}- Just (name_, exports_, imports_)- {-# LINE 3700 "dist/build/Transform.hs"#-}- {-# INLINE rule454 #-}- rule454 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule455 #-}- rule455 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule456 #-}- rule456 = \ (_ :: ()) ->- []- {-# INLINE rule457 #-}- rule457 = \ (_ :: ()) ->- []- {-# INLINE rule458 #-}- rule458 = \ (_ :: ()) ->- []- {-# INLINE rule459 #-}- rule459 = \ (_ :: ()) ->- []- {-# INLINE rule460 #-}- rule460 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule461 #-}- rule461 = \ (_ :: ()) ->- []- {-# INLINE rule462 #-}- rule462 = \ (_ :: ()) ->- []- {-# INLINE rule463 #-}- rule463 = \ (_ :: ()) ->- []- {-# INLINE rule464 #-}- rule464 = \ (_ :: ()) ->- []- {-# INLINE rule465 #-}- rule465 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule466 #-}- rule466 = \ (_ :: ()) ->- []- {-# INLINE rule467 #-}- rule467 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule468 #-}- rule468 = \ (_ :: ()) ->- []- {-# INLINE rule469 #-}- rule469 = \ (_ :: ()) ->- []- {-# INLINE rule470 #-}- rule470 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule471 #-}- rule471 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule472 #-}- rule472 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule473 #-}- rule473 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule474 #-}- rule474 = \ (_ :: ()) ->- id- {-# INLINE rule475 #-}- rule475 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule476 #-}- rule476 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule477 #-}- rule477 = \ (_ :: ()) ->- []- {-# INLINE rule478 #-}- rule478 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule479 #-}- rule479 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule480 #-}- rule480 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule481 #-}- rule481 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule482 #-}- rule482 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets---- Elems ---------------------------------------------------------- wrapper-data Inh_Elems = Inh_Elems { allAttrDecls_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), allConstructors_Inh_Elems :: (Map NontermIdent (Set ConstructorIdent)), allFields_Inh_Elems :: (DataTypes), allNonterminals_Inh_Elems :: (Set NontermIdent), attrDecls_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), attrs_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), defSets_Inh_Elems :: (Map Identifier (Set NontermIdent,Set Identifier)), definedSets_Inh_Elems :: (DefinedSets), options_Inh_Elems :: (Options) }-data Syn_Elems = Syn_Elems { attrDecls_Syn_Elems :: (Map NontermIdent (Attributes, Attributes)), attrOrderCollect_Syn_Elems :: (AttrOrderMap), attrs_Syn_Elems :: (Map NontermIdent (Attributes, Attributes)), blocks_Syn_Elems :: (Blocks), collectedArounds_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedConParams_Syn_Elems :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Elems :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorsMap_Syn_Elems :: (Map NontermIdent (Set ConstructorIdent)), collectedFields_Syn_Elems :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedInsts_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMacros_Syn_Elems :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]), collectedMerges_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedNames_Syn_Elems :: (Set Identifier), collectedRules_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSetNames_Syn_Elems :: (Set Identifier), collectedSigs_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), ctxCollect_Syn_Elems :: (ContextMap), defSets_Syn_Elems :: (Map Identifier (Set NontermIdent,Set Identifier)), derivings_Syn_Elems :: (Derivings), errors_Syn_Elems :: (Seq Error), moduleDecl_Syn_Elems :: (Maybe (String,String,String)), paramsCollect_Syn_Elems :: (ParamMap), pragmas_Syn_Elems :: (Options -> Options), quantCollect_Syn_Elems :: (QuantMap), semPragmasCollect_Syn_Elems :: (PragmaMap), typeSyns_Syn_Elems :: (TypeSyns), useMap_Syn_Elems :: (Map NontermIdent (Map Identifier (String,String,String))), wrappers_Syn_Elems :: (Set NontermIdent) }-{-# INLINABLE wrap_Elems #-}-wrap_Elems :: T_Elems -> Inh_Elems -> (Syn_Elems )-wrap_Elems (T_Elems act) (Inh_Elems _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Elems_vIn19 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions- (T_Elems_vOut19 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers) <- return (inv_Elems_s20 sem arg)- return (Syn_Elems _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers)- )---- cata-{-# NOINLINE sem_Elems #-}-sem_Elems :: Elems -> T_Elems -sem_Elems list = Prelude.foldr sem_Elems_Cons sem_Elems_Nil (Prelude.map sem_Elem list)---- semantic domain-newtype T_Elems = T_Elems {- attach_T_Elems :: Identity (T_Elems_s20 )- }-newtype T_Elems_s20 = C_Elems_s20 {- inv_Elems_s20 :: (T_Elems_v19 )- }-data T_Elems_s21 = C_Elems_s21-type T_Elems_v19 = (T_Elems_vIn19 ) -> (T_Elems_vOut19 )-data T_Elems_vIn19 = T_Elems_vIn19 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Set ConstructorIdent)) (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map Identifier (Set NontermIdent,Set Identifier)) (DefinedSets) (Options)-data T_Elems_vOut19 = T_Elems_vOut19 (Map NontermIdent (Attributes, Attributes)) (AttrOrderMap) (Map NontermIdent (Attributes, Attributes)) (Blocks) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Map NontermIdent (Set ConstructorIdent)) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([(NontermIdent, ConstructorIdent, MaybeMacro)]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (ContextMap) (Map Identifier (Set NontermIdent,Set Identifier)) (Derivings) (Seq Error) (Maybe (String,String,String)) (ParamMap) (Options -> Options) (QuantMap) (PragmaMap) (TypeSyns) (Map NontermIdent (Map Identifier (String,String,String))) (Set NontermIdent)-{-# NOINLINE sem_Elems_Cons #-}-sem_Elems_Cons :: T_Elem -> T_Elems -> T_Elems -sem_Elems_Cons arg_hd_ arg_tl_ = T_Elems (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Elems_v19 - v19 = \ (T_Elems_vIn19 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _hdX17 = Control.Monad.Identity.runIdentity (attach_T_Elem (arg_hd_))- _tlX20 = Control.Monad.Identity.runIdentity (attach_T_Elems (arg_tl_))- (T_Elem_vOut16 _hdIattrDecls _hdIattrOrderCollect _hdIattrs _hdIblocks _hdIcollectedArounds _hdIcollectedAugments _hdIcollectedConParams _hdIcollectedConstraints _hdIcollectedConstructorsMap _hdIcollectedFields _hdIcollectedInsts _hdIcollectedMacros _hdIcollectedMerges _hdIcollectedNames _hdIcollectedRules _hdIcollectedSetNames _hdIcollectedSigs _hdIcollectedUniques _hdIctxCollect _hdIdefSets _hdIderivings _hdIerrors _hdImoduleDecl _hdIparamsCollect _hdIpragmas _hdIquantCollect _hdIsemPragmasCollect _hdItypeSyns _hdIuseMap _hdIwrappers) = inv_Elem_s17 _hdX17 (T_Elem_vIn16 _hdOallAttrDecls _hdOallAttrs _hdOallConstructors _hdOallFields _hdOallNonterminals _hdOattrDecls _hdOattrs _hdOdefSets _hdOdefinedSets _hdOoptions)- (T_Elems_vOut19 _tlIattrDecls _tlIattrOrderCollect _tlIattrs _tlIblocks _tlIcollectedArounds _tlIcollectedAugments _tlIcollectedConParams _tlIcollectedConstraints _tlIcollectedConstructorsMap _tlIcollectedFields _tlIcollectedInsts _tlIcollectedMacros _tlIcollectedMerges _tlIcollectedNames _tlIcollectedRules _tlIcollectedSetNames _tlIcollectedSigs _tlIcollectedUniques _tlIctxCollect _tlIdefSets _tlIderivings _tlIerrors _tlImoduleDecl _tlIparamsCollect _tlIpragmas _tlIquantCollect _tlIsemPragmasCollect _tlItypeSyns _tlIuseMap _tlIwrappers) = inv_Elems_s20 _tlX20 (T_Elems_vIn19 _tlOallAttrDecls _tlOallAttrs _tlOallConstructors _tlOallFields _tlOallNonterminals _tlOattrDecls _tlOattrs _tlOdefSets _tlOdefinedSets _tlOoptions)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule483 _hdIattrOrderCollect _tlIattrOrderCollect- _lhsOblocks :: Blocks- _lhsOblocks = rule484 _hdIblocks _tlIblocks- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule485 _hdIcollectedArounds _tlIcollectedArounds- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule486 _hdIcollectedAugments _tlIcollectedAugments- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule487 _hdIcollectedConParams _tlIcollectedConParams- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule488 _hdIcollectedConstraints _tlIcollectedConstraints- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule489 _hdIcollectedConstructorsMap _tlIcollectedConstructorsMap- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule490 _hdIcollectedFields _tlIcollectedFields- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule491 _hdIcollectedInsts _tlIcollectedInsts- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule492 _hdIcollectedMacros _tlIcollectedMacros- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule493 _hdIcollectedMerges _tlIcollectedMerges- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule494 _hdIcollectedNames _tlIcollectedNames- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule495 _hdIcollectedRules _tlIcollectedRules- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule496 _hdIcollectedSetNames _tlIcollectedSetNames- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule497 _hdIcollectedSigs _tlIcollectedSigs- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule498 _hdIcollectedUniques _tlIcollectedUniques- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule499 _hdIctxCollect _tlIctxCollect- _lhsOderivings :: Derivings- _lhsOderivings = rule500 _hdIderivings _tlIderivings- _lhsOerrors :: Seq Error- _lhsOerrors = rule501 _hdIerrors _tlIerrors- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule502 _hdImoduleDecl _tlImoduleDecl- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule503 _hdIparamsCollect _tlIparamsCollect- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule504 _hdIpragmas _tlIpragmas- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule505 _hdIquantCollect _tlIquantCollect- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule506 _hdIsemPragmasCollect _tlIsemPragmasCollect- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule507 _hdItypeSyns _tlItypeSyns- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule508 _hdIuseMap _tlIuseMap- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule509 _hdIwrappers _tlIwrappers- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule510 _tlIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule511 _tlIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule512 _tlIdefSets- _hdOallAttrDecls = rule513 _lhsIallAttrDecls- _hdOallAttrs = rule514 _lhsIallAttrs- _hdOallConstructors = rule515 _lhsIallConstructors- _hdOallFields = rule516 _lhsIallFields- _hdOallNonterminals = rule517 _lhsIallNonterminals- _hdOattrDecls = rule518 _lhsIattrDecls- _hdOattrs = rule519 _lhsIattrs- _hdOdefSets = rule520 _lhsIdefSets- _hdOdefinedSets = rule521 _lhsIdefinedSets- _hdOoptions = rule522 _lhsIoptions- _tlOallAttrDecls = rule523 _lhsIallAttrDecls- _tlOallAttrs = rule524 _lhsIallAttrs- _tlOallConstructors = rule525 _lhsIallConstructors- _tlOallFields = rule526 _lhsIallFields- _tlOallNonterminals = rule527 _lhsIallNonterminals- _tlOattrDecls = rule528 _hdIattrDecls- _tlOattrs = rule529 _hdIattrs- _tlOdefSets = rule530 _hdIdefSets- _tlOdefinedSets = rule531 _lhsIdefinedSets- _tlOoptions = rule532 _lhsIoptions- __result_ = T_Elems_vOut19 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elems_s20 v19- {-# INLINE rule483 #-}- rule483 = \ ((_hdIattrOrderCollect) :: AttrOrderMap) ((_tlIattrOrderCollect) :: AttrOrderMap) ->- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# INLINE rule484 #-}- rule484 = \ ((_hdIblocks) :: Blocks) ((_tlIblocks) :: Blocks) ->- _hdIblocks `mapUnionWithPlusPlus` _tlIblocks- {-# INLINE rule485 #-}- rule485 = \ ((_hdIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ((_tlIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# INLINE rule486 #-}- rule486 = \ ((_hdIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ((_tlIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# INLINE rule487 #-}- rule487 = \ ((_hdIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ((_tlIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->- _hdIcollectedConParams ++ _tlIcollectedConParams- {-# INLINE rule488 #-}- rule488 = \ ((_hdIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ((_tlIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->- _hdIcollectedConstraints ++ _tlIcollectedConstraints- {-# INLINE rule489 #-}- rule489 = \ ((_hdIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ((_tlIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ->- _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap- {-# INLINE rule490 #-}- rule490 = \ ((_hdIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ((_tlIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->- _hdIcollectedFields ++ _tlIcollectedFields- {-# INLINE rule491 #-}- rule491 = \ ((_hdIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ((_tlIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# INLINE rule492 #-}- rule492 = \ ((_hdIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ((_tlIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->- _hdIcollectedMacros ++ _tlIcollectedMacros- {-# INLINE rule493 #-}- rule493 = \ ((_hdIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ((_tlIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->- _hdIcollectedMerges ++ _tlIcollectedMerges- {-# INLINE rule494 #-}- rule494 = \ ((_hdIcollectedNames) :: Set Identifier) ((_tlIcollectedNames) :: Set Identifier) ->- _hdIcollectedNames `Set.union` _tlIcollectedNames- {-# INLINE rule495 #-}- rule495 = \ ((_hdIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ((_tlIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->- _hdIcollectedRules ++ _tlIcollectedRules- {-# INLINE rule496 #-}- rule496 = \ ((_hdIcollectedSetNames) :: Set Identifier) ((_tlIcollectedSetNames) :: Set Identifier) ->- _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames- {-# INLINE rule497 #-}- rule497 = \ ((_hdIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_tlIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# INLINE rule498 #-}- rule498 = \ ((_hdIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ((_tlIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# INLINE rule499 #-}- rule499 = \ ((_hdIctxCollect) :: ContextMap) ((_tlIctxCollect) :: ContextMap) ->- _hdIctxCollect `mergeCtx` _tlIctxCollect- {-# INLINE rule500 #-}- rule500 = \ ((_hdIderivings) :: Derivings) ((_tlIderivings) :: Derivings) ->- _hdIderivings `mergeDerivings` _tlIderivings- {-# INLINE rule501 #-}- rule501 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule502 #-}- rule502 = \ ((_hdImoduleDecl) :: Maybe (String,String,String)) ((_tlImoduleDecl) :: Maybe (String,String,String)) ->- _hdImoduleDecl `flipmplus` _tlImoduleDecl- {-# INLINE rule503 #-}- rule503 = \ ((_hdIparamsCollect) :: ParamMap) ((_tlIparamsCollect) :: ParamMap) ->- _hdIparamsCollect `mergeParams` _tlIparamsCollect- {-# INLINE rule504 #-}- rule504 = \ ((_hdIpragmas) :: Options -> Options) ((_tlIpragmas) :: Options -> Options) ->- _hdIpragmas . _tlIpragmas- {-# INLINE rule505 #-}- rule505 = \ ((_hdIquantCollect) :: QuantMap) ((_tlIquantCollect) :: QuantMap) ->- _hdIquantCollect `mergeQuant` _tlIquantCollect- {-# INLINE rule506 #-}- rule506 = \ ((_hdIsemPragmasCollect) :: PragmaMap) ((_tlIsemPragmasCollect) :: PragmaMap) ->- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# INLINE rule507 #-}- rule507 = \ ((_hdItypeSyns) :: TypeSyns) ((_tlItypeSyns) :: TypeSyns) ->- _hdItypeSyns ++ _tlItypeSyns- {-# INLINE rule508 #-}- rule508 = \ ((_hdIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ((_tlIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->- _hdIuseMap `merge` _tlIuseMap- {-# INLINE rule509 #-}- rule509 = \ ((_hdIwrappers) :: Set NontermIdent) ((_tlIwrappers) :: Set NontermIdent) ->- _hdIwrappers `Set.union` _tlIwrappers- {-# INLINE rule510 #-}- rule510 = \ ((_tlIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _tlIattrDecls- {-# INLINE rule511 #-}- rule511 = \ ((_tlIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _tlIattrs- {-# INLINE rule512 #-}- rule512 = \ ((_tlIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _tlIdefSets- {-# INLINE rule513 #-}- rule513 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrDecls- {-# INLINE rule514 #-}- rule514 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrs- {-# INLINE rule515 #-}- rule515 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->- _lhsIallConstructors- {-# INLINE rule516 #-}- rule516 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule517 #-}- rule517 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule518 #-}- rule518 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule519 #-}- rule519 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule520 #-}- rule520 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets- {-# INLINE rule521 #-}- rule521 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule522 #-}- rule522 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule523 #-}- rule523 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrDecls- {-# INLINE rule524 #-}- rule524 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrs- {-# INLINE rule525 #-}- rule525 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->- _lhsIallConstructors- {-# INLINE rule526 #-}- rule526 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule527 #-}- rule527 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule528 #-}- rule528 = \ ((_hdIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _hdIattrDecls- {-# INLINE rule529 #-}- rule529 = \ ((_hdIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _hdIattrs- {-# INLINE rule530 #-}- rule530 = \ ((_hdIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _hdIdefSets- {-# INLINE rule531 #-}- rule531 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule532 #-}- rule532 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions-{-# NOINLINE sem_Elems_Nil #-}-sem_Elems_Nil :: T_Elems -sem_Elems_Nil = T_Elems (return st20) where- {-# NOINLINE st20 #-}- st20 = let- v19 :: T_Elems_v19 - v19 = \ (T_Elems_vIn19 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule533 ()- _lhsOblocks :: Blocks- _lhsOblocks = rule534 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule535 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule536 ()- _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]- _lhsOcollectedConParams = rule537 ()- _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]- _lhsOcollectedConstraints = rule538 ()- _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)- _lhsOcollectedConstructorsMap = rule539 ()- _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]- _lhsOcollectedFields = rule540 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule541 ()- _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]- _lhsOcollectedMacros = rule542 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule543 ()- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule544 ()- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule545 ()- _lhsOcollectedSetNames :: Set Identifier- _lhsOcollectedSetNames = rule546 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule547 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule548 ()- _lhsOctxCollect :: ContextMap- _lhsOctxCollect = rule549 ()- _lhsOderivings :: Derivings- _lhsOderivings = rule550 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule551 ()- _lhsOmoduleDecl :: Maybe (String,String,String)- _lhsOmoduleDecl = rule552 ()- _lhsOparamsCollect :: ParamMap- _lhsOparamsCollect = rule553 ()- _lhsOpragmas :: Options -> Options- _lhsOpragmas = rule554 ()- _lhsOquantCollect :: QuantMap- _lhsOquantCollect = rule555 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule556 ()- _lhsOtypeSyns :: TypeSyns- _lhsOtypeSyns = rule557 ()- _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))- _lhsOuseMap = rule558 ()- _lhsOwrappers :: Set NontermIdent- _lhsOwrappers = rule559 ()- _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)- _lhsOattrDecls = rule560 _lhsIattrDecls- _lhsOattrs :: Map NontermIdent (Attributes, Attributes)- _lhsOattrs = rule561 _lhsIattrs- _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)- _lhsOdefSets = rule562 _lhsIdefSets- __result_ = T_Elems_vOut19 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers- in __result_ )- in C_Elems_s20 v19- {-# INLINE rule533 #-}- rule533 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule534 #-}- rule534 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule535 #-}- rule535 = \ (_ :: ()) ->- []- {-# INLINE rule536 #-}- rule536 = \ (_ :: ()) ->- []- {-# INLINE rule537 #-}- rule537 = \ (_ :: ()) ->- []- {-# INLINE rule538 #-}- rule538 = \ (_ :: ()) ->- []- {-# INLINE rule539 #-}- rule539 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule540 #-}- rule540 = \ (_ :: ()) ->- []- {-# INLINE rule541 #-}- rule541 = \ (_ :: ()) ->- []- {-# INLINE rule542 #-}- rule542 = \ (_ :: ()) ->- []- {-# INLINE rule543 #-}- rule543 = \ (_ :: ()) ->- []- {-# INLINE rule544 #-}- rule544 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule545 #-}- rule545 = \ (_ :: ()) ->- []- {-# INLINE rule546 #-}- rule546 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule547 #-}- rule547 = \ (_ :: ()) ->- []- {-# INLINE rule548 #-}- rule548 = \ (_ :: ()) ->- []- {-# INLINE rule549 #-}- rule549 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule550 #-}- rule550 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule551 #-}- rule551 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule552 #-}- rule552 = \ (_ :: ()) ->- mzero- {-# INLINE rule553 #-}- rule553 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule554 #-}- rule554 = \ (_ :: ()) ->- id- {-# INLINE rule555 #-}- rule555 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule556 #-}- rule556 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule557 #-}- rule557 = \ (_ :: ()) ->- []- {-# INLINE rule558 #-}- rule558 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule559 #-}- rule559 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule560 #-}- rule560 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrDecls- {-# INLINE rule561 #-}- rule561 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIattrs- {-# INLINE rule562 #-}- rule562 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->- _lhsIdefSets---- Field ---------------------------------------------------------- wrapper-data Inh_Field = Inh_Field { allNonterminals_Inh_Field :: (Set NontermIdent) }-data Syn_Field = Syn_Field { collectedConstraints_Syn_Field :: ([Type]), collectedFields_Syn_Field :: ([(Identifier, Type)]) }-{-# INLINABLE wrap_Field #-}-wrap_Field :: T_Field -> Inh_Field -> (Syn_Field )-wrap_Field (T_Field act) (Inh_Field _lhsIallNonterminals) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Field_vIn22 _lhsIallNonterminals- (T_Field_vOut22 _lhsOcollectedConstraints _lhsOcollectedFields) <- return (inv_Field_s23 sem arg)- return (Syn_Field _lhsOcollectedConstraints _lhsOcollectedFields)- )---- cata-{-# NOINLINE sem_Field #-}-sem_Field :: Field -> T_Field -sem_Field ( FChild name_ tp_ ) = sem_Field_FChild name_ tp_-sem_Field ( FCtx tps_ ) = sem_Field_FCtx tps_---- semantic domain-newtype T_Field = T_Field {- attach_T_Field :: Identity (T_Field_s23 )- }-newtype T_Field_s23 = C_Field_s23 {- inv_Field_s23 :: (T_Field_v22 )- }-data T_Field_s24 = C_Field_s24-type T_Field_v22 = (T_Field_vIn22 ) -> (T_Field_vOut22 )-data T_Field_vIn22 = T_Field_vIn22 (Set NontermIdent)-data T_Field_vOut22 = T_Field_vOut22 ([Type]) ([(Identifier, Type)])-{-# NOINLINE sem_Field_FChild #-}-sem_Field_FChild :: (Identifier) -> (Type) -> T_Field -sem_Field_FChild arg_name_ arg_tp_ = T_Field (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_Field_v22 - v22 = \ (T_Field_vIn22 _lhsIallNonterminals) -> ( let- _lhsOcollectedFields :: [(Identifier, Type)]- _lhsOcollectedFields = rule563 _lhsIallNonterminals arg_name_ arg_tp_- _lhsOcollectedConstraints :: [Type]- _lhsOcollectedConstraints = rule564 ()- __result_ = T_Field_vOut22 _lhsOcollectedConstraints _lhsOcollectedFields- in __result_ )- in C_Field_s23 v22- {-# INLINE rule563 #-}- {-# LINE 579 "./src-ag/Transform.ag" #-}- rule563 = \ ((_lhsIallNonterminals) :: Set NontermIdent) name_ tp_ ->- {-# LINE 579 "./src-ag/Transform.ag" #-}- [(name_, makeType _lhsIallNonterminals tp_)]- {-# LINE 4274 "dist/build/Transform.hs"#-}- {-# INLINE rule564 #-}- rule564 = \ (_ :: ()) ->- []-{-# NOINLINE sem_Field_FCtx #-}-sem_Field_FCtx :: ([Type]) -> T_Field -sem_Field_FCtx arg_tps_ = T_Field (return st23) where- {-# NOINLINE st23 #-}- st23 = let- v22 :: T_Field_v22 - v22 = \ (T_Field_vIn22 _lhsIallNonterminals) -> ( let- _lhsOcollectedConstraints :: [Type]- _lhsOcollectedConstraints = rule565 arg_tps_- _lhsOcollectedFields :: [(Identifier, Type)]- _lhsOcollectedFields = rule566 ()- __result_ = T_Field_vOut22 _lhsOcollectedConstraints _lhsOcollectedFields- in __result_ )- in C_Field_s23 v22- {-# INLINE rule565 #-}- {-# LINE 588 "./src-ag/Transform.ag" #-}- rule565 = \ tps_ ->- {-# LINE 588 "./src-ag/Transform.ag" #-}- tps_- {-# LINE 4297 "dist/build/Transform.hs"#-}- {-# INLINE rule566 #-}- rule566 = \ (_ :: ()) ->- []---- Fields --------------------------------------------------------- wrapper-data Inh_Fields = Inh_Fields { allNonterminals_Inh_Fields :: (Set NontermIdent) }-data Syn_Fields = Syn_Fields { collectedConstraints_Syn_Fields :: ([Type]), collectedFields_Syn_Fields :: ([(Identifier, Type)]) }-{-# INLINABLE wrap_Fields #-}-wrap_Fields :: T_Fields -> Inh_Fields -> (Syn_Fields )-wrap_Fields (T_Fields act) (Inh_Fields _lhsIallNonterminals) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Fields_vIn25 _lhsIallNonterminals- (T_Fields_vOut25 _lhsOcollectedConstraints _lhsOcollectedFields) <- return (inv_Fields_s26 sem arg)- return (Syn_Fields _lhsOcollectedConstraints _lhsOcollectedFields)- )---- cata-{-# NOINLINE sem_Fields #-}-sem_Fields :: Fields -> T_Fields -sem_Fields list = Prelude.foldr sem_Fields_Cons sem_Fields_Nil (Prelude.map sem_Field list)---- semantic domain-newtype T_Fields = T_Fields {- attach_T_Fields :: Identity (T_Fields_s26 )- }-newtype T_Fields_s26 = C_Fields_s26 {- inv_Fields_s26 :: (T_Fields_v25 )- }-data T_Fields_s27 = C_Fields_s27-type T_Fields_v25 = (T_Fields_vIn25 ) -> (T_Fields_vOut25 )-data T_Fields_vIn25 = T_Fields_vIn25 (Set NontermIdent)-data T_Fields_vOut25 = T_Fields_vOut25 ([Type]) ([(Identifier, Type)])-{-# NOINLINE sem_Fields_Cons #-}-sem_Fields_Cons :: T_Field -> T_Fields -> T_Fields -sem_Fields_Cons arg_hd_ arg_tl_ = T_Fields (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_Fields_v25 - v25 = \ (T_Fields_vIn25 _lhsIallNonterminals) -> ( let- _hdX23 = Control.Monad.Identity.runIdentity (attach_T_Field (arg_hd_))- _tlX26 = Control.Monad.Identity.runIdentity (attach_T_Fields (arg_tl_))- (T_Field_vOut22 _hdIcollectedConstraints _hdIcollectedFields) = inv_Field_s23 _hdX23 (T_Field_vIn22 _hdOallNonterminals)- (T_Fields_vOut25 _tlIcollectedConstraints _tlIcollectedFields) = inv_Fields_s26 _tlX26 (T_Fields_vIn25 _tlOallNonterminals)- _lhsOcollectedConstraints :: [Type]- _lhsOcollectedConstraints = rule567 _hdIcollectedConstraints _tlIcollectedConstraints- _lhsOcollectedFields :: [(Identifier, Type)]- _lhsOcollectedFields = rule568 _hdIcollectedFields _tlIcollectedFields- _hdOallNonterminals = rule569 _lhsIallNonterminals- _tlOallNonterminals = rule570 _lhsIallNonterminals- __result_ = T_Fields_vOut25 _lhsOcollectedConstraints _lhsOcollectedFields- in __result_ )- in C_Fields_s26 v25- {-# INLINE rule567 #-}- rule567 = \ ((_hdIcollectedConstraints) :: [Type]) ((_tlIcollectedConstraints) :: [Type]) ->- _hdIcollectedConstraints ++ _tlIcollectedConstraints- {-# INLINE rule568 #-}- rule568 = \ ((_hdIcollectedFields) :: [(Identifier, Type)]) ((_tlIcollectedFields) :: [(Identifier, Type)]) ->- _hdIcollectedFields ++ _tlIcollectedFields- {-# INLINE rule569 #-}- rule569 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule570 #-}- rule570 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals-{-# NOINLINE sem_Fields_Nil #-}-sem_Fields_Nil :: T_Fields -sem_Fields_Nil = T_Fields (return st26) where- {-# NOINLINE st26 #-}- st26 = let- v25 :: T_Fields_v25 - v25 = \ (T_Fields_vIn25 _lhsIallNonterminals) -> ( let- _lhsOcollectedConstraints :: [Type]- _lhsOcollectedConstraints = rule571 ()- _lhsOcollectedFields :: [(Identifier, Type)]- _lhsOcollectedFields = rule572 ()- __result_ = T_Fields_vOut25 _lhsOcollectedConstraints _lhsOcollectedFields- in __result_ )- in C_Fields_s26 v25- {-# INLINE rule571 #-}- rule571 = \ (_ :: ()) ->- []- {-# INLINE rule572 #-}- rule572 = \ (_ :: ()) ->- []---- NontSet -------------------------------------------------------- wrapper-data Inh_NontSet = Inh_NontSet { allFields_Inh_NontSet :: (DataTypes), allNonterminals_Inh_NontSet :: (Set NontermIdent), definedSets_Inh_NontSet :: (DefinedSets) }-data Syn_NontSet = Syn_NontSet { collectedNames_Syn_NontSet :: (Set Identifier), errors_Syn_NontSet :: (Seq Error), nontSet_Syn_NontSet :: (Set NontermIdent) }-{-# INLINABLE wrap_NontSet #-}-wrap_NontSet :: T_NontSet -> Inh_NontSet -> (Syn_NontSet )-wrap_NontSet (T_NontSet act) (Inh_NontSet _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets- (T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet) <- return (inv_NontSet_s29 sem arg)- return (Syn_NontSet _lhsOcollectedNames _lhsOerrors _lhsOnontSet)- )---- cata-{-# NOINLINE sem_NontSet #-}-sem_NontSet :: NontSet -> T_NontSet -sem_NontSet ( NamedSet name_ ) = sem_NontSet_NamedSet name_-sem_NontSet ( All ) = sem_NontSet_All -sem_NontSet ( Union set1_ set2_ ) = sem_NontSet_Union ( sem_NontSet set1_ ) ( sem_NontSet set2_ )-sem_NontSet ( Intersect set1_ set2_ ) = sem_NontSet_Intersect ( sem_NontSet set1_ ) ( sem_NontSet set2_ )-sem_NontSet ( Difference set1_ set2_ ) = sem_NontSet_Difference ( sem_NontSet set1_ ) ( sem_NontSet set2_ )-sem_NontSet ( Path from_ to_ ) = sem_NontSet_Path from_ to_---- semantic domain-newtype T_NontSet = T_NontSet {- attach_T_NontSet :: Identity (T_NontSet_s29 )- }-newtype T_NontSet_s29 = C_NontSet_s29 {- inv_NontSet_s29 :: (T_NontSet_v28 )- }-data T_NontSet_s30 = C_NontSet_s30-type T_NontSet_v28 = (T_NontSet_vIn28 ) -> (T_NontSet_vOut28 )-data T_NontSet_vIn28 = T_NontSet_vIn28 (DataTypes) (Set NontermIdent) (DefinedSets)-data T_NontSet_vOut28 = T_NontSet_vOut28 (Set Identifier) (Seq Error) (Set NontermIdent)-{-# NOINLINE sem_NontSet_NamedSet #-}-sem_NontSet_NamedSet :: (NontermIdent) -> T_NontSet -sem_NontSet_NamedSet arg_name_ = T_NontSet (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_NontSet_v28 - v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule573 arg_name_- (_nontSet,_errors) = rule574 _lhsIdefinedSets arg_name_- _lhsOerrors :: Seq Error- _lhsOerrors = rule575 _errors- _lhsOnontSet :: Set NontermIdent- _lhsOnontSet = rule576 _nontSet- __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet- in __result_ )- in C_NontSet_s29 v28- {-# INLINE rule573 #-}- {-# LINE 603 "./src-ag/Transform.ag" #-}- rule573 = \ name_ ->- {-# LINE 603 "./src-ag/Transform.ag" #-}- Set.singleton name_- {-# LINE 4442 "dist/build/Transform.hs"#-}- {-# INLINE rule574 #-}- {-# LINE 733 "./src-ag/Transform.ag" #-}- rule574 = \ ((_lhsIdefinedSets) :: DefinedSets) name_ ->- {-# LINE 733 "./src-ag/Transform.ag" #-}- case Map.lookup name_ _lhsIdefinedSets of- Nothing -> (Set.empty, Seq.singleton (UndefNont name_))- Just set -> (set, Seq.empty)- {-# LINE 4450 "dist/build/Transform.hs"#-}- {-# INLINE rule575 #-}- rule575 = \ _errors ->- _errors- {-# INLINE rule576 #-}- rule576 = \ _nontSet ->- _nontSet-{-# NOINLINE sem_NontSet_All #-}-sem_NontSet_All :: T_NontSet -sem_NontSet_All = T_NontSet (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_NontSet_v28 - v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let- _lhsOnontSet :: Set NontermIdent- _lhsOnontSet = rule577 _lhsIallNonterminals- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule578 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule579 ()- __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet- in __result_ )- in C_NontSet_s29 v28- {-# INLINE rule577 #-}- {-# LINE 732 "./src-ag/Transform.ag" #-}- rule577 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- {-# LINE 732 "./src-ag/Transform.ag" #-}- _lhsIallNonterminals- {-# LINE 4478 "dist/build/Transform.hs"#-}- {-# INLINE rule578 #-}- rule578 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule579 #-}- rule579 = \ (_ :: ()) ->- Seq.empty-{-# NOINLINE sem_NontSet_Union #-}-sem_NontSet_Union :: T_NontSet -> T_NontSet -> T_NontSet -sem_NontSet_Union arg_set1_ arg_set2_ = T_NontSet (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_NontSet_v28 - v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let- _set1X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set1_))- _set2X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set2_))- (T_NontSet_vOut28 _set1IcollectedNames _set1Ierrors _set1InontSet) = inv_NontSet_s29 _set1X29 (T_NontSet_vIn28 _set1OallFields _set1OallNonterminals _set1OdefinedSets)- (T_NontSet_vOut28 _set2IcollectedNames _set2Ierrors _set2InontSet) = inv_NontSet_s29 _set2X29 (T_NontSet_vIn28 _set2OallFields _set2OallNonterminals _set2OdefinedSets)- _lhsOnontSet :: Set NontermIdent- _lhsOnontSet = rule580 _set1InontSet _set2InontSet- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule581 _set1IcollectedNames _set2IcollectedNames- _lhsOerrors :: Seq Error- _lhsOerrors = rule582 _set1Ierrors _set2Ierrors- _set1OallFields = rule583 _lhsIallFields- _set1OallNonterminals = rule584 _lhsIallNonterminals- _set1OdefinedSets = rule585 _lhsIdefinedSets- _set2OallFields = rule586 _lhsIallFields- _set2OallNonterminals = rule587 _lhsIallNonterminals- _set2OdefinedSets = rule588 _lhsIdefinedSets- __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet- in __result_ )- in C_NontSet_s29 v28- {-# INLINE rule580 #-}- {-# LINE 736 "./src-ag/Transform.ag" #-}- rule580 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->- {-# LINE 736 "./src-ag/Transform.ag" #-}- Set.union _set1InontSet _set2InontSet- {-# LINE 4516 "dist/build/Transform.hs"#-}- {-# INLINE rule581 #-}- rule581 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# INLINE rule582 #-}- rule582 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->- _set1Ierrors Seq.>< _set2Ierrors- {-# INLINE rule583 #-}- rule583 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule584 #-}- rule584 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule585 #-}- rule585 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule586 #-}- rule586 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule587 #-}- rule587 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule588 #-}- rule588 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_NontSet_Intersect #-}-sem_NontSet_Intersect :: T_NontSet -> T_NontSet -> T_NontSet -sem_NontSet_Intersect arg_set1_ arg_set2_ = T_NontSet (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_NontSet_v28 - v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let- _set1X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set1_))- _set2X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set2_))- (T_NontSet_vOut28 _set1IcollectedNames _set1Ierrors _set1InontSet) = inv_NontSet_s29 _set1X29 (T_NontSet_vIn28 _set1OallFields _set1OallNonterminals _set1OdefinedSets)- (T_NontSet_vOut28 _set2IcollectedNames _set2Ierrors _set2InontSet) = inv_NontSet_s29 _set2X29 (T_NontSet_vIn28 _set2OallFields _set2OallNonterminals _set2OdefinedSets)- _lhsOnontSet :: Set NontermIdent- _lhsOnontSet = rule589 _set1InontSet _set2InontSet- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule590 _set1IcollectedNames _set2IcollectedNames- _lhsOerrors :: Seq Error- _lhsOerrors = rule591 _set1Ierrors _set2Ierrors- _set1OallFields = rule592 _lhsIallFields- _set1OallNonterminals = rule593 _lhsIallNonterminals- _set1OdefinedSets = rule594 _lhsIdefinedSets- _set2OallFields = rule595 _lhsIallFields- _set2OallNonterminals = rule596 _lhsIallNonterminals- _set2OdefinedSets = rule597 _lhsIdefinedSets- __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet- in __result_ )- in C_NontSet_s29 v28- {-# INLINE rule589 #-}- {-# LINE 737 "./src-ag/Transform.ag" #-}- rule589 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->- {-# LINE 737 "./src-ag/Transform.ag" #-}- Set.intersection _set1InontSet _set2InontSet- {-# LINE 4572 "dist/build/Transform.hs"#-}- {-# INLINE rule590 #-}- rule590 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# INLINE rule591 #-}- rule591 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->- _set1Ierrors Seq.>< _set2Ierrors- {-# INLINE rule592 #-}- rule592 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule593 #-}- rule593 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule594 #-}- rule594 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule595 #-}- rule595 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule596 #-}- rule596 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule597 #-}- rule597 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_NontSet_Difference #-}-sem_NontSet_Difference :: T_NontSet -> T_NontSet -> T_NontSet -sem_NontSet_Difference arg_set1_ arg_set2_ = T_NontSet (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_NontSet_v28 - v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let- _set1X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set1_))- _set2X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set2_))- (T_NontSet_vOut28 _set1IcollectedNames _set1Ierrors _set1InontSet) = inv_NontSet_s29 _set1X29 (T_NontSet_vIn28 _set1OallFields _set1OallNonterminals _set1OdefinedSets)- (T_NontSet_vOut28 _set2IcollectedNames _set2Ierrors _set2InontSet) = inv_NontSet_s29 _set2X29 (T_NontSet_vIn28 _set2OallFields _set2OallNonterminals _set2OdefinedSets)- _lhsOnontSet :: Set NontermIdent- _lhsOnontSet = rule598 _set1InontSet _set2InontSet- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule599 _set1IcollectedNames _set2IcollectedNames- _lhsOerrors :: Seq Error- _lhsOerrors = rule600 _set1Ierrors _set2Ierrors- _set1OallFields = rule601 _lhsIallFields- _set1OallNonterminals = rule602 _lhsIallNonterminals- _set1OdefinedSets = rule603 _lhsIdefinedSets- _set2OallFields = rule604 _lhsIallFields- _set2OallNonterminals = rule605 _lhsIallNonterminals- _set2OdefinedSets = rule606 _lhsIdefinedSets- __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet- in __result_ )- in C_NontSet_s29 v28- {-# INLINE rule598 #-}- {-# LINE 738 "./src-ag/Transform.ag" #-}- rule598 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->- {-# LINE 738 "./src-ag/Transform.ag" #-}- Set.difference _set1InontSet _set2InontSet- {-# LINE 4628 "dist/build/Transform.hs"#-}- {-# INLINE rule599 #-}- rule599 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->- _set1IcollectedNames `Set.union` _set2IcollectedNames- {-# INLINE rule600 #-}- rule600 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->- _set1Ierrors Seq.>< _set2Ierrors- {-# INLINE rule601 #-}- rule601 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule602 #-}- rule602 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule603 #-}- rule603 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets- {-# INLINE rule604 #-}- rule604 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule605 #-}- rule605 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->- _lhsIallNonterminals- {-# INLINE rule606 #-}- rule606 = \ ((_lhsIdefinedSets) :: DefinedSets) ->- _lhsIdefinedSets-{-# NOINLINE sem_NontSet_Path #-}-sem_NontSet_Path :: (NontermIdent) -> (NontermIdent) -> T_NontSet -sem_NontSet_Path arg_from_ arg_to_ = T_NontSet (return st29) where- {-# NOINLINE st29 #-}- st29 = let- v28 :: T_NontSet_v28 - v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let- _lhsOnontSet :: Set NontermIdent- _lhsOnontSet = rule607 _lhsIallFields arg_from_ arg_to_- _lhsOerrors :: Seq Error- _lhsOerrors = rule608 _lhsIallNonterminals arg_from_ arg_to_- _lhsOcollectedNames :: Set Identifier- _lhsOcollectedNames = rule609 ()- __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet- in __result_ )- in C_NontSet_s29 v28- {-# INLINE rule607 #-}- {-# LINE 739 "./src-ag/Transform.ag" #-}- rule607 = \ ((_lhsIallFields) :: DataTypes) from_ to_ ->- {-# LINE 739 "./src-ag/Transform.ag" #-}- let table = flattenDatas _lhsIallFields- in path table from_ to_- {-# LINE 4675 "dist/build/Transform.hs"#-}- {-# INLINE rule608 #-}- {-# LINE 741 "./src-ag/Transform.ag" #-}- rule608 = \ ((_lhsIallNonterminals) :: Set NontermIdent) from_ to_ ->- {-# LINE 741 "./src-ag/Transform.ag" #-}- let check name | Set.member name _lhsIallNonterminals- = Seq.empty- | otherwise = Seq.singleton (UndefNont name)- in check from_ >< check to_- {-# LINE 4684 "dist/build/Transform.hs"#-}- {-# INLINE rule609 #-}- rule609 = \ (_ :: ()) ->- Set.empty---- Pattern -------------------------------------------------------- wrapper-data Inh_Pattern = Inh_Pattern { }-data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: (Pattern), definedAttrs_Syn_Pattern :: ([AttrName]), definedInsts_Syn_Pattern :: ([Identifier]), patunder_Syn_Pattern :: ([AttrName]->Pattern), stpos_Syn_Pattern :: (Pos) }-{-# INLINABLE wrap_Pattern #-}-wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )-wrap_Pattern (T_Pattern act) (Inh_Pattern ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Pattern_vIn31 - (T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos) <- return (inv_Pattern_s32 sem arg)- return (Syn_Pattern _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos)- )---- cata-{-# NOINLINE sem_Pattern #-}-sem_Pattern :: Pattern -> T_Pattern -sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )-sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )-sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )-sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )-sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_---- semantic domain-newtype T_Pattern = T_Pattern {- attach_T_Pattern :: Identity (T_Pattern_s32 )- }-newtype T_Pattern_s32 = C_Pattern_s32 {- inv_Pattern_s32 :: (T_Pattern_v31 )- }-data T_Pattern_s33 = C_Pattern_s33-type T_Pattern_v31 = (T_Pattern_vIn31 ) -> (T_Pattern_vOut31 )-data T_Pattern_vIn31 = T_Pattern_vIn31 -data T_Pattern_vOut31 = T_Pattern_vOut31 (Pattern) ([AttrName]) ([Identifier]) ([AttrName]->Pattern) (Pos)-{-# NOINLINE sem_Pattern_Constr #-}-sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern -sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_Pattern_v31 - v31 = \ (T_Pattern_vIn31 ) -> ( let- _patsX35 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut34 _patsIcopy _patsIdefinedAttrs _patsIdefinedInsts _patsIpatunder) = inv_Patterns_s35 _patsX35 (T_Patterns_vIn34 )- _lhsOpatunder :: [AttrName]->Pattern- _lhsOpatunder = rule610 _patsIpatunder arg_name_- _lhsOstpos :: Pos- _lhsOstpos = rule611 arg_name_- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule612 _patsIdefinedAttrs- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule613 _patsIdefinedInsts- _copy = rule614 _patsIcopy arg_name_- _lhsOcopy :: Pattern- _lhsOcopy = rule615 _copy- __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos- in __result_ )- in C_Pattern_s32 v31- {-# INLINE rule610 #-}- {-# LINE 1189 "./src-ag/Transform.ag" #-}- rule610 = \ ((_patsIpatunder) :: [AttrName]->Patterns) name_ ->- {-# LINE 1189 "./src-ag/Transform.ag" #-}- \us -> Constr name_ (_patsIpatunder us)- {-# LINE 4751 "dist/build/Transform.hs"#-}- {-# INLINE rule611 #-}- {-# LINE 1200 "./src-ag/Transform.ag" #-}- rule611 = \ name_ ->- {-# LINE 1200 "./src-ag/Transform.ag" #-}- getPos name_- {-# LINE 4757 "dist/build/Transform.hs"#-}- {-# INLINE rule612 #-}- rule612 = \ ((_patsIdefinedAttrs) :: [AttrName]) ->- _patsIdefinedAttrs- {-# INLINE rule613 #-}- rule613 = \ ((_patsIdefinedInsts) :: [Identifier]) ->- _patsIdefinedInsts- {-# INLINE rule614 #-}- rule614 = \ ((_patsIcopy) :: Patterns) name_ ->- Constr name_ _patsIcopy- {-# INLINE rule615 #-}- rule615 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Product #-}-sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern -sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_Pattern_v31 - v31 = \ (T_Pattern_vIn31 ) -> ( let- _patsX35 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))- (T_Patterns_vOut34 _patsIcopy _patsIdefinedAttrs _patsIdefinedInsts _patsIpatunder) = inv_Patterns_s35 _patsX35 (T_Patterns_vIn34 )- _lhsOpatunder :: [AttrName]->Pattern- _lhsOpatunder = rule616 _patsIpatunder arg_pos_- _lhsOstpos :: Pos- _lhsOstpos = rule617 arg_pos_- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule618 _patsIdefinedAttrs- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule619 _patsIdefinedInsts- _copy = rule620 _patsIcopy arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule621 _copy- __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos- in __result_ )- in C_Pattern_s32 v31- {-# INLINE rule616 #-}- {-# LINE 1190 "./src-ag/Transform.ag" #-}- rule616 = \ ((_patsIpatunder) :: [AttrName]->Patterns) pos_ ->- {-# LINE 1190 "./src-ag/Transform.ag" #-}- \us -> Product pos_ (_patsIpatunder us)- {-# LINE 4798 "dist/build/Transform.hs"#-}- {-# INLINE rule617 #-}- {-# LINE 1201 "./src-ag/Transform.ag" #-}- rule617 = \ pos_ ->- {-# LINE 1201 "./src-ag/Transform.ag" #-}- pos_- {-# LINE 4804 "dist/build/Transform.hs"#-}- {-# INLINE rule618 #-}- rule618 = \ ((_patsIdefinedAttrs) :: [AttrName]) ->- _patsIdefinedAttrs- {-# INLINE rule619 #-}- rule619 = \ ((_patsIdefinedInsts) :: [Identifier]) ->- _patsIdefinedInsts- {-# INLINE rule620 #-}- rule620 = \ ((_patsIcopy) :: Patterns) pos_ ->- Product pos_ _patsIcopy- {-# INLINE rule621 #-}- rule621 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Alias #-}-sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern -sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_Pattern_v31 - v31 = \ (T_Pattern_vIn31 ) -> ( let- _patX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut31 _patIcopy _patIdefinedAttrs _patIdefinedInsts _patIpatunder _patIstpos) = inv_Pattern_s32 _patX32 (T_Pattern_vIn31 )- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule622 _patIdefinedAttrs arg_attr_ arg_field_- _lhsOpatunder :: [AttrName]->Pattern- _lhsOpatunder = rule623 _copy arg_attr_ arg_field_- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule624 _patIdefinedInsts arg_attr_ arg_field_- _lhsOstpos :: Pos- _lhsOstpos = rule625 arg_field_- _copy = rule626 _patIcopy arg_attr_ arg_field_- _lhsOcopy :: Pattern- _lhsOcopy = rule627 _copy- __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos- in __result_ )- in C_Pattern_s32 v31- {-# INLINE rule622 #-}- {-# LINE 1185 "./src-ag/Transform.ag" #-}- rule622 = \ ((_patIdefinedAttrs) :: [AttrName]) attr_ field_ ->- {-# LINE 1185 "./src-ag/Transform.ag" #-}- (field_, attr_) : _patIdefinedAttrs- {-# LINE 4845 "dist/build/Transform.hs"#-}- {-# INLINE rule623 #-}- {-# LINE 1186 "./src-ag/Transform.ag" #-}- rule623 = \ _copy attr_ field_ ->- {-# LINE 1186 "./src-ag/Transform.ag" #-}- \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy- {-# LINE 4851 "dist/build/Transform.hs"#-}- {-# INLINE rule624 #-}- {-# LINE 1187 "./src-ag/Transform.ag" #-}- rule624 = \ ((_patIdefinedInsts) :: [Identifier]) attr_ field_ ->- {-# LINE 1187 "./src-ag/Transform.ag" #-}- (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts- {-# LINE 4857 "dist/build/Transform.hs"#-}- {-# INLINE rule625 #-}- {-# LINE 1202 "./src-ag/Transform.ag" #-}- rule625 = \ field_ ->- {-# LINE 1202 "./src-ag/Transform.ag" #-}- getPos field_- {-# LINE 4863 "dist/build/Transform.hs"#-}- {-# INLINE rule626 #-}- rule626 = \ ((_patIcopy) :: Pattern) attr_ field_ ->- Alias field_ attr_ _patIcopy- {-# INLINE rule627 #-}- rule627 = \ _copy ->- _copy-{-# NOINLINE sem_Pattern_Irrefutable #-}-sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern -sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_Pattern_v31 - v31 = \ (T_Pattern_vIn31 ) -> ( let- _patX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))- (T_Pattern_vOut31 _patIcopy _patIdefinedAttrs _patIdefinedInsts _patIpatunder _patIstpos) = inv_Pattern_s32 _patX32 (T_Pattern_vIn31 )- _lhsOpatunder :: [AttrName]->Pattern- _lhsOpatunder = rule628 _patIpatunder- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule629 _patIdefinedAttrs- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule630 _patIdefinedInsts- _copy = rule631 _patIcopy- _lhsOcopy :: Pattern- _lhsOcopy = rule632 _copy- _lhsOstpos :: Pos- _lhsOstpos = rule633 _patIstpos- __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos- in __result_ )- in C_Pattern_s32 v31- {-# INLINE rule628 #-}- {-# LINE 1191 "./src-ag/Transform.ag" #-}- rule628 = \ ((_patIpatunder) :: [AttrName]->Pattern) ->- {-# LINE 1191 "./src-ag/Transform.ag" #-}- \us -> Irrefutable (_patIpatunder us)- {-# LINE 4898 "dist/build/Transform.hs"#-}- {-# INLINE rule629 #-}- rule629 = \ ((_patIdefinedAttrs) :: [AttrName]) ->- _patIdefinedAttrs- {-# INLINE rule630 #-}- rule630 = \ ((_patIdefinedInsts) :: [Identifier]) ->- _patIdefinedInsts- {-# INLINE rule631 #-}- rule631 = \ ((_patIcopy) :: Pattern) ->- Irrefutable _patIcopy- {-# INLINE rule632 #-}- rule632 = \ _copy ->- _copy- {-# INLINE rule633 #-}- rule633 = \ ((_patIstpos) :: Pos) ->- _patIstpos-{-# NOINLINE sem_Pattern_Underscore #-}-sem_Pattern_Underscore :: (Pos) -> T_Pattern -sem_Pattern_Underscore arg_pos_ = T_Pattern (return st32) where- {-# NOINLINE st32 #-}- st32 = let- v31 :: T_Pattern_v31 - v31 = \ (T_Pattern_vIn31 ) -> ( let- _lhsOpatunder :: [AttrName]->Pattern- _lhsOpatunder = rule634 _copy- _lhsOstpos :: Pos- _lhsOstpos = rule635 arg_pos_- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule636 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule637 ()- _copy = rule638 arg_pos_- _lhsOcopy :: Pattern- _lhsOcopy = rule639 _copy- __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos- in __result_ )- in C_Pattern_s32 v31- {-# INLINE rule634 #-}- {-# LINE 1188 "./src-ag/Transform.ag" #-}- rule634 = \ _copy ->- {-# LINE 1188 "./src-ag/Transform.ag" #-}- \_ -> _copy- {-# LINE 4940 "dist/build/Transform.hs"#-}- {-# INLINE rule635 #-}- {-# LINE 1203 "./src-ag/Transform.ag" #-}- rule635 = \ pos_ ->- {-# LINE 1203 "./src-ag/Transform.ag" #-}- pos_- {-# LINE 4946 "dist/build/Transform.hs"#-}- {-# INLINE rule636 #-}- rule636 = \ (_ :: ()) ->- []- {-# INLINE rule637 #-}- rule637 = \ (_ :: ()) ->- []- {-# INLINE rule638 #-}- rule638 = \ pos_ ->- Underscore pos_- {-# INLINE rule639 #-}- rule639 = \ _copy ->- _copy---- Patterns ------------------------------------------------------- wrapper-data Inh_Patterns = Inh_Patterns { }-data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: (Patterns), definedAttrs_Syn_Patterns :: ([AttrName]), definedInsts_Syn_Patterns :: ([Identifier]), patunder_Syn_Patterns :: ([AttrName]->Patterns) }-{-# INLINABLE wrap_Patterns #-}-wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )-wrap_Patterns (T_Patterns act) (Inh_Patterns ) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_Patterns_vIn34 - (T_Patterns_vOut34 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder) <- return (inv_Patterns_s35 sem arg)- return (Syn_Patterns _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder)- )---- cata-{-# NOINLINE sem_Patterns #-}-sem_Patterns :: Patterns -> T_Patterns -sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)---- semantic domain-newtype T_Patterns = T_Patterns {- attach_T_Patterns :: Identity (T_Patterns_s35 )- }-newtype T_Patterns_s35 = C_Patterns_s35 {- inv_Patterns_s35 :: (T_Patterns_v34 )- }-data T_Patterns_s36 = C_Patterns_s36-type T_Patterns_v34 = (T_Patterns_vIn34 ) -> (T_Patterns_vOut34 )-data T_Patterns_vIn34 = T_Patterns_vIn34 -data T_Patterns_vOut34 = T_Patterns_vOut34 (Patterns) ([AttrName]) ([Identifier]) ([AttrName]->Patterns)-{-# NOINLINE sem_Patterns_Cons #-}-sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns -sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_Patterns_v34 - v34 = \ (T_Patterns_vIn34 ) -> ( let- _hdX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))- _tlX35 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))- (T_Pattern_vOut31 _hdIcopy _hdIdefinedAttrs _hdIdefinedInsts _hdIpatunder _hdIstpos) = inv_Pattern_s32 _hdX32 (T_Pattern_vIn31 )- (T_Patterns_vOut34 _tlIcopy _tlIdefinedAttrs _tlIdefinedInsts _tlIpatunder) = inv_Patterns_s35 _tlX35 (T_Patterns_vIn34 )- _lhsOpatunder :: [AttrName]->Patterns- _lhsOpatunder = rule640 _hdIpatunder _tlIpatunder- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule641 _hdIdefinedAttrs _tlIdefinedAttrs- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule642 _hdIdefinedInsts _tlIdefinedInsts- _copy = rule643 _hdIcopy _tlIcopy- _lhsOcopy :: Patterns- _lhsOcopy = rule644 _copy- __result_ = T_Patterns_vOut34 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder- in __result_ )- in C_Patterns_s35 v34- {-# INLINE rule640 #-}- {-# LINE 1195 "./src-ag/Transform.ag" #-}- rule640 = \ ((_hdIpatunder) :: [AttrName]->Pattern) ((_tlIpatunder) :: [AttrName]->Patterns) ->- {-# LINE 1195 "./src-ag/Transform.ag" #-}- \us -> (_hdIpatunder us) : (_tlIpatunder us)- {-# LINE 5018 "dist/build/Transform.hs"#-}- {-# INLINE rule641 #-}- rule641 = \ ((_hdIdefinedAttrs) :: [AttrName]) ((_tlIdefinedAttrs) :: [AttrName]) ->- _hdIdefinedAttrs ++ _tlIdefinedAttrs- {-# INLINE rule642 #-}- rule642 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# INLINE rule643 #-}- rule643 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->- (:) _hdIcopy _tlIcopy- {-# INLINE rule644 #-}- rule644 = \ _copy ->- _copy-{-# NOINLINE sem_Patterns_Nil #-}-sem_Patterns_Nil :: T_Patterns -sem_Patterns_Nil = T_Patterns (return st35) where- {-# NOINLINE st35 #-}- st35 = let- v34 :: T_Patterns_v34 - v34 = \ (T_Patterns_vIn34 ) -> ( let- _lhsOpatunder :: [AttrName]->Patterns- _lhsOpatunder = rule645 ()- _lhsOdefinedAttrs :: [AttrName]- _lhsOdefinedAttrs = rule646 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule647 ()- _copy = rule648 ()- _lhsOcopy :: Patterns- _lhsOcopy = rule649 _copy- __result_ = T_Patterns_vOut34 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder- in __result_ )- in C_Patterns_s35 v34- {-# INLINE rule645 #-}- {-# LINE 1194 "./src-ag/Transform.ag" #-}- rule645 = \ (_ :: ()) ->- {-# LINE 1194 "./src-ag/Transform.ag" #-}- \_ -> []- {-# LINE 5055 "dist/build/Transform.hs"#-}- {-# INLINE rule646 #-}- rule646 = \ (_ :: ()) ->- []- {-# INLINE rule647 #-}- rule647 = \ (_ :: ()) ->- []- {-# INLINE rule648 #-}- rule648 = \ (_ :: ()) ->- []- {-# INLINE rule649 #-}- rule649 = \ _copy ->- _copy---- SemAlt --------------------------------------------------------- wrapper-data Inh_SemAlt = Inh_SemAlt { allAttrDecls_Inh_SemAlt :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_SemAlt :: (Map NontermIdent (Attributes, Attributes)), allFields_Inh_SemAlt :: (DataTypes), nts_Inh_SemAlt :: (Set NontermIdent), options_Inh_SemAlt :: (Options) }-data Syn_SemAlt = Syn_SemAlt { attrOrderCollect_Syn_SemAlt :: (AttrOrderMap), collectedArounds_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedInsts_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMerges_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedRules_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSigs_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), errors_Syn_SemAlt :: (Seq Error), semPragmasCollect_Syn_SemAlt :: (PragmaMap) }-{-# INLINABLE wrap_SemAlt #-}-wrap_SemAlt :: T_SemAlt -> Inh_SemAlt -> (Syn_SemAlt )-wrap_SemAlt (T_SemAlt act) (Inh_SemAlt _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_SemAlt_vIn37 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions- (T_SemAlt_vOut37 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect) <- return (inv_SemAlt_s38 sem arg)- return (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect)- )---- cata-{-# INLINE sem_SemAlt #-}-sem_SemAlt :: SemAlt -> T_SemAlt -sem_SemAlt ( SemAlt pos_ constructorSet_ rules_ ) = sem_SemAlt_SemAlt pos_ ( sem_ConstructorSet constructorSet_ ) ( sem_SemDefs rules_ )---- semantic domain-newtype T_SemAlt = T_SemAlt {- attach_T_SemAlt :: Identity (T_SemAlt_s38 )- }-newtype T_SemAlt_s38 = C_SemAlt_s38 {- inv_SemAlt_s38 :: (T_SemAlt_v37 )- }-data T_SemAlt_s39 = C_SemAlt_s39-type T_SemAlt_v37 = (T_SemAlt_vIn37 ) -> (T_SemAlt_vOut37 )-data T_SemAlt_vIn37 = T_SemAlt_vIn37 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (DataTypes) (Set NontermIdent) (Options)-data T_SemAlt_vOut37 = T_SemAlt_vOut37 (AttrOrderMap) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Seq Error) (PragmaMap)-{-# NOINLINE sem_SemAlt_SemAlt #-}-sem_SemAlt_SemAlt :: (Pos) -> T_ConstructorSet -> T_SemDefs -> T_SemAlt -sem_SemAlt_SemAlt _ arg_constructorSet_ arg_rules_ = T_SemAlt (return st38) where- {-# NOINLINE st38 #-}- st38 = let- v37 :: T_SemAlt_v37 - v37 = \ (T_SemAlt_vIn37 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) -> ( let- _constructorSetX14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_constructorSet_))- _rulesX47 = Control.Monad.Identity.runIdentity (attach_T_SemDefs (arg_rules_))- (T_ConstructorSet_vOut13 _constructorSetIcollectedConstructorNames _constructorSetIconstructors _constructorSetIerrors) = inv_ConstructorSet_s14 _constructorSetX14 (T_ConstructorSet_vIn13 )- (T_SemDefs_vOut46 _rulesIaroundInfos _rulesIaugmentInfos _rulesIdefinedInsts _rulesIerrors _rulesImergeInfos _rulesIorderDepsCollect _rulesIpragmaNamesCollect _rulesIruleInfos _rulesIsigInfos _rulesIuniqueInfos) = inv_SemDefs_s47 _rulesX47 (T_SemDefs_vIn46 _rulesOoptions)- _pragmaNames = rule650 _rulesIpragmaNamesCollect- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule651 _coninfo _pragmaNames- _attrOrders = rule652 _coninfo _rulesIorderDepsCollect- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule653 _attrOrders- _coninfo = rule654 _constructorSetIconstructors _lhsIallFields _lhsInts- _lhsOerrors :: Seq Error- _lhsOerrors = rule655 _coninfo _rulesIerrors- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule656 _coninfo _rulesIruleInfos- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule657 _coninfo _rulesIsigInfos- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule658 _coninfo _rulesIdefinedInsts- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule659 _coninfo _rulesIuniqueInfos- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule660 _coninfo _rulesIaugmentInfos- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule661 _coninfo _rulesIaroundInfos- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule662 _coninfo _rulesImergeInfos- _rulesOoptions = rule663 _lhsIoptions- __result_ = T_SemAlt_vOut37 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect- in __result_ )- in C_SemAlt_s38 v37- {-# INLINE rule650 #-}- {-# LINE 887 "./src-ag/Transform.ag" #-}- rule650 = \ ((_rulesIpragmaNamesCollect) :: [Identifier]) ->- {-# LINE 887 "./src-ag/Transform.ag" #-}- Set.fromList _rulesIpragmaNamesCollect- {-# LINE 5142 "dist/build/Transform.hs"#-}- {-# INLINE rule651 #-}- {-# LINE 888 "./src-ag/Transform.ag" #-}- rule651 = \ _coninfo _pragmaNames ->- {-# LINE 888 "./src-ag/Transform.ag" #-}- foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5151 "dist/build/Transform.hs"#-}- {-# INLINE rule652 #-}- {-# LINE 917 "./src-ag/Transform.ag" #-}- rule652 = \ _coninfo ((_rulesIorderDepsCollect) :: Set Dependency) ->- {-# LINE 917 "./src-ag/Transform.ag" #-}- [ orderMapSingle nt con _rulesIorderDepsCollect- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5160 "dist/build/Transform.hs"#-}- {-# INLINE rule653 #-}- {-# LINE 922 "./src-ag/Transform.ag" #-}- rule653 = \ _attrOrders ->- {-# LINE 922 "./src-ag/Transform.ag" #-}- foldr orderMapUnion Map.empty _attrOrders- {-# LINE 5166 "dist/build/Transform.hs"#-}- {-# INLINE rule654 #-}- {-# LINE 1104 "./src-ag/Transform.ag" #-}- rule654 = \ ((_constructorSetIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_lhsIallFields) :: DataTypes) ((_lhsInts) :: Set NontermIdent) ->- {-# LINE 1104 "./src-ag/Transform.ag" #-}- [ (nt, conset, conkeys)- | nt <- Set.toList _lhsInts- , let conmap = Map.findWithDefault Map.empty nt _lhsIallFields- , let conkeys = Set.fromList (Map.keys conmap)- , let conset = _constructorSetIconstructors conkeys- ]- {-# LINE 5177 "dist/build/Transform.hs"#-}- {-# INLINE rule655 #-}- {-# LINE 1111 "./src-ag/Transform.ag" #-}- rule655 = \ _coninfo ((_rulesIerrors) :: Seq Error) ->- {-# LINE 1111 "./src-ag/Transform.ag" #-}- Seq.fromList- [ UndefAlt nt con- | (nt, conset, conkeys) <- _coninfo- , con <- Set.toList (Set.difference conset conkeys)- ]- Seq.>< _rulesIerrors- {-# LINE 5188 "dist/build/Transform.hs"#-}- {-# INLINE rule656 #-}- {-# LINE 1118 "./src-ag/Transform.ag" #-}- rule656 = \ _coninfo ((_rulesIruleInfos) :: [RuleInfo]) ->- {-# LINE 1118 "./src-ag/Transform.ag" #-}- [ (nt,con,r)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , r <- _rulesIruleInfos- ]- {-# LINE 5198 "dist/build/Transform.hs"#-}- {-# INLINE rule657 #-}- {-# LINE 1124 "./src-ag/Transform.ag" #-}- rule657 = \ _coninfo ((_rulesIsigInfos) :: [SigInfo]) ->- {-# LINE 1124 "./src-ag/Transform.ag" #-}- [ (nt,con,ts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- , ts <- _rulesIsigInfos- ]- {-# LINE 5208 "dist/build/Transform.hs"#-}- {-# INLINE rule658 #-}- {-# LINE 1131 "./src-ag/Transform.ag" #-}- rule658 = \ _coninfo ((_rulesIdefinedInsts) :: [Identifier]) ->- {-# LINE 1131 "./src-ag/Transform.ag" #-}- [ (nt,con,_rulesIdefinedInsts)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5217 "dist/build/Transform.hs"#-}- {-# INLINE rule659 #-}- {-# LINE 1137 "./src-ag/Transform.ag" #-}- rule659 = \ _coninfo ((_rulesIuniqueInfos) :: [UniqueInfo]) ->- {-# LINE 1137 "./src-ag/Transform.ag" #-}- [ (nt,con,_rulesIuniqueInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5226 "dist/build/Transform.hs"#-}- {-# INLINE rule660 #-}- {-# LINE 1143 "./src-ag/Transform.ag" #-}- rule660 = \ _coninfo ((_rulesIaugmentInfos) :: [AugmentInfo]) ->- {-# LINE 1143 "./src-ag/Transform.ag" #-}- [ (nt, con, _rulesIaugmentInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5235 "dist/build/Transform.hs"#-}- {-# INLINE rule661 #-}- {-# LINE 1149 "./src-ag/Transform.ag" #-}- rule661 = \ _coninfo ((_rulesIaroundInfos) :: [AroundInfo]) ->- {-# LINE 1149 "./src-ag/Transform.ag" #-}- [ (nt, con, _rulesIaroundInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5244 "dist/build/Transform.hs"#-}- {-# INLINE rule662 #-}- {-# LINE 1155 "./src-ag/Transform.ag" #-}- rule662 = \ _coninfo ((_rulesImergeInfos) :: [MergeInfo]) ->- {-# LINE 1155 "./src-ag/Transform.ag" #-}- [ (nt, con, _rulesImergeInfos)- | (nt, conset, _) <- _coninfo- , con <- Set.toList conset- ]- {-# LINE 5253 "dist/build/Transform.hs"#-}- {-# INLINE rule663 #-}- rule663 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions---- SemAlts -------------------------------------------------------- wrapper-data Inh_SemAlts = Inh_SemAlts { allAttrDecls_Inh_SemAlts :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_SemAlts :: (Map NontermIdent (Attributes, Attributes)), allFields_Inh_SemAlts :: (DataTypes), nts_Inh_SemAlts :: (Set NontermIdent), options_Inh_SemAlts :: (Options) }-data Syn_SemAlts = Syn_SemAlts { attrOrderCollect_Syn_SemAlts :: (AttrOrderMap), collectedArounds_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedInsts_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMerges_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedRules_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSigs_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), errors_Syn_SemAlts :: (Seq Error), semPragmasCollect_Syn_SemAlts :: (PragmaMap) }-{-# INLINABLE wrap_SemAlts #-}-wrap_SemAlts :: T_SemAlts -> Inh_SemAlts -> (Syn_SemAlts )-wrap_SemAlts (T_SemAlts act) (Inh_SemAlts _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_SemAlts_vIn40 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions- (T_SemAlts_vOut40 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect) <- return (inv_SemAlts_s41 sem arg)- return (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect)- )---- cata-{-# NOINLINE sem_SemAlts #-}-sem_SemAlts :: SemAlts -> T_SemAlts -sem_SemAlts list = Prelude.foldr sem_SemAlts_Cons sem_SemAlts_Nil (Prelude.map sem_SemAlt list)---- semantic domain-newtype T_SemAlts = T_SemAlts {- attach_T_SemAlts :: Identity (T_SemAlts_s41 )- }-newtype T_SemAlts_s41 = C_SemAlts_s41 {- inv_SemAlts_s41 :: (T_SemAlts_v40 )- }-data T_SemAlts_s42 = C_SemAlts_s42-type T_SemAlts_v40 = (T_SemAlts_vIn40 ) -> (T_SemAlts_vOut40 )-data T_SemAlts_vIn40 = T_SemAlts_vIn40 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (DataTypes) (Set NontermIdent) (Options)-data T_SemAlts_vOut40 = T_SemAlts_vOut40 (AttrOrderMap) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Seq Error) (PragmaMap)-{-# NOINLINE sem_SemAlts_Cons #-}-sem_SemAlts_Cons :: T_SemAlt -> T_SemAlts -> T_SemAlts -sem_SemAlts_Cons arg_hd_ arg_tl_ = T_SemAlts (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_SemAlts_v40 - v40 = \ (T_SemAlts_vIn40 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) -> ( let- _hdX38 = Control.Monad.Identity.runIdentity (attach_T_SemAlt (arg_hd_))- _tlX41 = Control.Monad.Identity.runIdentity (attach_T_SemAlts (arg_tl_))- (T_SemAlt_vOut37 _hdIattrOrderCollect _hdIcollectedArounds _hdIcollectedAugments _hdIcollectedInsts _hdIcollectedMerges _hdIcollectedRules _hdIcollectedSigs _hdIcollectedUniques _hdIerrors _hdIsemPragmasCollect) = inv_SemAlt_s38 _hdX38 (T_SemAlt_vIn37 _hdOallAttrDecls _hdOallAttrs _hdOallFields _hdOnts _hdOoptions)- (T_SemAlts_vOut40 _tlIattrOrderCollect _tlIcollectedArounds _tlIcollectedAugments _tlIcollectedInsts _tlIcollectedMerges _tlIcollectedRules _tlIcollectedSigs _tlIcollectedUniques _tlIerrors _tlIsemPragmasCollect) = inv_SemAlts_s41 _tlX41 (T_SemAlts_vIn40 _tlOallAttrDecls _tlOallAttrs _tlOallFields _tlOnts _tlOoptions)- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule664 _hdIattrOrderCollect _tlIattrOrderCollect- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule665 _hdIcollectedArounds _tlIcollectedArounds- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule666 _hdIcollectedAugments _tlIcollectedAugments- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule667 _hdIcollectedInsts _tlIcollectedInsts- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule668 _hdIcollectedMerges _tlIcollectedMerges- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule669 _hdIcollectedRules _tlIcollectedRules- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule670 _hdIcollectedSigs _tlIcollectedSigs- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule671 _hdIcollectedUniques _tlIcollectedUniques- _lhsOerrors :: Seq Error- _lhsOerrors = rule672 _hdIerrors _tlIerrors- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule673 _hdIsemPragmasCollect _tlIsemPragmasCollect- _hdOallAttrDecls = rule674 _lhsIallAttrDecls- _hdOallAttrs = rule675 _lhsIallAttrs- _hdOallFields = rule676 _lhsIallFields- _hdOnts = rule677 _lhsInts- _hdOoptions = rule678 _lhsIoptions- _tlOallAttrDecls = rule679 _lhsIallAttrDecls- _tlOallAttrs = rule680 _lhsIallAttrs- _tlOallFields = rule681 _lhsIallFields- _tlOnts = rule682 _lhsInts- _tlOoptions = rule683 _lhsIoptions- __result_ = T_SemAlts_vOut40 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect- in __result_ )- in C_SemAlts_s41 v40- {-# INLINE rule664 #-}- rule664 = \ ((_hdIattrOrderCollect) :: AttrOrderMap) ((_tlIattrOrderCollect) :: AttrOrderMap) ->- _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect- {-# INLINE rule665 #-}- rule665 = \ ((_hdIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ((_tlIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->- _hdIcollectedArounds ++ _tlIcollectedArounds- {-# INLINE rule666 #-}- rule666 = \ ((_hdIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ((_tlIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->- _hdIcollectedAugments ++ _tlIcollectedAugments- {-# INLINE rule667 #-}- rule667 = \ ((_hdIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ((_tlIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->- _hdIcollectedInsts ++ _tlIcollectedInsts- {-# INLINE rule668 #-}- rule668 = \ ((_hdIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ((_tlIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->- _hdIcollectedMerges ++ _tlIcollectedMerges- {-# INLINE rule669 #-}- rule669 = \ ((_hdIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ((_tlIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->- _hdIcollectedRules ++ _tlIcollectedRules- {-# INLINE rule670 #-}- rule670 = \ ((_hdIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_tlIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->- _hdIcollectedSigs ++ _tlIcollectedSigs- {-# INLINE rule671 #-}- rule671 = \ ((_hdIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ((_tlIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->- _hdIcollectedUniques ++ _tlIcollectedUniques- {-# INLINE rule672 #-}- rule672 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule673 #-}- rule673 = \ ((_hdIsemPragmasCollect) :: PragmaMap) ((_tlIsemPragmasCollect) :: PragmaMap) ->- _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect- {-# INLINE rule674 #-}- rule674 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrDecls- {-# INLINE rule675 #-}- rule675 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrs- {-# INLINE rule676 #-}- rule676 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule677 #-}- rule677 = \ ((_lhsInts) :: Set NontermIdent) ->- _lhsInts- {-# INLINE rule678 #-}- rule678 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule679 #-}- rule679 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrDecls- {-# INLINE rule680 #-}- rule680 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->- _lhsIallAttrs- {-# INLINE rule681 #-}- rule681 = \ ((_lhsIallFields) :: DataTypes) ->- _lhsIallFields- {-# INLINE rule682 #-}- rule682 = \ ((_lhsInts) :: Set NontermIdent) ->- _lhsInts- {-# INLINE rule683 #-}- rule683 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions-{-# NOINLINE sem_SemAlts_Nil #-}-sem_SemAlts_Nil :: T_SemAlts -sem_SemAlts_Nil = T_SemAlts (return st41) where- {-# NOINLINE st41 #-}- st41 = let- v40 :: T_SemAlts_v40 - v40 = \ (T_SemAlts_vIn40 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) -> ( let- _lhsOattrOrderCollect :: AttrOrderMap- _lhsOattrOrderCollect = rule684 ()- _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]- _lhsOcollectedArounds = rule685 ()- _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]- _lhsOcollectedAugments = rule686 ()- _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]- _lhsOcollectedInsts = rule687 ()- _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]- _lhsOcollectedMerges = rule688 ()- _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]- _lhsOcollectedRules = rule689 ()- _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]- _lhsOcollectedSigs = rule690 ()- _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]- _lhsOcollectedUniques = rule691 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule692 ()- _lhsOsemPragmasCollect :: PragmaMap- _lhsOsemPragmasCollect = rule693 ()- __result_ = T_SemAlts_vOut40 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect- in __result_ )- in C_SemAlts_s41 v40- {-# INLINE rule684 #-}- rule684 = \ (_ :: ()) ->- Map.empty- {-# INLINE rule685 #-}- rule685 = \ (_ :: ()) ->- []- {-# INLINE rule686 #-}- rule686 = \ (_ :: ()) ->- []- {-# INLINE rule687 #-}- rule687 = \ (_ :: ()) ->- []- {-# INLINE rule688 #-}- rule688 = \ (_ :: ()) ->- []- {-# INLINE rule689 #-}- rule689 = \ (_ :: ()) ->- []- {-# INLINE rule690 #-}- rule690 = \ (_ :: ()) ->- []- {-# INLINE rule691 #-}- rule691 = \ (_ :: ()) ->- []- {-# INLINE rule692 #-}- rule692 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule693 #-}- rule693 = \ (_ :: ()) ->- Map.empty---- SemDef --------------------------------------------------------- wrapper-data Inh_SemDef = Inh_SemDef { options_Inh_SemDef :: (Options) }-data Syn_SemDef = Syn_SemDef { aroundInfos_Syn_SemDef :: ([AroundInfo]), augmentInfos_Syn_SemDef :: ([AugmentInfo]), definedInsts_Syn_SemDef :: ([Identifier]), errors_Syn_SemDef :: (Seq Error), mergeInfos_Syn_SemDef :: ([MergeInfo]), orderDepsCollect_Syn_SemDef :: (Set Dependency), pragmaNamesCollect_Syn_SemDef :: ([Identifier]), ruleInfos_Syn_SemDef :: ([RuleInfo]), sigInfos_Syn_SemDef :: ([SigInfo]), uniqueInfos_Syn_SemDef :: ([UniqueInfo]) }-{-# INLINABLE wrap_SemDef #-}-wrap_SemDef :: T_SemDef -> Inh_SemDef -> (Syn_SemDef )-wrap_SemDef (T_SemDef act) (Inh_SemDef _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_SemDef_vIn43 _lhsIoptions- (T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos) <- return (inv_SemDef_s44 sem arg)- return (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos)- )---- cata-{-# NOINLINE sem_SemDef #-}-sem_SemDef :: SemDef -> T_SemDef -sem_SemDef ( Def pos_ mbName_ pattern_ rhs_ owrt_ pure_ eager_ ) = sem_SemDef_Def pos_ mbName_ ( sem_Pattern pattern_ ) rhs_ owrt_ pure_ eager_-sem_SemDef ( TypeDef pos_ ident_ tp_ ) = sem_SemDef_TypeDef pos_ ident_ tp_-sem_SemDef ( UniqueDef ident_ ref_ ) = sem_SemDef_UniqueDef ident_ ref_-sem_SemDef ( AugmentDef ident_ rhs_ ) = sem_SemDef_AugmentDef ident_ rhs_-sem_SemDef ( AroundDef ident_ rhs_ ) = sem_SemDef_AroundDef ident_ rhs_-sem_SemDef ( MergeDef target_ nt_ sources_ rhs_ ) = sem_SemDef_MergeDef target_ nt_ sources_ rhs_-sem_SemDef ( SemPragma names_ ) = sem_SemDef_SemPragma names_-sem_SemDef ( AttrOrderBefore before_ after_ ) = sem_SemDef_AttrOrderBefore before_ after_---- semantic domain-newtype T_SemDef = T_SemDef {- attach_T_SemDef :: Identity (T_SemDef_s44 )- }-newtype T_SemDef_s44 = C_SemDef_s44 {- inv_SemDef_s44 :: (T_SemDef_v43 )- }-data T_SemDef_s45 = C_SemDef_s45-type T_SemDef_v43 = (T_SemDef_vIn43 ) -> (T_SemDef_vOut43 )-data T_SemDef_vIn43 = T_SemDef_vIn43 (Options)-data T_SemDef_vOut43 = T_SemDef_vOut43 ([AroundInfo]) ([AugmentInfo]) ([Identifier]) (Seq Error) ([MergeInfo]) (Set Dependency) ([Identifier]) ([RuleInfo]) ([SigInfo]) ([UniqueInfo])-{-# NOINLINE sem_SemDef_Def #-}-sem_SemDef_Def :: (Pos) -> (Maybe Identifier) -> T_Pattern -> (Expression) -> (Bool) -> (Bool) -> (Bool) -> T_SemDef -sem_SemDef_Def _ arg_mbName_ arg_pattern_ arg_rhs_ arg_owrt_ arg_pure_ arg_eager_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _patternX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))- (T_Pattern_vOut31 _patternIcopy _patternIdefinedAttrs _patternIdefinedInsts _patternIpatunder _patternIstpos) = inv_Pattern_s32 _patternX32 (T_Pattern_vIn31 )- _lhsOerrors :: Seq Error- _lhsOerrors = rule694 _lhsIoptions arg_rhs_- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule695 _patternIdefinedAttrs _patternIpatunder _patternIstpos arg_eager_ arg_mbName_ arg_owrt_ arg_pure_ arg_rhs_- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule696 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule697 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule698 _patternIdefinedInsts- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule699 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule700 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule701 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule702 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule703 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule694 #-}- {-# LINE 556 "./src-ag/Transform.ag" #-}- rule694 = \ ((_lhsIoptions) :: Options) rhs_ ->- {-# LINE 556 "./src-ag/Transform.ag" #-}- if checkParseRhs _lhsIoptions- then Seq.fromList $ checkRhs rhs_- else Seq.empty- {-# LINE 5529 "dist/build/Transform.hs"#-}- {-# INLINE rule695 #-}- {-# LINE 1161 "./src-ag/Transform.ag" #-}- rule695 = \ ((_patternIdefinedAttrs) :: [AttrName]) ((_patternIpatunder) :: [AttrName]->Pattern) ((_patternIstpos) :: Pos) eager_ mbName_ owrt_ pure_ rhs_ ->- {-# LINE 1161 "./src-ag/Transform.ag" #-}- [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos, pure_, eager_) ]- {-# LINE 5535 "dist/build/Transform.hs"#-}- {-# INLINE rule696 #-}- rule696 = \ (_ :: ()) ->- []- {-# INLINE rule697 #-}- rule697 = \ (_ :: ()) ->- []- {-# INLINE rule698 #-}- rule698 = \ ((_patternIdefinedInsts) :: [Identifier]) ->- _patternIdefinedInsts- {-# INLINE rule699 #-}- rule699 = \ (_ :: ()) ->- []- {-# INLINE rule700 #-}- rule700 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule701 #-}- rule701 = \ (_ :: ()) ->- []- {-# INLINE rule702 #-}- rule702 = \ (_ :: ()) ->- []- {-# INLINE rule703 #-}- rule703 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_TypeDef #-}-sem_SemDef_TypeDef :: (Pos) -> (Identifier) -> (Type) -> T_SemDef -sem_SemDef_TypeDef arg_pos_ arg_ident_ arg_tp_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _lhsOerrors :: Seq Error- _lhsOerrors = rule704 _lhsIoptions arg_pos_ arg_tp_- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule705 arg_ident_ arg_tp_- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule706 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule707 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule708 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule709 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule710 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule711 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule712 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule713 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule704 #-}- {-# LINE 563 "./src-ag/Transform.ag" #-}- rule704 = \ ((_lhsIoptions) :: Options) pos_ tp_ ->- {-# LINE 563 "./src-ag/Transform.ag" #-}- if checkParseTy _lhsIoptions- then case tp_ of- Haskell s -> let ex = Expression pos_ tks- tks = [tk]- tk = HsToken s pos_- in Seq.fromList $ checkTy ex- _ -> Seq.empty- else Seq.empty- {-# LINE 5602 "dist/build/Transform.hs"#-}- {-# INLINE rule705 #-}- {-# LINE 1164 "./src-ag/Transform.ag" #-}- rule705 = \ ident_ tp_ ->- {-# LINE 1164 "./src-ag/Transform.ag" #-}- [ (ident_, tp_) ]- {-# LINE 5608 "dist/build/Transform.hs"#-}- {-# INLINE rule706 #-}- rule706 = \ (_ :: ()) ->- []- {-# INLINE rule707 #-}- rule707 = \ (_ :: ()) ->- []- {-# INLINE rule708 #-}- rule708 = \ (_ :: ()) ->- []- {-# INLINE rule709 #-}- rule709 = \ (_ :: ()) ->- []- {-# INLINE rule710 #-}- rule710 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule711 #-}- rule711 = \ (_ :: ()) ->- []- {-# INLINE rule712 #-}- rule712 = \ (_ :: ()) ->- []- {-# INLINE rule713 #-}- rule713 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_UniqueDef #-}-sem_SemDef_UniqueDef :: (Identifier) -> (Identifier) -> T_SemDef -sem_SemDef_UniqueDef arg_ident_ arg_ref_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule714 arg_ident_ arg_ref_- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule715 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule716 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule717 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule718 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule719 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule720 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule721 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule722 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule723 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule714 #-}- {-# LINE 1167 "./src-ag/Transform.ag" #-}- rule714 = \ ident_ ref_ ->- {-# LINE 1167 "./src-ag/Transform.ag" #-}- [ (ident_, ref_) ]- {-# LINE 5668 "dist/build/Transform.hs"#-}- {-# INLINE rule715 #-}- rule715 = \ (_ :: ()) ->- []- {-# INLINE rule716 #-}- rule716 = \ (_ :: ()) ->- []- {-# INLINE rule717 #-}- rule717 = \ (_ :: ()) ->- []- {-# INLINE rule718 #-}- rule718 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule719 #-}- rule719 = \ (_ :: ()) ->- []- {-# INLINE rule720 #-}- rule720 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule721 #-}- rule721 = \ (_ :: ()) ->- []- {-# INLINE rule722 #-}- rule722 = \ (_ :: ()) ->- []- {-# INLINE rule723 #-}- rule723 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_AugmentDef #-}-sem_SemDef_AugmentDef :: (Identifier) -> (Expression) -> T_SemDef -sem_SemDef_AugmentDef arg_ident_ arg_rhs_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule724 arg_ident_ arg_rhs_- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule725 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule726 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule727 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule728 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule729 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule730 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule731 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule732 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule733 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule724 #-}- {-# LINE 1170 "./src-ag/Transform.ag" #-}- rule724 = \ ident_ rhs_ ->- {-# LINE 1170 "./src-ag/Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 5731 "dist/build/Transform.hs"#-}- {-# INLINE rule725 #-}- rule725 = \ (_ :: ()) ->- []- {-# INLINE rule726 #-}- rule726 = \ (_ :: ()) ->- []- {-# INLINE rule727 #-}- rule727 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule728 #-}- rule728 = \ (_ :: ()) ->- []- {-# INLINE rule729 #-}- rule729 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule730 #-}- rule730 = \ (_ :: ()) ->- []- {-# INLINE rule731 #-}- rule731 = \ (_ :: ()) ->- []- {-# INLINE rule732 #-}- rule732 = \ (_ :: ()) ->- []- {-# INLINE rule733 #-}- rule733 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_AroundDef #-}-sem_SemDef_AroundDef :: (Identifier) -> (Expression) -> T_SemDef -sem_SemDef_AroundDef arg_ident_ arg_rhs_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule734 arg_ident_ arg_rhs_- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule735 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule736 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule737 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule738 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule739 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule740 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule741 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule742 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule743 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule734 #-}- {-# LINE 1173 "./src-ag/Transform.ag" #-}- rule734 = \ ident_ rhs_ ->- {-# LINE 1173 "./src-ag/Transform.ag" #-}- [ (ident_, rhs_) ]- {-# LINE 5794 "dist/build/Transform.hs"#-}- {-# INLINE rule735 #-}- rule735 = \ (_ :: ()) ->- []- {-# INLINE rule736 #-}- rule736 = \ (_ :: ()) ->- []- {-# INLINE rule737 #-}- rule737 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule738 #-}- rule738 = \ (_ :: ()) ->- []- {-# INLINE rule739 #-}- rule739 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule740 #-}- rule740 = \ (_ :: ()) ->- []- {-# INLINE rule741 #-}- rule741 = \ (_ :: ()) ->- []- {-# INLINE rule742 #-}- rule742 = \ (_ :: ()) ->- []- {-# INLINE rule743 #-}- rule743 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_MergeDef #-}-sem_SemDef_MergeDef :: (Identifier) -> (Identifier) -> ([Identifier]) -> (Expression) -> T_SemDef -sem_SemDef_MergeDef arg_target_ arg_nt_ arg_sources_ arg_rhs_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _lhsOerrors :: Seq Error- _lhsOerrors = rule744 _lhsIoptions arg_rhs_- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule745 arg_nt_ arg_rhs_ arg_sources_ arg_target_- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule746 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule747 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule748 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule749 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule750 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule751 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule752 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule753 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule744 #-}- {-# LINE 556 "./src-ag/Transform.ag" #-}- rule744 = \ ((_lhsIoptions) :: Options) rhs_ ->- {-# LINE 556 "./src-ag/Transform.ag" #-}- if checkParseRhs _lhsIoptions- then Seq.fromList $ checkRhs rhs_- else Seq.empty- {-# LINE 5859 "dist/build/Transform.hs"#-}- {-# INLINE rule745 #-}- {-# LINE 1176 "./src-ag/Transform.ag" #-}- rule745 = \ nt_ rhs_ sources_ target_ ->- {-# LINE 1176 "./src-ag/Transform.ag" #-}- [ (target_, nt_, sources_, rhs_) ]- {-# LINE 5865 "dist/build/Transform.hs"#-}- {-# INLINE rule746 #-}- rule746 = \ (_ :: ()) ->- []- {-# INLINE rule747 #-}- rule747 = \ (_ :: ()) ->- []- {-# INLINE rule748 #-}- rule748 = \ (_ :: ()) ->- []- {-# INLINE rule749 #-}- rule749 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule750 #-}- rule750 = \ (_ :: ()) ->- []- {-# INLINE rule751 #-}- rule751 = \ (_ :: ()) ->- []- {-# INLINE rule752 #-}- rule752 = \ (_ :: ()) ->- []- {-# INLINE rule753 #-}- rule753 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_SemPragma #-}-sem_SemDef_SemPragma :: ([NontermIdent]) -> T_SemDef -sem_SemDef_SemPragma arg_names_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule754 arg_names_- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule755 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule756 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule757 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule758 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule759 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule760 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule761 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule762 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule763 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule754 #-}- {-# LINE 897 "./src-ag/Transform.ag" #-}- rule754 = \ names_ ->- {-# LINE 897 "./src-ag/Transform.ag" #-}- names_- {-# LINE 5925 "dist/build/Transform.hs"#-}- {-# INLINE rule755 #-}- rule755 = \ (_ :: ()) ->- []- {-# INLINE rule756 #-}- rule756 = \ (_ :: ()) ->- []- {-# INLINE rule757 #-}- rule757 = \ (_ :: ()) ->- []- {-# INLINE rule758 #-}- rule758 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule759 #-}- rule759 = \ (_ :: ()) ->- []- {-# INLINE rule760 #-}- rule760 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule761 #-}- rule761 = \ (_ :: ()) ->- []- {-# INLINE rule762 #-}- rule762 = \ (_ :: ()) ->- []- {-# INLINE rule763 #-}- rule763 = \ (_ :: ()) ->- []-{-# NOINLINE sem_SemDef_AttrOrderBefore #-}-sem_SemDef_AttrOrderBefore :: ([Occurrence]) -> ([Occurrence]) -> T_SemDef -sem_SemDef_AttrOrderBefore arg_before_ arg_after_ = T_SemDef (return st44) where- {-# NOINLINE st44 #-}- st44 = let- v43 :: T_SemDef_v43 - v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let- _dependency = rule764 arg_after_ arg_before_- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule765 _dependency- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule766 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule767 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule768 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule769 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule770 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule771 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule772 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule773 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule774 ()- __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDef_s44 v43- {-# INLINE rule764 #-}- {-# LINE 928 "./src-ag/Transform.ag" #-}- rule764 = \ after_ before_ ->- {-# LINE 928 "./src-ag/Transform.ag" #-}- [ Dependency b a | b <- before_, a <- after_ ]- {-# LINE 5989 "dist/build/Transform.hs"#-}- {-# INLINE rule765 #-}- {-# LINE 929 "./src-ag/Transform.ag" #-}- rule765 = \ _dependency ->- {-# LINE 929 "./src-ag/Transform.ag" #-}- Set.fromList _dependency- {-# LINE 5995 "dist/build/Transform.hs"#-}- {-# INLINE rule766 #-}- rule766 = \ (_ :: ()) ->- []- {-# INLINE rule767 #-}- rule767 = \ (_ :: ()) ->- []- {-# INLINE rule768 #-}- rule768 = \ (_ :: ()) ->- []- {-# INLINE rule769 #-}- rule769 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule770 #-}- rule770 = \ (_ :: ()) ->- []- {-# INLINE rule771 #-}- rule771 = \ (_ :: ()) ->- []- {-# INLINE rule772 #-}- rule772 = \ (_ :: ()) ->- []- {-# INLINE rule773 #-}- rule773 = \ (_ :: ()) ->- []- {-# INLINE rule774 #-}- rule774 = \ (_ :: ()) ->- []---- SemDefs -------------------------------------------------------- wrapper-data Inh_SemDefs = Inh_SemDefs { options_Inh_SemDefs :: (Options) }-data Syn_SemDefs = Syn_SemDefs { aroundInfos_Syn_SemDefs :: ([AroundInfo]), augmentInfos_Syn_SemDefs :: ([AugmentInfo]), definedInsts_Syn_SemDefs :: ([Identifier]), errors_Syn_SemDefs :: (Seq Error), mergeInfos_Syn_SemDefs :: ([MergeInfo]), orderDepsCollect_Syn_SemDefs :: (Set Dependency), pragmaNamesCollect_Syn_SemDefs :: ([Identifier]), ruleInfos_Syn_SemDefs :: ([RuleInfo]), sigInfos_Syn_SemDefs :: ([SigInfo]), uniqueInfos_Syn_SemDefs :: ([UniqueInfo]) }-{-# INLINABLE wrap_SemDefs #-}-wrap_SemDefs :: T_SemDefs -> Inh_SemDefs -> (Syn_SemDefs )-wrap_SemDefs (T_SemDefs act) (Inh_SemDefs _lhsIoptions) =- Control.Monad.Identity.runIdentity (- do sem <- act- let arg = T_SemDefs_vIn46 _lhsIoptions- (T_SemDefs_vOut46 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos) <- return (inv_SemDefs_s47 sem arg)- return (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos)- )---- cata-{-# NOINLINE sem_SemDefs #-}-sem_SemDefs :: SemDefs -> T_SemDefs -sem_SemDefs list = Prelude.foldr sem_SemDefs_Cons sem_SemDefs_Nil (Prelude.map sem_SemDef list)---- semantic domain-newtype T_SemDefs = T_SemDefs {- attach_T_SemDefs :: Identity (T_SemDefs_s47 )- }-newtype T_SemDefs_s47 = C_SemDefs_s47 {- inv_SemDefs_s47 :: (T_SemDefs_v46 )- }-data T_SemDefs_s48 = C_SemDefs_s48-type T_SemDefs_v46 = (T_SemDefs_vIn46 ) -> (T_SemDefs_vOut46 )-data T_SemDefs_vIn46 = T_SemDefs_vIn46 (Options)-data T_SemDefs_vOut46 = T_SemDefs_vOut46 ([AroundInfo]) ([AugmentInfo]) ([Identifier]) (Seq Error) ([MergeInfo]) (Set Dependency) ([Identifier]) ([RuleInfo]) ([SigInfo]) ([UniqueInfo])-{-# NOINLINE sem_SemDefs_Cons #-}-sem_SemDefs_Cons :: T_SemDef -> T_SemDefs -> T_SemDefs -sem_SemDefs_Cons arg_hd_ arg_tl_ = T_SemDefs (return st47) where- {-# NOINLINE st47 #-}- st47 = let- v46 :: T_SemDefs_v46 - v46 = \ (T_SemDefs_vIn46 _lhsIoptions) -> ( let- _hdX44 = Control.Monad.Identity.runIdentity (attach_T_SemDef (arg_hd_))- _tlX47 = Control.Monad.Identity.runIdentity (attach_T_SemDefs (arg_tl_))- (T_SemDef_vOut43 _hdIaroundInfos _hdIaugmentInfos _hdIdefinedInsts _hdIerrors _hdImergeInfos _hdIorderDepsCollect _hdIpragmaNamesCollect _hdIruleInfos _hdIsigInfos _hdIuniqueInfos) = inv_SemDef_s44 _hdX44 (T_SemDef_vIn43 _hdOoptions)- (T_SemDefs_vOut46 _tlIaroundInfos _tlIaugmentInfos _tlIdefinedInsts _tlIerrors _tlImergeInfos _tlIorderDepsCollect _tlIpragmaNamesCollect _tlIruleInfos _tlIsigInfos _tlIuniqueInfos) = inv_SemDefs_s47 _tlX47 (T_SemDefs_vIn46 _tlOoptions)- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule775 _hdIaroundInfos _tlIaroundInfos- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule776 _hdIaugmentInfos _tlIaugmentInfos- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule777 _hdIdefinedInsts _tlIdefinedInsts- _lhsOerrors :: Seq Error- _lhsOerrors = rule778 _hdIerrors _tlIerrors- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule779 _hdImergeInfos _tlImergeInfos- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule780 _hdIorderDepsCollect _tlIorderDepsCollect- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule781 _hdIpragmaNamesCollect _tlIpragmaNamesCollect- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule782 _hdIruleInfos _tlIruleInfos- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule783 _hdIsigInfos _tlIsigInfos- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule784 _hdIuniqueInfos _tlIuniqueInfos- _hdOoptions = rule785 _lhsIoptions- _tlOoptions = rule786 _lhsIoptions- __result_ = T_SemDefs_vOut46 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDefs_s47 v46- {-# INLINE rule775 #-}- rule775 = \ ((_hdIaroundInfos) :: [AroundInfo]) ((_tlIaroundInfos) :: [AroundInfo]) ->- _hdIaroundInfos ++ _tlIaroundInfos- {-# INLINE rule776 #-}- rule776 = \ ((_hdIaugmentInfos) :: [AugmentInfo]) ((_tlIaugmentInfos) :: [AugmentInfo]) ->- _hdIaugmentInfos ++ _tlIaugmentInfos- {-# INLINE rule777 #-}- rule777 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->- _hdIdefinedInsts ++ _tlIdefinedInsts- {-# INLINE rule778 #-}- rule778 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->- _hdIerrors Seq.>< _tlIerrors- {-# INLINE rule779 #-}- rule779 = \ ((_hdImergeInfos) :: [MergeInfo]) ((_tlImergeInfos) :: [MergeInfo]) ->- _hdImergeInfos ++ _tlImergeInfos- {-# INLINE rule780 #-}- rule780 = \ ((_hdIorderDepsCollect) :: Set Dependency) ((_tlIorderDepsCollect) :: Set Dependency) ->- _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect- {-# INLINE rule781 #-}- rule781 = \ ((_hdIpragmaNamesCollect) :: [Identifier]) ((_tlIpragmaNamesCollect) :: [Identifier]) ->- _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect- {-# INLINE rule782 #-}- rule782 = \ ((_hdIruleInfos) :: [RuleInfo]) ((_tlIruleInfos) :: [RuleInfo]) ->- _hdIruleInfos ++ _tlIruleInfos- {-# INLINE rule783 #-}- rule783 = \ ((_hdIsigInfos) :: [SigInfo]) ((_tlIsigInfos) :: [SigInfo]) ->- _hdIsigInfos ++ _tlIsigInfos- {-# INLINE rule784 #-}- rule784 = \ ((_hdIuniqueInfos) :: [UniqueInfo]) ((_tlIuniqueInfos) :: [UniqueInfo]) ->- _hdIuniqueInfos ++ _tlIuniqueInfos- {-# INLINE rule785 #-}- rule785 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions- {-# INLINE rule786 #-}- rule786 = \ ((_lhsIoptions) :: Options) ->- _lhsIoptions-{-# NOINLINE sem_SemDefs_Nil #-}-sem_SemDefs_Nil :: T_SemDefs -sem_SemDefs_Nil = T_SemDefs (return st47) where- {-# NOINLINE st47 #-}- st47 = let- v46 :: T_SemDefs_v46 - v46 = \ (T_SemDefs_vIn46 _lhsIoptions) -> ( let- _lhsOaroundInfos :: [AroundInfo]- _lhsOaroundInfos = rule787 ()- _lhsOaugmentInfos :: [AugmentInfo]- _lhsOaugmentInfos = rule788 ()- _lhsOdefinedInsts :: [Identifier]- _lhsOdefinedInsts = rule789 ()- _lhsOerrors :: Seq Error- _lhsOerrors = rule790 ()- _lhsOmergeInfos :: [MergeInfo]- _lhsOmergeInfos = rule791 ()- _lhsOorderDepsCollect :: Set Dependency- _lhsOorderDepsCollect = rule792 ()- _lhsOpragmaNamesCollect :: [Identifier]- _lhsOpragmaNamesCollect = rule793 ()- _lhsOruleInfos :: [RuleInfo]- _lhsOruleInfos = rule794 ()- _lhsOsigInfos :: [SigInfo]- _lhsOsigInfos = rule795 ()- _lhsOuniqueInfos :: [UniqueInfo]- _lhsOuniqueInfos = rule796 ()- __result_ = T_SemDefs_vOut46 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos- in __result_ )- in C_SemDefs_s47 v46- {-# INLINE rule787 #-}- rule787 = \ (_ :: ()) ->- []- {-# INLINE rule788 #-}- rule788 = \ (_ :: ()) ->- []- {-# INLINE rule789 #-}- rule789 = \ (_ :: ()) ->- []- {-# INLINE rule790 #-}- rule790 = \ (_ :: ()) ->- Seq.empty- {-# INLINE rule791 #-}- rule791 = \ (_ :: ()) ->- []- {-# INLINE rule792 #-}- rule792 = \ (_ :: ()) ->- Set.empty- {-# INLINE rule793 #-}- rule793 = \ (_ :: ()) ->- []- {-# INLINE rule794 #-}- rule794 = \ (_ :: ()) ->- []- {-# INLINE rule795 #-}- rule795 = \ (_ :: ()) ->- []- {-# INLINE rule796 #-}- rule796 = \ (_ :: ()) ->+{-# LINE 2 "./src-ag/Patterns.ag" #-}++-- Patterns.ag imports+import UU.Scanner.Position(Pos)+import CommonTypes (ConstructorIdent,Identifier)+{-# LINE 11 "dist/build/Transform.hs" #-}++{-# LINE 2 "./src-ag/ConcreteSyntax.ag" #-}++import UU.Scanner.Position (Pos)+import Patterns (Pattern)+import Expression (Expression)+import CommonTypes+import Macro --marcos+{-# LINE 20 "dist/build/Transform.hs" #-}++{-# LINE 8 "./src-ag/Transform.ag" #-}++import Control.Monad(mplus,mzero)+import Data.List (partition, nub,intersperse, union)+import Data.Maybe+import qualified Data.Map as Map+import Data.Map (Map)+import Data.Set as Set (Set, member, union, toList, fromList, empty, singleton, member, unions, size, fold, intersection, difference, insert, elems)+import qualified Data.Sequence as Seq+import Data.Sequence(Seq, (><))+import UU.Scanner.Position(noPos)++import ConcreteSyntax+import AbstractSyntax+import ErrorMessages+import Patterns (Patterns,Pattern(..))+import Expression (Expression(..))+import HsToken++import RhsCheck+import Debug.Trace+{-# LINE 43 "dist/build/Transform.hs" #-}+import Control.Monad.Identity (Identity)+import qualified Control.Monad.Identity+{-# LINE 104 "./src-ag/Transform.ag" #-}+type DefinedSets = Map Identifier (Set NontermIdent) +{-# LINE 48 "dist/build/Transform.hs" #-}++{-# LINE 124 "./src-ag/Transform.ag" #-}+type FieldMap = [(Identifier, Type)] +{-# LINE 52 "dist/build/Transform.hs" #-}++{-# LINE 125 "./src-ag/Transform.ag" #-}+type DataTypes = Map.Map NontermIdent (Map.Map ConstructorIdent FieldMap) +{-# LINE 56 "dist/build/Transform.hs" #-}++{-# LINE 148 "./src-ag/Transform.ag" #-}+type AttrName = (Identifier,Identifier) +{-# LINE 60 "dist/build/Transform.hs" #-}++{-# LINE 149 "./src-ag/Transform.ag" #-}+type RuleInfo = (Maybe Identifier, [AttrName]->Pattern, Expression, [AttrName], Bool, String, Bool, Bool) +{-# LINE 64 "dist/build/Transform.hs" #-}++{-# LINE 150 "./src-ag/Transform.ag" #-}+type SigInfo = (Identifier,Type) +{-# LINE 68 "dist/build/Transform.hs" #-}++{-# LINE 151 "./src-ag/Transform.ag" #-}+type UniqueInfo = (Identifier,Identifier) +{-# LINE 72 "dist/build/Transform.hs" #-}++{-# LINE 152 "./src-ag/Transform.ag" #-}+type AugmentInfo = (Identifier,Expression)+{-# LINE 76 "dist/build/Transform.hs" #-}++{-# LINE 153 "./src-ag/Transform.ag" #-}+type AroundInfo = (Identifier,Expression)+{-# LINE 80 "dist/build/Transform.hs" #-}++{-# LINE 154 "./src-ag/Transform.ag" #-}+type MergeInfo = (Identifier, Identifier, [Identifier], Expression)+{-# LINE 84 "dist/build/Transform.hs" #-}++{-# LINE 203 "./src-ag/Transform.ag" #-}+++checkDuplicate :: (Identifier -> Identifier -> Error)+ -> Identifier -> val -> Map Identifier val -> (Map Identifier val,Seq Error)+checkDuplicate dupError key val m+ = case Map.lookupIndex key m of+ Just ix -> let (key',_) = Map.elemAt ix m+ in (m,Seq.singleton (dupError key key'))+ Nothing -> (Map.insert key val m,Seq.empty)++checkDuplicates :: (Identifier -> Identifier -> Error)+ -> [(Identifier, val)] -> Map Identifier val -> (Map Identifier val,Seq Error)+checkDuplicates dupError new m = foldErrors check m new+ where check = uncurry (checkDuplicate dupError)++foldErrors :: (b -> t -> (t, Seq Error)) -> t -> [b] -> (t, Seq Error)+foldErrors f n xs = foldl g (n,Seq.empty) xs+ where g ~(e,es) x = let (e',es') = f x e+ in (e', es >< es')+++checkForDuplicates :: (Identifier -> Identifier -> Error) -> [Identifier] -> [Error]+checkForDuplicates _ [] = []+checkForDuplicates err (x:xs) = let (same,other) = partition (equalId x) xs+ in map (err x) same ++ checkForDuplicates err other++equalId :: Identifier -> Identifier -> Bool+equalId x y = getName x == getName y++{-# LINE 116 "dist/build/Transform.hs" #-}++{-# LINE 354 "./src-ag/Transform.ag" #-}++type RulesAndErrors = ([Rule], Seq Error)+type SigsAndErrors = ([TypeSig], Seq Error)+type InstsAndErrors = ([(Identifier, Type)], Seq Error)+type UniquesAndErrors = (Map Identifier Identifier, Seq Error)+type AugmentsAndErrors = (Map Identifier [Expression], Seq Error)+type AroundsAndErrors = (Map Identifier [Expression], Seq Error)+type MergesAndErrors = (Map Identifier (Identifier, [Identifier], Expression), Seq Error)+type AttrOverwrite = Map AttrName Bool+type AccumRuleCheck = (RulesAndErrors, AttrOverwrite)+type AccumDefiCheck = (Seq Error, AttrOverwrite, [AttrName], [AttrName])++checkRules :: Map NontermIdent (Attributes, Attributes) -> DataTypes ->+ Map NontermIdent (Map ConstructorIdent [Identifier]) -> Map NontermIdent (Map ConstructorIdent [SigInfo]) ->+ Map NontermIdent (Map ConstructorIdent [MergeInfo]) ->+ NontermIdent -> ConstructorIdent -> [RuleInfo] -> RulesAndErrors+checkRules attributes fields allinsts allsigs _ nt con rs+ = let fieldmap :: FieldMap+ fieldmap = (_LHS, NT nt [] False) : (_LOC, NT nullIdent [] False) : (_INST, NT nullIdent [] False) : (_FIRST, NT nullIdent [] False) : (_LAST, NT nullIdent [] False)+ : Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fields)+ ++ mapMaybe (\instNm -> lookup instNm sigs >>= \tp -> return (instNm, tp)) (Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allinsts))+ -- merged children are not allowed to have any inherited attrs defined: do not include++ sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allsigs)++ hasAttrib f tp attr = Map.member attr (f (Map.findWithDefault (Map.empty,Map.empty) tp attributes))++ checkRule :: RuleInfo -> AccumRuleCheck -> AccumRuleCheck+ checkRule (mbNm, pat,ex,as,owrt,str, pur, eager) ((r1,e1),m1)+ = let (e2,m2,u2,_) = foldr (checkDefi owrt) (e1,m1,[],[]) as+ in ( (Rule mbNm (pat u2) ex owrt str True pur False Nothing eager : r1, e2), m2)++ checkDefi :: Bool -> AttrName -> AccumDefiCheck -> AccumDefiCheck+ checkDefi owrt fa@(field,attr) (e,m,u,bs)+ = case lookup field fieldmap+ of Just (NT tp _ _) ->+ let tp' = maybe tp id (deforestedNt tp)+ in if field == _LOC || field == _INST || field == _FIRST || field == _LAST+ || hasAttrib (if getName field==getName _LHS then snd else fst) tp' attr+ then case Map.lookupIndex fa m of+ Just ix -> let ((_,attr2),b) = Map.elemAt ix m+ in if b && not (fa `elem` bs)+ then ( e, Map.insert fa owrt m, fa:u, fa:bs)+ else (((Seq.<|)) (DupRule nt con field attr2 attr) e, m, fa:u, bs)+ Nothing -> ( e, Map.insert fa owrt m, u, fa:bs)+ else (((Seq.<|)) (SuperfluousRule nt con field attr) e, m, fa:u, bs)+ _ -> (((Seq.<|)) (UndefChild nt con field) e, m, fa:u, bs )++ in fst (foldr checkRule (([],Seq.empty),Map.empty) rs)++checkRuleNames :: NontermIdent -> ConstructorIdent -> [RuleInfo] -> Seq Error+checkRuleNames nt con+ = fst . foldr checkRule (Seq.empty, Set.empty)+ where+ checkRule (Just nm,_,_,_,_,_,_,_) (errs, nms)+ | nm `Set.member` nms = (DupRuleName nt con nm Seq.<| errs, nms)+ | otherwise = (errs, Set.insert nm nms)+ checkRule (Nothing,_,_,_,_,_,_,_) inp = inp++checkSigs :: NontermIdent -> ConstructorIdent -> [SigInfo] -> SigsAndErrors+checkSigs nt con sis+ = let checkSig (ide,typ) (sigs,errs)+ = if ide `elem` map (\(TypeSig n _)-> n) sigs+ then (sigs, ((Seq.<|)) (DupSig nt con ide) errs)+ -- else if not (ide `elem` locattrdefs)+ -- then (sigs, ((Seq.<|)) (SupSig nt con ide) errs)+ else (TypeSig ide typ:sigs, errs)+ in foldr checkSig ([],Seq.empty) sis++checkInsts :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [SigInfo]) -> DataTypes -> NontermIdent -> ConstructorIdent -> [Identifier] -> InstsAndErrors+checkInsts allNts sigMap _ nt con+ = foldr (\inst (insts, errs) ->+ maybe (insts, Seq.singleton (MissingInstSig nt con inst) >< errs)+ (\info@(k, NT nm args _) ->+ case findInst k insts of+ Just k' -> (insts, Seq.singleton (DupChild nt con k k') >< errs)+ Nothing -> case nm `Set.member` allNts of+ True -> (info : insts, errs)+ False | take 2 (getName nm) == "T_" -> let nm' = Ident (drop 2 (getName nm)) (getPos nm)+ info' = (k, NT nm' args True) -- this should be the only place at which 'for' with value True can be generated+ in case nm' `Set.member` allNts of+ True -> (info' : insts, errs)+ False -> (insts, Seq.singleton (UndefNont nm') >< errs)+ | otherwise -> (insts, Seq.singleton (UndefNont nm) >< errs)+ )+ $ findSig inst+ ) ([], Seq.empty)+ where+ sigs = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt sigMap)++ findSig name+ = do tp@(NT _ _ _) <- lookup name sigs+ return (name, tp)++ findInst _ [] = Nothing+ findInst k ((k', _): r)+ | k == k' = Just k'+ | otherwise = findInst k r++checkUniques :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [UniqueInfo] -> UniquesAndErrors+checkUniques allAttrs nt con uniques+ = let checkUnique (ident,ref) (us,errs)+ = if ident `Map.member` us+ then (us, ((Seq.<|)) (DupUnique nt con ident) errs)+ else if Map.member ref inhs && Map.member ref syns+ then (Map.insert ident ref us, errs)+ else (us, ((Seq.<|)) (MissingUnique nt ref) errs)++ (inhs,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkUnique (Map.empty, Seq.empty) uniques++checkAugments :: Map NontermIdent (Attributes, Attributes) -> NontermIdent -> ConstructorIdent -> [AugmentInfo] -> AugmentsAndErrors+checkAugments allAttrs nt _ augments+ = let checkAugment (ident,expr) (as,errs)+ = if ident `Map.member` as+ then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)+ else if Map.member ident syns+ then (Map.insert ident [expr] as, errs)+ else (as, ((Seq.<|)) (MissingSyn nt ident) errs)++ (_,syns) = Map.findWithDefault (Map.empty,Map.empty) nt allAttrs+ in foldr checkAugment (Map.empty, Seq.empty) augments++checkArounds :: DataTypes -> NontermIdent -> ConstructorIdent -> [AroundInfo] -> AroundsAndErrors+checkArounds fieldMap nt con arounds+ = let checkAround (ident,expr) (as,errs)+ = if ident `Map.member` as+ then (Map.update (\vs -> Just (vs ++ [expr])) ident as, errs)+ else case lookup ident fields of+ Just (NT _ _ _) -> (Map.insert ident [expr] as, errs)+ _ -> (as, ((Seq.<|)) (UndefChild nt con ident) errs)+ fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)+ in foldr checkAround (Map.empty, Seq.empty) arounds++checkMerges :: Set NontermIdent -> Map NontermIdent (Map ConstructorIdent [Identifier]) -> DataTypes -> NontermIdent -> ConstructorIdent -> [MergeInfo] -> MergesAndErrors+checkMerges allNts allInsts fieldMap _ con merges+ = let checkMerge (target,nt,sources,expr) (m,errs)+ = let fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt fieldMap)+ insts = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)+ allFields = insts ++ map fst fields -- note: sources of merge may not contain a target (for simplicity)+ in if target `Map.member` m -- check for duplicate with self+ then (m, DupChild nt con target (fst $ Map.elemAt (Map.findIndex target m) m) Seq.<| errs)+ else if target `elem` allFields+ then (m, DupChild nt con target (head $ filter (== target) allFields) Seq.<| errs)+ else let missing = filter (\s -> not (s `elem` allFields)) sources+ in if null missing+ then if nt `Set.member` allNts -- check if the nonterm is defined+ then (Map.insert target (nt, sources, expr) m, errs) -- all ok..+ else (m, UndefNont nt Seq.<| errs)+ else (m, (Seq.fromList $ map (UndefChild nt con) missing) Seq.>< errs)+ in foldr checkMerge (Map.empty, Seq.empty) merges++unionunionplusplus :: Map NontermIdent (Map ConstructorIdent [a]) -> Map NontermIdent (Map ConstructorIdent [a]) -> Map NontermIdent (Map ConstructorIdent [a])+unionunionplusplus = Map.unionWith (Map.unionWith (++))+{-# LINE 273 "dist/build/Transform.hs" #-}++{-# LINE 511 "./src-ag/Transform.ag" #-}++mkUniqueRules :: Options -> Map NontermIdent (Map ConstructorIdent [RuleInfo]) -> DataTypes -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)]) -> Map NontermIdent (Attributes,Attributes) -> NontermIdent -> ConstructorIdent -> Map Identifier Identifier -> [Rule]+mkUniqueRules opts allRules allFields allInsts allAttrDecls nt con usMap+ = map apply groups+ where+ fields = Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allFields)+ ++ Map.findWithDefault [] con (Map.findWithDefault Map.empty nt allInsts)+ -- may have duplicates++ attrDefs = let projectDefs (_,_,_,defs,_,_,_,_) = defs+ in concatMap projectDefs $ Map.findWithDefault [] con $ Map.findWithDefault Map.empty nt allRules++ groups = Map.assocs $ Map.foldrWithKey (\i r m -> Map.insertWith (++) r [i] m) Map.empty usMap+ apply (ref,us) = mkRule ref (findOutField ref) us+ findOutField ref = case [ chld | (chld, NT tp _ _) <- fields, tp `hasSyn` ref] of+ [] -> _LHS+ (x:_) -> x+ hasSyn tp ref = Map.member ref $ snd $ Map.findWithDefault (Map.empty,Map.empty) tp allAttrDecls+ mkRule ref outFld locAttrs+ = let locs = filter (not . existsLoc) locAttrs+ outAttr = attr outFld ref+ defs = (if hasOut then [] else [outAttr]) ++ [attr _LOC u | u <- locs ]+ pat = Product noPos defs+ rhs = Expression noPos $ wrap ref $ foldr gencase (finalout hasOut locs) locs+ -- [HsToken ("mkUniques" ++ show (length locAttrs) ++ " ") noPos, AGField _LHS ref noPos Nothing]+ rul = Rule Nothing pat rhs False "-- generated by the unique rule mechanism." False True False Nothing False+ hasOut = exists outAttr+ exists (Alias fld a _) = (fld,a) `elem` attrDefs+ exists _ = False+ existsLoc nm = exists (attr _LOC nm)+ in rul+ attr fld a = Alias fld a (Underscore noPos)+ gencase nm outp+ = h ("case " ++ uniqueDispenser opts ++ " __cont of { (__cont, " ++ getName nm ++ ") -> ") ++ outp ++ h "}"+ h s = [HsToken s noPos]+ finalout noGenCont us = h ("(" ++ concat (intersperse "," ( (if noGenCont then [] else ["__cont"]) ++ map getName us)) ++ ")")+ wrap ref inp = h "let __cont = " ++ [AGField _LHS ref noPos Nothing] ++ h " in seq __cont ( " ++ inp ++ h " )"+{-# LINE 313 "dist/build/Transform.hs" #-}++{-# LINE 747 "./src-ag/Transform.ag" #-}++flattenDatas :: DataTypes -> Map NontermIdent (Set NontermIdent)+flattenDatas ds = Map.map flatten ds+ where flatten cs = Set.fromList [ nt | (_, NT nt _ _) <- concatMap snd (Map.toList cs)]++reachableFrom :: Map NontermIdent (Set NontermIdent) -> Set NontermIdent -> Set NontermIdent+reachableFrom table = reach+ where reach nts = let nts' = Set.unions (nts : [ ns | nt <- Set.toList nts+ , let ns = Map.findWithDefault Set.empty nt table ])+ in if Set.size nts' > Set.size nts+ then reach nts'+ else nts+invert :: Map NontermIdent (Set NontermIdent) -> Map NontermIdent (Set NontermIdent)+invert = foldr inv Map.empty . Map.toList+ where inv (x,ns) m = fold (\n m' -> Map.insertWith Set.union n (Set.singleton x) m') m ns++path :: Map NontermIdent (Set NontermIdent) -> NontermIdent -> NontermIdent -> Set NontermIdent+path table from to = let children = Map.findWithDefault Set.empty from table+ forward = reachableFrom table children+ backward = reachableFrom (invert table)+ (Set.singleton to)+ in Set.intersection forward backward+{-# LINE 338 "dist/build/Transform.hs" #-}++{-# LINE 874 "./src-ag/Transform.ag" #-}++extract :: String -> [String]+extract s = case dropWhile isSeparator s of+ "" -> []+ s' -> w : extract s''+ where (w, s'') = break isSeparator s'+isSeparator :: Char -> Bool+isSeparator x = x == '_'+{-# LINE 349 "dist/build/Transform.hs" #-}++{-# LINE 900 "./src-ag/Transform.ag" #-}++pragmaMapUnion :: PragmaMap -> PragmaMap -> PragmaMap+pragmaMapUnion = Map.unionWith (Map.unionWith Set.union)++pragmaMapSingle :: NontermIdent -> ConstructorIdent -> Set Identifier -> PragmaMap+pragmaMapSingle nt con nms = Map.singleton nt (Map.singleton con nms)+{-# LINE 358 "dist/build/Transform.hs" #-}++{-# LINE 932 "./src-ag/Transform.ag" #-}++orderMapUnion :: AttrOrderMap -> AttrOrderMap -> AttrOrderMap+orderMapUnion = Map.unionWith (Map.unionWith Set.union)++orderMapSingle :: NontermIdent -> ConstructorIdent -> Set Dependency -> AttrOrderMap+orderMapSingle nt con deps = Map.singleton nt (Map.singleton con deps)+{-# LINE 367 "dist/build/Transform.hs" #-}++{-# LINE 958 "./src-ag/Transform.ag" #-}++mergeParams :: ParamMap -> ParamMap -> ParamMap+mergeParams = Map.unionWith (++)+{-# LINE 373 "dist/build/Transform.hs" #-}++{-# LINE 981 "./src-ag/Transform.ag" #-}++mergeCtx :: ContextMap -> ContextMap -> ContextMap+mergeCtx+ = Map.unionWith nubconcat+ where nubconcat a b = nub (a ++ b)+{-# LINE 381 "dist/build/Transform.hs" #-}++{-# LINE 1000 "./src-ag/Transform.ag" #-}++mergeQuant :: QuantMap -> QuantMap -> QuantMap+mergeQuant = Map.unionWith (++)+{-# LINE 387 "dist/build/Transform.hs" #-}++{-# LINE 1011 "./src-ag/Transform.ag" #-}++mergeDerivings :: Derivings -> Derivings -> Derivings+mergeDerivings m1 m2 = foldr (\(n,cs) m -> Map.insertWith Set.union n cs m) m2 (Map.toList m1)+{-# LINE 393 "dist/build/Transform.hs" #-}++{-# LINE 1023 "./src-ag/Transform.ag" #-}++merge ::(Ord k, Ord k1) => Map k (Map k1 a) -> Map k (Map k1 a) -> Map k (Map k1 a)+merge x y = foldr f y (Map.toList x)+ where f ~(k,v) m = Map.insertWith (Map.union) k v m+{-# LINE 400 "dist/build/Transform.hs" #-}++{-# LINE 1066 "./src-ag/Transform.ag" #-}++checkAttrs :: DataTypes -> [NontermIdent] -> [(Identifier, a)] -> [(Identifier, b)] -> Map NontermIdent (Map Identifier a, Map Identifier b) -> (Map NontermIdent (Map Identifier a, Map Identifier b), Seq Error)+checkAttrs allFields nts inherited synthesized decls' = foldErrors check decls' nts where+ check nt decls | not (nt `Map.member` allFields) = (decls,Seq.singleton(UndefNont nt))+ | otherwise = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt decls+ (inh',einh) = checkDuplicates (DupInhAttr nt) inherited inh+ (syn',esyn) = checkDuplicates (DupSynAttr nt) synthesized syn+ in (Map.insert nt (inh',syn') decls,einh >< esyn)+{-# LINE 411 "dist/build/Transform.hs" #-}++{-# LINE 1078 "./src-ag/Transform.ag" #-}++addSelf :: Ord k1 => k1 -> Map k1 (Map k a, Attributes) -> Map k1 (Map k a, Attributes)+addSelf name atMap = let (eInh,eSyn) = Map.findWithDefault(Map.empty,Map.empty) name atMap+ in Map.insert name (eInh, Map.insert (Ident "self" noPos) Self eSyn)atMap+{-# LINE 418 "dist/build/Transform.hs" #-}++{-# LINE 1216 "./src-ag/Transform.ag" #-}++-- We want the last Just in the list+flipmplus = flip mplus+{-# LINE 424 "dist/build/Transform.hs" #-}++{-# LINE 1224 "./src-ag/Transform.ag" #-}++makeType :: Set NontermIdent -> Type -> Type+makeType nts tp@(NT x _ _) | Set.member x nts = tp+ | otherwise = Haskell (typeToHaskellString Nothing [] tp)+makeType _ tp = tp+{-# LINE 432 "dist/build/Transform.hs" #-}++{-# LINE 1230 "./src-ag/Transform.ag" #-}++constructGrammar :: Set NontermIdent+ -> ParamMap+ -> Map NontermIdent (Map ConstructorIdent (Set Identifier))+ -> DataTypes+ -> Map NontermIdent [ConstructorIdent]+ -> Map NontermIdent (Map ConstructorIdent [Type])+ -> Map NontermIdent (Attributes, Attributes)+ -> Map NontermIdent (Map Identifier (String, String, String))+ -> Derivings+ -> Set NontermIdent+ -> Map NontermIdent (Map ConstructorIdent [Rule])+ -> Map NontermIdent (Map ConstructorIdent [TypeSig])+ -> Map NontermIdent (Map ConstructorIdent [(Identifier, Type)])+ -> TypeSyns+ -> PragmaMap+ -> AttrOrderMap+ -> 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)))+ -> Map NontermIdent (Map ConstructorIdent MaybeMacro)+ -> Grammar++constructGrammar _ ntParams prodParams gram prodOrder constraints attrs uses derivings wrap allrules tsigs allinsts tsyns pragmaMap orderMap contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap macros =+ let gr = [ (nt,alts) | (nt,alts) <- Map.toList gram]+ nonts = map nont gr+ nont (nt,alts) = let (inh,syn) = Map.findWithDefault (Map.empty,Map.empty) nt attrs+ rmap = Map.findWithDefault Map.empty nt allrules+ tsmap = Map.findWithDefault Map.empty nt tsigs+ instsmap = Map.findWithDefault Map.empty nt allinsts+ params = Map.findWithDefault [] nt ntParams+ mergemap = Map.findWithDefault Map.empty nt mergeMap+ macromap = Map.findWithDefault Map.empty nt macros+ csmap = Map.findWithDefault Map.empty nt constraints+ psmap = Map.findWithDefault Map.empty nt prodParams+ prs = Map.findWithDefault [] nt prodOrder+ alt con =+ let flds = Map.findWithDefault [] con alts+ rules = Map.findWithDefault [] con rmap+ tsigs' = Map.findWithDefault [] con tsmap+ insts = Map.findWithDefault [] con instsmap+ merges = [ (n, NT t [] False) | (n, (t, _, _)) <- Map.assocs $ maybe Map.empty id (Map.lookup con mergemap) ]+ cs = Map.findWithDefault [] con csmap+ ps = Set.elems $ Map.findWithDefault Set.empty con psmap+ mbMacro = Map.findWithDefault Nothing con macromap++ -- important: keep order of children+ cldrn = map child (flds ++ filter (not . existsAsField) insts ++ merges)+ child (nm, tp) =+ let tpI = if existsAsInst nm+ then fromJust $ lookup nm insts+ else tp+ virt = if existsAsInst nm+ then case lookup nm flds of+ Just tp' -> ChildReplace tp'+ Nothing -> ChildAttr+ else if existsAsMerge nm+ then ChildAttr+ else ChildSyntax+ in Child nm tpI virt+ existsAsInst nm = maybe False (const True) (lookup nm insts)+ existsAsField (nm,_) = maybe False (const True) (lookup nm flds)+ existsAsMerge nm = maybe False (const True) (lookup nm merges)+ in Production con ps cs cldrn rules tsigs' mbMacro+ in Nonterminal nt params inh syn (map alt prs)+ in Grammar tsyns uses derivings wrap nonts pragmaMap orderMap ntParams contextMap quantMap uniqueMap augmentsMap aroundsMap mergeMap+{-# LINE 504 "dist/build/Transform.hs" #-}++{-# LINE 1301 "./src-ag/Transform.ag" #-}++mapUnionWithSetUnion :: Map NontermIdent (Set ConstructorIdent) -> Map NontermIdent (Set ConstructorIdent) -> Map NontermIdent (Set ConstructorIdent)+mapUnionWithSetUnion = Map.unionWith Set.union+mapUnionWithPlusPlus :: Map BlockInfo [a] -> Map BlockInfo [a] -> Map BlockInfo [a]+mapUnionWithPlusPlus = Map.unionWith (++)+{-# LINE 512 "dist/build/Transform.hs" #-}+-- AG ----------------------------------------------------------+-- wrapper+data Inh_AG = Inh_AG { options_Inh_AG :: (Options) }+data Syn_AG = Syn_AG { agi_Syn_AG :: ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))), blocks_Syn_AG :: (Blocks), constructorTypeMap_Syn_AG :: (Map NontermIdent ConstructorType), errors_Syn_AG :: (Seq Error), moduleDecl_Syn_AG :: (Maybe (String,String,String)), output_Syn_AG :: (Grammar), pragmas_Syn_AG :: (Options -> Options) }+{-# INLINABLE wrap_AG #-}+wrap_AG :: T_AG -> Inh_AG -> (Syn_AG )+wrap_AG (T_AG act) (Inh_AG _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_AG_vIn1 _lhsIoptions+ (T_AG_vOut1 _lhsOagi _lhsOblocks _lhsOconstructorTypeMap _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas) <- return (inv_AG_s2 sem arg)+ return (Syn_AG _lhsOagi _lhsOblocks _lhsOconstructorTypeMap _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas)+ )++-- cata+{-# INLINE sem_AG #-}+sem_AG :: AG -> T_AG +sem_AG ( AG elems_ ) = sem_AG_AG ( sem_Elems elems_ )++-- semantic domain+newtype T_AG = T_AG {+ attach_T_AG :: Identity (T_AG_s2 )+ }+newtype T_AG_s2 = C_AG_s2 {+ inv_AG_s2 :: (T_AG_v1 )+ }+data T_AG_s3 = C_AG_s3+type T_AG_v1 = (T_AG_vIn1 ) -> (T_AG_vOut1 )+data T_AG_vIn1 = T_AG_vIn1 (Options)+data T_AG_vOut1 = T_AG_vOut1 ((Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))) (Blocks) (Map NontermIdent ConstructorType) (Seq Error) (Maybe (String,String,String)) (Grammar) (Options -> Options)+{-# NOINLINE sem_AG_AG #-}+sem_AG_AG :: T_Elems -> T_AG +sem_AG_AG arg_elems_ = T_AG (return st2) where+ {-# NOINLINE st2 #-}+ st2 = let+ v1 :: T_AG_v1 + v1 = \ (T_AG_vIn1 _lhsIoptions) -> ( let+ _elemsX20 = Control.Monad.Identity.runIdentity (attach_T_Elems (arg_elems_))+ (T_Elems_vOut19 _elemsIattrDecls _elemsIattrOrderCollect _elemsIattrs _elemsIblocks _elemsIcollectedArounds _elemsIcollectedAugments _elemsIcollectedConParams _elemsIcollectedConstraints _elemsIcollectedConstructorsMap _elemsIcollectedFields _elemsIcollectedInsts _elemsIcollectedMacros _elemsIcollectedMerges _elemsIcollectedNames _elemsIcollectedRules _elemsIcollectedSetNames _elemsIcollectedSigs _elemsIcollectedUniques _elemsIconstructorTypeMap _elemsIctxCollect _elemsIdefSets _elemsIderivings _elemsIerrors _elemsImoduleDecl _elemsIparamsCollect _elemsIpragmas _elemsIquantCollect _elemsIsemPragmasCollect _elemsItypeSyns _elemsIuseMap _elemsIwrappers) = inv_Elems_s20 _elemsX20 (T_Elems_vIn19 _elemsOallAttrDecls _elemsOallAttrs _elemsOallConstructors _elemsOallFields _elemsOallNonterminals _elemsOattrDecls _elemsOattrs _elemsOdefSets _elemsOdefinedSets _elemsOoptions)+ _lhsOoutput :: Grammar+ _lhsOoutput = rule0 _allAttrDecls _allConParams _allConstraints _allFields _allMacros _allNonterminals _checkedArounds _checkedAugments _checkedInsts _checkedMerges _checkedRules _checkedSigs _checkedUniques _elemsIattrOrderCollect _elemsIctxCollect _elemsIderivings _elemsIparamsCollect _elemsIquantCollect _elemsIsemPragmasCollect _elemsItypeSyns _elemsIuseMap _elemsIwrappers _lhsIoptions _prodOrder+ _prodOrder = rule1 _elemsIcollectedFields+ _allFields = rule2 _elemsIcollectedFields+ _allConstraints = rule3 _elemsIcollectedConstraints+ _allConParams = rule4 _elemsIcollectedConParams+ _allConstrs = rule5 _elemsIcollectedFields+ _allRules = rule6 _elemsIcollectedRules+ _allSigs = rule7 _allAttrDecls _elemsIcollectedSigs _elemsIcollectedUniques+ _allInsts = rule8 _elemsIcollectedInsts+ _allUniques = rule9 _elemsIcollectedUniques+ _allAugments = rule10 _elemsIcollectedAugments+ _allArounds = rule11 _elemsIcollectedArounds+ _allMerges = rule12 _elemsIcollectedMerges+ _augmentSigs = rule13 _allAugments+ _allRulesErrs = rule14 _allAttrDecls _allFields _allInsts _allMerges _allRules _allSigs+ _allNamesErrs = rule15 _allRules+ _allSigsErrs = rule16 _allSigs+ _allInstsErrs = rule17 _allFields _allInsts _allNonterminals _allSigs+ _allUniquesErrs = rule18 _allAttrDecls _allUniques+ _allAugmentErrs = rule19 _allAttrDecls _allAugments+ _allAroundsErrs = rule20 _allArounds _allFields+ _allMergesErrs = rule21 _allFields _allInsts _allMerges _allNonterminals+ _checkedRulesPre = rule22 _allRulesErrs+ _checkedSigs = rule23 _allSigsErrs _augmentSigs+ _checkedInsts = rule24 _allInstsErrs+ _checkedUniques = rule25 _allUniquesErrs+ _checkedAugments = rule26 _allAugmentErrs+ _checkedArounds = rule27 _allAroundsErrs+ _checkedRules = rule28 _allAttrDecls _allFields _allRules _checkedInsts _checkedRulesPre _checkedUniques _lhsIoptions+ _checkedMerges = rule29 _allMergesErrs+ _errs1 = rule30 _elemsItypeSyns+ _errs2 = rule31 _allFields+ _errs3 = rule32 ()+ _errs4 = rule33 _allRulesErrs+ _errs5 = rule34 _allSigsErrs+ _errs6 = rule35 _allInstsErrs+ _errs7 = rule36 _allUniquesErrs+ _errs8 = rule37 _allAugmentErrs+ _errs9 = rule38 _allAroundsErrs+ _errs10 = rule39 _allNamesErrs+ _errs11 = rule40 _allMergesErrs+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule41 _elemsIerrors _errs1 _errs10 _errs11 _errs2 _errs3 _errs4 _errs5 _errs6 _errs7 _errs8 _errs9+ _allNonterminals = rule42 _elemsIcollectedNames _elemsIcollectedSetNames+ _elemsOallConstructors = rule43 _elemsIcollectedConstructorsMap+ _elemsOdefSets = rule44 _allNonterminals+ _elemsOdefinedSets = rule45 _elemsIdefSets+ _elemsOattrDecls = rule46 ()+ _allAttrDecls = rule47 _allNonterminals _elemsIattrDecls _lhsIoptions+ _allMacros = rule48 _elemsIcollectedMacros+ _lhsOagi :: (Set NontermIdent, DataTypes, Map NontermIdent (Attributes, Attributes))+ _lhsOagi = rule49 _allAttrs _allFields _allNonterminals+ _allAttrs = rule50 _allNonterminals _elemsIattrs _lhsIoptions+ _elemsOattrs = rule51 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule52 _elemsIblocks+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule53 _elemsIconstructorTypeMap+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule54 _elemsImoduleDecl+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule55 _elemsIpragmas+ _elemsOallAttrDecls = rule56 _allAttrDecls+ _elemsOallAttrs = rule57 _allAttrs+ _elemsOallFields = rule58 _allFields+ _elemsOallNonterminals = rule59 _allNonterminals+ _elemsOoptions = rule60 _lhsIoptions+ __result_ = T_AG_vOut1 _lhsOagi _lhsOblocks _lhsOconstructorTypeMap _lhsOerrors _lhsOmoduleDecl _lhsOoutput _lhsOpragmas+ in __result_ )+ in C_AG_s2 v1+ {-# INLINE rule0 #-}+ {-# LINE 50 "./src-ag/Transform.ag" #-}+ rule0 = \ _allAttrDecls _allConParams _allConstraints _allFields _allMacros _allNonterminals _checkedArounds _checkedAugments _checkedInsts _checkedMerges _checkedRules _checkedSigs _checkedUniques ((_elemsIattrOrderCollect) :: AttrOrderMap) ((_elemsIctxCollect) :: ContextMap) ((_elemsIderivings) :: Derivings) ((_elemsIparamsCollect) :: ParamMap) ((_elemsIquantCollect) :: QuantMap) ((_elemsIsemPragmasCollect) :: PragmaMap) ((_elemsItypeSyns) :: TypeSyns) ((_elemsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ((_elemsIwrappers) :: Set NontermIdent) ((_lhsIoptions) :: Options) _prodOrder ->+ {-# LINE 50 "./src-ag/Transform.ag" #-}+ constructGrammar _allNonterminals+ _elemsIparamsCollect+ _allConParams+ _allFields+ _prodOrder+ _allConstraints+ _allAttrDecls+ _elemsIuseMap+ _elemsIderivings+ (if wrappers _lhsIoptions then _allNonterminals else _elemsIwrappers)+ _checkedRules+ _checkedSigs+ _checkedInsts+ _elemsItypeSyns+ _elemsIsemPragmasCollect+ _elemsIattrOrderCollect+ _elemsIctxCollect+ _elemsIquantCollect+ _checkedUniques+ _checkedAugments+ _checkedArounds+ _checkedMerges+ _allMacros+ {-# LINE 650 "dist/build/Transform.hs"#-}+ {-# INLINE rule1 #-}+ {-# LINE 258 "./src-ag/Transform.ag" #-}+ rule1 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->+ {-# LINE 258 "./src-ag/Transform.ag" #-}+ let f (nt,con,_) = Map.insertWith g nt [con]+ g [con] lst | con `elem` lst = lst+ | otherwise = con : lst+ g _ _ = error "This is not possible"+ in foldr f Map.empty _elemsIcollectedFields+ {-# LINE 660 "dist/build/Transform.hs"#-}+ {-# INLINE rule2 #-}+ {-# LINE 263 "./src-ag/Transform.ag" #-}+ rule2 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->+ {-# LINE 263 "./src-ag/Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedFields+ {-# LINE 667 "dist/build/Transform.hs"#-}+ {-# INLINE rule3 #-}+ {-# LINE 266 "./src-ag/Transform.ag" #-}+ rule3 = \ ((_elemsIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->+ {-# LINE 266 "./src-ag/Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedConstraints+ {-# LINE 674 "dist/build/Transform.hs"#-}+ {-# INLINE rule4 #-}+ {-# LINE 269 "./src-ag/Transform.ag" #-}+ rule4 = \ ((_elemsIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->+ {-# LINE 269 "./src-ag/Transform.ag" #-}+ let f (nt,con,fm) = Map.insertWith (Map.unionWith Set.union) nt (Map.singleton con fm)+ in foldr f (Map.empty) _elemsIcollectedConParams+ {-# LINE 681 "dist/build/Transform.hs"#-}+ {-# INLINE rule5 #-}+ {-# LINE 272 "./src-ag/Transform.ag" #-}+ rule5 = \ ((_elemsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->+ {-# LINE 272 "./src-ag/Transform.ag" #-}+ let f (nt,con,_) = Map.insertWith (++) nt [con]+ in foldr f (Map.empty) _elemsIcollectedFields+ {-# LINE 688 "dist/build/Transform.hs"#-}+ {-# INLINE rule6 #-}+ {-# LINE 275 "./src-ag/Transform.ag" #-}+ rule6 = \ ((_elemsIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->+ {-# LINE 275 "./src-ag/Transform.ag" #-}+ let f (nt,con,r) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [r])+ in foldr f (Map.empty) _elemsIcollectedRules+ {-# LINE 695 "dist/build/Transform.hs"#-}+ {-# INLINE rule7 #-}+ {-# LINE 278 "./src-ag/Transform.ag" #-}+ rule7 = \ _allAttrDecls ((_elemsIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_elemsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->+ {-# LINE 278 "./src-ag/Transform.ag" #-}+ let f (nt,con,t) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con [t])+ typeof nt r = Map.findWithDefault (Haskell "<unknown>") r $ fst $ Map.findWithDefault (Map.empty,Map.empty) nt _allAttrDecls+ in foldr f (Map.empty) ( _elemsIcollectedSigs+ ++ [ (nt, con, (ident,typeof nt ref)) | (nt, con, us) <- _elemsIcollectedUniques, (ident,ref) <- us ]+ )+ {-# LINE 705 "dist/build/Transform.hs"#-}+ {-# INLINE rule8 #-}+ {-# LINE 284 "./src-ag/Transform.ag" #-}+ rule8 = \ ((_elemsIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->+ {-# LINE 284 "./src-ag/Transform.ag" #-}+ let f (nt,con,is) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con is)+ in foldr f (Map.empty) _elemsIcollectedInsts+ {-# LINE 712 "dist/build/Transform.hs"#-}+ {-# INLINE rule9 #-}+ {-# LINE 287 "./src-ag/Transform.ag" #-}+ rule9 = \ ((_elemsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->+ {-# LINE 287 "./src-ag/Transform.ag" #-}+ let f (nt,con,us) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con us)+ in foldr f (Map.empty) _elemsIcollectedUniques+ {-# LINE 719 "dist/build/Transform.hs"#-}+ {-# INLINE rule10 #-}+ {-# LINE 289 "./src-ag/Transform.ag" #-}+ rule10 = \ ((_elemsIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->+ {-# LINE 289 "./src-ag/Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedAugments+ {-# LINE 726 "dist/build/Transform.hs"#-}+ {-# INLINE rule11 #-}+ {-# LINE 291 "./src-ag/Transform.ag" #-}+ rule11 = \ ((_elemsIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->+ {-# LINE 291 "./src-ag/Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedArounds+ {-# LINE 733 "dist/build/Transform.hs"#-}+ {-# INLINE rule12 #-}+ {-# LINE 293 "./src-ag/Transform.ag" #-}+ rule12 = \ ((_elemsIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->+ {-# LINE 293 "./src-ag/Transform.ag" #-}+ let f (nt,con,as) = Map.insertWith (Map.unionWith (++)) nt (Map.singleton con as)+ in foldr f Map.empty _elemsIcollectedMerges+ {-# LINE 740 "dist/build/Transform.hs"#-}+ {-# INLINE rule13 #-}+ {-# LINE 296 "./src-ag/Transform.ag" #-}+ rule13 = \ _allAugments ->+ {-# LINE 296 "./src-ag/Transform.ag" #-}+ let gen _ = []+ in Map.map (Map.map gen) _allAugments+ {-# LINE 747 "dist/build/Transform.hs"#-}+ {-# INLINE rule14 #-}+ {-# LINE 299 "./src-ag/Transform.ag" #-}+ rule14 = \ _allAttrDecls _allFields _allInsts _allMerges _allRules _allSigs ->+ {-# LINE 299 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkRules _allAttrDecls _allFields _allInsts _allSigs _allMerges )) _allRules+ {-# LINE 753 "dist/build/Transform.hs"#-}+ {-# INLINE rule15 #-}+ {-# LINE 300 "./src-ag/Transform.ag" #-}+ rule15 = \ _allRules ->+ {-# LINE 300 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . checkRuleNames) _allRules+ {-# LINE 759 "dist/build/Transform.hs"#-}+ {-# INLINE rule16 #-}+ {-# LINE 301 "./src-ag/Transform.ag" #-}+ rule16 = \ _allSigs ->+ {-# LINE 301 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkSigs )) _allSigs+ {-# LINE 765 "dist/build/Transform.hs"#-}+ {-# INLINE rule17 #-}+ {-# LINE 302 "./src-ag/Transform.ag" #-}+ rule17 = \ _allFields _allInsts _allNonterminals _allSigs ->+ {-# LINE 302 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkInsts _allNonterminals _allSigs _allFields )) _allInsts+ {-# LINE 771 "dist/build/Transform.hs"#-}+ {-# INLINE rule18 #-}+ {-# LINE 303 "./src-ag/Transform.ag" #-}+ rule18 = \ _allAttrDecls _allUniques ->+ {-# LINE 303 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkUniques _allAttrDecls )) _allUniques+ {-# LINE 777 "dist/build/Transform.hs"#-}+ {-# INLINE rule19 #-}+ {-# LINE 304 "./src-ag/Transform.ag" #-}+ rule19 = \ _allAttrDecls _allAugments ->+ {-# LINE 304 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkAugments _allAttrDecls )) _allAugments+ {-# LINE 783 "dist/build/Transform.hs"#-}+ {-# INLINE rule20 #-}+ {-# LINE 305 "./src-ag/Transform.ag" #-}+ rule20 = \ _allArounds _allFields ->+ {-# LINE 305 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkArounds _allFields )) _allArounds+ {-# LINE 789 "dist/build/Transform.hs"#-}+ {-# INLINE rule21 #-}+ {-# LINE 306 "./src-ag/Transform.ag" #-}+ rule21 = \ _allFields _allInsts _allMerges _allNonterminals ->+ {-# LINE 306 "./src-ag/Transform.ag" #-}+ Map.mapWithKey (Map.mapWithKey . (checkMerges _allNonterminals _allInsts _allFields )) _allMerges+ {-# LINE 795 "dist/build/Transform.hs"#-}+ {-# INLINE rule22 #-}+ {-# LINE 308 "./src-ag/Transform.ag" #-}+ rule22 = \ _allRulesErrs ->+ {-# LINE 308 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allRulesErrs+ {-# LINE 801 "dist/build/Transform.hs"#-}+ {-# INLINE rule23 #-}+ {-# LINE 309 "./src-ag/Transform.ag" #-}+ rule23 = \ _allSigsErrs _augmentSigs ->+ {-# LINE 309 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allSigsErrs `unionunionplusplus` _augmentSigs+ {-# LINE 807 "dist/build/Transform.hs"#-}+ {-# INLINE rule24 #-}+ {-# LINE 310 "./src-ag/Transform.ag" #-}+ rule24 = \ _allInstsErrs ->+ {-# LINE 310 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allInstsErrs+ {-# LINE 813 "dist/build/Transform.hs"#-}+ {-# INLINE rule25 #-}+ {-# LINE 311 "./src-ag/Transform.ag" #-}+ rule25 = \ _allUniquesErrs ->+ {-# LINE 311 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allUniquesErrs+ {-# LINE 819 "dist/build/Transform.hs"#-}+ {-# INLINE rule26 #-}+ {-# LINE 312 "./src-ag/Transform.ag" #-}+ rule26 = \ _allAugmentErrs ->+ {-# LINE 312 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allAugmentErrs+ {-# LINE 825 "dist/build/Transform.hs"#-}+ {-# INLINE rule27 #-}+ {-# LINE 313 "./src-ag/Transform.ag" #-}+ rule27 = \ _allAroundsErrs ->+ {-# LINE 313 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allAroundsErrs+ {-# LINE 831 "dist/build/Transform.hs"#-}+ {-# INLINE rule28 #-}+ {-# LINE 314 "./src-ag/Transform.ag" #-}+ rule28 = \ _allAttrDecls _allFields _allRules _checkedInsts _checkedRulesPre _checkedUniques ((_lhsIoptions) :: Options) ->+ {-# LINE 314 "./src-ag/Transform.ag" #-}+ Map.unionWith (Map.unionWith (++)) _checkedRulesPre (Map.mapWithKey (Map.mapWithKey . (mkUniqueRules _lhsIoptions _allRules _allFields _checkedInsts _allAttrDecls )) _checkedUniques )+ {-# LINE 837 "dist/build/Transform.hs"#-}+ {-# INLINE rule29 #-}+ {-# LINE 315 "./src-ag/Transform.ag" #-}+ rule29 = \ _allMergesErrs ->+ {-# LINE 315 "./src-ag/Transform.ag" #-}+ Map.map (Map.map fst) _allMergesErrs+ {-# LINE 843 "dist/build/Transform.hs"#-}+ {-# INLINE rule30 #-}+ {-# LINE 317 "./src-ag/Transform.ag" #-}+ rule30 = \ ((_elemsItypeSyns) :: TypeSyns) ->+ {-# LINE 317 "./src-ag/Transform.ag" #-}+ let f = checkForDuplicates (DupSynonym)+ in Seq.fromList . f . map fst $ _elemsItypeSyns+ {-# LINE 850 "dist/build/Transform.hs"#-}+ {-# INLINE rule31 #-}+ {-# LINE 320 "./src-ag/Transform.ag" #-}+ rule31 = \ _allFields ->+ {-# LINE 320 "./src-ag/Transform.ag" #-}+ let g nt (con,fm) = checkForDuplicates (DupChild nt con) (map fst fm)+ f (nt,cfm) = concat . map (g nt) . Map.toList $ cfm+ in Seq.fromList . concat . map f . Map.toList $ _allFields+ {-# LINE 858 "dist/build/Transform.hs"#-}+ {-# INLINE rule32 #-}+ {-# LINE 324 "./src-ag/Transform.ag" #-}+ rule32 = \ (_ :: ()) ->+ {-# LINE 324 "./src-ag/Transform.ag" #-}+ let+ in Seq.empty+ {-# LINE 865 "dist/build/Transform.hs"#-}+ {-# INLINE rule33 #-}+ {-# LINE 328 "./src-ag/Transform.ag" #-}+ rule33 = \ _allRulesErrs ->+ {-# LINE 328 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allRulesErrs+ {-# LINE 872 "dist/build/Transform.hs"#-}+ {-# INLINE rule34 #-}+ {-# LINE 331 "./src-ag/Transform.ag" #-}+ rule34 = \ _allSigsErrs ->+ {-# LINE 331 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allSigsErrs+ {-# LINE 879 "dist/build/Transform.hs"#-}+ {-# INLINE rule35 #-}+ {-# LINE 334 "./src-ag/Transform.ag" #-}+ rule35 = \ _allInstsErrs ->+ {-# LINE 334 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allInstsErrs+ {-# LINE 886 "dist/build/Transform.hs"#-}+ {-# INLINE rule36 #-}+ {-# LINE 337 "./src-ag/Transform.ag" #-}+ rule36 = \ _allUniquesErrs ->+ {-# LINE 337 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allUniquesErrs+ {-# LINE 893 "dist/build/Transform.hs"#-}+ {-# INLINE rule37 #-}+ {-# LINE 340 "./src-ag/Transform.ag" #-}+ rule37 = \ _allAugmentErrs ->+ {-# LINE 340 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAugmentErrs+ {-# LINE 900 "dist/build/Transform.hs"#-}+ {-# INLINE rule38 #-}+ {-# LINE 343 "./src-ag/Transform.ag" #-}+ rule38 = \ _allAroundsErrs ->+ {-# LINE 343 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allAroundsErrs+ {-# LINE 907 "dist/build/Transform.hs"#-}+ {-# INLINE rule39 #-}+ {-# LINE 346 "./src-ag/Transform.ag" #-}+ rule39 = \ _allNamesErrs ->+ {-# LINE 346 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><)) s m+ in Map.fold f Seq.empty _allNamesErrs+ {-# LINE 914 "dist/build/Transform.hs"#-}+ {-# INLINE rule40 #-}+ {-# LINE 349 "./src-ag/Transform.ag" #-}+ rule40 = \ _allMergesErrs ->+ {-# LINE 349 "./src-ag/Transform.ag" #-}+ let f m s = Map.fold ((><) . snd) s m+ in Map.fold f Seq.empty _allMergesErrs+ {-# LINE 921 "dist/build/Transform.hs"#-}+ {-# INLINE rule41 #-}+ {-# LINE 352 "./src-ag/Transform.ag" #-}+ rule41 = \ ((_elemsIerrors) :: Seq Error) _errs1 _errs10 _errs11 _errs2 _errs3 _errs4 _errs5 _errs6 _errs7 _errs8 _errs9 ->+ {-# LINE 352 "./src-ag/Transform.ag" #-}+ _elemsIerrors >< _errs1 >< _errs2 >< _errs3 >< _errs4 >< _errs5 >< _errs6 >< _errs7 >< _errs8 >< _errs9 >< _errs10 >< _errs11+ {-# LINE 927 "dist/build/Transform.hs"#-}+ {-# INLINE rule42 #-}+ {-# LINE 606 "./src-ag/Transform.ag" #-}+ rule42 = \ ((_elemsIcollectedNames) :: Set Identifier) ((_elemsIcollectedSetNames) :: Set Identifier) ->+ {-# LINE 606 "./src-ag/Transform.ag" #-}+ _elemsIcollectedNames `Set.difference` _elemsIcollectedSetNames+ {-# LINE 933 "dist/build/Transform.hs"#-}+ {-# INLINE rule43 #-}+ {-# LINE 626 "./src-ag/Transform.ag" #-}+ rule43 = \ ((_elemsIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ->+ {-# LINE 626 "./src-ag/Transform.ag" #-}+ _elemsIcollectedConstructorsMap+ {-# LINE 939 "dist/build/Transform.hs"#-}+ {-# INLINE rule44 #-}+ {-# LINE 709 "./src-ag/Transform.ag" #-}+ rule44 = \ _allNonterminals ->+ {-# LINE 709 "./src-ag/Transform.ag" #-}+ Map.fromList (map (\x->(x,(Set.singleton x, Set.empty))) (Set.toList _allNonterminals ))+ {-# LINE 945 "dist/build/Transform.hs"#-}+ {-# INLINE rule45 #-}+ {-# LINE 710 "./src-ag/Transform.ag" #-}+ rule45 = \ ((_elemsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ {-# LINE 710 "./src-ag/Transform.ag" #-}+ Map.map fst _elemsIdefSets+ {-# LINE 951 "dist/build/Transform.hs"#-}+ {-# INLINE rule46 #-}+ {-# LINE 1030 "./src-ag/Transform.ag" #-}+ rule46 = \ (_ :: ()) ->+ {-# LINE 1030 "./src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 957 "dist/build/Transform.hs"#-}+ {-# INLINE rule47 #-}+ {-# LINE 1086 "./src-ag/Transform.ag" #-}+ rule47 = \ _allNonterminals ((_elemsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ((_lhsIoptions) :: Options) ->+ {-# LINE 1086 "./src-ag/Transform.ag" #-}+ if withSelf _lhsIoptions+ then foldr addSelf _elemsIattrDecls (Set.toList _allNonterminals )+ else _elemsIattrDecls+ {-# LINE 965 "dist/build/Transform.hs"#-}+ {-# INLINE rule48 #-}+ {-# LINE 1328 "./src-ag/Transform.ag" #-}+ rule48 = \ ((_elemsIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->+ {-# LINE 1328 "./src-ag/Transform.ag" #-}+ let f (nt,con,m) = Map.insertWith (Map.union) nt (Map.singleton con m)+ in foldr f (Map.empty) _elemsIcollectedMacros+ {-# LINE 972 "dist/build/Transform.hs"#-}+ {-# INLINE rule49 #-}+ {-# LINE 1341 "./src-ag/Transform.ag" #-}+ rule49 = \ _allAttrs _allFields _allNonterminals ->+ {-# LINE 1341 "./src-ag/Transform.ag" #-}+ (_allNonterminals ,_allFields ,_allAttrs )+ {-# LINE 978 "dist/build/Transform.hs"#-}+ {-# INLINE rule50 #-}+ {-# LINE 1343 "./src-ag/Transform.ag" #-}+ rule50 = \ _allNonterminals ((_elemsIattrs) :: Map NontermIdent (Attributes, Attributes)) ((_lhsIoptions) :: Options) ->+ {-# LINE 1343 "./src-ag/Transform.ag" #-}+ if withSelf _lhsIoptions+ then foldr addSelf _elemsIattrs (Set.toList _allNonterminals )+ else _elemsIattrs+ {-# LINE 986 "dist/build/Transform.hs"#-}+ {-# INLINE rule51 #-}+ {-# LINE 1351 "./src-ag/Transform.ag" #-}+ rule51 = \ (_ :: ()) ->+ {-# LINE 1351 "./src-ag/Transform.ag" #-}+ Map.empty+ {-# LINE 992 "dist/build/Transform.hs"#-}+ {-# INLINE rule52 #-}+ rule52 = \ ((_elemsIblocks) :: Blocks) ->+ _elemsIblocks+ {-# INLINE rule53 #-}+ rule53 = \ ((_elemsIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _elemsIconstructorTypeMap+ {-# INLINE rule54 #-}+ rule54 = \ ((_elemsImoduleDecl) :: Maybe (String,String,String)) ->+ _elemsImoduleDecl+ {-# INLINE rule55 #-}+ rule55 = \ ((_elemsIpragmas) :: Options -> Options) ->+ _elemsIpragmas+ {-# INLINE rule56 #-}+ rule56 = \ _allAttrDecls ->+ _allAttrDecls+ {-# INLINE rule57 #-}+ rule57 = \ _allAttrs ->+ _allAttrs+ {-# INLINE rule58 #-}+ rule58 = \ _allFields ->+ _allFields+ {-# INLINE rule59 #-}+ rule59 = \ _allNonterminals ->+ _allNonterminals+ {-# INLINE rule60 #-}+ rule60 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- Alt ---------------------------------------------------------+-- wrapper+data Inh_Alt = Inh_Alt { allConstructors_Inh_Alt :: (Map NontermIdent (Set ConstructorIdent)), allNonterminals_Inh_Alt :: (Set NontermIdent), nts_Inh_Alt :: (Set NontermIdent) }+data Syn_Alt = Syn_Alt { collectedConParams_Syn_Alt :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Alt :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorNames_Syn_Alt :: (Set ConstructorIdent), collectedFields_Syn_Alt :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedMacros_Syn_Alt :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]) }+{-# INLINABLE wrap_Alt #-}+wrap_Alt :: T_Alt -> Inh_Alt -> (Syn_Alt )+wrap_Alt (T_Alt act) (Inh_Alt _lhsIallConstructors _lhsIallNonterminals _lhsInts) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Alt_vIn4 _lhsIallConstructors _lhsIallNonterminals _lhsInts+ (T_Alt_vOut4 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros) <- return (inv_Alt_s5 sem arg)+ return (Syn_Alt _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros)+ )++-- cata+{-# INLINE sem_Alt #-}+sem_Alt :: Alt -> T_Alt +sem_Alt ( Alt pos_ names_ tyvars_ fields_ macro_ ) = sem_Alt_Alt pos_ ( sem_ConstructorSet names_ ) tyvars_ ( sem_Fields fields_ ) macro_++-- semantic domain+newtype T_Alt = T_Alt {+ attach_T_Alt :: Identity (T_Alt_s5 )+ }+newtype T_Alt_s5 = C_Alt_s5 {+ inv_Alt_s5 :: (T_Alt_v4 )+ }+data T_Alt_s6 = C_Alt_s6+type T_Alt_v4 = (T_Alt_vIn4 ) -> (T_Alt_vOut4 )+data T_Alt_vIn4 = T_Alt_vIn4 (Map NontermIdent (Set ConstructorIdent)) (Set NontermIdent) (Set NontermIdent)+data T_Alt_vOut4 = T_Alt_vOut4 ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Set ConstructorIdent) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([(NontermIdent, ConstructorIdent, MaybeMacro)])+{-# NOINLINE sem_Alt_Alt #-}+sem_Alt_Alt :: (Pos) -> T_ConstructorSet -> ([Identifier]) -> T_Fields -> (MaybeMacro) -> T_Alt +sem_Alt_Alt _ arg_names_ arg_tyvars_ arg_fields_ arg_macro_ = T_Alt (return st5) where+ {-# NOINLINE st5 #-}+ st5 = let+ v4 :: T_Alt_v4 + v4 = \ (T_Alt_vIn4 _lhsIallConstructors _lhsIallNonterminals _lhsInts) -> ( let+ _namesX14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_names_))+ _fieldsX26 = Control.Monad.Identity.runIdentity (attach_T_Fields (arg_fields_))+ (T_ConstructorSet_vOut13 _namesIcollectedConstructorNames _namesIconstructors _namesIerrors) = inv_ConstructorSet_s14 _namesX14 (T_ConstructorSet_vIn13 )+ (T_Fields_vOut25 _fieldsIcollectedConstraints _fieldsIcollectedFields) = inv_Fields_s26 _fieldsX26 (T_Fields_vIn25 _fieldsOallNonterminals)+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule61 _fieldsIcollectedFields _lhsIallConstructors _lhsInts _namesIconstructors+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule62 _fieldsIcollectedConstraints _lhsIallConstructors _lhsInts _namesIconstructors+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule63 _lhsIallConstructors _lhsInts _namesIconstructors arg_tyvars_+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule64 _lhsIallConstructors _lhsInts _namesIconstructors arg_macro_+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule65 _namesIcollectedConstructorNames+ _fieldsOallNonterminals = rule66 _lhsIallNonterminals+ __result_ = T_Alt_vOut4 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros+ in __result_ )+ in C_Alt_s5 v4+ {-# INLINE rule61 #-}+ {-# LINE 240 "./src-ag/Transform.ag" #-}+ rule61 = \ ((_fieldsIcollectedFields) :: [(Identifier, Type)]) ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->+ {-# LINE 240 "./src-ag/Transform.ag" #-}+ [ (nt, con, _fieldsIcollectedFields)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1084 "dist/build/Transform.hs"#-}+ {-# INLINE rule62 #-}+ {-# LINE 244 "./src-ag/Transform.ag" #-}+ rule62 = \ ((_fieldsIcollectedConstraints) :: [Type]) ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->+ {-# LINE 244 "./src-ag/Transform.ag" #-}+ [ (nt, con, _fieldsIcollectedConstraints)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1093 "dist/build/Transform.hs"#-}+ {-# INLINE rule63 #-}+ {-# LINE 248 "./src-ag/Transform.ag" #-}+ rule63 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) tyvars_ ->+ {-# LINE 248 "./src-ag/Transform.ag" #-}+ [ (nt, con, Set.fromList tyvars_)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1102 "dist/build/Transform.hs"#-}+ {-# INLINE rule64 #-}+ {-# LINE 1319 "./src-ag/Transform.ag" #-}+ rule64 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ((_lhsInts) :: Set NontermIdent) ((_namesIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) macro_ ->+ {-# LINE 1319 "./src-ag/Transform.ag" #-}+ [ (nt, con, macro_)+ | nt <- Set.toList _lhsInts+ , con <- Set.toList (_namesIconstructors (Map.findWithDefault Set.empty nt _lhsIallConstructors))+ ]+ {-# LINE 1111 "dist/build/Transform.hs"#-}+ {-# INLINE rule65 #-}+ rule65 = \ ((_namesIcollectedConstructorNames) :: Set ConstructorIdent) ->+ _namesIcollectedConstructorNames+ {-# INLINE rule66 #-}+ rule66 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals++-- Alts --------------------------------------------------------+-- wrapper+data Inh_Alts = Inh_Alts { allConstructors_Inh_Alts :: (Map NontermIdent (Set ConstructorIdent)), allNonterminals_Inh_Alts :: (Set NontermIdent), nts_Inh_Alts :: (Set NontermIdent) }+data Syn_Alts = Syn_Alts { collectedConParams_Syn_Alts :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Alts :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorNames_Syn_Alts :: (Set ConstructorIdent), collectedFields_Syn_Alts :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedMacros_Syn_Alts :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]) }+{-# INLINABLE wrap_Alts #-}+wrap_Alts :: T_Alts -> Inh_Alts -> (Syn_Alts )+wrap_Alts (T_Alts act) (Inh_Alts _lhsIallConstructors _lhsIallNonterminals _lhsInts) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Alts_vIn7 _lhsIallConstructors _lhsIallNonterminals _lhsInts+ (T_Alts_vOut7 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros) <- return (inv_Alts_s8 sem arg)+ return (Syn_Alts _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros)+ )++-- cata+{-# NOINLINE sem_Alts #-}+sem_Alts :: Alts -> T_Alts +sem_Alts list = Prelude.foldr sem_Alts_Cons sem_Alts_Nil (Prelude.map sem_Alt list)++-- semantic domain+newtype T_Alts = T_Alts {+ attach_T_Alts :: Identity (T_Alts_s8 )+ }+newtype T_Alts_s8 = C_Alts_s8 {+ inv_Alts_s8 :: (T_Alts_v7 )+ }+data T_Alts_s9 = C_Alts_s9+type T_Alts_v7 = (T_Alts_vIn7 ) -> (T_Alts_vOut7 )+data T_Alts_vIn7 = T_Alts_vIn7 (Map NontermIdent (Set ConstructorIdent)) (Set NontermIdent) (Set NontermIdent)+data T_Alts_vOut7 = T_Alts_vOut7 ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Set ConstructorIdent) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([(NontermIdent, ConstructorIdent, MaybeMacro)])+{-# NOINLINE sem_Alts_Cons #-}+sem_Alts_Cons :: T_Alt -> T_Alts -> T_Alts +sem_Alts_Cons arg_hd_ arg_tl_ = T_Alts (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_Alts_v7 + v7 = \ (T_Alts_vIn7 _lhsIallConstructors _lhsIallNonterminals _lhsInts) -> ( let+ _hdX5 = Control.Monad.Identity.runIdentity (attach_T_Alt (arg_hd_))+ _tlX8 = Control.Monad.Identity.runIdentity (attach_T_Alts (arg_tl_))+ (T_Alt_vOut4 _hdIcollectedConParams _hdIcollectedConstraints _hdIcollectedConstructorNames _hdIcollectedFields _hdIcollectedMacros) = inv_Alt_s5 _hdX5 (T_Alt_vIn4 _hdOallConstructors _hdOallNonterminals _hdOnts)+ (T_Alts_vOut7 _tlIcollectedConParams _tlIcollectedConstraints _tlIcollectedConstructorNames _tlIcollectedFields _tlIcollectedMacros) = inv_Alts_s8 _tlX8 (T_Alts_vIn7 _tlOallConstructors _tlOallNonterminals _tlOnts)+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule67 _hdIcollectedConParams _tlIcollectedConParams+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule68 _hdIcollectedConstraints _tlIcollectedConstraints+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule69 _hdIcollectedConstructorNames _tlIcollectedConstructorNames+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule70 _hdIcollectedFields _tlIcollectedFields+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule71 _hdIcollectedMacros _tlIcollectedMacros+ _hdOallConstructors = rule72 _lhsIallConstructors+ _hdOallNonterminals = rule73 _lhsIallNonterminals+ _hdOnts = rule74 _lhsInts+ _tlOallConstructors = rule75 _lhsIallConstructors+ _tlOallNonterminals = rule76 _lhsIallNonterminals+ _tlOnts = rule77 _lhsInts+ __result_ = T_Alts_vOut7 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros+ in __result_ )+ in C_Alts_s8 v7+ {-# INLINE rule67 #-}+ rule67 = \ ((_hdIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ((_tlIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->+ _hdIcollectedConParams ++ _tlIcollectedConParams+ {-# INLINE rule68 #-}+ rule68 = \ ((_hdIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ((_tlIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->+ _hdIcollectedConstraints ++ _tlIcollectedConstraints+ {-# INLINE rule69 #-}+ rule69 = \ ((_hdIcollectedConstructorNames) :: Set ConstructorIdent) ((_tlIcollectedConstructorNames) :: Set ConstructorIdent) ->+ _hdIcollectedConstructorNames `Set.union` _tlIcollectedConstructorNames+ {-# INLINE rule70 #-}+ rule70 = \ ((_hdIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ((_tlIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# INLINE rule71 #-}+ rule71 = \ ((_hdIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ((_tlIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->+ _hdIcollectedMacros ++ _tlIcollectedMacros+ {-# INLINE rule72 #-}+ rule72 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->+ _lhsIallConstructors+ {-# INLINE rule73 #-}+ rule73 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule74 #-}+ rule74 = \ ((_lhsInts) :: Set NontermIdent) ->+ _lhsInts+ {-# INLINE rule75 #-}+ rule75 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->+ _lhsIallConstructors+ {-# INLINE rule76 #-}+ rule76 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule77 #-}+ rule77 = \ ((_lhsInts) :: Set NontermIdent) ->+ _lhsInts+{-# NOINLINE sem_Alts_Nil #-}+sem_Alts_Nil :: T_Alts +sem_Alts_Nil = T_Alts (return st8) where+ {-# NOINLINE st8 #-}+ st8 = let+ v7 :: T_Alts_v7 + v7 = \ (T_Alts_vIn7 _lhsIallConstructors _lhsIallNonterminals _lhsInts) -> ( let+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule78 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule79 ()+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule80 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule81 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule82 ()+ __result_ = T_Alts_vOut7 _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorNames _lhsOcollectedFields _lhsOcollectedMacros+ in __result_ )+ in C_Alts_s8 v7+ {-# INLINE rule78 #-}+ rule78 = \ (_ :: ()) ->+ []+ {-# INLINE rule79 #-}+ rule79 = \ (_ :: ()) ->+ []+ {-# INLINE rule80 #-}+ rule80 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule81 #-}+ rule81 = \ (_ :: ()) ->+ []+ {-# INLINE rule82 #-}+ rule82 = \ (_ :: ()) ->+ []++-- Attrs -------------------------------------------------------+-- wrapper+data Inh_Attrs = Inh_Attrs { allFields_Inh_Attrs :: (DataTypes), allNonterminals_Inh_Attrs :: (Set NontermIdent), attrDecls_Inh_Attrs :: (Map NontermIdent (Attributes, Attributes)), attrs_Inh_Attrs :: (Map NontermIdent (Attributes, Attributes)), nts_Inh_Attrs :: (Set NontermIdent), options_Inh_Attrs :: (Options) }+data Syn_Attrs = Syn_Attrs { attrDecls_Syn_Attrs :: (Map NontermIdent (Attributes, Attributes)), attrs_Syn_Attrs :: (Map NontermIdent (Attributes, Attributes)), errors_Syn_Attrs :: (Seq Error), useMap_Syn_Attrs :: (Map NontermIdent (Map Identifier (String,String,String))) }+{-# INLINABLE wrap_Attrs #-}+wrap_Attrs :: T_Attrs -> Inh_Attrs -> (Syn_Attrs )+wrap_Attrs (T_Attrs act) (Inh_Attrs _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Attrs_vIn10 _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions+ (T_Attrs_vOut10 _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap) <- return (inv_Attrs_s11 sem arg)+ return (Syn_Attrs _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap)+ )++-- cata+{-# INLINE sem_Attrs #-}+sem_Attrs :: Attrs -> T_Attrs +sem_Attrs ( Attrs pos_ inh_ chn_ syn_ ) = sem_Attrs_Attrs pos_ inh_ chn_ syn_++-- semantic domain+newtype T_Attrs = T_Attrs {+ attach_T_Attrs :: Identity (T_Attrs_s11 )+ }+newtype T_Attrs_s11 = C_Attrs_s11 {+ inv_Attrs_s11 :: (T_Attrs_v10 )+ }+data T_Attrs_s12 = C_Attrs_s12+type T_Attrs_v10 = (T_Attrs_vIn10 ) -> (T_Attrs_vOut10 )+data T_Attrs_vIn10 = T_Attrs_vIn10 (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Set NontermIdent) (Options)+data T_Attrs_vOut10 = T_Attrs_vOut10 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Seq Error) (Map NontermIdent (Map Identifier (String,String,String)))+{-# NOINLINE sem_Attrs_Attrs #-}+sem_Attrs_Attrs :: (Pos) -> (AttrNames) -> (AttrNames) -> (AttrNames) -> T_Attrs +sem_Attrs_Attrs _ arg_inh_ arg_chn_ arg_syn_ = T_Attrs (return st11) where+ {-# NOINLINE st11 #-}+ st11 = let+ v10 :: T_Attrs_v10 + v10 = \ (T_Attrs_vIn10 _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsInts _lhsIoptions) -> ( let+ (_attrDecls,_errors) = rule83 _inherited _lhsIallFields _lhsIattrDecls _lhsInts _synthesized+ (_inherited,_synthesized,_useMap) = rule84 _lhsIallNonterminals arg_chn_ arg_inh_ arg_syn_+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule85 _lhsInts _useMap+ _errors1 = rule86 _lhsIoptions arg_chn_ arg_inh_ arg_syn_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule87 _errors _errors1+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule88 _inherited _lhsIattrs _lhsInts _synthesized+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule89 _attrDecls+ __result_ = T_Attrs_vOut10 _lhsOattrDecls _lhsOattrs _lhsOerrors _lhsOuseMap+ in __result_ )+ in C_Attrs_s11 v10+ {-# INLINE rule83 #-}+ {-# LINE 1039 "./src-ag/Transform.ag" #-}+ rule83 = \ _inherited ((_lhsIallFields) :: DataTypes) ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ((_lhsInts) :: Set NontermIdent) _synthesized ->+ {-# LINE 1039 "./src-ag/Transform.ag" #-}+ checkAttrs _lhsIallFields (Set.toList _lhsInts) _inherited _synthesized _lhsIattrDecls+ {-# LINE 1304 "dist/build/Transform.hs"#-}+ {-# INLINE rule84 #-}+ {-# LINE 1041 "./src-ag/Transform.ag" #-}+ rule84 = \ ((_lhsIallNonterminals) :: Set NontermIdent) chn_ inh_ syn_ ->+ {-# LINE 1041 "./src-ag/Transform.ag" #-}+ let splitAttrs xs = unzip [ ((n,makeType _lhsIallNonterminals t),(n,ud))+ | (n,t,ud) <- xs+ ]+ (inh,_) = splitAttrs inh_+ (chn,uses1) = splitAttrs chn_+ (syn,uses2) = splitAttrs syn_+ isUse (_,(e1,e2,_)) = not (null e1 || null e2)+ in (inh++chn,chn++syn, Map.fromList (Prelude.filter isUse (uses1++uses2)))+ {-# LINE 1317 "dist/build/Transform.hs"#-}+ {-# INLINE rule85 #-}+ {-# LINE 1049 "./src-ag/Transform.ag" #-}+ rule85 = \ ((_lhsInts) :: Set NontermIdent) _useMap ->+ {-# LINE 1049 "./src-ag/Transform.ag" #-}+ Map.fromList (zip (Set.toList _lhsInts) (repeat _useMap))+ {-# LINE 1323 "dist/build/Transform.hs"#-}+ {-# INLINE rule86 #-}+ {-# LINE 1051 "./src-ag/Transform.ag" #-}+ rule86 = \ ((_lhsIoptions) :: Options) chn_ inh_ syn_ ->+ {-# LINE 1051 "./src-ag/Transform.ag" #-}+ if checkParseTy _lhsIoptions+ then let attrs = inh_ ++ syn_ ++ chn_+ items = map (\(ident,tp,_) -> (getPos ident, tp)) attrs+ errs = map check items+ check (pos,Haskell s) =+ let ex = Expression pos tks+ tks = [tk]+ tk = HsToken s pos+ in Seq.fromList $ checkTy ex+ check _ = Seq.empty+ in foldr (Seq.><) Seq.empty errs+ else Seq.empty+ {-# LINE 1340 "dist/build/Transform.hs"#-}+ {-# INLINE rule87 #-}+ {-# LINE 1063 "./src-ag/Transform.ag" #-}+ rule87 = \ _errors _errors1 ->+ {-# LINE 1063 "./src-ag/Transform.ag" #-}+ _errors Seq.>< _errors1+ {-# LINE 1346 "dist/build/Transform.hs"#-}+ {-# INLINE rule88 #-}+ {-# LINE 1355 "./src-ag/Transform.ag" #-}+ rule88 = \ _inherited ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ((_lhsInts) :: Set NontermIdent) _synthesized ->+ {-# LINE 1355 "./src-ag/Transform.ag" #-}+ let ins decls nt = if Map.member nt decls+ then Map.update (\(inh,syn) -> Just ( Map.union inh $ Map.fromList _inherited+ , Map.union syn $ Map.fromList _synthesized)) nt decls+ else Map.insert nt (Map.fromList _inherited, Map.fromList _synthesized) decls+ in foldl ins _lhsIattrs (Set.toList _lhsInts)+ {-# LINE 1356 "dist/build/Transform.hs"#-}+ {-# INLINE rule89 #-}+ rule89 = \ _attrDecls ->+ _attrDecls++-- ConstructorSet ----------------------------------------------+-- wrapper+data Inh_ConstructorSet = Inh_ConstructorSet { }+data Syn_ConstructorSet = Syn_ConstructorSet { collectedConstructorNames_Syn_ConstructorSet :: (Set ConstructorIdent), constructors_Syn_ConstructorSet :: ((Set ConstructorIdent->Set ConstructorIdent)), errors_Syn_ConstructorSet :: (Seq Error) }+{-# INLINABLE wrap_ConstructorSet #-}+wrap_ConstructorSet :: T_ConstructorSet -> Inh_ConstructorSet -> (Syn_ConstructorSet )+wrap_ConstructorSet (T_ConstructorSet act) (Inh_ConstructorSet ) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_ConstructorSet_vIn13 + (T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors) <- return (inv_ConstructorSet_s14 sem arg)+ return (Syn_ConstructorSet _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors)+ )++-- cata+{-# NOINLINE sem_ConstructorSet #-}+sem_ConstructorSet :: ConstructorSet -> T_ConstructorSet +sem_ConstructorSet ( CName name_ ) = sem_ConstructorSet_CName name_+sem_ConstructorSet ( CUnion set1_ set2_ ) = sem_ConstructorSet_CUnion ( sem_ConstructorSet set1_ ) ( sem_ConstructorSet set2_ )+sem_ConstructorSet ( CDifference set1_ set2_ ) = sem_ConstructorSet_CDifference ( sem_ConstructorSet set1_ ) ( sem_ConstructorSet set2_ )+sem_ConstructorSet ( CAll ) = sem_ConstructorSet_CAll ++-- semantic domain+newtype T_ConstructorSet = T_ConstructorSet {+ attach_T_ConstructorSet :: Identity (T_ConstructorSet_s14 )+ }+newtype T_ConstructorSet_s14 = C_ConstructorSet_s14 {+ inv_ConstructorSet_s14 :: (T_ConstructorSet_v13 )+ }+data T_ConstructorSet_s15 = C_ConstructorSet_s15+type T_ConstructorSet_v13 = (T_ConstructorSet_vIn13 ) -> (T_ConstructorSet_vOut13 )+data T_ConstructorSet_vIn13 = T_ConstructorSet_vIn13 +data T_ConstructorSet_vOut13 = T_ConstructorSet_vOut13 (Set ConstructorIdent) ((Set ConstructorIdent->Set ConstructorIdent)) (Seq Error)+{-# NOINLINE sem_ConstructorSet_CName #-}+sem_ConstructorSet_CName :: (ConstructorIdent) -> T_ConstructorSet +sem_ConstructorSet_CName arg_name_ = T_ConstructorSet (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_ConstructorSet_v13 + v13 = \ (T_ConstructorSet_vIn13 ) -> ( let+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule90 arg_name_+ _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)+ _lhsOconstructors = rule91 arg_name_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule92 ()+ __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors+ in __result_ )+ in C_ConstructorSet_s14 v13+ {-# INLINE rule90 #-}+ {-# LINE 614 "./src-ag/Transform.ag" #-}+ rule90 = \ name_ ->+ {-# LINE 614 "./src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 1415 "dist/build/Transform.hs"#-}+ {-# INLINE rule91 #-}+ {-# LINE 777 "./src-ag/Transform.ag" #-}+ rule91 = \ name_ ->+ {-# LINE 777 "./src-ag/Transform.ag" #-}+ \_ -> Set.singleton name_+ {-# LINE 1421 "dist/build/Transform.hs"#-}+ {-# INLINE rule92 #-}+ rule92 = \ (_ :: ()) ->+ Seq.empty+{-# NOINLINE sem_ConstructorSet_CUnion #-}+sem_ConstructorSet_CUnion :: T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet +sem_ConstructorSet_CUnion arg_set1_ arg_set2_ = T_ConstructorSet (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_ConstructorSet_v13 + v13 = \ (T_ConstructorSet_vIn13 ) -> ( let+ _set1X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set1_))+ _set2X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set2_))+ (T_ConstructorSet_vOut13 _set1IcollectedConstructorNames _set1Iconstructors _set1Ierrors) = inv_ConstructorSet_s14 _set1X14 (T_ConstructorSet_vIn13 )+ (T_ConstructorSet_vOut13 _set2IcollectedConstructorNames _set2Iconstructors _set2Ierrors) = inv_ConstructorSet_s14 _set2X14 (T_ConstructorSet_vIn13 )+ _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)+ _lhsOconstructors = rule93 _set1Iconstructors _set2Iconstructors+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule94 _set1IcollectedConstructorNames _set2IcollectedConstructorNames+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule95 _set1Ierrors _set2Ierrors+ __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors+ in __result_ )+ in C_ConstructorSet_s14 v13+ {-# INLINE rule93 #-}+ {-# LINE 778 "./src-ag/Transform.ag" #-}+ rule93 = \ ((_set1Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_set2Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->+ {-# LINE 778 "./src-ag/Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.union` _set2Iconstructors ds+ {-# LINE 1450 "dist/build/Transform.hs"#-}+ {-# INLINE rule94 #-}+ rule94 = \ ((_set1IcollectedConstructorNames) :: Set ConstructorIdent) ((_set2IcollectedConstructorNames) :: Set ConstructorIdent) ->+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# INLINE rule95 #-}+ rule95 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->+ _set1Ierrors Seq.>< _set2Ierrors+{-# NOINLINE sem_ConstructorSet_CDifference #-}+sem_ConstructorSet_CDifference :: T_ConstructorSet -> T_ConstructorSet -> T_ConstructorSet +sem_ConstructorSet_CDifference arg_set1_ arg_set2_ = T_ConstructorSet (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_ConstructorSet_v13 + v13 = \ (T_ConstructorSet_vIn13 ) -> ( let+ _set1X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set1_))+ _set2X14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_set2_))+ (T_ConstructorSet_vOut13 _set1IcollectedConstructorNames _set1Iconstructors _set1Ierrors) = inv_ConstructorSet_s14 _set1X14 (T_ConstructorSet_vIn13 )+ (T_ConstructorSet_vOut13 _set2IcollectedConstructorNames _set2Iconstructors _set2Ierrors) = inv_ConstructorSet_s14 _set2X14 (T_ConstructorSet_vIn13 )+ _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)+ _lhsOconstructors = rule96 _set1Iconstructors _set2Iconstructors+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule97 _set1IcollectedConstructorNames _set2IcollectedConstructorNames+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule98 _set1Ierrors _set2Ierrors+ __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors+ in __result_ )+ in C_ConstructorSet_s14 v13+ {-# INLINE rule96 #-}+ {-# LINE 779 "./src-ag/Transform.ag" #-}+ rule96 = \ ((_set1Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_set2Iconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ->+ {-# LINE 779 "./src-ag/Transform.ag" #-}+ \ds -> _set1Iconstructors ds `Set.difference` _set2Iconstructors ds+ {-# LINE 1482 "dist/build/Transform.hs"#-}+ {-# INLINE rule97 #-}+ rule97 = \ ((_set1IcollectedConstructorNames) :: Set ConstructorIdent) ((_set2IcollectedConstructorNames) :: Set ConstructorIdent) ->+ _set1IcollectedConstructorNames `Set.union` _set2IcollectedConstructorNames+ {-# INLINE rule98 #-}+ rule98 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->+ _set1Ierrors Seq.>< _set2Ierrors+{-# NOINLINE sem_ConstructorSet_CAll #-}+sem_ConstructorSet_CAll :: T_ConstructorSet +sem_ConstructorSet_CAll = T_ConstructorSet (return st14) where+ {-# NOINLINE st14 #-}+ st14 = let+ v13 :: T_ConstructorSet_v13 + v13 = \ (T_ConstructorSet_vIn13 ) -> ( let+ _lhsOconstructors :: (Set ConstructorIdent->Set ConstructorIdent)+ _lhsOconstructors = rule99 ()+ _lhsOcollectedConstructorNames :: Set ConstructorIdent+ _lhsOcollectedConstructorNames = rule100 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule101 ()+ __result_ = T_ConstructorSet_vOut13 _lhsOcollectedConstructorNames _lhsOconstructors _lhsOerrors+ in __result_ )+ in C_ConstructorSet_s14 v13+ {-# INLINE rule99 #-}+ {-# LINE 780 "./src-ag/Transform.ag" #-}+ rule99 = \ (_ :: ()) ->+ {-# LINE 780 "./src-ag/Transform.ag" #-}+ \ds -> ds+ {-# LINE 1510 "dist/build/Transform.hs"#-}+ {-# INLINE rule100 #-}+ rule100 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule101 #-}+ rule101 = \ (_ :: ()) ->+ Seq.empty++-- Elem --------------------------------------------------------+-- wrapper+data Inh_Elem = Inh_Elem { allAttrDecls_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), allConstructors_Inh_Elem :: (Map NontermIdent (Set ConstructorIdent)), allFields_Inh_Elem :: (DataTypes), allNonterminals_Inh_Elem :: (Set NontermIdent), attrDecls_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), attrs_Inh_Elem :: (Map NontermIdent (Attributes, Attributes)), defSets_Inh_Elem :: (Map Identifier (Set NontermIdent,Set Identifier)), definedSets_Inh_Elem :: (DefinedSets), options_Inh_Elem :: (Options) }+data Syn_Elem = Syn_Elem { attrDecls_Syn_Elem :: (Map NontermIdent (Attributes, Attributes)), attrOrderCollect_Syn_Elem :: (AttrOrderMap), attrs_Syn_Elem :: (Map NontermIdent (Attributes, Attributes)), blocks_Syn_Elem :: (Blocks), collectedArounds_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedConParams_Syn_Elem :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Elem :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorsMap_Syn_Elem :: (Map NontermIdent (Set ConstructorIdent)), collectedFields_Syn_Elem :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedInsts_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMacros_Syn_Elem :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]), collectedMerges_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedNames_Syn_Elem :: (Set Identifier), collectedRules_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSetNames_Syn_Elem :: (Set Identifier), collectedSigs_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_Elem :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), constructorTypeMap_Syn_Elem :: (Map NontermIdent ConstructorType), ctxCollect_Syn_Elem :: (ContextMap), defSets_Syn_Elem :: (Map Identifier (Set NontermIdent,Set Identifier)), derivings_Syn_Elem :: (Derivings), errors_Syn_Elem :: (Seq Error), moduleDecl_Syn_Elem :: (Maybe (String,String,String)), paramsCollect_Syn_Elem :: (ParamMap), pragmas_Syn_Elem :: (Options -> Options), quantCollect_Syn_Elem :: (QuantMap), semPragmasCollect_Syn_Elem :: (PragmaMap), typeSyns_Syn_Elem :: (TypeSyns), useMap_Syn_Elem :: (Map NontermIdent (Map Identifier (String,String,String))), wrappers_Syn_Elem :: (Set NontermIdent) }+{-# INLINABLE wrap_Elem #-}+wrap_Elem :: T_Elem -> Inh_Elem -> (Syn_Elem )+wrap_Elem (T_Elem act) (Inh_Elem _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions+ (T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers) <- return (inv_Elem_s17 sem arg)+ return (Syn_Elem _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers)+ )++-- cata+{-# NOINLINE sem_Elem #-}+sem_Elem :: Elem -> T_Elem +sem_Elem ( Data pos_ contype_ ctx_ names_ params_ attrs_ alts_ ext_ ) = sem_Elem_Data pos_ contype_ ctx_ ( sem_NontSet names_ ) params_ ( sem_Attrs attrs_ ) ( sem_Alts alts_ ) ext_+sem_Elem ( Type pos_ ctx_ name_ params_ type_ ) = sem_Elem_Type pos_ ctx_ name_ params_ type_+sem_Elem ( Attr pos_ ctx_ names_ quants_ attrs_ ) = sem_Elem_Attr pos_ ctx_ ( sem_NontSet names_ ) quants_ ( sem_Attrs attrs_ )+sem_Elem ( Sem pos_ ctx_ names_ attrs_ quants_ alts_ ) = sem_Elem_Sem pos_ ctx_ ( sem_NontSet names_ ) ( sem_Attrs attrs_ ) quants_ ( sem_SemAlts alts_ )+sem_Elem ( Txt pos_ kind_ mbNt_ lines_ ) = sem_Elem_Txt pos_ kind_ mbNt_ lines_+sem_Elem ( Set pos_ name_ merge_ set_ ) = sem_Elem_Set pos_ name_ merge_ ( sem_NontSet set_ )+sem_Elem ( Deriving pos_ set_ classes_ ) = sem_Elem_Deriving pos_ ( sem_NontSet set_ ) classes_+sem_Elem ( Wrapper pos_ set_ ) = sem_Elem_Wrapper pos_ ( sem_NontSet set_ )+sem_Elem ( Nocatas pos_ set_ ) = sem_Elem_Nocatas pos_ ( sem_NontSet set_ )+sem_Elem ( Pragma pos_ names_ ) = sem_Elem_Pragma pos_ names_+sem_Elem ( Module pos_ name_ exports_ imports_ ) = sem_Elem_Module pos_ name_ exports_ imports_++-- semantic domain+newtype T_Elem = T_Elem {+ attach_T_Elem :: Identity (T_Elem_s17 )+ }+newtype T_Elem_s17 = C_Elem_s17 {+ inv_Elem_s17 :: (T_Elem_v16 )+ }+data T_Elem_s18 = C_Elem_s18+type T_Elem_v16 = (T_Elem_vIn16 ) -> (T_Elem_vOut16 )+data T_Elem_vIn16 = T_Elem_vIn16 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Set ConstructorIdent)) (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map Identifier (Set NontermIdent,Set Identifier)) (DefinedSets) (Options)+data T_Elem_vOut16 = T_Elem_vOut16 (Map NontermIdent (Attributes, Attributes)) (AttrOrderMap) (Map NontermIdent (Attributes, Attributes)) (Blocks) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Map NontermIdent (Set ConstructorIdent)) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([(NontermIdent, ConstructorIdent, MaybeMacro)]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Map NontermIdent ConstructorType) (ContextMap) (Map Identifier (Set NontermIdent,Set Identifier)) (Derivings) (Seq Error) (Maybe (String,String,String)) (ParamMap) (Options -> Options) (QuantMap) (PragmaMap) (TypeSyns) (Map NontermIdent (Map Identifier (String,String,String))) (Set NontermIdent)+{-# NOINLINE sem_Elem_Data #-}+sem_Elem_Data :: (Pos) -> (ConstructorType) -> (ClassContext) -> T_NontSet -> ([Identifier]) -> T_Attrs -> T_Alts -> (Bool) -> T_Elem +sem_Elem_Data _ arg_contype_ arg_ctx_ arg_names_ arg_params_ arg_attrs_ arg_alts_ _ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _namesX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_names_))+ _attrsX11 = Control.Monad.Identity.runIdentity (attach_T_Attrs (arg_attrs_))+ _altsX8 = Control.Monad.Identity.runIdentity (attach_T_Alts (arg_alts_))+ (T_NontSet_vOut28 _namesIcollectedNames _namesIerrors _namesInontSet) = inv_NontSet_s29 _namesX29 (T_NontSet_vIn28 _namesOallFields _namesOallNonterminals _namesOdefinedSets)+ (T_Attrs_vOut10 _attrsIattrDecls _attrsIattrs _attrsIerrors _attrsIuseMap) = inv_Attrs_s11 _attrsX11 (T_Attrs_vIn10 _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions)+ (T_Alts_vOut7 _altsIcollectedConParams _altsIcollectedConstraints _altsIcollectedConstructorNames _altsIcollectedFields _altsIcollectedMacros) = inv_Alts_s8 _altsX8 (T_Alts_vIn7 _altsOallConstructors _altsOallNonterminals _altsOnts)+ _altsOnts = rule102 _namesInontSet+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule103 _altsIcollectedConstructorNames _namesInontSet+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule104 _namesInontSet arg_params_+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule105 _namesInontSet arg_ctx_+ _attrsOnts = rule106 _namesInontSet+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule107 _namesIcollectedNames arg_contype_+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule108 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule109 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule110 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule111 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule112 _altsIcollectedConParams+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule113 _altsIcollectedConstraints+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule114 _altsIcollectedFields+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule115 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule116 _altsIcollectedMacros+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule117 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule118 _namesIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule119 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule120 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule121 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule122 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule123 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule124 _attrsIerrors _namesIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule125 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule126 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule127 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule128 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule129 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule130 _attrsIuseMap+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule131 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule132 _attrsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule133 _attrsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule134 _lhsIdefSets+ _namesOallFields = rule135 _lhsIallFields+ _namesOallNonterminals = rule136 _lhsIallNonterminals+ _namesOdefinedSets = rule137 _lhsIdefinedSets+ _attrsOallFields = rule138 _lhsIallFields+ _attrsOallNonterminals = rule139 _lhsIallNonterminals+ _attrsOattrDecls = rule140 _lhsIattrDecls+ _attrsOattrs = rule141 _lhsIattrs+ _attrsOoptions = rule142 _lhsIoptions+ _altsOallConstructors = rule143 _lhsIallConstructors+ _altsOallNonterminals = rule144 _lhsIallNonterminals+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule102 #-}+ {-# LINE 176 "./src-ag/Transform.ag" #-}+ rule102 = \ ((_namesInontSet) :: Set NontermIdent) ->+ {-# LINE 176 "./src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 1653 "dist/build/Transform.hs"#-}+ {-# INLINE rule103 #-}+ {-# LINE 620 "./src-ag/Transform.ag" #-}+ rule103 = \ ((_altsIcollectedConstructorNames) :: Set ConstructorIdent) ((_namesInontSet) :: Set NontermIdent) ->+ {-# LINE 620 "./src-ag/Transform.ag" #-}+ Map.fromList+ [ (n, _altsIcollectedConstructorNames)+ | n <- Set.toList _namesInontSet+ ]+ {-# LINE 1662 "dist/build/Transform.hs"#-}+ {-# INLINE rule104 #-}+ {-# LINE 948 "./src-ag/Transform.ag" #-}+ rule104 = \ ((_namesInontSet) :: Set NontermIdent) params_ ->+ {-# LINE 948 "./src-ag/Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.fromList [(nt, params_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1670 "dist/build/Transform.hs"#-}+ {-# INLINE rule105 #-}+ {-# LINE 971 "./src-ag/Transform.ag" #-}+ rule105 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->+ {-# LINE 971 "./src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 1678 "dist/build/Transform.hs"#-}+ {-# INLINE rule106 #-}+ {-# LINE 1033 "./src-ag/Transform.ag" #-}+ rule106 = \ ((_namesInontSet) :: Set NontermIdent) ->+ {-# LINE 1033 "./src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 1684 "dist/build/Transform.hs"#-}+ {-# INLINE rule107 #-}+ {-# LINE 1371 "./src-ag/Transform.ag" #-}+ rule107 = \ ((_namesIcollectedNames) :: Set Identifier) contype_ ->+ {-# LINE 1371 "./src-ag/Transform.ag" #-}+ Set.fold (\nm mp -> Map.insert nm contype_ mp) Map.empty _namesIcollectedNames+ {-# LINE 1690 "dist/build/Transform.hs"#-}+ {-# INLINE rule108 #-}+ rule108 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule109 #-}+ rule109 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule110 #-}+ rule110 = \ (_ :: ()) ->+ []+ {-# INLINE rule111 #-}+ rule111 = \ (_ :: ()) ->+ []+ {-# INLINE rule112 #-}+ rule112 = \ ((_altsIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->+ _altsIcollectedConParams+ {-# INLINE rule113 #-}+ rule113 = \ ((_altsIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->+ _altsIcollectedConstraints+ {-# INLINE rule114 #-}+ rule114 = \ ((_altsIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->+ _altsIcollectedFields+ {-# INLINE rule115 #-}+ rule115 = \ (_ :: ()) ->+ []+ {-# INLINE rule116 #-}+ rule116 = \ ((_altsIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->+ _altsIcollectedMacros+ {-# INLINE rule117 #-}+ rule117 = \ (_ :: ()) ->+ []+ {-# INLINE rule118 #-}+ rule118 = \ ((_namesIcollectedNames) :: Set Identifier) ->+ _namesIcollectedNames+ {-# INLINE rule119 #-}+ rule119 = \ (_ :: ()) ->+ []+ {-# INLINE rule120 #-}+ rule120 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule121 #-}+ rule121 = \ (_ :: ()) ->+ []+ {-# INLINE rule122 #-}+ rule122 = \ (_ :: ()) ->+ []+ {-# INLINE rule123 #-}+ rule123 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule124 #-}+ rule124 = \ ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->+ _namesIerrors Seq.>< _attrsIerrors+ {-# INLINE rule125 #-}+ rule125 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule126 #-}+ rule126 = \ (_ :: ()) ->+ id+ {-# INLINE rule127 #-}+ rule127 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule128 #-}+ rule128 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule129 #-}+ rule129 = \ (_ :: ()) ->+ []+ {-# INLINE rule130 #-}+ rule130 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->+ _attrsIuseMap+ {-# INLINE rule131 #-}+ rule131 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule132 #-}+ rule132 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _attrsIattrDecls+ {-# INLINE rule133 #-}+ rule133 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _attrsIattrs+ {-# INLINE rule134 #-}+ rule134 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule135 #-}+ rule135 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule136 #-}+ rule136 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule137 #-}+ rule137 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule138 #-}+ rule138 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule139 #-}+ rule139 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule140 #-}+ rule140 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule141 #-}+ rule141 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule142 #-}+ rule142 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule143 #-}+ rule143 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->+ _lhsIallConstructors+ {-# INLINE rule144 #-}+ rule144 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+{-# NOINLINE sem_Elem_Type #-}+sem_Elem_Type :: (Pos) -> (ClassContext) -> (NontermIdent) -> ([Identifier]) -> (ComplexType) -> T_Elem +sem_Elem_Type arg_pos_ arg_ctx_ arg_name_ arg_params_ arg_type_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule145 _expanded arg_name_+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule146 arg_name_+ _expanded = rule147 _argType arg_name_ arg_params_ arg_pos_+ _argType = rule148 _lhsIallNonterminals arg_type_+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule149 _argType arg_name_+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule150 arg_name_ arg_params_+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule151 arg_ctx_ arg_name_+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule152 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule153 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule154 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule155 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule156 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule157 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule158 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule159 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule160 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule161 ()+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule162 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule163 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule164 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule165 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule166 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule167 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule168 ()+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule169 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule170 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule171 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule172 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule173 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule174 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule175 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule176 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule177 _lhsIdefSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule145 #-}+ {-# LINE 254 "./src-ag/Transform.ag" #-}+ rule145 = \ _expanded name_ ->+ {-# LINE 254 "./src-ag/Transform.ag" #-}+ map (\(x,y)->(name_, x, y)) _expanded+ {-# LINE 1881 "dist/build/Transform.hs"#-}+ {-# INLINE rule146 #-}+ {-# LINE 600 "./src-ag/Transform.ag" #-}+ rule146 = \ name_ ->+ {-# LINE 600 "./src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 1887 "dist/build/Transform.hs"#-}+ {-# INLINE rule147 #-}+ {-# LINE 654 "./src-ag/Transform.ag" #-}+ rule147 = \ _argType name_ params_ pos_ ->+ {-# LINE 654 "./src-ag/Transform.ag" #-}+ case _argType of+ List tp -> [(Ident "Cons" pos_, [(Ident "hd" pos_, tp)+ ,(Ident "tl" pos_, NT name_ (map getName params_) False)+ ]+ )+ ,(Ident "Nil" pos_, [])+ ]+ Maybe tp -> [(Ident "Just" pos_, [(Ident "just" pos_, tp)+ ]+ )+ ,(Ident "Nothing" pos_, [])+ ]+ Either tp1 tp2 -> [+ (Ident "Left" pos_, [(Ident "left" pos_, tp1) ])+ , (Ident "Right" pos_, [(Ident "right" pos_, tp2) ])+ ]+ Map tp1 tp2 -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, tp1)+ , (Ident "val" pos_, tp2)+ , (Ident "tl" pos_, NT name_ (map getName params_) False)+ ])+ , (Ident "Nil" pos_, [])+ ]+ IntMap tp -> [ (Ident "Entry" pos_, [ (Ident "key" pos_, Haskell "Int")+ , (Ident "val" pos_, tp)+ , (Ident "tl" pos_, NT name_ (map getName params_) False)+ ])+ , (Ident "Nil" pos_, [])+ ]+ OrdSet tp -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, tp)+ , (Ident "tl" pos_, NT name_ (map getName params_) False) ])+ , (Ident "Nil" pos_, [])+ ]+ IntSet -> [ (Ident "Entry" pos_, [ (Ident "val" pos_, Haskell "Int")+ , (Ident "tl" pos_, NT name_ (map getName params_) False) ])+ , (Ident "Nil" pos_, [])+ ]+ Tuple xs -> [(Ident "Tuple" pos_, xs)]+ {-# LINE 1929 "dist/build/Transform.hs"#-}+ {-# INLINE rule148 #-}+ {-# LINE 691 "./src-ag/Transform.ag" #-}+ rule148 = \ ((_lhsIallNonterminals) :: Set NontermIdent) type_ ->+ {-# LINE 691 "./src-ag/Transform.ag" #-}+ case type_ of+ Maybe tp -> Maybe ( makeType _lhsIallNonterminals tp)+ Either tp1 tp2 -> Either ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)+ List tp -> List ( makeType _lhsIallNonterminals tp)+ Tuple xs -> Tuple [(f,makeType _lhsIallNonterminals tp) | (f,tp) <- xs]+ Map tp1 tp2 -> Map ( makeType _lhsIallNonterminals tp1) (makeType _lhsIallNonterminals tp2)+ IntMap tp -> IntMap ( makeType _lhsIallNonterminals tp)+ OrdSet tp -> OrdSet ( makeType _lhsIallNonterminals tp)+ IntSet -> IntSet+ {-# LINE 1943 "dist/build/Transform.hs"#-}+ {-# INLINE rule149 #-}+ {-# LINE 700 "./src-ag/Transform.ag" #-}+ rule149 = \ _argType name_ ->+ {-# LINE 700 "./src-ag/Transform.ag" #-}+ [(name_,_argType)]+ {-# LINE 1949 "dist/build/Transform.hs"#-}+ {-# INLINE rule150 #-}+ {-# LINE 954 "./src-ag/Transform.ag" #-}+ rule150 = \ name_ params_ ->+ {-# LINE 954 "./src-ag/Transform.ag" #-}+ if null params_+ then Map.empty+ else Map.singleton name_ params_+ {-# LINE 1957 "dist/build/Transform.hs"#-}+ {-# INLINE rule151 #-}+ {-# LINE 977 "./src-ag/Transform.ag" #-}+ rule151 = \ ctx_ name_ ->+ {-# LINE 977 "./src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.singleton name_ ctx_+ {-# LINE 1965 "dist/build/Transform.hs"#-}+ {-# INLINE rule152 #-}+ rule152 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule153 #-}+ rule153 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule154 #-}+ rule154 = \ (_ :: ()) ->+ []+ {-# INLINE rule155 #-}+ rule155 = \ (_ :: ()) ->+ []+ {-# INLINE rule156 #-}+ rule156 = \ (_ :: ()) ->+ []+ {-# INLINE rule157 #-}+ rule157 = \ (_ :: ()) ->+ []+ {-# INLINE rule158 #-}+ rule158 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule159 #-}+ rule159 = \ (_ :: ()) ->+ []+ {-# INLINE rule160 #-}+ rule160 = \ (_ :: ()) ->+ []+ {-# INLINE rule161 #-}+ rule161 = \ (_ :: ()) ->+ []+ {-# INLINE rule162 #-}+ rule162 = \ (_ :: ()) ->+ []+ {-# INLINE rule163 #-}+ rule163 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule164 #-}+ rule164 = \ (_ :: ()) ->+ []+ {-# INLINE rule165 #-}+ rule165 = \ (_ :: ()) ->+ []+ {-# INLINE rule166 #-}+ rule166 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule167 #-}+ rule167 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule168 #-}+ rule168 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule169 #-}+ rule169 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule170 #-}+ rule170 = \ (_ :: ()) ->+ id+ {-# INLINE rule171 #-}+ rule171 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule172 #-}+ rule172 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule173 #-}+ rule173 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule174 #-}+ rule174 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule175 #-}+ rule175 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule176 #-}+ rule176 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule177 #-}+ rule177 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+{-# NOINLINE sem_Elem_Attr #-}+sem_Elem_Attr :: (Pos) -> (ClassContext) -> T_NontSet -> ([String]) -> T_Attrs -> T_Elem +sem_Elem_Attr _ arg_ctx_ arg_names_ arg_quants_ arg_attrs_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _namesX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_names_))+ _attrsX11 = Control.Monad.Identity.runIdentity (attach_T_Attrs (arg_attrs_))+ (T_NontSet_vOut28 _namesIcollectedNames _namesIerrors _namesInontSet) = inv_NontSet_s29 _namesX29 (T_NontSet_vIn28 _namesOallFields _namesOallNonterminals _namesOdefinedSets)+ (T_Attrs_vOut10 _attrsIattrDecls _attrsIattrs _attrsIerrors _attrsIuseMap) = inv_Attrs_s11 _attrsX11 (T_Attrs_vIn10 _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions)+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule178 _namesInontSet arg_ctx_+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule179 _namesInontSet arg_quants_+ _attrsOnts = rule180 _namesInontSet+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule181 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule182 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule183 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule184 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule185 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule186 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule187 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule188 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule189 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule190 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule191 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule192 _namesIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule193 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule194 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule195 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule196 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule197 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule198 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule199 _attrsIerrors _namesIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule200 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule201 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule202 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule203 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule204 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule205 _attrsIuseMap+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule206 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule207 _attrsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule208 _attrsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule209 _lhsIdefSets+ _namesOallFields = rule210 _lhsIallFields+ _namesOallNonterminals = rule211 _lhsIallNonterminals+ _namesOdefinedSets = rule212 _lhsIdefinedSets+ _attrsOallFields = rule213 _lhsIallFields+ _attrsOallNonterminals = rule214 _lhsIallNonterminals+ _attrsOattrDecls = rule215 _lhsIattrDecls+ _attrsOattrs = rule216 _lhsIattrs+ _attrsOoptions = rule217 _lhsIoptions+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule178 #-}+ {-# LINE 971 "./src-ag/Transform.ag" #-}+ rule178 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->+ {-# LINE 971 "./src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2136 "dist/build/Transform.hs"#-}+ {-# INLINE rule179 #-}+ {-# LINE 996 "./src-ag/Transform.ag" #-}+ rule179 = \ ((_namesInontSet) :: Set NontermIdent) quants_ ->+ {-# LINE 996 "./src-ag/Transform.ag" #-}+ if null quants_+ then Map.empty+ else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2144 "dist/build/Transform.hs"#-}+ {-# INLINE rule180 #-}+ {-# LINE 1034 "./src-ag/Transform.ag" #-}+ rule180 = \ ((_namesInontSet) :: Set NontermIdent) ->+ {-# LINE 1034 "./src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 2150 "dist/build/Transform.hs"#-}+ {-# INLINE rule181 #-}+ rule181 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule182 #-}+ rule182 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule183 #-}+ rule183 = \ (_ :: ()) ->+ []+ {-# INLINE rule184 #-}+ rule184 = \ (_ :: ()) ->+ []+ {-# INLINE rule185 #-}+ rule185 = \ (_ :: ()) ->+ []+ {-# INLINE rule186 #-}+ rule186 = \ (_ :: ()) ->+ []+ {-# INLINE rule187 #-}+ rule187 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule188 #-}+ rule188 = \ (_ :: ()) ->+ []+ {-# INLINE rule189 #-}+ rule189 = \ (_ :: ()) ->+ []+ {-# INLINE rule190 #-}+ rule190 = \ (_ :: ()) ->+ []+ {-# INLINE rule191 #-}+ rule191 = \ (_ :: ()) ->+ []+ {-# INLINE rule192 #-}+ rule192 = \ ((_namesIcollectedNames) :: Set Identifier) ->+ _namesIcollectedNames+ {-# INLINE rule193 #-}+ rule193 = \ (_ :: ()) ->+ []+ {-# INLINE rule194 #-}+ rule194 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule195 #-}+ rule195 = \ (_ :: ()) ->+ []+ {-# INLINE rule196 #-}+ rule196 = \ (_ :: ()) ->+ []+ {-# INLINE rule197 #-}+ rule197 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule198 #-}+ rule198 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule199 #-}+ rule199 = \ ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->+ _namesIerrors Seq.>< _attrsIerrors+ {-# INLINE rule200 #-}+ rule200 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule201 #-}+ rule201 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule202 #-}+ rule202 = \ (_ :: ()) ->+ id+ {-# INLINE rule203 #-}+ rule203 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule204 #-}+ rule204 = \ (_ :: ()) ->+ []+ {-# INLINE rule205 #-}+ rule205 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->+ _attrsIuseMap+ {-# INLINE rule206 #-}+ rule206 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule207 #-}+ rule207 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _attrsIattrDecls+ {-# INLINE rule208 #-}+ rule208 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _attrsIattrs+ {-# INLINE rule209 #-}+ rule209 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule210 #-}+ rule210 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule211 #-}+ rule211 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule212 #-}+ rule212 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule213 #-}+ rule213 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule214 #-}+ rule214 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule215 #-}+ rule215 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule216 #-}+ rule216 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule217 #-}+ rule217 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Elem_Sem #-}+sem_Elem_Sem :: (Pos) -> (ClassContext) -> T_NontSet -> T_Attrs -> ([String]) -> T_SemAlts -> T_Elem +sem_Elem_Sem _ arg_ctx_ arg_names_ arg_attrs_ arg_quants_ arg_alts_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _namesX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_names_))+ _attrsX11 = Control.Monad.Identity.runIdentity (attach_T_Attrs (arg_attrs_))+ _altsX41 = Control.Monad.Identity.runIdentity (attach_T_SemAlts (arg_alts_))+ (T_NontSet_vOut28 _namesIcollectedNames _namesIerrors _namesInontSet) = inv_NontSet_s29 _namesX29 (T_NontSet_vIn28 _namesOallFields _namesOallNonterminals _namesOdefinedSets)+ (T_Attrs_vOut10 _attrsIattrDecls _attrsIattrs _attrsIerrors _attrsIuseMap) = inv_Attrs_s11 _attrsX11 (T_Attrs_vIn10 _attrsOallFields _attrsOallNonterminals _attrsOattrDecls _attrsOattrs _attrsOnts _attrsOoptions)+ (T_SemAlts_vOut40 _altsIattrOrderCollect _altsIcollectedArounds _altsIcollectedAugments _altsIcollectedInsts _altsIcollectedMerges _altsIcollectedRules _altsIcollectedSigs _altsIcollectedUniques _altsIerrors _altsIsemPragmasCollect) = inv_SemAlts_s41 _altsX41 (T_SemAlts_vIn40 _altsOallAttrDecls _altsOallAttrs _altsOallFields _altsOnts _altsOoptions)+ _altsOnts = rule218 _namesInontSet+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule219 _namesInontSet arg_ctx_+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule220 _namesInontSet arg_quants_+ _attrsOnts = rule221 _namesInontSet+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule222 _altsIattrOrderCollect+ _lhsOblocks :: Blocks+ _lhsOblocks = rule223 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule224 _altsIcollectedArounds+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule225 _altsIcollectedAugments+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule226 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule227 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule228 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule229 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule230 _altsIcollectedInsts+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule231 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule232 _altsIcollectedMerges+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule233 _namesIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule234 _altsIcollectedRules+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule235 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule236 _altsIcollectedSigs+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule237 _altsIcollectedUniques+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule238 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule239 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule240 _altsIerrors _attrsIerrors _namesIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule241 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule242 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule243 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule244 _altsIsemPragmasCollect+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule245 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule246 _attrsIuseMap+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule247 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule248 _attrsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule249 _attrsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule250 _lhsIdefSets+ _namesOallFields = rule251 _lhsIallFields+ _namesOallNonterminals = rule252 _lhsIallNonterminals+ _namesOdefinedSets = rule253 _lhsIdefinedSets+ _attrsOallFields = rule254 _lhsIallFields+ _attrsOallNonterminals = rule255 _lhsIallNonterminals+ _attrsOattrDecls = rule256 _lhsIattrDecls+ _attrsOattrs = rule257 _lhsIattrs+ _attrsOoptions = rule258 _lhsIoptions+ _altsOallAttrDecls = rule259 _lhsIallAttrDecls+ _altsOallAttrs = rule260 _lhsIallAttrs+ _altsOallFields = rule261 _lhsIallFields+ _altsOoptions = rule262 _lhsIoptions+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule218 #-}+ {-# LINE 177 "./src-ag/Transform.ag" #-}+ rule218 = \ ((_namesInontSet) :: Set NontermIdent) ->+ {-# LINE 177 "./src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 2359 "dist/build/Transform.hs"#-}+ {-# INLINE rule219 #-}+ {-# LINE 971 "./src-ag/Transform.ag" #-}+ rule219 = \ ((_namesInontSet) :: Set NontermIdent) ctx_ ->+ {-# LINE 971 "./src-ag/Transform.ag" #-}+ if null ctx_+ then Map.empty+ else Map.fromList [(nt, ctx_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2367 "dist/build/Transform.hs"#-}+ {-# INLINE rule220 #-}+ {-# LINE 996 "./src-ag/Transform.ag" #-}+ rule220 = \ ((_namesInontSet) :: Set NontermIdent) quants_ ->+ {-# LINE 996 "./src-ag/Transform.ag" #-}+ if null quants_+ then Map.empty+ else Map.fromList [(nt, quants_) | nt <- Set.toList _namesInontSet]+ {-# LINE 2375 "dist/build/Transform.hs"#-}+ {-# INLINE rule221 #-}+ {-# LINE 1035 "./src-ag/Transform.ag" #-}+ rule221 = \ ((_namesInontSet) :: Set NontermIdent) ->+ {-# LINE 1035 "./src-ag/Transform.ag" #-}+ _namesInontSet+ {-# LINE 2381 "dist/build/Transform.hs"#-}+ {-# INLINE rule222 #-}+ rule222 = \ ((_altsIattrOrderCollect) :: AttrOrderMap) ->+ _altsIattrOrderCollect+ {-# INLINE rule223 #-}+ rule223 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule224 #-}+ rule224 = \ ((_altsIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->+ _altsIcollectedArounds+ {-# INLINE rule225 #-}+ rule225 = \ ((_altsIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->+ _altsIcollectedAugments+ {-# INLINE rule226 #-}+ rule226 = \ (_ :: ()) ->+ []+ {-# INLINE rule227 #-}+ rule227 = \ (_ :: ()) ->+ []+ {-# INLINE rule228 #-}+ rule228 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule229 #-}+ rule229 = \ (_ :: ()) ->+ []+ {-# INLINE rule230 #-}+ rule230 = \ ((_altsIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->+ _altsIcollectedInsts+ {-# INLINE rule231 #-}+ rule231 = \ (_ :: ()) ->+ []+ {-# INLINE rule232 #-}+ rule232 = \ ((_altsIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->+ _altsIcollectedMerges+ {-# INLINE rule233 #-}+ rule233 = \ ((_namesIcollectedNames) :: Set Identifier) ->+ _namesIcollectedNames+ {-# INLINE rule234 #-}+ rule234 = \ ((_altsIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->+ _altsIcollectedRules+ {-# INLINE rule235 #-}+ rule235 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule236 #-}+ rule236 = \ ((_altsIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->+ _altsIcollectedSigs+ {-# INLINE rule237 #-}+ rule237 = \ ((_altsIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->+ _altsIcollectedUniques+ {-# INLINE rule238 #-}+ rule238 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule239 #-}+ rule239 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule240 #-}+ rule240 = \ ((_altsIerrors) :: Seq Error) ((_attrsIerrors) :: Seq Error) ((_namesIerrors) :: Seq Error) ->+ _namesIerrors Seq.>< _attrsIerrors Seq.>< _altsIerrors+ {-# INLINE rule241 #-}+ rule241 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule242 #-}+ rule242 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule243 #-}+ rule243 = \ (_ :: ()) ->+ id+ {-# INLINE rule244 #-}+ rule244 = \ ((_altsIsemPragmasCollect) :: PragmaMap) ->+ _altsIsemPragmasCollect+ {-# INLINE rule245 #-}+ rule245 = \ (_ :: ()) ->+ []+ {-# INLINE rule246 #-}+ rule246 = \ ((_attrsIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->+ _attrsIuseMap+ {-# INLINE rule247 #-}+ rule247 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule248 #-}+ rule248 = \ ((_attrsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _attrsIattrDecls+ {-# INLINE rule249 #-}+ rule249 = \ ((_attrsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _attrsIattrs+ {-# INLINE rule250 #-}+ rule250 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule251 #-}+ rule251 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule252 #-}+ rule252 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule253 #-}+ rule253 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule254 #-}+ rule254 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule255 #-}+ rule255 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule256 #-}+ rule256 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule257 #-}+ rule257 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule258 #-}+ rule258 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule259 #-}+ rule259 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrDecls+ {-# INLINE rule260 #-}+ rule260 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrs+ {-# INLINE rule261 #-}+ rule261 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule262 #-}+ rule262 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Elem_Txt #-}+sem_Elem_Txt :: (Pos) -> (BlockKind) -> (Maybe NontermIdent) -> ([String]) -> T_Elem +sem_Elem_Txt arg_pos_ arg_kind_ arg_mbNt_ arg_lines_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _blockInfo = rule263 arg_kind_ arg_mbNt_+ _blockValue = rule264 arg_lines_ arg_pos_+ _lhsOblocks :: Blocks+ _lhsOblocks = rule265 _blockInfo _blockValue+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule266 _lhsIoptions arg_lines_ arg_pos_+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule267 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule268 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule269 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule270 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule271 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule272 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule273 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule274 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule275 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule276 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule277 ()+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule278 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule279 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule280 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule281 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule282 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule283 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule284 ()+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule285 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule286 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule287 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule288 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule289 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule290 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule291 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule292 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule293 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule294 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule295 _lhsIdefSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule263 #-}+ {-# LINE 186 "./src-ag/Transform.ag" #-}+ rule263 = \ kind_ mbNt_ ->+ {-# LINE 186 "./src-ag/Transform.ag" #-}+ ( kind_+ , mbNt_+ )+ {-# LINE 2586 "dist/build/Transform.hs"#-}+ {-# INLINE rule264 #-}+ {-# LINE 189 "./src-ag/Transform.ag" #-}+ rule264 = \ lines_ pos_ ->+ {-# LINE 189 "./src-ag/Transform.ag" #-}+ [(lines_, pos_)]+ {-# LINE 2592 "dist/build/Transform.hs"#-}+ {-# INLINE rule265 #-}+ {-# LINE 190 "./src-ag/Transform.ag" #-}+ rule265 = \ _blockInfo _blockValue ->+ {-# LINE 190 "./src-ag/Transform.ag" #-}+ Map.singleton _blockInfo _blockValue+ {-# LINE 2598 "dist/build/Transform.hs"#-}+ {-# INLINE rule266 #-}+ {-# LINE 191 "./src-ag/Transform.ag" #-}+ rule266 = \ ((_lhsIoptions) :: Options) lines_ pos_ ->+ {-# LINE 191 "./src-ag/Transform.ag" #-}+ if checkParseBlock _lhsIoptions+ then let ex = Expression pos_ tks+ tks = [tk]+ tk = HsToken (unlines lines_) pos_+ in Seq.fromList $ checkBlock $ ex+ else Seq.empty+ {-# LINE 2609 "dist/build/Transform.hs"#-}+ {-# INLINE rule267 #-}+ rule267 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule268 #-}+ rule268 = \ (_ :: ()) ->+ []+ {-# INLINE rule269 #-}+ rule269 = \ (_ :: ()) ->+ []+ {-# INLINE rule270 #-}+ rule270 = \ (_ :: ()) ->+ []+ {-# INLINE rule271 #-}+ rule271 = \ (_ :: ()) ->+ []+ {-# INLINE rule272 #-}+ rule272 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule273 #-}+ rule273 = \ (_ :: ()) ->+ []+ {-# INLINE rule274 #-}+ rule274 = \ (_ :: ()) ->+ []+ {-# INLINE rule275 #-}+ rule275 = \ (_ :: ()) ->+ []+ {-# INLINE rule276 #-}+ rule276 = \ (_ :: ()) ->+ []+ {-# INLINE rule277 #-}+ rule277 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule278 #-}+ rule278 = \ (_ :: ()) ->+ []+ {-# INLINE rule279 #-}+ rule279 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule280 #-}+ rule280 = \ (_ :: ()) ->+ []+ {-# INLINE rule281 #-}+ rule281 = \ (_ :: ()) ->+ []+ {-# INLINE rule282 #-}+ rule282 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule283 #-}+ rule283 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule284 #-}+ rule284 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule285 #-}+ rule285 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule286 #-}+ rule286 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule287 #-}+ rule287 = \ (_ :: ()) ->+ id+ {-# INLINE rule288 #-}+ rule288 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule289 #-}+ rule289 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule290 #-}+ rule290 = \ (_ :: ()) ->+ []+ {-# INLINE rule291 #-}+ rule291 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule292 #-}+ rule292 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule293 #-}+ rule293 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule294 #-}+ rule294 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule295 #-}+ rule295 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+{-# NOINLINE sem_Elem_Set #-}+sem_Elem_Set :: (Pos) -> (NontermIdent) -> (Bool) -> T_NontSet -> T_Elem +sem_Elem_Set _ arg_name_ arg_merge_ arg_set_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))+ (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule296 arg_name_+ (_defSets2,_errs) = rule297 _lhsIallNonterminals _lhsIdefSets _setIcollectedNames _setInontSet arg_merge_ arg_name_+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule298 _defSets2+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule299 _errs _setIerrors+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule300 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule301 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule302 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule303 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule304 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule305 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule306 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule307 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule308 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule309 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule310 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule311 _setIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule312 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule313 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule314 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule315 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule316 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule317 ()+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule318 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule319 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule320 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule321 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule322 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule323 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule324 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule325 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule326 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule327 _lhsIattrs+ _setOallFields = rule328 _lhsIallFields+ _setOallNonterminals = rule329 _lhsIallNonterminals+ _setOdefinedSets = rule330 _lhsIdefinedSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule296 #-}+ {-# LINE 597 "./src-ag/Transform.ag" #-}+ rule296 = \ name_ ->+ {-# LINE 597 "./src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 2780 "dist/build/Transform.hs"#-}+ {-# INLINE rule297 #-}+ {-# LINE 714 "./src-ag/Transform.ag" #-}+ rule297 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ((_setIcollectedNames) :: Set Identifier) ((_setInontSet) :: Set NontermIdent) merge_ name_ ->+ {-# LINE 714 "./src-ag/Transform.ag" #-}+ let allUsedNames = Set.unions [ maybe (Set.singleton n)+ snd+ (Map.lookup n _lhsIdefSets)+ | n <- Set.toList _setIcollectedNames+ ]+ (nontSet,e1) | Set.member name_ allUsedNames+ = (Set.empty, Seq.singleton(CyclicSet name_))+ | otherwise = (_setInontSet, Seq.empty)+ (res, e2) = let toAdd = (nontSet,Set.insert name_ allUsedNames)+ un (a,b) (c,d) = (a `Set.union` c, b `Set.union` d)+ in if Set.member name_ _lhsIallNonterminals || not merge_+ then checkDuplicate DupSet name_ toAdd _lhsIdefSets+ else (Map.insertWith un name_ toAdd _lhsIdefSets, Seq.empty)+ in (res, e1 Seq.>< e2)+ {-# LINE 2799 "dist/build/Transform.hs"#-}+ {-# INLINE rule298 #-}+ {-# LINE 728 "./src-ag/Transform.ag" #-}+ rule298 = \ _defSets2 ->+ {-# LINE 728 "./src-ag/Transform.ag" #-}+ _defSets2+ {-# LINE 2805 "dist/build/Transform.hs"#-}+ {-# INLINE rule299 #-}+ {-# LINE 729 "./src-ag/Transform.ag" #-}+ rule299 = \ _errs ((_setIerrors) :: Seq Error) ->+ {-# LINE 729 "./src-ag/Transform.ag" #-}+ _errs >< _setIerrors+ {-# LINE 2811 "dist/build/Transform.hs"#-}+ {-# INLINE rule300 #-}+ rule300 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule301 #-}+ rule301 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule302 #-}+ rule302 = \ (_ :: ()) ->+ []+ {-# INLINE rule303 #-}+ rule303 = \ (_ :: ()) ->+ []+ {-# INLINE rule304 #-}+ rule304 = \ (_ :: ()) ->+ []+ {-# INLINE rule305 #-}+ rule305 = \ (_ :: ()) ->+ []+ {-# INLINE rule306 #-}+ rule306 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule307 #-}+ rule307 = \ (_ :: ()) ->+ []+ {-# INLINE rule308 #-}+ rule308 = \ (_ :: ()) ->+ []+ {-# INLINE rule309 #-}+ rule309 = \ (_ :: ()) ->+ []+ {-# INLINE rule310 #-}+ rule310 = \ (_ :: ()) ->+ []+ {-# INLINE rule311 #-}+ rule311 = \ ((_setIcollectedNames) :: Set Identifier) ->+ _setIcollectedNames+ {-# INLINE rule312 #-}+ rule312 = \ (_ :: ()) ->+ []+ {-# INLINE rule313 #-}+ rule313 = \ (_ :: ()) ->+ []+ {-# INLINE rule314 #-}+ rule314 = \ (_ :: ()) ->+ []+ {-# INLINE rule315 #-}+ rule315 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule316 #-}+ rule316 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule317 #-}+ rule317 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule318 #-}+ rule318 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule319 #-}+ rule319 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule320 #-}+ rule320 = \ (_ :: ()) ->+ id+ {-# INLINE rule321 #-}+ rule321 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule322 #-}+ rule322 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule323 #-}+ rule323 = \ (_ :: ()) ->+ []+ {-# INLINE rule324 #-}+ rule324 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule325 #-}+ rule325 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule326 #-}+ rule326 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule327 #-}+ rule327 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule328 #-}+ rule328 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule329 #-}+ rule329 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule330 #-}+ rule330 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_Elem_Deriving #-}+sem_Elem_Deriving :: (Pos) -> T_NontSet -> ([NontermIdent]) -> T_Elem +sem_Elem_Deriving _ arg_set_ arg_classes_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))+ (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)+ _lhsOderivings :: Derivings+ _lhsOderivings = rule331 _setInontSet arg_classes_+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule332 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule333 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule334 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule335 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule336 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule337 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule338 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule339 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule340 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule341 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule342 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule343 _setIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule344 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule345 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule346 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule347 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule348 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule349 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule350 _setIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule351 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule352 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule353 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule354 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule355 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule356 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule357 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule358 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule359 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule360 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule361 _lhsIdefSets+ _setOallFields = rule362 _lhsIallFields+ _setOallNonterminals = rule363 _lhsIallNonterminals+ _setOdefinedSets = rule364 _lhsIdefinedSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule331 #-}+ {-# LINE 1017 "./src-ag/Transform.ag" #-}+ rule331 = \ ((_setInontSet) :: Set NontermIdent) classes_ ->+ {-# LINE 1017 "./src-ag/Transform.ag" #-}+ Map.fromList [(nt,Set.fromList classes_) | nt <- Set.toList _setInontSet]+ {-# LINE 2987 "dist/build/Transform.hs"#-}+ {-# INLINE rule332 #-}+ rule332 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule333 #-}+ rule333 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule334 #-}+ rule334 = \ (_ :: ()) ->+ []+ {-# INLINE rule335 #-}+ rule335 = \ (_ :: ()) ->+ []+ {-# INLINE rule336 #-}+ rule336 = \ (_ :: ()) ->+ []+ {-# INLINE rule337 #-}+ rule337 = \ (_ :: ()) ->+ []+ {-# INLINE rule338 #-}+ rule338 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule339 #-}+ rule339 = \ (_ :: ()) ->+ []+ {-# INLINE rule340 #-}+ rule340 = \ (_ :: ()) ->+ []+ {-# INLINE rule341 #-}+ rule341 = \ (_ :: ()) ->+ []+ {-# INLINE rule342 #-}+ rule342 = \ (_ :: ()) ->+ []+ {-# INLINE rule343 #-}+ rule343 = \ ((_setIcollectedNames) :: Set Identifier) ->+ _setIcollectedNames+ {-# INLINE rule344 #-}+ rule344 = \ (_ :: ()) ->+ []+ {-# INLINE rule345 #-}+ rule345 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule346 #-}+ rule346 = \ (_ :: ()) ->+ []+ {-# INLINE rule347 #-}+ rule347 = \ (_ :: ()) ->+ []+ {-# INLINE rule348 #-}+ rule348 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule349 #-}+ rule349 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule350 #-}+ rule350 = \ ((_setIerrors) :: Seq Error) ->+ _setIerrors+ {-# INLINE rule351 #-}+ rule351 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule352 #-}+ rule352 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule353 #-}+ rule353 = \ (_ :: ()) ->+ id+ {-# INLINE rule354 #-}+ rule354 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule355 #-}+ rule355 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule356 #-}+ rule356 = \ (_ :: ()) ->+ []+ {-# INLINE rule357 #-}+ rule357 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule358 #-}+ rule358 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule359 #-}+ rule359 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule360 #-}+ rule360 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule361 #-}+ rule361 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule362 #-}+ rule362 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule363 #-}+ rule363 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule364 #-}+ rule364 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_Elem_Wrapper #-}+sem_Elem_Wrapper :: (Pos) -> T_NontSet -> T_Elem +sem_Elem_Wrapper _ arg_set_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))+ (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule365 _setInontSet+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule366 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule367 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule368 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule369 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule370 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule371 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule372 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule373 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule374 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule375 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule376 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule377 _setIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule378 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule379 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule380 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule381 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule382 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule383 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule384 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule385 _setIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule386 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule387 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule388 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule389 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule390 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule391 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule392 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule393 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule394 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule395 _lhsIdefSets+ _setOallFields = rule396 _lhsIallFields+ _setOallNonterminals = rule397 _lhsIallNonterminals+ _setOdefinedSets = rule398 _lhsIdefinedSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule365 #-}+ {-# LINE 789 "./src-ag/Transform.ag" #-}+ rule365 = \ ((_setInontSet) :: Set NontermIdent) ->+ {-# LINE 789 "./src-ag/Transform.ag" #-}+ _setInontSet+ {-# LINE 3169 "dist/build/Transform.hs"#-}+ {-# INLINE rule366 #-}+ rule366 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule367 #-}+ rule367 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule368 #-}+ rule368 = \ (_ :: ()) ->+ []+ {-# INLINE rule369 #-}+ rule369 = \ (_ :: ()) ->+ []+ {-# INLINE rule370 #-}+ rule370 = \ (_ :: ()) ->+ []+ {-# INLINE rule371 #-}+ rule371 = \ (_ :: ()) ->+ []+ {-# INLINE rule372 #-}+ rule372 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule373 #-}+ rule373 = \ (_ :: ()) ->+ []+ {-# INLINE rule374 #-}+ rule374 = \ (_ :: ()) ->+ []+ {-# INLINE rule375 #-}+ rule375 = \ (_ :: ()) ->+ []+ {-# INLINE rule376 #-}+ rule376 = \ (_ :: ()) ->+ []+ {-# INLINE rule377 #-}+ rule377 = \ ((_setIcollectedNames) :: Set Identifier) ->+ _setIcollectedNames+ {-# INLINE rule378 #-}+ rule378 = \ (_ :: ()) ->+ []+ {-# INLINE rule379 #-}+ rule379 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule380 #-}+ rule380 = \ (_ :: ()) ->+ []+ {-# INLINE rule381 #-}+ rule381 = \ (_ :: ()) ->+ []+ {-# INLINE rule382 #-}+ rule382 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule383 #-}+ rule383 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule384 #-}+ rule384 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule385 #-}+ rule385 = \ ((_setIerrors) :: Seq Error) ->+ _setIerrors+ {-# INLINE rule386 #-}+ rule386 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule387 #-}+ rule387 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule388 #-}+ rule388 = \ (_ :: ()) ->+ id+ {-# INLINE rule389 #-}+ rule389 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule390 #-}+ rule390 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule391 #-}+ rule391 = \ (_ :: ()) ->+ []+ {-# INLINE rule392 #-}+ rule392 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule393 #-}+ rule393 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule394 #-}+ rule394 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule395 #-}+ rule395 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule396 #-}+ rule396 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule397 #-}+ rule397 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule398 #-}+ rule398 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_Elem_Nocatas #-}+sem_Elem_Nocatas :: (Pos) -> T_NontSet -> T_Elem +sem_Elem_Nocatas _ arg_set_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _setX29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set_))+ (T_NontSet_vOut28 _setIcollectedNames _setIerrors _setInontSet) = inv_NontSet_s29 _setX29 (T_NontSet_vIn28 _setOallFields _setOallNonterminals _setOdefinedSets)+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule399 _setInontSet+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule400 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule401 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule402 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule403 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule404 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule405 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule406 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule407 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule408 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule409 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule410 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule411 _setIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule412 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule413 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule414 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule415 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule416 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule417 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule418 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule419 _setIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule420 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule421 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule422 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule423 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule424 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule425 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule426 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule427 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule428 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule429 _lhsIdefSets+ _setOallFields = rule430 _lhsIallFields+ _setOallNonterminals = rule431 _lhsIallNonterminals+ _setOdefinedSets = rule432 _lhsIdefinedSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule399 #-}+ {-# LINE 796 "./src-ag/Transform.ag" #-}+ rule399 = \ ((_setInontSet) :: Set NontermIdent) ->+ {-# LINE 796 "./src-ag/Transform.ag" #-}+ \o -> o { nocatas = _setInontSet `Set.union` nocatas o }+ {-# LINE 3351 "dist/build/Transform.hs"#-}+ {-# INLINE rule400 #-}+ rule400 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule401 #-}+ rule401 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule402 #-}+ rule402 = \ (_ :: ()) ->+ []+ {-# INLINE rule403 #-}+ rule403 = \ (_ :: ()) ->+ []+ {-# INLINE rule404 #-}+ rule404 = \ (_ :: ()) ->+ []+ {-# INLINE rule405 #-}+ rule405 = \ (_ :: ()) ->+ []+ {-# INLINE rule406 #-}+ rule406 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule407 #-}+ rule407 = \ (_ :: ()) ->+ []+ {-# INLINE rule408 #-}+ rule408 = \ (_ :: ()) ->+ []+ {-# INLINE rule409 #-}+ rule409 = \ (_ :: ()) ->+ []+ {-# INLINE rule410 #-}+ rule410 = \ (_ :: ()) ->+ []+ {-# INLINE rule411 #-}+ rule411 = \ ((_setIcollectedNames) :: Set Identifier) ->+ _setIcollectedNames+ {-# INLINE rule412 #-}+ rule412 = \ (_ :: ()) ->+ []+ {-# INLINE rule413 #-}+ rule413 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule414 #-}+ rule414 = \ (_ :: ()) ->+ []+ {-# INLINE rule415 #-}+ rule415 = \ (_ :: ()) ->+ []+ {-# INLINE rule416 #-}+ rule416 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule417 #-}+ rule417 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule418 #-}+ rule418 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule419 #-}+ rule419 = \ ((_setIerrors) :: Seq Error) ->+ _setIerrors+ {-# INLINE rule420 #-}+ rule420 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule421 #-}+ rule421 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule422 #-}+ rule422 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule423 #-}+ rule423 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule424 #-}+ rule424 = \ (_ :: ()) ->+ []+ {-# INLINE rule425 #-}+ rule425 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule426 #-}+ rule426 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule427 #-}+ rule427 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule428 #-}+ rule428 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule429 #-}+ rule429 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule430 #-}+ rule430 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule431 #-}+ rule431 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule432 #-}+ rule432 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_Elem_Pragma #-}+sem_Elem_Pragma :: (Pos) -> ([NontermIdent]) -> T_Elem +sem_Elem_Pragma _ arg_names_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule433 arg_names_+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule434 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule435 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule436 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule437 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule438 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule439 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule440 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule441 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule442 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule443 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule444 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule445 ()+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule446 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule447 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule448 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule449 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule450 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule451 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule452 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule453 ()+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule454 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule455 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule456 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule457 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule458 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule459 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule460 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule461 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule462 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule463 _lhsIdefSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule433 #-}+ {-# LINE 805 "./src-ag/Transform.ag" #-}+ rule433 = \ names_ ->+ {-# LINE 805 "./src-ag/Transform.ag" #-}+ let mk n o = case getName n of+ "gencatas" -> o { folds = True }+ "nogencatas" -> o { folds = False }+ "gendatas" -> o { dataTypes = True }+ "datarecords" -> o { dataRecords = True }+ "nogendatas" -> o { dataTypes = False }+ "gensems" -> o { semfuns = True }+ "nogensems" -> o { semfuns = False }+ "gentypesigs" -> o { typeSigs = True }+ "nogentypesigs"-> o { typeSigs = False }+ "nocycle" -> o { withCycle = False }+ "cycle" -> o { withCycle = True }+ "nostrictdata" -> o { strictData = False }+ "strictdata" -> o { strictData = True }+ "nostrictcase" -> o { strictCases = False }+ "strictcase" -> o { strictCases = True }+ "strictercase" -> o { strictCases = True, stricterCases = True }+ "nostrictwrap" -> o { strictWrap = False }+ "strictwrap" -> o { strictWrap = True }+ "novisit" -> o { visit = False }+ "visit" -> o { visit = True }+ "nocase" -> o { cases = False }+ "case" -> o { cases = True }+ "noseq" -> o { withSeq = False }+ "seq" -> o { withSeq = True }+ "nounbox" -> o { unbox = False }+ "unbox" -> o { unbox = True }+ "bangpats" -> o { bangpats = True }+ "breadthfirst" -> o { breadthFirst = True }+ "breadthfirstStrict" -> o { breadthFirstStrict = True }+ "nooptimize" -> o { cases = False , visit = False }+ "optimize" -> o { cases = True , visit = True }+ "strictsem" -> o { strictSems = True }+ "gentraces" -> o { genTraces = True }+ "genusetraces" -> o { genUseTraces = True }+ "splitsems" -> o { splitSems = True }+ "gencostcentres" -> o { genCostCentres = True }+ "sepsemmods" -> sepSemModsOpt o+ "genlinepragmas" -> o { genLinePragmas = True }+ "newtypes" -> o { newtypes = True }+ "nonewtypes" -> o { newtypes = False }+ "nooptimizations" -> o { noOptimizations = True }+ "kennedywarren" -> o { kennedyWarren = True }+ "aspectag" -> o { genAspectAG = True }+ 'n':'o':'g':'r':'o':'u':'p':'_':atts+ -> o { noGroup = extract atts ++ noGroup o }+ "rename" -> o { rename = True }+ "parallel" -> o { parallelInvoke = True }+ "monadicwrappers" -> o { monadicWrappers = True }+ "dummytokenvisit" -> o { dummyTokenVisit = True }+ "tupleasdummytoken" -> o { tupleAsDummyToken = True }+ "stateasdummytoken" -> o { tupleAsDummyToken = False }+ "strictdummytoken" -> o { strictDummyToken = True }+ "noperruletypesigs" -> o { noPerRuleTypeSigs = True }+ "noperstatetypesigs" -> o { noPerStateTypeSigs = True }+ "noeagerblackholing" -> o { noEagerBlackholing = True }+ "noperrulecostcentres" -> o { noPerRuleCostCentres = True }+ "nopervisitcostcentres" -> o { noPerVisitCostCentres = True }+ "helpinlining" -> o { helpInlining = True }+ "noinlinepragmas" -> o { noInlinePragmas = True }+ "aggressiveinlinepragmas" -> o { aggressiveInlinePragmas = True }+ "latehigherorderbindings" -> o { lateHigherOrderBinding = True }+ "ocaml" -> ocamlOpt o+ "cleanlang" -> cleanOpt o+ s -> trace ("uuagc: ignoring unknown pragma: " ++ s) o+ in \o -> foldr mk o names_+ {-# LINE 3593 "dist/build/Transform.hs"#-}+ {-# INLINE rule434 #-}+ rule434 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule435 #-}+ rule435 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule436 #-}+ rule436 = \ (_ :: ()) ->+ []+ {-# INLINE rule437 #-}+ rule437 = \ (_ :: ()) ->+ []+ {-# INLINE rule438 #-}+ rule438 = \ (_ :: ()) ->+ []+ {-# INLINE rule439 #-}+ rule439 = \ (_ :: ()) ->+ []+ {-# INLINE rule440 #-}+ rule440 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule441 #-}+ rule441 = \ (_ :: ()) ->+ []+ {-# INLINE rule442 #-}+ rule442 = \ (_ :: ()) ->+ []+ {-# INLINE rule443 #-}+ rule443 = \ (_ :: ()) ->+ []+ {-# INLINE rule444 #-}+ rule444 = \ (_ :: ()) ->+ []+ {-# INLINE rule445 #-}+ rule445 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule446 #-}+ rule446 = \ (_ :: ()) ->+ []+ {-# INLINE rule447 #-}+ rule447 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule448 #-}+ rule448 = \ (_ :: ()) ->+ []+ {-# INLINE rule449 #-}+ rule449 = \ (_ :: ()) ->+ []+ {-# INLINE rule450 #-}+ rule450 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule451 #-}+ rule451 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule452 #-}+ rule452 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule453 #-}+ rule453 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule454 #-}+ rule454 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule455 #-}+ rule455 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule456 #-}+ rule456 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule457 #-}+ rule457 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule458 #-}+ rule458 = \ (_ :: ()) ->+ []+ {-# INLINE rule459 #-}+ rule459 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule460 #-}+ rule460 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule461 #-}+ rule461 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule462 #-}+ rule462 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule463 #-}+ rule463 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+{-# NOINLINE sem_Elem_Module #-}+sem_Elem_Module :: (Pos) -> (String) -> (String) -> (String) -> T_Elem +sem_Elem_Module _ arg_name_ arg_exports_ arg_imports_ = T_Elem (return st17) where+ {-# NOINLINE st17 #-}+ st17 = let+ v16 :: T_Elem_v16 + v16 = \ (T_Elem_vIn16 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule464 arg_exports_ arg_imports_ arg_name_+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule465 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule466 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule467 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule468 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule469 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule470 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule471 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule472 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule473 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule474 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule475 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule476 ()+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule477 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule478 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule479 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule480 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule481 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule482 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule483 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule484 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule485 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule486 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule487 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule488 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule489 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule490 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule491 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule492 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule493 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule494 _lhsIdefSets+ __result_ = T_Elem_vOut16 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elem_s17 v16+ {-# INLINE rule464 #-}+ {-# LINE 1214 "./src-ag/Transform.ag" #-}+ rule464 = \ exports_ imports_ name_ ->+ {-# LINE 1214 "./src-ag/Transform.ag" #-}+ Just (name_, exports_, imports_)+ {-# LINE 3761 "dist/build/Transform.hs"#-}+ {-# INLINE rule465 #-}+ rule465 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule466 #-}+ rule466 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule467 #-}+ rule467 = \ (_ :: ()) ->+ []+ {-# INLINE rule468 #-}+ rule468 = \ (_ :: ()) ->+ []+ {-# INLINE rule469 #-}+ rule469 = \ (_ :: ()) ->+ []+ {-# INLINE rule470 #-}+ rule470 = \ (_ :: ()) ->+ []+ {-# INLINE rule471 #-}+ rule471 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule472 #-}+ rule472 = \ (_ :: ()) ->+ []+ {-# INLINE rule473 #-}+ rule473 = \ (_ :: ()) ->+ []+ {-# INLINE rule474 #-}+ rule474 = \ (_ :: ()) ->+ []+ {-# INLINE rule475 #-}+ rule475 = \ (_ :: ()) ->+ []+ {-# INLINE rule476 #-}+ rule476 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule477 #-}+ rule477 = \ (_ :: ()) ->+ []+ {-# INLINE rule478 #-}+ rule478 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule479 #-}+ rule479 = \ (_ :: ()) ->+ []+ {-# INLINE rule480 #-}+ rule480 = \ (_ :: ()) ->+ []+ {-# INLINE rule481 #-}+ rule481 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule482 #-}+ rule482 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule483 #-}+ rule483 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule484 #-}+ rule484 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule485 #-}+ rule485 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule486 #-}+ rule486 = \ (_ :: ()) ->+ id+ {-# INLINE rule487 #-}+ rule487 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule488 #-}+ rule488 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule489 #-}+ rule489 = \ (_ :: ()) ->+ []+ {-# INLINE rule490 #-}+ rule490 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule491 #-}+ rule491 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule492 #-}+ rule492 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule493 #-}+ rule493 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule494 #-}+ rule494 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets++-- Elems -------------------------------------------------------+-- wrapper+data Inh_Elems = Inh_Elems { allAttrDecls_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), allConstructors_Inh_Elems :: (Map NontermIdent (Set ConstructorIdent)), allFields_Inh_Elems :: (DataTypes), allNonterminals_Inh_Elems :: (Set NontermIdent), attrDecls_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), attrs_Inh_Elems :: (Map NontermIdent (Attributes, Attributes)), defSets_Inh_Elems :: (Map Identifier (Set NontermIdent,Set Identifier)), definedSets_Inh_Elems :: (DefinedSets), options_Inh_Elems :: (Options) }+data Syn_Elems = Syn_Elems { attrDecls_Syn_Elems :: (Map NontermIdent (Attributes, Attributes)), attrOrderCollect_Syn_Elems :: (AttrOrderMap), attrs_Syn_Elems :: (Map NontermIdent (Attributes, Attributes)), blocks_Syn_Elems :: (Blocks), collectedArounds_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedConParams_Syn_Elems :: ([(NontermIdent, ConstructorIdent, Set Identifier)]), collectedConstraints_Syn_Elems :: ([(NontermIdent, ConstructorIdent, [Type])]), collectedConstructorsMap_Syn_Elems :: (Map NontermIdent (Set ConstructorIdent)), collectedFields_Syn_Elems :: ([(NontermIdent, ConstructorIdent, FieldMap)]), collectedInsts_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMacros_Syn_Elems :: ([(NontermIdent, ConstructorIdent, MaybeMacro)]), collectedMerges_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedNames_Syn_Elems :: (Set Identifier), collectedRules_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSetNames_Syn_Elems :: (Set Identifier), collectedSigs_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_Elems :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), constructorTypeMap_Syn_Elems :: (Map NontermIdent ConstructorType), ctxCollect_Syn_Elems :: (ContextMap), defSets_Syn_Elems :: (Map Identifier (Set NontermIdent,Set Identifier)), derivings_Syn_Elems :: (Derivings), errors_Syn_Elems :: (Seq Error), moduleDecl_Syn_Elems :: (Maybe (String,String,String)), paramsCollect_Syn_Elems :: (ParamMap), pragmas_Syn_Elems :: (Options -> Options), quantCollect_Syn_Elems :: (QuantMap), semPragmasCollect_Syn_Elems :: (PragmaMap), typeSyns_Syn_Elems :: (TypeSyns), useMap_Syn_Elems :: (Map NontermIdent (Map Identifier (String,String,String))), wrappers_Syn_Elems :: (Set NontermIdent) }+{-# INLINABLE wrap_Elems #-}+wrap_Elems :: T_Elems -> Inh_Elems -> (Syn_Elems )+wrap_Elems (T_Elems act) (Inh_Elems _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Elems_vIn19 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions+ (T_Elems_vOut19 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers) <- return (inv_Elems_s20 sem arg)+ return (Syn_Elems _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers)+ )++-- cata+{-# NOINLINE sem_Elems #-}+sem_Elems :: Elems -> T_Elems +sem_Elems list = Prelude.foldr sem_Elems_Cons sem_Elems_Nil (Prelude.map sem_Elem list)++-- semantic domain+newtype T_Elems = T_Elems {+ attach_T_Elems :: Identity (T_Elems_s20 )+ }+newtype T_Elems_s20 = C_Elems_s20 {+ inv_Elems_s20 :: (T_Elems_v19 )+ }+data T_Elems_s21 = C_Elems_s21+type T_Elems_v19 = (T_Elems_vIn19 ) -> (T_Elems_vOut19 )+data T_Elems_vIn19 = T_Elems_vIn19 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Set ConstructorIdent)) (DataTypes) (Set NontermIdent) (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (Map Identifier (Set NontermIdent,Set Identifier)) (DefinedSets) (Options)+data T_Elems_vOut19 = T_Elems_vOut19 (Map NontermIdent (Attributes, Attributes)) (AttrOrderMap) (Map NontermIdent (Attributes, Attributes)) (Blocks) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([(NontermIdent, ConstructorIdent, Set Identifier)]) ([(NontermIdent, ConstructorIdent, [Type])]) (Map NontermIdent (Set ConstructorIdent)) ([(NontermIdent, ConstructorIdent, FieldMap)]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([(NontermIdent, ConstructorIdent, MaybeMacro)]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) (Set Identifier) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Map NontermIdent ConstructorType) (ContextMap) (Map Identifier (Set NontermIdent,Set Identifier)) (Derivings) (Seq Error) (Maybe (String,String,String)) (ParamMap) (Options -> Options) (QuantMap) (PragmaMap) (TypeSyns) (Map NontermIdent (Map Identifier (String,String,String))) (Set NontermIdent)+{-# NOINLINE sem_Elems_Cons #-}+sem_Elems_Cons :: T_Elem -> T_Elems -> T_Elems +sem_Elems_Cons arg_hd_ arg_tl_ = T_Elems (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Elems_v19 + v19 = \ (T_Elems_vIn19 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _hdX17 = Control.Monad.Identity.runIdentity (attach_T_Elem (arg_hd_))+ _tlX20 = Control.Monad.Identity.runIdentity (attach_T_Elems (arg_tl_))+ (T_Elem_vOut16 _hdIattrDecls _hdIattrOrderCollect _hdIattrs _hdIblocks _hdIcollectedArounds _hdIcollectedAugments _hdIcollectedConParams _hdIcollectedConstraints _hdIcollectedConstructorsMap _hdIcollectedFields _hdIcollectedInsts _hdIcollectedMacros _hdIcollectedMerges _hdIcollectedNames _hdIcollectedRules _hdIcollectedSetNames _hdIcollectedSigs _hdIcollectedUniques _hdIconstructorTypeMap _hdIctxCollect _hdIdefSets _hdIderivings _hdIerrors _hdImoduleDecl _hdIparamsCollect _hdIpragmas _hdIquantCollect _hdIsemPragmasCollect _hdItypeSyns _hdIuseMap _hdIwrappers) = inv_Elem_s17 _hdX17 (T_Elem_vIn16 _hdOallAttrDecls _hdOallAttrs _hdOallConstructors _hdOallFields _hdOallNonterminals _hdOattrDecls _hdOattrs _hdOdefSets _hdOdefinedSets _hdOoptions)+ (T_Elems_vOut19 _tlIattrDecls _tlIattrOrderCollect _tlIattrs _tlIblocks _tlIcollectedArounds _tlIcollectedAugments _tlIcollectedConParams _tlIcollectedConstraints _tlIcollectedConstructorsMap _tlIcollectedFields _tlIcollectedInsts _tlIcollectedMacros _tlIcollectedMerges _tlIcollectedNames _tlIcollectedRules _tlIcollectedSetNames _tlIcollectedSigs _tlIcollectedUniques _tlIconstructorTypeMap _tlIctxCollect _tlIdefSets _tlIderivings _tlIerrors _tlImoduleDecl _tlIparamsCollect _tlIpragmas _tlIquantCollect _tlIsemPragmasCollect _tlItypeSyns _tlIuseMap _tlIwrappers) = inv_Elems_s20 _tlX20 (T_Elems_vIn19 _tlOallAttrDecls _tlOallAttrs _tlOallConstructors _tlOallFields _tlOallNonterminals _tlOattrDecls _tlOattrs _tlOdefSets _tlOdefinedSets _tlOoptions)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule495 _hdIattrOrderCollect _tlIattrOrderCollect+ _lhsOblocks :: Blocks+ _lhsOblocks = rule496 _hdIblocks _tlIblocks+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule497 _hdIcollectedArounds _tlIcollectedArounds+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule498 _hdIcollectedAugments _tlIcollectedAugments+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule499 _hdIcollectedConParams _tlIcollectedConParams+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule500 _hdIcollectedConstraints _tlIcollectedConstraints+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule501 _hdIcollectedConstructorsMap _tlIcollectedConstructorsMap+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule502 _hdIcollectedFields _tlIcollectedFields+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule503 _hdIcollectedInsts _tlIcollectedInsts+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule504 _hdIcollectedMacros _tlIcollectedMacros+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule505 _hdIcollectedMerges _tlIcollectedMerges+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule506 _hdIcollectedNames _tlIcollectedNames+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule507 _hdIcollectedRules _tlIcollectedRules+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule508 _hdIcollectedSetNames _tlIcollectedSetNames+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule509 _hdIcollectedSigs _tlIcollectedSigs+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule510 _hdIcollectedUniques _tlIcollectedUniques+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule511 _hdIconstructorTypeMap _tlIconstructorTypeMap+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule512 _hdIctxCollect _tlIctxCollect+ _lhsOderivings :: Derivings+ _lhsOderivings = rule513 _hdIderivings _tlIderivings+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule514 _hdIerrors _tlIerrors+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule515 _hdImoduleDecl _tlImoduleDecl+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule516 _hdIparamsCollect _tlIparamsCollect+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule517 _hdIpragmas _tlIpragmas+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule518 _hdIquantCollect _tlIquantCollect+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule519 _hdIsemPragmasCollect _tlIsemPragmasCollect+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule520 _hdItypeSyns _tlItypeSyns+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule521 _hdIuseMap _tlIuseMap+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule522 _hdIwrappers _tlIwrappers+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule523 _tlIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule524 _tlIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule525 _tlIdefSets+ _hdOallAttrDecls = rule526 _lhsIallAttrDecls+ _hdOallAttrs = rule527 _lhsIallAttrs+ _hdOallConstructors = rule528 _lhsIallConstructors+ _hdOallFields = rule529 _lhsIallFields+ _hdOallNonterminals = rule530 _lhsIallNonterminals+ _hdOattrDecls = rule531 _lhsIattrDecls+ _hdOattrs = rule532 _lhsIattrs+ _hdOdefSets = rule533 _lhsIdefSets+ _hdOdefinedSets = rule534 _lhsIdefinedSets+ _hdOoptions = rule535 _lhsIoptions+ _tlOallAttrDecls = rule536 _lhsIallAttrDecls+ _tlOallAttrs = rule537 _lhsIallAttrs+ _tlOallConstructors = rule538 _lhsIallConstructors+ _tlOallFields = rule539 _lhsIallFields+ _tlOallNonterminals = rule540 _lhsIallNonterminals+ _tlOattrDecls = rule541 _hdIattrDecls+ _tlOattrs = rule542 _hdIattrs+ _tlOdefSets = rule543 _hdIdefSets+ _tlOdefinedSets = rule544 _lhsIdefinedSets+ _tlOoptions = rule545 _lhsIoptions+ __result_ = T_Elems_vOut19 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elems_s20 v19+ {-# INLINE rule495 #-}+ rule495 = \ ((_hdIattrOrderCollect) :: AttrOrderMap) ((_tlIattrOrderCollect) :: AttrOrderMap) ->+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# INLINE rule496 #-}+ rule496 = \ ((_hdIblocks) :: Blocks) ((_tlIblocks) :: Blocks) ->+ _hdIblocks `mapUnionWithPlusPlus` _tlIblocks+ {-# INLINE rule497 #-}+ rule497 = \ ((_hdIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ((_tlIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# INLINE rule498 #-}+ rule498 = \ ((_hdIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ((_tlIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# INLINE rule499 #-}+ rule499 = \ ((_hdIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ((_tlIcollectedConParams) :: [(NontermIdent, ConstructorIdent, Set Identifier)]) ->+ _hdIcollectedConParams ++ _tlIcollectedConParams+ {-# INLINE rule500 #-}+ rule500 = \ ((_hdIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ((_tlIcollectedConstraints) :: [(NontermIdent, ConstructorIdent, [Type])]) ->+ _hdIcollectedConstraints ++ _tlIcollectedConstraints+ {-# INLINE rule501 #-}+ rule501 = \ ((_hdIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ((_tlIcollectedConstructorsMap) :: Map NontermIdent (Set ConstructorIdent)) ->+ _hdIcollectedConstructorsMap `mapUnionWithSetUnion` _tlIcollectedConstructorsMap+ {-# INLINE rule502 #-}+ rule502 = \ ((_hdIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ((_tlIcollectedFields) :: [(NontermIdent, ConstructorIdent, FieldMap)]) ->+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# INLINE rule503 #-}+ rule503 = \ ((_hdIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ((_tlIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# INLINE rule504 #-}+ rule504 = \ ((_hdIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ((_tlIcollectedMacros) :: [(NontermIdent, ConstructorIdent, MaybeMacro)]) ->+ _hdIcollectedMacros ++ _tlIcollectedMacros+ {-# INLINE rule505 #-}+ rule505 = \ ((_hdIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ((_tlIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->+ _hdIcollectedMerges ++ _tlIcollectedMerges+ {-# INLINE rule506 #-}+ rule506 = \ ((_hdIcollectedNames) :: Set Identifier) ((_tlIcollectedNames) :: Set Identifier) ->+ _hdIcollectedNames `Set.union` _tlIcollectedNames+ {-# INLINE rule507 #-}+ rule507 = \ ((_hdIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ((_tlIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# INLINE rule508 #-}+ rule508 = \ ((_hdIcollectedSetNames) :: Set Identifier) ((_tlIcollectedSetNames) :: Set Identifier) ->+ _hdIcollectedSetNames `Set.union` _tlIcollectedSetNames+ {-# INLINE rule509 #-}+ rule509 = \ ((_hdIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_tlIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# INLINE rule510 #-}+ rule510 = \ ((_hdIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ((_tlIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# INLINE rule511 #-}+ rule511 = \ ((_hdIconstructorTypeMap) :: Map NontermIdent ConstructorType) ((_tlIconstructorTypeMap) :: Map NontermIdent ConstructorType) ->+ _hdIconstructorTypeMap `Map.union` _tlIconstructorTypeMap+ {-# INLINE rule512 #-}+ rule512 = \ ((_hdIctxCollect) :: ContextMap) ((_tlIctxCollect) :: ContextMap) ->+ _hdIctxCollect `mergeCtx` _tlIctxCollect+ {-# INLINE rule513 #-}+ rule513 = \ ((_hdIderivings) :: Derivings) ((_tlIderivings) :: Derivings) ->+ _hdIderivings `mergeDerivings` _tlIderivings+ {-# INLINE rule514 #-}+ rule514 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule515 #-}+ rule515 = \ ((_hdImoduleDecl) :: Maybe (String,String,String)) ((_tlImoduleDecl) :: Maybe (String,String,String)) ->+ _hdImoduleDecl `flipmplus` _tlImoduleDecl+ {-# INLINE rule516 #-}+ rule516 = \ ((_hdIparamsCollect) :: ParamMap) ((_tlIparamsCollect) :: ParamMap) ->+ _hdIparamsCollect `mergeParams` _tlIparamsCollect+ {-# INLINE rule517 #-}+ rule517 = \ ((_hdIpragmas) :: Options -> Options) ((_tlIpragmas) :: Options -> Options) ->+ _hdIpragmas . _tlIpragmas+ {-# INLINE rule518 #-}+ rule518 = \ ((_hdIquantCollect) :: QuantMap) ((_tlIquantCollect) :: QuantMap) ->+ _hdIquantCollect `mergeQuant` _tlIquantCollect+ {-# INLINE rule519 #-}+ rule519 = \ ((_hdIsemPragmasCollect) :: PragmaMap) ((_tlIsemPragmasCollect) :: PragmaMap) ->+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# INLINE rule520 #-}+ rule520 = \ ((_hdItypeSyns) :: TypeSyns) ((_tlItypeSyns) :: TypeSyns) ->+ _hdItypeSyns ++ _tlItypeSyns+ {-# INLINE rule521 #-}+ rule521 = \ ((_hdIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ((_tlIuseMap) :: Map NontermIdent (Map Identifier (String,String,String))) ->+ _hdIuseMap `merge` _tlIuseMap+ {-# INLINE rule522 #-}+ rule522 = \ ((_hdIwrappers) :: Set NontermIdent) ((_tlIwrappers) :: Set NontermIdent) ->+ _hdIwrappers `Set.union` _tlIwrappers+ {-# INLINE rule523 #-}+ rule523 = \ ((_tlIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _tlIattrDecls+ {-# INLINE rule524 #-}+ rule524 = \ ((_tlIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _tlIattrs+ {-# INLINE rule525 #-}+ rule525 = \ ((_tlIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _tlIdefSets+ {-# INLINE rule526 #-}+ rule526 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrDecls+ {-# INLINE rule527 #-}+ rule527 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrs+ {-# INLINE rule528 #-}+ rule528 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->+ _lhsIallConstructors+ {-# INLINE rule529 #-}+ rule529 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule530 #-}+ rule530 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule531 #-}+ rule531 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule532 #-}+ rule532 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule533 #-}+ rule533 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets+ {-# INLINE rule534 #-}+ rule534 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule535 #-}+ rule535 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule536 #-}+ rule536 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrDecls+ {-# INLINE rule537 #-}+ rule537 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrs+ {-# INLINE rule538 #-}+ rule538 = \ ((_lhsIallConstructors) :: Map NontermIdent (Set ConstructorIdent)) ->+ _lhsIallConstructors+ {-# INLINE rule539 #-}+ rule539 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule540 #-}+ rule540 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule541 #-}+ rule541 = \ ((_hdIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _hdIattrDecls+ {-# INLINE rule542 #-}+ rule542 = \ ((_hdIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _hdIattrs+ {-# INLINE rule543 #-}+ rule543 = \ ((_hdIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _hdIdefSets+ {-# INLINE rule544 #-}+ rule544 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule545 #-}+ rule545 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_Elems_Nil #-}+sem_Elems_Nil :: T_Elems +sem_Elems_Nil = T_Elems (return st20) where+ {-# NOINLINE st20 #-}+ st20 = let+ v19 :: T_Elems_v19 + v19 = \ (T_Elems_vIn19 _lhsIallAttrDecls _lhsIallAttrs _lhsIallConstructors _lhsIallFields _lhsIallNonterminals _lhsIattrDecls _lhsIattrs _lhsIdefSets _lhsIdefinedSets _lhsIoptions) -> ( let+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule546 ()+ _lhsOblocks :: Blocks+ _lhsOblocks = rule547 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule548 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule549 ()+ _lhsOcollectedConParams :: [(NontermIdent, ConstructorIdent, Set Identifier)]+ _lhsOcollectedConParams = rule550 ()+ _lhsOcollectedConstraints :: [(NontermIdent, ConstructorIdent, [Type])]+ _lhsOcollectedConstraints = rule551 ()+ _lhsOcollectedConstructorsMap :: Map NontermIdent (Set ConstructorIdent)+ _lhsOcollectedConstructorsMap = rule552 ()+ _lhsOcollectedFields :: [(NontermIdent, ConstructorIdent, FieldMap)]+ _lhsOcollectedFields = rule553 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule554 ()+ _lhsOcollectedMacros :: [(NontermIdent, ConstructorIdent, MaybeMacro)]+ _lhsOcollectedMacros = rule555 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule556 ()+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule557 ()+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule558 ()+ _lhsOcollectedSetNames :: Set Identifier+ _lhsOcollectedSetNames = rule559 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule560 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule561 ()+ _lhsOconstructorTypeMap :: Map NontermIdent ConstructorType+ _lhsOconstructorTypeMap = rule562 ()+ _lhsOctxCollect :: ContextMap+ _lhsOctxCollect = rule563 ()+ _lhsOderivings :: Derivings+ _lhsOderivings = rule564 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule565 ()+ _lhsOmoduleDecl :: Maybe (String,String,String)+ _lhsOmoduleDecl = rule566 ()+ _lhsOparamsCollect :: ParamMap+ _lhsOparamsCollect = rule567 ()+ _lhsOpragmas :: Options -> Options+ _lhsOpragmas = rule568 ()+ _lhsOquantCollect :: QuantMap+ _lhsOquantCollect = rule569 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule570 ()+ _lhsOtypeSyns :: TypeSyns+ _lhsOtypeSyns = rule571 ()+ _lhsOuseMap :: Map NontermIdent (Map Identifier (String,String,String))+ _lhsOuseMap = rule572 ()+ _lhsOwrappers :: Set NontermIdent+ _lhsOwrappers = rule573 ()+ _lhsOattrDecls :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrDecls = rule574 _lhsIattrDecls+ _lhsOattrs :: Map NontermIdent (Attributes, Attributes)+ _lhsOattrs = rule575 _lhsIattrs+ _lhsOdefSets :: Map Identifier (Set NontermIdent,Set Identifier)+ _lhsOdefSets = rule576 _lhsIdefSets+ __result_ = T_Elems_vOut19 _lhsOattrDecls _lhsOattrOrderCollect _lhsOattrs _lhsOblocks _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedConParams _lhsOcollectedConstraints _lhsOcollectedConstructorsMap _lhsOcollectedFields _lhsOcollectedInsts _lhsOcollectedMacros _lhsOcollectedMerges _lhsOcollectedNames _lhsOcollectedRules _lhsOcollectedSetNames _lhsOcollectedSigs _lhsOcollectedUniques _lhsOconstructorTypeMap _lhsOctxCollect _lhsOdefSets _lhsOderivings _lhsOerrors _lhsOmoduleDecl _lhsOparamsCollect _lhsOpragmas _lhsOquantCollect _lhsOsemPragmasCollect _lhsOtypeSyns _lhsOuseMap _lhsOwrappers+ in __result_ )+ in C_Elems_s20 v19+ {-# INLINE rule546 #-}+ rule546 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule547 #-}+ rule547 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule548 #-}+ rule548 = \ (_ :: ()) ->+ []+ {-# INLINE rule549 #-}+ rule549 = \ (_ :: ()) ->+ []+ {-# INLINE rule550 #-}+ rule550 = \ (_ :: ()) ->+ []+ {-# INLINE rule551 #-}+ rule551 = \ (_ :: ()) ->+ []+ {-# INLINE rule552 #-}+ rule552 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule553 #-}+ rule553 = \ (_ :: ()) ->+ []+ {-# INLINE rule554 #-}+ rule554 = \ (_ :: ()) ->+ []+ {-# INLINE rule555 #-}+ rule555 = \ (_ :: ()) ->+ []+ {-# INLINE rule556 #-}+ rule556 = \ (_ :: ()) ->+ []+ {-# INLINE rule557 #-}+ rule557 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule558 #-}+ rule558 = \ (_ :: ()) ->+ []+ {-# INLINE rule559 #-}+ rule559 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule560 #-}+ rule560 = \ (_ :: ()) ->+ []+ {-# INLINE rule561 #-}+ rule561 = \ (_ :: ()) ->+ []+ {-# INLINE rule562 #-}+ rule562 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule563 #-}+ rule563 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule564 #-}+ rule564 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule565 #-}+ rule565 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule566 #-}+ rule566 = \ (_ :: ()) ->+ mzero+ {-# INLINE rule567 #-}+ rule567 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule568 #-}+ rule568 = \ (_ :: ()) ->+ id+ {-# INLINE rule569 #-}+ rule569 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule570 #-}+ rule570 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule571 #-}+ rule571 = \ (_ :: ()) ->+ []+ {-# INLINE rule572 #-}+ rule572 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule573 #-}+ rule573 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule574 #-}+ rule574 = \ ((_lhsIattrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrDecls+ {-# INLINE rule575 #-}+ rule575 = \ ((_lhsIattrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIattrs+ {-# INLINE rule576 #-}+ rule576 = \ ((_lhsIdefSets) :: Map Identifier (Set NontermIdent,Set Identifier)) ->+ _lhsIdefSets++-- Field -------------------------------------------------------+-- wrapper+data Inh_Field = Inh_Field { allNonterminals_Inh_Field :: (Set NontermIdent) }+data Syn_Field = Syn_Field { collectedConstraints_Syn_Field :: ([Type]), collectedFields_Syn_Field :: ([(Identifier, Type)]) }+{-# INLINABLE wrap_Field #-}+wrap_Field :: T_Field -> Inh_Field -> (Syn_Field )+wrap_Field (T_Field act) (Inh_Field _lhsIallNonterminals) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Field_vIn22 _lhsIallNonterminals+ (T_Field_vOut22 _lhsOcollectedConstraints _lhsOcollectedFields) <- return (inv_Field_s23 sem arg)+ return (Syn_Field _lhsOcollectedConstraints _lhsOcollectedFields)+ )++-- cata+{-# NOINLINE sem_Field #-}+sem_Field :: Field -> T_Field +sem_Field ( FChild name_ tp_ ) = sem_Field_FChild name_ tp_+sem_Field ( FCtx tps_ ) = sem_Field_FCtx tps_++-- semantic domain+newtype T_Field = T_Field {+ attach_T_Field :: Identity (T_Field_s23 )+ }+newtype T_Field_s23 = C_Field_s23 {+ inv_Field_s23 :: (T_Field_v22 )+ }+data T_Field_s24 = C_Field_s24+type T_Field_v22 = (T_Field_vIn22 ) -> (T_Field_vOut22 )+data T_Field_vIn22 = T_Field_vIn22 (Set NontermIdent)+data T_Field_vOut22 = T_Field_vOut22 ([Type]) ([(Identifier, Type)])+{-# NOINLINE sem_Field_FChild #-}+sem_Field_FChild :: (Identifier) -> (Type) -> T_Field +sem_Field_FChild arg_name_ arg_tp_ = T_Field (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_Field_v22 + v22 = \ (T_Field_vIn22 _lhsIallNonterminals) -> ( let+ _lhsOcollectedFields :: [(Identifier, Type)]+ _lhsOcollectedFields = rule577 _lhsIallNonterminals arg_name_ arg_tp_+ _lhsOcollectedConstraints :: [Type]+ _lhsOcollectedConstraints = rule578 ()+ __result_ = T_Field_vOut22 _lhsOcollectedConstraints _lhsOcollectedFields+ in __result_ )+ in C_Field_s23 v22+ {-# INLINE rule577 #-}+ {-# LINE 579 "./src-ag/Transform.ag" #-}+ rule577 = \ ((_lhsIallNonterminals) :: Set NontermIdent) name_ tp_ ->+ {-# LINE 579 "./src-ag/Transform.ag" #-}+ [(name_, makeType _lhsIallNonterminals tp_)]+ {-# LINE 4348 "dist/build/Transform.hs"#-}+ {-# INLINE rule578 #-}+ rule578 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_Field_FCtx #-}+sem_Field_FCtx :: ([Type]) -> T_Field +sem_Field_FCtx arg_tps_ = T_Field (return st23) where+ {-# NOINLINE st23 #-}+ st23 = let+ v22 :: T_Field_v22 + v22 = \ (T_Field_vIn22 _lhsIallNonterminals) -> ( let+ _lhsOcollectedConstraints :: [Type]+ _lhsOcollectedConstraints = rule579 arg_tps_+ _lhsOcollectedFields :: [(Identifier, Type)]+ _lhsOcollectedFields = rule580 ()+ __result_ = T_Field_vOut22 _lhsOcollectedConstraints _lhsOcollectedFields+ in __result_ )+ in C_Field_s23 v22+ {-# INLINE rule579 #-}+ {-# LINE 588 "./src-ag/Transform.ag" #-}+ rule579 = \ tps_ ->+ {-# LINE 588 "./src-ag/Transform.ag" #-}+ tps_+ {-# LINE 4371 "dist/build/Transform.hs"#-}+ {-# INLINE rule580 #-}+ rule580 = \ (_ :: ()) ->+ []++-- Fields ------------------------------------------------------+-- wrapper+data Inh_Fields = Inh_Fields { allNonterminals_Inh_Fields :: (Set NontermIdent) }+data Syn_Fields = Syn_Fields { collectedConstraints_Syn_Fields :: ([Type]), collectedFields_Syn_Fields :: ([(Identifier, Type)]) }+{-# INLINABLE wrap_Fields #-}+wrap_Fields :: T_Fields -> Inh_Fields -> (Syn_Fields )+wrap_Fields (T_Fields act) (Inh_Fields _lhsIallNonterminals) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Fields_vIn25 _lhsIallNonterminals+ (T_Fields_vOut25 _lhsOcollectedConstraints _lhsOcollectedFields) <- return (inv_Fields_s26 sem arg)+ return (Syn_Fields _lhsOcollectedConstraints _lhsOcollectedFields)+ )++-- cata+{-# NOINLINE sem_Fields #-}+sem_Fields :: Fields -> T_Fields +sem_Fields list = Prelude.foldr sem_Fields_Cons sem_Fields_Nil (Prelude.map sem_Field list)++-- semantic domain+newtype T_Fields = T_Fields {+ attach_T_Fields :: Identity (T_Fields_s26 )+ }+newtype T_Fields_s26 = C_Fields_s26 {+ inv_Fields_s26 :: (T_Fields_v25 )+ }+data T_Fields_s27 = C_Fields_s27+type T_Fields_v25 = (T_Fields_vIn25 ) -> (T_Fields_vOut25 )+data T_Fields_vIn25 = T_Fields_vIn25 (Set NontermIdent)+data T_Fields_vOut25 = T_Fields_vOut25 ([Type]) ([(Identifier, Type)])+{-# NOINLINE sem_Fields_Cons #-}+sem_Fields_Cons :: T_Field -> T_Fields -> T_Fields +sem_Fields_Cons arg_hd_ arg_tl_ = T_Fields (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_Fields_v25 + v25 = \ (T_Fields_vIn25 _lhsIallNonterminals) -> ( let+ _hdX23 = Control.Monad.Identity.runIdentity (attach_T_Field (arg_hd_))+ _tlX26 = Control.Monad.Identity.runIdentity (attach_T_Fields (arg_tl_))+ (T_Field_vOut22 _hdIcollectedConstraints _hdIcollectedFields) = inv_Field_s23 _hdX23 (T_Field_vIn22 _hdOallNonterminals)+ (T_Fields_vOut25 _tlIcollectedConstraints _tlIcollectedFields) = inv_Fields_s26 _tlX26 (T_Fields_vIn25 _tlOallNonterminals)+ _lhsOcollectedConstraints :: [Type]+ _lhsOcollectedConstraints = rule581 _hdIcollectedConstraints _tlIcollectedConstraints+ _lhsOcollectedFields :: [(Identifier, Type)]+ _lhsOcollectedFields = rule582 _hdIcollectedFields _tlIcollectedFields+ _hdOallNonterminals = rule583 _lhsIallNonterminals+ _tlOallNonterminals = rule584 _lhsIallNonterminals+ __result_ = T_Fields_vOut25 _lhsOcollectedConstraints _lhsOcollectedFields+ in __result_ )+ in C_Fields_s26 v25+ {-# INLINE rule581 #-}+ rule581 = \ ((_hdIcollectedConstraints) :: [Type]) ((_tlIcollectedConstraints) :: [Type]) ->+ _hdIcollectedConstraints ++ _tlIcollectedConstraints+ {-# INLINE rule582 #-}+ rule582 = \ ((_hdIcollectedFields) :: [(Identifier, Type)]) ((_tlIcollectedFields) :: [(Identifier, Type)]) ->+ _hdIcollectedFields ++ _tlIcollectedFields+ {-# INLINE rule583 #-}+ rule583 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule584 #-}+ rule584 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+{-# NOINLINE sem_Fields_Nil #-}+sem_Fields_Nil :: T_Fields +sem_Fields_Nil = T_Fields (return st26) where+ {-# NOINLINE st26 #-}+ st26 = let+ v25 :: T_Fields_v25 + v25 = \ (T_Fields_vIn25 _lhsIallNonterminals) -> ( let+ _lhsOcollectedConstraints :: [Type]+ _lhsOcollectedConstraints = rule585 ()+ _lhsOcollectedFields :: [(Identifier, Type)]+ _lhsOcollectedFields = rule586 ()+ __result_ = T_Fields_vOut25 _lhsOcollectedConstraints _lhsOcollectedFields+ in __result_ )+ in C_Fields_s26 v25+ {-# INLINE rule585 #-}+ rule585 = \ (_ :: ()) ->+ []+ {-# INLINE rule586 #-}+ rule586 = \ (_ :: ()) ->+ []++-- NontSet -----------------------------------------------------+-- wrapper+data Inh_NontSet = Inh_NontSet { allFields_Inh_NontSet :: (DataTypes), allNonterminals_Inh_NontSet :: (Set NontermIdent), definedSets_Inh_NontSet :: (DefinedSets) }+data Syn_NontSet = Syn_NontSet { collectedNames_Syn_NontSet :: (Set Identifier), errors_Syn_NontSet :: (Seq Error), nontSet_Syn_NontSet :: (Set NontermIdent) }+{-# INLINABLE wrap_NontSet #-}+wrap_NontSet :: T_NontSet -> Inh_NontSet -> (Syn_NontSet )+wrap_NontSet (T_NontSet act) (Inh_NontSet _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets+ (T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet) <- return (inv_NontSet_s29 sem arg)+ return (Syn_NontSet _lhsOcollectedNames _lhsOerrors _lhsOnontSet)+ )++-- cata+{-# NOINLINE sem_NontSet #-}+sem_NontSet :: NontSet -> T_NontSet +sem_NontSet ( NamedSet name_ ) = sem_NontSet_NamedSet name_+sem_NontSet ( All ) = sem_NontSet_All +sem_NontSet ( Union set1_ set2_ ) = sem_NontSet_Union ( sem_NontSet set1_ ) ( sem_NontSet set2_ )+sem_NontSet ( Intersect set1_ set2_ ) = sem_NontSet_Intersect ( sem_NontSet set1_ ) ( sem_NontSet set2_ )+sem_NontSet ( Difference set1_ set2_ ) = sem_NontSet_Difference ( sem_NontSet set1_ ) ( sem_NontSet set2_ )+sem_NontSet ( Path from_ to_ ) = sem_NontSet_Path from_ to_++-- semantic domain+newtype T_NontSet = T_NontSet {+ attach_T_NontSet :: Identity (T_NontSet_s29 )+ }+newtype T_NontSet_s29 = C_NontSet_s29 {+ inv_NontSet_s29 :: (T_NontSet_v28 )+ }+data T_NontSet_s30 = C_NontSet_s30+type T_NontSet_v28 = (T_NontSet_vIn28 ) -> (T_NontSet_vOut28 )+data T_NontSet_vIn28 = T_NontSet_vIn28 (DataTypes) (Set NontermIdent) (DefinedSets)+data T_NontSet_vOut28 = T_NontSet_vOut28 (Set Identifier) (Seq Error) (Set NontermIdent)+{-# NOINLINE sem_NontSet_NamedSet #-}+sem_NontSet_NamedSet :: (NontermIdent) -> T_NontSet +sem_NontSet_NamedSet arg_name_ = T_NontSet (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_NontSet_v28 + v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule587 arg_name_+ (_nontSet,_errors) = rule588 _lhsIdefinedSets arg_name_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule589 _errors+ _lhsOnontSet :: Set NontermIdent+ _lhsOnontSet = rule590 _nontSet+ __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet+ in __result_ )+ in C_NontSet_s29 v28+ {-# INLINE rule587 #-}+ {-# LINE 603 "./src-ag/Transform.ag" #-}+ rule587 = \ name_ ->+ {-# LINE 603 "./src-ag/Transform.ag" #-}+ Set.singleton name_+ {-# LINE 4516 "dist/build/Transform.hs"#-}+ {-# INLINE rule588 #-}+ {-# LINE 733 "./src-ag/Transform.ag" #-}+ rule588 = \ ((_lhsIdefinedSets) :: DefinedSets) name_ ->+ {-# LINE 733 "./src-ag/Transform.ag" #-}+ case Map.lookup name_ _lhsIdefinedSets of+ Nothing -> (Set.empty, Seq.singleton (UndefNont name_))+ Just set -> (set, Seq.empty)+ {-# LINE 4524 "dist/build/Transform.hs"#-}+ {-# INLINE rule589 #-}+ rule589 = \ _errors ->+ _errors+ {-# INLINE rule590 #-}+ rule590 = \ _nontSet ->+ _nontSet+{-# NOINLINE sem_NontSet_All #-}+sem_NontSet_All :: T_NontSet +sem_NontSet_All = T_NontSet (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_NontSet_v28 + v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let+ _lhsOnontSet :: Set NontermIdent+ _lhsOnontSet = rule591 _lhsIallNonterminals+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule592 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule593 ()+ __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet+ in __result_ )+ in C_NontSet_s29 v28+ {-# INLINE rule591 #-}+ {-# LINE 732 "./src-ag/Transform.ag" #-}+ rule591 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ {-# LINE 732 "./src-ag/Transform.ag" #-}+ _lhsIallNonterminals+ {-# LINE 4552 "dist/build/Transform.hs"#-}+ {-# INLINE rule592 #-}+ rule592 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule593 #-}+ rule593 = \ (_ :: ()) ->+ Seq.empty+{-# NOINLINE sem_NontSet_Union #-}+sem_NontSet_Union :: T_NontSet -> T_NontSet -> T_NontSet +sem_NontSet_Union arg_set1_ arg_set2_ = T_NontSet (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_NontSet_v28 + v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let+ _set1X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set1_))+ _set2X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set2_))+ (T_NontSet_vOut28 _set1IcollectedNames _set1Ierrors _set1InontSet) = inv_NontSet_s29 _set1X29 (T_NontSet_vIn28 _set1OallFields _set1OallNonterminals _set1OdefinedSets)+ (T_NontSet_vOut28 _set2IcollectedNames _set2Ierrors _set2InontSet) = inv_NontSet_s29 _set2X29 (T_NontSet_vIn28 _set2OallFields _set2OallNonterminals _set2OdefinedSets)+ _lhsOnontSet :: Set NontermIdent+ _lhsOnontSet = rule594 _set1InontSet _set2InontSet+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule595 _set1IcollectedNames _set2IcollectedNames+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule596 _set1Ierrors _set2Ierrors+ _set1OallFields = rule597 _lhsIallFields+ _set1OallNonterminals = rule598 _lhsIallNonterminals+ _set1OdefinedSets = rule599 _lhsIdefinedSets+ _set2OallFields = rule600 _lhsIallFields+ _set2OallNonterminals = rule601 _lhsIallNonterminals+ _set2OdefinedSets = rule602 _lhsIdefinedSets+ __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet+ in __result_ )+ in C_NontSet_s29 v28+ {-# INLINE rule594 #-}+ {-# LINE 736 "./src-ag/Transform.ag" #-}+ rule594 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->+ {-# LINE 736 "./src-ag/Transform.ag" #-}+ Set.union _set1InontSet _set2InontSet+ {-# LINE 4590 "dist/build/Transform.hs"#-}+ {-# INLINE rule595 #-}+ rule595 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# INLINE rule596 #-}+ rule596 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->+ _set1Ierrors Seq.>< _set2Ierrors+ {-# INLINE rule597 #-}+ rule597 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule598 #-}+ rule598 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule599 #-}+ rule599 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule600 #-}+ rule600 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule601 #-}+ rule601 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule602 #-}+ rule602 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_NontSet_Intersect #-}+sem_NontSet_Intersect :: T_NontSet -> T_NontSet -> T_NontSet +sem_NontSet_Intersect arg_set1_ arg_set2_ = T_NontSet (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_NontSet_v28 + v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let+ _set1X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set1_))+ _set2X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set2_))+ (T_NontSet_vOut28 _set1IcollectedNames _set1Ierrors _set1InontSet) = inv_NontSet_s29 _set1X29 (T_NontSet_vIn28 _set1OallFields _set1OallNonterminals _set1OdefinedSets)+ (T_NontSet_vOut28 _set2IcollectedNames _set2Ierrors _set2InontSet) = inv_NontSet_s29 _set2X29 (T_NontSet_vIn28 _set2OallFields _set2OallNonterminals _set2OdefinedSets)+ _lhsOnontSet :: Set NontermIdent+ _lhsOnontSet = rule603 _set1InontSet _set2InontSet+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule604 _set1IcollectedNames _set2IcollectedNames+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule605 _set1Ierrors _set2Ierrors+ _set1OallFields = rule606 _lhsIallFields+ _set1OallNonterminals = rule607 _lhsIallNonterminals+ _set1OdefinedSets = rule608 _lhsIdefinedSets+ _set2OallFields = rule609 _lhsIallFields+ _set2OallNonterminals = rule610 _lhsIallNonterminals+ _set2OdefinedSets = rule611 _lhsIdefinedSets+ __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet+ in __result_ )+ in C_NontSet_s29 v28+ {-# INLINE rule603 #-}+ {-# LINE 737 "./src-ag/Transform.ag" #-}+ rule603 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->+ {-# LINE 737 "./src-ag/Transform.ag" #-}+ Set.intersection _set1InontSet _set2InontSet+ {-# LINE 4646 "dist/build/Transform.hs"#-}+ {-# INLINE rule604 #-}+ rule604 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# INLINE rule605 #-}+ rule605 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->+ _set1Ierrors Seq.>< _set2Ierrors+ {-# INLINE rule606 #-}+ rule606 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule607 #-}+ rule607 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule608 #-}+ rule608 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule609 #-}+ rule609 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule610 #-}+ rule610 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule611 #-}+ rule611 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_NontSet_Difference #-}+sem_NontSet_Difference :: T_NontSet -> T_NontSet -> T_NontSet +sem_NontSet_Difference arg_set1_ arg_set2_ = T_NontSet (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_NontSet_v28 + v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let+ _set1X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set1_))+ _set2X29 = Control.Monad.Identity.runIdentity (attach_T_NontSet (arg_set2_))+ (T_NontSet_vOut28 _set1IcollectedNames _set1Ierrors _set1InontSet) = inv_NontSet_s29 _set1X29 (T_NontSet_vIn28 _set1OallFields _set1OallNonterminals _set1OdefinedSets)+ (T_NontSet_vOut28 _set2IcollectedNames _set2Ierrors _set2InontSet) = inv_NontSet_s29 _set2X29 (T_NontSet_vIn28 _set2OallFields _set2OallNonterminals _set2OdefinedSets)+ _lhsOnontSet :: Set NontermIdent+ _lhsOnontSet = rule612 _set1InontSet _set2InontSet+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule613 _set1IcollectedNames _set2IcollectedNames+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule614 _set1Ierrors _set2Ierrors+ _set1OallFields = rule615 _lhsIallFields+ _set1OallNonterminals = rule616 _lhsIallNonterminals+ _set1OdefinedSets = rule617 _lhsIdefinedSets+ _set2OallFields = rule618 _lhsIallFields+ _set2OallNonterminals = rule619 _lhsIallNonterminals+ _set2OdefinedSets = rule620 _lhsIdefinedSets+ __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet+ in __result_ )+ in C_NontSet_s29 v28+ {-# INLINE rule612 #-}+ {-# LINE 738 "./src-ag/Transform.ag" #-}+ rule612 = \ ((_set1InontSet) :: Set NontermIdent) ((_set2InontSet) :: Set NontermIdent) ->+ {-# LINE 738 "./src-ag/Transform.ag" #-}+ Set.difference _set1InontSet _set2InontSet+ {-# LINE 4702 "dist/build/Transform.hs"#-}+ {-# INLINE rule613 #-}+ rule613 = \ ((_set1IcollectedNames) :: Set Identifier) ((_set2IcollectedNames) :: Set Identifier) ->+ _set1IcollectedNames `Set.union` _set2IcollectedNames+ {-# INLINE rule614 #-}+ rule614 = \ ((_set1Ierrors) :: Seq Error) ((_set2Ierrors) :: Seq Error) ->+ _set1Ierrors Seq.>< _set2Ierrors+ {-# INLINE rule615 #-}+ rule615 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule616 #-}+ rule616 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule617 #-}+ rule617 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+ {-# INLINE rule618 #-}+ rule618 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule619 #-}+ rule619 = \ ((_lhsIallNonterminals) :: Set NontermIdent) ->+ _lhsIallNonterminals+ {-# INLINE rule620 #-}+ rule620 = \ ((_lhsIdefinedSets) :: DefinedSets) ->+ _lhsIdefinedSets+{-# NOINLINE sem_NontSet_Path #-}+sem_NontSet_Path :: (NontermIdent) -> (NontermIdent) -> T_NontSet +sem_NontSet_Path arg_from_ arg_to_ = T_NontSet (return st29) where+ {-# NOINLINE st29 #-}+ st29 = let+ v28 :: T_NontSet_v28 + v28 = \ (T_NontSet_vIn28 _lhsIallFields _lhsIallNonterminals _lhsIdefinedSets) -> ( let+ _lhsOnontSet :: Set NontermIdent+ _lhsOnontSet = rule621 _lhsIallFields arg_from_ arg_to_+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule622 _lhsIallNonterminals arg_from_ arg_to_+ _lhsOcollectedNames :: Set Identifier+ _lhsOcollectedNames = rule623 ()+ __result_ = T_NontSet_vOut28 _lhsOcollectedNames _lhsOerrors _lhsOnontSet+ in __result_ )+ in C_NontSet_s29 v28+ {-# INLINE rule621 #-}+ {-# LINE 739 "./src-ag/Transform.ag" #-}+ rule621 = \ ((_lhsIallFields) :: DataTypes) from_ to_ ->+ {-# LINE 739 "./src-ag/Transform.ag" #-}+ let table = flattenDatas _lhsIallFields+ in path table from_ to_+ {-# LINE 4749 "dist/build/Transform.hs"#-}+ {-# INLINE rule622 #-}+ {-# LINE 741 "./src-ag/Transform.ag" #-}+ rule622 = \ ((_lhsIallNonterminals) :: Set NontermIdent) from_ to_ ->+ {-# LINE 741 "./src-ag/Transform.ag" #-}+ let check name | Set.member name _lhsIallNonterminals+ = Seq.empty+ | otherwise = Seq.singleton (UndefNont name)+ in check from_ >< check to_+ {-# LINE 4758 "dist/build/Transform.hs"#-}+ {-# INLINE rule623 #-}+ rule623 = \ (_ :: ()) ->+ Set.empty++-- Pattern -----------------------------------------------------+-- wrapper+data Inh_Pattern = Inh_Pattern { }+data Syn_Pattern = Syn_Pattern { copy_Syn_Pattern :: (Pattern), definedAttrs_Syn_Pattern :: ([AttrName]), definedInsts_Syn_Pattern :: ([Identifier]), patunder_Syn_Pattern :: ([AttrName]->Pattern), stpos_Syn_Pattern :: (Pos) }+{-# INLINABLE wrap_Pattern #-}+wrap_Pattern :: T_Pattern -> Inh_Pattern -> (Syn_Pattern )+wrap_Pattern (T_Pattern act) (Inh_Pattern ) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Pattern_vIn31 + (T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos) <- return (inv_Pattern_s32 sem arg)+ return (Syn_Pattern _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos)+ )++-- cata+{-# NOINLINE sem_Pattern #-}+sem_Pattern :: Pattern -> T_Pattern +sem_Pattern ( Constr name_ pats_ ) = sem_Pattern_Constr name_ ( sem_Patterns pats_ )+sem_Pattern ( Product pos_ pats_ ) = sem_Pattern_Product pos_ ( sem_Patterns pats_ )+sem_Pattern ( Alias field_ attr_ pat_ ) = sem_Pattern_Alias field_ attr_ ( sem_Pattern pat_ )+sem_Pattern ( Irrefutable pat_ ) = sem_Pattern_Irrefutable ( sem_Pattern pat_ )+sem_Pattern ( Underscore pos_ ) = sem_Pattern_Underscore pos_++-- semantic domain+newtype T_Pattern = T_Pattern {+ attach_T_Pattern :: Identity (T_Pattern_s32 )+ }+newtype T_Pattern_s32 = C_Pattern_s32 {+ inv_Pattern_s32 :: (T_Pattern_v31 )+ }+data T_Pattern_s33 = C_Pattern_s33+type T_Pattern_v31 = (T_Pattern_vIn31 ) -> (T_Pattern_vOut31 )+data T_Pattern_vIn31 = T_Pattern_vIn31 +data T_Pattern_vOut31 = T_Pattern_vOut31 (Pattern) ([AttrName]) ([Identifier]) ([AttrName]->Pattern) (Pos)+{-# NOINLINE sem_Pattern_Constr #-}+sem_Pattern_Constr :: (ConstructorIdent) -> T_Patterns -> T_Pattern +sem_Pattern_Constr arg_name_ arg_pats_ = T_Pattern (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_Pattern_v31 + v31 = \ (T_Pattern_vIn31 ) -> ( let+ _patsX35 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut34 _patsIcopy _patsIdefinedAttrs _patsIdefinedInsts _patsIpatunder) = inv_Patterns_s35 _patsX35 (T_Patterns_vIn34 )+ _lhsOpatunder :: [AttrName]->Pattern+ _lhsOpatunder = rule624 _patsIpatunder arg_name_+ _lhsOstpos :: Pos+ _lhsOstpos = rule625 arg_name_+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule626 _patsIdefinedAttrs+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule627 _patsIdefinedInsts+ _copy = rule628 _patsIcopy arg_name_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule629 _copy+ __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos+ in __result_ )+ in C_Pattern_s32 v31+ {-# INLINE rule624 #-}+ {-# LINE 1190 "./src-ag/Transform.ag" #-}+ rule624 = \ ((_patsIpatunder) :: [AttrName]->Patterns) name_ ->+ {-# LINE 1190 "./src-ag/Transform.ag" #-}+ \us -> Constr name_ (_patsIpatunder us)+ {-# LINE 4825 "dist/build/Transform.hs"#-}+ {-# INLINE rule625 #-}+ {-# LINE 1201 "./src-ag/Transform.ag" #-}+ rule625 = \ name_ ->+ {-# LINE 1201 "./src-ag/Transform.ag" #-}+ getPos name_+ {-# LINE 4831 "dist/build/Transform.hs"#-}+ {-# INLINE rule626 #-}+ rule626 = \ ((_patsIdefinedAttrs) :: [AttrName]) ->+ _patsIdefinedAttrs+ {-# INLINE rule627 #-}+ rule627 = \ ((_patsIdefinedInsts) :: [Identifier]) ->+ _patsIdefinedInsts+ {-# INLINE rule628 #-}+ rule628 = \ ((_patsIcopy) :: Patterns) name_ ->+ Constr name_ _patsIcopy+ {-# INLINE rule629 #-}+ rule629 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Product #-}+sem_Pattern_Product :: (Pos) -> T_Patterns -> T_Pattern +sem_Pattern_Product arg_pos_ arg_pats_ = T_Pattern (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_Pattern_v31 + v31 = \ (T_Pattern_vIn31 ) -> ( let+ _patsX35 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_pats_))+ (T_Patterns_vOut34 _patsIcopy _patsIdefinedAttrs _patsIdefinedInsts _patsIpatunder) = inv_Patterns_s35 _patsX35 (T_Patterns_vIn34 )+ _lhsOpatunder :: [AttrName]->Pattern+ _lhsOpatunder = rule630 _patsIpatunder arg_pos_+ _lhsOstpos :: Pos+ _lhsOstpos = rule631 arg_pos_+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule632 _patsIdefinedAttrs+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule633 _patsIdefinedInsts+ _copy = rule634 _patsIcopy arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule635 _copy+ __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos+ in __result_ )+ in C_Pattern_s32 v31+ {-# INLINE rule630 #-}+ {-# LINE 1191 "./src-ag/Transform.ag" #-}+ rule630 = \ ((_patsIpatunder) :: [AttrName]->Patterns) pos_ ->+ {-# LINE 1191 "./src-ag/Transform.ag" #-}+ \us -> Product pos_ (_patsIpatunder us)+ {-# LINE 4872 "dist/build/Transform.hs"#-}+ {-# INLINE rule631 #-}+ {-# LINE 1202 "./src-ag/Transform.ag" #-}+ rule631 = \ pos_ ->+ {-# LINE 1202 "./src-ag/Transform.ag" #-}+ pos_+ {-# LINE 4878 "dist/build/Transform.hs"#-}+ {-# INLINE rule632 #-}+ rule632 = \ ((_patsIdefinedAttrs) :: [AttrName]) ->+ _patsIdefinedAttrs+ {-# INLINE rule633 #-}+ rule633 = \ ((_patsIdefinedInsts) :: [Identifier]) ->+ _patsIdefinedInsts+ {-# INLINE rule634 #-}+ rule634 = \ ((_patsIcopy) :: Patterns) pos_ ->+ Product pos_ _patsIcopy+ {-# INLINE rule635 #-}+ rule635 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Alias #-}+sem_Pattern_Alias :: (Identifier) -> (Identifier) -> T_Pattern -> T_Pattern +sem_Pattern_Alias arg_field_ arg_attr_ arg_pat_ = T_Pattern (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_Pattern_v31 + v31 = \ (T_Pattern_vIn31 ) -> ( let+ _patX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut31 _patIcopy _patIdefinedAttrs _patIdefinedInsts _patIpatunder _patIstpos) = inv_Pattern_s32 _patX32 (T_Pattern_vIn31 )+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule636 _patIdefinedAttrs arg_attr_ arg_field_+ _lhsOpatunder :: [AttrName]->Pattern+ _lhsOpatunder = rule637 _copy arg_attr_ arg_field_+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule638 _patIdefinedInsts arg_attr_ arg_field_+ _lhsOstpos :: Pos+ _lhsOstpos = rule639 arg_field_+ _copy = rule640 _patIcopy arg_attr_ arg_field_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule641 _copy+ __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos+ in __result_ )+ in C_Pattern_s32 v31+ {-# INLINE rule636 #-}+ {-# LINE 1186 "./src-ag/Transform.ag" #-}+ rule636 = \ ((_patIdefinedAttrs) :: [AttrName]) attr_ field_ ->+ {-# LINE 1186 "./src-ag/Transform.ag" #-}+ (field_, attr_) : _patIdefinedAttrs+ {-# LINE 4919 "dist/build/Transform.hs"#-}+ {-# INLINE rule637 #-}+ {-# LINE 1187 "./src-ag/Transform.ag" #-}+ rule637 = \ _copy attr_ field_ ->+ {-# LINE 1187 "./src-ag/Transform.ag" #-}+ \us -> if ((field_,attr_) `elem` us) then Underscore noPos else _copy+ {-# LINE 4925 "dist/build/Transform.hs"#-}+ {-# INLINE rule638 #-}+ {-# LINE 1188 "./src-ag/Transform.ag" #-}+ rule638 = \ ((_patIdefinedInsts) :: [Identifier]) attr_ field_ ->+ {-# LINE 1188 "./src-ag/Transform.ag" #-}+ (if field_ == _INST then [attr_] else []) ++ _patIdefinedInsts+ {-# LINE 4931 "dist/build/Transform.hs"#-}+ {-# INLINE rule639 #-}+ {-# LINE 1203 "./src-ag/Transform.ag" #-}+ rule639 = \ field_ ->+ {-# LINE 1203 "./src-ag/Transform.ag" #-}+ getPos field_+ {-# LINE 4937 "dist/build/Transform.hs"#-}+ {-# INLINE rule640 #-}+ rule640 = \ ((_patIcopy) :: Pattern) attr_ field_ ->+ Alias field_ attr_ _patIcopy+ {-# INLINE rule641 #-}+ rule641 = \ _copy ->+ _copy+{-# NOINLINE sem_Pattern_Irrefutable #-}+sem_Pattern_Irrefutable :: T_Pattern -> T_Pattern +sem_Pattern_Irrefutable arg_pat_ = T_Pattern (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_Pattern_v31 + v31 = \ (T_Pattern_vIn31 ) -> ( let+ _patX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pat_))+ (T_Pattern_vOut31 _patIcopy _patIdefinedAttrs _patIdefinedInsts _patIpatunder _patIstpos) = inv_Pattern_s32 _patX32 (T_Pattern_vIn31 )+ _lhsOpatunder :: [AttrName]->Pattern+ _lhsOpatunder = rule642 _patIpatunder+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule643 _patIdefinedAttrs+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule644 _patIdefinedInsts+ _copy = rule645 _patIcopy+ _lhsOcopy :: Pattern+ _lhsOcopy = rule646 _copy+ _lhsOstpos :: Pos+ _lhsOstpos = rule647 _patIstpos+ __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos+ in __result_ )+ in C_Pattern_s32 v31+ {-# INLINE rule642 #-}+ {-# LINE 1192 "./src-ag/Transform.ag" #-}+ rule642 = \ ((_patIpatunder) :: [AttrName]->Pattern) ->+ {-# LINE 1192 "./src-ag/Transform.ag" #-}+ \us -> Irrefutable (_patIpatunder us)+ {-# LINE 4972 "dist/build/Transform.hs"#-}+ {-# INLINE rule643 #-}+ rule643 = \ ((_patIdefinedAttrs) :: [AttrName]) ->+ _patIdefinedAttrs+ {-# INLINE rule644 #-}+ rule644 = \ ((_patIdefinedInsts) :: [Identifier]) ->+ _patIdefinedInsts+ {-# INLINE rule645 #-}+ rule645 = \ ((_patIcopy) :: Pattern) ->+ Irrefutable _patIcopy+ {-# INLINE rule646 #-}+ rule646 = \ _copy ->+ _copy+ {-# INLINE rule647 #-}+ rule647 = \ ((_patIstpos) :: Pos) ->+ _patIstpos+{-# NOINLINE sem_Pattern_Underscore #-}+sem_Pattern_Underscore :: (Pos) -> T_Pattern +sem_Pattern_Underscore arg_pos_ = T_Pattern (return st32) where+ {-# NOINLINE st32 #-}+ st32 = let+ v31 :: T_Pattern_v31 + v31 = \ (T_Pattern_vIn31 ) -> ( let+ _lhsOpatunder :: [AttrName]->Pattern+ _lhsOpatunder = rule648 _copy+ _lhsOstpos :: Pos+ _lhsOstpos = rule649 arg_pos_+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule650 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule651 ()+ _copy = rule652 arg_pos_+ _lhsOcopy :: Pattern+ _lhsOcopy = rule653 _copy+ __result_ = T_Pattern_vOut31 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder _lhsOstpos+ in __result_ )+ in C_Pattern_s32 v31+ {-# INLINE rule648 #-}+ {-# LINE 1189 "./src-ag/Transform.ag" #-}+ rule648 = \ _copy ->+ {-# LINE 1189 "./src-ag/Transform.ag" #-}+ \_ -> _copy+ {-# LINE 5014 "dist/build/Transform.hs"#-}+ {-# INLINE rule649 #-}+ {-# LINE 1204 "./src-ag/Transform.ag" #-}+ rule649 = \ pos_ ->+ {-# LINE 1204 "./src-ag/Transform.ag" #-}+ pos_+ {-# LINE 5020 "dist/build/Transform.hs"#-}+ {-# INLINE rule650 #-}+ rule650 = \ (_ :: ()) ->+ []+ {-# INLINE rule651 #-}+ rule651 = \ (_ :: ()) ->+ []+ {-# INLINE rule652 #-}+ rule652 = \ pos_ ->+ Underscore pos_+ {-# INLINE rule653 #-}+ rule653 = \ _copy ->+ _copy++-- Patterns ----------------------------------------------------+-- wrapper+data Inh_Patterns = Inh_Patterns { }+data Syn_Patterns = Syn_Patterns { copy_Syn_Patterns :: (Patterns), definedAttrs_Syn_Patterns :: ([AttrName]), definedInsts_Syn_Patterns :: ([Identifier]), patunder_Syn_Patterns :: ([AttrName]->Patterns) }+{-# INLINABLE wrap_Patterns #-}+wrap_Patterns :: T_Patterns -> Inh_Patterns -> (Syn_Patterns )+wrap_Patterns (T_Patterns act) (Inh_Patterns ) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_Patterns_vIn34 + (T_Patterns_vOut34 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder) <- return (inv_Patterns_s35 sem arg)+ return (Syn_Patterns _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder)+ )++-- cata+{-# NOINLINE sem_Patterns #-}+sem_Patterns :: Patterns -> T_Patterns +sem_Patterns list = Prelude.foldr sem_Patterns_Cons sem_Patterns_Nil (Prelude.map sem_Pattern list)++-- semantic domain+newtype T_Patterns = T_Patterns {+ attach_T_Patterns :: Identity (T_Patterns_s35 )+ }+newtype T_Patterns_s35 = C_Patterns_s35 {+ inv_Patterns_s35 :: (T_Patterns_v34 )+ }+data T_Patterns_s36 = C_Patterns_s36+type T_Patterns_v34 = (T_Patterns_vIn34 ) -> (T_Patterns_vOut34 )+data T_Patterns_vIn34 = T_Patterns_vIn34 +data T_Patterns_vOut34 = T_Patterns_vOut34 (Patterns) ([AttrName]) ([Identifier]) ([AttrName]->Patterns)+{-# NOINLINE sem_Patterns_Cons #-}+sem_Patterns_Cons :: T_Pattern -> T_Patterns -> T_Patterns +sem_Patterns_Cons arg_hd_ arg_tl_ = T_Patterns (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_Patterns_v34 + v34 = \ (T_Patterns_vIn34 ) -> ( let+ _hdX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_hd_))+ _tlX35 = Control.Monad.Identity.runIdentity (attach_T_Patterns (arg_tl_))+ (T_Pattern_vOut31 _hdIcopy _hdIdefinedAttrs _hdIdefinedInsts _hdIpatunder _hdIstpos) = inv_Pattern_s32 _hdX32 (T_Pattern_vIn31 )+ (T_Patterns_vOut34 _tlIcopy _tlIdefinedAttrs _tlIdefinedInsts _tlIpatunder) = inv_Patterns_s35 _tlX35 (T_Patterns_vIn34 )+ _lhsOpatunder :: [AttrName]->Patterns+ _lhsOpatunder = rule654 _hdIpatunder _tlIpatunder+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule655 _hdIdefinedAttrs _tlIdefinedAttrs+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule656 _hdIdefinedInsts _tlIdefinedInsts+ _copy = rule657 _hdIcopy _tlIcopy+ _lhsOcopy :: Patterns+ _lhsOcopy = rule658 _copy+ __result_ = T_Patterns_vOut34 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder+ in __result_ )+ in C_Patterns_s35 v34+ {-# INLINE rule654 #-}+ {-# LINE 1196 "./src-ag/Transform.ag" #-}+ rule654 = \ ((_hdIpatunder) :: [AttrName]->Pattern) ((_tlIpatunder) :: [AttrName]->Patterns) ->+ {-# LINE 1196 "./src-ag/Transform.ag" #-}+ \us -> (_hdIpatunder us) : (_tlIpatunder us)+ {-# LINE 5092 "dist/build/Transform.hs"#-}+ {-# INLINE rule655 #-}+ rule655 = \ ((_hdIdefinedAttrs) :: [AttrName]) ((_tlIdefinedAttrs) :: [AttrName]) ->+ _hdIdefinedAttrs ++ _tlIdefinedAttrs+ {-# INLINE rule656 #-}+ rule656 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# INLINE rule657 #-}+ rule657 = \ ((_hdIcopy) :: Pattern) ((_tlIcopy) :: Patterns) ->+ (:) _hdIcopy _tlIcopy+ {-# INLINE rule658 #-}+ rule658 = \ _copy ->+ _copy+{-# NOINLINE sem_Patterns_Nil #-}+sem_Patterns_Nil :: T_Patterns +sem_Patterns_Nil = T_Patterns (return st35) where+ {-# NOINLINE st35 #-}+ st35 = let+ v34 :: T_Patterns_v34 + v34 = \ (T_Patterns_vIn34 ) -> ( let+ _lhsOpatunder :: [AttrName]->Patterns+ _lhsOpatunder = rule659 ()+ _lhsOdefinedAttrs :: [AttrName]+ _lhsOdefinedAttrs = rule660 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule661 ()+ _copy = rule662 ()+ _lhsOcopy :: Patterns+ _lhsOcopy = rule663 _copy+ __result_ = T_Patterns_vOut34 _lhsOcopy _lhsOdefinedAttrs _lhsOdefinedInsts _lhsOpatunder+ in __result_ )+ in C_Patterns_s35 v34+ {-# INLINE rule659 #-}+ {-# LINE 1195 "./src-ag/Transform.ag" #-}+ rule659 = \ (_ :: ()) ->+ {-# LINE 1195 "./src-ag/Transform.ag" #-}+ \_ -> []+ {-# LINE 5129 "dist/build/Transform.hs"#-}+ {-# INLINE rule660 #-}+ rule660 = \ (_ :: ()) ->+ []+ {-# INLINE rule661 #-}+ rule661 = \ (_ :: ()) ->+ []+ {-# INLINE rule662 #-}+ rule662 = \ (_ :: ()) ->+ []+ {-# INLINE rule663 #-}+ rule663 = \ _copy ->+ _copy++-- SemAlt ------------------------------------------------------+-- wrapper+data Inh_SemAlt = Inh_SemAlt { allAttrDecls_Inh_SemAlt :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_SemAlt :: (Map NontermIdent (Attributes, Attributes)), allFields_Inh_SemAlt :: (DataTypes), nts_Inh_SemAlt :: (Set NontermIdent), options_Inh_SemAlt :: (Options) }+data Syn_SemAlt = Syn_SemAlt { attrOrderCollect_Syn_SemAlt :: (AttrOrderMap), collectedArounds_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedInsts_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMerges_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedRules_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSigs_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_SemAlt :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), errors_Syn_SemAlt :: (Seq Error), semPragmasCollect_Syn_SemAlt :: (PragmaMap) }+{-# INLINABLE wrap_SemAlt #-}+wrap_SemAlt :: T_SemAlt -> Inh_SemAlt -> (Syn_SemAlt )+wrap_SemAlt (T_SemAlt act) (Inh_SemAlt _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_SemAlt_vIn37 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions+ (T_SemAlt_vOut37 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect) <- return (inv_SemAlt_s38 sem arg)+ return (Syn_SemAlt _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect)+ )++-- cata+{-# INLINE sem_SemAlt #-}+sem_SemAlt :: SemAlt -> T_SemAlt +sem_SemAlt ( SemAlt pos_ constructorSet_ rules_ ) = sem_SemAlt_SemAlt pos_ ( sem_ConstructorSet constructorSet_ ) ( sem_SemDefs rules_ )++-- semantic domain+newtype T_SemAlt = T_SemAlt {+ attach_T_SemAlt :: Identity (T_SemAlt_s38 )+ }+newtype T_SemAlt_s38 = C_SemAlt_s38 {+ inv_SemAlt_s38 :: (T_SemAlt_v37 )+ }+data T_SemAlt_s39 = C_SemAlt_s39+type T_SemAlt_v37 = (T_SemAlt_vIn37 ) -> (T_SemAlt_vOut37 )+data T_SemAlt_vIn37 = T_SemAlt_vIn37 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (DataTypes) (Set NontermIdent) (Options)+data T_SemAlt_vOut37 = T_SemAlt_vOut37 (AttrOrderMap) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Seq Error) (PragmaMap)+{-# NOINLINE sem_SemAlt_SemAlt #-}+sem_SemAlt_SemAlt :: (Pos) -> T_ConstructorSet -> T_SemDefs -> T_SemAlt +sem_SemAlt_SemAlt _ arg_constructorSet_ arg_rules_ = T_SemAlt (return st38) where+ {-# NOINLINE st38 #-}+ st38 = let+ v37 :: T_SemAlt_v37 + v37 = \ (T_SemAlt_vIn37 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) -> ( let+ _constructorSetX14 = Control.Monad.Identity.runIdentity (attach_T_ConstructorSet (arg_constructorSet_))+ _rulesX47 = Control.Monad.Identity.runIdentity (attach_T_SemDefs (arg_rules_))+ (T_ConstructorSet_vOut13 _constructorSetIcollectedConstructorNames _constructorSetIconstructors _constructorSetIerrors) = inv_ConstructorSet_s14 _constructorSetX14 (T_ConstructorSet_vIn13 )+ (T_SemDefs_vOut46 _rulesIaroundInfos _rulesIaugmentInfos _rulesIdefinedInsts _rulesIerrors _rulesImergeInfos _rulesIorderDepsCollect _rulesIpragmaNamesCollect _rulesIruleInfos _rulesIsigInfos _rulesIuniqueInfos) = inv_SemDefs_s47 _rulesX47 (T_SemDefs_vIn46 _rulesOoptions)+ _pragmaNames = rule664 _rulesIpragmaNamesCollect+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule665 _coninfo _pragmaNames+ _attrOrders = rule666 _coninfo _rulesIorderDepsCollect+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule667 _attrOrders+ _coninfo = rule668 _constructorSetIconstructors _lhsIallFields _lhsInts+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule669 _coninfo _rulesIerrors+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule670 _coninfo _rulesIruleInfos+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule671 _coninfo _rulesIsigInfos+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule672 _coninfo _rulesIdefinedInsts+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule673 _coninfo _rulesIuniqueInfos+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule674 _coninfo _rulesIaugmentInfos+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule675 _coninfo _rulesIaroundInfos+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule676 _coninfo _rulesImergeInfos+ _rulesOoptions = rule677 _lhsIoptions+ __result_ = T_SemAlt_vOut37 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect+ in __result_ )+ in C_SemAlt_s38 v37+ {-# INLINE rule664 #-}+ {-# LINE 888 "./src-ag/Transform.ag" #-}+ rule664 = \ ((_rulesIpragmaNamesCollect) :: [Identifier]) ->+ {-# LINE 888 "./src-ag/Transform.ag" #-}+ Set.fromList _rulesIpragmaNamesCollect+ {-# LINE 5216 "dist/build/Transform.hs"#-}+ {-# INLINE rule665 #-}+ {-# LINE 889 "./src-ag/Transform.ag" #-}+ rule665 = \ _coninfo _pragmaNames ->+ {-# LINE 889 "./src-ag/Transform.ag" #-}+ foldr pragmaMapUnion Map.empty [ pragmaMapSingle nt con _pragmaNames+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5225 "dist/build/Transform.hs"#-}+ {-# INLINE rule666 #-}+ {-# LINE 918 "./src-ag/Transform.ag" #-}+ rule666 = \ _coninfo ((_rulesIorderDepsCollect) :: Set Dependency) ->+ {-# LINE 918 "./src-ag/Transform.ag" #-}+ [ orderMapSingle nt con _rulesIorderDepsCollect+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5234 "dist/build/Transform.hs"#-}+ {-# INLINE rule667 #-}+ {-# LINE 923 "./src-ag/Transform.ag" #-}+ rule667 = \ _attrOrders ->+ {-# LINE 923 "./src-ag/Transform.ag" #-}+ foldr orderMapUnion Map.empty _attrOrders+ {-# LINE 5240 "dist/build/Transform.hs"#-}+ {-# INLINE rule668 #-}+ {-# LINE 1105 "./src-ag/Transform.ag" #-}+ rule668 = \ ((_constructorSetIconstructors) :: (Set ConstructorIdent->Set ConstructorIdent)) ((_lhsIallFields) :: DataTypes) ((_lhsInts) :: Set NontermIdent) ->+ {-# LINE 1105 "./src-ag/Transform.ag" #-}+ [ (nt, conset, conkeys)+ | nt <- Set.toList _lhsInts+ , let conmap = Map.findWithDefault Map.empty nt _lhsIallFields+ , let conkeys = Set.fromList (Map.keys conmap)+ , let conset = _constructorSetIconstructors conkeys+ ]+ {-# LINE 5251 "dist/build/Transform.hs"#-}+ {-# INLINE rule669 #-}+ {-# LINE 1112 "./src-ag/Transform.ag" #-}+ rule669 = \ _coninfo ((_rulesIerrors) :: Seq Error) ->+ {-# LINE 1112 "./src-ag/Transform.ag" #-}+ Seq.fromList+ [ UndefAlt nt con+ | (nt, conset, conkeys) <- _coninfo+ , con <- Set.toList (Set.difference conset conkeys)+ ]+ Seq.>< _rulesIerrors+ {-# LINE 5262 "dist/build/Transform.hs"#-}+ {-# INLINE rule670 #-}+ {-# LINE 1119 "./src-ag/Transform.ag" #-}+ rule670 = \ _coninfo ((_rulesIruleInfos) :: [RuleInfo]) ->+ {-# LINE 1119 "./src-ag/Transform.ag" #-}+ [ (nt,con,r)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , r <- _rulesIruleInfos+ ]+ {-# LINE 5272 "dist/build/Transform.hs"#-}+ {-# INLINE rule671 #-}+ {-# LINE 1125 "./src-ag/Transform.ag" #-}+ rule671 = \ _coninfo ((_rulesIsigInfos) :: [SigInfo]) ->+ {-# LINE 1125 "./src-ag/Transform.ag" #-}+ [ (nt,con,ts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ , ts <- _rulesIsigInfos+ ]+ {-# LINE 5282 "dist/build/Transform.hs"#-}+ {-# INLINE rule672 #-}+ {-# LINE 1132 "./src-ag/Transform.ag" #-}+ rule672 = \ _coninfo ((_rulesIdefinedInsts) :: [Identifier]) ->+ {-# LINE 1132 "./src-ag/Transform.ag" #-}+ [ (nt,con,_rulesIdefinedInsts)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5291 "dist/build/Transform.hs"#-}+ {-# INLINE rule673 #-}+ {-# LINE 1138 "./src-ag/Transform.ag" #-}+ rule673 = \ _coninfo ((_rulesIuniqueInfos) :: [UniqueInfo]) ->+ {-# LINE 1138 "./src-ag/Transform.ag" #-}+ [ (nt,con,_rulesIuniqueInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5300 "dist/build/Transform.hs"#-}+ {-# INLINE rule674 #-}+ {-# LINE 1144 "./src-ag/Transform.ag" #-}+ rule674 = \ _coninfo ((_rulesIaugmentInfos) :: [AugmentInfo]) ->+ {-# LINE 1144 "./src-ag/Transform.ag" #-}+ [ (nt, con, _rulesIaugmentInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5309 "dist/build/Transform.hs"#-}+ {-# INLINE rule675 #-}+ {-# LINE 1150 "./src-ag/Transform.ag" #-}+ rule675 = \ _coninfo ((_rulesIaroundInfos) :: [AroundInfo]) ->+ {-# LINE 1150 "./src-ag/Transform.ag" #-}+ [ (nt, con, _rulesIaroundInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5318 "dist/build/Transform.hs"#-}+ {-# INLINE rule676 #-}+ {-# LINE 1156 "./src-ag/Transform.ag" #-}+ rule676 = \ _coninfo ((_rulesImergeInfos) :: [MergeInfo]) ->+ {-# LINE 1156 "./src-ag/Transform.ag" #-}+ [ (nt, con, _rulesImergeInfos)+ | (nt, conset, _) <- _coninfo+ , con <- Set.toList conset+ ]+ {-# LINE 5327 "dist/build/Transform.hs"#-}+ {-# INLINE rule677 #-}+ rule677 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions++-- SemAlts -----------------------------------------------------+-- wrapper+data Inh_SemAlts = Inh_SemAlts { allAttrDecls_Inh_SemAlts :: (Map NontermIdent (Attributes, Attributes)), allAttrs_Inh_SemAlts :: (Map NontermIdent (Attributes, Attributes)), allFields_Inh_SemAlts :: (DataTypes), nts_Inh_SemAlts :: (Set NontermIdent), options_Inh_SemAlts :: (Options) }+data Syn_SemAlts = Syn_SemAlts { attrOrderCollect_Syn_SemAlts :: (AttrOrderMap), collectedArounds_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]), collectedAugments_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]), collectedInsts_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [Identifier]) ]), collectedMerges_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]), collectedRules_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, RuleInfo)]), collectedSigs_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, SigInfo) ]), collectedUniques_Syn_SemAlts :: ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]), errors_Syn_SemAlts :: (Seq Error), semPragmasCollect_Syn_SemAlts :: (PragmaMap) }+{-# INLINABLE wrap_SemAlts #-}+wrap_SemAlts :: T_SemAlts -> Inh_SemAlts -> (Syn_SemAlts )+wrap_SemAlts (T_SemAlts act) (Inh_SemAlts _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_SemAlts_vIn40 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions+ (T_SemAlts_vOut40 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect) <- return (inv_SemAlts_s41 sem arg)+ return (Syn_SemAlts _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect)+ )++-- cata+{-# NOINLINE sem_SemAlts #-}+sem_SemAlts :: SemAlts -> T_SemAlts +sem_SemAlts list = Prelude.foldr sem_SemAlts_Cons sem_SemAlts_Nil (Prelude.map sem_SemAlt list)++-- semantic domain+newtype T_SemAlts = T_SemAlts {+ attach_T_SemAlts :: Identity (T_SemAlts_s41 )+ }+newtype T_SemAlts_s41 = C_SemAlts_s41 {+ inv_SemAlts_s41 :: (T_SemAlts_v40 )+ }+data T_SemAlts_s42 = C_SemAlts_s42+type T_SemAlts_v40 = (T_SemAlts_vIn40 ) -> (T_SemAlts_vOut40 )+data T_SemAlts_vIn40 = T_SemAlts_vIn40 (Map NontermIdent (Attributes, Attributes)) (Map NontermIdent (Attributes, Attributes)) (DataTypes) (Set NontermIdent) (Options)+data T_SemAlts_vOut40 = T_SemAlts_vOut40 (AttrOrderMap) ([ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ([ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ([ (NontermIdent, ConstructorIdent, [Identifier]) ]) ([ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ([ (NontermIdent, ConstructorIdent, RuleInfo)]) ([ (NontermIdent, ConstructorIdent, SigInfo) ]) ([ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) (Seq Error) (PragmaMap)+{-# NOINLINE sem_SemAlts_Cons #-}+sem_SemAlts_Cons :: T_SemAlt -> T_SemAlts -> T_SemAlts +sem_SemAlts_Cons arg_hd_ arg_tl_ = T_SemAlts (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_SemAlts_v40 + v40 = \ (T_SemAlts_vIn40 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) -> ( let+ _hdX38 = Control.Monad.Identity.runIdentity (attach_T_SemAlt (arg_hd_))+ _tlX41 = Control.Monad.Identity.runIdentity (attach_T_SemAlts (arg_tl_))+ (T_SemAlt_vOut37 _hdIattrOrderCollect _hdIcollectedArounds _hdIcollectedAugments _hdIcollectedInsts _hdIcollectedMerges _hdIcollectedRules _hdIcollectedSigs _hdIcollectedUniques _hdIerrors _hdIsemPragmasCollect) = inv_SemAlt_s38 _hdX38 (T_SemAlt_vIn37 _hdOallAttrDecls _hdOallAttrs _hdOallFields _hdOnts _hdOoptions)+ (T_SemAlts_vOut40 _tlIattrOrderCollect _tlIcollectedArounds _tlIcollectedAugments _tlIcollectedInsts _tlIcollectedMerges _tlIcollectedRules _tlIcollectedSigs _tlIcollectedUniques _tlIerrors _tlIsemPragmasCollect) = inv_SemAlts_s41 _tlX41 (T_SemAlts_vIn40 _tlOallAttrDecls _tlOallAttrs _tlOallFields _tlOnts _tlOoptions)+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule678 _hdIattrOrderCollect _tlIattrOrderCollect+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule679 _hdIcollectedArounds _tlIcollectedArounds+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule680 _hdIcollectedAugments _tlIcollectedAugments+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule681 _hdIcollectedInsts _tlIcollectedInsts+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule682 _hdIcollectedMerges _tlIcollectedMerges+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule683 _hdIcollectedRules _tlIcollectedRules+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule684 _hdIcollectedSigs _tlIcollectedSigs+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule685 _hdIcollectedUniques _tlIcollectedUniques+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule686 _hdIerrors _tlIerrors+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule687 _hdIsemPragmasCollect _tlIsemPragmasCollect+ _hdOallAttrDecls = rule688 _lhsIallAttrDecls+ _hdOallAttrs = rule689 _lhsIallAttrs+ _hdOallFields = rule690 _lhsIallFields+ _hdOnts = rule691 _lhsInts+ _hdOoptions = rule692 _lhsIoptions+ _tlOallAttrDecls = rule693 _lhsIallAttrDecls+ _tlOallAttrs = rule694 _lhsIallAttrs+ _tlOallFields = rule695 _lhsIallFields+ _tlOnts = rule696 _lhsInts+ _tlOoptions = rule697 _lhsIoptions+ __result_ = T_SemAlts_vOut40 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect+ in __result_ )+ in C_SemAlts_s41 v40+ {-# INLINE rule678 #-}+ rule678 = \ ((_hdIattrOrderCollect) :: AttrOrderMap) ((_tlIattrOrderCollect) :: AttrOrderMap) ->+ _hdIattrOrderCollect `orderMapUnion` _tlIattrOrderCollect+ {-# INLINE rule679 #-}+ rule679 = \ ((_hdIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ((_tlIcollectedArounds) :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]) ->+ _hdIcollectedArounds ++ _tlIcollectedArounds+ {-# INLINE rule680 #-}+ rule680 = \ ((_hdIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ((_tlIcollectedAugments) :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]) ->+ _hdIcollectedAugments ++ _tlIcollectedAugments+ {-# INLINE rule681 #-}+ rule681 = \ ((_hdIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ((_tlIcollectedInsts) :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]) ->+ _hdIcollectedInsts ++ _tlIcollectedInsts+ {-# INLINE rule682 #-}+ rule682 = \ ((_hdIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ((_tlIcollectedMerges) :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]) ->+ _hdIcollectedMerges ++ _tlIcollectedMerges+ {-# INLINE rule683 #-}+ rule683 = \ ((_hdIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ((_tlIcollectedRules) :: [ (NontermIdent, ConstructorIdent, RuleInfo)]) ->+ _hdIcollectedRules ++ _tlIcollectedRules+ {-# INLINE rule684 #-}+ rule684 = \ ((_hdIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ((_tlIcollectedSigs) :: [ (NontermIdent, ConstructorIdent, SigInfo) ]) ->+ _hdIcollectedSigs ++ _tlIcollectedSigs+ {-# INLINE rule685 #-}+ rule685 = \ ((_hdIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ((_tlIcollectedUniques) :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]) ->+ _hdIcollectedUniques ++ _tlIcollectedUniques+ {-# INLINE rule686 #-}+ rule686 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule687 #-}+ rule687 = \ ((_hdIsemPragmasCollect) :: PragmaMap) ((_tlIsemPragmasCollect) :: PragmaMap) ->+ _hdIsemPragmasCollect `pragmaMapUnion` _tlIsemPragmasCollect+ {-# INLINE rule688 #-}+ rule688 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrDecls+ {-# INLINE rule689 #-}+ rule689 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrs+ {-# INLINE rule690 #-}+ rule690 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule691 #-}+ rule691 = \ ((_lhsInts) :: Set NontermIdent) ->+ _lhsInts+ {-# INLINE rule692 #-}+ rule692 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule693 #-}+ rule693 = \ ((_lhsIallAttrDecls) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrDecls+ {-# INLINE rule694 #-}+ rule694 = \ ((_lhsIallAttrs) :: Map NontermIdent (Attributes, Attributes)) ->+ _lhsIallAttrs+ {-# INLINE rule695 #-}+ rule695 = \ ((_lhsIallFields) :: DataTypes) ->+ _lhsIallFields+ {-# INLINE rule696 #-}+ rule696 = \ ((_lhsInts) :: Set NontermIdent) ->+ _lhsInts+ {-# INLINE rule697 #-}+ rule697 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_SemAlts_Nil #-}+sem_SemAlts_Nil :: T_SemAlts +sem_SemAlts_Nil = T_SemAlts (return st41) where+ {-# NOINLINE st41 #-}+ st41 = let+ v40 :: T_SemAlts_v40 + v40 = \ (T_SemAlts_vIn40 _lhsIallAttrDecls _lhsIallAttrs _lhsIallFields _lhsInts _lhsIoptions) -> ( let+ _lhsOattrOrderCollect :: AttrOrderMap+ _lhsOattrOrderCollect = rule698 ()+ _lhsOcollectedArounds :: [ (NontermIdent, ConstructorIdent, [AroundInfo]) ]+ _lhsOcollectedArounds = rule699 ()+ _lhsOcollectedAugments :: [ (NontermIdent, ConstructorIdent, [AugmentInfo]) ]+ _lhsOcollectedAugments = rule700 ()+ _lhsOcollectedInsts :: [ (NontermIdent, ConstructorIdent, [Identifier]) ]+ _lhsOcollectedInsts = rule701 ()+ _lhsOcollectedMerges :: [ (NontermIdent, ConstructorIdent, [MergeInfo]) ]+ _lhsOcollectedMerges = rule702 ()+ _lhsOcollectedRules :: [ (NontermIdent, ConstructorIdent, RuleInfo)]+ _lhsOcollectedRules = rule703 ()+ _lhsOcollectedSigs :: [ (NontermIdent, ConstructorIdent, SigInfo) ]+ _lhsOcollectedSigs = rule704 ()+ _lhsOcollectedUniques :: [ (NontermIdent, ConstructorIdent, [UniqueInfo]) ]+ _lhsOcollectedUniques = rule705 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule706 ()+ _lhsOsemPragmasCollect :: PragmaMap+ _lhsOsemPragmasCollect = rule707 ()+ __result_ = T_SemAlts_vOut40 _lhsOattrOrderCollect _lhsOcollectedArounds _lhsOcollectedAugments _lhsOcollectedInsts _lhsOcollectedMerges _lhsOcollectedRules _lhsOcollectedSigs _lhsOcollectedUniques _lhsOerrors _lhsOsemPragmasCollect+ in __result_ )+ in C_SemAlts_s41 v40+ {-# INLINE rule698 #-}+ rule698 = \ (_ :: ()) ->+ Map.empty+ {-# INLINE rule699 #-}+ rule699 = \ (_ :: ()) ->+ []+ {-# INLINE rule700 #-}+ rule700 = \ (_ :: ()) ->+ []+ {-# INLINE rule701 #-}+ rule701 = \ (_ :: ()) ->+ []+ {-# INLINE rule702 #-}+ rule702 = \ (_ :: ()) ->+ []+ {-# INLINE rule703 #-}+ rule703 = \ (_ :: ()) ->+ []+ {-# INLINE rule704 #-}+ rule704 = \ (_ :: ()) ->+ []+ {-# INLINE rule705 #-}+ rule705 = \ (_ :: ()) ->+ []+ {-# INLINE rule706 #-}+ rule706 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule707 #-}+ rule707 = \ (_ :: ()) ->+ Map.empty++-- SemDef ------------------------------------------------------+-- wrapper+data Inh_SemDef = Inh_SemDef { options_Inh_SemDef :: (Options) }+data Syn_SemDef = Syn_SemDef { aroundInfos_Syn_SemDef :: ([AroundInfo]), augmentInfos_Syn_SemDef :: ([AugmentInfo]), definedInsts_Syn_SemDef :: ([Identifier]), errors_Syn_SemDef :: (Seq Error), mergeInfos_Syn_SemDef :: ([MergeInfo]), orderDepsCollect_Syn_SemDef :: (Set Dependency), pragmaNamesCollect_Syn_SemDef :: ([Identifier]), ruleInfos_Syn_SemDef :: ([RuleInfo]), sigInfos_Syn_SemDef :: ([SigInfo]), uniqueInfos_Syn_SemDef :: ([UniqueInfo]) }+{-# INLINABLE wrap_SemDef #-}+wrap_SemDef :: T_SemDef -> Inh_SemDef -> (Syn_SemDef )+wrap_SemDef (T_SemDef act) (Inh_SemDef _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_SemDef_vIn43 _lhsIoptions+ (T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos) <- return (inv_SemDef_s44 sem arg)+ return (Syn_SemDef _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos)+ )++-- cata+{-# NOINLINE sem_SemDef #-}+sem_SemDef :: SemDef -> T_SemDef +sem_SemDef ( Def pos_ mbName_ pattern_ rhs_ owrt_ pure_ eager_ ) = sem_SemDef_Def pos_ mbName_ ( sem_Pattern pattern_ ) rhs_ owrt_ pure_ eager_+sem_SemDef ( TypeDef pos_ ident_ tp_ ) = sem_SemDef_TypeDef pos_ ident_ tp_+sem_SemDef ( UniqueDef ident_ ref_ ) = sem_SemDef_UniqueDef ident_ ref_+sem_SemDef ( AugmentDef ident_ rhs_ ) = sem_SemDef_AugmentDef ident_ rhs_+sem_SemDef ( AroundDef ident_ rhs_ ) = sem_SemDef_AroundDef ident_ rhs_+sem_SemDef ( MergeDef target_ nt_ sources_ rhs_ ) = sem_SemDef_MergeDef target_ nt_ sources_ rhs_+sem_SemDef ( SemPragma names_ ) = sem_SemDef_SemPragma names_+sem_SemDef ( AttrOrderBefore before_ after_ ) = sem_SemDef_AttrOrderBefore before_ after_++-- semantic domain+newtype T_SemDef = T_SemDef {+ attach_T_SemDef :: Identity (T_SemDef_s44 )+ }+newtype T_SemDef_s44 = C_SemDef_s44 {+ inv_SemDef_s44 :: (T_SemDef_v43 )+ }+data T_SemDef_s45 = C_SemDef_s45+type T_SemDef_v43 = (T_SemDef_vIn43 ) -> (T_SemDef_vOut43 )+data T_SemDef_vIn43 = T_SemDef_vIn43 (Options)+data T_SemDef_vOut43 = T_SemDef_vOut43 ([AroundInfo]) ([AugmentInfo]) ([Identifier]) (Seq Error) ([MergeInfo]) (Set Dependency) ([Identifier]) ([RuleInfo]) ([SigInfo]) ([UniqueInfo])+{-# NOINLINE sem_SemDef_Def #-}+sem_SemDef_Def :: (Pos) -> (Maybe Identifier) -> T_Pattern -> (Expression) -> (Bool) -> (Bool) -> (Bool) -> T_SemDef +sem_SemDef_Def _ arg_mbName_ arg_pattern_ arg_rhs_ arg_owrt_ arg_pure_ arg_eager_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _patternX32 = Control.Monad.Identity.runIdentity (attach_T_Pattern (arg_pattern_))+ (T_Pattern_vOut31 _patternIcopy _patternIdefinedAttrs _patternIdefinedInsts _patternIpatunder _patternIstpos) = inv_Pattern_s32 _patternX32 (T_Pattern_vIn31 )+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule708 _lhsIoptions arg_rhs_+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule709 _patternIdefinedAttrs _patternIpatunder _patternIstpos arg_eager_ arg_mbName_ arg_owrt_ arg_pure_ arg_rhs_+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule710 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule711 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule712 _patternIdefinedInsts+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule713 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule714 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule715 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule716 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule717 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule708 #-}+ {-# LINE 556 "./src-ag/Transform.ag" #-}+ rule708 = \ ((_lhsIoptions) :: Options) rhs_ ->+ {-# LINE 556 "./src-ag/Transform.ag" #-}+ if checkParseRhs _lhsIoptions+ then Seq.fromList $ checkRhs rhs_+ else Seq.empty+ {-# LINE 5603 "dist/build/Transform.hs"#-}+ {-# INLINE rule709 #-}+ {-# LINE 1162 "./src-ag/Transform.ag" #-}+ rule709 = \ ((_patternIdefinedAttrs) :: [AttrName]) ((_patternIpatunder) :: [AttrName]->Pattern) ((_patternIstpos) :: Pos) eager_ mbName_ owrt_ pure_ rhs_ ->+ {-# LINE 1162 "./src-ag/Transform.ag" #-}+ [ (mbName_, _patternIpatunder, rhs_, _patternIdefinedAttrs, owrt_, show _patternIstpos, pure_, eager_) ]+ {-# LINE 5609 "dist/build/Transform.hs"#-}+ {-# INLINE rule710 #-}+ rule710 = \ (_ :: ()) ->+ []+ {-# INLINE rule711 #-}+ rule711 = \ (_ :: ()) ->+ []+ {-# INLINE rule712 #-}+ rule712 = \ ((_patternIdefinedInsts) :: [Identifier]) ->+ _patternIdefinedInsts+ {-# INLINE rule713 #-}+ rule713 = \ (_ :: ()) ->+ []+ {-# INLINE rule714 #-}+ rule714 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule715 #-}+ rule715 = \ (_ :: ()) ->+ []+ {-# INLINE rule716 #-}+ rule716 = \ (_ :: ()) ->+ []+ {-# INLINE rule717 #-}+ rule717 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_TypeDef #-}+sem_SemDef_TypeDef :: (Pos) -> (Identifier) -> (Type) -> T_SemDef +sem_SemDef_TypeDef arg_pos_ arg_ident_ arg_tp_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule718 _lhsIoptions arg_pos_ arg_tp_+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule719 arg_ident_ arg_tp_+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule720 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule721 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule722 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule723 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule724 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule725 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule726 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule727 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule718 #-}+ {-# LINE 563 "./src-ag/Transform.ag" #-}+ rule718 = \ ((_lhsIoptions) :: Options) pos_ tp_ ->+ {-# LINE 563 "./src-ag/Transform.ag" #-}+ if checkParseTy _lhsIoptions+ then case tp_ of+ Haskell s -> let ex = Expression pos_ tks+ tks = [tk]+ tk = HsToken s pos_+ in Seq.fromList $ checkTy ex+ _ -> Seq.empty+ else Seq.empty+ {-# LINE 5676 "dist/build/Transform.hs"#-}+ {-# INLINE rule719 #-}+ {-# LINE 1165 "./src-ag/Transform.ag" #-}+ rule719 = \ ident_ tp_ ->+ {-# LINE 1165 "./src-ag/Transform.ag" #-}+ [ (ident_, tp_) ]+ {-# LINE 5682 "dist/build/Transform.hs"#-}+ {-# INLINE rule720 #-}+ rule720 = \ (_ :: ()) ->+ []+ {-# INLINE rule721 #-}+ rule721 = \ (_ :: ()) ->+ []+ {-# INLINE rule722 #-}+ rule722 = \ (_ :: ()) ->+ []+ {-# INLINE rule723 #-}+ rule723 = \ (_ :: ()) ->+ []+ {-# INLINE rule724 #-}+ rule724 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule725 #-}+ rule725 = \ (_ :: ()) ->+ []+ {-# INLINE rule726 #-}+ rule726 = \ (_ :: ()) ->+ []+ {-# INLINE rule727 #-}+ rule727 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_UniqueDef #-}+sem_SemDef_UniqueDef :: (Identifier) -> (Identifier) -> T_SemDef +sem_SemDef_UniqueDef arg_ident_ arg_ref_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule728 arg_ident_ arg_ref_+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule729 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule730 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule731 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule732 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule733 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule734 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule735 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule736 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule737 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule728 #-}+ {-# LINE 1168 "./src-ag/Transform.ag" #-}+ rule728 = \ ident_ ref_ ->+ {-# LINE 1168 "./src-ag/Transform.ag" #-}+ [ (ident_, ref_) ]+ {-# LINE 5742 "dist/build/Transform.hs"#-}+ {-# INLINE rule729 #-}+ rule729 = \ (_ :: ()) ->+ []+ {-# INLINE rule730 #-}+ rule730 = \ (_ :: ()) ->+ []+ {-# INLINE rule731 #-}+ rule731 = \ (_ :: ()) ->+ []+ {-# INLINE rule732 #-}+ rule732 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule733 #-}+ rule733 = \ (_ :: ()) ->+ []+ {-# INLINE rule734 #-}+ rule734 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule735 #-}+ rule735 = \ (_ :: ()) ->+ []+ {-# INLINE rule736 #-}+ rule736 = \ (_ :: ()) ->+ []+ {-# INLINE rule737 #-}+ rule737 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_AugmentDef #-}+sem_SemDef_AugmentDef :: (Identifier) -> (Expression) -> T_SemDef +sem_SemDef_AugmentDef arg_ident_ arg_rhs_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule738 arg_ident_ arg_rhs_+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule739 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule740 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule741 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule742 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule743 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule744 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule745 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule746 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule747 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule738 #-}+ {-# LINE 1171 "./src-ag/Transform.ag" #-}+ rule738 = \ ident_ rhs_ ->+ {-# LINE 1171 "./src-ag/Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 5805 "dist/build/Transform.hs"#-}+ {-# INLINE rule739 #-}+ rule739 = \ (_ :: ()) ->+ []+ {-# INLINE rule740 #-}+ rule740 = \ (_ :: ()) ->+ []+ {-# INLINE rule741 #-}+ rule741 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule742 #-}+ rule742 = \ (_ :: ()) ->+ []+ {-# INLINE rule743 #-}+ rule743 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule744 #-}+ rule744 = \ (_ :: ()) ->+ []+ {-# INLINE rule745 #-}+ rule745 = \ (_ :: ()) ->+ []+ {-# INLINE rule746 #-}+ rule746 = \ (_ :: ()) ->+ []+ {-# INLINE rule747 #-}+ rule747 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_AroundDef #-}+sem_SemDef_AroundDef :: (Identifier) -> (Expression) -> T_SemDef +sem_SemDef_AroundDef arg_ident_ arg_rhs_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule748 arg_ident_ arg_rhs_+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule749 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule750 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule751 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule752 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule753 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule754 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule755 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule756 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule757 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule748 #-}+ {-# LINE 1174 "./src-ag/Transform.ag" #-}+ rule748 = \ ident_ rhs_ ->+ {-# LINE 1174 "./src-ag/Transform.ag" #-}+ [ (ident_, rhs_) ]+ {-# LINE 5868 "dist/build/Transform.hs"#-}+ {-# INLINE rule749 #-}+ rule749 = \ (_ :: ()) ->+ []+ {-# INLINE rule750 #-}+ rule750 = \ (_ :: ()) ->+ []+ {-# INLINE rule751 #-}+ rule751 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule752 #-}+ rule752 = \ (_ :: ()) ->+ []+ {-# INLINE rule753 #-}+ rule753 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule754 #-}+ rule754 = \ (_ :: ()) ->+ []+ {-# INLINE rule755 #-}+ rule755 = \ (_ :: ()) ->+ []+ {-# INLINE rule756 #-}+ rule756 = \ (_ :: ()) ->+ []+ {-# INLINE rule757 #-}+ rule757 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_MergeDef #-}+sem_SemDef_MergeDef :: (Identifier) -> (Identifier) -> ([Identifier]) -> (Expression) -> T_SemDef +sem_SemDef_MergeDef arg_target_ arg_nt_ arg_sources_ arg_rhs_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule758 _lhsIoptions arg_rhs_+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule759 arg_nt_ arg_rhs_ arg_sources_ arg_target_+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule760 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule761 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule762 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule763 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule764 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule765 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule766 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule767 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule758 #-}+ {-# LINE 556 "./src-ag/Transform.ag" #-}+ rule758 = \ ((_lhsIoptions) :: Options) rhs_ ->+ {-# LINE 556 "./src-ag/Transform.ag" #-}+ if checkParseRhs _lhsIoptions+ then Seq.fromList $ checkRhs rhs_+ else Seq.empty+ {-# LINE 5933 "dist/build/Transform.hs"#-}+ {-# INLINE rule759 #-}+ {-# LINE 1177 "./src-ag/Transform.ag" #-}+ rule759 = \ nt_ rhs_ sources_ target_ ->+ {-# LINE 1177 "./src-ag/Transform.ag" #-}+ [ (target_, nt_, sources_, rhs_) ]+ {-# LINE 5939 "dist/build/Transform.hs"#-}+ {-# INLINE rule760 #-}+ rule760 = \ (_ :: ()) ->+ []+ {-# INLINE rule761 #-}+ rule761 = \ (_ :: ()) ->+ []+ {-# INLINE rule762 #-}+ rule762 = \ (_ :: ()) ->+ []+ {-# INLINE rule763 #-}+ rule763 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule764 #-}+ rule764 = \ (_ :: ()) ->+ []+ {-# INLINE rule765 #-}+ rule765 = \ (_ :: ()) ->+ []+ {-# INLINE rule766 #-}+ rule766 = \ (_ :: ()) ->+ []+ {-# INLINE rule767 #-}+ rule767 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_SemPragma #-}+sem_SemDef_SemPragma :: ([NontermIdent]) -> T_SemDef +sem_SemDef_SemPragma arg_names_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule768 arg_names_+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule769 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule770 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule771 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule772 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule773 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule774 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule775 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule776 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule777 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule768 #-}+ {-# LINE 898 "./src-ag/Transform.ag" #-}+ rule768 = \ names_ ->+ {-# LINE 898 "./src-ag/Transform.ag" #-}+ names_+ {-# LINE 5999 "dist/build/Transform.hs"#-}+ {-# INLINE rule769 #-}+ rule769 = \ (_ :: ()) ->+ []+ {-# INLINE rule770 #-}+ rule770 = \ (_ :: ()) ->+ []+ {-# INLINE rule771 #-}+ rule771 = \ (_ :: ()) ->+ []+ {-# INLINE rule772 #-}+ rule772 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule773 #-}+ rule773 = \ (_ :: ()) ->+ []+ {-# INLINE rule774 #-}+ rule774 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule775 #-}+ rule775 = \ (_ :: ()) ->+ []+ {-# INLINE rule776 #-}+ rule776 = \ (_ :: ()) ->+ []+ {-# INLINE rule777 #-}+ rule777 = \ (_ :: ()) ->+ []+{-# NOINLINE sem_SemDef_AttrOrderBefore #-}+sem_SemDef_AttrOrderBefore :: ([Occurrence]) -> ([Occurrence]) -> T_SemDef +sem_SemDef_AttrOrderBefore arg_before_ arg_after_ = T_SemDef (return st44) where+ {-# NOINLINE st44 #-}+ st44 = let+ v43 :: T_SemDef_v43 + v43 = \ (T_SemDef_vIn43 _lhsIoptions) -> ( let+ _dependency = rule778 arg_after_ arg_before_+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule779 _dependency+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule780 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule781 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule782 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule783 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule784 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule785 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule786 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule787 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule788 ()+ __result_ = T_SemDef_vOut43 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDef_s44 v43+ {-# INLINE rule778 #-}+ {-# LINE 929 "./src-ag/Transform.ag" #-}+ rule778 = \ after_ before_ ->+ {-# LINE 929 "./src-ag/Transform.ag" #-}+ [ Dependency b a | b <- before_, a <- after_ ]+ {-# LINE 6063 "dist/build/Transform.hs"#-}+ {-# INLINE rule779 #-}+ {-# LINE 930 "./src-ag/Transform.ag" #-}+ rule779 = \ _dependency ->+ {-# LINE 930 "./src-ag/Transform.ag" #-}+ Set.fromList _dependency+ {-# LINE 6069 "dist/build/Transform.hs"#-}+ {-# INLINE rule780 #-}+ rule780 = \ (_ :: ()) ->+ []+ {-# INLINE rule781 #-}+ rule781 = \ (_ :: ()) ->+ []+ {-# INLINE rule782 #-}+ rule782 = \ (_ :: ()) ->+ []+ {-# INLINE rule783 #-}+ rule783 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule784 #-}+ rule784 = \ (_ :: ()) ->+ []+ {-# INLINE rule785 #-}+ rule785 = \ (_ :: ()) ->+ []+ {-# INLINE rule786 #-}+ rule786 = \ (_ :: ()) ->+ []+ {-# INLINE rule787 #-}+ rule787 = \ (_ :: ()) ->+ []+ {-# INLINE rule788 #-}+ rule788 = \ (_ :: ()) ->+ []++-- SemDefs -----------------------------------------------------+-- wrapper+data Inh_SemDefs = Inh_SemDefs { options_Inh_SemDefs :: (Options) }+data Syn_SemDefs = Syn_SemDefs { aroundInfos_Syn_SemDefs :: ([AroundInfo]), augmentInfos_Syn_SemDefs :: ([AugmentInfo]), definedInsts_Syn_SemDefs :: ([Identifier]), errors_Syn_SemDefs :: (Seq Error), mergeInfos_Syn_SemDefs :: ([MergeInfo]), orderDepsCollect_Syn_SemDefs :: (Set Dependency), pragmaNamesCollect_Syn_SemDefs :: ([Identifier]), ruleInfos_Syn_SemDefs :: ([RuleInfo]), sigInfos_Syn_SemDefs :: ([SigInfo]), uniqueInfos_Syn_SemDefs :: ([UniqueInfo]) }+{-# INLINABLE wrap_SemDefs #-}+wrap_SemDefs :: T_SemDefs -> Inh_SemDefs -> (Syn_SemDefs )+wrap_SemDefs (T_SemDefs act) (Inh_SemDefs _lhsIoptions) =+ Control.Monad.Identity.runIdentity (+ do sem <- act+ let arg = T_SemDefs_vIn46 _lhsIoptions+ (T_SemDefs_vOut46 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos) <- return (inv_SemDefs_s47 sem arg)+ return (Syn_SemDefs _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos)+ )++-- cata+{-# NOINLINE sem_SemDefs #-}+sem_SemDefs :: SemDefs -> T_SemDefs +sem_SemDefs list = Prelude.foldr sem_SemDefs_Cons sem_SemDefs_Nil (Prelude.map sem_SemDef list)++-- semantic domain+newtype T_SemDefs = T_SemDefs {+ attach_T_SemDefs :: Identity (T_SemDefs_s47 )+ }+newtype T_SemDefs_s47 = C_SemDefs_s47 {+ inv_SemDefs_s47 :: (T_SemDefs_v46 )+ }+data T_SemDefs_s48 = C_SemDefs_s48+type T_SemDefs_v46 = (T_SemDefs_vIn46 ) -> (T_SemDefs_vOut46 )+data T_SemDefs_vIn46 = T_SemDefs_vIn46 (Options)+data T_SemDefs_vOut46 = T_SemDefs_vOut46 ([AroundInfo]) ([AugmentInfo]) ([Identifier]) (Seq Error) ([MergeInfo]) (Set Dependency) ([Identifier]) ([RuleInfo]) ([SigInfo]) ([UniqueInfo])+{-# NOINLINE sem_SemDefs_Cons #-}+sem_SemDefs_Cons :: T_SemDef -> T_SemDefs -> T_SemDefs +sem_SemDefs_Cons arg_hd_ arg_tl_ = T_SemDefs (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_SemDefs_v46 + v46 = \ (T_SemDefs_vIn46 _lhsIoptions) -> ( let+ _hdX44 = Control.Monad.Identity.runIdentity (attach_T_SemDef (arg_hd_))+ _tlX47 = Control.Monad.Identity.runIdentity (attach_T_SemDefs (arg_tl_))+ (T_SemDef_vOut43 _hdIaroundInfos _hdIaugmentInfos _hdIdefinedInsts _hdIerrors _hdImergeInfos _hdIorderDepsCollect _hdIpragmaNamesCollect _hdIruleInfos _hdIsigInfos _hdIuniqueInfos) = inv_SemDef_s44 _hdX44 (T_SemDef_vIn43 _hdOoptions)+ (T_SemDefs_vOut46 _tlIaroundInfos _tlIaugmentInfos _tlIdefinedInsts _tlIerrors _tlImergeInfos _tlIorderDepsCollect _tlIpragmaNamesCollect _tlIruleInfos _tlIsigInfos _tlIuniqueInfos) = inv_SemDefs_s47 _tlX47 (T_SemDefs_vIn46 _tlOoptions)+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule789 _hdIaroundInfos _tlIaroundInfos+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule790 _hdIaugmentInfos _tlIaugmentInfos+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule791 _hdIdefinedInsts _tlIdefinedInsts+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule792 _hdIerrors _tlIerrors+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule793 _hdImergeInfos _tlImergeInfos+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule794 _hdIorderDepsCollect _tlIorderDepsCollect+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule795 _hdIpragmaNamesCollect _tlIpragmaNamesCollect+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule796 _hdIruleInfos _tlIruleInfos+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule797 _hdIsigInfos _tlIsigInfos+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule798 _hdIuniqueInfos _tlIuniqueInfos+ _hdOoptions = rule799 _lhsIoptions+ _tlOoptions = rule800 _lhsIoptions+ __result_ = T_SemDefs_vOut46 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDefs_s47 v46+ {-# INLINE rule789 #-}+ rule789 = \ ((_hdIaroundInfos) :: [AroundInfo]) ((_tlIaroundInfos) :: [AroundInfo]) ->+ _hdIaroundInfos ++ _tlIaroundInfos+ {-# INLINE rule790 #-}+ rule790 = \ ((_hdIaugmentInfos) :: [AugmentInfo]) ((_tlIaugmentInfos) :: [AugmentInfo]) ->+ _hdIaugmentInfos ++ _tlIaugmentInfos+ {-# INLINE rule791 #-}+ rule791 = \ ((_hdIdefinedInsts) :: [Identifier]) ((_tlIdefinedInsts) :: [Identifier]) ->+ _hdIdefinedInsts ++ _tlIdefinedInsts+ {-# INLINE rule792 #-}+ rule792 = \ ((_hdIerrors) :: Seq Error) ((_tlIerrors) :: Seq Error) ->+ _hdIerrors Seq.>< _tlIerrors+ {-# INLINE rule793 #-}+ rule793 = \ ((_hdImergeInfos) :: [MergeInfo]) ((_tlImergeInfos) :: [MergeInfo]) ->+ _hdImergeInfos ++ _tlImergeInfos+ {-# INLINE rule794 #-}+ rule794 = \ ((_hdIorderDepsCollect) :: Set Dependency) ((_tlIorderDepsCollect) :: Set Dependency) ->+ _hdIorderDepsCollect `Set.union` _tlIorderDepsCollect+ {-# INLINE rule795 #-}+ rule795 = \ ((_hdIpragmaNamesCollect) :: [Identifier]) ((_tlIpragmaNamesCollect) :: [Identifier]) ->+ _hdIpragmaNamesCollect ++ _tlIpragmaNamesCollect+ {-# INLINE rule796 #-}+ rule796 = \ ((_hdIruleInfos) :: [RuleInfo]) ((_tlIruleInfos) :: [RuleInfo]) ->+ _hdIruleInfos ++ _tlIruleInfos+ {-# INLINE rule797 #-}+ rule797 = \ ((_hdIsigInfos) :: [SigInfo]) ((_tlIsigInfos) :: [SigInfo]) ->+ _hdIsigInfos ++ _tlIsigInfos+ {-# INLINE rule798 #-}+ rule798 = \ ((_hdIuniqueInfos) :: [UniqueInfo]) ((_tlIuniqueInfos) :: [UniqueInfo]) ->+ _hdIuniqueInfos ++ _tlIuniqueInfos+ {-# INLINE rule799 #-}+ rule799 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+ {-# INLINE rule800 #-}+ rule800 = \ ((_lhsIoptions) :: Options) ->+ _lhsIoptions+{-# NOINLINE sem_SemDefs_Nil #-}+sem_SemDefs_Nil :: T_SemDefs +sem_SemDefs_Nil = T_SemDefs (return st47) where+ {-# NOINLINE st47 #-}+ st47 = let+ v46 :: T_SemDefs_v46 + v46 = \ (T_SemDefs_vIn46 _lhsIoptions) -> ( let+ _lhsOaroundInfos :: [AroundInfo]+ _lhsOaroundInfos = rule801 ()+ _lhsOaugmentInfos :: [AugmentInfo]+ _lhsOaugmentInfos = rule802 ()+ _lhsOdefinedInsts :: [Identifier]+ _lhsOdefinedInsts = rule803 ()+ _lhsOerrors :: Seq Error+ _lhsOerrors = rule804 ()+ _lhsOmergeInfos :: [MergeInfo]+ _lhsOmergeInfos = rule805 ()+ _lhsOorderDepsCollect :: Set Dependency+ _lhsOorderDepsCollect = rule806 ()+ _lhsOpragmaNamesCollect :: [Identifier]+ _lhsOpragmaNamesCollect = rule807 ()+ _lhsOruleInfos :: [RuleInfo]+ _lhsOruleInfos = rule808 ()+ _lhsOsigInfos :: [SigInfo]+ _lhsOsigInfos = rule809 ()+ _lhsOuniqueInfos :: [UniqueInfo]+ _lhsOuniqueInfos = rule810 ()+ __result_ = T_SemDefs_vOut46 _lhsOaroundInfos _lhsOaugmentInfos _lhsOdefinedInsts _lhsOerrors _lhsOmergeInfos _lhsOorderDepsCollect _lhsOpragmaNamesCollect _lhsOruleInfos _lhsOsigInfos _lhsOuniqueInfos+ in __result_ )+ in C_SemDefs_s47 v46+ {-# INLINE rule801 #-}+ rule801 = \ (_ :: ()) ->+ []+ {-# INLINE rule802 #-}+ rule802 = \ (_ :: ()) ->+ []+ {-# INLINE rule803 #-}+ rule803 = \ (_ :: ()) ->+ []+ {-# INLINE rule804 #-}+ rule804 = \ (_ :: ()) ->+ Seq.empty+ {-# INLINE rule805 #-}+ rule805 = \ (_ :: ()) ->+ []+ {-# INLINE rule806 #-}+ rule806 = \ (_ :: ()) ->+ Set.empty+ {-# INLINE rule807 #-}+ rule807 = \ (_ :: ()) ->+ []+ {-# INLINE rule808 #-}+ rule808 = \ (_ :: ()) ->+ []+ {-# INLINE rule809 #-}+ rule809 = \ (_ :: ()) ->+ []+ {-# INLINE rule810 #-}+ rule810 = \ (_ :: ()) -> []
src-generated/Visage.hs view
@@ -2,25 +2,25 @@ {-# LANGUAGE ScopedTypeVariables #-} module Visage where-{-# LINE 2 "./src-ag/VisageSyntax.ag" #-}+{-# LINE 2 "./src-ag/Expression.ag" #-} -import CommonTypes-import UU.Pretty-import AbstractSyntax-import VisagePatterns-import Expression-{-# LINE 13 "dist/build/Visage.hs" #-}+import UU.Scanner.Position(Pos)+import HsToken+{-# LINE 10 "dist/build/Visage.hs" #-} {-# LINE 2 "./src-ag/VisagePatterns.ag" #-} import UU.Scanner.Position(Pos) import CommonTypes-{-# LINE 19 "dist/build/Visage.hs" #-}+{-# LINE 16 "dist/build/Visage.hs" #-} -{-# LINE 2 "./src-ag/Expression.ag" #-}+{-# LINE 2 "./src-ag/VisageSyntax.ag" #-} -import UU.Scanner.Position(Pos)-import HsToken+import CommonTypes+import UU.Pretty+import AbstractSyntax+import VisagePatterns+import Expression {-# LINE 25 "dist/build/Visage.hs" #-} {-# LINE 6 "./src-ag/Visage.ag" #-}
src-generated/VisagePatterns.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/VisagePatterns.ag)+-- UUAGC 0.9.50 (src-ag/VisagePatterns.ag) module VisagePatterns where {-# LINE 2 "./src-ag/VisagePatterns.ag" #-}
src-generated/VisageSyntax.hs view
@@ -1,6 +1,6 @@ --- UUAGC 0.9.42.3 (src-ag/VisageSyntax.ag)+-- UUAGC 0.9.50 (src-ag/VisageSyntax.ag) module VisageSyntax where {-# LINE 2 "./src-ag/VisageSyntax.ag" #-}
src-options/Options.hs view
@@ -119,10 +119,11 @@ , MyOpt [] ["reference"] (NoArg referenceOpt) (boolOpt reference) "Use reference attributes" , MyOpt [] ["monadic"] (NoArg monadicOpt) (boolOpt monadic) "Experimental: generate monadic code" , MyOpt [] ["ocaml"] (NoArg ocamlOpt) (boolOpt ocaml) "Generate Ocaml code"+ , MyOpt [] ["cleanlang"] (NoArg cleanOpt) (boolOpt clean) "Generate Clean code" , MyOpt [] ["breadthfirst"] (NoArg breadthfirstOpt) (boolOpt breadthFirst)"Experimental: generate breadth-first code" , MyOpt [] ["breadthfirst-strict"] (NoArg breadthfirstStrictOpt) (boolOpt breadthFirstStrict) "Experimental: outermost breadth-first evaluator is strict instead of lazy" , MyOpt [] ["visitcode"] (NoArg visitorsOutputOpt) (boolOpt visitorsOutput) "Experimental: generate visitors code"- , MyOpt [] ["kennedywarren"] (NoArg kennedyWarrenOpt) (boolOpt kennedyWarren) "Experimental: use Kennedy-Warren's algorithm for ordering"+ , MyOpt [] ["kennedywarren"] (NoArg kennedyWarrenOpt) (boolOpt kennedyWarren) "Use Kennedy-Warren's algorithm for ordering" , MyOpt [] ["statistics"] (ReqArg statisticsOpt "FILE to append to") (mbStringOpt statsFile) "Append statistics to FILE" , MyOpt [] ["checkParseRhs"] (NoArg parseHsRhsOpt) (boolOpt checkParseRhs) "Parse RHS of rules with Haskell parser" , MyOpt [] ["checkParseTys"] (NoArg parseHsTpOpt) (boolOpt checkParseTy) "Parse types of attrs with Haskell parser"@@ -213,6 +214,7 @@ , doubleColons :: Bool , monadic :: Bool , ocaml :: Bool+ , clean :: Bool , visitorsOutput :: Bool , statsFile :: Maybe String , breadthFirst :: Bool@@ -308,6 +310,7 @@ , doubleColons = False , monadic = False , ocaml = False+ , clean = False , visitorsOutput = False , statsFile = Nothing , breadthFirst = False@@ -358,7 +361,7 @@ Name s -> [nm++"="++s] Default -> [nm] -dataOpt, dataRecOpt, strictDataOpt, strictWrapOpt, cataOpt, semfunsOpt, signaturesOpt, prettyOpt,renameOpt, wrappersOpt, modcopyOpt, newtypesOpt, nestOpt, smacroOpt, verboseOpt, helpOpt, versionOpt, selfOpt, cycleOpt, visitOpt, seqOpt, unboxOpt, bangpatsOpt, casesOpt, strictCasesOpt, stricterCasesOpt, strictSemOpt, localCpsOpt, splitSemsOpt, werrorsOpt, wignoreOpt, dumpgrammarOpt, dumpcgrammarOpt, genTracesOpt, genUseTracesOpt, genCostCentresOpt, sepSemModsOpt, genFileDepsOpt, genLinePragmasOpt, genVisageOpt, genAspectAGOpt, dummyTokenVisitOpt, tupleAsDummyTokenOpt, stateAsDummyTokenOpt, strictDummyTokenOpt, noPerRuleTypeSigsOpt, noPerStateTypeSigsOpt, noEagerBlackholingOpt, noPerRuleCostCentresOpt, noPerVisitCostCentresOpt, helpInliningOpt, noInlinePragmasOpt, aggressiveInlinePragmasOpt, lateHigherOrderBindingOpt, monadicWrappersOpt, referenceOpt, genAttrListOpt, lcKeywordsOpt, doubleColonsOpt, haskellSyntaxOpt, monadicOpt, parallelOpt, ocamlOpt, visitorsOutputOpt, breadthfirstOpt, breadthfirstStrictOpt, parseHsRhsOpt, parseHsTpOpt, parseHsBlockOpt, parseHsOpt, kennedyWarrenOpt, noOptimizeOpt, allOpt, optimizeOpt, noIncludesOpt, beQuietOpt, condDisableOptimizations :: Options -> Options+dataOpt, dataRecOpt, strictDataOpt, strictWrapOpt, cataOpt, semfunsOpt, signaturesOpt, prettyOpt,renameOpt, wrappersOpt, modcopyOpt, newtypesOpt, nestOpt, smacroOpt, verboseOpt, helpOpt, versionOpt, selfOpt, cycleOpt, visitOpt, seqOpt, unboxOpt, bangpatsOpt, casesOpt, strictCasesOpt, stricterCasesOpt, strictSemOpt, localCpsOpt, splitSemsOpt, werrorsOpt, wignoreOpt, dumpgrammarOpt, dumpcgrammarOpt, genTracesOpt, genUseTracesOpt, genCostCentresOpt, sepSemModsOpt, genFileDepsOpt, genLinePragmasOpt, genVisageOpt, genAspectAGOpt, dummyTokenVisitOpt, tupleAsDummyTokenOpt, stateAsDummyTokenOpt, strictDummyTokenOpt, noPerRuleTypeSigsOpt, noPerStateTypeSigsOpt, noEagerBlackholingOpt, noPerRuleCostCentresOpt, noPerVisitCostCentresOpt, helpInliningOpt, noInlinePragmasOpt, aggressiveInlinePragmasOpt, lateHigherOrderBindingOpt, monadicWrappersOpt, referenceOpt, genAttrListOpt, lcKeywordsOpt, doubleColonsOpt, haskellSyntaxOpt, monadicOpt, parallelOpt, ocamlOpt, cleanOpt, visitorsOutputOpt, breadthfirstOpt, breadthfirstStrictOpt, parseHsRhsOpt, parseHsTpOpt, parseHsBlockOpt, parseHsOpt, kennedyWarrenOpt, noOptimizeOpt, allOpt, optimizeOpt, noIncludesOpt, beQuietOpt, condDisableOptimizations :: Options -> Options dataOpt opts = opts{dataTypes = True} dataRecOpt opts = opts{dataRecords = True}@@ -446,6 +449,7 @@ monadicOpt opts = opts { monadic = True } parallelOpt opts = opts { parallelInvoke = True } ocamlOpt opts = opts { ocaml = True, kennedyWarren = True, withCycle = True, visit = True }+cleanOpt opts = opts { clean = True } --TODO: More? visitorsOutputOpt opts = opts { visitorsOutput = True } statisticsOpt :: String -> Options -> Options statisticsOpt nm opts = opts { statsFile = Just nm }
src/Ag.hs view
@@ -19,20 +19,22 @@ import UU.Scanner.Position (Pos, line, file) import UU.Scanner.Token (Token) -import qualified Transform as Pass1 (sem_AG , wrap_AG , Syn_AG (..), Inh_AG (..))-import qualified Desugar as Pass1a (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))-import qualified DefaultRules as Pass2 (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))-import qualified ResolveLocals as Pass2a (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))-import qualified Order as Pass3 (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))-import qualified KWOrder as Pass3a (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))-import qualified GenerateCode as Pass4 (sem_CGrammar, wrap_CGrammar, Syn_CGrammar(..), Inh_CGrammar(..))-import qualified PrintVisitCode as Pass4a (sem_CGrammar, wrap_CGrammar, Syn_CGrammar(..), Inh_CGrammar(..))-import qualified ExecutionPlan2Hs as Pass4b (sem_ExecutionPlan, wrap_ExecutionPlan, Syn_ExecutionPlan(..), Inh_ExecutionPlan(..), warrenFlagsPP)-import qualified ExecutionPlan2Caml as Pass4c (sem_ExecutionPlan, wrap_ExecutionPlan, Syn_ExecutionPlan(..), Inh_ExecutionPlan(..))-import qualified PrintCode as Pass5 (sem_Program, wrap_Program, Syn_Program (..), Inh_Program (..))-import qualified PrintOcamlCode as Pass5a (sem_Program, wrap_Program, Syn_Program (..), Inh_Program (..))-import qualified PrintErrorMessages as PrErr (sem_Errors , wrap_Errors , Syn_Errors (..), Inh_Errors (..), isError)-import qualified TfmToVisage as PassV (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))+import qualified Transform as Pass1 (sem_AG , wrap_AG , Syn_AG (..), Inh_AG (..))+import qualified Desugar as Pass1a (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))+import qualified DefaultRules as Pass2 (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))+import qualified ResolveLocals as Pass2a (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))+import qualified Order as Pass3 (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))+import qualified KWOrder as Pass3a (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..))+import qualified GenerateCode as Pass4 (sem_CGrammar, wrap_CGrammar, Syn_CGrammar(..), Inh_CGrammar(..))+import qualified PrintVisitCode as Pass4a (sem_CGrammar, wrap_CGrammar, Syn_CGrammar(..), Inh_CGrammar(..))+import qualified ExecutionPlan2Hs as Pass4b (sem_ExecutionPlan, wrap_ExecutionPlan, Syn_ExecutionPlan(..), Inh_ExecutionPlan(..), warrenFlagsPP)+import qualified ExecutionPlan2Caml as Pass4c (sem_ExecutionPlan, wrap_ExecutionPlan, Syn_ExecutionPlan(..), Inh_ExecutionPlan(..))+import qualified ExecutionPlan2Clean as Pass4d (sem_ExecutionPlan, wrap_ExecutionPlan, Syn_ExecutionPlan(..), Inh_ExecutionPlan(..), mkIclModuleHeader, mkDclModuleHeader, cleanIclModuleHeader, cleanDclModuleHeader)+import qualified PrintCode as Pass5 (sem_Program, wrap_Program, Syn_Program (..), Inh_Program (..))+import qualified PrintOcamlCode as Pass5a (sem_Program, wrap_Program, Syn_Program (..), Inh_Program (..))+import qualified PrintCleanCode as Pass5b (sem_Program, wrap_Program, Syn_Program (..), Inh_Program (..))+import qualified PrintErrorMessages as PrErr (sem_Errors , wrap_Errors , Syn_Errors (..), Inh_Errors (..), isError)+import qualified TfmToVisage as PassV (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..)) import qualified AbstractSyntaxDump as GrammarDump (sem_Grammar, wrap_Grammar, Syn_Grammar (..), Inh_Grammar (..)) import qualified CodeSyntaxDump as CGrammarDump (sem_CGrammar, wrap_CGrammar, Syn_CGrammar (..), Inh_CGrammar (..))@@ -97,8 +99,8 @@ flags' = condDisableOptimizations (Pass1.pragmas_Syn_AG output1 flags) grammar1 = Pass1.output_Syn_AG output1 output1a = Pass1a.wrap_Grammar (Pass1a.sem_Grammar grammar1 ) Pass1a.Inh_Grammar {Pass1a.options_Inh_Grammar = flags', Pass1a.forcedIrrefutables_Inh_Grammar = irrefutableMap, Pass1a.mainName_Inh_Grammar = mainName }- grammar1a =Pass1a.output_Syn_Grammar output1a- output2 = Pass2.wrap_Grammar (Pass2.sem_Grammar grammar1a ) Pass2.Inh_Grammar {Pass2.options_Inh_Grammar = flags'}+ grammar1a = Pass1a.output_Syn_Grammar output1a+ output2 = Pass2.wrap_Grammar (Pass2.sem_Grammar grammar1a ) Pass2.Inh_Grammar {Pass2.options_Inh_Grammar = flags', Pass2.constructorTypeMap_Inh_Grammar = Pass1.constructorTypeMap_Syn_AG output1} grammar2 = Pass2.output_Syn_Grammar output2 outputV = PassV.wrap_Grammar (PassV.sem_Grammar grammar2 ) PassV.Inh_Grammar {} grammarV = PassV.visage_Syn_Grammar outputV@@ -112,13 +114,15 @@ output4a = Pass4a.wrap_CGrammar (Pass4a.sem_CGrammar(Pass3.output_Syn_Grammar output3)) Pass4a.Inh_CGrammar {Pass4a.options_Inh_CGrammar = flags'} output4b = Pass4b.wrap_ExecutionPlan (Pass4b.sem_ExecutionPlan grammar3a) Pass4b.Inh_ExecutionPlan {Pass4b.options_Inh_ExecutionPlan = flags', Pass4b.inhmap_Inh_ExecutionPlan = Pass3a.inhmap_Syn_Grammar output3a, Pass4b.synmap_Inh_ExecutionPlan = Pass3a.synmap_Syn_Grammar output3a, Pass4b.pragmaBlocks_Inh_ExecutionPlan = pragmaBlocksTxt, Pass4b.importBlocks_Inh_ExecutionPlan = importBlocksTxt, Pass4b.textBlocks_Inh_ExecutionPlan = textBlocksDoc, Pass4b.moduleHeader_Inh_ExecutionPlan = mkModuleHeader $ Pass1.moduleDecl_Syn_AG output1, Pass4b.mainName_Inh_ExecutionPlan = mkMainName mainName $ Pass1.moduleDecl_Syn_AG output1, Pass4b.mainFile_Inh_ExecutionPlan = mainFile, Pass4b.textBlockMap_Inh_ExecutionPlan = textBlockMap, Pass4b.mainBlocksDoc_Inh_ExecutionPlan = mainBlocksDoc,Pass4b.localAttrTypes_Inh_ExecutionPlan = Pass3a.localSigMap_Syn_Grammar output3a} output4c = Pass4c.wrap_ExecutionPlan (Pass4c.sem_ExecutionPlan grammar3a) Pass4c.Inh_ExecutionPlan {Pass4c.options_Inh_ExecutionPlan = flags', Pass4c.inhmap_Inh_ExecutionPlan = Pass3a.inhmap_Syn_Grammar output3a, Pass4c.synmap_Inh_ExecutionPlan = Pass3a.synmap_Syn_Grammar output3a, Pass4c.mainName_Inh_ExecutionPlan = mkMainName mainName $ Pass1.moduleDecl_Syn_AG output1, Pass4c.mainFile_Inh_ExecutionPlan = mainFile, Pass4c.localAttrTypes_Inh_ExecutionPlan = Pass3a.localSigMap_Syn_Grammar output3a}+ output4d = Pass4d.wrap_ExecutionPlan (Pass4d.sem_ExecutionPlan grammar3a) Pass4d.Inh_ExecutionPlan {Pass4d.options_Inh_ExecutionPlan = flags', Pass4d.inhmap_Inh_ExecutionPlan = Pass3a.inhmap_Syn_Grammar output3a, Pass4d.synmap_Inh_ExecutionPlan = Pass3a.synmap_Syn_Grammar output3a, Pass4d.importBlocks_Inh_ExecutionPlan = importBlocksTxt, Pass4d.textBlocks_Inh_ExecutionPlan = textBlocksDoc, Pass4d.iclModuleHeader_Inh_ExecutionPlan = Pass4d.mkIclModuleHeader $ Pass1.moduleDecl_Syn_AG output1, Pass4d.dclModuleHeader_Inh_ExecutionPlan = Pass4d.mkDclModuleHeader $ Pass1.moduleDecl_Syn_AG output1, Pass4d.mainName_Inh_ExecutionPlan = mkMainName mainName $ Pass1.moduleDecl_Syn_AG output1, Pass4d.mainFile_Inh_ExecutionPlan = mainFile, Pass4d.textBlockMap_Inh_ExecutionPlan = textBlockMap, Pass4d.mainBlocksDoc_Inh_ExecutionPlan = mainBlocksDoc,Pass4d.localAttrTypes_Inh_ExecutionPlan = Pass3a.localSigMap_Syn_Grammar output3a, Pass4d.constructorTypeMap_Inh_ExecutionPlan = Pass1.constructorTypeMap_Syn_AG output1} output5 = Pass5.wrap_Program (Pass5.sem_Program (Pass4.output_Syn_CGrammar output4)) Pass5.Inh_Program {Pass5.options_Inh_Program = flags', Pass5.pragmaBlocks_Inh_Program = pragmaBlocksTxt, Pass5.importBlocks_Inh_Program = importBlocksTxt, Pass5.textBlocks_Inh_Program = textBlocksDoc, Pass5.textBlockMap_Inh_Program = textBlockMap, Pass5.mainBlocksDoc_Inh_Program = mainBlocksDoc, Pass5.optionsLine_Inh_Program = optionsLine, Pass5.mainFile_Inh_Program = mainFile, Pass5.moduleHeader_Inh_Program = mkModuleHeader $ Pass1.moduleDecl_Syn_AG output1, Pass5.mainName_Inh_Program = mkMainName mainName $ Pass1.moduleDecl_Syn_AG output1} output5a = Pass5a.wrap_Program (Pass5a.sem_Program (Pass4.output_Syn_CGrammar output4)) Pass5a.Inh_Program { Pass5a.options_Inh_Program = flags', Pass5a.textBlockMap_Inh_Program = textBlockMap }+ output5b = Pass5b.wrap_Program (Pass5b.sem_Program (Pass4.output_Syn_CGrammar output4)) Pass5b.Inh_Program {Pass5b.options_Inh_Program = flags', Pass5b.pragmaBlocks_Inh_Program = pragmaBlocksTxt, Pass5b.importBlocks_Inh_Program = importBlocksTxt, Pass5b.textBlocks_Inh_Program = textBlocksDoc, Pass5b.textBlockMap_Inh_Program = textBlockMap, Pass5b.mainBlocksDoc_Inh_Program = mainBlocksDoc, Pass5b.optionsLine_Inh_Program = optionsLine, Pass5b.mainFile_Inh_Program = mainFile, Pass5b.moduleHeader_Inh_Program = mkModuleHeader $ Pass1.moduleDecl_Syn_AG output1, Pass5b.mainName_Inh_Program = mkMainName mainName $ Pass1.moduleDecl_Syn_AG output1} output6 = PrErr.wrap_Errors (PrErr.sem_Errors errorsToReport) PrErr.Inh_Errors {PrErr.options_Inh_Errors = flags', PrErr.dups_Inh_Errors = [] } - dump1 = GrammarDump.wrap_Grammar (GrammarDump.sem_Grammar grammar1 ) GrammarDump.Inh_Grammar- dump2 = GrammarDump.wrap_Grammar (GrammarDump.sem_Grammar grammar2 ) GrammarDump.Inh_Grammar- dump3 = CGrammarDump.wrap_CGrammar (CGrammarDump.sem_CGrammar grammar3 ) CGrammarDump.Inh_CGrammar+ dump1 = GrammarDump.wrap_Grammar (GrammarDump.sem_Grammar grammar1 ) GrammarDump.Inh_Grammar+ dump2 = GrammarDump.wrap_Grammar (GrammarDump.sem_Grammar grammar2 ) GrammarDump.Inh_Grammar+ dump3 = CGrammarDump.wrap_CGrammar (CGrammarDump.sem_CGrammar grammar3 ) CGrammarDump.Inh_CGrammar outputVisage = VisageDump.wrap_VisageGrammar (VisageDump.sem_VisageGrammar grammarV) VisageDump.Inh_VisageGrammar@@ -132,9 +136,11 @@ furtherErrors = if kennedyWarren flags' then let errs3a = Pass3a.errors_Syn_Grammar output3a in if Seq.null errs3a- then if ocaml flags' + then if ocaml flags' then toList ( Pass4c.errors_Syn_ExecutionPlan output4c )- else toList ( Pass4b.errors_Syn_ExecutionPlan output4b )+ else if clean flags'+ then toList ( Pass4d.errors_Syn_ExecutionPlan output4d )+ else toList ( Pass4b.errors_Syn_ExecutionPlan output4b ) else toList errs3a else toList ( Pass3.errors_Syn_Grammar output3 Seq.>< Pass4.errors_Syn_CGrammar output4)@@ -201,12 +207,9 @@ then parseAGI flags (searchPath flags) (agiFile input) else return (undefined, undefined) - let ext' = case ext of- Nothing -> Nothing- Just e -> Just (remAgi e)-- outAgi1 = Pass1.wrap_AG (Pass1.sem_AG outAgi ) Pass1.Inh_AG {Pass1.options_Inh_AG = flags'}- agi = Pass1.agi_Syn_AG outAgi1+ let ext' = fmap remAgi ext+ outAgi1 = Pass1.wrap_AG (Pass1.sem_AG outAgi ) Pass1.Inh_AG {Pass1.options_Inh_AG = flags'}+ agi = Pass1.agi_Syn_AG outAgi1 aspectAG = AspectAGDump.wrap_Grammar (AspectAGDump.sem_Grammar grammar2 ) AspectAGDump.Inh_Grammar { AspectAGDump.options_Inh_Grammar = flags' , AspectAGDump.agi_Inh_Grammar = agi , AspectAGDump.ext_Inh_Grammar = ext' } --marcos@@ -310,7 +313,35 @@ , text "(* main code *)" , mainBlocksDoc ]- else vlist+ else if clean flags'+ then vlist+ [ pp $ if isNothing $ Pass1.moduleDecl_Syn_AG output1+ then Pass4d.cleanIclModuleHeader flags' mainName+ else Pass4d.mkIclModuleHeader (Pass1.moduleDecl_Syn_AG output1) mainName "" "" False+ , pp importBlocksTxt+ , dataBlocksDoc+ , vlist [ pp $ "from Control.Monad.Identity import :: Identity"+ , pp $ "import qualified Control.Monad.Identity as Control.Monad.Identity"+ , pp $ "import Control.Monad.Identity"+ , pp $ "from Control.Applicative import lift"+ , pp $ "from Control.Monad import class Monad (..)"+ ]+ , mainBlocksDoc+ , textBlocksDoc+ , recBlocksDoc+ --, pp $ "{-"+ --, Pass3a.depgraphs_Syn_Grammar output3a+ --, Pass3a.visitgraph_Syn_Grammar output3a+ --, pp $ "-}"+ , Pass4d.output_Syn_ExecutionPlan output4d+ , if dumpgrammar flags'+ then vlist [ pp "/* Dump of grammar with default rules"+ , GrammarDump.pp_Syn_Grammar dump2+ , pp "*/"+ ]+ else empty]++ else vlist [ Pass4b.warrenFlagsPP flags' , pp pragmaBlocksTxt , pp $ if isNothing $ Pass1.moduleDecl_Syn_AG output1@@ -343,23 +374,25 @@ ] else empty] | otherwise- = vlist [ vlist ( if not (ocaml flags')- then [ pp optionsLine+ = vlist [ vlist ( if (ocaml flags' || clean flags')+ then []+ else [ pp optionsLine , pp pragmaBlocksTxt , pp $ take 70 ("-- UUAGC " ++ drop 50 banner ++ " (" ++ input) ++ ")" , pp $ if isNothing $ Pass1.moduleDecl_Syn_AG output1 then moduleHeader flags' mainName Nothing else mkModuleHeader (Pass1.moduleDecl_Syn_AG output1) mainName "" "" False ]- else [] ) , pp importBlocksTxt , dataBlocksDoc , mainBlocksDoc , textBlocksDoc- , vlist $ if not (ocaml flags')- then Pass5.output_Syn_Program output5- else Pass5a.output_Syn_Program output5a+ , vlist $ if (ocaml flags')+ then Pass5a.output_Syn_Program output5a+ else if (clean flags')+ then Pass5b.output_Syn_Program output5b+ else Pass5.output_Syn_Program output5 , if dumpgrammar flags' then vlist [ pp "{- Dump of grammar without default rules" , GrammarDump.pp_Syn_Grammar dump1@@ -379,6 +412,25 @@ let docTxt = disp doc 50000 "" writeFile outputfile docTxt++ -- HACK: write Clean DCL file+ if clean flags'+ then do let dclDoc =+ vlist+ [ pp $ if isNothing $ Pass1.moduleDecl_Syn_AG output1+ then Pass4d.cleanDclModuleHeader flags' mainName Nothing -- TODO: What should be there instead of Nothing?+ else Pass4d.mkDclModuleHeader (Pass1.moduleDecl_Syn_AG output1) mainName "" "" False+ , vlist [ pp $ "from Control.Monad.Identity import :: Identity"+ , pp $ "import qualified Control.Monad.Identity as Control.Monad.Identity"+ , pp $ "import Control.Monad.Identity"+ , pp $ "from Control.Applicative import lift"+ , pp $ "from Control.Monad import class Monad (..)"+ ]+ , Pass4d.output_dcl_Syn_ExecutionPlan output4d+ ]+ writeFile (replaceExtension outputfile ".dcl") (disp dclDoc 50000 "")+ else return ()+ -- HACK: write statistics let nAuto = Pass3.nAutoRules_Syn_Grammar output3 nExpl = Pass3.nExplicitRules_Syn_Grammar output3@@ -428,6 +480,7 @@ outputFile :: Options -> String -> String outputFile opts name | ocaml opts = replaceExtension name "ml"+ | clean opts = replaceExtension name "icl" | otherwise = replaceExtension name "hs" defaultModuleName :: String -> String
src/CommonTypes.hs view
@@ -74,6 +74,10 @@ = OccAttr Identifier Identifier | OccRule Identifier deriving (Eq,Ord,Show)+data ConstructorType+ = DataConstructor+ | RecordConstructor+ deriving (Eq,Ord,Show) type AttrEnv = ( [Identifier] , [(Identifier,Identifier)]@@ -134,20 +138,24 @@ recordFieldname :: NontermIdent -> ConstructorIdent -> Identifier -> String recordFieldname nt con nm = getName nm ++ "_" ++ getName nt ++ "_" ++ getName con -lhsname :: Bool -> Identifier -> String-lhsname isIn = attrname isIn _LHS+lhsname :: Options -> Bool -> Identifier -> String+lhsname opts isIn = attrname opts isIn _LHS -attrname :: Bool -> Identifier -> Identifier -> String-attrname isIn field attr | field == _LOC = locname attr- | field == _INST = instname attr- | field == _INST' = inst'name attr- | field == _FIELD = fieldname attr- | otherwise = let direction | isIn = "I"- | otherwise = "O"- in '_' : getName field ++ direction ++ getName attr+attrname :: Options -> Bool -> Identifier -> Identifier -> String+attrname opts isIn field attr+ | field == _LOC = locname opts attr+ | field == _INST = instname attr+ | field == _INST' = inst'name attr+ | field == _FIELD = fieldname attr+ | otherwise = let direction | isIn = "I"+ | otherwise = "O"+ pref = if clean opts then 'a' else '_'+ in pref : getName field ++ direction ++ getName attr -locname, instname, inst'name, fieldname :: Identifier -> String-locname v = '_' : getName v+locname :: Options -> Identifier -> String+locname opts v = (if clean opts then 'l' else '_') : getName v++instname, inst'name, fieldname :: Identifier -> String instname v = getName v ++ "_val_" inst'name v = getName v ++ "_inst_" fieldname v = getName v++"_"
src/GrammarInfo.hs view
@@ -8,6 +8,7 @@ import qualified Data.Set as Set import CommonTypes import Data.List(intersect,(\\))+import Options type LMH = (Vertex,Vertex,Vertex) data Info = Info { tdpToTds :: Table Vertex@@ -23,7 +24,7 @@ instance Show CRule where show (CRule name _ _ nt con field childnt _ _ rhs _ _ _ uses _ _) = "CRule " ++ show name ++ " nt: " ++ show nt ++ " con: " ++ show con ++ " field: " ++ show field- ++ " childnt: " ++ show childnt ++ " rhs: " ++ concat rhs ++ " uses: " ++ show [ attrname True fld nm | (fld,nm) <- Set.toList uses ]+ ++ " childnt: " ++ show childnt ++ " rhs: " ++ concat rhs ++ " uses: " ++ show [ attrname noOptions True fld nm | (fld,nm) <- Set.toList uses ] show _ = error "Only CRule is supported" type CInterfaceMap = Map NontermIdent CInterface
src/HsTokenScanner.hs view
@@ -11,16 +11,16 @@ isAGesc :: Char -> Bool isAGesc c = c == '@' -lexTokens :: Pos -> String -> [HsToken]-lexTokens = scanTokens keywordstxt keywordsops specialchars opchars+lexTokens :: Options -> Pos -> String -> [HsToken]+lexTokens = scanTokens keywordstxt keywordsops specialchars opchars where keywordstxt = [] keywordsops = [".","=", ":=", ":","|","@"] specialchars = ";()[],_{}`" opchars = "!#$%&*+./<=>?@\\^|-~:" -scanTokens :: [String] -> [String] -> String -> String -> Pos -> String -> [HsToken]-scanTokens keywordstxt keywordsops specchars opchars pos input+scanTokens :: [String] -> [String] -> String -> String -> Options -> Pos -> String -> [HsToken]+scanTokens keywordstxt keywordsops specchars opchars opts pos input = doScan pos input where@@ -28,7 +28,7 @@ locatein es = isJust . btLocateIn compare (tab2tree (sort es)) iskw = locatein keywordstxt isop = locatein keywordsops- isSymb = locatein specchars+ isSymb = locatein specchars isOpsym = locatein opchars isIdStart c = isLower c || c == '_'@@ -53,6 +53,8 @@ in AGField (Ident field p) (Ident attr p) p Nothing : doScan p3 rest2 _ -> AGLocal (Ident field p) p Nothing : doScan p2 rest + doScan p ('/':'/':s) | clean opts = doScan p (dropWhile (/= '\n') s)+ doScan p ('/':'*':s) | clean opts = advc' 2 p (lexCleanNest doScan) s -- } doScan p ('-':'-':s) = doScan p (dropWhile (/= '\n') s) doScan p ('{':'-':s) = advc' 2 p (lexNest doScan) s -- } doScan p ('"':ss)@@ -62,6 +64,9 @@ else StrToken s p : advc' (swidth+2) p doScan (tail rest) doScan p ('\'':ss)+ | clean opts = let (str,nswidth,rest) = scanQualName ss+ in HsToken ('\'' : str ++ "'") p : advc' (nswidth + 2) p doScan (tail rest)+ | otherwise = let (mc,cwidth,rest) = scanChar ss in case mc of Nothing -> Err "Error in character literal" p : advc' cwidth p doScan rest@@ -100,6 +105,13 @@ lexNest' c p (x:s) = lexNest' c (updPos x p) s lexNest' _ _ [] = [Err "Unterminated nested comment" pos] +lexCleanNest :: (Pos -> String -> [HsToken]) -> Pos -> String -> [HsToken]+lexCleanNest cont pos inp = lexNest' cont pos inp+ where lexNest' c p ('/':'*':s) = lexNest' (lexNest' c) (advc 2 p) s+ lexNest' c p ('*':'/':s) = c (advc 2 p) s+ lexNest' c p (x:s) = lexNest' c (updPos x p) s+ lexNest' _ _ [] = [Err "Unterminated nested comment" pos]+ scanString :: String -> (String, Int, String) scanString [] = ("",0,[]) scanString ('\\':'&':xs) = let (str,w,r) = scanString xs@@ -110,6 +122,13 @@ (str,w,r) = scanString cr -- str' = maybe "" (:str) ch in maybe ("",0,xs) (\c -> (c:str,cw+w,r)) ch++scanQualName :: String -> (String, Int, String)+scanQualName [] = ("",0,[])+scanQualName r@('\'':_) = ("",0,r)+scanQualName xs = let (ch,cw,cr) = getchar xs+ (str,w,r) = scanQualName cr+ in maybe ("",0,xs) (\c -> (c:str,cw+w,r)) ch scanChar :: String -> (Maybe Char, Int, String) scanChar ('"' :xs) = (Just '"',1,xs)
src/PPUtil.hs view
@@ -55,4 +55,5 @@ ppLinePragma :: Options -> Int -> String -> PP_Doc ppLinePragma opts ln fl | ocaml opts = "#" >#< show ln >#< show fl+ | clean opts = "//" >#< show ln >#< show fl | otherwise = "{-# LINE" >#< show ln >#< show fl >#< "#-}"
src/Parser.hs view
@@ -67,23 +67,28 @@ -- marcos: added the parameter 'agi' and the 'ext' part parseFile :: Bool -> Options -> [FilePath] -> String -> IO ([Elem],[String],[String], Maybe String,[Message Token Pos ])-parseFile agi opts searchPath filename+parseFile = parseFile' []++parseFile' :: [String] -> Bool -> Options -> [FilePath] -> String -> IO ([Elem],[String],[String], Maybe String,[Message Token Pos ])+parseFile' parsedfiles agi opts searchPath filename = do file <- resolveFile opts searchPath filename- txt <- readFile file- let searchPath' = takeDirectory file : searchPath -- search first relative to the including file- litMode = ".lag" `isSuffixOf` file- (files,text) = if litMode then scanLit txt- else ([],txt)- tokens = input opts (initPos file) text+ if file `elem` parsedfiles + then return ([], [], parsedfiles, Nothing, [])+ else do+ txt <- readFile file+ let searchPath' = takeDirectory file : searchPath -- search first relative to the including file+ litMode = ".lag" `isSuffixOf` file+ (files,text) = if litMode then scanLit txt+ else ([],txt)+ tokens = input opts (initPos file) text - steps = parse (pElemsFiles agi) tokens- stop (_,fs,_,_,_) = null fs- cont (es,fs,allfs,ext,msg)- = do res <- mapM (parseFile agi opts searchPath') fs- let (ess,fss,allfss,_, msgs) = unzip5 res- return (concat ess ++ es, concat fss, allfs ++ concat allfss, ext, msg ++ concat msgs)- let (Pair (es,fls,ext) _ ,mesg) = evalStepsMessages steps- loopp stop cont (es,files ++ fls,[file], ext,mesg)+ steps = parse (pElemsFiles agi) tokens+ stop (_,fs,_,_,_) = null fs+ cont (es,f:fs,allfs,ext,msg)+ = do (ess,fss,allfss,_, msgs) <- parseFile' allfs agi opts searchPath' f+ return (ess ++ es, fss ++ fs, allfss, ext, msg ++ msgs)+ let (Pair (es,fls,ext) _ ,mesg) = evalStepsMessages steps+ loopp stop cont (es,files ++ fls,file : parsedfiles, ext,mesg) where --@@ -150,7 +155,10 @@ pElem :: AGParser Elem pElem- = Data <$> (pDATA <|> pTYPE)+ = (\(pos, ct) -> Data pos ct)+ <$> ( (\x -> (x, DataConstructor)) <$> (pDATA <|> pTYPE)+ <|> (\x -> (x, RecordConstructor)) <$> pRECORD+ ) <*> pOptClassContext' <*> pNontSet <*> pTyVars@@ -311,7 +319,7 @@ pSemDefs = concat <$> pList_ng pSemDef <?> "attribute rules" pExpr :: AGParser Expression- pExpr = (\(str,pos) -> Expression pos (lexTokens pos str)) <$> pCodescrapL <?> "an expression"+ pExpr = (\(str,pos) -> Expression pos (lexTokens opts pos str)) <$> pCodescrapL <?> "an expression" pTypeColon :: AGParser Pos pTypeColon@@ -537,7 +545,7 @@ pCodescrap :: AGParser (String,Pos) pCodescrap = pCodeBlock -pSEM, pATTR, pDATA, pUSE, pLOC,pINCLUDE, pTYPE, pEquals, pColonEquals, pTilde,+pSEM, pATTR, pDATA, pRECORD, pUSE, pLOC,pINCLUDE, pTYPE, pEquals, pColonEquals, pTilde, pEXTENDS, --marcos pBar, pColon, pLHS,pINST,pSET,pDERIVING,pMinus,pIntersect,pDoubleArrow,pArrow, pDot, pUScore, pEXT,pAt,pStar, pSmaller, pWRAPPER, pNOCATAS, pPRAGMA, pMAYBE, pEITHER, pMAP, pINTMAP,@@ -552,6 +560,7 @@ pSEMPRAGMA = pCostReserved 90 "SEMPRAGMA" <?> "SEMPRAGMA" pATTACH = pCostReserved 90 "ATTACH" <?> "ATTACH" pDATA = pCostReserved 90 "DATA" <?> "DATA"+pRECORD = pCostReserved 90 "RECORD" <?> "RECORD" pEXT = pCostReserved 90 "EXT" <?> "EXT" pATTR = pCostReserved 90 "ATTR" <?> "ATTR" pSEM = pCostReserved 90 "SEM" <?> "SEM"
src/Scanner.hs view
@@ -1,223 +1,234 @@-{-# LANGUAGE MagicHash, UnboxedTuples, FlexibleInstances #-} -module Scanner where -import GHC.Prim -import TokenDef -import UU.Scanner.Position -import UU.Scanner.Token -import UU.Parsing(InputState(..),Either'(..)) -import Data.Maybe -import Data.List -import Data.Char -import UU.Scanner.GenToken -import Options (Options (..)) - -data Input = Input !Pos String (Maybe (Token, Input)) - -instance InputState Input Token Pos where - splitStateE input@(Input _ _ next) = - case next of - Nothing -> Right' input - Just (s, rest) -> Left' s rest - splitState (Input _ _ next) = - case next of - Nothing -> error "splitState on empty input" - Just (s, rest) -> (# s, rest #) - getPosition (Input pos _ next) = case next of - Just (s,_) -> position s - Nothing -> pos -- end of file - - -input :: Options -> Pos -> String -> Input -input opts pos inp = Input pos - inp - (case scan opts pos inp of - Nothing -> Nothing - Just (s,p,r) -> Just (s, input opts p r) - ) - -type Lexer s = Pos -> String -> Maybe (s,Pos,String) - -scan :: Options -> Lexer Token -scan opts p0 - | column p0 == 1 = scanBeginOfLine p0 - | otherwise = scan p0 - where - keywords' = if lcKeywords opts - then map (map toLower) keywords - else keywords - mkKeyword s | s `elem` lowercaseKeywords = s - | otherwise = map toUpper s - - scan :: Lexer Token - scan p [] = Nothing - scan p ('-':'-':xs) | null xs || not (head xs `elem` "<>!?#@:%$^&") - = let (com,rest) = span (/= '\n') xs - in advc' (2+length com) p scan rest - scan p ('{':'-':xs) = advc' 2 p (ncomment scan) xs - scan p ('{' :xs) = advc' 1 p codescrap xs - scan p ('\CR':xs) = case xs of - '\LF':ys -> newl' p scanBeginOfLine ys --ms newline - _ -> newl' p scanBeginOfLine xs --mac newline - scan p ('\LF':xs) = newl' p scanBeginOfLine xs --unix newline - scan p (x:xs) | isSpace x = updPos' x p scan xs - scan p xs = Just (scan' xs) - where scan' ('.' :rs) = (reserved "." p, advc 1 p, rs) - scan' ('@' :rs) = (reserved "@" p, advc 1 p, rs) - scan' (',' :rs) = (reserved "," p, advc 1 p, rs) - scan' ('_' :rs) = (reserved "_" p, advc 1 p, rs) - scan' ('~' :rs) = (reserved "~" p, advc 1 p, rs) - scan' ('+' :rs) = (reserved "+" p, advc 1 p, rs) - scan' ('<' : '-' : rs) = (reserved "<-" p, advc 2 p, rs) - scan' ('<' : '=' : rs) = (reserved "<=" p, advc 2 p, rs) - scan' ('<' : '<' : '-' : rs) = (reserved "<<-" p, advc 3 p, rs) - scan' ('<' :rs) = (reserved "<" p, advc 1 p, rs) - scan' ('[' :rs) = (reserved "[" p, advc 1 p, rs) - scan' (']' :rs) = (reserved "]" p, advc 1 p, rs) - scan' ('(' :rs) = (reserved "(" p, advc 1 p, rs) - scan' (')' :rs) = (reserved ")" p, advc 1 p, rs) - -- scan' ('{' :rs) = (OBrace p, advc 1 p, rs) - -- scan' ('}' :rs) = (CBrace p, advc 1 p, rs) - - scan' ('\"' :rs) = let isOk c = c /= '"' && c /= '\n' - (str,rest) = span isOk rs - in if null rest || head rest /= '"' - then (errToken "unterminated string literal" p - , advc (1+length str) p,rest) - else (valueToken TkString str p, advc (2+length str) p, tail rest) - - scan' ('=' : '>' : rs) = (reserved "=>" p, advc 2 p, rs) - scan' ('=' :rs) = (reserved "=" p, advc 1 p, rs) - scan' (':':'=':rs) = (reserved ":=" p, advc 2 p, rs) - - scan' (':':':':rs) {- | doubleColons opts -} = (reserved "::" p, advc 1 p, rs) -- recognize double colons too - scan' (':' :rs) = (reserved ":" p, advc 1 p, rs) - scan' ('|' :rs) = (reserved "|" p, advc 1 p, rs) - - scan' ('/':'\\':rs) = (reserved "/\\" p, advc 2 p, rs) - scan' ('-':'>' :rs) = (reserved "->" p, advc 2 p, rs) - scan' ('-' :rs) = (reserved "-" p, advc 1 p, rs) - scan' ('*' :rs) = (reserved "*" p, advc 1 p, rs) - - scan' ('\'' :rs) | ocaml opts = -- note: ocaml type variables are encoded as 'TkTextnm' tokens - let (var,rest) = ident rs - str = '\'' : var - in (valueToken TkTextnm str p, advc (length str) p, rest) - - scan' (x:rs) | isLower x = let (var,rest) = ident rs - str = (x:var) - tok | str `elem` keywords' = reserved (mkKeyword str) - | otherwise = valueToken TkVarid str - in (tok p, advc (length var+1) p, rest) - | isUpper x = let (var,rest) = ident rs - str = (x:var) - tok | str `elem` keywords' = reserved (mkKeyword str) - | otherwise = valueToken TkConid str - in (tok p, advc (length var+1) p,rest) - | otherwise = (errToken ("unexpected character " ++ show x) p, advc 1 p, rs) - - scanBeginOfLine :: Lexer Token - scanBeginOfLine p ('{' : '-' : ' ' : 'L' : 'I' : 'N' : 'E' : ' ' : xs) - | isOkBegin rs && isOkEnd rs' - = scan (advc (8 + length r + 2 + length s + 4) p') (drop 4 rs') - | otherwise - = Just (errToken ("Invalid LINE pragma: " ++ show r) p, advc 8 p, xs) - where - (r,rs) = span isDigit xs - (s, rs') = span (/= '"') (drop 2 rs) - p' = Pos (read r - 1) (column p) s -- LINE pragma indicates the line number of the /next/ line! - - isOkBegin (' ' : '"' : _) = True - isOkBegin _ = False - - isOkEnd ('"' : ' ' : '-' : '}' : _) = True - isOkEnd _ = False - scanBeginOfLine p xs - = scan p xs - - -ident = span isValid - where isValid x = isAlphaNum x || x == '_' || x == '\'' - -lowercaseKeywords = ["loc","lhs", "inst", "optpragmas", "imports", "toplevel", "datablock", "recblock"] -keywords = lowercaseKeywords ++ - [ "DATA", "EXT", "ATTR", "SEM","TYPE", "USE", "INCLUDE" - , "EXTENDS" -- marcos - , "SET","DERIVING","FOR", "WRAPPER", "NOCATAS", "MAYBE", "EITHER", "MAP", "INTMAP" - , "PRAGMA", "SEMPRAGMA", "MODULE", "ATTACH", "UNIQUEREF", "INH", "SYN", "CHN" - , "AUGMENT", "AROUND", "MERGE", "AS", "SELF", "INTSET" - ] - -ncomment c p ('-':'}':xs) = advc' 2 p c xs -ncomment c p ('{':'-':xs) = advc' 2 p (ncomment (ncomment c)) xs -ncomment c p (x:xs) = updPos' x p (ncomment c) xs -ncomment c p [] = Just (errToken "unterminated nested comment" p, p,[]) - -codescrap p xs = let (p2,xs2,sc) = codescrap' 1 p xs - in case xs2 of - ('}':rest) -> Just (valueToken TkTextln sc p,advc 1 p2,rest) - _ -> Just (errToken "unterminated codescrap" p,p2,xs2) - - -codescrap' d p [] = (p,[],[]) -{- -codescrap' d p ('{':'{':xs) = let (p2,xs2,sc) = advc' 2 p (codescrap' d) xs - in (p2,xs2,'{':' ':sc) -codescrap' d p ('}':'}':xs) = let (p2,xs2,sc) = advc' 2 p (codescrap' d) xs - in (p2,xs2,'}':' ':sc) --} -codescrap' d p ('{':xs) = let (p2,xs2,sc) = advc' 1 p (codescrap' (d+1)) xs - in (p2,xs2,'{' : sc) -codescrap' d p ('}':xs) | d == 1 = (p,'}':xs,[]) - | otherwise = let (p2,xs2,sc) = advc' 1 p (codescrap' (d-1)) xs - in (p2,xs2,'}' : sc) -codescrap' d p (x :xs) = let (p2,xs2,sc) = updPos' x p (codescrap' d) xs - in (p2,xs2,x:sc) ---Literate Mode -scanLit xs = (fs, foldr insNL (const "") codeLns 1) - where insNL (n,line) r = \n1 -> replicate (n-n1) '\n' ++ line ++ r n - (fs,codeLns,_) = getBlocks ([1..] `zip` toLines xs) - getBlocks [] = ([],[],[]) - getBlocks xs = let (files1,txt1,r1) = getBlock xs - (files2,txt2,r2) = getBlocks r1 - in (files1++files2, txt1++txt2, r2) - - - getBlock = getLines . dropWhile comment - getLines [] = ([],[],[]) - getLines ((n,l):ls) | "\\begin{code}" `isPrefixOf` l = let (lns,rest) = codelines ls - in ([],lns,rest) - | "\\begin{Code}" `isPrefixOf` l = let (lns,rest) = codeLines ls - in ([],lns,rest) - | "\\IN{" `isPrefixOf` l = - let name = getName l - in ([name],[],ls) - | otherwise = getBlock ls - comment = not . ("\\" `isPrefixOf`) .snd - -toLines :: String -> [String] -toLines "" = [] -toLines s = let (l,s') = breakLine s - in l : toLines s' -breakLine xs = case xs of - '\CR' : ys -> case ys of - '\LF' : zs -> ([],zs) - _ -> ([],ys) - '\LF' : ys -> ([], ys) - x : ys -> let (l,s) = breakLine ys - in (x:l,s) - [] -> ([],[]) - -codelines [] = error "Unterminated literate code block" -codelines ((n,l):ls) | "\\end{code}" `isPrefixOf` l = ([],ls) - | otherwise = let (lns,r) = codelines ls - in ((n,l):lns,r) - -codeLines [] = error "Unterminated literate Code block" -codeLines ((n,l):ls) | "\\end{Code}" `isPrefixOf` l = ([],ls) - | otherwise = let (lns,r) = codeLines ls - in ((n,l):lns,r) - -getName l = case r of - ('}':_) -> nm - _ -> error $ "missing '}' in \\IN" - where (nm,r) = span (/='}') (drop 4 l) +{-# LANGUAGE MagicHash, UnboxedTuples, FlexibleInstances #-}+module Scanner where+import GHC.Prim+import TokenDef+import UU.Scanner.Position+import UU.Scanner.Token+import UU.Parsing(InputState(..),Either'(..))+import Data.Maybe+import Data.List+import Data.Char+import UU.Scanner.GenToken+import Options (Options (..))++data Input = Input !Pos String (Maybe (Token, Input))++instance InputState Input Token Pos where+ splitStateE input@(Input _ _ next) =+ case next of+ Nothing -> Right' input+ Just (s, rest) -> Left' s rest+ splitState (Input _ _ next) =+ case next of+ Nothing -> error "splitState on empty input"+ Just (s, rest) -> (# s, rest #)+ getPosition (Input pos _ next) = case next of+ Just (s,_) -> position s+ Nothing -> pos -- end of file+++input :: Options -> Pos -> String -> Input+input opts pos inp = Input pos+ inp+ (case scan opts pos inp of+ Nothing -> Nothing+ Just (s,p,r) -> Just (s, input opts p r)+ )++type Lexer s = Pos -> String -> Maybe (s,Pos,String)++scan :: Options -> Lexer Token+scan opts p0+ | column p0 == 1 = scanBeginOfLine p0+ | otherwise = scan p0+ where+ keywords' = if lcKeywords opts+ then map (map toLower) keywords+ else keywords+ mkKeyword s | s `elem` lowercaseKeywords = s+ | otherwise = map toUpper s++ scan :: Lexer Token+ scan p [] = Nothing+ scan p ('/':'/':xs)+ | clean opts+ = let (com,rest) = span (/= '\n') xs+ in advc' (2+length com) p scan rest+ scan p ('-':'-':xs) | null xs || not (head xs `elem` "<>!?#@:%$^&")+ = let (com,rest) = span (/= '\n') xs+ in advc' (2+length com) p scan rest+ scan p ('{':'-':xs) = advc' 2 p (ncomment scan) xs+ scan p ('/':'*':xs) | clean opts = advc' 2 p (cleancomment scan) xs+ scan p ('{' :xs) = advc' 1 p codescrap xs+ scan p ('\CR':xs) = case xs of+ '\LF':ys -> newl' p scanBeginOfLine ys --ms newline+ _ -> newl' p scanBeginOfLine xs --mac newline+ scan p ('\LF':xs) = newl' p scanBeginOfLine xs --unix newline+ scan p (x:xs) | isSpace x = updPos' x p scan xs+ scan p xs = Just (scan' xs)+ where scan' ('.' :rs) = (reserved "." p, advc 1 p, rs)+ scan' ('@' :rs) = (reserved "@" p, advc 1 p, rs)+ scan' (',' :rs) = (reserved "," p, advc 1 p, rs)+ scan' ('_' :rs) = (reserved "_" p, advc 1 p, rs)+ scan' ('~' :rs) = (reserved "~" p, advc 1 p, rs)+ scan' ('+' :rs) = (reserved "+" p, advc 1 p, rs)+ scan' ('<' : '-' : rs) = (reserved "<-" p, advc 2 p, rs)+ scan' ('<' : '=' : rs) = (reserved "<=" p, advc 2 p, rs)+ scan' ('<' : '<' : '-' : rs) = (reserved "<<-" p, advc 3 p, rs)+ scan' ('<' :rs) = (reserved "<" p, advc 1 p, rs)+ scan' ('[' :rs) = (reserved "[" p, advc 1 p, rs)+ scan' (']' :rs) = (reserved "]" p, advc 1 p, rs)+ scan' ('(' :rs) = (reserved "(" p, advc 1 p, rs)+ scan' (')' :rs) = (reserved ")" p, advc 1 p, rs)+ -- scan' ('{' :rs) = (OBrace p, advc 1 p, rs)+ -- scan' ('}' :rs) = (CBrace p, advc 1 p, rs)++ scan' ('\"' :rs) = let isOk c = c /= '"' && c /= '\n'+ (str,rest) = span isOk rs+ in if null rest || head rest /= '"'+ then (errToken "unterminated string literal" p+ , advc (1+length str) p,rest)+ else (valueToken TkString str p, advc (2+length str) p, tail rest)++ scan' ('=' : '>' : rs) = (reserved "=>" p, advc 2 p, rs)+ scan' ('=' :rs) = (reserved "=" p, advc 1 p, rs)+ scan' (':':'=':rs) = (reserved ":=" p, advc 2 p, rs)++ scan' (':':':':rs) {- | doubleColons opts -} = (reserved "::" p, advc 1 p, rs) -- recognize double colons too+ scan' (':' :rs) = (reserved ":" p, advc 1 p, rs)+ scan' ('|' :rs) = (reserved "|" p, advc 1 p, rs)++ scan' ('/':'\\':rs) = (reserved "/\\" p, advc 2 p, rs)+ scan' ('-':'>' :rs) = (reserved "->" p, advc 2 p, rs)+ scan' ('-' :rs) = (reserved "-" p, advc 1 p, rs)+ scan' ('*' :rs) = (reserved "*" p, advc 1 p, rs)++ scan' ('\'' :rs) | ocaml opts = -- note: ocaml type variables are encoded as 'TkTextnm' tokens+ let (var,rest) = ident opts rs+ str = '\'' : var+ in (valueToken TkTextnm str p, advc (length str) p, rest)++ scan' (x:rs) | isLower x = let (var,rest) = ident opts rs+ str = (x:var)+ tok | str `elem` keywords' = reserved (mkKeyword str)+ | otherwise = valueToken TkVarid str+ in (tok p, advc (length var+1) p, rest)+ | isUpper x = let (var,rest) = ident opts rs+ str = (x:var)+ tok | str `elem` keywords' = reserved (mkKeyword str)+ | otherwise = valueToken TkConid str+ in (tok p, advc (length var+1) p,rest)+ | otherwise = (errToken ("unexpected character " ++ show x) p, advc 1 p, rs)++ scanBeginOfLine :: Lexer Token+ scanBeginOfLine p ('{' : '-' : ' ' : 'L' : 'I' : 'N' : 'E' : ' ' : xs)+ | isOkBegin rs && isOkEnd rs'+ = scan (advc (8 + length r + 2 + length s + 4) p') (drop 4 rs')+ | otherwise+ = Just (errToken ("Invalid LINE pragma: " ++ show r) p, advc 8 p, xs)+ where+ (r,rs) = span isDigit xs+ (s, rs') = span (/= '"') (drop 2 rs)+ p' = Pos (read r - 1) (column p) s -- LINE pragma indicates the line number of the /next/ line!++ isOkBegin (' ' : '"' : _) = True+ isOkBegin _ = False++ isOkEnd ('"' : ' ' : '-' : '}' : _) = True+ isOkEnd _ = False+ scanBeginOfLine p xs+ = scan p xs+++ident opts = span isValid+ where isValid x = isAlphaNum x || x == '_' ||+ (not (clean opts) && x == '\'') || (clean opts && x == '`')++lowercaseKeywords = ["loc","lhs", "inst", "optpragmas", "imports", "toplevel", "datablock", "recblock"]+keywords = lowercaseKeywords +++ [ "DATA", "RECORD", "EXT", "ATTR", "SEM","TYPE", "USE", "INCLUDE"+ , "EXTENDS" -- marcos+ , "SET","DERIVING","FOR", "WRAPPER", "NOCATAS", "MAYBE", "EITHER", "MAP", "INTMAP"+ , "PRAGMA", "SEMPRAGMA", "MODULE", "ATTACH", "UNIQUEREF", "INH", "SYN", "CHN"+ , "AUGMENT", "AROUND", "MERGE", "AS", "SELF", "INTSET"+ ]++ncomment c p ('-':'}':xs) = advc' 2 p c xs+ncomment c p ('{':'-':xs) = advc' 2 p (ncomment (ncomment c)) xs+ncomment c p (x:xs) = updPos' x p (ncomment c) xs+ncomment c p [] = Just (errToken "unterminated nested comment" p, p,[])++cleancomment c p ('*':'/':xs) = advc' 2 p c xs+cleancomment c p ('/':'*':xs) = advc' 2 p (cleancomment (cleancomment c)) xs+cleancomment c p (x:xs) = updPos' x p (cleancomment c) xs+cleancomment c p [] = Just (errToken "unterminated nested comment" p, p,[])++codescrap p xs = let (p2,xs2,sc) = codescrap' 1 p xs+ in case xs2 of+ ('}':rest) -> Just (valueToken TkTextln sc p,advc 1 p2,rest)+ _ -> Just (errToken "unterminated codescrap" p,p2,xs2)+++codescrap' d p [] = (p,[],[])+{-+codescrap' d p ('{':'{':xs) = let (p2,xs2,sc) = advc' 2 p (codescrap' d) xs+ in (p2,xs2,'{':' ':sc)+codescrap' d p ('}':'}':xs) = let (p2,xs2,sc) = advc' 2 p (codescrap' d) xs+ in (p2,xs2,'}':' ':sc)+-}+codescrap' d p ('{':xs) = let (p2,xs2,sc) = advc' 1 p (codescrap' (d+1)) xs+ in (p2,xs2,'{' : sc)+codescrap' d p ('}':xs) | d == 1 = (p,'}':xs,[])+ | otherwise = let (p2,xs2,sc) = advc' 1 p (codescrap' (d-1)) xs+ in (p2,xs2,'}' : sc)+codescrap' d p (x :xs) = let (p2,xs2,sc) = updPos' x p (codescrap' d) xs+ in (p2,xs2,x:sc)+--Literate Mode+scanLit xs = (fs, foldr insNL (const "") codeLns 1)+ where insNL (n,line) r = \n1 -> replicate (n-n1) '\n' ++ line ++ r n+ (fs,codeLns,_) = getBlocks ([1..] `zip` toLines xs)+ getBlocks [] = ([],[],[])+ getBlocks xs = let (files1,txt1,r1) = getBlock xs+ (files2,txt2,r2) = getBlocks r1+ in (files1++files2, txt1++txt2, r2)+++ getBlock = getLines . dropWhile comment+ getLines [] = ([],[],[])+ getLines ((n,l):ls) | "\\begin{code}" `isPrefixOf` l = let (lns,rest) = codelines ls+ in ([],lns,rest)+ | "\\begin{Code}" `isPrefixOf` l = let (lns,rest) = codeLines ls+ in ([],lns,rest)+ | "\\IN{" `isPrefixOf` l =+ let name = getName l+ in ([name],[],ls)+ | otherwise = getBlock ls+ comment = not . ("\\" `isPrefixOf`) .snd++toLines :: String -> [String]+toLines "" = []+toLines s = let (l,s') = breakLine s+ in l : toLines s'+breakLine xs = case xs of+ '\CR' : ys -> case ys of+ '\LF' : zs -> ([],zs)+ _ -> ([],ys)+ '\LF' : ys -> ([], ys)+ x : ys -> let (l,s) = breakLine ys+ in (x:l,s)+ [] -> ([],[])++codelines [] = error "Unterminated literate code block"+codelines ((n,l):ls) | "\\end{code}" `isPrefixOf` l = ([],ls)+ | otherwise = let (lns,r) = codelines ls+ in ((n,l):lns,r)++codeLines [] = error "Unterminated literate Code block"+codeLines ((n,l):ls) | "\\end{Code}" `isPrefixOf` l = ([],ls)+ | otherwise = let (lns,r) = codeLines ls+ in ((n,l):lns,r)++getName l = case r of+ ('}':_) -> nm+ _ -> error $ "missing '}' in \\IN"+ where (nm,r) = span (/='}') (drop 4 l)
src/SequentialTypes.hs view
@@ -144,13 +144,13 @@ eqClasses p (a:as) = let (isA,rest) = partition (p a) as in (a:isA):eqClasses p rest -lhsshow :: NTAttr -> String-lhsshow (NTAInh _ attr _) = lhsname True attr-lhsshow (NTASyn _ attr _) = lhsname False attr +lhsshow :: Options -> NTAttr -> String+lhsshow opts (NTAInh _ attr _) = lhsname opts True attr+lhsshow opts (NTASyn _ attr _) = lhsname opts False attr -rhsshow :: Identifier -> NTAttr -> String-rhsshow field (NTAInh _ attr _) = attrname False field attr-rhsshow field (NTASyn _ attr _) = attrname True field attr +rhsshow :: Options -> Identifier -> NTAttr -> String+rhsshow opts field (NTAInh _ attr _) = attrname opts False field attr+rhsshow opts field (NTASyn _ attr _) = attrname opts True field attr prettyCRule :: CRule -> String prettyCRule cr
uuagc.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.8 build-type: Custom name: uuagc-version: 0.9.42.3+version: 0.9.50 license: BSD3 license-file: LICENSE maintainer: Jeroen Bransen <J.Bransen@uu.nl>@@ -29,7 +29,7 @@ build-depends: uuagc-cabal >= 1.0.2.0 build-depends: base >= 4, base < 5 -- Self dependency, depend on library below- build-depends: uuagc == 0.9.42.3+ build-depends: uuagc == 0.9.50 main-is: Main.hs hs-source-dirs: src-main @@ -78,6 +78,7 @@ , Patterns , PrintCode , PrintOcamlCode+ , PrintCleanCode , PrintVisitCode , PrintErrorMessages , SemHsTokens@@ -97,4 +98,5 @@ , KWOrder , ExecutionPlan , ExecutionPlan2Hs+ , ExecutionPlan2Clean , ExecutionPlan2Caml
uuagc_options view
@@ -51,6 +51,9 @@ file: "src-ag/GenerateCode.ag" options: module, pretty, newtypes, wrappers, catas, semfuns, signatures, genlinepragmas, checkParseHaskell, kennedywarren +file: "src-ag/PrintCleanCode.ag"+options: module, pretty, newtypes, wrappers, catas, semfuns, signatures, genlinepragmas, checkParseHaskell, kennedywarren+ file: "src-ag/PrintOcamlCode.ag" options: module, pretty, newtypes, wrappers, catas, semfuns, signatures, genlinepragmas, checkParseHaskell, kennedywarren @@ -94,6 +97,9 @@ options: module, pretty, newtypes, wrappers, catas, semfuns, signatures, genlinepragmas, checkParseHaskell, kennedywarren file: "src-ag/ExecutionPlan2Hs.ag"+options: module, pretty, newtypes, wrappers, catas, semfuns, signatures, genlinepragmas, checkParseHaskell, kennedywarren++file: "src-ag/ExecutionPlan2Clean.ag" options: module, pretty, newtypes, wrappers, catas, semfuns, signatures, genlinepragmas, checkParseHaskell, kennedywarren file: "src-ag/ExecutionPlan2Caml.ag"